diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index b54e21b6075..84ffe8e93ae 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -12,7 +12,9 @@ BEGIN -- Dump all global variables except those -- that are supposed to change SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES - WHERE variable_name != 'timestamp' and variable_name != "debug" order by variable_name; + WHERE variable_name != 'timestamp' AND variable_name != "debug" + AND variable_name != 'INNODB_IBUF_MAX_SIZE' + ORDER BY variable_name; -- Dump all databases, there should be none -- except those that was created during bootstrap diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 8ca1457ceaf..75dd7672b17 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -970,6 +970,16 @@ sub collect_one_test_case { } } + if ( $tinfo->{'not_valgrind'} ) + { + if ( $::opt_valgrind_mysqld ) + { + $tinfo->{'skip'}= 1; + $tinfo->{'comment'}= "Not compatible with Valgrind testing"; + return $tinfo; + } + } + # ---------------------------------------------------------------------- # Find config file to use if not already selected in .opt file # ---------------------------------------------------------------------- @@ -1050,6 +1060,7 @@ my @tags= ["include/ndb_master-slave.inc", "ndb_test", 1], ["federated.inc", "federated_test", 1], ["include/not_embedded.inc", "not_embedded", 1], + ["include/not_valgrind.inc", "not_valgrind", 1], ); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index dbf0840c1a5..cd92d4367ee 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -224,7 +224,7 @@ my $opt_strace_client; our $opt_user = "root"; my $opt_valgrind= 0; -my $opt_valgrind_mysqld= 0; +our $opt_valgrind_mysqld= 0; my $opt_valgrind_mysqltest= 0; my @default_valgrind_args= ("--show-reachable=yes"); my @valgrind_args; diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index c46b68761db..b5abf987461 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -160,6 +160,9 @@ static int safe_mutex_lazy_init_deadlock_detection(safe_mutex_t *mp) &mp->locked_mutex, sizeof(*mp->locked_mutex), &mp->used_mutex, sizeof(*mp->used_mutex), NullS)) { + /* Disable deadlock handling for this mutex */ + mp->create_flags|= MYF_NO_DEADLOCK_DETECTION; + mp->active_flags|= MYF_NO_DEADLOCK_DETECTION; return 1; /* Error */ } @@ -196,6 +199,9 @@ int safe_mutex_init(safe_mutex_t *mp, mp->line= line; /* Skip the very common '&' prefix from the autogenerated name */ mp->name= name[0] == '&' ? name + 1 : name; + + if (!safe_mutex_deadlock_detector) + my_flags|= MYF_NO_DEADLOCK_DETECTION; /* Deadlock detection is initialised only lazily, on first use. */ mp->create_flags= my_flags; diff --git a/storage/xtradb/ibuf/ibuf0ibuf.c b/storage/xtradb/ibuf/ibuf0ibuf.c index ac678471312..69ddc78427e 100644 --- a/storage/xtradb/ibuf/ibuf0ibuf.c +++ b/storage/xtradb/ibuf/ibuf0ibuf.c @@ -422,12 +422,7 @@ ibuf_init_at_db_start(void) grow in size, as the references on the upper levels of the tree can change */ - /* The default for ibuf_max_size is calculated from the requested - buffer pool size srv_buf_pool_size, not the actual size as returned - by buf_pool_get_curr_size(). The latter can differ from the former - by one page due to alignment requirements, and we do not want a - user-visible variable like INNODB_IBUF_MAX_SIZE to vary at random. */ - ibuf->max_size = ut_min( srv_buf_pool_size / UNIV_PAGE_SIZE + ibuf->max_size = ut_min( buf_pool_get_curr_size() / UNIV_PAGE_SIZE / IBUF_POOL_SIZE_PER_MAX_SIZE, (ulint) srv_ibuf_max_size / UNIV_PAGE_SIZE); srv_ibuf_max_size = (long long) ibuf->max_size * UNIV_PAGE_SIZE;