db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiago R. Espinha (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3839) Convert "org.apache.derbyTesting.functionTests.tests.store.holdCursorJDBC30.sql" to junit.
Date Thu, 23 Apr 2009 15:42:30 GMT

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

Tiago R. Espinha updated DERBY-3839:
------------------------------------

    Attachment: ReproHoldCursorBug.java

This file is a repro test class that I'm uploading to sort out a behaviour that I'm witnessing.
This is either a bug or then I am most certainly missing something.

This test should mimic the following behaviour:
----------------------8<------------------------
call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '1');

create table foo4 (a int, data int);

insert into foo4 values (1,10);
insert into foo4 values (1,20);
insert into foo4 values (1,30);
insert into foo4 values (1,40);
insert into foo4 values (1,50);

get with hold cursor test1 as 'select * from foo4 for update of data';

next test1;
commit;

delete from foo4 where current of test1;
-- should fail

next test1;
commit;

update foo4 set data=-3000 where current of test1;
-- should fail
----------------------8<------------------------
Both the update and the delete should fail because of the commit, and they do if I follow
those exact steps on ij. However, the JDBC test doesn't throw an exception on the update and
it reaches the fail() call.

The error that ij rightfully throws is ERROR 24000: Invalid cursor state - no current row.

Any ideas?


> Convert "org.apache.derbyTesting.functionTests.tests.store.holdCursorJDBC30.sql" to junit.

> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3839
>                 URL: https://issues.apache.org/jira/browse/DERBY-3839
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Junjie Peng
>            Assignee: Tiago R. Espinha
>         Attachments: derby-3839-1.patch, derby-3839-1.stat, derby-3839.patch, ReproHoldCursorBug.java
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message