From 1f478343069f9c7a675f3bd339097bbacb644b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Sat, 12 Jun 2021 17:11:59 +0200 Subject: [PATCH] Added conditional 'grave accents' outside capturing group to 'VAR_P1' regex matching variable name #3479 --- lib/set_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/set_parser.cpp b/lib/set_parser.cpp index 4c1931b55..99d59779a 100644 --- a/lib/set_parser.cpp +++ b/lib/set_parser.cpp @@ -34,7 +34,7 @@ std::map> SetParser::parse1() { std::map> result; #define SESSION_P1 "(?:|SESSION +|@@|@@session.)" -#define VAR_P1 "(@\\w+|\\w+)" +#define VAR_P1 "`?(@\\w+|\\w+)`?" //#define VAR_VALUE "((?:[\\w/\\d:\\+\\-]|,)+)" //#define VAR_VALUE "((?:CONCAT\\((?:(REPLACE|CONCAT)\\()+@@sql_mode,(?:(?:'|\\w|,| |\"|\\))+(?:\\)))|(?:[@\\w/\\d:\\+\\-]|,)+|(?:)))" #define VAR_VALUE_P1 "((?:\\()*(?:SELECT)*(?: )*(?:CONCAT\\()*(?:(?:(?: )*REPLACE|IFNULL|CONCAT)\\()+(?: )*(?:NULL|@OLD_SQL_MODE|@@SQL_MODE),(?:(?:'|\\w|,| |\"|\\))+(?:\\))*)(?:\\))|(?:NULL)|(?:[@\\w/\\d:\\+\\-]|,)+|(?:(?:'{1}|\"{1})(?:)(?:'{1}|\"{1})))"