On 1 Jul 2016, at 10:18am, Rob Golsteijn <rob.golste...@mapscape.eu> 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 the SQLite interface is written in C I don't think that SQLite is 
meant to handle its TEXT values as C strings. The most obvious aspect of this 
is that C strings can be broken at any point -- i.e. they're 
one-byte-per-character -- whereas SQLite strings are Unicode strings.

So although I agree that you've found inconsistent handling of stings I think 
the bug is that 0x00 is sometimes handled as if it's a terminating character.

> Below my test queries (sqlite version 3.11.1), executed on TEXT data and BLOB 
> data.

Nice set of tests.  Did you execute them in the SQLite command-line tool or 
your own program ?

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to