Version information
- Release date: August 18, 2023
- Version: V2.4.5
Overview
OceanBase Connector/J V2.4.5 supports PreparedStatement objects that return AutoGeneratedKey and allows the server to detect the client version.
Enhanced features
The server can detect the proxy and client versions.
Supports
PreparedStatementobjects that returnAutoGeneratedKey.Note
In order for a
PreparedStatementobject to returnAutoGeneratedKey, the OceanBase Connector/J version must be V2.4.5 or later and the connection string must includeuseOraclePrepareExecute=true.The following table describes the URL parameter changes.
Parameter Change type Default value Description Remarks compatibleOjdbcVersion New 6 The compatible ojdbc version, which can be set to 6or8. If you set the value of this parameter to another integer, the system does not return an error but still applies the default value.useInformationSchema New false Specifies whether the driver uses INFORMATION_SCHEMA to derive information used by DatabaseMetaData. compatibleMysqlVersion New 5 The compatible mysql-jdbc version, which can be set to 5or8. If you set the value of this parameter to another integer, the system does not return an error but still applies the default value.useOraclePrepareExecute Optimized false Specifies whether to enable both the PreparedStatement and PrepareExecute protocols. In Oracle mode, a prepared statement does not communicate with the server before being executed by using COM_STMT_PREPARE_EXECUTE.In the current version, when useOraclePrepareExecuteis set totrue,useServerPrepStmtsis automatically set totrue. Prior to OceanBase Connector/J V2.4.5, you can enable both the PreparedStatement and PrepareExecute protocols only by manually setting bothuseOraclePrepareExecuteanduseServerPrepStmtstotrue.
Bug fixes
- Fixed the issue caused by Oracle compatibility processing of the
getSchema()method. - Fixed the issue where an error is returned when the Java Database Connectivity (JDBC) driver tries to establish a connection with the proxy after the SSL and OB2.0 protocols are enabled.
- Fixed the issue where the error "out of range for column" is returned when
useServerPrepStmtsis set tofalsefor OceanBase Connector/J. - Fixed the issue where the
getIntorgetLongmethod does not throw an exception after obtaining overlong data even thoughjdbcCompliantTruncationis set totrue. - Fixed the issue where the
getStringandgetTimestampmethods return null for the zero value of thedatetimetype. This issue was caused by server modifications. - Fixed the issue where the zero value of the
datetimetype obtained by thegetStringmethod is different from that in mysql-jdbc 8.