summaryrefslogtreecommitdiff
path: root/mysys
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 /mysys
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 'mysys')
-rw-r--r--mysys/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/string.c b/mysys/string.c
index 42fe83ed4e1..cc73d18c601 100644
--- a/mysys/string.c
+++ b/mysys/string.c
@@ -208,7 +208,8 @@ my_bool dynstr_append_quoted(DYNAMIC_STRING *str,
void dynstr_free(DYNAMIC_STRING *str)
{
- my_free(str->str);
+ if (str->str) /* Safety to allow double free */
+ my_free(str->str);
str->str= NULL;
}