Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 23002 invoked from network); 24 Apr 2009 13:51:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Apr 2009 13:51:53 -0000 Received: (qmail 52374 invoked by uid 500); 24 Apr 2009 13:51:53 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 52352 invoked by uid 500); 24 Apr 2009 13:51:53 -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 52344 invoked by uid 99); 24 Apr 2009 13:51:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2009 13:51:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2009 13:51:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 71D8B234C4AF for ; Fri, 24 Apr 2009 06:51:30 -0700 (PDT) Message-ID: <229977477.1240581090464.JavaMail.jira@brutus> Date: Fri, 24 Apr 2009 06:51:30 -0700 (PDT) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4172) You can open a read-write connection to a database which was originally opened by another thread using the classpath subprotocol In-Reply-To: <1332797269.1240323947482.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702374#action_12702374 ] Rick Hillegas commented on DERBY-4172: -------------------------------------- Thanks, Knut. That sounds like a good refinement to me. > You can open a read-write connection to a database which was originally opened by another thread using the classpath subprotocol > -------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-4172 > URL: https://issues.apache.org/jira/browse/DERBY-4172 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.6.0.0 > Reporter: Rick Hillegas > > The original connection, using the classpath subprotocol, was supposed to open the DATABASE (not the connection) as read-only, according to the Developer's Guide section titled "Database connection examples". However, I am able to write to this database in another connection which opens the database using the default, file-based protocol. > At a minimum, the documentation is wrong. But the documentation may be trying to impose a consistent, easily described model on the behavior of our subprotocols. It may be that the behavior of our subprotocols cannot be described by a simple set of rules that users can grasp easily. > To show this problem, I created a database and then moved it into a directory on my classpath (in this case, trunk/classes). Here is a script which shows this behavior: > connect 'jdbc:derby:classpath:derby10.6' as conn1; > -- fails because a database which is opened on the classpath is supposed to be marked as read-only > insert into t( a ) values 1; > connect 'jdbc:derby:trunk/classes/derby10.6' as conn2; > -- this succeeds even though the database is supposed to be read-only > -- according to the Developer's Guide section "Database connection examples" > insert into t( a ) values 2; > select * from t; > delete from t; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.