1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Fix a problem with renaming tables when the schema contains an invocation of a currently unregistered aggregate with a FILTER clause.

FossilOrigin-Name: bd37ce3fb8dee8d538f6afc0bfc13cdc3ebdd504e6461f0130c6ecc8af585f68
This commit is contained in:
dan
2019-07-22 11:38:43 +00:00
parent 7fc296aa66
commit 1e60261cfb
4 changed files with 25 additions and 10 deletions

View File

@@ -331,4 +331,19 @@ do_execsql_test 13.2 {
ALTER TABLE t1 RENAME TO t1x;
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 14.1 {
CREATE TABLE t1(a);
CREATE TABLE t2(b);
CREATE TRIGGER AFTER INSERT ON t1 BEGIN
SELECT sum() FILTER (WHERE (SELECT sum() FILTER (WHERE 0)) AND a);
END;
}
do_catchsql_test 14.2 {
ALTER TABLE t1 RENAME TO t1x;
} {1 {error in trigger AFTER: no such column: a}}
finish_test