/[Apache-SVN]
ViewVC logotype

Revision 1745414


Jump to revision: Previous Next
Author: bpendleton
Date: Wed May 25 00:35:58 2016 UTC (7 years, 11 months ago)
Changed paths: 4
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.



Changed paths

Path Details
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml modified , text changed
Directorydb/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26