Fix a problem with renaming a non-temp table that has at least one temp

trigger and shares its name with a temp table.

FossilOrigin-Name: ceb60bd7e5f2a0a4247bff476fc6468227305467339ae0c24591be9d2b14bdde
This commit is contained in:
dan
2018-09-07 15:50:31 +00:00
parent 202a0274db
commit d5e6fef2a1
5 changed files with 45 additions and 18 deletions
+20
View File
@@ -371,5 +371,25 @@ do_execsql_test 11.6 {
}
do_test 11.7 { set ::trigger } {{4 5 6} {7 8 9}}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 12.0 {
CREATE TABLE t1(a);
CREATE TABLE t2(w);
CREATE TRIGGER temp.r1 AFTER INSERT ON main.t2 BEGIN
INSERT INTO t1(a) VALUES(new.w);
END;
CREATE TEMP TABLE t2(x);
}
do_execsql_test 12.1 {
ALTER TABLE main.t2 RENAME TO t3;
}
do_execsql_test 12.2 {
INSERT INTO t3 VALUES('WWW');
SELECT * FROM t1;
} {WWW}
finish_test
+6
View File
@@ -289,6 +289,12 @@ test_suite "window" -prefix "" -description {
test_set [glob -nocomplain $::testdir/window*.test]
]
test_suite "alter" -prefix "" -description {
All ALTER function related tests .
} -files [
test_set [glob -nocomplain $::testdir/alter*.test]
]
test_suite "lsm1" -prefix "" -description {
All LSM1 tests.
} -files [glob -nocomplain $::testdir/../ext/lsm1/test/*.test]