From c3018b0ff4fb02c029787d03867adf0530607bab Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 29 Nov 2015 17:51:23 +0200 Subject: Fixes to get all test to run on MacosX Lion 10.7 This includes fixing all utilities to not have any memory leaks, as safemalloc warnings stopped tests from passing on MacOSX. - Ensure that all clients takes character-set-dir, as the libmysqlclient library will use it. - mysql-test-run now passes character-set-dir to all external clients. - Changed dynstr_free() so that it can be called twice (made freeing code easier) - Changed rpl_global_gtid_slave_state to be allocated dynamicly as it includes a mutex that needs to be initizlied/destroyed before my_end() is called. - Removed rpl_slave_state::init() and rpl_slave_stage::deinit() as their job are better handling by constructor and delete. - Print alias instead of table_name in check_duplicate_key as table_name may have been converted to lower case. Other things: - Fixed a case in time_to_datetime_with_warn() where we where using && instead of & in tests --- tests/mysql_client_fw.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/mysql_client_fw.c') diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c index 990fdb158be..b7211989f1f 100644 --- a/tests/mysql_client_fw.c +++ b/tests/mysql_client_fw.c @@ -67,6 +67,7 @@ static unsigned int opt_drop_db= 1; static const char *opt_basedir= "./"; static const char *opt_vardir= "mysql-test/var"; +static char mysql_charsets_dir[FN_REFLEN+1]; static longlong opt_getopt_ll_test= 0; @@ -1187,6 +1188,9 @@ static struct my_option client_test_long_options[] = { {"basedir", 'b', "Basedir for tests.", &opt_basedir, &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"character-sets-dir", 'C', + "Directory for character set files.", &charsets_dir, + &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"count", 't', "Number of times test to be executed", &opt_count_read, &opt_count_read, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0}, {"database", 'D', "Database to use", &opt_db, &opt_db, @@ -1332,6 +1336,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), exit(0); break; } + case 'C': + strmake_buf(mysql_charsets_dir, argument); + charsets_dir = mysql_charsets_dir; + break; case '?': case 'I': /* Info */ usage(); -- cgit v1.2.1