hua74ni opened a new issue, #26012: URL: https://github.com/apache/shardingsphere/issues/26012
## 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.2.1 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Expected behavior Execute a single table SQL Select *, MySQL table dictionary (5 fields), table dictionary add a field (such as test, 6 fields), service restart execution dictionary select * or keep reporting errors, cannot be automatically repaired, I need to delete the zk node to not report an error. ### Actual behavior service restart execution dictionary select * or keep reporting errors, cannot be automatically repaired, I need to delete the zk node to not report an error. ### Reason analyze (If you can) The shardingsphere zk metadata table DDL is inconsistent with mysql and is not automatically updated ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. Start with table `dictionary` DDL: ``` CREATE TABLE `dictionary` ( `id` char(36) NOT NULL COMMENT '主键id', `name` varchar(63) NOT NULL COMMENT 'canal服务节点名称', `code` varchar(63) NOT NULL COMMENT 'canal服务节点ip', `time_create` bigint(20) NOT NULL COMMENT '创建时间', `time_update` bigint(20) NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='字典表'; ``` Start the service, Execute `dictionary` SQL: `select * from dictionary where id=:id` The MySQL dictionary table has a new field `test`: `ALTER TABLE dictionary ADD test VARCHAR(36) DEFAULT 'abc123' AFTER time_create;` changed `dictionary` DDL: ``` CREATE TABLE `dictionary` ( `id` char(36) NOT NULL COMMENT '主键id', `name` varchar(63) NOT NULL COMMENT 'canal服务节点名称', `code` varchar(63) NOT NULL COMMENT 'canal服务节点ip', `time_create` bigint(20) NOT NULL COMMENT '创建时间', `test` varchar(36) DEFAULT 'abc123', `time_update` bigint(20) NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='字典表'; ``` Adjust the code and Restart the service, Execute `dictionary` SQL: `select * from dictionary where id=:id` Shardingsphere reported an error: ``` ``` ### 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]
