Commit 7c827899 authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

charset.c:

  this function will be used to load both Index and a named charset, so let's add a new argument to pass file name
parent eb10865b
...@@ -226,7 +226,7 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len) ...@@ -226,7 +226,7 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
return MY_XML_OK; return MY_XML_OK;
} }
static my_bool read_charset_index(myf myflags) static my_bool read_charset_index(const char *filename, myf myflags)
{ {
char *buf; char *buf;
int fd; int fd;
...@@ -237,7 +237,7 @@ static my_bool read_charset_index(myf myflags) ...@@ -237,7 +237,7 @@ static my_bool read_charset_index(myf myflags)
if (! (buf = (char *)my_malloc(MAX_BUF,myflags))) if (! (buf = (char *)my_malloc(MAX_BUF,myflags)))
return FALSE; return FALSE;
strmov(get_charsets_dir(buf),MY_CHARSET_INDEX); strmov(get_charsets_dir(buf),filename);
if ((fd=my_open(buf,O_RDONLY,myflags)) < 0) if ((fd=my_open(buf,O_RDONLY,myflags)) < 0)
{ {
...@@ -313,7 +313,7 @@ static my_bool init_available_charsets(myf myflags) ...@@ -313,7 +313,7 @@ static my_bool init_available_charsets(myf myflags)
if (*cs) if (*cs)
set_max_sort_char(*cs); set_max_sort_char(*cs);
} }
error = read_charset_index(myflags); error = read_charset_index(MY_CHARSET_INDEX,myflags);
charset_initialized=1; charset_initialized=1;
pthread_mutex_unlock(&THR_LOCK_charset); pthread_mutex_unlock(&THR_LOCK_charset);
} }
......
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