Improved rebustness in sqlite3ExprListDup() when it contains a vector assignment
from an UPDATE where the initial term is omitted. This can happen during a UNION ALL query flattening while processing a virtual table update in which the first term of the vector is repeated. [forum:/forumpost/16ca0e9f32|Forum post 16ca0e9f32]. FossilOrigin-Name: 2547cfe38f8fb35109b3fc5bdfada387fe4b2b8a304156b704ab7f03f1f71198
This commit is contained in:
Binary file not shown.
@@ -1558,4 +1558,18 @@ ifcapable fts3 {
|
||||
}
|
||||
}
|
||||
|
||||
# 2021-07-04 https://sqlite.org/forum/forumpost/16ca0e9f32
|
||||
# Yu Liang crash involving UPDATE on a virtual table with
|
||||
# a duplicate column in a vector changeset and invoking the
|
||||
# query flattener for UNION ALL.
|
||||
#
|
||||
reset_db
|
||||
register_echo_module db
|
||||
do_catchsql_test 25.0 {
|
||||
CREATE TABLE t0(a);
|
||||
CREATE VIRTUAL TABLE t1 USING echo(t0);
|
||||
WITH t3(a) AS (SELECT * FROM t1 UNION ALL SELECT * FROM t1)
|
||||
UPDATE t1 SET (a,a) = (SELECT 1, 0) FROM t3;
|
||||
} {1 {target object/alias may not appear in FROM clause: t1}}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user