/ Check-in [1c4984c6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a test to make sure a database can be attached to a single handle twice if not in shared-cache mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1c4984c62f393f41f9182ea82546c16d02efa46f
User & Date: dan 2009-11-20 17:18:06
Original User & Date: dan 2009-11-20 10:18:06
References
2009-11-20
17:23
Merge leaf accidentally created by [1c4984c62f]. check-in: cae949ce user: dan tags: trunk
Context
2009-11-20
17:23
Merge leaf accidentally created by [1c4984c62f]. check-in: cae949ce user: dan tags: trunk
17:18
Add a test to make sure a database can be attached to a single handle twice if not in shared-cache mode. check-in: 1c4984c6 user: dan tags: trunk
13:18
Avoid unnecessary page cache allocations when move a page while autovacuuming an in-memory database, since the allocation might fail making it impossible to rollback the transaction. check-in: 9a429349 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/attach.test.

   782    782     }
   783    783   } {1 {database is locked}}
   784    784   do_test attach-8.4 {
   785    785     db errorcode
   786    786   } {5}
   787    787   db2 close
   788    788   file delete -force test2.db
          789  +
          790  +# Test that it is possible to attach the same database more than
          791  +# once when not in shared-cache mode. That this is not possible in
          792  +# shared-cache mode is tested in shared7.test.
          793  +do_test attach-9.1 {
          794  +  file delete -force test4.db
          795  +  execsql {
          796  +    ATTACH 'test4.db' AS aux1;
          797  +    CREATE TABLE aux1.t1(a, b);
          798  +    INSERT INTO aux1.t1 VALUES(1, 2);
          799  +    ATTACH 'test4.db' AS aux2;
          800  +    SELECT * FROM aux2.t1;
          801  +  }
          802  +} {1 2}
          803  +do_test attach-9.2 {
          804  +  file delete -force test4.db
          805  +  catchsql {
          806  +    BEGIN;
          807  +      INSERT INTO aux1.t1 VALUES(3, 4);
          808  +      INSERT INTO aux2.t1 VALUES(5, 6);
          809  +  }
          810  +} {1 {database is locked}}
          811  +do_test attach-9.3 {
          812  +  file delete -force test4.db
          813  +  execsql {
          814  +    COMMIT;
          815  +    SELECT * FROM aux2.t1;
          816  +  }
          817  +} {1 2 3 4}
   789    818   
   790    819   
   791    820   finish_test