Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-16 Thread Thiago Macieira
On Saturday, 16 January 2021 02:33:09 PST Alexander Dyagilev wrote: > Actually, the code is this: You may want to look at the overhead you're creating... So, you create 128 bits (16 bytes) of data of UUID, but then you save into your database a QDataStream payload containing a QString encoding o

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-16 Thread Alexander Dyagilev
Hello, I don't believe such bug can exist and no one has noticed it yet :) Anyway, thanks for your suggestion. I've checked it - works fine. Actually, the code is this: QString uuid=QUuid::createUuid().toString(QUuid::WithoutBraces); QVariant v(uuid); QByteArray UuidByteArray = toByteArrayBy

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-15 Thread Thiago Macieira
On Thursday, 14 January 2021 22:31:19 PST Alexander Dyagilev wrote: > BLOB, so any arbitrary data is allowed. Thus the reason is not that the > first byte is 0. But it might be that the binding is buggy and is not passing the full 16 bytes. You can easily confirm or deny this by trying to insert

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Alexander Dyagilev
Hello, BLOB, so any arbitrary data is allowed. Thus the reason is not that the first byte is 0. On 1/15/2021 2:55 AM, Tony Rietwyk wrote: Hi, I haven't used SQLite, but I'm wondering if when the UuidByteArray starts with a zero byte, then maybe nothing gets written for the value?  1 in 16

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Alexander Dyagilev
Hello, It's BLOB there, not TEXT. On 1/15/2021 3:42 AM, Thiago Macieira wrote: On Thursday, 14 January 2021 15:55:35 PST Tony Rietwyk wrote: Is a BLOB field binary or text? Does a binary blob with embedded zeroes always get fully written? Maybe using base64 encoding would work better? The t

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Thiago Macieira
On Thursday, 14 January 2021 15:55:35 PST Tony Rietwyk wrote: > Is a BLOB field binary or text? Does a binary blob with embedded zeroes > always get fully written? Maybe using base64 encoding would work better? The table schema description said "TEXT", so one expects the UUID is in its text for

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Tony Rietwyk
Hi, I haven't used SQLite, but I'm wondering if when the UuidByteArray starts with a zero byte, then maybe nothing gets written for the value?  1 in 16 of the generated UUID's could have this, which roughly matches your 4% failures. Is a BLOB field binary or text?  Does a binary blob with em

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Scott Bloom
error should be different, isn't it? > > Scott > > -Original Message- > From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of > Alexander Dyagilev > Sent: Thursday, January 14, 2021 07:19 > To: interest@qt-project.org > Subject: [Intere

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Alexander Dyagilev
On 1/14/2021 7:41 PM, Alexander Dyagilev wrote: On 1/14/2021 7:06 PM, Scott Bloom wrote: Did the prepare fail? No. But why should it fail? Oops. I meant we does not check this. ___ Interest mailing list Interest@qt-project.org https://lists.qt-p

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Alexander Dyagilev
it? Scott -Original Message- From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of Alexander Dyagilev Sent: Thursday, January 14, 2021 07:19 To: interest@qt-project.org Subject: [Interest] SQLite: mystic bug: No query Unable to fetch row error Hello, Each instance of our app is s

Re: [Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Scott Bloom
rg Subject: [Interest] SQLite: mystic bug: No query Unable to fetch row error Hello, Each instance of our app is supposed to have an unique id (UUID). At every start, it check if it has assigned one, and if not - generates it and saves it to the SQLite database. We've found, that 4% of

[Interest] SQLite: mystic bug: No query Unable to fetch row error

2021-01-14 Thread Alexander Dyagilev
Hello, Each instance of our app is supposed to have an unique id (UUID). At every start, it check if it has assigned one, and if not - generates it and saves it to the SQLite database. We've found, that 4% of ours users has empty UUIDs. We've added some diagnostic reporting info and found, t