db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1435) Conglomerate does not exist occurs in a specific case after dropping a table referenced by a trigger
Date Thu, 22 Jun 2006 15:52:31 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1435?page=comments#action_12417323 ] 

Deepa Remesh commented on DERBY-1435:
-------------------------------------

Thanks for looking into this Suresh. Now, I can see this from the traces too. We are re-using
the prepared statement after table t1 is dropped. Here are the stack traces from ij for execution
of a new statement (insert into t2 values(2)) and a previously executed statement (insert
into t2 values(1)) after table t1 is dropped:

ij> --- these inserts should not work, but the second insert gives XSAI2
insert into t2 values(2);
ERROR 42X05: Table/View 'T1' does not exist.
ERROR 42X05: Table/View 'T1' does not exist.
        at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:304)
        at org.apache.derby.impl.sql.compile.DMLModStatementNode.verifyTargetTable(DMLModStatementNo
de.java:230)
        at org.apache.derby.impl.sql.compile.InsertNode.bind(InsertNode.java:248)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:344)
        at org.apache.derby.impl.sql.GenericStatement.prepareStorable(GenericStatement.java:591)
        at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.compileStatement(SPSDescriptor.java:35
3)
        at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(SPSDescriptor.java:2
83)
        at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(SPSDescriptor.java:3
03)
        at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.jav
a:690)
        at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.jav
a:651)
        at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(GenericTriggerExecuto
r.java:138)
        at org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(RowTriggerExecutor.java:
110)
        at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(TriggerEventActivator
.java:277)
        at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(InsertResultSet.java:1
134)
        at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:522)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:
361)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1181)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:584)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:516)
        at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:313)
        at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:433)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310)
        at org.apache.derby.impl.tools.ij.Main.go(Main.java:207)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:173)
        at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
        at org.apache.derby.tools.ij.main(ij.java:60)
ij> insert into t2 values(1);
ERROR XSAI2: The conglomerate (896) requested does not exist.
ERROR XSAI2: The conglomerate (896) requested does not exist.
        at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:304)
        at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(HeapCong
lomerateFactory.java:224)
        at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(RAMAccessManager.jav
a:484)
        at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(RAMTransaction
.java:389)
        at org.apache.derby.impl.store.access.RAMTransaction.getDynamicCompiledConglomInfo(RAMTransa
ction.java:701)
        at org.apache.derby.impl.sql.execute.DMLWriteResultSet.<init>(DMLWriteResultSet.java:82)
        at org.apache.derby.impl.sql.execute.DMLWriteResultSet.<init>(DMLWriteResultSet.java:66)
        at org.apache.derby.impl.sql.execute.InsertResultSet.<init>(InsertResultSet.java:343)
        at org.apache.derby.impl.sql.execute.GenericResultSetFactory.getInsertResultSet(GenericResul
tSetFactory.java:95)
        at org.apache.derby.exe.ac46a08075x010bxfc52x1188x0000001171d80.fillResultSet(Unknown
Source
)
        at org.apache.derby.exe.ac46a08075x010bxfc52x1188x0000001171d80.execute(Unknown Source)
        at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:32
6)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:
359)
        at org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(GenericTriggerExecuto
r.java:169)
        at org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(RowTriggerExecutor.java:
110)
        at org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(TriggerEventActivator
.java:277)
        at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(InsertResultSet.java:1
134)
        at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:522)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:
361)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1181)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:584)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:516)
        at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:313)
        at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:433)
        at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310)
        at org.apache.derby.impl.tools.ij.Main.go(Main.java:207)
        at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:173)
        at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
        at org.apache.derby.tools.ij.main(ij.java:60)

> Conglomerate does not exist occurs in a specific case after dropping a table referenced
by a trigger
> ----------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1435
>          URL: http://issues.apache.org/jira/browse/DERBY-1435
>      Project: Derby
>         Type: Bug

>   Components: SQL
>     Versions: 10.2.0.0
>     Reporter: Deepa Remesh
>  Attachments: repro1435.sql
>
> This exception occurs in the following case:
> 1. Create tables t1 and t2. Create a trigger on t2 whose triggering action is to insert
a row into t1
> 2. Insert a value v1 into t2. Verify the trigger was fired by looking at contents of
t1.
> 3. Drop table t1. 
> 4. Insert a value v2 into t2. This will give an exception to indicate that table t1 does
not exist.
> 5. Insert the same value v1 into t2. Instead of the exception in Step 4, this gives "ERROR
XSAI2: The conglomerate (896) requested does not exist."
> 6. Re-create table t1.
> 7. Insert  v2 into t2. This succeeds.
> 8. Try to insert the problem value v1 into t2. This still gives "ERROR XSAI2: The conglomerate
(896) requested does not exist."
> 9. Shutdown and reconnect to the database. Try to insert the problem value v1 into t2.
Now this succeeds.
> So the exception occurs only in the specific case where we try to insert the same value
that we had inserted before dropping the table referenced by the trigger. I'll attach a sql
script to repro this.

-- 
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


Mime
View raw message