Details
Description
Hi,
We encounter sequence object issue as MDEV-27120. Then, trying to set
wsrep_auto_increment_control=OFF
|
auto_increment_increment=3
|
auto_increment_offset=1|2|3
|
However, got another issue in another application using auto-increment.
auto_increment_increment and auto_increment_offset reset to 1 in current session after alter table with auto-increment column. Reconnect DB will get back correct setting.
Below see below example:
MariaDB [testdb1]> show variables like 'auto_increment%' ;
|
+--------------------------+-------+
|
| Variable_name | Value |
|
+--------------------------+-------+
|
| auto_increment_increment | 3 |
|
| auto_increment_offset | 2 |
|
+--------------------------+-------+
|
2 rows in set (0.001 sec)
|
|
MariaDB [testdb1]>
|
MariaDB [testdb1]>
|
MariaDB [testdb1]> create table t4 (c1 int primary key auto_increment) ;
|
Query OK, 0 rows affected (0.009 sec)
|
|
MariaDB [testdb1]>
|
MariaDB [testdb1]>
|
MariaDB [testdb1]> show variables like 'auto_increment%' ;
|
+--------------------------+-------+
|
| Variable_name | Value |
|
+--------------------------+-------+
|
| auto_increment_increment | 3 |
|
| auto_increment_offset | 2 |
|
+--------------------------+-------+
|
2 rows in set (0.001 sec)
|
|
MariaDB [testdb1]>
|
MariaDB [testdb1]>
|
MariaDB [testdb1]> alter table t4 add (c2 varchar(50)) ;
|
Query OK, 0 rows affected (0.006 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
|
MariaDB [testdb1]>
|
MariaDB [testdb1]>
|
MariaDB [testdb1]> show variables like 'auto_increment%' ;
|
+--------------------------+-------+
|
| Variable_name | Value |
|
+--------------------------+-------+
|
| auto_increment_increment | 1 |
|
| auto_increment_offset | 1 |
|
+--------------------------+-------+
|
2 rows in set (0.001 sec)
|
|
MariaDB [testdb1]>
|
MariaDB [testdb1]>
|
MariaDB [testdb1]>
|