Add a test case to shared.test. No changes to production code.

FossilOrigin-Name: bfb0dd3c2f7e1ffbdf236be4adc3e0d804ed5854
This commit is contained in:
dan 2010-07-23 15:55:31 +00:00
parent 1feeaed291
commit 2949e4e8a0
3 changed files with 45 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Remove\sthe\sTable.dbMem\svariable,\sas\sit\sis\sno\slonger\sbeing\sused\sfor\sits\soriginal\spurpose. C Add\sa\stest\scase\sto\sshared.test.\sNo\schanges\sto\sproduction\scode.
D 2010-07-23T15:41:47 D 2010-07-23T15:55:32
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -585,7 +585,7 @@ F test/selectA.test 06d1032fa9009314c95394f2ca2e60d9f7ae8532
F test/selectB.test f305cc6660804cb239aab4e2f26b0e288b59958b F test/selectB.test f305cc6660804cb239aab4e2f26b0e288b59958b
F test/selectC.test 33bb5673a8141df193c6fd56e6de7fea38b8d2ee F test/selectC.test 33bb5673a8141df193c6fd56e6de7fea38b8d2ee
F test/server1.test f5b790d4c0498179151ca8a7715a65a7802c859c F test/server1.test f5b790d4c0498179151ca8a7715a65a7802c859c
F test/shared.test 3b448dc0f7a9356e641894ed81c27599f39d809d F test/shared.test b9114eaea7e748a3a4c8ff7b9ca806c8f95cef3e
F test/shared2.test d6ba4ca1827ea36a1ac23a99e3c36eeac9165450 F test/shared2.test d6ba4ca1827ea36a1ac23a99e3c36eeac9165450
F test/shared3.test d69bdd5f156580876c5345652d21dc2092e85962 F test/shared3.test d69bdd5f156580876c5345652d21dc2092e85962
F test/shared4.test d0fadacb50bb6981b2fb9dc6d1da30fa1edddf83 F test/shared4.test d0fadacb50bb6981b2fb9dc6d1da30fa1edddf83
@ -838,7 +838,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 430be657be68687c998f2f5f8dcd112bf26106be P 6eddc6e601cf8f585c6c2cf79f36fcbfe98a307e
R b12985159a737efd8ea9a2927ba836e0 R 78a69c10590c609851ce8c464e2ad62c
U dan U dan
Z 048b116055cce95a3e484c5c3be793ac Z 6d496f6480db51a71cd50a034edef5d6

View File

@ -1 +1 @@
6eddc6e601cf8f585c6c2cf79f36fcbfe98a307e bfb0dd3c2f7e1ffbdf236be4adc3e0d804ed5854

View File

@ -1018,6 +1018,44 @@ do_test shared-$av.14.3 {
db close db close
} {} } {}
# Populate a database schema using connection [db]. Then drop it using
# [db2]. This is to try to find any points where shared-schema elements
# are allocated using the lookaside buffer of [db].
#
# Mutexes are enabled for this test as that activates a couple of useful
# assert() statements in the C code.
#
do_test shared-$av-15.1 {
file delete -force test.db
sqlite3 db test.db -fullmutex 1
sqlite3 db2 test.db -fullmutex 1
execsql {
CREATE TABLE t1(a, b, c);
CREATE INDEX i1 ON t1(a, b);
CREATE VIEW v1 AS SELECT * FROM t1;
CREATE VIEW v2 AS SELECT * FROM t1, v1
WHERE t1.c=v1.c GROUP BY t1.a ORDER BY v1.b;
CREATE TRIGGER tr1 AFTER INSERT ON t1
WHEN new.a!=1
BEGIN
DELETE FROM t1 WHERE a=5;
INSERT INTO t1 VALUES(1, 2, 3);
UPDATE t1 SET c=c+1;
END;
INSERT INTO t1 VALUES(5, 6, 7);
INSERT INTO t1 VALUES(8, 9, 10);
INSERT INTO t1 VALUES(11, 12, 13);
ANALYZE;
SELECT * FROM t1;
}
} {1 2 6 8 9 12 1 2 5 11 12 14 1 2 4}
do_test shared-$av-15.2 {
execsql { DROP TABLE t1 } db2
} {}
db close
db2 close
} }
sqlite3_enable_shared_cache $::enable_shared_cache sqlite3_enable_shared_cache $::enable_shared_cache