Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-12836 Avoid table rebuild when removing of auto_increment settings
Field::is_equal(): treat old type and new one without AUTO_INCREMENT as equal Closes #1208
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| create table t(id int primary key, a int) engine=InnoDB; | ||
| insert into t (id, a) values (1, 1); | ||
| alter table t modify column id int auto_increment; | ||
| check table t; | ||
| Table Op Msg_type Msg_text | ||
| test.t check status OK | ||
| insert into t (a) values (2); | ||
| alter table t modify column id int, algorithm=instant; | ||
| check table t; | ||
| Table Op Msg_type Msg_text | ||
| test.t check status OK | ||
| insert into t (id, a) values (3, 3); | ||
| select * from t; | ||
| id a | ||
| 1 1 | ||
| 2 2 | ||
| 3 3 | ||
| check table t; | ||
| Table Op Msg_type Msg_text | ||
| test.t check status OK | ||
| drop table t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --source include/have_innodb.inc | ||
|
|
||
| create table t(id int primary key, a int) engine=InnoDB; | ||
| insert into t (id, a) values (1, 1); | ||
| alter table t modify column id int auto_increment; | ||
| check table t; | ||
| insert into t (a) values (2); | ||
| alter table t modify column id int, algorithm=instant; | ||
| check table t; | ||
| insert into t (id, a) values (3, 3); | ||
| select * from t; | ||
| check table t; | ||
| drop table t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters