/ Check-in [e4b4737e]
Login

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

Overview
Comment:Fix an assert() statement that was made obsolete by the constant propagation enhancement. Problem discovered by OSSFuzz.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e4b4737e348235e196a45e1b71876b82e0cc836e1c5c16ea5f9333b7509b59b8
User & Date: drh 2018-07-28 14:56:56
Context
2018-07-28
16:24
Do not allow a column reference that is converted into a constant by the WHERE-clause constant propagation optimization to be moved to the init-time constant expression list, as the table reference will not work there. This fixes a problem found by OSSFuzz. check-in: d30b2a94 user: drh tags: trunk
14:56
Fix an assert() statement that was made obsolete by the constant propagation enhancement. Problem discovered by OSSFuzz. check-in: e4b4737e user: drh tags: trunk
14:34
Improved debugging output when the ".selecttrace" option is used in the shell. check-in: fcb88dd6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  3446   3446       if( pExpr->iColumn<0 ){
  3447   3447         pExpr->op = TK_NULL;
  3448   3448       }else{
  3449   3449         Expr *pNew;
  3450   3450         Expr *pCopy = pSubst->pEList->a[pExpr->iColumn].pExpr;
  3451   3451         Expr ifNullRow;
  3452   3452         assert( pSubst->pEList!=0 && pExpr->iColumn<pSubst->pEList->nExpr );
  3453         -      assert( pExpr->pLeft==0 && pExpr->pRight==0 );
         3453  +      assert( pExpr->pRight==0 );
  3454   3454         if( sqlite3ExprIsVector(pCopy) ){
  3455   3455           sqlite3VectorErrorMsg(pSubst->pParse, pCopy);
  3456   3456         }else{
  3457   3457           sqlite3 *db = pSubst->pParse->db;
  3458   3458           if( pSubst->isLeftJoin && pCopy->op!=TK_COLUMN ){
  3459   3459             memset(&ifNullRow, 0, sizeof(ifNullRow));
  3460   3460             ifNullRow.op = TK_IF_NULL_ROW;

Changes to test/fuzzdata5.db.

cannot compute difference between binary files