From 04879e4045e939b7a032b77578c6db92100e7b02 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 21 Feb 2011 14:23:44 +0100 Subject: [PATCH] Fix remaining 5.2 buildbot problems: - Cherrypick MBUG#688404 (PBXT crashes in debug/x64) - Fix unixism (rm -rf) in the test suite_timeout - Avoid plugin tests on Windows/embedded, plugins do not and will not work here --- mysql-test/include/have_example_plugin.inc | 2 +- mysql-test/mysql-test-run.pl | 5 +++-- .../suite/parts/inc/partition_check_drop.inc | 4 ++-- storage/pbxt/src/memory_xt.h | 17 +++++++++++++++-- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc index a344b79700b..2d2a9dc8f7b 100644 --- a/mysql-test/include/have_example_plugin.inc +++ b/mysql-test/include/have_example_plugin.inc @@ -3,7 +3,7 @@ # i.e it will support dlopen # --source include/have_dynamic_loading.inc - +--source include/not_windows_embedded.inc # # Check if the variable HA_EXAMPLE_SO is set # diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 59139ca2804..ce1dafa2517 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -320,9 +320,10 @@ sub main { gcov_prepare($basedir . "/" . $opt_gcov_src_dir); } + if (!$opt_suites) { $opt_suites= $DEFAULT_SUITES; - + # Check for any extra suites to enable based on the path name my %extra_suites= ( @@ -2376,7 +2377,7 @@ sub setup_vardir() { $plugindir="$opt_vardir/plugins"; unshift (@opt_extra_mysqld_opt, "--plugin-dir=$plugindir"); mkpath($plugindir); - if (IS_WINDOWS) + if (IS_WINDOWS && !$opt_embedded_server) { for (<../storage/*$opt_vs_config/*.dll>, <../plugin/*$opt_vs_config/*.dll>, diff --git a/mysql-test/suite/parts/inc/partition_check_drop.inc b/mysql-test/suite/parts/inc/partition_check_drop.inc index daaa5e541c7..57749591c70 100644 --- a/mysql-test/suite/parts/inc/partition_check_drop.inc +++ b/mysql-test/suite/parts/inc/partition_check_drop.inc @@ -66,10 +66,10 @@ if ($found_garbage) } # Do a manual cleanup, because the following tests should not suffer from # remaining files - --exec rm -f $MYSQLD_DATADIR/test/t1* || true + --exec perl -e "unlink(<$MYSQLD_DATADIR/test/t1*>)" if ($with_directories) { - --exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true + --exec perl -e "unlink(<$MYSQLD_DATADIR/test/tmp/t1*>)" } } --enable_query_log diff --git a/storage/pbxt/src/memory_xt.h b/storage/pbxt/src/memory_xt.h index 1785cd0bd51..bfc7990f914 100644 --- a/storage/pbxt/src/memory_xt.h +++ b/storage/pbxt/src/memory_xt.h @@ -29,8 +29,21 @@ struct XTThread; -#ifdef DEBUG -#define DEBUG_MEMORY +#if (defined DEBUG) +/* + Disable PBXT debug malloc on Windows, as it is not properly aligned. + malloc() alignment requiremebt on x64 is documented as 16 bytes. PBXT debug + malloc is only 8 bytes aligned. Improper alignment will lead to a crash if + e.g SSE instructions access heap memory. + + This might be general problem , however crashes were seen so far only + on Windows (crash during setjmp() on memory allocated with pbxt debug malloc). + + Besides, on Windows there is already a debug malloc by C runtime. +*/ +#ifndef _WIN32 + #define DEBUG_MEMORY +#endif #endif #ifdef DEBUG_MEMORY