/ Check-in [7319d676]
Login

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

Overview
Comment:List of MATCH operator names in isMatchOfColumn() should be constant.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7319d676aaf95ba7391379f4cdf193b6aa898893
User & Date: drh 2016-08-10 19:43:29
Context
2016-08-10
20:02
Optimization to sqlite3WhereExprUsage(). check-in: 95493058 user: drh tags: trunk
19:43
List of MATCH operator names in isMatchOfColumn() should be constant. check-in: 7319d676 user: drh tags: trunk
18:56
Performance enhancement in the expression walker. check-in: ebccbd96 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/whereexpr.c.

   286    286   **
   287    287   ** If it is then return TRUE.  If not, return FALSE.
   288    288   */
   289    289   static int isMatchOfColumn(
   290    290     Expr *pExpr,                    /* Test this expression */
   291    291     unsigned char *peOp2            /* OUT: 0 for MATCH, or else an op2 value */
   292    292   ){
   293         -  struct Op2 {
          293  +  static const struct Op2 {
   294    294       const char *zOp;
   295    295       unsigned char eOp2;
   296    296     } aOp[] = {
   297    297       { "match",  SQLITE_INDEX_CONSTRAINT_MATCH },
   298    298       { "glob",   SQLITE_INDEX_CONSTRAINT_GLOB },
   299    299       { "like",   SQLITE_INDEX_CONSTRAINT_LIKE },
   300    300       { "regexp", SQLITE_INDEX_CONSTRAINT_REGEXP }