Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-01 Thread Roger Binns
On 01/07/16 05:04, Simon Slavin wrote: > On 1 Jul 2016, at 10:18am, Rob Golsteijn wrote: > >> For the tests below I assumed that the intention is that a string ends at >> the first embedded nul character. > > I'm not sure that this is the intent. > > The idea that null is a terminating charact

Re: [sqlite] Sudden error 26 / 11

2016-07-01 Thread Jim Borden
Hey all, As a follow up, the suggestion to change the write connection from multithreaded to serialized mode seems to have done the trick. We set up some automated testing and we now have approximately 300 runs in a row with no corruption (as a control, with the multithreaded mode the database

Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-01 Thread Clemens Ladisch
Rob Golsteijn wrote: > Due to a bug in our own code we inserted a string with embedded nul > character in the database. says: | The result of expressions involving strings with embedded NULs is | undefined. > I investigated how the builtin functions ha

Re: [sqlite] UNIQUE constraint violation

2016-07-01 Thread James K. Lowden
On Tue, 28 Jun 2016 19:19:43 -0700 J Decker wrote: > Duplication can also result as part of the - in process - moving of > rows. To change the order of [1,2,3,4] to > [1,3,2,4] there is(can be) a state that is [1,2,2,4] before the > second part that sets three back into 2. I'd just like to poin

Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-01 Thread Simon Slavin
On 1 Jul 2016, at 10:18am, Rob Golsteijn wrote: > For the tests below I assumed that the intention is that a string ends at the > first embedded nul character. I'm not sure that this is the intent. The idea that null is a terminating character is something that comes with C. But although th

[sqlite] builtin functions and strings with embedded nul characters

2016-07-01 Thread Rob Golsteijn
Hi List, Due to a bug in our own code we inserted a string with embedded nul character in the database. This caused strange behavior when we used the built-in function instr() on this data. As part of the analysis of this issue I investigated how the builtin functions handle strings with embedd