#1 2013-12-15 14:22:15

richard6688
Member
Registered: 2011-04-05
Posts: 31

Bug in sql cache for sqlite SetCustomCollationForAllRawUTF8

when I use Binary for text column format of sqlite3. before create db, I do set
iModel.SetCustomCollationForAllRawUTF8('BINARY');

but it seems that sql cache is not aware of that. it's still use HashAnsiStringI for lookup.
so, first retrieve value 'In', which is not in DB, it return null, that's right;
second to retrieve value 'in', which is in DB, it still return null, that's wrong, because json cache in TSQLDataBase.LockJSON.
the cache is not casesensitive there.

Offline

#2 2013-12-15 14:35:10

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Bug in sql cache for sqlite SetCustomCollationForAllRawUTF8

Afair the cache uses a lookup for the SQL, not the value.

So imho collations are not involved here...

Offline

#3 2013-12-15 15:21:27

richard6688
Member
Registered: 2011-04-05
Posts: 31

Re: Bug in sql cache for sqlite SetCustomCollationForAllRawUTF8

I use tsqlrecord.create(aclient, 'key=?',['In'])function, which the value do bind to SQL.

Offline

#4 2013-12-15 22:29:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Bug in sql cache for sqlite SetCustomCollationForAllRawUTF8

You are right.

This was a real issue.

Now internal SQLite3 result cache is case-sensitive for its SQL key values.
See http://synopse.info/fossil/info/14084bc88d

Thanks for the feedback.

Offline

#5 2013-12-16 01:00:50

richard6688
Member
Registered: 2011-04-05
Posts: 31

Re: Bug in sql cache for sqlite SetCustomCollationForAllRawUTF8

Good done! That's right now.

Thank you very much!

Offline

Board footer

Powered by FluxBB