diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index aa7da22d20c..76ea349cd83 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -584,6 +584,7 @@ sub main { } mtr_report_test($tinfo); push @$completed, $tinfo; + ++$num_tests } mtr_print_line(); @@ -599,7 +600,8 @@ sub main { if ( @$completed != $num_tests) { - mtr_error("Not all tests completed"); + mtr_error("Not all tests completed (only ". scalar(@$completed) . + " of $num_tests)"); } remove_vardir_subs() if $opt_clean_vardir; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 022523d4749..3db422657e3 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -4770,79 +4770,11 @@ INSERT INTO b12809202_db.t2 VALUES (1), (2), (3); -- Retrieving table structure for table t1... -- Sending SELECT query... -- Retrieving rows... --- --- Host: localhost Database: b12809202_db --- ------------------------------------------------------ - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `t1` --- - -DROP TABLE IF EXISTS `t1`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `t1` ( - `c1` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `t1` --- - -LOCK TABLES `t1` WRITE; -/*!40000 ALTER TABLE `t1` DISABLE KEYS */; -INSERT INTO `t1` VALUES (1),(2),(3); -- Retrieving table structure for table t2... -- Sending SELECT query... -- Retrieving rows... -/*!40000 ALTER TABLE `t1` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `t2` --- - -DROP TABLE IF EXISTS `t2`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `t2` ( - `c1` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `t2` --- - -LOCK TABLES `t2` WRITE; -/*!40000 ALTER TABLE `t2` DISABLE KEYS */; -INSERT INTO `t2` VALUES (1),(2),(3); -/*!40000 ALTER TABLE `t2` ENABLE KEYS */; -UNLOCK TABLES; -- Disconnecting from localhost... -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed #### Dump ends here #### DROP TABLE b12809202_db.t1; DROP TABLE b12809202_db.t2; diff --git a/mysql-test/suite/perfschema/r/all_instances.result b/mysql-test/suite/perfschema/r/all_instances.result index 7eb2bc73d8e..dedaf9612a9 100644 --- a/mysql-test/suite/perfschema/r/all_instances.result +++ b/mysql-test/suite/perfschema/r/all_instances.result @@ -1,5 +1,8 @@ use performance_schema; -select name from mutex_instances where name not rlike '/(DEBUG_SYNC::mutex)$' group by name; +select name from mutex_instances +where name not rlike '/(DEBUG_SYNC::mutex)$' + and name != 'wait/synch/mutex/mysys/BITMAP::mutex' + group by name; name wait/synch/mutex/archive/archive_mutex wait/synch/mutex/aria/LOCK_trn_list @@ -16,7 +19,6 @@ wait/synch/mutex/blackhole/blackhole wait/synch/mutex/csv/tina wait/synch/mutex/memory/HP_SHARE::intern_lock wait/synch/mutex/myisam/MYISAM_SHARE::intern_lock -wait/synch/mutex/mysys/BITMAP::mutex wait/synch/mutex/mysys/KEY_CACHE::cache_lock wait/synch/mutex/mysys/LOCK_alarm wait/synch/mutex/mysys/LOCK_uuid_generator diff --git a/mysql-test/suite/perfschema/t/all_instances.test b/mysql-test/suite/perfschema/t/all_instances.test index 46b2c06c327..1119f523829 100644 --- a/mysql-test/suite/perfschema/t/all_instances.test +++ b/mysql-test/suite/perfschema/t/all_instances.test @@ -17,7 +17,10 @@ use performance_schema; # "where" filters out instances that can be conditionally compiled out # -select name from mutex_instances where name not rlike '/(DEBUG_SYNC::mutex)$' group by name; +select name from mutex_instances + where name not rlike '/(DEBUG_SYNC::mutex)$' + and name != 'wait/synch/mutex/mysys/BITMAP::mutex' + group by name; # CRYPTO_dynlock_value::lock exists only when building with OpenSSL (not YaSSL). select name from rwlock_instances where name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock") diff --git a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result index 1bee6f2ec1a..8a4de852617 100644 --- a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result +++ b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result @@ -1,12 +1,12 @@ include/master-slave.inc [connection master] +include/stop_slave.inc call mtr.add_suppression("Error in Log_event::read_log_event()"); include/rpl_stop_server.inc [server_number=1] include/rpl_start_server.inc [server_number=1] show binlog events; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log"); -stop slave; reset slave; start slave; include/wait_for_slave_param.inc [Last_IO_Errno] diff --git a/mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result b/mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result index 34024f89617..1bda3bd3ee1 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result @@ -5,6 +5,7 @@ Log_name File_size master-bin.000001 # create table t1 (f text) engine=innodb; SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +SET DEBUG_SYNC = 'after_purge_logs_before_date SIGNAL continued'; insert into t1 set f=repeat('a', 4096); *** there must be two logs in the list *** show binary logs; @@ -19,11 +20,14 @@ master-bin.000001 # master-bin.000002 # master-bin.000003 # SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'now WAIT_FOR continued'; SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +SET DEBUG_SYNC = 'after_purge_logs_before_date SIGNAL continued'; insert into t1 set f=repeat('b', 4096); SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'now WAIT_FOR continued'; SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET'; drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test index 5e88b163d99..9789079bde6 100644 --- a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test +++ b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test @@ -20,9 +20,15 @@ # --source include/not_windows.inc -call mtr.add_suppression("Error in Log_event::read_log_event()"); +--connection slave +# Make sure the slave is stopped while we are messing with master. +# Otherwise we get occasional failures as the slave manages to re-connect +# to the newly started master and we get extra events applied, causing +# conflicts. +--source include/stop_slave.inc --connection master +call mtr.add_suppression("Error in Log_event::read_log_event()"); --let $datadir= `SELECT @@datadir` --let $rpl_server_number= 1 @@ -42,7 +48,6 @@ show binlog events; --connection slave call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log"); -stop slave; reset slave; start slave; diff --git a/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test b/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test index 429612c405f..a63844b451c 100644 --- a/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test +++ b/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test @@ -20,6 +20,7 @@ connection master; source include/show_binary_logs.inc; create table t1 (f text) engine=innodb; SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +SET DEBUG_SYNC = 'after_purge_logs_before_date SIGNAL continued'; send insert into t1 set f=repeat('a', 4096); connection master1; @@ -38,6 +39,7 @@ insert into t1 set f=repeat('b', 4096); source include/show_binary_logs.inc; SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'now WAIT_FOR continued'; SET DEBUG_SYNC = 'RESET'; # the first connection finally completes its INSERT @@ -54,6 +56,7 @@ sync_slave_with_master; connection master; SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +SET DEBUG_SYNC = 'after_purge_logs_before_date SIGNAL continued'; send insert into t1 set f=repeat('b', 4096); connection master1; @@ -80,6 +83,7 @@ let $wait_condition= --source include/wait_condition.inc SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'now WAIT_FOR continued'; SET DEBUG_SYNC = 'RESET'; connection master; diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 302d79b6b13..424dd35a819 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -2249,8 +2249,12 @@ INSERT INTO b12809202_db.t2 VALUES (1), (2), (3); --echo # commit starting 5.5. --echo --echo #### Dump starts here #### +# We only need to check the --verbose output to verify that "start transaction" +# happens after "logs flushed". We redirect normal output, as otherwise the +# mixing of normal (stdout) and --verbose (stderr) output will happen in random +# order depending on stdio internal buffer size. --replace_regex /-- Server version.*// /-- MySQL dump .*// /-- Dump completed on .*/-- Dump completed/ ---exec $MYSQL_DUMP --verbose --single-transaction --flush-log b12809202_db 2>&1 +--exec $MYSQL_DUMP --verbose --single-transaction --flush-log b12809202_db 2>&1 > $MYSQLTEST_VARDIR/tmp/bug61854.sql --echo --echo #### Dump ends here #### diff --git a/sql/log.cc b/sql/log.cc index af400c19f4a..9e9716dde67 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -5372,6 +5372,7 @@ void MYSQL_BIN_LOG::purge() { purge_logs_before_date(purge_time); } + DEBUG_SYNC(current_thd, "after_purge_logs_before_date"); } #endif }