wsm12138 opened a new issue, #23820: URL: https://github.com/apache/shardingsphere/issues/23820
## 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? cf769d3200b0b9a6afe1e7dd210c50f486a8530a ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? Proxy ### Expected behavior ``` mysql> CREATE TABLE tb_user ( -> id INT AUTO_INCREMENT PRIMARY KEY , -> NAME VARCHAR ( 10 ) NOT NULL UNIQUE , -> age INT CHECK ( age > 0 and age <= 120 ) , -> STATUS CHAR ( 1 ) DEFAULT '1' , -> gender CHAR ( 1 ) -> ); Query OK, 0 rows affected (0.02 sec) mysql> show create table tb_user; +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tb_user | CREATE TABLE `tb_user` ( `id` int NOT NULL AUTO_INCREMENT, `NAME` varchar(10) NOT NULL, `age` int DEFAULT NULL, `STATUS` char(1) DEFAULT '1', `gender` char(1) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `NAME` (`NAME`), CONSTRAINT `tb_user_chk_1` CHECK (((`age` > 0) and (`age` <= 120))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci | +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) ``` ### Actual behavior ``` mysql> CREATE TABLE tb_user ( -> id INT AUTO_INCREMENT PRIMARY KEY , -> NAME VARCHAR ( 10 ) NOT NULL UNIQUE , -> age INT CHECK ( age > 0 and age <= 120 ) , -> STATUS CHAR ( 1 ) DEFAULT '1' , -> gender CHAR ( 1 ) -> ); Query OK, 0 rows affected (0.03 sec) mysql> mysql> show create table tb_user; +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tb_user | CREATE TABLE `tb_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(10) NOT NULL, `age` int(11) DEFAULT NULL, `STATUS` char(1) DEFAULT '1', `gender` char(1) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `NAME` (`NAME`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 | +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) ``` ### Reason analyze (If you can) ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. ### 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]
