/ Check-in [d840e9bb]
Login

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

Overview
Comment:The IS NOT NULL operator does not imply that the operand is never NULL. Fix for ticket [5948e09b8c415bc45da5cf]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:d840e9bb023a1e84a7739d764a0f6cf608fc3183ff8c366fcdb486ebd932f0c1
User & Date: drh 2019-02-05 14:36:33
Context
2019-02-05
16:53
Update the tester.tcl --malloctrace option so that it uses eu-addr2line instead of addr2line. check-in: 79c07387 user: dan tags: trunk
14:36
The IS NOT NULL operator does not imply that the operand is never NULL. Fix for ticket [5948e09b8c415bc45da5cf] check-in: d840e9bb user: drh tags: trunk
12:16
Keep the temp_store_directory and data_store_directory pragmas even when compiling with SQLITE_OMIT_DEPRECATED. check-in: 93386a7c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

  4982   4982     testcase( pExpr->op==TK_AGG_COLUMN );
  4983   4983     testcase( pExpr->op==TK_AGG_FUNCTION );
  4984   4984     if( ExprHasProperty(pExpr, EP_FromJoin) ) return WRC_Prune;
  4985   4985     switch( pExpr->op ){
  4986   4986       case TK_ISNOT:
  4987   4987       case TK_NOT:
  4988   4988       case TK_ISNULL:
         4989  +    case TK_NOTNULL:
  4989   4990       case TK_IS:
  4990   4991       case TK_OR:
  4991   4992       case TK_CASE:
  4992   4993       case TK_IN:
  4993   4994       case TK_FUNCTION:
  4994   4995         testcase( pExpr->op==TK_ISNOT );
  4995   4996         testcase( pExpr->op==TK_NOT );
  4996   4997         testcase( pExpr->op==TK_ISNULL );
         4998  +      testcase( pExpr->op==TK_NOTNULL );
  4997   4999         testcase( pExpr->op==TK_IS );
  4998   5000         testcase( pExpr->op==TK_OR );
  4999   5001         testcase( pExpr->op==TK_CASE );
  5000   5002         testcase( pExpr->op==TK_IN );
  5001   5003         testcase( pExpr->op==TK_FUNCTION );
  5002   5004         return WRC_Prune;
  5003   5005       case TK_COLUMN:

Changes to test/join.test.

   845    845             ON x3 IS TRUE AND b4=a3
   846    846           JOIN (SELECT x AS x4 FROM t2)
   847    847             ON x4<=CASE WHEN x3 THEN CASE WHEN a4 THEN 1 ELSE -1 END ELSE 0 END
   848    848           LEFT JOIN (SELECT a AS a5, b AS b5 FROM t1)
   849    849             ON x4 IS TRUE AND b5=a4
   850    850      ORDER BY a1, a2, a3, a4, a5;
   851    851   } {1 {} {} {} {} 1 11 {} {} {} 1 12 {} {} {} 1 12 121 {} {} 1 13 {} {} {}}
          852  +
          853  +# 2019-02-05 Ticket https://www.sqlite.org/src/tktview/5948e09b8c415bc45da5c
          854  +# Error in join due to the LEFT JOIN strength reduction optimization.
          855  +#
          856  +do_execsql_test join-16.100 {
          857  +  DROP TABLE IF EXISTS t1;
          858  +  DROP TABLE IF EXISTS t2;
          859  +  CREATE TABLE t1(a INT);
          860  +  INSERT INTO t1(a) VALUES(1);
          861  +  CREATE TABLE t2(b INT);
          862  +  SELECT a, b
          863  +    FROM t1 LEFT JOIN t2 ON 0
          864  +   WHERE (b IS NOT NULL)=0;
          865  +} {1 {}}
   852    866   
   853    867   finish_test