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.
Feature enhancements
- The server can detect the proxy and client versions.
PreparedStatementobjects that returnAutoGeneratedKeyare supported.Note
To use a
PreparedStatementobject to returnAutoGeneratedKey, make sure that the version of OceanBase Connector/J is V2.4.5 or later and adduseOraclePrepareExecute=trueto the connection string.- The following table describes the URL parameter changes.
| Parameter | Status | Default value | Description | Remarks |
|---|---|---|---|---|
| compatibleOjdbcVersion | New | 6 | The compatible Oracle JDBC driver version, which can be set to 6 or 8. 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 Connector/J version, which can be set to 5 or 8. 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 PreparedStatement object does not communicate with the server before being executed by using COM_STMT_PREPARE_EXECUTE. |
In the current version, when useOraclePrepareExecute is set to true, useServerPrepStmts is automatically set to true. Prior to OceanBase Connector/J V2.4.5, you can enable both the PreparedStatement and PrepareExecute protocols only by manually setting both useOraclePrepareExecute and useServerPrepStmts to true. |
Bug fixes
- Fixed the issue caused by Oracle compatibility processing of the
getSchema()method. - Fixed the issue where an error is returned when the JDBC driver tries to establish a connection with the proxy after the SSL protocol and OceanBase Protocol 2.0 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
getInt()orgetLong()method does not throw an exception after obtaining overlong data even thoughjdbcCompliantTruncation=trueis configured. - Fixed the issue where the
getString()andgetTimestamp()methods 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 thegetString()method is different from that in MySQL Connector/J 8.0.