mirror of https://github.com/apache/openjpa.git
OPENJPA-1455: VALUES CURRENT SCHEMA fails in DB2 on zOS. Change the SQL to SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@901775 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bad0838e00
commit
b08a0d179b
|
@ -274,7 +274,8 @@ public class DB2Dictionary
|
|||
super.connectedConfiguration(conn);
|
||||
|
||||
DatabaseMetaData metaData = conn.getMetaData();
|
||||
String str = "VALUES CURRENT SCHEMA";
|
||||
try {
|
||||
String str = "SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1";
|
||||
Statement stmnt = conn.createStatement();
|
||||
ResultSet rs = stmnt.executeQuery(str);
|
||||
if (rs.next()) {
|
||||
|
@ -284,6 +285,10 @@ public class DB2Dictionary
|
|||
}
|
||||
rs.close();
|
||||
stmnt.close();
|
||||
} catch (SQLException e) {
|
||||
if (log.isTraceEnabled())
|
||||
log.trace(_loc.get("can_not_get_current_schema", e.getMessage()));
|
||||
}
|
||||
|
||||
String driverName = metaData.getDriverName();
|
||||
if (driverName != null && driverName.startsWith("IBM DB2"))
|
||||
|
|
|
@ -204,3 +204,4 @@ cannot-determine-identifier-case: Unable to determine the case to use for delimi
|
|||
identifiers. The default value of "preserve" will be used.
|
||||
unknown-delim-support: Unable to determine whether delimited identifiers are supported. \
|
||||
The use of delimiters will not be supported.
|
||||
can_not_get_current_schema: Unable to get current schema. SQLException message is "{0}".
|
Loading…
Reference in New Issue