diff options
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_start_alter_7.result')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_start_alter_7.result | 302 |
1 files changed, 302 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_start_alter_7.result b/mysql-test/suite/rpl/r/rpl_start_alter_7.result new file mode 100644 index 00000000000..90dc582e665 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_start_alter_7.result @@ -0,0 +1,302 @@ +connect server_1,127.0.0.1,root,,,$SERVER_MYPORT_1; +connect server_2,127.0.0.1,root,,,$SERVER_MYPORT_2; +connect server_3,127.0.0.1,root,,,$SERVER_MYPORT_3; +connection server_1; +set global binlog_alter_two_phase=Yes; +set binlog_alter_two_phase=Yes; +connection server_2; +stop slave; +Warnings: +Note 1255 Slave already has been stopped +set global binlog_alter_two_phase=true; +connection server_3; +SET GLOBAL slave_parallel_threads=8; +set global slave_parallel_mode=optimistic; +set global gtid_strict_mode=1; +connection server_1; +set gtid_domain_id= 11; +create database s1; +use s1; +connect master_node,127.0.0.1,root,,$db_name, $M_port; +set gtid_domain_id= 11;; +connect slave_node,127.0.0.1,root,,test, $S_port; +set gtid_domain_id= 11;; +# myisam +connection master_node; +create table t1(a int, b int) engine=myisam;; +insert into t1 values(1,1); +insert into t1 values(2,2); +# Normal Alter +alter table t1 add column c int; +# Failed Alter +insert into t1 values(1,1, NULL); +alter table t1 change a a int unique ; +ERROR 23000: Duplicate entry '1' for key 'a' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +connection master_node; +drop table t1; +# innodb +connection master_node; +create table t1(a int, b int) engine=innodb;; +insert into t1 values(1,1); +insert into t1 values(2,2); +# Normal Alter +alter table t1 add column c int; +# Failed Alter +insert into t1 values(1,1, NULL); +alter table t1 change a a int unique ; +ERROR 23000: Duplicate entry '1' for key 'a' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +connection master_node; +drop table t1; +# aria +connection master_node; +create table t1(a int, b int) engine=aria;; +insert into t1 values(1,1); +insert into t1 values(2,2); +# Normal Alter +alter table t1 add column c int; +# Failed Alter +insert into t1 values(1,1, NULL); +alter table t1 change a a int unique ; +ERROR 23000: Duplicate entry '1' for key 'a' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +connection master_node; +drop table t1; +# concurrent alter Myisam +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +# concurrent alter Aria +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +# concurrent alter Innodb copy +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +# concurrent alter Innodb Inplace +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +connection server_1; +drop database s1; +select @@gtid_binlog_pos; +@@gtid_binlog_pos +11-1-403 +connection server_2; +set gtid_domain_id= 12; +create database s2; +use s2; +connect master_node,127.0.0.1,root,,$db_name, $M_port; +set gtid_domain_id= 12;; +connect slave_node,127.0.0.1,root,,test, $S_port; +set gtid_domain_id= 12;; +# myisam +connection master_node; +create table t1(a int, b int) engine=myisam;; +insert into t1 values(1,1); +insert into t1 values(2,2); +# Normal Alter +alter table t1 add column c int; +# Failed Alter +insert into t1 values(1,1, NULL); +alter table t1 change a a int unique ; +ERROR 23000: Duplicate entry '1' for key 'a' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +connection master_node; +drop table t1; +# innodb +connection master_node; +create table t1(a int, b int) engine=innodb;; +insert into t1 values(1,1); +insert into t1 values(2,2); +# Normal Alter +alter table t1 add column c int; +# Failed Alter +insert into t1 values(1,1, NULL); +alter table t1 change a a int unique ; +ERROR 23000: Duplicate entry '1' for key 'a' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +connection master_node; +drop table t1; +# aria +connection master_node; +create table t1(a int, b int) engine=aria;; +insert into t1 values(1,1); +insert into t1 values(2,2); +# Normal Alter +alter table t1 add column c int; +# Failed Alter +insert into t1 values(1,1, NULL); +alter table t1 change a a int unique ; +ERROR 23000: Duplicate entry '1' for key 'a' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +connection master_node; +drop table t1; +# concurrent alter Myisam +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +# concurrent alter Aria +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +# concurrent alter Innodb copy +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +# concurrent alter Innodb Inplace +# Concurrent DML +# Rollback tests +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +ERROR 23000: Duplicate entry '2' for key 'b' +connection server_2; +drop database s2; +select @@gtid_binlog_pos; +@@gtid_binlog_pos +12-2-403 +connection server_3; +start all slaves; +Warnings: +Note 1937 SLAVE 'm2' started +Note 1937 SLAVE 'm1' started +set default_master_connection = 'm1'; +include/wait_for_slave_to_start.inc +set default_master_connection = 'm2'; +include/wait_for_slave_to_start.inc +set default_master_connection = 'm1'; +include/sync_with_master_gtid.inc +set default_master_connection = 'm2'; +include/sync_with_master_gtid.inc +# cleanup +connection server_3; +set default_master_connection = 'm1'; +include/stop_slave.inc +set default_master_connection = 'm2'; +include/stop_slave.inc +set global slave_parallel_threads = 0;; +set global slave_parallel_mode = optimistic;; +set global gtid_strict_mode = 0;; +set global gtid_domain_id= 0; +reset master; +RESET SLAVE ALL; +SET GLOBAL gtid_slave_pos= ''; +connection server_1; +set global binlog_alter_two_phase=No;; +set global gtid_domain_id= 0; +reset master; +connection server_2; +set global gtid_domain_id= 0; +set global binlog_alter_two_phase=No;; +reset master; +disconnect server_1; +disconnect server_2; +disconnect server_3; |