mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
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
This commit is contained in:
parent
eb10865b0e
commit
7c82789929
1 changed files with 3 additions and 3 deletions
|
@ -226,7 +226,7 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
|
|||
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;
|
||||
int fd;
|
||||
|
@ -237,7 +237,7 @@ static my_bool read_charset_index(myf myflags)
|
|||
if (! (buf = (char *)my_malloc(MAX_BUF,myflags)))
|
||||
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)
|
||||
{
|
||||
|
@ -313,7 +313,7 @@ static my_bool init_available_charsets(myf myflags)
|
|||
if (*cs)
|
||||
set_max_sort_char(*cs);
|
||||
}
|
||||
error = read_charset_index(myflags);
|
||||
error = read_charset_index(MY_CHARSET_INDEX,myflags);
|
||||
charset_initialized=1;
|
||||
pthread_mutex_unlock(&THR_LOCK_charset);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue