From d10bddf0ed28b5fac5cfe7d9b3405384ab53f81f Mon Sep 17 00:00:00 2001 From: Chuck Bell Date: Fri, 9 Sep 2011 10:39:44 -0400 Subject: [PATCH] BUG#12929631 : Execute crashes with --verbose output (Windows) This patch corrects an error encountered in PB where Windows machines are built in release mode have an extraneous parameter added in place of the --console option. This is caused by the insert of '(null' instead of an empty string. In non-debug mode, the string is explicitly set to an empty string. Patch also fixes a result mismatch on Windows machines. --- client/mysql_plugin.c | 2 ++ mysql-test/t/mysql_plugin.test | 1 + 2 files changed, 3 insertions(+) diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index 406366efd51..825c962c486 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -1169,6 +1169,8 @@ static int bootstrap_server(char *server_path, char *bootstrap_file) if (opt_verbose) verbose_str= "--console"; + else + verbose_str= ""; if (has_spaces(opt_datadir) || has_spaces(opt_basedir) || has_spaces(bootstrap_file)) format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s < %s\""; diff --git a/mysql-test/t/mysql_plugin.test b/mysql-test/t/mysql_plugin.test index b07ce40e43a..09615ec8f00 100644 --- a/mysql-test/t/mysql_plugin.test +++ b/mysql-test/t/mysql_plugin.test @@ -224,6 +224,7 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MY --echo # Attempt to use bad paths - basedir --echo # let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR; +replace_result "/basedir_not_there//" "/basedir_not_there/"; --error 1,2,256 --exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1