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

databaseName attribute needs to include subsubprotocol, if there is one

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 10.6.1.0
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None

      Description

      In a recent build from the trunk, the databaseName attribute doesn't seem to work correctly with an in-memory database.

      When I'm in ij, I can create an in-memory db, disconnect, and then connect again, and the db is still there. I can connect to it the usual way, but not using the databaseName attribute – I tried a couple of different ways:

      ij> connect 'jdbc:derby:memory:myDB;create=true';
      ij> create table t(c int);
      0 rows inserted/updated/deleted
      ij> disconnect;
      ij> connect 'jdbc:derby:memory:myDB';
      ij> insert into t values(1), (2);
      2 rows inserted/updated/deleted
      ij> select * from t;
      C
      -----------
      1
      2

      2 rows selected
      ij> disconnect;
      ij> connect 'jdbc:derby:memory;databaseName=myDB';
      ERROR XJ004: Database 'memory' not found.
      ij> connect 'jdbc:derby:memory:;databaseName=myDB';
      ERROR XJ004: Database 'memory:' not found.

      The workaround is to use the simpler syntax 'jdbc:derby:memory:myDB', but the attribute ought to work too, shouldn't it?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chaase3 Camilla Haase
                Reporter:
                chaase3 Camilla Haase
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: