mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Additional testing of the ATTACH command with bug fixes for the new problems
that the tests found. (CVS 998) FossilOrigin-Name: 3e8889d7ce5e99fc855526fc1bb62ddbe282bfc5
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
# This file implements tests for miscellanous features that were
|
||||
# left out of other test files.
|
||||
#
|
||||
# $Id: misc1.test,v 1.21 2003/02/26 13:52:52 drh Exp $
|
||||
# $Id: misc1.test,v 1.22 2003/06/03 01:47:12 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -518,6 +518,23 @@ do_test misc1-16.6 {
|
||||
}
|
||||
} {1 1 5 5 6 6}
|
||||
|
||||
|
||||
# Ticket #333: Temp triggers that modify persistent tables.
|
||||
#
|
||||
do_test misc1-17.1 {
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE TABLE RealTable(TestID INTEGER PRIMARY KEY, TestString TEXT);
|
||||
CREATE TEMP TABLE TempTable(TestID INTEGER PRIMARY KEY, TestString TEXT);
|
||||
CREATE TEMP TRIGGER trigTest_1 AFTER UPDATE ON TempTable BEGIN
|
||||
INSERT INTO RealTable(TestString)
|
||||
SELECT new.TestString FROM TempTable LIMIT 1;
|
||||
END;
|
||||
INSERT INTO TempTable(TestString) VALUES ('1');
|
||||
INSERT INTO TempTable(TestString) VALUES ('2');
|
||||
UPDATE TempTable SET TestString = TestString + 1 WHERE TestID IN (1, 2);
|
||||
COMMIT;
|
||||
SELECT TestString FROM RealTable ORDER BY 1;
|
||||
}
|
||||
} {2 3}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user