mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Avoid assuming that "column IS ?", where column is declared UNIQUE, matches only a single row (as "?" might be NULL). Fix for [b8689402].
FossilOrigin-Name: d02490a2f0cae047087130b4ad8f55f265845c2ffb3bde3b7d507edb54acea6d
This commit is contained in:
@ -274,6 +274,32 @@ do_execsql_test 2040 {
|
||||
two 1 1
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 3000 {
|
||||
CREATE TABLE t0 (c0, c1 NOT NULL DEFAULT 1, c2, PRIMARY KEY (c0, c1));
|
||||
INSERT INTO t0(c2) VALUES (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL), (NULL);
|
||||
INSERT INTO t0(c2) VALUES('a');
|
||||
}
|
||||
|
||||
do_execsql_test 3010 {
|
||||
SELECT DISTINCT * FROM t0 WHERE NULL IS t0.c0;
|
||||
} {
|
||||
{} 1 {}
|
||||
{} 1 a
|
||||
}
|
||||
|
||||
do_execsql_test 3020 {
|
||||
ANALYZE;
|
||||
}
|
||||
|
||||
do_execsql_test 3030 {
|
||||
SELECT DISTINCT * FROM t0 WHERE NULL IS c0;
|
||||
} {
|
||||
{} 1 {}
|
||||
{} 1 a
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
|
Reference in New Issue
Block a user