You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "A B (JIRA)" <de...@db.apache.org> on 2006/04/12 18:32:08 UTC

[jira] Created: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
---------------------------------------------------------------------------------------------------------------------------------

         Key: DERBY-1208
         URL: http://issues.apache.org/jira/browse/DERBY-1208
     Project: Derby
        Type: Bug

  Components: JDBC  
    Versions: 10.2.0.0    
    Reporter: A B
    Priority: Minor
 Attachments: d1208.java, derby.log

Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Updated: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1208?page=all ]

A B updated DERBY-1208:
-----------------------

    Attachment: d1208.java
                derby.log

Attaching a simple repro for this issue.  To run against embedded mode, run:

> java d1208 embedded

I've also attached the derby.log file created from running the repro.

Against a SANE set of jars the output is:

----

Using driver: org.apache.derby.jdbc.EmbeddedDriver

Query 1 result set: 10, Row 1
Query 2 result set: 20, Row 2
Query 3 failed as expected: Attempt to divide by zero.
Query 4 failed: Java exception: 'ASSERT FAILED ProjectRestrictResultSet already open: org.apache.der
by.shared.common.sanity.AssertFailure'.
Query 5 failed: Java exception: 'ASSERT FAILED ProjectRestrictResultSet already open: org.apache.der
by.shared.common.sanity.AssertFailure'.

Database shutdown.

 [ Done. ]

----

With INSANE jars, the output is:

----

Using driver: org.apache.derby.jdbc.EmbeddedDriver

Query 1 result set: 10, Row 1
Query 2 result set: 20, Row 2
Query 3 failed as expected: Attempt to divide by zero.
Query 4 result set: 40, Row 4
Query 5 result set: 50, Row 5

Database shutdown.

 [ Done. ]

> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Updated: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1208?page=all ]

Kathey Marsden updated DERBY-1208:
----------------------------------

    Derby Info:   (was: [Patch Available])

Thanks Dan for looking at the patch.   I'll hold off on further action and  will uncheck "patch available" based on Dan's concern with the code change and the test issue.
  
Håvard are you still interested in working on this issue?    If so please make sure you speak up if you need help and assign yourself and mark patch available when you have a new patch you would like someone to review.  I would like to help move it along if I can as I think it is very wrong that we made you wait three months for review.  Please look at the Wiki page http://wiki.apache.org/db-derby/PatchAdvice for some tips on how to push your patch through the process too.


> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Assigned: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1208?page=all ]

Andrew McIntyre reassigned DERBY-1208:
--------------------------------------

    Assign To:     (was: Håvard Mork)

> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Updated: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1208?page=all ]

Mike Matrigali updated DERBY-1208:
----------------------------------

    Derby Info: [Patch Available]

> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Commented: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1208?page=comments#action_12419892 ] 

Kathey Marsden commented on DERBY-1208:
---------------------------------------

Thanks Håvard  for the patch and the test. It is especially good  that we will now have coverage for failures during  this part of execution.

Your approach looks good to me. I ran the test and verified the original repro  fails without your patch and passes with it.

I wouldn't normally commit in this area but the patch looks pretty harmless, so if nobody objects, I  will run derbyall and then commit Monday.  It would be good if someone familiar with the SQL area also took a quick look.


Kathey


> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Commented: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1208?page=comments#action_12419923 ] 

Daniel John Debrunner commented on DERBY-1208:
----------------------------------------------

I'm not sure this is the correct approach, but I need to investigate more. Typically (I think) we don't have finally blocks in the language ResultSet classes that close other ResultSets. I think this is handled at a higher level by closing the entire ResultSet tree. The patch is useful in that it points out the issue and provides a test. It potentially indicates that there is an issue with close methods for the two modified ResultSet implementations, e.g. the closeSource method in GroupedAggregateResultSet has one path where the source ResultSet is not closed, that logic looks strange.

> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Assigned: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1208?page=all ]

Andrew McIntyre reassigned DERBY-1208:
--------------------------------------

    Assign To: Håvard Mork

> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Assignee: Håvard Mork
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Updated: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Håvard Mork (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1208?page=all ]

Håvard Mork updated DERBY-1208:
-------------------------------

    Attachment: 1208.diff

The attached patch fixes this harmless warning in embedded mode. Also fixed the same problem for 'group by' result sets.

> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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


[jira] Commented: (DERBY-1208) Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1208?page=comments#action_12419924 ] 

Daniel John Debrunner commented on DERBY-1208:
----------------------------------------------

The modified test prepStmtNull succeeds (in sane & insane)  for me *without* applying the code changes to the ResultSets.
The repro d1208.java does fail for me in sane mode. (and passes in insane).

> Attempts to reuse a prepared statement after an execution-time error causes ASSERT failure in SANE mode, but work fine in INSANE.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1208
>          URL: http://issues.apache.org/jira/browse/DERBY-1208
>      Project: Derby
>         Type: Bug

>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: A B
>     Priority: Minor
>  Attachments: 1208.diff, d1208.java, derby.log
>
> Please see the comments in DERBY-1196 for the discussion that prompted the filing of this issue.  In short, if one attempts to reuse a prepared statement with a new set of parameters after a previous call to execute that statement has failed, the result will be an ASSERT failure in SANE mode.   When the same thing is done in INSANE mode, everything works as one might expect it to.

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