Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.1.4
-
None
-
Database:
AWS RDS MariaDB 10.5.21 with RDS Proxy
Application:
SpringBoot 2.7
MariaDB Connector 3.1.4
Base docker image:
adoptopenjdk/openjdk11-openj9:jre
Description
We are encountering occasional NPE in production environment.
When our spring based application starts to create transaction and set auto commit to false (which is calling `Connection.setAutoCommit()`), NPE is thrown in https://github.com/mariadb-corporation/mariadb-connector-j/blob/3.1.4/src/main/java/org/mariadb/jdbc/message/server/OkPacket.java#L52C19-L52C19
Given line 51, `database` is possible to be null while in line 52 it's trying to invoke `database.isEmpty()`, therefore NPE is thrown.
In addition, may I ask why calling `Connection.setAutoCommit()` can result in having `StateChange.SESSION_TRACK_SCHEMA` in the OkPacket?
and in what situation `StateChange.SESSION_TRACK_SCHEMA` will be returned but the subsequent data will be null?