SQLite Forum

3.37 like now case sensitive.
Login

3.37 like now case sensitive.

(1) By anonymous on 2021-12-14 21:14:16 [link] [source]

We upgraded to 3.37 and our likes are now case sensitive. I don't see where we have enabled case_sensitive_like. We are doing a like for example of:

select * from application where name like ‘sa%’;

Is there something else that is turning case sensitive on? We don't have any PRAGMA defined either, but either I am missing something or it changed.

Thanks, Pat

(2) By Richard Hipp (drh) on 2021-12-14 21:28:35 in reply to 1 [source]

Seems to work ok for me:

CREATE TABLE application(id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO application(id,name)
 VALUES(1,'SABC'),(2,'sabc'),(3,'Sabc'),(4,'xyzzy');
SELECT * FROM application WHERE name LIKE 'sa%';

Perhaps you could provide a specific test case that is not working for you. Perhaps also additional information such as:

  • What programming language you are using.
  • Where you got your SQLite 3.37? Did you build it yourself?
  • What else in your application has changed other than the SQLite upgrade?

(3) By anonymous on 2021-12-14 21:43:50 in reply to 2 [link] [source]

Thanks,

This is C code running on Z/OS that we compile ourselves. We use this in a couple of places and we just upgraded because our other version was too old and needed upgrading.

In the old code the same select works fine. Now maybe the build parameters are slightly different. I think we changed a compile option.

CFLAGS -= -qlang=stdc89:libext:longlong

to

CFLAGS += -qlang=extended:longlong

Is there any where I should look for how this can be enabled/disabled. I tried in the program to turn it off with a PRAGMA, but it did not work.

PRAGMA case_sensitive_like = false;

Thanks, Pat

(4) By anonymous on 2021-12-17 14:10:04 in reply to 2 [link] [source]

I found the problem.

The code handling the likes is only case insensitive if the character set is ASCII. Since we were using EBCDIC, it did not work.

I have fixed it for us now.

Thanks, Pat