diff options
author | drh <drh@noemail.net> | 2005-08-14 01:20:37 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-08-14 01:20:37 +0000 |
commit | 55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7 (patch) | |
tree | 8f59d79014cb49e92d37a1ebe548537b6bdbadf1 /src/pragma.c | |
parent | 3d94662a062a5da6340568b5ad656c3057f053c5 (diff) | |
download | sqlite-55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7.tar.gz sqlite-55ef4d9758ed27c332f07ca56fc9ba61cadfe2e7.zip |
The case_sensitive_like pragma added.
Test cases added for the LIKE optimization. (CVS 2592)
FossilOrigin-Name: 72ee21c05e618b6f46f5460f8c85779c72fe32d7
Diffstat (limited to 'src/pragma.c')
-rw-r--r-- | src/pragma.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/pragma.c b/src/pragma.c index c12a4f827..bac21770d 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to implement the PRAGMA command. ** -** $Id: pragma.c,v 1.97 2005/08/13 00:56:27 drh Exp $ +** $Id: pragma.c,v 1.98 2005/08/14 01:20:39 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -603,14 +603,25 @@ void sqlite3Pragma( #ifndef NDEBUG if( sqlite3StrICmp(zLeft, "parser_trace")==0 ){ extern void sqlite3ParserTrace(FILE*, char *); - if( getBoolean(zRight) ){ - sqlite3ParserTrace(stderr, "parser: "); - }else{ - sqlite3ParserTrace(0, 0); + if( zRight ){ + if( getBoolean(zRight) ){ + sqlite3ParserTrace(stderr, "parser: "); + }else{ + sqlite3ParserTrace(0, 0); + } } }else #endif + /* Reinstall the LIKE and GLOB functions. The variant of LIKE + ** used will be case sensitive or not depending on the RHS. + */ + if( sqlite3StrICmp(zLeft, "case_sensitive_like")==0 ){ + if( zRight ){ + sqlite3RegisterLikeFunctions(db, getBoolean(zRight)); + } + }else + #ifndef SQLITE_OMIT_INTEGRITY_CHECK if( sqlite3StrICmp(zLeft, "integrity_check")==0 ){ int i, j, addr; |