mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-19750 mysql command wrong encoding
Restore the detection of default charset in command line utilities. It worked up to 10.1, but was broken by Connector/C. Moved code for detection of default charset from sql-common/client.c to mysys, and make command line utilities to use this code if charset was not specified on the command line.
This commit is contained in:
@@ -135,6 +135,8 @@ int main(int argc, char **argv)
|
||||
if (shared_memory_base_name)
|
||||
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
||||
#endif
|
||||
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
|
||||
default_charset= (char *)my_default_csname();
|
||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||
|
||||
if (opt_plugin_dir && *opt_plugin_dir)
|
||||
|
Reference in New Issue
Block a user