-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lightning: support null value for auto-incr column on local backend #34552
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. |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/b487c521d1e180726512b1971968b9babf9aad11 |
/cc @gozssky @D3Hunter PTAL |
@dsdashun: GitHub didn't allow me to request PR reviews from the following users: PTAL. Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
* also enhance the test according to the comments
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.
rest LGTM
* Added some UT to test the `getActualDatum()`
* add some 'not_contains' check on zero id value
Co-authored-by: Yujie Xia <xiayjchn@gmail.com>
/run-integration-br-test |
/run-check_dev_2 |
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.
rest lgtm
current behavior looks odd to me, in data file it's what's current behavior for case below: table is
|
@D3Hunter TiDB supports insert mysql> create table t(id int primary key auto_increment, v varchar(10));
Query OK, 0 rows affected (0.12 sec)
mysql> insert into t values (1, 'aaa');
Query OK, 1 row affected (0.03 sec)
mysql> insert into t values (NULL, 'bbb');
Query OK, 1 row affected (0.02 sec)
mysql> insert into t values (NULL, 'ccc');
Query OK, 1 row affected (0.01 sec)
mysql> insert into t values (2, 'ddd');
ERROR 1062 (23000): Duplicate entry '2' for key 'PRIMARY'
mysql> select * from t;
+----+------+
| id | v |
+----+------+
| 1 | aaa |
| 2 | bbb |
| 3 | ccc |
+----+------+
3 rows in set (0.01 sec) For local backend, we need to enable |
/run-integration-br-test |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: f5efbc9
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-6.0 in PR #34595 |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: close #34208
Problem Summary:
What is changed and how it works?
When encoding the SQL into a TiDB KV for importing, if the value is NULL in a 'not-null' column, go on further processing on special column types rather than convert those NULL values into zero values directly
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.