You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/08/20 01:55:46 UTC

[GitHub] [incubator-shardingsphere] 1071746754 opened a new issue #2896: 字段值为空时,分布式主键id赋值错误

1071746754 opened a new issue #2896: 字段值为空时,分布式主键id赋值错误
URL: https://github.com/apache/incubator-shardingsphere/issues/2896
 
 
   现象:
   4.0.0-RC1版本,当我插入的数据中,有一个字段是null的时候,自动生成的主键id赋值到了其他字段。例如我要插入INSERT INTO user (name, remark, age)  VALUES ("test", null, 18),经过sharding处理之后变成了INSERT INTO user (name, remark, age)  VALUES ("test", 18, null)
   
   分析:
   InsertOptimizeResultUnit类中的getCurrentIndex方法有问题,当获取当前index下标的时候判断有问题。这里感觉不需要在重新计算一次当前下表了,根据前面的字段数量即可知道当前下标量了

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