summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-02-02 10:02:03 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2019-02-02 17:29:33 +0100
commite214aa1cd35d282c27c1888bcd6cf943340c67ff (patch)
tree52968f0055558b5dda022c4906b392a8912aab71 /sql/sql_parse.cc
parent14a58cea59a8c173923ad1cde9516e6c01ac0ef9 (diff)
downloadmariadb-git-e214aa1cd35d282c27c1888bcd6cf943340c67ff.tar.gz
MDEV-18281 COM_RESET_CONNECTION changes the connection encoding
Store original charset during client authentication, and restore it for COM_RESET_CONNECTION
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 731dd3cba71..73f17c21abe 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1715,6 +1715,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->status_var.com_other++;
thd->change_user();
thd->clear_error(); // if errors from rollback
+ /* Restore original charset from client authentication packet.*/
+ if(thd->org_charset)
+ thd->update_charset(thd->org_charset,thd->org_charset,thd->org_charset);
my_ok(thd, 0, 0, 0);
break;
}