Strip backticks from LOAD DATA table name.

This commit is contained in:
Daniel Nichter
2013-08-03 11:44:41 -07:00
parent b5a135d6e5
commit e66415764d
2 changed files with 8 additions and 0 deletions

View File

@@ -248,6 +248,8 @@ sub distill_verbs {
if ( $query =~ m/\A\s*LOAD/i ) {
my ($tbl) = $query =~ m/INTO TABLE\s+(\S+)/i;
$tbl ||= '';
$tbl =~ s/`//g;
return "LOAD DATA $tbl";
}

View File

@@ -1422,6 +1422,12 @@ is(
"distill LOAD DATA (bug 821692)"
);
is(
$qr->distill("LOAD DATA LOW_PRIORITY LOCAL INFILE 'file' INTO TABLE `tbl`"),
"LOAD DATA tbl",
"distill LOAD DATA (bug 821692)"
);
is(
$qr->distill("insert ignore_bar (id) values (4029731)"),
"INSERT ignore_bar",