Log Message: |
DERBY-3181: DatabaseMetaData.getBestRowIdentifier behavior with invalid scope
This patch was contributed by Danoja Dias (danojadias at gmail dot com)
The DatabaseMetaData.getBestRowIdentifier method takes a number of arguments,
including "scope", which is supposed to be one of the enumerated values:
bestRowTemporary, bestRowTransaction, and bestRowSession.
If an invalid scope argument was passed to this method, Derby was returning
a hard-coded "empty" row identifier, which was slightly different, in detail,
to the row identifier that is returned for a valid scope argument.
Since JDBC does not require that we return such a row identifier for an
invalid scope argument, it seems cleaner and more useful to throw an
exception with a message indicating that an invalid scope argument was
passed. The caller can then correct their application to make the call with
a valid scope argument, and will then receive a valid row identifier.
|