summaryrefslogtreecommitdiff
path: root/tests/mysql_client_fw.c
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-11-29 17:51:23 +0200
committerMonty <monty@mariadb.org>2015-11-29 17:51:23 +0200
commitc3018b0ff4fb02c029787d03867adf0530607bab (patch)
treec3497838c222af9445a16312ecbd0e78ebc62f66 /tests/mysql_client_fw.c
parent654547b5b4b21aec719a84149595464364c96eea (diff)
downloadmariadb-git-c3018b0ff4fb02c029787d03867adf0530607bab.tar.gz
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
Diffstat (limited to 'tests/mysql_client_fw.c')
-rw-r--r--tests/mysql_client_fw.c8
1 files changed, 8 insertions, 0 deletions
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();