diff options
author | Joerg Bruehe <joerg@mysql.com> | 2008-12-10 21:14:50 +0100 |
---|---|---|
committer | Joerg Bruehe <joerg@mysql.com> | 2008-12-10 21:14:50 +0100 |
commit | 2181c959183262b6b7f64c67b12f2715d8528572 (patch) | |
tree | 0808625d28751a07f6894b2bffcf47fcf1e71fbf /mysys | |
parent | 96e0bf50d942258722b25e9d17d209d40eaacd28 (diff) | |
parent | ba816c14a9bc8012759da9d58f858f1e73bec708 (diff) | |
download | mariadb-git-2181c959183262b6b7f64c67b12f2715d8528572.tar.gz |
Merge main 5.1 into 5.1-build
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 eaa8e36e39c..4b45d5ddc1a 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -320,8 +320,6 @@ static void my_win_init(void) const char *targetKey = "Software\\MySQL" ; 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); } |