diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2008-12-13 19:42:12 +0000 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2008-12-13 19:42:12 +0000 |
commit | 19f859a27e60270f3cdc7e2edc34e88c29536c21 (patch) | |
tree | 3ca8c469534126c025304d8d96dbeb2b359a6c00 /mysys | |
parent | 5c16a315ca28c18949e27b91cddf0886329d1dd4 (diff) | |
parent | ba816c14a9bc8012759da9d58f858f1e73bec708 (diff) | |
download | mariadb-git-19f859a27e60270f3cdc7e2edc34e88c29536c21.tar.gz |
merge 5.1 --> 5.1-rpl
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_tempdir.c | 2 | ||||
-rw-r--r-- | mysys/my_getopt.c | 19 | ||||
-rw-r--r-- | mysys/my_init.c | 2 | ||||
-rw-r--r-- | mysys/my_thr_init.c | 12 |
4 files changed, 15 insertions, 20 deletions
diff --git a/mysys/mf_tempdir.c b/mysys/mf_tempdir.c index b2c18c74347..d6492c90965 100644 --- a/mysys/mf_tempdir.c +++ b/mysys/mf_tempdir.c @@ -85,6 +85,8 @@ char *my_tmpdir(MY_TMPDIR *tmpdir) void free_tmpdir(MY_TMPDIR *tmpdir) { uint i; + if (!tmpdir->full_list.elements) + return; for (i=0; i<=tmpdir->max; i++) my_free(tmpdir->list[i], MYF(0)); delete_dynamic(&tmpdir->full_list); diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 6a7ee748930..0f8055860d4 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -397,9 +397,10 @@ invalid value '%s'", my_progname, optp->name, optend); continue; } - get_one_option(optp->id, optp, - *((my_bool*) value) ? - (char*) "1" : disabled_my_option); + if (get_one_option(optp->id, optp, + *((my_bool*) value) ? + (char*) "1" : disabled_my_option)) + return EXIT_ARGUMENT_INVALID; continue; } argument= optend; @@ -457,7 +458,8 @@ invalid value '%s'", optp->arg_type == NO_ARG) { *((my_bool*) optp->value)= (my_bool) 1; - get_one_option(optp->id, optp, argument); + if (get_one_option(optp->id, optp, argument)) + return EXIT_UNSPECIFIED_ERROR; continue; } else if (optp->arg_type == REQUIRED_ARG || @@ -476,7 +478,8 @@ invalid value '%s'", { if (optp->var_type == GET_BOOL) *((my_bool*) optp->value)= (my_bool) 1; - get_one_option(optp->id, optp, argument); + if (get_one_option(optp->id, optp, argument)) + return EXIT_UNSPECIFIED_ERROR; continue; } /* Check if there are more arguments after this one */ @@ -501,7 +504,8 @@ invalid value '%s'", my_progname, argument, optp->name); return error; } - get_one_option(optp->id, optp, argument); + if (get_one_option(optp->id, optp, argument)) + return EXIT_UNSPECIFIED_ERROR; break; } } @@ -524,7 +528,8 @@ invalid value '%s'", my_progname, argument, optp->name); return error; } - get_one_option(optp->id, optp, argument); + if (get_one_option(optp->id, optp, argument)) + return EXIT_UNSPECIFIED_ERROR; (*argc)--; /* option handled (short or long), decrease argument count */ } diff --git a/mysys/my_init.c b/mysys/my_init.c index 9965f1a13a5..d9f857da955 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -285,8 +285,6 @@ static void my_win_init(void) { DBUG_ENTER("my_win_init"); - setlocale(LC_CTYPE, ""); /* To get right sortorder */ - #if defined(_MSC_VER) #if _MSC_VER < 1300 /* diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 933674fa007..2278c467f32 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -368,17 +368,7 @@ void my_thread_end(void) struct st_my_thread_var *_my_thread_var(void) { - struct st_my_thread_var *tmp= - my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); -#if defined(USE_TLS) - /* This can only happen in a .DLL */ - if (!tmp) - { - my_thread_init(); - tmp=my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); - } -#endif - return tmp; + return my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); } |