/ Check-in [8694c3d5]
Login

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

Overview
Comment:Fix a faulty assert() in the validation logic for the LEFT JOIN strength reduction optimization. Problem found by OSSFuzz.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.25
Files: files | file ages | folders
SHA3-256: 8694c3d565f6f8209e24230765efa476e10048abb69a300b9df5cbaa45824ab8
User & Date: drh 2018-09-24 19:32:16
Context
2018-09-24
19:41
Allow a writable virtual table to have a schema with an INTEGER PRIMARY KEY and WITHOUT ROWID. This fixes ticket [f25d5ceebe1d710ff61a571e395356869d8272ef]. Test case in TH3. check-in: 3139af99 user: drh tags: branch-3.25
19:32
Fix a faulty assert() in the validation logic for the LEFT JOIN strength reduction optimization. Problem found by OSSFuzz. check-in: 8694c3d5 user: drh tags: branch-3.25
19:21
Fix the "sqlite3" command in the TCL interface so that it correctly returns an error if invoked with no arguments. check-in: 8a82fcf0 user: drh tags: branch-3.25
2018-09-23
02:01
Fix a faulty assert() in the validation logic for the LEFT JOIN strength reduction optimization. Problem found by OSSFuzz. check-in: 2fd62fcc user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

  4842   4842     }
  4843   4843     return 0;
  4844   4844   }
  4845   4845   
  4846   4846   /*
  4847   4847   ** This is the Expr node callback for sqlite3ExprImpliesNotNullRow().
  4848   4848   ** If the expression node requires that the table at pWalker->iCur
  4849         -** have a non-NULL column, then set pWalker->eCode to 1 and abort.
         4849  +** have one or more non-NULL column, then set pWalker->eCode to 1 and abort.
         4850  +**
         4851  +** This routine controls an optimization.  False positives (setting
         4852  +** pWalker->eCode to 1 when it should not be) are deadly, but false-negatives
         4853  +** (never setting pWalker->eCode) is a harmless missed optimization.
  4850   4854   */
  4851   4855   static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
  4852         -  /* This routine is only called for WHERE clause expressions and so it
  4853         -  ** cannot have any TK_AGG_COLUMN entries because those are only found
  4854         -  ** in HAVING clauses.  We can get a TK_AGG_FUNCTION in a WHERE clause,
  4855         -  ** but that is an illegal construct and the query will be rejected at
  4856         -  ** a later stage of processing, so the TK_AGG_FUNCTION case does not
  4857         -  ** need to be considered here. */
  4858         -  assert( pExpr->op!=TK_AGG_COLUMN );
         4856  +  testcase( pExpr->op==TK_AGG_COLUMN );
  4859   4857     testcase( pExpr->op==TK_AGG_FUNCTION );
  4860         -
  4861   4858     if( ExprHasProperty(pExpr, EP_FromJoin) ) return WRC_Prune;
  4862   4859     switch( pExpr->op ){
  4863   4860       case TK_ISNOT:
  4864   4861       case TK_NOT:
  4865   4862       case TK_ISNULL:
  4866   4863       case TK_IS:
  4867   4864       case TK_OR:

Changes to test/fuzzdata5.db.

cannot compute difference between binary files