You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
@dunianbing The logic of Batch is more complex and has its own execution logic. In addition, did you encounter any problems? Did the execution report an error or the result was not as expected?
@strongduanmu For example, regarding the statement's queryTimeout, the phenomenon is that SQL execution is not canceled after exceeding the set time, , and at the same time, the overall duration of the batch execution also increases.
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
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.
The text was updated successfully, but these errors were encountered: