lmhmhl commented on pull request #9557:
URL: https://github.com/apache/shardingsphere/pull/9557#issuecomment-789463550


   Hi @tristaZero ,the thing is that because of primary key violation, then I 
delete the primary key of a sharding table, my sql
   statement is ` select o.order_id_sharding, i.order_id from 
t_order_calcite_sharding o, t_order_item_calcite_sharding i where 
o.order_id_sharding = i.item_id;` where `order_id_sharding` is the primary key 
before, the weird thing is there are a lot of repeated record like  follows
   ![Uploading Screen Shot 2021-03-03 at 2.07.58 PM.png…]()
   
   
   ```
   CREATE TABLE IF NOT EXISTS t_order_calcite_sharding_0 (order_id_sharding INT 
NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL);
   CREATE TABLE IF NOT EXISTS t_order_calcite_sharding_1 (order_id_sharding INT 
NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL);
   ```
   ```
   CREATE TABLE IF NOT EXISTS t_order_item_calcite_sharding_0 (item_id INT NOT 
NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, 
remarks VARCHAR(45) NULL, PRIMARY KEY (item_id));
   CREATE TABLE IF NOT EXISTS t_order_item_calcite_sharding_1 (item_id INT NOT 
NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, 
remarks VARCHAR(45) NULL, PRIMARY KEY (item_id));
   ```
   ```
   INSERT INTO t_order_calcite_sharding_0 VALUES(1010, 10, 'init');
   INSERT INTO t_order_calcite_sharding_1 VALUES(1011, 11, 'init');
   INSERT INTO t_order_calcite_sharding_0 VALUES(1100, 10, 'init');
   INSERT INTO t_order_calcite_sharding_1 VALUES(1101, 11, 'init');
   ```
   ```
   INSERT INTO t_order_item_calcite_sharding_0 VALUES(1000, 10000, 10, 'init', 
't_order_item_calcite_sharding');
   INSERT INTO t_order_item_calcite_sharding_1 VALUES(1001, 10001, 11, 'init', 
't_order_item_calcite_sharding');
   INSERT INTO t_order_item_calcite_sharding_0 VALUES(1010, 10001, 10, 'init', 
't_order_item_calcite_sharding');
   INSERT INTO t_order_item_calcite_sharding_1 VALUES(1011, 10001, 10, 'init', 
't_order_item_calcite_sharding');
   
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to