diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-06-22 10:06:35 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-06-22 10:06:35 +0200 |
commit | 7c5e321bb8a4ac0a1683447434a5cfe06452a0f9 (patch) | |
tree | 90db11d751d5fb81d51a4fd25ef6204bea889826 | |
parent | 2a663359a4a1c7fda3b67d92dfcea19fa9c76410 (diff) | |
download | mariadb-git-7c5e321bb8a4ac0a1683447434a5cfe06452a0f9.tar.gz |
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).
-rw-r--r-- | mysql-test/include/mtr_check.sql | 4 | ||||
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 11 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | mysys/thr_mutex.c | 6 | ||||
-rw-r--r-- | storage/xtradb/ibuf/ibuf0ibuf.c | 7 |
5 files changed, 22 insertions, 8 deletions
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 <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], ); 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; |