Description
When an in-memory database has been booted, subsequent attempts to connect to an ordinary (on-disk) database with the same name as the in-memory database will connect to the in-memory db.
ij version 10.5
ij> connect 'jdbc:derby:memory:MyDB;create=true'; – with subprotocol memory
ij> create table t (x varchar(30));
0 rows inserted/updated/deleted
ij> insert into t values 'This is the in-memory backend';
1 row inserted/updated/deleted
ij> connect 'jdbc:derby:MyDB;create=true'; --without subprotocol memory, should create disk db
WARNING 01J01: Database 'MyDB' not created, connection made to existing database instead.
ij(CONNECTION1)> select * from t;
X
------------------------------
This is the in-memory backend
1 row selected
Attachments
Attachments
Issue Links
- relates to
-
DERBY-4271 testBootSameDbDifferentSubSubProtocol(org.apache.derbyTesting.functionTests.tests.memorydb.BasicInMemoryDbTest)java.sql.SQLException: Database 'BSDDSSP' not found.
- Closed