strongduanmu opened a new issue #13971: URL: https://github.com/apache/shardingsphere/issues/13971
## Bug Report ### Which version of ShardingSphere did you use? https://github.com/apache/shardingsphere/commit/bd1ce08f0d070b0541fe4a1b98a1664b6b6ac660 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-Proxy ### Expected behavior Use transaction normally. ### Actual behavior ```sql mysql> BEGIN; Query OK, 0 rows affected (0.07 sec) mysql> INSERT INTO t_order(order_id, user_id, status) VALUES(1, 1, 'OK'), (2, 1, 'DOWN'); ERROR 1815 (HY000): Internal error: javax.transaction.SystemException: There is no registered resource that can recover the given XAResource instance. Please register a corresponding resource first. ``` ### Reason analyze (If you can) ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. Use Proxy, only configure `server.yaml`, and do not configure any sharding rules, then create sharding rules and sharding tables through distsql. ```sql CREATE DATABASE sharding_db; ADD RESOURCE ds_0 ( HOST=127.0.0.1, PORT=3306, DB=demo_ds_0, USER=root, PASSWORD=123456 ); ADD RESOURCE ds_1 ( HOST=127.0.0.1, PORT=3306, DB=demo_ds_1, USER=root, PASSWORD=123456 ); CREATE SHARDING TABLE RULE t_order( RESOURCES(ds_0,ds_1), SHARDING_COLUMN=order_id, TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)), GENERATED_KEY(COLUMN=order_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123))) ); CREATE TABLE `t_order` ( `order_id` int NOT NULL, `user_id` int NOT NULL, `status` varchar(45) DEFAULT NULL, PRIMARY KEY (`order_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; BEGIN; INSERT INTO t_order(order_id, user_id, status) VALUES(1, 1, 'OK'), (2, 1, 'DOWN'); ``` ### 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]
