summaryrefslogtreecommitdiff
path: root/sql/sql_connect.cc
diff options
context:
space:
mode:
authorvicentiu <vicentiu@mariadb.org>2017-01-06 17:09:59 +0200
committervicentiu <vicentiu@mariadb.org>2017-01-06 17:09:59 +0200
commite9aed131ead9e102c8948ebadc421960399722d4 (patch)
treeae8f4ee4ee7f7e915121ff2c73c88c20781c45ed /sql/sql_connect.cc
parente4978d26b79120c58706e57fc66e4de1ec4b230c (diff)
parentae1b3d1991b679bb38095711de27934d7683deda (diff)
downloadmariadb-git-e9aed131ead9e102c8948ebadc421960399722d4.tar.gz
Merge remote-tracking branch 'origin/5.5' into 10.0
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r--sql/sql_connect.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index c5a0d1464e7..63f9bfae47a 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2007, 2013, Oracle and/or its affiliates.
- Copyright (c) 2008, 2014, SkySQL Ab.
+ Copyright (c) 2008, 2016, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -831,6 +831,7 @@ void update_global_user_stats(THD *thd, bool create_user, time_t now)
bool thd_init_client_charset(THD *thd, uint cs_number)
{
+ SV *gv=&global_system_variables;
CHARSET_INFO *cs;
/*
Use server character set and collation if
@@ -841,12 +842,10 @@ bool thd_init_client_charset(THD *thd, uint cs_number)
if (!opt_character_set_client_handshake ||
!(cs= get_charset(cs_number, MYF(0))))
{
- thd->variables.character_set_client=
- global_system_variables.character_set_client;
- thd->variables.collation_connection=
- global_system_variables.collation_connection;
- thd->variables.character_set_results=
- global_system_variables.character_set_results;
+ DBUG_ASSERT(is_supported_parser_charset(gv->character_set_client));
+ thd->variables.character_set_client= gv->character_set_client;
+ thd->variables.collation_connection= gv->collation_connection;
+ thd->variables.character_set_results= gv->character_set_results;
}
else
{