Commit c6a890a7 authored by Jan Lindström's avatar Jan Lindström

MDEV-19353 : Alter Sequence do not replicate to another nodes with in Galera Cluster

Galera replication of new DDL-case was missing
parent 2ead5bd9
connection node_2;
connection node_1;
connection node_1;
CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB;
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
connection node_2;
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
connection node_1;
ALTER SEQUENCE seq MAXVALUE = 10000;
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
connection node_2;
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
connection node_1;
DROP SEQUENCE seq;
SHOW CREATE SEQUENCE seq;
ERROR 42S02: Table 'test.seq' doesn't exist
connection node_2;
SHOW CREATE SEQUENCE seq;
ERROR 42S02: Table 'test.seq' doesn't exist
--source include/galera_cluster.inc
--connection node_1
CREATE SEQUENCE `seq` start with 1 minvalue 1 maxvalue 1000000 increment by 0 cache 1000 nocycle ENGINE=InnoDB;
SHOW CREATE SEQUENCE seq;
--connection node_2
SHOW CREATE SEQUENCE seq;
--connection node_1
ALTER SEQUENCE seq MAXVALUE = 10000;
SHOW CREATE SEQUENCE seq;
--connection node_2
SHOW CREATE SEQUENCE seq;
--connection node_1
DROP SEQUENCE seq;
--error ER_NO_SUCH_TABLE
SHOW CREATE SEQUENCE seq;
--connection node_2
--error ER_NO_SUCH_TABLE
SHOW CREATE SEQUENCE seq;
......@@ -908,6 +908,13 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
if (check_grant(thd, ALTER_ACL, first_table, FALSE, 1, FALSE))
DBUG_RETURN(TRUE); /* purecov: inspected */
#ifdef WITH_WSREP
if (WSREP_ON && WSREP(thd) &&
wsrep_to_isolation_begin(thd, first_table->db.str,
first_table->table_name.str,
first_table))
DBUG_RETURN(TRUE);
#endif /* WITH_WSREP */
if (if_exists())
thd->push_internal_handler(&no_such_table_handler);
error= open_and_lock_tables(thd, first_table, FALSE, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment