summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-12-22 12:49:06 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-22 12:49:06 +0100
commit9fefe973360124f281122a129434a36e661168b9 (patch)
treed4028e2d680914e2a0c233fc4ea287ba0cbaeba0 /sql/mysqld.cc
parent8fcdd6b0ecbb966f4479856efe93a963a7a422f7 (diff)
parentc8f0eeb9c8596be83fefb7fef9f9871e53edb020 (diff)
downloadmariadb-git-9fefe973360124f281122a129434a36e661168b9.tar.gz
Merge branch 'mysql/5.5' into 5.5
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc21
1 files changed, 17 insertions, 4 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 11e9176861d..eb19e09d74e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3746,9 +3746,23 @@ static int init_common_variables()
/* Set collactions that depends on the default collation */
global_system_variables.collation_server= default_charset_info;
global_system_variables.collation_database= default_charset_info;
- global_system_variables.collation_connection= default_charset_info;
- global_system_variables.character_set_results= default_charset_info;
- global_system_variables.character_set_client= default_charset_info;
+
+ if (is_supported_parser_charset(default_charset_info))
+ {
+ global_system_variables.collation_connection= default_charset_info;
+ global_system_variables.character_set_results= default_charset_info;
+ global_system_variables.character_set_client= default_charset_info;
+ }
+ else
+ {
+ sql_print_information("'%s' can not be used as client character set. "
+ "'%s' will be used as default client character set.",
+ default_charset_info->csname,
+ my_charset_latin1.csname);
+ global_system_variables.collation_connection= &my_charset_latin1;
+ global_system_variables.character_set_results= &my_charset_latin1;
+ global_system_variables.character_set_client= &my_charset_latin1;
+ }
if (!(character_set_filesystem=
get_charset_by_csname(character_set_filesystem_name,
@@ -8379,4 +8393,3 @@ template class I_List<i_string_pair>;
template class I_List<Statement>;
template class I_List_iterator<Statement>;
#endif
-