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

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

Thank you, Kim. All the changes in the patch look good to me. +1 to commit.

Not exactly a client/embedded difference, but while we're at the topic of 
generated keys... I cannot find anywhere that we mention the current limitation 
that getGeneratedKeys() only returns sensible results if the last statement was 
a single-row insert statement. If it was a multi-row insert, getGeneratedKeys() 
will still return a result set with just a single row, even though it should 
return one row per inserted row. Also, the value in the row that is returned, 
does not represent a key generated in the last statement, but rather the key 
generated by the last single-row insert on the connection. This is because 
getGeneratedKeys() is implemented as a call to VALUES IDENTITY_VAL_LOCAL(), and 
the IDENTITY_VAL_LOCAL function returns the last generated key in a single-row 
insert on the current connection.

Would it make sense to add a line about this to the Autogenerated keys topic in 
the reference manual? It should be enough to say that the getGeneratedKeys() 
method has the same limitations as the IDENTITY_VAL_LOCAL function and only 
gives useful information about single-row inserts.

(This limitation is tracked in DERBY-3609, and the reporter of that bug also 
noted that the documentation was silent about it.)

> 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
>            Assignee: Kim Haase
>         Attachments: ClientExample.java, ClientExample.java, DERBY-6389.diff, 
> DERBY-6389.stat, DERBY-6389.zip, DERBY-6389.zip, EmbeddedExample.java, 
> EmbeddedExample.java
>
>
> 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