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-27123 : auto_increment_increment and auto_increment_offset reset…
… to 1 in current session after alter table on auto-increment column Problem was that in ALTER TABLE execution variables were set to 1 even when wsrep_auto_increment_control is OFF. We should set them only when wsrep_auto_increment_control is ON.
- Loading branch information
Jan Lindström
committed
Oct 9, 2022
1 parent
7be82a1
commit ab3ec01
Showing
4 changed files
with
39 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,17 @@ | ||
| connection node_2; | ||
| connection node_1; | ||
| show variables like 'auto_increment%'; | ||
| Variable_name Value | ||
| auto_increment_increment 3 | ||
| auto_increment_offset 3 | ||
| create table t4 (c1 int primary key auto_increment) engine=innodb; | ||
| show variables like 'auto_increment%'; | ||
| Variable_name Value | ||
| auto_increment_increment 3 | ||
| auto_increment_offset 3 | ||
| alter table t4 add (c2 varchar(50)); | ||
| show variables like 'auto_increment%'; | ||
| Variable_name Value | ||
| auto_increment_increment 3 | ||
| auto_increment_offset 3 | ||
| DROP TABLE t4; |
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,2 @@ | ||
| --wsrep_auto_increment_control=OFF --auto_increment_increment=3 --auto_increment_offset=3 | ||
|
|
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,8 @@ | ||
| --source include/galera_cluster.inc | ||
|
|
||
| show variables like 'auto_increment%'; | ||
| create table t4 (c1 int primary key auto_increment) engine=innodb; | ||
| show variables like 'auto_increment%'; | ||
| alter table t4 add (c2 varchar(50)); | ||
| show variables like 'auto_increment%'; | ||
| DROP TABLE t4; |
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