/ Check-in [c355a837]
Login

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

Overview
Comment:Merge latest trunk changes with this branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | alter-table-rename-column
Files: files | file ages | folders
SHA3-256: c355a8370782aa70f155ee956fa0faec7f45d7c483c442b169b63c5f0a988fd3
User & Date: dan 2018-08-10 15:27:55
Context
2018-08-10
19:19
When a column is renamed, update any references to it in REFERENCES clauses that belong to other tables. check-in: 191079bd user: dan tags: alter-table-rename-column
15:27
Merge latest trunk changes with this branch. check-in: c355a837 user: dan tags: alter-table-rename-column
14:23
Fix a problem with renaming columns on tables with REFERENCES clauses that specify a large number of columns. check-in: d48f7bbd user: dan tags: alter-table-rename-column
2018-08-09
21:45
Fix the isLikeOrGlob() routine in the WHERE clause processing logic so that it avoids signed/unsigned character comparisons, as that can lead to an incorrect answer if the ESCAPE clause is an invalid UTF8 string. Problem found by OSSFuzz. check-in: 4195a3f8 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/whereexpr.c.

   190    190   static int isLikeOrGlob(
   191    191     Parse *pParse,    /* Parsing and code generating context */
   192    192     Expr *pExpr,      /* Test this expression */
   193    193     Expr **ppPrefix,  /* Pointer to TK_STRING expression with pattern prefix */
   194    194     int *pisComplete, /* True if the only wildcard is % in the last character */
   195    195     int *pnoCase      /* True if uppercase is equivalent to lowercase */
   196    196   ){
   197         -  const u8 *z = 0;         /* String on RHS of LIKE operator */
          197  +  const u8 *z = 0;           /* String on RHS of LIKE operator */
   198    198     Expr *pRight, *pLeft;      /* Right and left size of LIKE operator */
   199    199     ExprList *pList;           /* List of operands to the LIKE operator */
   200         -  int c;                     /* One character in z[] */
          200  +  u8 c;                      /* One character in z[] */
   201    201     int cnt;                   /* Number of non-wildcard prefix characters */
   202         -  char wc[4];                /* Wildcard characters */
          202  +  u8 wc[4];                  /* Wildcard characters */
   203    203     sqlite3 *db = pParse->db;  /* Database connection */
   204    204     sqlite3_value *pVal = 0;
   205    205     int op;                    /* Opcode of pRight */
   206    206     int rc;                    /* Result code to return */
   207    207   
   208         -  if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){
          208  +  if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, (char*)wc) ){
   209    209       return 0;
   210    210     }
   211    211   #ifdef SQLITE_EBCDIC
   212    212     if( *pnoCase ) return 0;
   213    213   #endif
   214    214     pList = pExpr->x.pList;
   215    215     pLeft = pList->a[1].pExpr;

Changes to test/fuzzdata5.db.

cannot compute difference between binary files