diff options
author | Guilhem Bichot <guilhem.bichot@oracle.com> | 2010-08-11 19:56:56 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem.bichot@oracle.com> | 2010-08-11 19:56:56 +0200 |
commit | 53c8b221166d6d94a98e00ad4b3ba58da4d3a7eb (patch) | |
tree | 04057e64c955392f0086f704b8da252379c58ff5 /mysql-test/include/mysql_upgrade_preparation.inc | |
parent | a1d90f124f30f30d3bc609d7a5783341089e54ce (diff) | |
download | mariadb-git-53c8b221166d6d94a98e00ad4b3ba58da4d3a7eb.tar.gz |
fix for Bug #55672 "mysql_upgrade dies with internal error":
it couldn't parse the --ssl option.
client/mysql_upgrade.c:
mysql_upgrade parses its options and passes some of them to the underlying
tools (mysqlcheck etc). To do this passdown, it reconstructs a
command-line-suitable text from the my_option object (which
contains the option's name and option's value). For options
which expect no parameter, it just had to use the option's name;
for other options, it had to concatenate the option's name,
a "=" symbol, and the option's value; it had code to handle
this latter case, but only for GET_STR options (options taking a
string as value). But since the work on WL 4738, the --ssl
option, a GET_BOOL, which used to have no parameter (NO_ARG), can
now have one (OPT_ARG), so with --ssl we came to the "default"
label, error. Fixed by constructing the command-line-suitable
representation for GET_BOOL too. For --ssl it will produce
--ssl=1 ; for --ssl=0, it will produce --ssl=0.
mysql-test/include/mysql_upgrade_preparation.inc:
handles requirements of tests which use mysql_upgrade
mysql-test/r/mysql_upgrade_ssl.result:
result; without the code fix we would get "internal error".
mysql-test/t/mysql_upgrade.test:
This test has requirements before running; moved them
to an include file in order to share with mysql_upgrade_ssl.
mysql-test/t/mysql_upgrade_ssl.test:
test for bug. Couldn't go into mysql_upgrade.test as this new test requires
SSL support. --force is needed, in case mysql_upgrade.test run before
(in which case mysql_upgrade_ssl would say that upgrade has already been
done); --force forces the upgrade in all cases.
Diffstat (limited to 'mysql-test/include/mysql_upgrade_preparation.inc')
-rw-r--r-- | mysql-test/include/mysql_upgrade_preparation.inc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/include/mysql_upgrade_preparation.inc b/mysql-test/include/mysql_upgrade_preparation.inc new file mode 100644 index 00000000000..5de8a79d6e0 --- /dev/null +++ b/mysql-test/include/mysql_upgrade_preparation.inc @@ -0,0 +1,30 @@ +# Include this in any test using mysql_upgrade + +# Can't run test of external client with embedded server +-- source include/not_embedded.inc + +# Only run test if "mysql_upgrade" is found +--require r/have_mysql_upgrade.result +--disable_query_log +select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade; +--enable_query_log + +# +# Hack: +# +# If running with Valgrind ($VALGRIND_TEST <> 0) then the resource +# consumption (CPU) for upgrading a large log table will be intense. +# Therefore, truncate the log table in advance and issue a statement +# that should be logged. +# +if (`SELECT $VALGRIND_TEST`) +{ + --disable_query_log + --disable_result_log + --disable_abort_on_error + TRUNCATE TABLE mysql.general_log; + SELECT 1; + --enable_abort_on_error + --enable_result_log + --enable_query_log +} |