dunianbing opened a new issue, #32468:
URL: https://github.com/apache/shardingsphere/issues/32468

   ## Bug Report
   In ShardingSpherePreparedStatement,settings of Statements will be recorded 
first and will be replayed on actual JDBC PreparedStatement after it is 
acquired. For exeample, in cacheStatements(...) method, replay() method will be 
called for method replay. As a result, in PreparedStatement scenarios, when 
executing executeQuery()、executeUpdate()、execute() methods, replay action will  
take effect.
   
   But in  batch executor scenarios, methods on statement object are not 
replyed. Related code is at initBatchPreparedStatementExecutor(...) method.
   
[Why+are+methods+not+replayed+on+the+PreparedStatement+object+in+batch+executor+scenarios_.pdf](https://github.com/user-attachments/files/16576836/Why%2Bare%2Bmethods%2Bnot%2Breplayed%2Bon%2Bthe%2BPreparedStatement%2Bobject%2Bin%2Bbatch%2Bexecutor%2Bscenarios_.pdf)
   
   If there is no ShardingSphere-JDBC, such as MyBatis only, when executing 
executeBatch() method,  settings of PreparedStatement object will take effect, 
involving setMaxFieldSize、setQueryTimeout, etc.
   
   I would like to confirm whether this is by design or a flaw.
   
   ### Which version of ShardingSphere did you use?
   Shardingsphere 5.1.0  and  5.5.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   Settings of PreparedStatement object is valid in batch executor scenarios.
   
   ### Actual behavior
   Settings of PreparedStatement object is not valid in batch executor 
scenarios.
   
   ### Reason analyze (If you can)
    As above.
   
   


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