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 "Yun Lee (JIRA)" <ji...@apache.org> on 2010/08/16 13:59:16 UTC

[jira] Created: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

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


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.


[jira] Commented: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899846#action_12899846 ] 

Yun Lee commented on DERBY-4777:
--------------------------------

Thanks Myrna! I will add a patch for a release note tomorrow or the day after.

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


[jira] Commented: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898869#action_12898869 ] 

Yun Lee commented on DERBY-4777:
--------------------------------

In DERBY,  ERROR 42X30 (LANG_CURSOR_NOT_FOUND) occures in CurrentOfResultSet.getCursor() and CurrentOfNode.bindNonVTITables(). While ERROR XJ202 (CURSOR_INVALID_NAME) occurs in Statement.setCursorName() and Statement.flowExecute().

I think CURSOR_INVALID_NAME should just be used to show the 'name' of a cursor is invalid, but not the cursor itself is invalid. If a cursor itselft is not invalid, a LANG_CURSOR_NOT_FOUND is more suitable. 

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


[jira] Commented: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-4777:
--------------------------------------

    Affects Version/s: 10.7.0.0
     Issue & fix info: [Release Note Needed]  (was: [Patch Available])

Tests ran cleanly against classes (except for testPing/DERBY-4762) so I committed the modified patch with revision 986750. Marking Release Note Needed sothe issue will be flagged when we make a next release.


> 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
>    Affects Versions: 10.7.0.0
>            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.


[jira] Updated: (DERBY-4777) Different behavior in Client and Embedded modes when update on an invalid cursor

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-4777:
---------------------------

    Issue & fix info: [Patch Available]  (was: [Release Note Needed])

> Different behavior in Client and Embedded 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
>    Affects Versions: 10.7.0.0
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>         Attachments: derby-4777-releasenote.patch, derby-4777-releasenote.stat, 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.


[jira] Updated: (DERBY-4777) Different behavior in Client and Embedded modes when update on an invalid cursor

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-4777:
--------------------------------------

    Attachment: releaseNote.html

Thanks for that releaseNote.
On the whole, it looks good.

However, release notes don't need to be appended as 'patches'/svn diffs. Instead, the templates/releaseNote.html is supposed to get copied to a temporary location, not actually changed, and then copied, modified file can be attached to the jira issue without a name change.

The flag 'release Note needed' stays on, the bug gets closed, and during the next release cycle, the file 'releaseNote.html' attached to the issue will automatically be included in the list of items requiring a release note.

I'm attaching the releaseNote.html resulting from your patch (I applied the patch, copied the file, then reverted the tools/release/templates/releaseNote.html).
I made a couple of tiny changes to the phrasing, nothing important.


> Different behavior in Client and Embedded 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
>    Affects Versions: 10.7.0.0
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>         Attachments: derby-4777-releasenote.patch, derby-4777-releasenote.stat, derby-4777.patch, derby-4777.stat, DERBY-4777_b.diff, DERBY-4777_b.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-4777:
--------------------------------------

    Attachment: DERBY-4777_b.stat
                DERBY-4777_b.diff

attaching an improved patch.

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


[jira] Updated: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-4777:
---------------------------

    Issue & fix info: [Patch Available]

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


[jira] Updated: (DERBY-4777) Different behavior in Client and Embedded modes when update on an invalid cursor

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-4777:
---------------------------------

    Summary: Different behavior in Client and Embedded modes when update on an invalid cursor  (was: perform different in Client and Embed modes when update on an invalid cursor)

Changed to the title of this issue somewhat for legibility.

> Different behavior in Client and Embedded 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
>    Affects Versions: 10.7.0.0
>            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.


[jira] Resolved: (DERBY-4777) Different behavior in Client and Embedded modes when update on an invalid cursor

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren resolved DERBY-4777.
---------------------------------------

    Issue & fix info:   (was: [Patch Available])
       Fix Version/s: 10.7.0.0
          Resolution: Fixed

> Different behavior in Client and Embedded 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
>    Affects Versions: 10.7.0.0
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>             Fix For: 10.7.0.0
>
>         Attachments: derby-4777-releasenote.patch, derby-4777-releasenote.stat, derby-4777.patch, derby-4777.stat, DERBY-4777_b.diff, DERBY-4777_b.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-4777) perform different in Client and Embed modes when update on an invalid cursor

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-4777:
---------------------------

    Attachment: derby-4777.patch
                derby-4777.stat

For derby-4777.patch, CURSOR_INVALID_NAME is replaced by LANG_CURSOR_NOT_FOUND in Statement.flowExecute(). 

Accordingly, CurrentOfTest.testDelete() begins to use 42X30(LANG_CURSOR_NOT_FOUND) in both modes.

Please check it, thanks!

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


[jira] Updated: (DERBY-4777) Different behavior in Client and Embedded modes when update on an invalid cursor

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-4777:
---------------------------

    Attachment: derby-4777-releasenote.patch
                derby-4777-releasenote.stat

A patch for releasenote.html is submitted, please check it, thanks!

> Different behavior in Client and Embedded 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
>    Affects Versions: 10.7.0.0
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>         Attachments: derby-4777-releasenote.patch, derby-4777-releasenote.stat, 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.