[ http://issues.apache.org/jira/browse/DERBY-230?page=all ]
�ystein Gr�vlen updated DERBY-230:
----------------------------------
Attachment: derby-230.diff
I have attached a patch to fix this bug. Please, review it.
The patch contains changes to the following files:
M java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
The fix as previously described in this JIRA report.
A
java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConcurrentImplicitCreateSchema.java
A new test that, before the fix was applied, reproduced the problem almost
every time on a multi-processor computer and once in a while on a
single-threaded computer.
A
java/testing/org/apache/derbyTesting/functionTests/master/ConcurrentImplicitCreateSchema.out
The master file for the test.
M
java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
The test has been included in the derbylang suite.
I have run the derbyall testsuite, and all tests passed except
derbynet/testconnection.java which also failed without this patch (see
DERBY-303).
> "Schema already exists" when creating a table
> ---------------------------------------------
>
> Key: DERBY-230
> URL: http://issues.apache.org/jira/browse/DERBY-230
> Project: Derby
> Type: Bug
> Components: SQL
> Versions: 10.0.2.1, 10.0.2.0, 10.0.2.2, 10.1.0.0
> Reporter: �ystein Gr�vlen
> Assignee: �ystein Gr�vlen
> Priority: Minor
> Attachments: Main.java, derby-230.diff
>
> When running a multithreaded program where several threads in parallell
> create tables in a schema that is not explicitly created, one often get the
> following exception:
> ERROR X0Y68: Schema 'TESTSCHEMA' already exists.
> at
> org.apache.derby.iapi.error.StandardException.newException(StandardException.java:322)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(DataDictionaryImpl.java:1512)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorNow(DataDictionaryImpl.java:1496)
> at
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(DataDictionaryImpl.java:1478)
> at
> org.apache.derby.impl.sql.execute.CreateSchemaConstantAction.executeConstantAction(CreateSchemaConstantAction.java:147)
> at
> org.apache.derby.impl.sql.execute.DDLConstantAction.getSchemaDescriptorForCreate(Unknown
> Source)
> at
> org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(CreateTableConstantAction.java:213)
> at
> org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.java:56)
> at
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:366)
> at
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1108)
> at
> org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517)
> at
> org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:475)
> at derbytest.Main$CreateTable.run(Main.java:42)
> at java.lang.Thread.run(Thread.java:595)
> A program that reproduces this bug will be attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira