You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/03/26 02:49:51 UTC

[GitHub] [incubator-shardingsphere] windyii opened a new issue #2092: Update sharding key is allowed but not work

windyii opened a new issue #2092: Update sharding key is allowed but not work
URL: https://github.com/apache/incubator-shardingsphere/issues/2092
 
 
   ## Bug Report
   Update sharding key is allowed in Sharding-Proxy. The new value may not be routed to the same backend as the old one. So this kind sql should not be allowed.
   
   ### Which version of ShardingSphere did you use?
   ShardingSphere 4.0.0RC1
   
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-Proxy
   
   ### Expected behavior
   Sharding table test1 by column ‘k’ % 2
   1. insert into test1(k, c) values ( 1,  'a');
   2. select * from test1 where k=1;
     1 rows in set
   3. update test1 set k=2 where k=1;
   4. select * from test1 where k=2;
     1 rows in set
   
   ### Actual behavior
   4. select * from test1 where k=2;
     Empty set
   
   ### Reason analyze (If you can)
   Update sharding key should keep the route as old key but ShardingProxy doesn't check it. Just disallow that kind sql should be ok.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services