From d5cd33450413816f8696125cd66c8393921e6267 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 27 Jun 2017 14:00:10 +0200 Subject: MDEV-13187 incorrect backslash parsing in clients cover ANSI_QUOTES and NO_BACKSLASH_ESCAPES in mysqltest --- sql/sys_vars.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/sys_vars.cc') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 35997525456..ffe861ddfbc 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2173,6 +2173,10 @@ static bool fix_sql_mode(sys_var *self, THD *thd, enum_var_type type) thd->server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES; else thd->server_status&= ~SERVER_STATUS_NO_BACKSLASH_ESCAPES; + if (thd->variables.sql_mode & MODE_ANSI_QUOTES) + thd->server_status|= SERVER_STATUS_ANSI_QUOTES; + else + thd->server_status&= ~SERVER_STATUS_ANSI_QUOTES; } return false; } -- cgit v1.2.1