summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/rpl/include/rpl_binlog_errors.inc2
-rw-r--r--mysql-test/suite/rpl/r/rpl_000011.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_ip_mix.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_ip_mix2.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_rotate_logs.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_find_row_debug.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_error.result10
-rw-r--r--mysql-test/suite/rpl/t/rpl_000011.test20
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix2.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_rotate_logs.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_find_row_debug.test15
-rw-r--r--mysql-test/suite/rpl/t/rpl_skip_error.test14
-rw-r--r--sql/slave.cc1
14 files changed, 53 insertions, 36 deletions
diff --git a/mysql-test/suite/rpl/include/rpl_binlog_errors.inc b/mysql-test/suite/rpl/include/rpl_binlog_errors.inc
index 46c76f2b04c..72f8bc053e3 100644
--- a/mysql-test/suite/rpl/include/rpl_binlog_errors.inc
+++ b/mysql-test/suite/rpl/include/rpl_binlog_errors.inc
@@ -431,5 +431,7 @@ call mtr.add_suppression("Can't generate a unique log-filename .*");
-- source include/stop_slave_sql.inc
RESET SLAVE;
RESET MASTER;
+--remove_file $load_file
+--remove_file $load_file2
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc
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_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_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_find_row_debug.result b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result
index 491fb68615c..269dc16733a 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
@@ -15,7 +15,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 = '';
SET GLOBAL log_warnings = 2;
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/t/rpl_000011.test b/mysql-test/suite/rpl/t/rpl_000011.test
index 216e568fc42..289b79f7de8 100644
--- a/mysql-test/suite/rpl/t/rpl_000011.test
+++ b/mysql-test/suite/rpl/t/rpl_000011.test
@@ -5,19 +5,19 @@
#
source include/master-slave.inc;
-
+--connection slave
+let $initial_com_insert= query_get_value(show global status like "Com_insert", Value, 1);
+--connection master
create table t1 (n int);
insert into t1 values(1);
-sync_slave_with_master;
-show global status like 'com_insert';
+sync_slave_with_master;
+let $current_com_insert= query_get_value(show global status like "Com_insert", Value, 1);
+--let $delta_com_insert= `select $current_com_insert - $initial_com_insert from dual`
+--echo # Com_insert = $delta_com_insert
stop slave;
-# Temporary work-around for bug MDEV-8301. There is a small window during
-# thread exit where the local status values of a thread are counted twice
-# in the global status. Remove this wait_condition.inc once MDEV-8301 is
-# fixed.
---let $wait_condition= SELECT variable_value=1 FROM information_schema.global_status WHERE variable_name="Com_insert";
---source include/wait_condition.inc
-show global status like 'com_insert';
+let $current_com_insert= query_get_value(show global status like "Com_insert", Value, 1);
+--let $delta_com_insert= `select $current_com_insert - $initial_com_insert from dual`
+--echo # Com_insert = $delta_com_insert
--source include/wait_for_slave_to_stop.inc
start slave;
--source include/wait_for_slave_to_start.inc
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix.test b/mysql-test/suite/rpl/t/rpl_ip_mix.test
index 3ddbd598334..63c5fa9251c 100644
--- a/mysql-test/suite/rpl/t/rpl_ip_mix.test
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix.test
@@ -44,3 +44,5 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
# clean up
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
+--connection slave
+reset slave all;
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2.test b/mysql-test/suite/rpl/t/rpl_ip_mix2.test
index feaf4af44cf..3fff54e52bf 100644
--- a/mysql-test/suite/rpl/t/rpl_ip_mix2.test
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix2.test
@@ -45,3 +45,5 @@ let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
# clean up
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
+connection slave;
+reset slave all;
diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test
index 358c0be5b3b..0d65a05bf50 100644
--- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test
@@ -193,4 +193,8 @@ show binlog events in '';
purge master logs before now();
--echo End of 5.0 tests
+--echo #cleanup
+
+--remove_file $MYSQLD_SLAVE_DATADIR/master.info
--source include/stop_slave.inc
+reset slave all;
diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test
index fb7491b0077..9c0ee1cdbbb 100644
--- a/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test
+++ b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test
@@ -42,16 +42,11 @@ DROP TABLE t1;
--sync_slave_with_master
--echo # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log
-perl;
- use strict;
- my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set";
- open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
- my $upd_count = () = grep(/The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount/g,<FILE>);
- seek(FILE, 0, 0) or die "Can't seek to beginning of file: $!";
- my $del_count = () = grep(/The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/g,<FILE>);
- print "Occurrences: update=$upd_count, delete=$del_count\n";
- close(FILE);
-EOF
+--let SEARCH_FILE=$log_error_
+--let SEARCH_PATTERN=The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount
+--source include/search_pattern_in_file.inc
# cleanup
--source include/stop_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test
index fa8eeb73fba..d3ef834e8ec 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_error.test
+++ b/mysql-test/suite/rpl/t/rpl_skip_error.test
@@ -26,6 +26,10 @@
source include/have_innodb.inc;
source include/master-slave.inc;
+--connection slave
+let $initial_skipped_error= query_get_value(show global status like "Slave_skipped_errors", Value, 1);
+
+connection master;
--echo ==== Test Without sql_mode=strict_trans_tables ====
create table t1 (n int not null primary key);
@@ -133,8 +137,9 @@ connection slave;
CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MyIsam;
SHOW CREATE TABLE t2;
-show global status like 'slave_skipped_errors';
-
+let $current_skipped_error= query_get_value(show global status like "Slave_skipped_errors", Value, 1);
+--let $delta_skipped_error= `select $current_skipped_error - $initial_skipped_error from dual`
+--echo # Slave_skipped_errros = $delta_skipped_error
connection master;
INSERT INTO t2 VALUES(1, 1);
@@ -151,7 +156,10 @@ sync_slave_with_master;
let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
echo $error;
-show global status like 'slave_skipped_errors';
+
+let $current_skipped_error= query_get_value(show global status like "Slave_skipped_errors", Value, 1);
+--let $delta_skipped_error= `select $current_skipped_error - $initial_skipped_error from dual`
+--echo # Slave_skipped_errros = $delta_skipped_error
--echo **** We cannot execute a select as there are differences in the
--echo **** behavior between STMT and RBR.
diff --git a/sql/slave.cc b/sql/slave.cc
index 165aa20b1ee..7a9882de507 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -6214,6 +6214,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
DBUG_ASSERT(debug_sync_service);
DBUG_ASSERT(!debug_sync_set_action(current_thd,
STRING_WITH_LEN(act)));
+ dbug_rows_event_count = 0;
};);
#endif
mysql_mutex_lock(&mi->data_lock);