mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Enable the auto parameter of the flag default-character-set
Closes #739 When invoking option `--default-character-set=auto` character set from underlying OS settings should be detected for mysqldump.
This commit is contained in:
@ -1057,7 +1057,7 @@ static int get_options(int *argc, char ***argv)
|
|||||||
my_progname_short);
|
my_progname_short);
|
||||||
return(EX_USAGE);
|
return(EX_USAGE);
|
||||||
}
|
}
|
||||||
if (strcmp(default_charset, charset_info->csname) &&
|
if (strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME) &&
|
||||||
!(charset_info= get_charset_by_csname(default_charset,
|
!(charset_info= get_charset_by_csname(default_charset,
|
||||||
MY_CS_PRIMARY, MYF(MY_WME))))
|
MY_CS_PRIMARY, MYF(MY_WME))))
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -1522,6 +1522,9 @@ static int switch_character_set_results(MYSQL *mysql, const char *cs_name)
|
|||||||
char query_buffer[QUERY_LENGTH];
|
char query_buffer[QUERY_LENGTH];
|
||||||
size_t query_length;
|
size_t query_length;
|
||||||
|
|
||||||
|
if (!strcmp(cs_name, MYSQL_AUTODETECT_CHARSET_NAME))
|
||||||
|
cs_name= (char *)my_default_csname();
|
||||||
|
|
||||||
/* Server lacks facility. This is not an error, by arbitrary decision . */
|
/* Server lacks facility. This is not an error, by arbitrary decision . */
|
||||||
if (!server_supports_switching_charsets)
|
if (!server_supports_switching_charsets)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Reference in New Issue
Block a user