mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
When the affinity of a table column is INT or REAL, make the affinity of
corresponding index columns NUMERIC. This increases the precision of index lookups for large numbers so that it matches the precision of ordinary comparison operators. Ticket [40812aea1fde9594] FossilOrigin-Name: e0d909c740b774d8a46731696e33342be83206cc4a95d07f42fdb3d8cc2d7a8e
This commit is contained in:
@ -116,5 +116,16 @@ do_execsql_test 507 {
|
||||
SELECT * FROM t0 WHERE +-+'ce' >= t0.c0;
|
||||
} {-1 {}}
|
||||
|
||||
# 2019-08-30 ticket https://www.sqlite.org/src/info/40812aea1fde9594
|
||||
#
|
||||
do_execsql_test 600 {
|
||||
DROP TABLE IF EXISTS t0;
|
||||
CREATE TABLE t0(c0 REAL UNIQUE);
|
||||
INSERT INTO t0(c0) VALUES (3175546974276630385);
|
||||
SELECT 3175546974276630385 < c0 FROM t0;
|
||||
} {1}
|
||||
do_execsql_test 601 {
|
||||
SELECT 1 FROM t0 WHERE 3175546974276630385 < c0;
|
||||
} {1}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user