diff options
Diffstat (limited to 'mysql-test/suite/rpl/r')
57 files changed, 1453 insertions, 258 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_000011.result b/mysql-test/suite/rpl/r/rpl_000011.result index 136a6a3aacb..eb0d89bd3cb 100644 --- a/mysql-test/suite/rpl/r/rpl_000011.result +++ b/mysql-test/suite/rpl/r/rpl_000011.result @@ -1,15 +1,13 @@ include/master-slave.inc [connection master] +connection slave; +connection master; create table t1 (n int); insert into t1 values(1); connection slave; -show global status like 'com_insert'; -Variable_name Value -Com_insert 1 +# Com_insert = 1 stop slave; -show global status like 'com_insert'; -Variable_name Value -Com_insert 1 +# Com_insert = 1 include/wait_for_slave_to_stop.inc start slave; include/wait_for_slave_to_start.inc diff --git a/mysql-test/suite/rpl/r/rpl_alter_instant.result b/mysql-test/suite/rpl/r/rpl_alter_instant.result new file mode 100644 index 00000000000..35380fdeddf --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_alter_instant.result @@ -0,0 +1,66 @@ +include/master-slave.inc +[connection master] +use test; +create table t1 (id int primary key, c1 int default 10, c2 varchar(20) default 'holiday') engine = innodb; +insert into t1 values(1, 12345, 'abcde'), (2, default, default), (3, 23456, 'xyzab'); +set time_zone='+03:00'; +set timestamp = 1; +alter table t1 add column d1 timestamp not null default current_timestamp; +select * from t1; +id c1 c2 d1 +1 12345 abcde 1970-01-01 03:00:01 +2 10 holiday 1970-01-01 03:00:01 +3 23456 xyzab 1970-01-01 03:00:01 +connection slave; +connection slave; +set time_zone='+03:00'; +select * from t1; +id c1 c2 d1 +1 12345 abcde 1970-01-01 03:00:01 +2 10 holiday 1970-01-01 03:00:01 +3 23456 xyzab 1970-01-01 03:00:01 +connection master; +alter table t1 add column d2 timestamp not null default current_timestamp, ALGORITHM=copy; +connection slave; +connection slave; +select * from t1; +id c1 c2 d1 d2 +1 12345 abcde 1970-01-01 03:00:01 1970-01-01 03:00:01 +2 10 holiday 1970-01-01 03:00:01 1970-01-01 03:00:01 +3 23456 xyzab 1970-01-01 03:00:01 1970-01-01 03:00:01 +connection master; +drop table t1; +create table t4 (id int primary key, c2 int); +insert into t4 values(1,1),(2,2),(3,3); +set timestamp = 1000; +alter table t4 add column (c3 datetime default current_timestamp(), c4 timestamp not null default current_timestamp()); +select * from t4; +id c2 c3 c4 +1 1 1970-01-01 03:16:40 1970-01-01 03:16:40 +2 2 1970-01-01 03:16:40 1970-01-01 03:16:40 +3 3 1970-01-01 03:16:40 1970-01-01 03:16:40 +alter table t4 add column c5 time not null default current_timestamp(); +Warnings: +Note 1265 Data truncated for column 'c5' at row 1 +Note 1265 Data truncated for column 'c5' at row 2 +Note 1265 Data truncated for column 'c5' at row 3 +alter table t4 add column c6 date not null default current_timestamp(); +Warnings: +Note 1265 Data truncated for column 'c6' at row 1 +Note 1265 Data truncated for column 'c6' at row 2 +Note 1265 Data truncated for column 'c6' at row 3 +select * from t4; +id c2 c3 c4 c5 c6 +1 1 1970-01-01 03:16:40 1970-01-01 03:16:40 03:16:40 1970-01-01 +2 2 1970-01-01 03:16:40 1970-01-01 03:16:40 03:16:40 1970-01-01 +3 3 1970-01-01 03:16:40 1970-01-01 03:16:40 03:16:40 1970-01-01 +connection slave; +connection slave; +select * from t4; +id c2 c3 c4 c5 c6 +1 1 1970-01-01 03:16:40 1970-01-01 03:16:40 03:16:40 1970-01-01 +2 2 1970-01-01 03:16:40 1970-01-01 03:16:40 03:16:40 1970-01-01 +3 3 1970-01-01 03:16:40 1970-01-01 03:16:40 03:16:40 1970-01-01 +connection master; +drop table t4; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result index eb4e45ad28e..4c667bd7f5a 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result @@ -174,7 +174,7 @@ SET SQL_LOG_BIN=1; SET @@global.debug_dbug=@old_debug; ###################### TEST #10 call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file."); -call mtr.add_suppression("Could not open .*"); +call mtr.add_suppression("Could not use .*"); RESET MASTER; SHOW WARNINGS; Level Code Message @@ -234,7 +234,7 @@ include/rpl_reset.inc connection slave; call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*"); call mtr.add_suppression("Error writing file .*"); -call mtr.add_suppression("Could not open .*"); +call mtr.add_suppression("Could not use .*"); call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file."); call mtr.add_suppression("Can't generate a unique log-filename .*"); ###################### TEST #13 diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 0c780122e38..3f01c80b195 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -11,8 +11,8 @@ grant select on t to x@y; rollback; show grants for x@y; Grants for x@y -GRANT USAGE ON *.* TO 'x'@'y' -GRANT SELECT ON `d1`.`t` TO 'x'@'y' +GRANT USAGE ON *.* TO `x`@`y` +GRANT SELECT ON `d1`.`t` TO `x`@`y` start transaction; insert into t values (2); revoke select on t from x@y; @@ -23,7 +23,7 @@ s1 2 show grants for x@y; Grants for x@y -GRANT USAGE ON *.* TO 'x'@'y' +GRANT USAGE ON *.* TO `x`@`y` drop user x@y; drop database d1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_blackhole.result b/mysql-test/suite/rpl/r/rpl_blackhole.result index 178c23b9f98..a87ba9a9d2d 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole.result @@ -42,6 +42,8 @@ COUNT(*) >>> Something was written to binary log <<< connection master; ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b); +Warnings: +Warning 1280 Name 'pk_t1' ignored for PRIMARY key. connection slave; connection master; INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4); diff --git a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result index 8852ae97aa8..2e75080810b 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result @@ -47,6 +47,8 @@ COUNT(*) >>> Something was written to binary log <<< connection master; ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b); +Warnings: +Warning 1280 Name 'pk_t1' ignored for PRIMARY key. connection slave; connection master; INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4); @@ -228,7 +230,7 @@ ALTER TABLE t1 ENGINE=BLACKHOLE #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 trans /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -237,6 +239,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +# Number of rows: 4 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -245,7 +248,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 trans /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -254,6 +257,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +# Number of rows: 4 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -262,7 +266,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 trans /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -271,6 +275,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F +# Number of rows: 2 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -279,7 +284,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 trans /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -288,6 +293,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F +# Number of rows: 2 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -296,7 +302,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 trans /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -305,6 +311,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +# Number of rows: 4 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -321,7 +328,7 @@ ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 trans /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -330,6 +337,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +# Number of rows: 4 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -338,7 +346,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 trans /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -347,6 +355,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F +# Number of rows: 2 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -355,7 +364,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-11 trans /*!100001 SET @@session.gtid_seq_no=11*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -364,6 +373,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F +# Number of rows: 2 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -380,7 +390,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-13 trans /*!100001 SET @@session.gtid_seq_no=13*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -389,6 +399,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +# Number of rows: 4 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -397,7 +408,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-14 trans /*!100001 SET @@session.gtid_seq_no=14*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -406,6 +417,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F +# Number of rows: 2 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -414,7 +426,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-15 trans /*!100001 SET @@session.gtid_seq_no=15*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -423,6 +435,7 @@ BEGIN #010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F +# Number of rows: 2 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_charset.result b/mysql-test/suite/rpl/r/rpl_charset.result index a96cb26dd9d..5bda623172b 100644 --- a/mysql-test/suite/rpl/r/rpl_charset.result +++ b/mysql-test/suite/rpl/r/rpl_charset.result @@ -121,4 +121,27 @@ primary key (`pk`) set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; +# +# Start of 10.3 tests +# +# +# MDEV-12685 Oracle-compatible function CHR() +# +connection master; +CREATE DATABASE db1 DEFAULT CHARACTER SET latin1 COLLATE latin1_bin; +USE db1; +CREATE TABLE t1 AS SELECT CHR(0x60); +connection slave; +SHOW CREATE TABLE db1.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `CHR(0x60)` varchar(4) COLLATE latin1_bin DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin +connection master; +USE test; +DROP DATABASE db1; +connection slave; +# +# End of 10.3 tests +# include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_trigger.result b/mysql-test/suite/rpl/r/rpl_create_drop_trigger.result index 76024d1fd74..e1474d8854e 100644 --- a/mysql-test/suite/rpl/r/rpl_create_drop_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_create_drop_trigger.result @@ -19,7 +19,7 @@ SET @sum = @sum + NEW.val + 1 connection master; CREATE TRIGGER IF NOT EXISTS val_sum AFTER INSERT ON t1 FOR EACH ROW SET @sum = @sum + NEW.val + 2; Warnings: -Note 1359 Trigger already exists +Note 1359 Trigger 'db1.val_sum' already exists SELECT ACTION_STATEMENT AS ACTION_STATEMENT_Master FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME='val_sum'; ACTION_STATEMENT_Master SET @sum = @sum + NEW.val + 1 diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_view.result b/mysql-test/suite/rpl/r/rpl_create_drop_view.result index fef1edb2018..facd40a6018 100644 --- a/mysql-test/suite/rpl/r/rpl_create_drop_view.result +++ b/mysql-test/suite/rpl/r/rpl_create_drop_view.result @@ -96,10 +96,10 @@ connection master; DROP VIEW v1; DROP TABLE t1; DROP VIEW v1; -ERROR 42S02: Unknown table 'test.v1' +ERROR 42S02: Unknown VIEW: 'test.v1' DROP VIEW IF EXISTS v2; Warnings: -Note 1051 Unknown table 'test.v2' +Note 4092 Unknown VIEW: 'test.v2' # Syncing slave with master connection slave; SELECT * FROM v1; diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result index 1c9611ba8f0..bb8c45ae4eb 100644 --- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -39,7 +39,9 @@ connection slave; BEGIN; SELECT * FROM t1 FOR UPDATE; a +connection slave1; START SLAVE; +connection slave; SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -61,8 +63,10 @@ BEGIN; SELECT * FROM t1 FOR UPDATE; a 1 +connection slave1; START SLAVE; include/wait_for_slave_sql_error.inc [errno=1205] +connection slave; SELECT COUNT(*) FROM t2; COUNT(*) 0 @@ -92,8 +96,10 @@ SELECT * FROM t1 FOR UPDATE; a 1 1 +connection slave1; START SLAVE; include/wait_for_slave_sql_error.inc [errno=1205] +connection slave; SELECT COUNT(*) FROM t2; COUNT(*) 0 diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 9eca21b38e4..0797e66e9ec 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -15,8 +15,8 @@ grant drop on test.* to rpl_do_grant@localhost; connection slave; show grants for rpl_do_grant@localhost; Grants for rpl_do_grant@localhost -GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost' -GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost' +GRANT SELECT ON *.* TO `rpl_do_grant`@`localhost` +GRANT DROP ON `test`.* TO `rpl_do_grant`@`localhost` connection master; set password for rpl_do_grant@localhost=password("does it work?"); connection slave; @@ -54,55 +54,55 @@ connection master; create user rpl_do_grant@localhost; show grants for rpl_do_grant@localhost; Grants for rpl_do_grant@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant`@`localhost` show grants for rpl_do_grant2@localhost; ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' connection slave; show grants for rpl_do_grant@localhost; Grants for rpl_do_grant@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant`@`localhost` show grants for rpl_do_grant2@localhost; ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' connection master; rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection master; grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT, DELETE ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT, DELETE ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection master; revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection master; revoke all privileges, grant option from rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection master; drop user rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; @@ -142,9 +142,9 @@ Host Db User Routine_name Routine_type Grantor Proc_priv Timestamp localhost bug42217_db create_rout_db upgrade_del_func FUNCTION create_rout_db@localhost Execute,Alter Routine # SHOW GRANTS FOR 'create_rout_db'@'localhost'; Grants for create_rout_db@localhost -GRANT USAGE ON *.* TO 'create_rout_db'@'localhost' IDENTIFIED BY PASSWORD '*08792480350CBA057BDE781B9DF183B263934601' -GRANT CREATE ROUTINE ON `bug42217_db`.* TO 'create_rout_db'@'localhost' WITH GRANT OPTION -GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `bug42217_db`.`upgrade_del_func` TO 'create_rout_db'@'localhost' +GRANT USAGE ON *.* TO `create_rout_db`@`localhost` IDENTIFIED BY PASSWORD '*08792480350CBA057BDE781B9DF183B263934601' +GRANT CREATE ROUTINE ON `bug42217_db`.* TO `create_rout_db`@`localhost` WITH GRANT OPTION +GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `bug42217_db`.`upgrade_del_func` TO `create_rout_db`@`localhost` USE bug42217_db; SHOW CREATE FUNCTION upgrade_del_func; Function sql_mode Create Function character_set_client collation_connection Database Collation @@ -236,11 +236,11 @@ GRANT EXECUTE ON PROCEDURE p1 TO 'user49119'@'localhost'; ### Showing grants for both users: root and user49119 (master) SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' -GRANT EXECUTE ON PROCEDURE `test`.`p1` TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` +GRANT EXECUTE ON PROCEDURE `test`.`p1` TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection slave; @@ -248,11 +248,11 @@ connection slave; ### Showing grants for both users: root and user49119 (master) SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' -GRANT EXECUTE ON PROCEDURE `test`.`p1` TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` +GRANT EXECUTE ON PROCEDURE `test`.`p1` TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection master; @@ -266,10 +266,10 @@ ERROR 42000: There is no such grant defined for user 'root' on host 'localhost' ### after revoke statement failure SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection slave; @@ -278,10 +278,10 @@ connection slave; ### after revoke statement failure (should match SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection master; diff --git a/mysql-test/suite/rpl/r/rpl_drop_view.result b/mysql-test/suite/rpl/r/rpl_drop_view.result index f6ced4eb41f..aa4df701609 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_view.result +++ b/mysql-test/suite/rpl/r/rpl_drop_view.result @@ -9,9 +9,9 @@ create view v1 as select * from t1; create view v2 as select * from t2; create view v3 as select * from t3; drop view not_exist_view; -ERROR 42S02: Unknown table 'test.not_exist_view' +ERROR 42S02: Unknown VIEW: 'test.not_exist_view' drop view v1, not_exist_view; -ERROR 42S02: Unknown table 'test.not_exist_view' +ERROR 42S02: Unknown VIEW: 'test.not_exist_view' select * from v1; ERROR 42S02: Table 'test.v1' doesn't exist drop view v2, v3; diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index e51bc982110..a84bc6b67f5 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -2,17 +2,15 @@ include/master-slave.inc [connection master] SET @old_event_scheduler = @@global.event_scheduler; set global event_scheduler=1; -DROP EVENT IF EXISTS test.justonce; -drop table if exists t1,t2; CREATE TABLE `t1` ( `id` INT(10) UNSIGNED NOT NULL, `c` VARCHAR(50) NOT NULL, `ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) DEFAULT CHARSET=utf8; INSERT INTO t1 (id, c) VALUES (1, 'manually'); "Creating event test.justonce on the master" -CREATE EVENT test.justonce ON SCHEDULE EVERY 2 SECOND DO +CREATE EVENT test.justonce ON SCHEDULE EVERY 2 SECOND DO INSERT IGNORE INTO t1 (id, c) VALUES (2, 'from justonce'); "Checking event is active on master" SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; @@ -31,7 +29,7 @@ db name status originator test justonce SLAVESIDE_DISABLED 1 "Dropping event test.slave_once on the slave" DROP EVENT IF EXISTS test.slave_once; -CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO +CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once'); Warnings: Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. @@ -45,7 +43,7 @@ connection master; "Dropping event test.justonce on the master" DROP EVENT IF EXISTS test.justonce; "Creating event test.er on the master" -CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO +CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er'); "Checking event status on the master" SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; @@ -58,7 +56,7 @@ db name status originator body test er SLAVESIDE_DISABLED 1 INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er') connection master; "Altering event test.er on the master" -ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO +ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er'); "Checking event status on the master" SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; @@ -80,7 +78,7 @@ connection slave; SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; db name status originator "Creating event test.slave_terminate on the slave" -CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate'); Warnings: Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. @@ -91,7 +89,7 @@ test slave_terminate ENABLED 2 "Dropping event test.slave_terminate on the slave" DROP EVENT test.slave_terminate; "Creating event test.slave_terminate with DISABLE ON SLAVE on the slave" -CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DISABLE ON SLAVE DO +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DISABLE ON SLAVE DO INSERT IGNORE INTO t1(c) VALUES (7, 'from slave_terminate'); Warnings: Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. @@ -106,7 +104,6 @@ connection master; DROP TABLE t1; connection slave; connection master; -connection master; CREATE TABLE t28953 (a INT); CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR DO BEGIN diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result index 3722e438d32..32df09789cc 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result @@ -568,3 +568,16 @@ ERROR HY000: Function or expression 'binlog_gtid_pos()' cannot be used in the DE # # End of 10.2 tests # +# +# Start of 10.3 tests +# +# +# MDEV-13967 Parameter data type control for Item_long_func +# +SELECT MASTER_GTID_WAIT(ROW(1,1),'str'); +ERROR HY000: Illegal parameter data type row for operation 'master_gtid_wait' +SELECT MASTER_GTID_WAIT('str',ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'master_gtid_wait' +# +# End of 10.3 tests +# diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result index 7b6e95bf718..ed2a2b287e9 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result @@ -88,16 +88,16 @@ include/save_master_gtid.inc connection server_2; include/sync_with_master_gtid.inc include/stop_slave.inc -SET GLOBAL debug_dbug="+d,crash_commit_before"; START SLAVE; +SET GLOBAL debug_dbug="+d,crash_commit_before"; connection server_1; INSERT INTO t1 VALUES (5); include/save_master_gtid.inc connection server_2; include/sync_with_master_gtid.inc include/stop_slave.inc -SET GLOBAL debug_dbug="+d,crash_commit_after"; START SLAVE; +SET GLOBAL debug_dbug="+d,crash_commit_after"; connection server_1; INSERT INTO t1 VALUES (6); include/save_master_gtid.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result index 47ba3c956b1..54156685806 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result @@ -12,21 +12,21 @@ connection master; INSERT INTO t1 VALUES (1); connection slave; CALL mtr.add_suppression("Slave: Failed to open mysql.gtid_slave_pos"); -include/wait_for_slave_sql_error.inc [errno=1942] +include/wait_for_slave_sql_error.inc [errno=1944] include/stop_slave.inc ALTER TABLE mysql.gtid_slave_pos CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL; ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY; ALTER TABLE mysql.gtid_slave_pos ADD PRIMARY KEY (sub_id, domain_id); START SLAVE; -include/wait_for_slave_sql_error.inc [errno=1942] +include/wait_for_slave_sql_error.inc [errno=1944] include/stop_slave.inc ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY; START SLAVE; -include/wait_for_slave_sql_error.inc [errno=1942] +include/wait_for_slave_sql_error.inc [errno=1944] include/stop_slave.inc ALTER TABLE mysql.gtid_slave_pos ADD PRIMARY KEY (sub_id); START SLAVE; -include/wait_for_slave_sql_error.inc [errno=1942] +include/wait_for_slave_sql_error.inc [errno=1944] include/stop_slave.inc ALTER TABLE mysql.gtid_slave_pos DROP PRIMARY KEY; ALTER TABLE mysql.gtid_slave_pos ADD PRIMARY KEY (domain_id, sub_id); diff --git a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result index 8d5b9be2ca0..ac608c3c2a3 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result @@ -79,6 +79,7 @@ a 9 connection server_1; DROP TABLE t1; +ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode; SET debug_sync = "reset"; connection server_2; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result index c49207b99fa..aaeb0c8f119 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result @@ -1,5 +1,12 @@ include/master-slave.inc [connection master] +connection slave; +include/stop_slave.inc +SET sql_log_bin=0; +ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +SET sql_log_bin=1; +include/start_slave.inc +connection master; CREATE TABLE t1 (i int) ENGINE=InnoDB; connection slave; *** MDEV-4484, incorrect error handling when entries in gtid_slave_pos not found. *** @@ -13,7 +20,6 @@ SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,gtid_slave_pos_simulate_failed_delete"; SET sql_log_bin= 0; CALL mtr.add_suppression("Can't find file"); -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; SET sql_log_bin= 1; include/start_slave.inc connection master; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result index 3f3b5e4344a..ff845794c22 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result @@ -194,7 +194,7 @@ domain_id COUNT(*) *** MDEV-4650: show variables; ERROR 1946 (HY000): Failed to load replication slave GTID position *** connection server_2; SET sql_log_bin=0; -RENAME TABLE mysql.gtid_slave_pos TO mysql.gtid_slave_pos_old; +RENAME TABLE mysql.gtid_slave_pos TO mysql.old_gtid_slave_pos; SET sql_log_bin=1; SHOW VARIABLES; SHOW VARIABLES LIKE 'gtid_slave_pos'; @@ -207,7 +207,7 @@ Level Code Message Error 1146 Table 'mysql.gtid_slave_pos' doesn't exist Error 1946 Failed to load replication slave GTID position from table mysql.gtid_slave_pos SET sql_log_bin=0; -RENAME TABLE mysql.gtid_slave_pos_old TO mysql.gtid_slave_pos; +RENAME TABLE mysql.old_gtid_slave_pos TO mysql.gtid_slave_pos; CALL mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); SET sql_log_bin=1; SHOW VARIABLES LIKE 'gtid_slave_pos'; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_until.result b/mysql-test/suite/rpl/r/rpl_gtid_until.result index 886f6cfd2cb..2295aad34ac 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_until.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_until.result @@ -10,6 +10,8 @@ SET s= SUBSTR(s FROM 1 FOR LOCATE(",", s) - 1); RETURN s; END| connection server_2; +include/stop_slave.inc +include/start_slave.inc START SLAVE UNTIL master_gtid_pos = ""; ERROR HY000: Slave is already running include/stop_slave_io.inc diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result index 7717dcf6700..d878a8d9df9 100644 --- a/mysql-test/suite/rpl/r/rpl_hrtime.result +++ b/mysql-test/suite/rpl/r/rpl_hrtime.result @@ -46,7 +46,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b varchar(100), c datetime(2)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1293832861.123456/*!*/; SET @@session.time_zone='+03:00'/*!*/; @@ -55,7 +55,7 @@ insert t1 (b,c) values (now(6), now(6)) SET TIMESTAMP=1293832861.123456/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1293832861/*!*/; insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010') @@ -63,7 +63,7 @@ insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','201 SET TIMESTAMP=1293832861/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1643756522.654321/*!*/; insert t1 (b,c) values (now(), now()) @@ -71,7 +71,7 @@ insert t1 (b,c) values (now(), now()) SET TIMESTAMP=1643756522.654321/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1643756522.654321/*!*/; insert t1 (b,c) values (0,0) @@ -79,7 +79,7 @@ insert t1 (b,c) values (0,0) SET TIMESTAMP=1643756522.654321/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1643756522.654321/*!*/; insert t1 (a,b,c) values (0,0,now(6)) diff --git a/mysql-test/suite/rpl/r/rpl_ignore_grant.result b/mysql-test/suite/rpl/r/rpl_ignore_grant.result index f3d69112efd..64da944a5dc 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_grant.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_grant.result @@ -17,8 +17,8 @@ grant select on *.* to rpl_ignore_grant@localhost; grant drop on test.* to rpl_ignore_grant@localhost; show grants for rpl_ignore_grant@localhost; Grants for rpl_ignore_grant@localhost -GRANT SELECT ON *.* TO 'rpl_ignore_grant'@'localhost' -GRANT DROP ON `test`.* TO 'rpl_ignore_grant'@'localhost' +GRANT SELECT ON *.* TO `rpl_ignore_grant`@`localhost` +GRANT DROP ON `test`.* TO `rpl_ignore_grant`@`localhost` connection slave; show grants for rpl_ignore_grant@localhost; ERROR 42000: There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost' diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index 4eeb333d10c..1e0d6f537ab 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -44,54 +44,54 @@ GRANT INSERT ON test.* TO mysqltest6@localhost; GRANT INSERT ON test.t1 TO mysqltest6@localhost; show grants for mysqltest1@localhost; Grants for mysqltest1@localhost -GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' -GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest1`@`localhost` +GRANT SELECT ON `test`.`t1` TO `mysqltest1`@`localhost` show grants for mysqltest2@localhost; Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' -GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost' -GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +GRANT USAGE ON *.* TO `mysqltest2`@`localhost` +GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localhost` +GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost` show grants for mysqltest6@localhost; Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost' +GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` +GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost` +GRANT INSERT ON `test`.`t1` TO `mysqltest6`@`localhost` flush privileges; show grants for mysqltest5@somehost; Grants for mysqltest5@somehost -GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +GRANT USAGE ON *.* TO `mysqltest5`@`somehost` set sql_mode=""; connection slave; **** Checking grants on slave **** show grants for mysqltest2@localhost; Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' -GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +GRANT USAGE ON *.* TO `mysqltest2`@`localhost` +GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost` show grants for mysqltest5@somehost; Grants for mysqltest5@somehost -GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +GRANT USAGE ON *.* TO `mysqltest5`@`somehost` show grants for mysqltest6@localhost; Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` +GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost` show grants for mysqltest1@localhost; ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' **** Revoking grants on master **** @@ -102,27 +102,27 @@ REVOKE select(a) on t4 from mysqltest3@localhost; show grants for mysqltest1@localhost; Grants for mysqltest1@localhost -GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest1`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' connection slave; **** Checking grants on slave **** show grants for mysqltest1@localhost; ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' set global slave_exec_mode='IDEMPOTENT'; call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* error.* 1032"); connection master; diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix.result b/mysql-test/suite/rpl/r/rpl_ip_mix.result index e139f863c8a..cc11f481991 100644 --- a/mysql-test/suite/rpl/r/rpl_ip_mix.result +++ b/mysql-test/suite/rpl/r/rpl_ip_mix.result @@ -64,3 +64,5 @@ Master-Host: 127.0.0.1 change master to master_host='0:0:0:0:0:0:0:1'; Master-Host: 0:0:0:0:0:0:0:1 CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; +connection slave; +reset slave all; diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix2.result b/mysql-test/suite/rpl/r/rpl_ip_mix2.result index 70599d097a7..d304eff9ab4 100644 --- a/mysql-test/suite/rpl/r/rpl_ip_mix2.result +++ b/mysql-test/suite/rpl/r/rpl_ip_mix2.result @@ -64,3 +64,5 @@ Master-Host: 127.0.0.1 change master to master_host='0:0:0:0:0:0:0:1'; Master-Host: 0:0:0:0:0:0:0:1 CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; +connection slave; +reset slave all; diff --git a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result index 18298986069..04f55fc1263 100644 --- a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result +++ b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result @@ -45,4 +45,17 @@ master_pos_wait('master-bin.000001',1000000,1,"my_slave") STOP SLAVE 'my_slave'; RESET SLAVE 'my_slave' ALL; change master to master_port=MASTER_MYPORT, master_host='127.0.0.1', master_user='root'; +# +# Start of 10.3 tests +# +# +# MDEV-13965 Parameter data type control for Item_longlong_func +# +SELECT MASTER_POS_WAIT('x',1,ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'master_pos_wait' +SELECT MASTER_POS_WAIT('x',1,1,ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'master_pos_wait' +# +# End of 10.3 tests +# include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mdev-11092.result b/mysql-test/suite/rpl/r/rpl_mdev-11092.result index 90b809477b2..8bc8fe4a20b 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev-11092.result +++ b/mysql-test/suite/rpl/r/rpl_mdev-11092.result @@ -1,7 +1,7 @@ include/master-slave.inc [connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -call mtr.add_suppression("Slave SQL: The incident LOST_EVENTS occured on the master. .*"); +call mtr.add_suppression("Slave SQL: The incident LOST_EVENTS occurred on the master. .*"); SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096; SET GLOBAL max_binlog_stmt_cache_size = 4096; diff --git a/mysql-test/suite/rpl/r/rpl_mdev10863.result b/mysql-test/suite/rpl/r/rpl_mdev10863.result index 158d4a921b7..6accd1ee830 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev10863.result +++ b/mysql-test/suite/rpl/r/rpl_mdev10863.result @@ -46,5 +46,6 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; SET GLOBAL max_relay_log_size= @old_max_relay; include/start_slave.inc connection server_1; +ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mdev12179.result b/mysql-test/suite/rpl/r/rpl_mdev12179.result new file mode 100644 index 00000000000..8373eb43774 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_mdev12179.result @@ -0,0 +1,275 @@ +include/rpl_init.inc [topology=1->2] +connection server_2; +call mtr.add_suppression("The automatically created table.*name may not be entirely in lowercase"); +SET GLOBAL gtid_pos_auto_engines="innodb"; +ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first +include/stop_slave.inc +CHANGE MASTER TO master_use_gtid=slave_pos; +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines + +SELECT @@SESSION.gtid_pos_auto_engines; +ERROR HY000: Variable 'gtid_pos_auto_engines' is a GLOBAL variable +SET GLOBAL gtid_pos_auto_engines= NULL; +ERROR 42000: Variable 'gtid_pos_auto_engines' can't be set to the value of 'NULL' +SET GLOBAL gtid_pos_auto_engines="innodb"; +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines +InnoDB +SET GLOBAL gtid_pos_auto_engines="myisam,innodb"; +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines +MyISAM,InnoDB +SET GLOBAL gtid_pos_auto_engines="innodb,myisam"; +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines +InnoDB,MyISAM +SET GLOBAL gtid_pos_auto_engines="innodb,innodb,myisam,innodb,myisam,myisam,innodb"; +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines +InnoDB,MyISAM +SET GLOBAL gtid_pos_auto_engines=DEFAULT; +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines + +SET GLOBAL gtid_pos_auto_engines=""; +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines + +include/start_slave.inc +connection server_1; +CREATE TABLE t1 (a INT PRIMARY KEY); +INSERT INTO t1 VALUES (1); +SELECT * FROM t1 ORDER BY a; +a +1 +connection server_2; +SELECT * FROM t1 ORDER BY a; +a +1 +include/stop_slave.inc +SET sql_log_bin=0; +ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos; +ALTER TABLE mysql.gtid_slave_pos_innodb ENGINE=InnoDB; +INSERT INTO mysql.gtid_slave_pos_innodb SELECT * FROM mysql.gtid_slave_pos; +TRUNCATE mysql.gtid_slave_pos; +SET sql_log_bin=1; +connection server_1; +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +include/save_master_gtid.inc +*** Restart server with --gtid-pos-auto-engines=innodb,myisam *** +connection server_2; +include/sync_with_master_gtid.inc +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +*** Verify no new gtid_slave_pos* tables are created *** +SELECT table_name, engine FROM information_schema.tables +WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' + ORDER BY table_name; +table_name engine +gtid_slave_pos MyISAM +gtid_slave_pos_innodb InnoDB +SELECT @@gtid_pos_auto_engines; +@@gtid_pos_auto_engines +InnoDB,MyISAM +include/stop_slave.inc +SET sql_log_bin=0; +INSERT INTO mysql.gtid_slave_pos_innodb SELECT * FROM mysql.gtid_slave_pos; +DROP TABLE mysql.gtid_slave_pos; +RENAME TABLE mysql.gtid_slave_pos_innodb TO mysql.gtid_slave_pos; +SET sql_log_bin=1; +connection server_1; +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (4); +INSERT INTO t2 VALUES (1); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +SELECT * FROM t2 ORDER BY a; +a +1 +include/save_master_gtid.inc +*** Restart server with --gtid-pos-auto-engines=myisam,innodb *** +connection server_2; +include/sync_with_master_gtid.inc +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +SELECT * FROM t2 ORDER BY a; +a +1 +*** Verify that no new gtid_slave_pos* tables are auto-created *** +SELECT table_name, engine FROM information_schema.tables +WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' + ORDER BY table_name; +table_name engine +gtid_slave_pos InnoDB +include/stop_slave.inc +SET sql_log_bin=0; +ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +SET sql_log_bin=1; +connection server_1; +INSERT INTO t1 VALUES (5); +INSERT INTO t2 VALUES (2); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +*** Verify that mysql.gtid_slave_pos_InnoDB is auto-created *** +SELECT lower(table_name), engine FROM information_schema.tables +WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' + ORDER BY table_name; +lower(table_name) engine +gtid_slave_pos MyISAM +gtid_slave_pos_innodb InnoDB +include/stop_slave.inc +SET sql_log_bin=0; +INSERT INTO mysql.gtid_slave_pos SELECT * FROM mysql.gtid_slave_pos_InnoDB; +DROP TABLE mysql.gtid_slave_pos_InnoDB; +SET sql_log_bin=1; +connection server_1; +INSERT INTO t1 VALUES (6); +INSERT INTO t2 VALUES (3); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +include/save_master_gtid.inc +*** Restart server without --gtid-pos-auto-engines *** +connection server_2; +include/sync_with_master_gtid.inc +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +*** Verify that no mysql.gtid_slave_pos* table is auto-created *** +SELECT table_name, engine FROM information_schema.tables +WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' + ORDER BY table_name; +table_name engine +gtid_slave_pos MyISAM +SELECT domain_id, max(seq_no) FROM mysql.gtid_slave_pos GROUP BY domain_id; +domain_id max(seq_no) +0 11 +include/stop_slave.inc +SET GLOBAL gtid_pos_auto_engines="innodb"; +include/start_slave.inc +connection server_1; +INSERT INTO t1 VALUES (7); +INSERT INTO t2 VALUES (4); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +7 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +4 +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +7 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +4 +*** Verify that mysql.gtid_slave_pos_InnoDB is auto-created *** +SELECT lower(table_name), engine FROM information_schema.tables +WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' + ORDER BY table_name; +lower(table_name) engine +gtid_slave_pos MyISAM +gtid_slave_pos_innodb InnoDB +SELECT domain_id, max(seq_no) FROM mysql.gtid_slave_pos GROUP BY domain_id; +domain_id max(seq_no) +0 13 +connection server_2; +*** Restart the slave server to prove 'gtid_slave_pos_innodb' autodiscovery *** +connection server_2; +SELECT max(seq_no) FROM mysql.gtid_slave_pos_InnoDB into @seq_no; +connection server_1; +INSERT INTO t2(a) SELECT 1+MAX(a) FROM t2; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +include/stop_slave.inc +SET GLOBAL gtid_pos_auto_engines=""; +SET sql_log_bin=0; +DROP TABLE mysql.gtid_slave_pos_InnoDB; +SET sql_log_bin=1; +include/start_slave.inc +connection server_1; +DROP TABLE t1, t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result index ee9377906ad..7e26e82d8c9 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev382.result +++ b/mysql-test/suite/rpl/r/rpl_mdev382.result @@ -189,7 +189,7 @@ SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3), `c``3` VARCHAR(7)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE '<name>' INTO TABLE `t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, @`b```) SET `b``2`= @`b```, `c``3`= concat('|', "b""a'z", "!") @@ -200,7 +200,7 @@ COMMIT SET TIMESTAMP=1000000000/*!*/; truncate `t``1` /*!*/; -BEGIN +START TRANSACTION /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -288,7 +288,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100)) @@ -296,7 +296,7 @@ INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,1844674407370 SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET @`a``1`:=-9223372036854775808/*!*/; SET @`a``2`:=42/*!*/; @@ -383,7 +383,7 @@ master-bin.000002 # Query 1 # COMMIT /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; use `ts``et`/*!*/; SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index 862851c7a49..74d9cf55cd4 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -651,9 +651,9 @@ DROP TABLE t1, t2, t3; include/save_master_gtid.inc connection server_2; include/sync_with_master_gtid.inc -Check that no more than the expected last two GTIDs are in mysql.gtid_slave_pos -select count(*) from mysql.gtid_slave_pos order by domain_id, sub_id; -count(*) -2 +Check that no more than the expected last four GTIDs are in mysql.gtid_slave_pos +select count(4) <= 4 from mysql.gtid_slave_pos order by domain_id, sub_id; +count(4) <= 4 +1 connection server_1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_read_only2.result b/mysql-test/suite/rpl/r/rpl_read_only2.result new file mode 100644 index 00000000000..c457f49e67d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_read_only2.result @@ -0,0 +1,53 @@ +include/master-slave.inc +[connection master] +# +# Ensure that read-only slave logs temporary table statements under statement based +# replication. This is related to MDEV-17863. +# +connection slave; +set global read_only=1; +connection master; +create table t1(a int) engine=MyISAM; +create temporary table tmp1 (a int) engine=MyISAM; +insert into t1 values(1); +insert into tmp1 values (2); +insert into t1 select * from tmp1; +insert into t1 values(3); +select * from t1; +a +1 +2 +3 +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +drop table t1; +drop temporary table tmp1; +connection slave; +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1(a int) engine=MyISAM +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create temporary table tmp1 (a int) engine=MyISAM +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t1 values(1) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into tmp1 values (2) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t1 select * from tmp1 +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t1 values(3) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; analyze table t1 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tmp1` /* generated by server */ +set global read_only=0; +connection master; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index 82f6f537329..2518b207111 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -128,4 +128,6 @@ show binlog events in ''; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log purge master logs before now(); End of 5.0 tests +#cleanup include/stop_slave.inc +reset slave all; diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result index 3ca694a8e76..f7684d5ad97 100644 --- a/mysql-test/suite/rpl/r/rpl_row_001.result +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -15,6 +15,7 @@ Aaron Aaron Ababa Ababa +create temporary table tmp select * from mysql.user where host="localhost" and user="root"; connection slave; STOP SLAVE; connection master; @@ -65,5 +66,7 @@ n 3456 connection master; DROP TABLE t1; +replace into mysql.user select * from tmp; +drop temporary table tmp; connection slave; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_end_of_statement_loss.result b/mysql-test/suite/rpl/r/rpl_row_end_of_statement_loss.result new file mode 100644 index 00000000000..dc6a67b48d2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_end_of_statement_loss.result @@ -0,0 +1,42 @@ +include/master-slave.inc +[connection master] +connection slave; +call mtr.add_suppression("Slave IO thread did not receive an expected Rows-log end-of-statement"); +call mtr.add_suppression("Relay log write failure: could not queue event from master"); +SET @save_debug= @@global.debug; +SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss"; +include/stop_slave.inc +CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT, MASTER_USE_GTID=SLAVE_POS; +connection master; +CREATE TABLE t (a INT, b text(8192));; +INSERT INTO t values (1, repeat('b', 8192)), (1, repeat('b', 8192)); +connection slave; +START SLAVE IO_THREAD; +include/wait_for_slave_io_error.inc [errno=1595] +SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss"; +include/start_slave.inc +connection master; +connection slave; +connection slave; +include/stop_slave.inc +connection master; +SET @save_log_bin_compress= @@GLOBAL.log_bin_compress; +SET @save_log_bin_compress_min_len= @@GLOBAL.log_bin_compress_min_len; +SET @@GLOBAL.log_bin_compress=ON; +SET @@GLOBAL.log_bin_compress_min_len=10; +INSERT INTO t values (2, repeat('b', 8192)), (2, repeat('b', 8192)); +connection slave; +SET GLOBAL debug_dbug="+d,simulate_stmt_end_rows_event_loss"; +START SLAVE IO_THREAD; +include/wait_for_slave_io_error.inc [errno=1595] +SET GLOBAL debug_dbug="-d,simulate_stmt_end_rows_event_loss"; +include/start_slave.inc +connection master; +connection slave; +connection master; +SET @@GLOBAL.log_bin_compress= @save_log_bin_compress; +SET @@GLOBAL.log_bin_compress_min_len= @save_log_bin_compress_min_len; +DROP TABLE t; +connection slave; +SET GLOBAL debug_dbug= @save_debug; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result index 650f6eeee51..f1a0059a04f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result +++ b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result @@ -16,7 +16,8 @@ DELETE FROM t1; DROP TABLE t1; connection slave; # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log -Occurrences: update=1, delete=1 +FOUND 1 /The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount/ in mysqld.2.err +FOUND 1 /The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/ in mysqld.2.err include/stop_slave.inc SET @@GLOBAL.debug_dbug = @saved_dbug; SET GLOBAL log_warnings = 2; diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync.result index 6d574681d73..106efb555d3 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync.result @@ -4,6 +4,7 @@ connection master; call mtr.add_suppression("Timeout waiting for reply of binlog"); call mtr.add_suppression("Read semi-sync reply"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); +call mtr.add_suppression("mysqld: Got an error reading communication packets"); connection slave; call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Semi-sync slave .* reply"); @@ -176,7 +177,7 @@ Variable_name Value Rpl_semi_sync_master_yes_tx 14 show status like 'Rpl_semi_sync_master_clients'; Variable_name Value -Rpl_semi_sync_master_clients 1 +Rpl_semi_sync_master_clients 0 [ semi-sync replication of these transactions will fail ] insert into t1 values (500); [ master status should be OFF ] @@ -321,7 +322,6 @@ connection slave; include/stop_slave.inc reset slave; connection master; -kill query _tid; connection slave; include/start_slave.inc connection master; @@ -353,7 +353,6 @@ include/stop_slave.inc reset slave; connection master; reset master; -kill query _tid; set sql_log_bin=0; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password'; flush privileges; @@ -404,7 +403,6 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; Variable_name Value Rpl_semi_sync_slave_status OFF connection master; -kill query _tid; [ Semi-sync status on master should be ON ] show status like 'Rpl_semi_sync_master_clients'; Variable_name Value diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result index 927113726fa..c61340f3967 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync.result @@ -5,6 +5,7 @@ connection master; call mtr.add_suppression("Timeout waiting for reply of binlog"); call mtr.add_suppression("Read semi-sync reply"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); +call mtr.add_suppression("mysqld: Got an error reading communication packets"); connection slave; call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Semi-sync slave .* reply"); @@ -177,7 +178,7 @@ Variable_name Value Rpl_semi_sync_master_yes_tx 16 show status like 'Rpl_semi_sync_master_clients'; Variable_name Value -Rpl_semi_sync_master_clients 1 +Rpl_semi_sync_master_clients 0 [ semi-sync replication of these transactions will fail ] insert into t1 values (500); [ master status should be OFF ] @@ -322,7 +323,6 @@ connection slave; include/stop_slave.inc reset slave; connection master; -kill query _tid; connection slave; include/start_slave.inc connection master; @@ -354,7 +354,6 @@ include/stop_slave.inc reset slave; connection master; reset master; -kill query _tid; set sql_log_bin=0; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password'; flush privileges; @@ -405,7 +404,6 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; Variable_name Value Rpl_semi_sync_slave_status OFF connection master; -kill query _tid; [ Semi-sync status on master should be ON ] show status like 'Rpl_semi_sync_master_clients'; Variable_name Value diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result index 30280551ce2..6a23f24b66d 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_after_sync_row.result @@ -5,6 +5,7 @@ connection master; call mtr.add_suppression("Timeout waiting for reply of binlog"); call mtr.add_suppression("Read semi-sync reply"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); +call mtr.add_suppression("mysqld: Got an error reading communication packets"); connection slave; call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Semi-sync slave .* reply"); @@ -177,7 +178,7 @@ Variable_name Value Rpl_semi_sync_master_yes_tx 14 show status like 'Rpl_semi_sync_master_clients'; Variable_name Value -Rpl_semi_sync_master_clients 1 +Rpl_semi_sync_master_clients 0 [ semi-sync replication of these transactions will fail ] insert into t1 values (500); [ master status should be OFF ] @@ -322,7 +323,6 @@ connection slave; include/stop_slave.inc reset slave; connection master; -kill query _tid; connection slave; include/start_slave.inc connection master; @@ -354,7 +354,6 @@ include/stop_slave.inc reset slave; connection master; reset master; -kill query _tid; set sql_log_bin=0; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password'; flush privileges; @@ -405,7 +404,6 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; Variable_name Value Rpl_semi_sync_slave_status OFF connection master; -kill query _tid; [ Semi-sync status on master should be ON ] show status like 'Rpl_semi_sync_master_clients'; Variable_name Value diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_event.result b/mysql-test/suite/rpl/r/rpl_semi_sync_event.result index c347ff410ac..917e7c2b02b 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_event.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_event.result @@ -5,6 +5,7 @@ call mtr.add_suppression("Timeout waiting for reply of binlog"); call mtr.add_suppression("Semi-sync master .* waiting for slave reply"); call mtr.add_suppression("Read semi-sync reply"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); +call mtr.add_suppression("mysqld: Got an error reading communication packets"); connection slave; call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Semi-sync slave .* reply"); diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_event_after_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync_event_after_sync.result index c237eb8df47..24daf0d72b5 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_event_after_sync.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_event_after_sync.result @@ -6,6 +6,7 @@ call mtr.add_suppression("Timeout waiting for reply of binlog"); call mtr.add_suppression("Semi-sync master .* waiting for slave reply"); call mtr.add_suppression("Read semi-sync reply"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); +call mtr.add_suppression("mysqld: Got an error reading communication packets"); connection slave; call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Semi-sync slave .* reply"); diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result b/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result new file mode 100644 index 00000000000..786e1682bb0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result @@ -0,0 +1,33 @@ +include/master-slave.inc +[connection master] +connection master; +SET @@GLOBAL.rpl_semi_sync_master_enabled = 1; +connection slave; +include/stop_slave.inc +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1; +include/start_slave.inc +connection master; +CREATE TABLE t1 (a INT); +INSERT INTO t1 SET a=1; +connection slave; +connection master; +# Shutdown master +include/rpl_stop_server.inc [server_number=1] +connection slave; +include/stop_slave.inc +# Restart master +include/rpl_start_server.inc [server_number=1] +connection slave; +include/stop_slave.inc +Warnings: +Note 1255 Slave already has been stopped +include/start_slave.inc +connection master; +SET @@GLOBAL.debug_dbug=""; +SET @@GLOBAL. rpl_semi_sync_master_enabled = 0; +connection master; +DROP TABLE t1; +connection slave; +include/stop_slave.inc +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result b/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result new file mode 100644 index 00000000000..6b39b296cdf --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result @@ -0,0 +1,40 @@ +include/master-slave.inc +[connection master] +connection slave; +include/stop_slave.inc +connection master; +call mtr.add_suppression("Timeout waiting for reply of binlog*"); +set global rpl_semi_sync_master_enabled = ON; +SET @@GLOBAL.rpl_semi_sync_master_timeout=100; +create table t1 (i int); +connection slave; +set global rpl_semi_sync_slave_enabled = ON; +CALL mtr.add_suppression("Semi-sync slave net_flush*"); +SET @save_debug= @@global.debug; +SET GLOBAL debug_dbug="+d,semislave_failed_net_flush"; +include/start_slave.inc +connection master; +connection slave; +"Assert that the net_fulsh() reply failed is present in slave error log. +FOUND 1 /Semi-sync slave net_flush\(\) reply failed/ in mysqld.2.err +"Assert that Slave IO thread is up and running." +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running ON +Slave_IO_Running= Yes +"Clear the network failure simulation." +SET GLOBAL debug_dbug= @save_debug; +connection master; +insert into t1 values (10); +connection slave; +connection slave; +# Compare the tables on master and slave. +include/diff_tables.inc [master:t1, slave:t1] +connection master; +drop table t1; +connection slave; +set global rpl_semi_sync_slave_enabled = OFF; +connection master; +set global rpl_semi_sync_master_enabled = OFF; +SET @@GLOBAL.rpl_semi_sync_master_timeout = 10000; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result b/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result deleted file mode 100644 index 5ba751155e6..00000000000 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result +++ /dev/null @@ -1,69 +0,0 @@ -include/master-slave.inc -[connection master] -call mtr.add_suppression("Read semi-sync reply network error"); -call mtr.add_suppression("Timeout waiting for reply of binlog"); -INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master'; -connection slave; -INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave'; -UNINSTALL PLUGIN rpl_semi_sync_slave; -connection master; -UNINSTALL PLUGIN rpl_semi_sync_master; -CREATE TABLE t1(i int); -INSERT INTO t1 values (1); -DROP TABLE t1; -connection slave; -include/install_semisync.inc -connection master; -connection slave; -connection slave; -show global status like "Slave%_running"; -Variable_name Value -Slave_running ON -Slaves_running 1 -UNINSTALL PLUGIN rpl_semi_sync_slave; -Warnings: -Warning 1620 Plugin is busy and will be uninstalled on shutdown -select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%'; -plugin_name plugin_status -rpl_semi_sync_slave DELETED -connection master; -UNINSTALL PLUGIN rpl_semi_sync_master; -Warnings: -Warning 1620 Plugin is busy and will be uninstalled on shutdown -select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%'; -plugin_name plugin_status -rpl_semi_sync_master DELETED -CREATE TABLE t1(i int); -INSERT INTO t1 values (2); -DROP TABLE t1; -connection slave; -show status like "Rpl_semi_sync_slave_status"; -Variable_name Value -Rpl_semi_sync_slave_status ON -connection master; -show status like "Rpl_semi_sync_master_status"; -Variable_name Value -Rpl_semi_sync_master_status ON -show status like "Rpl_semi_sync_master_clients"; -Variable_name Value -Rpl_semi_sync_master_clients 1 -select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%'; -plugin_name plugin_status -rpl_semi_sync_master DELETED -connection slave; -include/stop_slave.inc -select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%'; -plugin_name plugin_status -connection master; -create table t2 (a int); -drop table t2; -connection slave; -include/start_slave.inc -select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%'; -plugin_name plugin_status -connection master; -CREATE TABLE t1(i int); -INSERT INTO t1 values (3); -DROP TABLE t1; -connection slave; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_wait_no_slave.result b/mysql-test/suite/rpl/r/rpl_semi_sync_wait_no_slave.result new file mode 100644 index 00000000000..4bf6af2714d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_wait_no_slave.result @@ -0,0 +1,8 @@ +include/master-slave.inc +[connection master] +connection master; +CREATE TABLE t1 (a INT); +INSERT INTO t1 SET a=1; +DROP TABLE t1; +connection slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semisync_ali_issues.result b/mysql-test/suite/rpl/r/rpl_semisync_ali_issues.result new file mode 100644 index 00000000000..9607e8a7998 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_semisync_ali_issues.result @@ -0,0 +1,353 @@ +include/master-slave.inc +[connection master] +CALL mtr.add_suppression("Failed to start semi-sync ACK receiver thread.*"); +CALL mtr.add_suppression("Failed to register slave to semi-sync ACK receiver thread.*"); +CALL mtr.add_suppression("Failed to stop ack receiver thread on pthread_join.*"); +CALL mtr.add_suppression("Got an error reading communication packets:*"); +CALL mtr.add_suppression("Timeout waiting for reply of binlog*"); +CALL mtr.add_suppression("slave_read_sync_header*"); +CALL mtr.add_suppression("Missing magic number for semi-sync*"); +CALL mtr.add_suppression("Got timeout reading communication packets*"); +CALL mtr.add_suppression("Failed to call*"); +CALL mtr.add_suppression("Execution failed on master*"); +CALL mtr.add_suppression("Failed on request_dump()*"); +CALL mtr.add_suppression("Semi-sync master failed on*"); +CALL mtr.add_suppression("Master command COM_BINLOG_DUMP failed*"); +CALL mtr.add_suppression("on master failed*"); +CALL mtr.add_suppression("Master server does not support semi-sync*"); +CALL mtr.add_suppression("Semi-sync slave net_flush*"); +CALL mtr.add_suppression("Failed to flush master info*"); +CALL mtr.add_suppression("Request to stop slave SQL Thread received while apply*"); +connection master; +[ enable semi-sync on master ] +set global rpl_semi_sync_master_enabled = 1; +show variables like 'rpl_semi_sync_master_enabled'; +Variable_name Value +rpl_semi_sync_master_enabled ON +connection slave; +[ enable semi-sync on slave ] +stop slave; +set global rpl_semi_sync_slave_enabled = 1; +start slave; +show status like 'rpl_semi_sync_slave%'; +Variable_name Value +Rpl_semi_sync_slave_send_ack 0 +Rpl_semi_sync_slave_status ON +connection master; +CREATE TABLE t1(a INT) ENGINE=InnoDB; +connection slave; +connection master; +connect con1,localhost,root,,; +connect con2,localhost,root,,; +connect con3,localhost,root,,; +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +show status like "rpl_semi_sync_master_yes_tx"; +Variable_name Value +Rpl_semi_sync_master_yes_tx 1 +######################################### +# Test rpl_semi_sync_master_wait_point # +######################################### +# Test after_sync and after_commit first. +#Test after_sync +connection con1; +SET GLOBAL rpl_semi_sync_master_timeout = 1000000; +SET GLOBAL rpl_semi_sync_master_wait_point= 'AFTER_SYNC'; +SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL after_sync_done WAIT_FOR end"; +INSERT into t1 values (1);; +connection con2; +SET DEBUG_SYNC= "now WAIT_FOR after_sync_done"; +connection slave; +#slave can see record (1) after sync slave with master +select * from t1; +a +1 +connection con2; +#con2 shouldn't see record (1) +select * from t1; +a +SET DEBUG_SYNC= "now SIGNAL end"; +connection con1; +connection con1; +select * from t1; +a +1 +truncate table t1; +connection slave; +connection con1; +SET DEBUG_SYNC= 'reset'; +SET DEBUG_SYNC= "commit_before_get_LOCK_log SIGNAL before_fetch_done WAIT_FOR more_queue"; +INSERT into t1 VALUES (1);; +connection con2; +SET DEBUG_SYNC= "now WAIT_FOR before_fetch_done"; +SET DEBUG_SYNC= "after_semisync_queue SIGNAL more_queue"; +INSERT INTO t1 VALUES (2); +connection con1; +connection con1; +SET DEBUG_SYNC= 'reset'; +SET DEBUG_SYNC= "commit_before_get_LOCK_log SIGNAL before_fetch_done WAIT_FOR disable_semisync"; +INSERT into t1 VALUES (3);; +connection con2; +SET DEBUG_SYNC= "now WAIT_FOR before_fetch_done"; +SET GLOBAL rpl_semi_sync_master_enabled= 0; +SET DEBUG_SYNC= "now SIGNAL disable_semisync"; +connection con1; +SET GLOBAL rpl_semi_sync_master_enabled = 1; +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +#Test after_commit +connection con1; +SET GLOBAL rpl_semi_sync_master_wait_point= 'AFTER_COMMIT'; +SET DEBUG_SYNC= "after_group_after_commit SIGNAL after_commit_done WAIT_FOR end"; +INSERT into t1 values (4);; +connection con2; +SET DEBUG_SYNC= "now WAIT_FOR after_commit_done"; +connection slave; +select * from t1; +a +1 +2 +3 +4 +connection con2; +select * from t1; +a +1 +2 +3 +4 +SET DEBUG_SYNC= "now SIGNAL end"; +connection con1; +connection con1; +select * from t1; +a +1 +2 +3 +4 +truncate table t1; +####################################################### +# Test some other options in order to cover the patch # +####################################################### +connection slave; +# Test rpl_semi_sync_slave_trace_level +SET GLOBAL rpl_semi_sync_slave_trace_level= 1; +SET GLOBAL rpl_semi_sync_slave_trace_level= 16; +SET GLOBAL rpl_semi_sync_slave_trace_level= 64; +SET GLOBAL rpl_semi_sync_slave_trace_level= 128; +SET GLOBAL rpl_semi_sync_slave_trace_level= 32; +connection master; +# Test rpl_semi_sync_master_trace_level +SET GLOBAL rpl_semi_sync_master_trace_level= 1; +SET GLOBAL rpl_semi_sync_master_trace_level= 16; +SET GLOBAL rpl_semi_sync_master_trace_level= 64; +SET GLOBAL rpl_semi_sync_master_trace_level= 128; +SET GLOBAL rpl_semi_sync_master_trace_level= 32; +# Test rpl_semi_sync_master_timeout +SET GLOBAL rpl_semi_sync_master_timeout= 1000; +SET GLOBAL rpl_semi_sync_master_timeout= 10000; +SET GLOBAL rpl_semi_sync_master_timeout = 1000000; +# Test rpl_semi_sync_slave_kill_conn_timeout +SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 10; +SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 20; +SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 60; +SET GLOBAL rpl_semi_sync_slave_kill_conn_timeout= 5; +############################################ +# Test rpl_semi_sync_master_wait_no_slave # +############################################ +SET GLOBAL rpl_semi_sync_master_wait_no_slave = 1; +connection slave; +STOP SLAVE IO_THREAD; +include/wait_for_slave_io_to_stop.inc +connection con1; +SET GLOBAL rpl_semi_sync_master_timeout = 1000; +INSERT INTO t1 values (1);; +connection con1; +# Rpl_semi_sync_master_no_tx should be non-zero +SHOW STATUS LIKE 'Rpl_semi_sync_master_no_tx' +connection slave; +START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc +connection con1; +INSERT INTO t1 values (2); +connection slave; +connection con1; +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +connection slave; +STOP SLAVE IO_THREAD; +include/wait_for_slave_io_to_stop.inc +connection con1; +SET GLOBAL rpl_semi_sync_master_wait_no_slave= 0; +SET GLOBAL rpl_semi_sync_master_timeout= 1000000000; +INSERT INTO t1 values (3); +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 0 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status OFF +connection slave; +START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc +connection con1; +SET GLOBAL rpl_semi_sync_master_timeout= 10000000; +SET GLOBAL rpl_semi_sync_master_wait_no_slave= 1; +INSERT INTO t1 values (4); +connection slave; +connection con1; +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +########################################## +# Test rpl_semi_sync_slave_delay_master # +########################################## +connection slave; +SET GLOBAL rpl_semi_sync_slave_delay_master= 1; +START SLAVE IO_THREAD; +Warnings: +Note 1254 Slave is already running +include/wait_for_slave_io_to_start.inc +connection con1; +INSERT INTO t1 values (3); +include/sync_slave_io_with_master.inc +connection con1; +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +connection slave; +connection slave; +select * from t1 order by a; +a +1 +2 +3 +3 +4 +connection con1; +select * from t1 order by a; +a +1 +2 +3 +3 +4 +connection slave; +SET GLOBAL rpl_semi_sync_slave_delay_master = 0; +STOP SLAVE IO_THREAD; +include/wait_for_slave_io_to_stop.inc +START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc +########################################################## +# Test rpl_semi_sync_master_enabled and new ACK thread # +######################################################### +connection con1; +SET GLOBAL rpl_semi_sync_master_enabled = 0; +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +INSERT INTO t1 VALUES (1); +SET GLOBAL rpl_semi_sync_master_enabled = 1; +INSERT INTO t1 VALUES (2); +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +# Test failure of select error . +SET GLOBAL debug = 'd,rpl_semisync_simulate_select_error'; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +INSERT INTO t1 VALUES(3); +connection slave; +connection con1; +# Test failure of pthread_create +SET GLOBAL rpl_semi_sync_master_enabled = 0; +SET GLOBAL debug = 'd,rpl_semisync_simulate_create_thread_failure'; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET GLOBAL rpl_semi_sync_master_enabled= ON; +# Test failure of pthread_join +SET GLOBAL rpl_semi_sync_master_enabled= OFF; +# +# Failure on registering semisync slave +# +SET GLOBAL debug= 'd,rpl_semisync_simulate_add_slave_failure'; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET GLOBAL rpl_semi_sync_master_enabled= ON; +connection slave; +STOP SLAVE IO_THREAD; +include/wait_for_slave_io_to_stop.inc +START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc +connection con1; +SET GLOBAL debug=''; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +connection slave; +START SLAVE IO_THREAD; +include/wait_for_slave_io_to_start.inc +connection con1; +connection slave; +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 0 +################################################################## +# Test fixing of BUG#70669 # +#SLAVE CAN'T CONTINUE REPLICATION AFTER MASTER'S CRASH RECOVERY # +################################################################# +connection con1; +SET GLOBAL sync_binlog = 1; +CREATE TABLE t2 (c1 INT); +connection slave; +connection con1; +INSERT INTO t2 values (1); +connection slave; +connection con2; +connection con1; +connection slave; +show tables like 't2'; +Tables_in_test (t2) +t2 +select * from t2; +c1 +1 +connection con1; +INSERT INTO t2 VALUES (2); +connection con2; +INSERT INTO t2 VALUES (3); +connection con1; +connection con2; +connection con1; +SET GLOBAL sync_binlog = 0; +DROP TABLE t2; +connection con2; +connection slave; +show tables like 't2'; +Tables_in_test (t2) +connection con2; +#cleanup +connection master; +SET DEBUG_SYNC= 'reset'; +disconnect con1; +disconnect con2; +disconnect con3; +SET GLOBAL rpl_semi_sync_master_timeout= 10000; +SET GLOBAL rpl_semi_sync_master_enabled = 0; +DROP TABLE t1; +connection slave; +SET GLOBAL rpl_semi_sync_slave_enabled = 0; +stop slave; +start slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index 7d351339925..0172336a99c 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -1,5 +1,7 @@ include/master-slave.inc [connection master] +connection slave; +connection master; ==== Test Without sql_mode=strict_trans_tables ==== create table t1 (n int not null primary key); connection slave; @@ -105,9 +107,7 @@ t2 CREATE TABLE `t2` ( `data` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -show global status like 'slave_skipped_errors'; -Variable_name Value -Slave_skipped_errors 4 +# Slave_skipped_errros = 4 connection master; INSERT INTO t2 VALUES(1, 1); INSERT INTO t2 VALUES(2, 1); @@ -119,9 +119,7 @@ SET SQL_LOG_BIN=1; UPDATE t2 SET id= id + 3, data = 2; connection slave; -show global status like 'slave_skipped_errors'; -Variable_name Value -Slave_skipped_errors 5 +# Slave_skipped_errros = 5 **** We cannot execute a select as there are differences in the **** behavior between STMT and RBR. ==== Clean Up ==== diff --git a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result index 9a34844489f..60ad6dc6e4f 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result +++ b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result @@ -35,6 +35,7 @@ a b 1 ZZ connection slave; call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* error.* 1146"); +call mtr.add_suppression("At line *"); include/wait_for_slave_sql_error.inc [errno=1146] SHOW TABLES LIKE 't%'; Tables_in_test (t%) diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 411a24278d5..686380427b5 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -17,7 +17,7 @@ insert into t1 values (b); insert into t1 values (unix_timestamp()); end| select * from mysql.proc where name='foo' and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 aggregate mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin declare b int; set b = 8; @@ -28,10 +28,10 @@ declare b int; set b = 8; insert into t1 values (b); insert into t1 values (unix_timestamp()); -end +end NONE connection slave; select * from mysql.proc where name='foo' and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 aggregate mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin declare b int; set b = 8; @@ -42,7 +42,7 @@ declare b int; set b = 8; insert into t1 values (b); insert into t1 values (unix_timestamp()); -end +end NONE connection master; set timestamp=1000000000; call foo(); @@ -128,6 +128,7 @@ show warnings; Level Code Message Error 1062 Duplicate entry '20' for key 'a' Warning 1196 Some non-transactional changed tables couldn't be rolled back +Note 4094 At line 4 in mysqltest1.foo4 select * from t2; a 20 @@ -136,19 +137,19 @@ select * from t2; a 20 select * from mysql.proc where name="foo4" and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 aggregate mysqltest1 foo4 PROCEDURE foo4 SQL CONTAINS_SQL YES DEFINER begin insert into t2 values(20),(20); end root@localhost # # latin1 latin1_swedish_ci latin1_swedish_ci begin insert into t2 values(20),(20); -end +end NONE connection master; drop procedure foo4; select * from mysql.proc where name="foo4" and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 aggregate connection slave; select * from mysql.proc where name="foo4" and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 aggregate connection master; drop procedure foo; drop procedure foo2; @@ -234,22 +235,22 @@ select fn3(); fn3() 0 select * from mysql.proc where db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 aggregate mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin return unix_timestamp(); end root@localhost # # latin1 latin1_swedish_ci latin1_swedish_ci begin return unix_timestamp(); -end +end NONE mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin return unix_timestamp(); end zedjzlcsjhd@localhost # # latin1 latin1_swedish_ci latin1_swedish_ci begin return unix_timestamp(); -end +end NONE mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin return 0; end root@localhost # # latin1 latin1_swedish_ci latin1_swedish_ci begin return 0; -end +end NONE select * from t1; a 1000000000 @@ -259,22 +260,22 @@ select * from t1; a 1000000000 select * from mysql.proc where db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 aggregate mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin return unix_timestamp(); end root@localhost # # latin1 latin1_swedish_ci latin1_swedish_ci begin return unix_timestamp(); -end +end NONE mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin return unix_timestamp(); end zedjzlcsjhd@localhost # # latin1 latin1_swedish_ci latin1_swedish_ci begin return unix_timestamp(); -end +end NONE mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin return 0; end root@localhost # # latin1 latin1_swedish_ci latin1_swedish_ci begin return 0; -end +end NONE connection master; delete from t2; alter table t2 add unique (a); @@ -290,6 +291,7 @@ end| do fn1(100); Warnings: Error 1062 Duplicate entry '100' for key 'a' +Note 4094 At line 3 in mysqltest1.fn1 Warning 1196 Some non-transactional changed tables couldn't be rolled back select fn1(20); ERROR 23000: Duplicate entry '20' for key 'a' @@ -808,7 +810,7 @@ insert into t1 values (b); insert into t1 values (unix_timestamp()); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values ( NAME_CONST('b',8)) @@ -816,7 +818,7 @@ insert into t1 values ( NAME_CONST('b',8)) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (unix_timestamp()) @@ -824,7 +826,7 @@ insert into t1 values (unix_timestamp()) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -870,7 +872,7 @@ insert into t2 values(3); insert into t1 values (5); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(3) @@ -878,7 +880,7 @@ insert into t2 values(3) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (15) @@ -886,7 +888,7 @@ insert into t1 values (15) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(3) @@ -897,7 +899,7 @@ COMMIT SET TIMESTAMP=t/*!*/; alter procedure foo4 sql security invoker /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(3) @@ -905,7 +907,7 @@ insert into t2 values(3) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (5) @@ -913,7 +915,7 @@ insert into t1 values (5) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t2 @@ -934,7 +936,7 @@ begin insert into t2 values(20),(20); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(20),(20) @@ -962,7 +964,7 @@ insert into t1 values (x); return x+2; end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete t1,t2 from t1,t2 @@ -970,7 +972,7 @@ delete t1,t2 from t1,t2 SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest1`.`fn1`(20) @@ -978,7 +980,7 @@ SELECT `mysqltest1`.`fn1`(20) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(fn1(21)) @@ -996,7 +998,7 @@ begin return unix_timestamp(); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -1004,7 +1006,7 @@ delete from t1 SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values(fn1()) @@ -1026,7 +1028,7 @@ begin return 0; end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t2 @@ -1047,7 +1049,7 @@ insert into t2 values(x),(x); return 10; end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest1`.`fn1`(100) @@ -1055,7 +1057,7 @@ SELECT `mysqltest1`.`fn1`(100) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest1`.`fn1`(20) @@ -1063,7 +1065,7 @@ SELECT `mysqltest1`.`fn1`(20) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -1074,7 +1076,7 @@ COMMIT SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10 /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (1) @@ -1082,7 +1084,7 @@ insert into t1 values (1) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -1093,7 +1095,7 @@ COMMIT SET TIMESTAMP=t/*!*/; drop trigger trg /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (1) @@ -1140,7 +1142,7 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW SET TIMESTAMP=t/*!*/; create table t1 (a int) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 (a) values (f1()) @@ -1167,7 +1169,7 @@ SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(arg VARCHAR(10)) INSERT INTO t1 VALUES(arg) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test' COLLATE 'latin1_swedish_ci')) @@ -1221,7 +1223,7 @@ SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqltest`.`test`() begin end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t values ( 1 ) @@ -1236,7 +1238,7 @@ insert into t values (1); return 0; end /*!*/; -BEGIN +START TRANSACTION /*!*/; use `mysqltest`/*!*/; SET TIMESTAMP=t/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_stm_sp.result b/mysql-test/suite/rpl/r/rpl_stm_sp.result new file mode 100644 index 00000000000..4e2d4c80fb6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_sp.result @@ -0,0 +1,26 @@ +include/master-slave.inc +[connection master] +# +# MDEV-11815 SP variables of temporal data types do not replicate correctly +# +connection master; +CREATE TABLE t1(a INT); +CREATE PROCEDURE p1() +BEGIN +DECLARE a TIME DEFAULT '01:01:01'; +INSERT INTO t1 VALUES (a=10101); +END; +$$ +CALL p1; +SELECT * FROM t1; +a +1 +connection slave; +SELECT * FROM t1; +a +1 +connection master; +DROP TABLE t1; +DROP PROCEDURE p1; +connection slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 597df34c302..a4dbf13290a 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -16,7 +16,7 @@ include/stop_slave.inc # It guarantees that SQL thread is applying the transaction when # STOP SLAVE command launchs. SET @saved_dbug = @@GLOBAL.debug_dbug; -SET GLOBAL debug_dbug= '+d,after_mysql_insert,*'; +set global debug_dbug= '+d,after_mysql_insert'; include/start_slave.inc # CREATE TEMPORARY TABLE with InnoDB engine @@ -101,7 +101,7 @@ include/stop_slave.inc connection master; include/stop_dump_threads.inc SET @saved_dbug = @@GLOBAL.debug_dbug; -SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*'; +set global debug_dbug= '+d,dump_thread_wait_before_send_xid'; connection slave; include/start_slave.inc BEGIN; diff --git a/mysql-test/suite/rpl/r/rpl_trans_no_trans.result b/mysql-test/suite/rpl/r/rpl_trans_no_trans.result new file mode 100644 index 00000000000..a7a6d921bc1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_trans_no_trans.result @@ -0,0 +1,44 @@ +include/master-slave.inc +[connection master] +create or replace table t1(id int)engine=innodb; +create or replace table t3(id int)engine=myisam; +create or replace function t99 (a int) +returns int(10) +MODIFIES SQL DATA +begin +if (a > 100) +then +insert into t3 values (a); +end if; +return a; +end// +begin; +insert into t1 values(t99(1)); +insert into t1 values(t99(101)); +commit; +select * from t1; +id +1 +101 +select * from t3; +id +101 +insert into t1 values(t99(1)); +drop function t99; +drop table t1,t3; +connection slave; +connection master; +CREATE TABLE t1 (i INT) ENGINE=InnoDB; +CREATE TABLE t2 (j INT) ENGINE=MyISAM; +CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW +BEGIN +SET @a = unknown_column_just_to_raise_an_error; +INSERT INTO t2 VALUES (NULL) ; +END|| +INSERT INTO t1 VALUES (1); +ERROR 42S22: Unknown column 'unknown_column_just_to_raise_an_error' in 'field list' +connection slave; +connection master; +drop trigger tr; +drop table t1,t2; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_typeconv.result b/mysql-test/suite/rpl/r/rpl_typeconv.result index e65dede28e0..1ba259edf8e 100644 --- a/mysql-test/suite/rpl/r/rpl_typeconv.result +++ b/mysql-test/suite/rpl/r/rpl_typeconv.result @@ -40,6 +40,10 @@ connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS=''; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = '' **** # +# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work +# +# End of MDEV-15821 +# # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 @@ -52,6 +56,10 @@ connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY' **** # +# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work +# +# End of MDEV-15821 +# # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 @@ -64,6 +72,10 @@ connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY'; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY' **** # +# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work +# +# End of MDEV-15821 +# # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 @@ -76,6 +88,10 @@ connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY'; **** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY,ALL_NON_LOSSY' **** # +# MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work +# +# End of MDEV-15821 +# # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 @@ -208,6 +224,26 @@ BIT(5) BIT(6) <Correct error> BIT(6) BIT(5) <Correct error> BIT(5) BIT(12) <Correct error> BIT(12) BIT(5) <Correct error> +TINYBLOB COMPRE TINYBLOB <Correct error> +TINYBLOB COMPRE BLOB <Correct error> +TINYBLOB COMPRE MEDIUMBLOB <Correct error> +TINYBLOB COMPRE LONGBLOB <Correct error> +TINYBLOB COMPRE VARBINARY(255) <Correct error> +BLOB COMPRESSED TINYBLOB <Correct error> +BLOB COMPRESSED BLOB <Correct error> +BLOB COMPRESSED MEDIUMBLOB <Correct error> +BLOB COMPRESSED LONGBLOB <Correct error> +BLOB COMPRESSED VARBINARY(65500 <Correct error> +MEDIUMBLOB COMP TINYBLOB <Correct error> +MEDIUMBLOB COMP BLOB <Correct error> +MEDIUMBLOB COMP MEDIUMBLOB <Correct error> +MEDIUMBLOB COMP LONGBLOB <Correct error> +MEDIUMBLOB COMP VARBINARY(65500 <Correct error> +LONGBLOB COMPRE TINYBLOB <Correct error> +LONGBLOB COMPRE BLOB <Correct error> +LONGBLOB COMPRE MEDIUMBLOB <Correct error> +LONGBLOB COMPRE LONGBLOB <Correct error> +LONGBLOB COMPRE VARBINARY(65500 <Correct error> TINYBLOB BLOB <Correct error> TINYBLOB MEDIUMBLOB <Correct error> TINYBLOB LONGBLOB <Correct error> @@ -352,6 +388,26 @@ BIT(5) BIT(6) ALL_NON_LOSSY <Correct value> BIT(6) BIT(5) ALL_NON_LOSSY <Correct error> BIT(5) BIT(12) ALL_NON_LOSSY <Correct value> BIT(12) BIT(5) ALL_NON_LOSSY <Correct error> +TINYBLOB COMPRE TINYBLOB ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE BLOB ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE MEDIUMBLOB ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE LONGBLOB ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE VARBINARY(255) ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED TINYBLOB ALL_NON_LOSSY <Correct error> +BLOB COMPRESSED BLOB ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED MEDIUMBLOB ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED LONGBLOB ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED VARBINARY(65500 ALL_NON_LOSSY <Correct error> +MEDIUMBLOB COMP TINYBLOB ALL_NON_LOSSY <Correct error> +MEDIUMBLOB COMP BLOB ALL_NON_LOSSY <Correct error> +MEDIUMBLOB COMP MEDIUMBLOB ALL_NON_LOSSY <Correct value> +MEDIUMBLOB COMP LONGBLOB ALL_NON_LOSSY <Correct value> +MEDIUMBLOB COMP VARBINARY(65500 ALL_NON_LOSSY <Correct error> +LONGBLOB COMPRE TINYBLOB ALL_NON_LOSSY <Correct error> +LONGBLOB COMPRE BLOB ALL_NON_LOSSY <Correct error> +LONGBLOB COMPRE MEDIUMBLOB ALL_NON_LOSSY <Correct error> +LONGBLOB COMPRE LONGBLOB ALL_NON_LOSSY <Correct value> +LONGBLOB COMPRE VARBINARY(65500 ALL_NON_LOSSY <Correct error> TINYBLOB BLOB ALL_NON_LOSSY <Correct value> TINYBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value> TINYBLOB LONGBLOB ALL_NON_LOSSY <Correct value> @@ -496,6 +552,26 @@ BIT(5) BIT(6) ALL_LOSSY <Correct error> BIT(6) BIT(5) ALL_LOSSY <Correct value> BIT(5) BIT(12) ALL_LOSSY <Correct error> BIT(12) BIT(5) ALL_LOSSY <Correct value> +TINYBLOB COMPRE TINYBLOB ALL_LOSSY <Correct error> +TINYBLOB COMPRE BLOB ALL_LOSSY <Correct error> +TINYBLOB COMPRE MEDIUMBLOB ALL_LOSSY <Correct error> +TINYBLOB COMPRE LONGBLOB ALL_LOSSY <Correct error> +TINYBLOB COMPRE VARBINARY(255) ALL_LOSSY <Correct error> +BLOB COMPRESSED TINYBLOB ALL_LOSSY <Correct value> +BLOB COMPRESSED BLOB ALL_LOSSY <Correct error> +BLOB COMPRESSED MEDIUMBLOB ALL_LOSSY <Correct error> +BLOB COMPRESSED LONGBLOB ALL_LOSSY <Correct error> +BLOB COMPRESSED VARBINARY(65500 ALL_LOSSY <Correct value> +MEDIUMBLOB COMP TINYBLOB ALL_LOSSY <Correct value> +MEDIUMBLOB COMP BLOB ALL_LOSSY <Correct value> +MEDIUMBLOB COMP MEDIUMBLOB ALL_LOSSY <Correct error> +MEDIUMBLOB COMP LONGBLOB ALL_LOSSY <Correct error> +MEDIUMBLOB COMP VARBINARY(65500 ALL_LOSSY <Correct value> +LONGBLOB COMPRE TINYBLOB ALL_LOSSY <Correct value> +LONGBLOB COMPRE BLOB ALL_LOSSY <Correct value> +LONGBLOB COMPRE MEDIUMBLOB ALL_LOSSY <Correct value> +LONGBLOB COMPRE LONGBLOB ALL_LOSSY <Correct error> +LONGBLOB COMPRE VARBINARY(65500 ALL_LOSSY <Correct value> TINYBLOB BLOB ALL_LOSSY <Correct error> TINYBLOB MEDIUMBLOB ALL_LOSSY <Correct error> TINYBLOB LONGBLOB ALL_LOSSY <Correct error> @@ -640,6 +716,26 @@ BIT(5) BIT(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value> BIT(6) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value> BIT(5) BIT(12) ALL_LOSSY,ALL_NON_LOSSY <Correct value> BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +TINYBLOB COMPRE VARBINARY(255) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +BLOB COMPRESSED VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value> +MEDIUMBLOB COMP TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +MEDIUMBLOB COMP BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +MEDIUMBLOB COMP MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +MEDIUMBLOB COMP LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +MEDIUMBLOB COMP VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value> +LONGBLOB COMPRE TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +LONGBLOB COMPRE BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +LONGBLOB COMPRE MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +LONGBLOB COMPRE LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> +LONGBLOB COMPRE VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value> TINYBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> TINYBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> TINYBLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> diff --git a/mysql-test/suite/rpl/r/rpl_update.result b/mysql-test/suite/rpl/r/rpl_update.result new file mode 100644 index 00000000000..31bc50a78de --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_update.result @@ -0,0 +1,16 @@ +include/master-slave.inc +[connection master] +set sql_mode=simultaneous_assignment; +create table t1 (a int, b int); +insert into t1 values(1, 2); +update t1 set a=b, b=a; +select * from t1; +a b +2 1 +connection slave; +select * from t1; +a b +2 1 +connection master; +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_view_debug.result b/mysql-test/suite/rpl/r/rpl_view_debug.result index e23f33c035f..1ec3dda9daa 100644 --- a/mysql-test/suite/rpl/r/rpl_view_debug.result +++ b/mysql-test/suite/rpl/r/rpl_view_debug.result @@ -24,7 +24,7 @@ connection master; SET @saved_dbug = @@SESSION.debug_dbug; set @@debug_dbug="d,simulate_register_view_failure"; CREATE VIEW v2 as SELECT * FROM t1; -ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space +ERROR HY000: Out of memory. show tables; Tables_in_test t1 diff --git a/mysql-test/suite/rpl/r/sequence.result b/mysql-test/suite/rpl/r/sequence.result new file mode 100644 index 00000000000..6286c5c7106 --- /dev/null +++ b/mysql-test/suite/rpl/r/sequence.result @@ -0,0 +1,129 @@ +include/rpl_init.inc [topology=1->2->3] +include/rpl_connect.inc [creating master] +include/rpl_connect.inc [creating slave] +include/rpl_connect.inc [creating slave2] +connection master; +set @@default_storage_engine="aria"; +CREATE SEQUENCE s1 cache=10; +create table t1 select * from s1; +select NEXT VALUE for s1,seq from seq_1_to_20; +NEXT VALUE for s1 seq +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +20 20 +insert into t1 select * from s1; +do setval(s1,5, 1, 0); +insert into t1 select * from s1; +do setval(s1, 5000, 1 ,0); +insert into t1 select * from s1; +alter sequence s1 minvalue=-1 start=-1 restart=-1; +insert into t1 select * from s1; +insert into s1 values(-100,-1000,9223372036854775806,1,1,1000,0,0); +insert into t1 select * from s1; +select * from t1; +next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count +1 1 9223372036854775806 1 1 10 0 0 +21 1 9223372036854775806 1 1 10 0 0 +21 1 9223372036854775806 1 1 10 0 0 +5001 1 9223372036854775806 1 1 10 0 0 +-1 -1 9223372036854775806 -1 1 10 0 0 +-100 -1000 9223372036854775806 1 1 1000 0 0 +connection slave; +select * from t1; +next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count +1 1 9223372036854775806 1 1 10 0 0 +21 1 9223372036854775806 1 1 10 0 0 +21 1 9223372036854775806 1 1 10 0 0 +5001 1 9223372036854775806 1 1 10 0 0 +-1 -1 9223372036854775806 -1 1 10 0 0 +-100 -1000 9223372036854775806 1 1 1000 0 0 +connection slave2; +select * from t1; +next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count +1 1 9223372036854775806 1 1 10 0 0 +21 1 9223372036854775806 1 1 10 0 0 +21 1 9223372036854775806 1 1 10 0 0 +5001 1 9223372036854775806 1 1 10 0 0 +-1 -1 9223372036854775806 -1 1 10 0 0 +-100 -1000 9223372036854775806 1 1 1000 0 0 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE SEQUENCE s1 cache=10 +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE `t1` ( + `next_not_cached_value` bigint(21) NOT NULL, + `minimum_value` bigint(21) NOT NULL, + `maximum_value` bigint(21) NOT NULL, + `start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used', + `increment` bigint(21) NOT NULL COMMENT 'increment value', + `cache_size` bigint(21) unsigned NOT NULL, + `cycle_option` tinyint(1) unsigned NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed', + `cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done' +) PAGE_CHECKSUM=1 +master-bin.000001 # Annotate_rows # # create table t1 select * from s1 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # select NEXT VALUE for s1,seq from seq_1_to_20 +master-bin.000001 # Table_map # # table_id: # (test.s1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select * from s1 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select * from s1 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # do setval(s1, 5000, 1 ,0) +master-bin.000001 # Table_map # # table_id: # (test.s1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select * from s1 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # GTID #-#-# +master-bin.000001 # Query # # use `test`; alter sequence s1 minvalue=-1 start=-1 restart=-1 +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select * from s1 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into s1 values(-100,-1000,9223372036854775806,1,1,1000,0,0) +master-bin.000001 # Table_map # # table_id: # (test.s1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select * from s1 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +connection master; +drop table s1,t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result index 64219e3908d..999d9417b3f 100644 --- a/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result +++ b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result @@ -3,6 +3,7 @@ include/master-slave.inc call mtr.add_suppression("Master is configured to log replication events"); connection slave; connection slave; +include/wait_for_slave_to_stop.inc start slave; connection master; include/rpl_end.inc |