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

Knut Anders Hatlen commented on DERBY-6389:
-------------------------------------------

http://db.apache.org/derby/docs/10.10/adminguide/radminappsresultsetdiffs.html 
says the following about updatable result sets:

{quote}
The Network Client requires that there be at least one column in the select 
list from the target table. For example, the following statement will fail in a 
server environment:

select 1, 2 from t1 for update of c11
{quote}

The example query seems to be accepted by the network client in my environment, 
and it seems to behave as expected:

{noformat}
ij> create table t(x int, y int, c11 int);
0 rows inserted/updated/deleted
ij> select 1, 2 from t for update;
1          |2          
-----------------------

0 rows selected
ij> select 1, 2 from t for update of c11;
1          |2          
-----------------------

0 rows selected
ij> insert into t values (1,2,3);
1 row inserted/updated/deleted
ij> select 1, 2 from t for update of c11;
1          |2          
-----------------------
1          |2          

1 row selected
ij> get cursor c as 'select 1, 2 from t for update of c11';
ij> next c;
1          |2          
-----------------------
1          |2          
ij> update t set c11 = 4 where current of c;
1 row inserted/updated/deleted
ij> update t set y = 4 where current of c;
ERROR 42X31: Column 'Y' is not in the FOR UPDATE list of cursor 
'SQL_CURLH000C1'. (errorCode = 30000)
{noformat}

> Update adminguide's list of differences between client and embedded
> -------------------------------------------------------------------
>
>                 Key: DERBY-6389
>                 URL: https://issues.apache.org/jira/browse/DERBY-6389
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Knut Anders Hatlen
>
> The admin guide has a chapter that describes known differences between the 
> client driver and the embedded driver: 
> http://db.apache.org/derby/docs/10.10/adminguide/cadminapps.html
> Most of this information was added for the original network client 
> implementation in 10.1 (DERBY-371) and has not been updated since.
> For example, 
> http://db.apache.org/derby/docs/10.10/adminguide/cadminappsclientdiffs.html 
> says SQLStates for exceptions on the client may be null. I believe this was 
> fixed in 10.2 as part of DERBY-254.
> It also says that SQLExceptions (and SQLWarnings) won't be chained, but that 
> was fixed in 10.3 (DERBY-2692). That outdated information is also repeated 
> here: http://db.apache.org/derby/docs/10.10/adminguide/radminapps811974.html



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to