GuiwenChen commented on issue #35245: URL: https://github.com/apache/shardingsphere/issues/35245#issuecomment-2831787535
1. mysql 5.7.35 2. Create a database using ‘CREATE DATABASE xxx DEFAULT CHARSET utf8mb4;’. 3. Create two tables, the log: ``` mysql> show tables; Empty set (0.01 sec) mysql> CREATE TABLE `customer` ( -> `company_id` bigint(20) NOT NULL, -> `id` bigint(20) NOT NULL, -> `is_deleted` bit(1) NOT NULL, -> `synced_id` bigint(20) NOT NULL, -> PRIMARY KEY (`company_id`,`id`), -> KEY `idx_customer_synced_id` (`company_id`,`is_deleted`,`synced_id`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; Query OK, 0 rows affected (0.04 sec) mysql> show tables; +---------------------------+ | Tables_in_account_system2 | +---------------------------+ | customer | +---------------------------+ 1 row in set (0.00 sec) mysql> CREATE TABLE `order_item` ( -> `company_id` bigint(20) NOT NULL, -> `id` bigint(20) NOT NULL, -> `order_id` bigint(20) DEFAULT NULL, -> `customer_company_id` bigint(20) DEFAULT NULL, -> `customer_id` bigint(20) DEFAULT NULL, -> PRIMARY KEY (`company_id`,`id`), -> KEY `idx_order_item_company_order_id` (`company_id`,`order_id`), -> KEY `FKg11wcg7bs8o3931hl5t2n44tr` (`customer_company_id`,`customer_id`), -> CONSTRAINT `FKg11wcg7bs8o3931hl5t2n44tr` FOREIGN KEY (`customer_company_id`, `customer_id`) REFERENCES `customer` (`company_id`, `id`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ERROR 1050 (42S01): Table 'customer' already exists mysql> show tables; +---------------------------+ | Tables_in_account_system2 | +---------------------------+ | customer | +---------------------------+ 1 row in set (0.00 sec) ``` -- 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: notifications-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org