/ Check-in [c26f236d]
Login

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

Overview
Comment:More tests pursuant to ticket [36fae083b450e3af857a459e20].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:c26f236da61aef7c7a8fe38f1c7f33eea894c8fae38de6a085d4cce933a70502
User & Date: mistachkin 2018-02-26 17:03:03
Context
2018-02-27
15:40
Add support for TRUE and FALSE keywords and for operators IS TRUE, IS FALSE, IS NOT TRUE, and IS NOT FALSE. If there is are columns named TRUE or FALSE, then the keywords resolve to the column names, for compatibility. The behavior of the "DEFAULT true" phrase is changed to mean what it says, rather than being an alias for "DEFAULT 'true'". check-in: 9a7f02c5 user: drh tags: trunk
2018-02-26
17:03
More tests pursuant to ticket [36fae083b450e3af857a459e20]. check-in: c26f236d user: mistachkin tags: trunk
16:49
Fix heap issue in the shell on Win32 caused by allocator mismatch. check-in: 7b3a7551 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/expr.test.

   996    996   } {0}
   997    997   do_execsql_test expr-14.4 {
   998    998     SELECT sum(CASE WHEN x THEN 0 ELSE 1 END) FROM t1
   999    999      WHERE x
  1000   1000   } {0}
  1001   1001   
  1002   1002   
         1003  +foreach {tn val} [list 1 NaN 2 -NaN 3 NaN0 4 -NaN0 5 Inf 6 -Inf] {
         1004  +  do_execsql_test expr-15.$tn.1 {
         1005  +    DROP TABLE IF EXISTS t1;
         1006  +    CREATE TABLE t1(x);
         1007  +    INSERT INTO t1 VALUES(0),(1),(NULL),(0.5),('1x'),('0x');
         1008  +  }
         1009  +
         1010  +  do_test expr-15.$tn.2 {
         1011  +    set ::STMT [sqlite3_prepare db "INSERT INTO t1 VALUES(?)" -1 TAIL]
         1012  +    sqlite3_bind_double $::STMT 1 $val
         1013  +    sqlite3_step $::STMT
         1014  +    sqlite3_reset $::STMT
         1015  +    sqlite3_finalize $::STMT
         1016  +  } {SQLITE_OK}
         1017  +
         1018  +  do_execsql_test expr-15.$tn.3 {
         1019  +    SELECT count(*) FROM t1
         1020  +     WHERE (x OR (8==9)) != (CASE WHEN x THEN 1 ELSE 0 END);
         1021  +  } {0}
         1022  +
         1023  +  do_execsql_test expr-15.$tn.4 {
         1024  +    SELECT count(*) FROM t1
         1025  +     WHERE (x OR (8==9)) != (NOT NOT x);
         1026  +  } {0}
         1027  +
         1028  +  do_execsql_test expr-15.$tn.5 {
         1029  +    SELECT sum(NOT x) FROM t1
         1030  +     WHERE x
         1031  +  } {0}
         1032  +
         1033  +  do_execsql_test expr-15.$tn.6 {
         1034  +    SELECT sum(CASE WHEN x THEN 0 ELSE 1 END) FROM t1
         1035  +     WHERE x
         1036  +  } {0}
         1037  +}
  1003   1038   
  1004   1039   finish_test