Skip to content

Commit

Permalink
Fixed capture group closing parenthesis for regex matching 'SET state…
Browse files Browse the repository at this point in the history
…ments' for tracked variables #3479
  • Loading branch information
JavierJF committed Aug 31, 2021
1 parent e14accd commit a1d8a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MySQL_Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,7 @@ bool MySQL_Thread::init() {
match_regexes[0]=new Session_Regex((char *)"^SET (|SESSION |@@|@@session.)SQL_LOG_BIN( *)(:|)=( *)");

std::stringstream ss;
ss << "^SET (|SESSION |@@|@@session.)(" << mysql_variables.variables_regexp << "SESSION_TRACK_GTIDS|TX_ISOLATION( *)(:|)=( *))";
ss << "^SET (|SESSION |@@|@@session.)(" << mysql_variables.variables_regexp << "SESSION_TRACK_GTIDS|TX_ISOLATION)( *)(:|)=( *)";
match_regexes[1]=new Session_Regex((char *)ss.str().c_str());

match_regexes[2]=new Session_Regex((char *)"^SET(?: +)(|SESSION +)TRANSACTION(?: +)(?:(?:(ISOLATION(?: +)LEVEL)(?: +)(REPEATABLE(?: +)READ|READ(?: +)COMMITTED|READ(?: +)UNCOMMITTED|SERIALIZABLE))|(?:(READ)(?: +)(WRITE|ONLY)))");
Expand Down

0 comments on commit a1d8a87

Please sign in to comment.