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 03:51:34 UTC
[GitHub] [incubator-shardingsphere] 1071746754 opened a new issue #2897:
Distributed primary key ID assignment error when field value is empty
1071746754 opened a new issue #2897: Distributed primary key ID assignment error when field value is empty
URL: https://github.com/apache/incubator-shardingsphere/issues/2897
Phenomena:
In version 4.0.0-RC1, when one field in the data I inserted was null, the automatically generated primary key ID was assigned to other fields. For example, I want to insert INSERT INTO user (name, remark, age) VALUES ("test", "null, 18"), after sharding, it becomes INSERT INTO user (name, remark, age, id) VALUES ("test", "18", "automatically generated primary key id", null)
Analysis:
The **getCurrentIndex** method in the **InsertOptimizeResultUnit** class has problems, and judgment is problematic when obtaining the current index subscript. There is no need to recalculate the current table below. The current scale is known by the number of fields in front of it.
----------------------------------------------------------------
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