From 97dd057702d167559cdaee86eb0b1a455d925168 Mon Sep 17 00:00:00 2001 From: Monty Date: Mon, 12 Aug 2019 15:47:24 +0300 Subject: [PATCH] Fixed issues when running mtr with --valgrind - Note that some issues was also fixed in 10.2 and 10.4. I also fixed them here to be able to continue with making 10.5 valgrind safe again - Disable connection threads warnings when doing shutdown --- client/mysqltest.cc | 2 +- mysql-test/include/shutdown_mysqld.inc | 10 + mysql-test/main/sp-big.result | 4 +- mysql-test/main/sp-big.test | 13 +- mysql-test/mysql-test-run.pl | 10 +- .../suite/innodb/include/wait_all_purged.inc | 5 + mysql-test/suite/innodb/t/alter_copy.test | 2 + mysql-test/suite/innodb/t/log_file_name.test | 1 + .../suite/innodb/t/recovery_shutdown.test | 3 + .../rpl/r/rpl_row_big_table_id,32bit.rdiff | 58 +++--- .../suite/rpl/r/rpl_row_big_table_id.result | 58 +++--- .../suite/rpl/t/rpl_row_big_table_id.opt | 1 + .../suite/rpl/t/rpl_row_big_table_id.test | 12 +- mysql-test/valgrind.supp | 176 ++++++++++++++++++ sql/ha_partition.cc | 6 +- sql/sql_statistics.cc | 6 +- sql/wsrep_schema.cc | 2 +- storage/mroonga/ha_mroonga.cpp | 3 + .../rocksdb/mysql-test/rocksdb/t/disabled.def | 1 + vio/viosslfactories.c | 2 + 20 files changed, 299 insertions(+), 76 deletions(-) create mode 100644 mysql-test/suite/rpl/t/rpl_row_big_table_id.opt diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 5f28bf422e1..21f5780ffcb 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -10200,7 +10200,7 @@ void append_replace_regex(char* expr, char *expr_end, struct st_replace_regex* r /* Allow variable for the *entire* list of replacements */ if (*p == '$') { - const char *v_end; + const char *v_end= 0; VAR *val= var_get(p, &v_end, 0, 1); if (val) diff --git a/mysql-test/include/shutdown_mysqld.inc b/mysql-test/include/shutdown_mysqld.inc index c8ab6d00f0d..c787c2b8c3f 100644 --- a/mysql-test/include/shutdown_mysqld.inc +++ b/mysql-test/include/shutdown_mysqld.inc @@ -26,7 +26,17 @@ if ($rpl_inited) --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect --exec echo "wait" > $_expect_file_name +# Avoid warnings from connection threads that does not have time to exit +--disable_query_log +set @@global.log_warnings=0; +--enable_query_log + --let $server_shutdown_timeout= 60 +if ($VALGRIND_TEST) +{ + --let $server_shutdown_timeout= 300 +} + if ($shutdown_timeout) { --let $server_shutdown_timeout= $shutdown_timeout diff --git a/mysql-test/main/sp-big.result b/mysql-test/main/sp-big.result index 0a07a3aa7a8..ea93f2cac60 100644 --- a/mysql-test/main/sp-big.result +++ b/mysql-test/main/sp-big.result @@ -82,8 +82,8 @@ Warning 1287 '