/ Check-in [e1660764]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When registering the built-in LIKE and GLOB functions, make sure that 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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e1660764f20fed3fe92156d2b7f06075ff6ac145
User & Date: drh 2010-12-15 18:54:37
Context
2010-12-15
21:02
Enhanced comments in wal.c and declare some procedure parameters "const". No changes to the generated code. check-in: d0e4375b user: drh tags: trunk
18:54
When registering the built-in LIKE and GLOB functions, make sure that 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. check-in: e1660764 user: drh tags: trunk
2010-12-10
17:06
Fix a performance regression in matchinfo(). check-in: fa37d8eb user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/func.c.

  1446   1446   void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
  1447   1447     struct compareInfo *pInfo;
  1448   1448     if( caseSensitive ){
  1449   1449       pInfo = (struct compareInfo*)&likeInfoAlt;
  1450   1450     }else{
  1451   1451       pInfo = (struct compareInfo*)&likeInfoNorm;
  1452   1452     }
  1453         -  sqlite3CreateFunc(db, "like", 2, SQLITE_ANY, pInfo, likeFunc, 0, 0, 0);
  1454         -  sqlite3CreateFunc(db, "like", 3, SQLITE_ANY, pInfo, likeFunc, 0, 0, 0);
  1455         -  sqlite3CreateFunc(db, "glob", 2, SQLITE_ANY, 
         1453  +  sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
         1454  +  sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
         1455  +  sqlite3CreateFunc(db, "glob", 2, SQLITE_UTF8, 
  1456   1456         (struct compareInfo*)&globInfo, likeFunc, 0, 0, 0);
  1457   1457     setLikeOptFlag(db, "glob", SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE);
  1458   1458     setLikeOptFlag(db, "like", 
  1459   1459         caseSensitive ? (SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE) : SQLITE_FUNC_LIKE);
  1460   1460   }
  1461   1461   
  1462   1462   /*