Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | More test cases for indexes on large numeric values. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | int-float-precision |
Files: | files | file ages | folders |
SHA1: |
c220741a62808c64d42c6161152ab06a |
User & Date: | drh 2015-11-06 04:14:38.328 |
Context
2015-11-06
| ||
14:59 | A different approach to handling integer/float comparisons. This seems to work better on systems where "long double" and "double" are the same type, but still needs refinement and testing. (check-in: a3f7614b20 user: drh tags: int-float-precision) | |
04:14 | More test cases for indexes on large numeric values. (check-in: c220741a62 user: drh tags: int-float-precision) | |
03:37 | Some simple test cases from the mailing list. (check-in: 1d642b73f9 user: drh tags: int-float-precision) | |
Changes
Changes to test/numindex1.test.
︙ | ︙ | |||
36 37 38 39 40 41 42 43 | do_execsql_test numindex1-1.3 { SELECT x.a || CASE WHEN x.b==y.b THEN '==' ELSE '<>' END || y.a FROM t2 AS x, t2 AS y ORDER BY +x.a, +x.b; } {b==b b==c b<>d c==b c==c c<>d d<>b d<>c d==d} finish_test | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | do_execsql_test numindex1-1.3 { SELECT x.a || CASE WHEN x.b==y.b THEN '==' ELSE '<>' END || y.a FROM t2 AS x, t2 AS y ORDER BY +x.a, +x.b; } {b==b b==c b<>d c==b c==c c<>d d<>b d<>c d==d} # New test cases # do_execsql_test numindex1-2.1 { DROP TABLE IF EXISTS t1; CREATE TABLE t1(a INTEGER PRIMARY KEY,b); CREATE INDEX t1b ON t1(b); WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<100) INSERT INTO t1(a,b) SELECT x, 10000000000000004.0 FROM c WHERE x NOT IN (23,37); INSERT INTO t1(a,b) VALUES(23,10000000000000005); INSERT INTO t1(a,b) VALUES(37,10000000000000003); DELETE FROM t1 WHERE a NOT IN (23,37); PRAGMA integrity_check; } {ok} do_execsql_test numindex1-3.1 { DROP TABLE IF EXISTS t1; CREATE TABLE t1(a INTEGER PRIMARY KEY,b); CREATE INDEX t1b ON t1(b); WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<20) INSERT INTO t1(a,b) SELECT x, 100000000000000005.0 FROM c WHERE x NOT IN (3,5,7,11,13,17,19); INSERT INTO t1(a,b) VALUES(3,100000000000000005); INSERT INTO t1(a,b) VALUES(5,100000000000000000); INSERT INTO t1(a,b) VALUES(7,100000000000000008); INSERT INTO t1(a,b) VALUES(11,100000000000000006); INSERT INTO t1(a,b) VALUES(13,100000000000000001); INSERT INTO t1(a,b) VALUES(17,100000000000000004); INSERT INTO t1(a,b) VALUES(19,100000000000000003); PRAGMA integrity_check; } {ok} do_execsql_test numindex1-3.2 { SELECT a FROM t1 ORDER BY b; } {1 2 4 5 6 8 9 10 12 14 15 16 18 20 13 19 17 3 11 7} finish_test |