mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
When building an ephemeral table of integers, do not assume that the table
does not already contain N if the insert cursor points to N-1. Fix for ticket [61fe9745]. FossilOrigin-Name: 1c1b0862236f564283be08338790d6494e705f1198547a59499e3f8c07f2cd99
This commit is contained in:
@ -237,4 +237,16 @@ do_execsql_test 8.4 {
|
||||
SELECT count(*) FROM n1 WHERE a IN (SELECT +a FROM n1)
|
||||
} 3
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test that ticket 61fe97454c is fixed.
|
||||
#
|
||||
do_execsql_test 9.0 {
|
||||
CREATE TABLE t9(a INTEGER PRIMARY KEY);
|
||||
INSERT INTO t9 VALUES (44), (45);
|
||||
}
|
||||
do_execsql_test 9.1 {
|
||||
SELECT * FROM t9 WHERE a IN (44, 45, 44, 45)
|
||||
} {44 45}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user