Publish date: July 2, 2025 Version: V2.4.15
Version overview
JDBC V2.4.15 introduces multiple parameters, enhancing compatibility with MySQL and Oracle. In MySQL mode, the new parameter useLocalSessionState controls whether JDBC uses locally cached session states to avoid frequent query requests to OBServer. In Oracle mode, the new parameter lowercaseRoutinesInMetadata controls whether names are required to be in uppercase when retrieving procedure/function metadata using interfaces like getProcedures or getFunctions. Additionally, the Set/Get ClientInfo interface has been optimized by using local caching, eliminating the need for frequent requests to OBServer, thereby reducing database resource overhead.
New features
- Optimized the Get/Set ClientInfo interface by implementing local caching, reducing the need for frequent requests to the OBServer and minimizing the database resource overhead.
- MySQL Tenant
- A new parameter
useLocalSessionStateis added to control whether JDBC uses cached session state (such as transaction mode, auto-commit status, and current database) to avoid frequent queries sent to OBServer. If the value is False, the query will be sent. If the value is True, a query will be sent only when the session state changes. Note that JDBC versions earlier than V2.4.15 do not have this parameter, and the behavior of sending queries when session state changes is equivalent to settinguseLocalSessionState=true, so the default value of this parameter is set to True.
- A new parameter
- Oracle tenancy
- Adds the new parameter
lowercaseRoutinesInMetadatato control whethergetProceduresorgetFunctionscan retrieve routine metadata based on lowercase names. The default value istrue, indicating that it supports retrieving metadata based on lowercase names. - In Oracle mode, only
binary_doubleis the real double type, while other standard double types should be converted to numbers. Currently, thesetDoubleinterface sends double-type data to the database, which cannot be distinguished from thesetBinary_doubleinterface. JDBC V2.4.15 changed the serialized data type of thesetDoubleinterface to Number, which differentiates it from thesetBinary_doubleinterface. - Added a parameter named
convertNoneNanoSecsToDateto indicate whether to convert the values of timestamp fields with different levels of precision to the Date type.
- Adds the new parameter
Change in URL parameters
Add the following URL parameters:
Name |
Status |
Default value |
Description |
|---|---|---|---|
oracleXaPrepareThrowException |
Added | false | Throw an exception when the return value of dbms_xa.xa_prepare is not 0 or 3 |
useLocalSessionState |
New | true | Controls whether the driver uses the cached session state (such as transaction mode, auto-commit mode, and current database) locally to avoid frequent queries to the server for this state. This is set to false by default for MySQL-JDBC. |
convertNoneNanoSecsToDate |
Added | true | When the nanos parameter is set to 0 when calling the setTimestamp interface in Oracle mode, the parameter is converted to the Date type. |
oracleUseNumberForSetDouble |
New | false | For an Oracle tenant, whether to serialize the type of setDouble to the number type. |
lowercaseRoutinesInMetadata |
Added | true | Whether to use lowercase for the name of procedures and functions in metadata of an Oracle tenant. |
Fix defects
Here are the main fixes from this release:
- Fix error when connecting without importing the timezone table in Oracle mode.
- Fixed an issue where when calling a stored procedure across users, incorrect output parameter values were produced if the output parameters were not registered.
- Optimize the
getcolumnsinterface implementation to improve execution performance. - Fixed the issue where data is inconsistent when re-executing the stored procedure with incomplete data from the previous request.
- Fixed an issue where occasional type conversion failures could occur in nested arrays with CLOB data types
- Fix issues where frequent creation and closing of PreparedStatement leads to exceeding the cursor limit due to pstmts not being promptly closed after a cursor result set is created.
- Fixed the issue where the PS didn't close in the PS combination mode when the arraybinding failed.
- Fixed the issue where when only one row of data exists in the database and a combined protocol and cursor result set are used,
ResultSet.isAfterLast()returns the wrong result. - Fixed the issue where, when a function comment is a single string, the
getFunctionColumnsinterface returns an incorrect value. - Fixes errors on data truncation when the
jdbcCompliantTruncation=falseparameter is set. - Fix the error when using public synonyms across users.
- Fixed an issue where when
rewriteBatchedStatementsis set to true in MySQL mode and theon duplicate key updatestatement includes\n, the result ofgetGeneratedKeysis incorrect. - Fixed an issue where
executeBatchreturns an incorrect value when inserting two rows with the same value using theON DUPLICATE KEY UPDATEstatement. - Fixed the issue where anonymous arrays nested in a record cause an error with the JDBC driver indicating an unknown complex data type.
- Fixed incorrect statement concatenation when calling
setBlobwithuseServerPrepStmts=truein the MySQL mode. - Fixed the issue where the
releaseSavepointinterface in Oracle mode causes an interruption in HikariCP due to incompatibility between errCode and SqlState with Oracle. - Fixed a problem in Oracle mode where the out parameter is not properly registered, causing the get method to return incorrect result values.
- Fixes the issue where the PL returns the correct number of updated rows, but the client calculates it incorrectly.