thswlsqls opened a new issue, #39133: URL: https://github.com/apache/shardingsphere/issues/39133
## Bug Report ### Which version of ShardingSphere did you use? master @ 7568693e8ee ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? Proxy ### Expected behavior Starting a Firebird transaction whose transaction parameter buffer selects SERIALIZABLE (consistency) isolation, or carries no isolation flag, resolves the isolation level and starts the transaction. ### Actual behavior `FirebirdStartTransactionPacket.getIsolationLevel()` throws `NullPointerException`, so every start-transaction request that is not concurrency/read-committed fails. ### Reason analyze (If you can) In `FirebirdStartTransactionPacket.getIsolationLevel()` (database/protocol/dialect/firebird/.../transaction/FirebirdStartTransactionPacket.java, lines 70 and 73), `tpb.getValue(CONCURRENCY)` and `tpb.getValue(CONSISTENCY)` are unboxed directly to `boolean`. These are BOOLEAN-format TPB flags: `FirebirdParameterBuffer.parseValue()` stores `true` only when the flag is present, otherwise the key is absent and `getValue` returns `null`, causing an unboxing NPE. The sibling checks (`READ_COMMITTED` line 67, `isAutoCommit` line 49, `isReadOnly` line 58) already guard with `null !=`; these two lines should do the same. ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. Start a Firebird transaction with a consistency-only TPB (SERIALIZABLE), or with no isolation flag. `FirebirdStartTransactionCommandExecutor.execute()` calls `packet.getIsolationLevel()` and the NPE is raised. ### Example codes for reproduce this issue (such as a github link). N/A -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
