-
Notifications
You must be signed in to change notification settings - Fork 101
lightning: fix id allocator base for double auto_increment field #1178
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 602d10b
|
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #1185. |
In response to a cherrypick label: new pull request created: #1186. |
In response to a cherrypick label: new pull request created: #1187. |
// | ||
// See: https://github.com/pingcap/tidb/blob/47f0f15b14ed54fc2222f3e304e29df7b05e6805/executor/insert_common.go#L781-L852 | ||
// TODO: merge this with pkg/lightning/backend/kv/sql2kv.go | ||
func getAutoRecordID(d types.Datum, target *types.FieldType) int64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make the function getAutoRecordID
in the TiDB repo be a public interface to avoid further inconsistent behaviors.
What problem does this PR solve?
Fix the bug that lightning will got invalid auto_increment base if the corresponding auto_increment field is double/float.
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release note