summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-01-20 01:57:34 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-01-20 01:57:34 +0100
commit139bf5ce4c3e67c287418a3c5043b056c9a5cf4d (patch)
treecd49cb0dc4c1a20783badae664af206eb06dc6bf
parent4502f3b93f4f70fb68ff00cb0ff72f234de50665 (diff)
downloadmariadb-git-139bf5ce4c3e67c287418a3c5043b056c9a5cf4d.tar.gz
MDEV-103: 'debug' is disabled in this build warnings causes tests to fail
The root cause is that after recent fixes around --debug variable (lp:909051) the variable is now available in both release and debug builds, such that MTR cannot tell a debug compiled server from optimized one. To fix, assign a special default value 'disabled' for 'debug' variable in optimized build and fix MTR to check for this special value to recognize optimized build.
-rwxr-xr-xmysql-test/mysql-test-run.pl5
-rw-r--r--sql/mysqld.cc2
2 files changed, 4 insertions, 3 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 7cbd225178e..1bef01e3bd5 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -2826,8 +2826,9 @@ sub check_ipv6_support {
sub check_debug_support ($) {
my $mysqld_variables= shift;
-
- if ( ! $mysqld_variables->{'debug'} )
+ my $debug_var= $mysqld_variables->{'debug'};
+
+ if ( !$debug_var || $debug_var eq "disabled")
{
#mtr_report(" - binaries are not debug compiled");
$debug_compiled_binaries= 0;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 41e554fabd5..cc0ee652b16 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1182,7 +1182,7 @@ static my_bool plugins_are_initialized= FALSE;
#ifndef DBUG_OFF
static const char* default_dbug_option;
#endif
-static const char *current_dbug_option;
+static const char *current_dbug_option="disabled";
#ifdef HAVE_LIBWRAP
const char *libwrapName= NULL;
int allow_severity = LOG_INFO;