maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #00444
bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2715)
#At lp:maria
2715 knielsen@xxxxxxxxxxxxxxx 2009-06-22
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.
modified:
mysql-test/include/mtr_check.sql
mysql-test/lib/mtr_cases.pm
mysql-test/mysql-test-run.pl
mysys/thr_mutex.c
storage/xtradb/ibuf/ibuf0ibuf.c
per-file messages:
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).
=== modified file 'mysql-test/include/mtr_check.sql'
--- a/mysql-test/include/mtr_check.sql 2009-02-19 09:01:25 +0000
+++ b/mysql-test/include/mtr_check.sql 2009-06-22 08:06:35 +0000
@@ -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
=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm 2009-03-20 14:39:37 +0000
+++ b/mysql-test/lib/mtr_cases.pm 2009-06-22 08:06:35 +0000
@@ -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
# ----------------------------------------------------------------------
@@ -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],
);
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2009-06-18 12:39:21 +0000
+++ b/mysql-test/mysql-test-run.pl 2009-06-22 08:06:35 +0000
@@ -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;
=== modified file 'mysys/thr_mutex.c'
--- a/mysys/thr_mutex.c 2009-06-09 15:08:46 +0000
+++ b/mysys/thr_mutex.c 2009-06-22 08:06:35 +0000
@@ -160,6 +160,9 @@ static int safe_mutex_lazy_init_deadlock
&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;
=== modified file 'storage/xtradb/ibuf/ibuf0ibuf.c'
--- a/storage/xtradb/ibuf/ibuf0ibuf.c 2009-06-09 15:08:46 +0000
+++ b/storage/xtradb/ibuf/ibuf0ibuf.c 2009-06-22 08:06:35 +0000
@@ -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;