fixed coredump in charset.c - bk messed up, so here is another try to push it
mysys/charset.c: fixed coredump
This commit is contained in:
parent
c9ed6ae4cc
commit
3776743da2
@ -193,7 +193,9 @@ static my_bool init_available_charsets(myf myflags)
|
|||||||
charset_initialized=1;
|
charset_initialized=1;
|
||||||
pthread_mutex_unlock(&THR_LOCK_charset);
|
pthread_mutex_unlock(&THR_LOCK_charset);
|
||||||
}
|
}
|
||||||
return error || !available_charsets[0];
|
if(!available_charsets || !available_charsets[0])
|
||||||
|
error = TRUE;
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -467,6 +469,7 @@ char * list_charsets(myf want_flags)
|
|||||||
DYNAMIC_STRING s;
|
DYNAMIC_STRING s;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
(void)init_available_charsets(MYF(0));
|
||||||
init_dynamic_string(&s, NullS, 256, 1024);
|
init_dynamic_string(&s, NullS, 256, 1024);
|
||||||
|
|
||||||
if (want_flags & MY_COMPILED_SETS)
|
if (want_flags & MY_COMPILED_SETS)
|
||||||
@ -485,7 +488,8 @@ char * list_charsets(myf want_flags)
|
|||||||
char buf[FN_REFLEN];
|
char buf[FN_REFLEN];
|
||||||
MY_STAT stat;
|
MY_STAT stat;
|
||||||
|
|
||||||
for (c = available_charsets; *c; ++c)
|
if((c=available_charsets))
|
||||||
|
for (; *c; ++c)
|
||||||
{
|
{
|
||||||
if (charset_in_string((*c)->name, &s))
|
if (charset_in_string((*c)->name, &s))
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user