Merged fix-1037211-distill-lowercase-lock-tables

This commit is contained in:
Brian Fraser
2012-08-24 19:52:26 -03:00
8 changed files with 21 additions and 23 deletions

View File

@@ -1826,10 +1826,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";
}