1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Change the RTREE engine so that equality comparisons of floating point

values are duplicated in the byte-code so that the comparisons are done
using 64-bit floats and consistent results are always obtained.
[forum:/forumpost/da61c4a1b5b4af19|Forum post da61c4a1b5b4af19].

FossilOrigin-Name: 4ec0f0a31b0df93ad15545fe1db117c933e28c75ad3cbc8475b56fecdb084905
This commit is contained in:
drh
2023-05-19 11:48:05 +00:00
parent 2c6c98dbf0
commit 1cb4e2e196
4 changed files with 23 additions and 10 deletions

View File

@ -756,4 +756,18 @@ do_execsql_test 20.4 {
SELECT * FROM t1 JOIN t0 ON true RIGHT JOIN rt0 ON x0>a WHERE x0 = 0;
} {- - 0 0.0 0.0}
# 2023-05-19 https://sqlite.org/forum/forumpost/da61c4a1b5b4af19
# Do not omit constraints that involve equality comparisons of
# floating-point values.
#
reset_db
do_execsql_test 21.0 {
CREATE VIRTUAL TABLE t1 USING rtree(id, x0, x1);
INSERT INTO t1 VALUES(0, 1, 9223372036854775807);
SELECT count(*) FROM t1 WHERE x1=9223372036854775807;
} {0}
do_execsql_test 21.1 {
SELECT x1=9223372036854775807 FROM t1;
} {0}
finish_test