db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-3870) Concurrent Inserts of rows with XML data results in an exception
Date Wed, 11 May 2011 11:40:47 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-3870:
--------------------------------------

    Attachment: d3870-junit.diff

Attached is a JUnit test case that exposes the bug. It runs queries that use all the XML operators
in four threads concurrently. The actual failure varies. Sometimes it's a SAXException (FWK005
parse may not be called while parsing), other times it's a NullPointerException.

I agree that it's wrong to store the SqlXmlUtil instance in the compiled plan. Every activation
of the plan should have its own copy. The comments in the code indicate that the caching was
there to prevent recompilation of XPath queries for each row when using the XMLQUERY or XMLEXISTS
operators. Having one instance per activation would still provide that optimization.

> 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
>              Labels: derby_triage10_5_2
>         Attachments: Copy of derby.log, DerbyMultiInsertXmlException.zip, d3870-junit.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.<init>(Unknown Source)
> 	at org.apache.derby.client.am.SqlException.<init>(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

Mime
View raw message