You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kim Haase (JIRA)" <ji...@apache.org> on 2010/03/15 15:36:27 UTC

[jira] Created: (DERBY-4581) databaseName attribute doesn't seem to work with in-memory databases

databaseName attribute doesn't seem to work with in-memory databases
--------------------------------------------------------------------

                 Key: DERBY-4581
                 URL: https://issues.apache.org/jira/browse/DERBY-4581
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.6.0.0
            Reporter: Kim Haase
            Priority: Minor


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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4581) databaseName attribute needs to include subsubprotocol, if there is one

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856506#action_12856506 ] 

Kristian Waagan commented on DERBY-4581:
----------------------------------------

Sounds like a good first step to me, Kim.
We can improve/change the implementation later, if required.

> databaseName attribute needs to include subsubprotocol, if there is one
> -----------------------------------------------------------------------
>
>                 Key: DERBY-4581
>                 URL: https://issues.apache.org/jira/browse/DERBY-4581
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.6.0.0
>            Reporter: Kim Haase
>            Assignee: Kim Haase
>            Priority: Minor
>
> 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?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-4581) databaseName attribute needs to include subsubprotocol, if there is one

Posted by "Kim Haase (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim Haase updated DERBY-4581:
-----------------------------

        Summary: databaseName attribute needs to include subsubprotocol, if there is one  (was: databaseName attribute doesn't seem to work with in-memory databases)
       Assignee: Kim Haase
    Component/s: Documentation
                     (was: Store)

It appears that a fix is needed to the databaseName topic: if the database has a subsubprotocol name, that name needs to be included in the databaseName attribute.

> databaseName attribute needs to include subsubprotocol, if there is one
> -----------------------------------------------------------------------
>
>                 Key: DERBY-4581
>                 URL: https://issues.apache.org/jira/browse/DERBY-4581
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.6.0.0
>            Reporter: Kim Haase
>            Assignee: Kim Haase
>            Priority: Minor
>
> 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?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-4581) databaseName attribute doesn't seem to work with in-memory databases

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855652#action_12855652 ] 

Kristian Waagan commented on DERBY-4581:
----------------------------------------

This problem isn't limited to the in-memory protocol.
Derby simply removes the prefix 'jdbc:derby:' and checks if the remaining string (which may be terminated/truncated by a semi colon character) has a length of zero. If so, it checks the databaseName attribute.

Another workaround is to include the subsubprotocol in databaseName, i.e. "connect 'jdbc:derby:;databaseName=memory:myDB'".



> databaseName attribute doesn't seem to work with in-memory databases
> --------------------------------------------------------------------
>
>                 Key: DERBY-4581
>                 URL: https://issues.apache.org/jira/browse/DERBY-4581
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.6.0.0
>            Reporter: Kim Haase
>            Priority: Minor
>
> 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?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-4581) databaseName attribute needs to include subsubprotocol, if there is one

Posted by "Kim Haase (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim Haase closed DERBY-4581.
----------------------------

    Resolution: Duplicate

Closing as duplicate of DERBY-4525.

> databaseName attribute needs to include subsubprotocol, if there is one
> -----------------------------------------------------------------------
>
>                 Key: DERBY-4581
>                 URL: https://issues.apache.org/jira/browse/DERBY-4581
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.6.0.0
>            Reporter: Kim Haase
>            Assignee: Kim Haase
>            Priority: Minor
>
> 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?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-4581) databaseName attribute doesn't seem to work with in-memory databases

Posted by "Kim Haase (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855968#action_12855968 ] 

Kim Haase commented on DERBY-4581:
----------------------------------

Thanks for explaining this, Kristian. Seems as if it would make sense to turn this into a documentation issue and mention in the databaseName attribute topic that the subsubprotocol name needs to be included. I'll do that.

> databaseName attribute doesn't seem to work with in-memory databases
> --------------------------------------------------------------------
>
>                 Key: DERBY-4581
>                 URL: https://issues.apache.org/jira/browse/DERBY-4581
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.6.0.0
>            Reporter: Kim Haase
>            Priority: Minor
>
> 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?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-4581) databaseName attribute doesn't seem to work with in-memory databases

Posted by "Kim Haase (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kim Haase updated DERBY-4581:
-----------------------------

    Component/s:     (was: SQL)
                 Store

> databaseName attribute doesn't seem to work with in-memory databases
> --------------------------------------------------------------------
>
>                 Key: DERBY-4581
>                 URL: https://issues.apache.org/jira/browse/DERBY-4581
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.6.0.0
>            Reporter: Kim Haase
>            Priority: Minor
>
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.