Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Generally ALTER SEQUENCE allows one to change any values for a SEQUENCE created with CREATE SEQUENCE.
https://mariadb.com/kb/en/library/alter-sequence/
While within Galera Cluster , ALTER SEQUENCE is only effective on Master node where it got executed , doesn't get replicated to another node of Galera cluster.
On Node-01 :
|
MariaDB [test]> SHOW CREATE SEQUENCE seq;
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
| seq | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.001 sec)
|
|
On Node-01
|
MariaDB [test]> ALTER SEQUENCE seq MAXVALUE = 10000 ;
|
Query OK, 0 rows affected (0.001 sec)
|
|
|
MariaDB [test]> SHOW CREATE SEQUENCE seq;
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
| seq | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 10000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|
|
On Node-02
|
MariaDB [test]> SHOW CREATE SEQUENCE seq;
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
| seq | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.001 sec)
|
|
On Node-03
|
MariaDB [test]> SHOW CREATE SEQUENCE seq;
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
| seq | CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB |
|
+-------+----------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|
|
While DROP SEQUENCE is working fine, gets replicated across the nodes with in Galera Cluster.