Skip to content

Commit

Permalink
When registering the built-in LIKE and GLOB functions, make sure that…
Browse files Browse the repository at this point in the history
… they

are tagged with SQLITE_UTF8 so that if other application-defined LIKE and
GLOB implementations are provided for UTF16, then the appropriate function
will be selected.
  • Loading branch information
Unknown committed Dec 15, 2010
1 parent dea322f commit ba878aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/func.c
Expand Up @@ -1450,9 +1450,9 @@ void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
}else{
pInfo = (struct compareInfo*)&likeInfoNorm;
}
sqlite3CreateFunc(db, "like", 2, SQLITE_ANY, pInfo, likeFunc, 0, 0, 0);
sqlite3CreateFunc(db, "like", 3, SQLITE_ANY, pInfo, likeFunc, 0, 0, 0);
sqlite3CreateFunc(db, "glob", 2, SQLITE_ANY,
sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
sqlite3CreateFunc(db, "glob", 2, SQLITE_UTF8,
(struct compareInfo*)&globInfo, likeFunc, 0, 0, 0);
setLikeOptFlag(db, "glob", SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE);
setLikeOptFlag(db, "like",
Expand Down

0 comments on commit ba878aa

Please sign in to comment.