pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial
https://pingcap.com
Apache License 2.0
36.27k stars 5.72k forks source link

infoschema: load auto id related changes for multi-schema-change diff | tidb-test=pr/2320 (#52967) #53008

Closed ti-chi-bot closed 2 weeks ago

ti-chi-bot commented 2 weeks ago

This is an automated cherry-pick of #52967

What problem does this PR solve?

Issue Number: close #47899

Problem Summary:

What changed and how does it work?

Check List

Tests

for the case in the issue

mysql>  create table t (a int not null auto_increment primary key, b int) auto_id_cache 100;insert into t (b) values (1);
Query OK, 0 rows affected (0.09 sec)

Query OK, 1 row affected (0.01 sec)

mysql> select * from t;
+---+------+
| a | b    |
+---+------+
| 1 |    1 |
+---+------+
1 row in set (0.00 sec)

mysql> alter table t add column c int, auto_increment 200;
Query OK, 0 rows affected (0.31 sec)

mysql> insert into t (b) values (2);
Query OK, 1 row affected (0.01 sec)

mysql> select * from t;
+-----+------+------+
| a   | b    | c    |
+-----+------+------+
|   1 |    1 | NULL |
| 200 |    2 | NULL |
+-----+------+------+
2 rows in set (0.00 sec)

Side effects

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None
ti-chi-bot[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, D3Hunter

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/pingcap/tidb/blob/release-8.1/OWNERS)~~ [Benjamin2037,D3Hunter] - ~~[pkg/ddl/OWNERS](https://github.com/pingcap/tidb/blob/release-8.1/pkg/ddl/OWNERS)~~ [Benjamin2037] - ~~[pkg/infoschema/OWNERS](https://github.com/pingcap/tidb/blob/release-8.1/pkg/infoschema/OWNERS)~~ [Benjamin2037,D3Hunter] - ~~[pkg/parser/OWNERS](https://github.com/pingcap/tidb/blob/release-8.1/pkg/parser/OWNERS)~~ [D3Hunter] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 2 weeks ago

[LGTM Timeline notifier]

Timeline:

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 74.41860% with 11 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (release-8.1@9930a02). Click here to learn what that means.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-8.1 #53008 +/- ## ================================================ Coverage ? 71.1385% ================================================ Files ? 1463 Lines ? 420634 Branches ? 0 ================================================ Hits ? 299233 Misses ? 100942 Partials ? 20459 ``` | [Flag](https://app.codecov.io/gh/pingcap/tidb/pull/53008/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/pingcap/tidb/pull/53008/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `71.1385% <74.4186%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/pingcap/tidb/pull/53008/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | Coverage Δ | | |---|---|---| | [dumpling](https://app.codecov.io/gh/pingcap/tidb/pull/53008/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `53.9957% <0.0000%> (?)` | | | [parser](https://app.codecov.io/gh/pingcap/tidb/pull/53008/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `∅ <0.0000%> (?)` | | | [br](https://app.codecov.io/gh/pingcap/tidb/pull/53008/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pingcap) | `40.9591% <0.0000%> (?)` | |
D3Hunter commented 2 weeks ago

/retest