mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-04 03:26:19 +00:00
Fix for 1037211: QueryParser fails to distill LOCK TABLES in lowercase
This commit is contained in:
@@ -1097,10 +1097,9 @@ sub get_tables {
|
||||
|
||||
$query =~ s/ (?:LOW_PRIORITY|IGNORE|STRAIGHT_JOIN)//ig;
|
||||
|
||||
if ( $query =~ /^\s*LOCK TABLES/i ) {
|
||||
if ( $query =~ s/^\s*LOCK TABLES\s+//i ) {
|
||||
PTDEBUG && _d('Special table type: LOCK TABLES');
|
||||
$query =~ s/^(\s*LOCK TABLES\s+)//;
|
||||
$query =~ s/\s+(?:READ|WRITE|LOCAL)+\s*//g;
|
||||
$query =~ s/\s+(?:READ(?:\s+LOCAL)?|WRITE)\s*//gi;
|
||||
PTDEBUG && _d('Locked tables:', $query);
|
||||
$query = "FROM $query";
|
||||
}
|
||||
|
Reference in New Issue
Block a user