Commit bfe8ba7d authored by bar@mysql.com's avatar bar@mysql.com

Merge mysql.com:/usr/home/bar/mysql-4.1

into  mysql.com:/usr/home/bar/mysql-5.0
parents a009ec4a 92e7d181
...@@ -383,26 +383,28 @@ static my_bool init_available_charsets(myf myflags) ...@@ -383,26 +383,28 @@ static my_bool init_available_charsets(myf myflags)
while we may changing the cs_info_table while we may changing the cs_info_table
*/ */
pthread_mutex_lock(&THR_LOCK_charset); pthread_mutex_lock(&THR_LOCK_charset);
if (!charset_initialized)
bzero(&all_charsets,sizeof(all_charsets));
init_compiled_charsets(myflags);
/* Copy compiled charsets */
for (cs=all_charsets;
cs < all_charsets+array_elements(all_charsets)-1 ;
cs++)
{ {
if (*cs) bzero(&all_charsets,sizeof(all_charsets));
init_compiled_charsets(myflags);
/* Copy compiled charsets */
for (cs=all_charsets;
cs < all_charsets+array_elements(all_charsets)-1 ;
cs++)
{ {
if (cs[0]->ctype) if (*cs)
if (init_state_maps(*cs)) {
*cs= NULL; if (cs[0]->ctype)
if (init_state_maps(*cs))
*cs= NULL;
}
} }
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
error= my_read_charset_file(fname,myflags);
charset_initialized=1;
} }
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
error= my_read_charset_file(fname,myflags);
charset_initialized=1;
pthread_mutex_unlock(&THR_LOCK_charset); pthread_mutex_unlock(&THR_LOCK_charset);
} }
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment