/ Check-in [0ceab26f]
Login

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

Overview
Comment:Minor fix for test file indexexpr1.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0ceab26f15c4c7039647cbccf8939dd5c36a60b70ffeefcd3b415c8d4d8351cd
User & Date: dan 2019-09-26 19:53:26
Context
2019-09-26
20:05
Allow DROP TABLE to work on tables name "sqlite_parameters" just as it does with tables named "sqlite_stat%". Fix for the ".parameter clear" command in the shell. check-in: e768179b user: drh tags: trunk
19:53
Minor fix for test file indexexpr1.test. check-in: 0ceab26f user: dan tags: trunk
16:57
New dbsqlfuzz cases added to test/fuzzdata8.db. check-in: 49073b70 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/indexexpr1.test.

459
460
461
462
463
464
465

466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483

484

# 2019-09-02 https://www.sqlite.org/src/tktview/57af00b6642ecd6848
# When the expression of an an index-on-expression references a
# table column of type REAL that is actually holding an MEM_IntReal
# value, be sure to use the REAL value and not the INT value when
# computing the expression.
#

do_execsql_test indexexpr-1800 {
  DROP TABLE IF EXISTS t0;
  CREATE TABLE t0(c0 REAL, c1 TEXT);
  CREATE INDEX i0 ON t0(+c0, c0);
  INSERT INTO t0(c0) VALUES(0);
  SELECT CAST(+ t0.c0 AS BLOB) LIKE 0 FROM t0; 
} {0}
do_execsql_test indexexpr-1810 {
  SELECT CAST(+ t0.c0 AS BLOB) LIKE '0.0' FROM t0; 
} {1}
do_execsql_test indexexpr-1820 {
  DROP TABLE IF EXISTS t1;
  CREATE TABLE t1(x REAL);
  CREATE INDEX t1x ON t1(x, +x);
  INSERT INTO t1(x) VALUES(2);
  SELECT +x FROM t1 WHERE x=2;
} {2.0}


finish_test







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>

459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486

# 2019-09-02 https://www.sqlite.org/src/tktview/57af00b6642ecd6848
# When the expression of an an index-on-expression references a
# table column of type REAL that is actually holding an MEM_IntReal
# value, be sure to use the REAL value and not the INT value when
# computing the expression.
#
ifcapable like_match_blobs {
  do_execsql_test indexexpr-1800 {
    DROP TABLE IF EXISTS t0;
    CREATE TABLE t0(c0 REAL, c1 TEXT);
    CREATE INDEX i0 ON t0(+c0, c0);
    INSERT INTO t0(c0) VALUES(0);
    SELECT CAST(+ t0.c0 AS BLOB) LIKE 0 FROM t0; 
  } {0}
  do_execsql_test indexexpr-1810 {
    SELECT CAST(+ t0.c0 AS BLOB) LIKE '0.0' FROM t0; 
  } {1}
  do_execsql_test indexexpr-1820 {
    DROP TABLE IF EXISTS t1;
    CREATE TABLE t1(x REAL);
    CREATE INDEX t1x ON t1(x, +x);
    INSERT INTO t1(x) VALUES(2);
    SELECT +x FROM t1 WHERE x=2;
  } {2.0}
}

finish_test