ZDG-D opened a new issue, #15557: URL: https://github.com/apache/shardingsphere/issues/15557
## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. Please answer these questions before submitting your issue. Thanks! ### Which version of ShardingSphere did you use? 5.1.0 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-Proxy ### Expected behavior batch insertion into the mysql and query that has data ### Actual behavior batch insertion into the mysql and query that has no data ### Reason analyze (If you can) Query the database log and find that the SQL inserted in batch shows that the transaction is not committed. ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. Using : Mybatis-plus + ShardingSphere-Proxy, SQL like : insert into aiot_t_set_group(tenantId, setId, groupId,createTime,updateTime) values ('1003400', 134, 37, now(), now()), ('1003400', 136, 37, now(), now()), ('1003400', 137, 37, now(), now()), ('1003400', 138, 37, now(), now()); Sharding rule config: ``` - !SHARDING defaultDatabaseStrategy: standard: shardingAlgorithmName: database_inline shardingColumn: tenantId shardingAlgorithms: database_inline: type: HIM_USER tables: aiot_t_set_group: actualDataNodes: ds_${["1003400"]}.aiot_t_set_group logicTable: aiot_t_set_group ``` Mysql general log: --- At the beginning of execution ``` 2022-02-21T17:31:53.211744Z 489231 Query SELECT @@session.transaction_read_only 2022-02-21T17:31:53.257390Z 489231 Query insert into aiot_t_set_group(tenantId, setId, groupId,createTime,updateTime) values ('1003400', 134, 37, now(), now()), ('1003400', 136, 37, now(), now()), ('1003400', 137, 37, now(), now()), ('1003400', 138, 37, now(), now()); ``` ... The transaction was not committed after waiting for a long time --- After disconnecting ``` 2022-02-21T17:32:28.648088Z 489231 Query rollback 2022-02-21T17:32:28.653755Z 489231 Query SET autocommit=1 ``` The transaction is not configured in the code. This happens occasionally, but I use Navicat to connect sharding proxy, which can execute correctly and check the data. ### Example codes for reproduce this issue (such as a github link). -- 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]
