Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 243AA6733 for ; Sun, 5 Jun 2011 18:41:09 +0000 (UTC) Received: (qmail 19119 invoked by uid 500); 5 Jun 2011 18:41:09 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 19105 invoked by uid 500); 5 Jun 2011 18:41:08 -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 19098 invoked by uid 99); 5 Jun 2011 18:41:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jun 2011 18:41:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jun 2011 18:41:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 742D6102AB7 for ; Sun, 5 Jun 2011 18:40:47 +0000 (UTC) Date: Sun, 5 Jun 2011 18:40:47 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <418770732.70052.1307299247472.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-3870) Concurrent Inserts of rows with XML data results in an exception 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-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3870: -------------------------------------- Attachment: upgrade-with-test.diff Thanks for taking a look at the patch, Bryan. I'm uploading a new patch which adds a test case for the upgrade scenario. The test creates a trigger using the old version and verifies that the trigger works after upgrading. Without the fix in the data dictionary, the test fails to boot the database with the new version. I think the test handles all combinations of XML ops being supported/not-supported with the old/new Derby version in the running environment. The different cases are handled like this: 1) If XML ops aren't supported with the new version, the test case is disabled in the test setup (we have helper methods to detect this). 2) If XML ops are supported with the new version, but not with the old version, the test case runs, but it will detect that CREATE TRIGGER fails with an exception saying XML requirements aren't satisfied. It will immediately return without reporting a failure. 3) If the situation described in (2) happens, the test case will run in all phases (create, soft-upgrade, post-soft-upgrade, hard-upgrade), but there is no trigger to test. The test case queries the system tables to see if the trigger has been created, and returns immediately if the trigger doesn't exist. 4) Since XML operators aren't supported at all before version 10.2, and creating the trigger will fail with a different exception than the one we detect as XML requirements not satisfied, the test case is made a no-op if the tested combination uses a too old version. (Actually, it only tests upgrade from 10.3 and newer now. That's because the CREATE TRIGGER statement fails on 10.2 because it lacks the fix for DERBY-1770.) All regression tests passed in my environment. > Concurrent Inserts of rows with XML data results in an exception > ---------------------------------------------------------------- > > Key: DERBY-3870 > URL: https://issues.apache.org/jira/browse/DERBY-3870 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.4.1.3, 10.4.2.1, 10.5.2.0, 10.6.1.0 > Environment: System: MS windows server 2003 standard edition service pack 2. Derby is run as a server on port 1527. > Reporter: Royi Ronen > Assignee: Knut Anders Hatlen > Labels: derby_triage10_5_2 > Fix For: 10.8.1.3, 10.9.0.0 > > Attachments: Copy of derby.log, DerbyMultiInsertXmlException.zip, d3870-1a.diff, d3870-1a.stat, d3870-2a.diff, d3870-3a.diff, d3870-3a.stat, d3870-junit.diff, upgrade-with-test.diff, upgrade.diff > > > We insert rows into a table using the following prepared statement (through JDBC): > INSERT INTO USER1.PSTORE values(?,?, XMLPARSE(document CAST (? AS CLOB) preserve whitespace)) > where each of the ?'s are replaced with a string. > One thread runs fine. Two or more result in the following exception: > org.apache.derby.client.am.SqlException: Java exception: 'FWK005 parse may not be called while parsing.: org.xml.sax.SAXException'. > at org.apache.derby.client.am.SqlException.(Unknown Source) > at org.apache.derby.client.am.SqlException.(Unknown Source) > We believe that this comes from the dBuilder.parse(InputSource) method. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira