[ 
https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899715#action_12899715
 ] 

Myrna van Lunteren commented on DERBY-4777:
-------------------------------------------

Thanks Yun for that inital patch.

But when I built, and ran our lang/holdCursorIJ.sql test with 
-Dframework=DerbyNetClient (which after all is how we got to notice this 
difference between client and embedded) it failed with the following diff:

234 del
< ERROR XJ202: Invalid cursor name 'JDK4'.
234a234
> ERROR 42X30: UNKNOWN MESSAGE, id 42X30 : [0] JDK4
280 del
< ERROR XJ202: Invalid cursor name 'JDK4'.
280a280
> ERROR 42X30: UNKNOWN MESSAGE, id 42X30 : [0] JDK4 

I had expected a difference, but not this 'UNKNOWN MESSAGE'.
The messages that the client access, need to be 'split' out of the shared 
messages. This is handled in the build process by the file 
java/build/org/apache/derbyBuild/splitmessages.java. I added the line:
 clientMessageIds.add(SQLState.LANG_CURSOR_NOT_FOUND); and after that, the 
holdCursorIj had the expected output:

I'm running tests to confirm this works, if all ok, I'll commit this.

However, we're not done - as this is a change in SQLState, and people *might* 
have programmed their application to expect a certain sqlstate, I think this 
issue needs a release note. 
See the first part of this wiki for how that's done: 
http://wiki.apache.org/db-derby/ReleaseNoteProcess

> perform different in Client and Embed modes when update on an invalid cursor
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-4777
>                 URL: https://issues.apache.org/jira/browse/DERBY-4777
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>         Attachments: derby-4777.patch, derby-4777.stat, DERBY-4777_b.diff, 
> DERBY-4777_b.stat
>
>
> Consider the sql snippet below:
> create table test(c1 int, c2 int);
> insert into test values(1,1);
> update test set c1=2 where current of jdk4;
> for the 'update' line, we get 'ERROR XJ202: Invalid cursor name 'JDK4'. ' in 
> Client mode, while 'ERROR 42X30: Cursor 'JDK4' not found. Verify that 
> autocommit is OFF.' in Embed mode.

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

Reply via email to