Commit 7c5e321b authored by unknown's avatar unknown

More XtraDB after-merge fixes following review and buildbot runs:

 - Better fix for --innodb-use-sys-malloc causing Valgrind warnings.
 - Different fix for INNODB_IBUF_MAX_SIZE variable changing default value.
 - Fix some problems with the safe mutex lazy init patch.

mysql-test/include/mtr_check.sql:
  Do not check INNODB_IBUF_MAX_SIZE for changes. It is not a dynamic variable, so cannot
  be changed by a test case anyway, and the value may vary slightly from one start of the
  server to the next.
mysql-test/lib/mtr_cases.pm:
  Even just starting and stopping the server with --innodb-use-sys-malloc to check for
  disabled test case under valgrind will cause valgrind leak warnings. So add not_valgrind
  to the list of conditions also tested for directly in mysql-test-run.pl.
mysql-test/mysql-test-run.pl:
  Even just starting and stopping the server with --innodb-use-sys-malloc to check for
  disabled test case under valgrind will cause valgrind leak warnings. So add not_valgrind
  to the list of conditions also tested for directly in mysql-test-run.pl.
mysys/thr_mutex.c:
  Fix a few problems found during review of the lazy init safe mutex patch.
storage/xtradb/ibuf/ibuf0ibuf.c:
  Revert previous fix of INNODB_IBUF_MAX_SIZE default varying slightly between server starts.
  (Fixed instead by ignoring that variable in the test suite).
parent 2a663359
...@@ -12,7 +12,9 @@ BEGIN ...@@ -12,7 +12,9 @@ BEGIN
-- Dump all global variables except those -- Dump all global variables except those
-- that are supposed to change -- that are supposed to change
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 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 -- Dump all databases, there should be none
-- except those that was created during bootstrap -- except those that was created during bootstrap
......
...@@ -970,6 +970,16 @@ sub collect_one_test_case { ...@@ -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 <testname>.opt file # Find config file to use if not already selected in <testname>.opt file
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -1050,6 +1060,7 @@ my @tags= ...@@ -1050,6 +1060,7 @@ my @tags=
["include/ndb_master-slave.inc", "ndb_test", 1], ["include/ndb_master-slave.inc", "ndb_test", 1],
["federated.inc", "federated_test", 1], ["federated.inc", "federated_test", 1],
["include/not_embedded.inc", "not_embedded", 1], ["include/not_embedded.inc", "not_embedded", 1],
["include/not_valgrind.inc", "not_valgrind", 1],
); );
......
...@@ -224,7 +224,7 @@ my $opt_strace_client; ...@@ -224,7 +224,7 @@ my $opt_strace_client;
our $opt_user = "root"; our $opt_user = "root";
my $opt_valgrind= 0; my $opt_valgrind= 0;
my $opt_valgrind_mysqld= 0; our $opt_valgrind_mysqld= 0;
my $opt_valgrind_mysqltest= 0; my $opt_valgrind_mysqltest= 0;
my @default_valgrind_args= ("--show-reachable=yes"); my @default_valgrind_args= ("--show-reachable=yes");
my @valgrind_args; my @valgrind_args;
......
...@@ -160,6 +160,9 @@ static int safe_mutex_lazy_init_deadlock_detection(safe_mutex_t *mp) ...@@ -160,6 +160,9 @@ static int safe_mutex_lazy_init_deadlock_detection(safe_mutex_t *mp)
&mp->locked_mutex, sizeof(*mp->locked_mutex), &mp->locked_mutex, sizeof(*mp->locked_mutex),
&mp->used_mutex, sizeof(*mp->used_mutex), NullS)) &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 */ return 1; /* Error */
} }
...@@ -196,6 +199,9 @@ int safe_mutex_init(safe_mutex_t *mp, ...@@ -196,6 +199,9 @@ int safe_mutex_init(safe_mutex_t *mp,
mp->line= line; mp->line= line;
/* Skip the very common '&' prefix from the autogenerated name */ /* Skip the very common '&' prefix from the autogenerated name */
mp->name= name[0] == '&' ? name + 1 : 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. */ /* Deadlock detection is initialised only lazily, on first use. */
mp->create_flags= my_flags; mp->create_flags= my_flags;
......
...@@ -422,12 +422,7 @@ ibuf_init_at_db_start(void) ...@@ -422,12 +422,7 @@ ibuf_init_at_db_start(void)
grow in size, as the references on the upper levels of the tree can grow in size, as the references on the upper levels of the tree can
change */ change */
/* The default for ibuf_max_size is calculated from the requested ibuf->max_size = ut_min( buf_pool_get_curr_size() / UNIV_PAGE_SIZE
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_POOL_SIZE_PER_MAX_SIZE, (ulint) srv_ibuf_max_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; srv_ibuf_max_size = (long long) ibuf->max_size * UNIV_PAGE_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment