diff options
author | drh <drh@noemail.net> | 2019-05-08 17:27:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-05-08 17:27:18 +0000 |
commit | 08652b5ea00316539c913fc936e2966c8d58d283 (patch) | |
tree | 40cfa96c99f4f74ca319aff933574eebcdf95ce0 /src/func.c | |
parent | a7be6f355c3e474b7da48ea5a7e7fcff6d6bed47 (diff) | |
download | sqlite-08652b5ea00316539c913fc936e2966c8d58d283.tar.gz sqlite-08652b5ea00316539c913fc936e2966c8d58d283.zip |
Provide the SQLITE_OMIT_CASE_SENSITIVE_LIKE_PRAGMA compile-time option to
omit the case_sensitive_like pragma. This change, in combination with
documentation changes, is the current solution to ticket
[a340eef47b0cad5].
FossilOrigin-Name: eabe7f2d4ff0e0dd868dcab7ec1d4a9168a25f80d3a52f0eeea2f90bd33782f2
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/func.c b/src/func.c index dae85d60a..15f648ab5 100644 --- a/src/func.c +++ b/src/func.c @@ -1811,9 +1811,9 @@ static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){ } /* -** Register the built-in LIKE and GLOB functions. The caseSensitive +** Re-register the built-in LIKE functions. The caseSensitive ** parameter determines whether or not the LIKE operator is case -** sensitive. GLOB is always case sensitive. +** sensitive. */ void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){ struct compareInfo *pInfo; @@ -1824,9 +1824,6 @@ void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){ } sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0); sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0); - sqlite3CreateFunc(db, "glob", 2, SQLITE_UTF8, - (struct compareInfo*)&globInfo, likeFunc, 0, 0, 0, 0, 0); - setLikeOptFlag(db, "glob", SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE); setLikeOptFlag(db, "like", caseSensitive ? (SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE) : SQLITE_FUNC_LIKE); } |