summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-12-22 11:13:07 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-22 12:49:37 +0100
commite7d7910b7a926ccc6f5b8d73d55ac511f1c03c3d (patch)
treec9d77ef4b1577cef28f9b852f1d05fa22b9df448 /sql/sys_vars.cc
parent48655ce6985490fdf6c5c8be7c75b37f83f7738e (diff)
downloadmariadb-git-e7d7910b7a926ccc6f5b8d73d55ac511f1c03c3d.tar.gz
add an assert
and use is_supported_parser_charset() instead of direct check
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 7b898906184..35997525456 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -31,6 +31,7 @@
#include "my_global.h" /* NO_EMBEDDED_ACCESS_CHECKS */
#include "sql_priv.h"
#include "sql_class.h" // set_var.h: THD
+#include "sql_parse.h"
#include "sys_vars.h"
#include "events.h"
@@ -445,7 +446,7 @@ static bool check_cs_client(sys_var *self, THD *thd, set_var *var)
return true;
// Currently, UCS-2 cannot be used as a client character set
- if (((CHARSET_INFO *)(var->save_result.ptr))->mbminlen > 1)
+ if (!is_supported_parser_charset((CHARSET_INFO *)(var->save_result.ptr)))
return true;
return false;