FlyingZC commented on issue #12052:
URL: 
https://github.com/apache/shardingsphere/issues/12052#issuecomment-1308745346

   When the `ShardingSpherePreparedStatement` object is created, the 
`JDBCExecutor` object will be created at the same time, and the `serial` flag 
is judged by `connection.isHoldTransaction()`.
   So if execute `connection.setAutoCommit(false)` first, 
`connection.isHoldTransaction()` is true, and the `serial` flag is true.
   If execute `connection.prepareStatement()` first, 
`connection.isHoldTransaction()` is false, and the `serial` flag is false.


-- 
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]

Reply via email to