1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

In expression nodes of type REGISTER with sub-type COLUMN, ensure that the

iColumn field is set correctly, as otherwise the "IS NULL" operator might
be incorrectly optimized.  Fix for the problem described by 
[forum:/forumpost/d010a26798915b53|forum post d010a26798915b53].

FossilOrigin-Name: 0819a1869a39d54a405259ea323365506a182962a02affdef16a03446005da64
This commit is contained in:
drh
2023-01-13 19:29:46 +00:00
parent bd8e3d7d0a
commit 475e76d43e
4 changed files with 17 additions and 8 deletions

View File

@ -399,5 +399,13 @@ foreach {tn temp} {
}
}
# 2022-01-13 https://sqlite.org/forum/forumpost/d010a26798
#
reset_db
do_execsql_test 17.0 {
CREATE TABLE bug(id INTEGER PRIMARY KEY NOT NULL, x);
INSERT INTO bug(id,x) VALUES(20, NULL);
UPDATE bug SET x=NULL WHERE id = 20 RETURNING quote(x), x IS NULL;
} {NULL 1}
finish_test