summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 6871699dc5b..ad322eda097 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -2789,7 +2789,10 @@ int Lex_input_stream::scan_ident_middle(THD *thd, Lex_ident_cli_st *str,
body_utf8_append(m_cpp_text_start, m_cpp_tok_start + length);
ErrConvString csname(str->str + 1, str->length - 1, &my_charset_bin);
CHARSET_INFO *cs= get_charset_by_csname(csname.ptr(),
- MY_CS_PRIMARY, MYF(0));
+ MY_CS_PRIMARY,
+ thd->variables.old_behavior &
+ OLD_MODE_UTF8_IS_UTF8MB3 ?
+ MYF(MY_UTF8_IS_UTF8MB3) : MYF(0));
if (cs)
{
*introducer= cs;