Subject: | parsing SQL bug |
I have a very simple SQL file with 2 sentences:
DROP TABLE IF EXISTS player1;
DROP TABLE IF EXISTS player2;
I got a MySQL error, but after some debugging tasks (using verbose_handler) I found the error. It was a blank space after the semicolon at first sentence.
I have just removed it and it worked. But I think the regular expression used to parse the sentences (line 454):
my @sql = split /;\r?\n/, $sql;
should be some like this:
my @sql = split /; *\r?\n/, $sql;
you also may consider tabs