Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 3755 invoked from network); 10 Apr 2010 22:01:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Apr 2010 22:01:55 -0000 Received: (qmail 55878 invoked by uid 500); 10 Apr 2010 22:01:54 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 55838 invoked by uid 500); 10 Apr 2010 22:01:54 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 55792 invoked by uid 99); 10 Apr 2010 22:01:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Apr 2010 22:01:54 +0000 X-ASF-Spam-Status: No, hits=-1260.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Apr 2010 22:01:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3ALthQs005592 for ; Sat, 10 Apr 2010 17:55:44 -0400 (EDT) Message-ID: <33120215.5291270936543939.JavaMail.jira@thor> Date: Sat, 10 Apr 2010 17:55:43 -0400 (EDT) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4581) databaseName attribute doesn't seem to work with in-memory databases In-Reply-To: <528672446.266411268663787342.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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