/ Check-in [e8177e01]
Login

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

Overview
Comment:Make sure the left-hand side of the IS NOT NULL operator is a simple column and not a general expression before applying the IS NOT NULL optimization. This is a backport of check-in [543f75a6abe3].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.7.2
Files: files | file ages | folders
SHA1: e8177e0149280ea775e9aac18307ce2528f72298
User & Date: drh 2011-04-08 23:04:28
Context
2011-04-08
23:05
Make sure the query planner is able to correctly analyze NULL value samples in the sqlite_stat2 table. This is a backport of changes from check-in [f73a167b434f] check-in: 1d637889 user: drh tags: branch-3.7.2
23:04
Make sure the left-hand side of the IS NOT NULL operator is a simple column and not a general expression before applying the IS NOT NULL optimization. This is a backport of check-in [543f75a6abe3]. check-in: e8177e01 user: drh tags: branch-3.7.2
2011-03-31
18:36
Provide hints to the btree layer Next and Previous primitives to let them know if they can be no-ops if the underlying index is unique. check-in: a5aae174 user: drh tags: branch-3.7.2
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  1339   1339     ** virtual term of that form.
  1340   1340     **
  1341   1341     ** Note that the virtual term must be tagged with TERM_VNULL.  This
  1342   1342     ** TERM_VNULL tag will suppress the not-null check at the beginning
  1343   1343     ** of the loop.  Without the TERM_VNULL flag, the not-null check at
  1344   1344     ** the start of the loop will prevent any results from being returned.
  1345   1345     */
  1346         -  if( pExpr->op==TK_NOTNULL && pExpr->pLeft->iColumn>=0 ){
         1346  +  if( pExpr->op==TK_NOTNULL
         1347  +   && pExpr->pLeft->op==TK_COLUMN
         1348  +   && pExpr->pLeft->iColumn>=0
         1349  +  ){
  1347   1350       Expr *pNewExpr;
  1348   1351       Expr *pLeft = pExpr->pLeft;
  1349   1352       int idxNew;
  1350   1353       WhereTerm *pNewTerm;
  1351   1354   
  1352   1355       pNewExpr = sqlite3PExpr(pParse, TK_GT,
  1353   1356                               sqlite3ExprDup(db, pLeft, 0),

tool/mkopts.tcl became a regular file.