Add a test to make sure a database can be attached to a single handle twice if not in shared-cache mode.

FossilOrigin-Name: 1c4984c62f393f41f9182ea82546c16d02efa46f
This commit is contained in:
dan 2009-11-20 10:18:06 +00:00
parent 98829a65cd
commit ac88760aac
3 changed files with 37 additions and 18 deletions

View File

@ -1,8 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C Avoid\sunnecessary\spage\scache\sallocations\swhen\smove\sa\spage\swhile\sautovacuuming\s\nan\sin-memory\sdatabase,\ssince\sthe\sallocation\smight\sfail\smaking\sit\simpossible\sto\nrollback\sthe\stransaction.
D 2009-11-20T13:18:14
C Add\sa\stest\sto\smake\ssure\sa\sdatabase\scan\sbe\sattached\sto\sa\ssingle\shandle\stwice\sif\snot\sin\sshared-cache\smode.
D 2009-11-20T10:18:06
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 7f6c6aa7feeeb5e26e01b344161d9aa1b5d64177
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -238,7 +235,7 @@ F test/async2.test bf5e2ca2c96763b4cba3d016249ad7259a5603b6
F test/async3.test 93edaa9122f498e56ea98c36c72abc407f4fb11e
F test/async4.test aafa6328c559d3e4bb587de770cbdecfca06f0da
F test/async5.test f3592d79c84d6e83a5f50d3fd500445f7d97dfdf
F test/attach.test 1d1be27b9e4c654f9bb14d011a4a87753c0b197a
F test/attach.test 7f07ec54a8b07fcc8fe32f5b2506306256f1f784
F test/attach2.test a295d2d7061adcee5884ef4a93c7c96a82765437
F test/attach3.test bd9830bc3a0d22ed1310c9bff6896927937017dc
F test/attachmalloc.test cf8cf17d183de357b1147a9baacbdfc85b940b61
@ -775,14 +772,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 1cf0e3cc14bad22867e740736c2886dc1c4a48dc
R 9f96df8d77aacbbe5a229c0e4825c7d0
U drh
Z a83b32939b8fe43907602c37e80ee0e1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFLBpcaoxKgR168RlERAjs+AJ9hMDoeCFoEOCx4N9Df2gvUGnw6XgCffKZD
ZrQJ/Xtolyd5+f1xqb7zDs0=
=mb8x
-----END PGP SIGNATURE-----
P 9a429349ccc2fa9acd28365a86578f602e87dafb
R 46119cb7f99f2b8740a6d715a49a25dc
U dan
Z 45d94d950c686cbe6192e3168ebbb70a

View File

@ -1 +1 @@
9a429349ccc2fa9acd28365a86578f602e87dafb
1c4984c62f393f41f9182ea82546c16d02efa46f

View File

@ -787,5 +787,34 @@ do_test attach-8.4 {
db2 close
file delete -force test2.db
# Test that it is possible to attach the same database more than
# once when not in shared-cache mode. That this is not possible in
# shared-cache mode is tested in shared7.test.
do_test attach-9.1 {
file delete -force test4.db
execsql {
ATTACH 'test4.db' AS aux1;
CREATE TABLE aux1.t1(a, b);
INSERT INTO aux1.t1 VALUES(1, 2);
ATTACH 'test4.db' AS aux2;
SELECT * FROM aux2.t1;
}
} {1 2}
do_test attach-9.2 {
file delete -force test4.db
catchsql {
BEGIN;
INSERT INTO aux1.t1 VALUES(3, 4);
INSERT INTO aux2.t1 VALUES(5, 6);
}
} {1 {database is locked}}
do_test attach-9.3 {
file delete -force test4.db
execsql {
COMMIT;
SELECT * FROM aux2.t1;
}
} {1 2 3 4}
finish_test