Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4171

Connections to on-disk db go to in-memory db if in-memory db with same name is booted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.5.1.1, 10.6.1.0
    • 10.5.2.0, 10.6.1.0
    • Store
    • None

    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

        1. derby-4171-2a.diff
          1 kB
          Kristian Waagan
        2. derby-4171-1b-fix.diff
          3 kB
          Kristian Waagan
        3. derby-4171-1a-fix.diff
          0.8 kB
          Kristian Waagan

        Issue Links

          Activity

            People

              kristwaa Kristian Waagan
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: