Subject: | 'select 1 from some_table' Not parsing (impacting DBD::AnyData) |
The following program:
use common::sense;
use SQL::Statement;
my $sql1 = "SELECT 1+0 FROM some_table";
my $sql2 = "SELECT 1 FROM some_table";
my $parser = SQL::Parser->new();
$parser->{RaiseError}=1;
$parser->{PrintError}=0;
for ($sql1, $sql2) {
warn "trying: $_";
my $stmt = SQL::Statement->new($_,$parser);
}
produces:
trying: SELECT 1+0 FROM some_table at sql.pl line 10.
trying: SELECT 1 FROM some_table at sql.pl line 10.
Bad table or column name: '1' starts with non-alphabetic character!
This appears to be causing DBD::AnyData to fail. See
http://perlmonks.com/?node_id=811012 for more details.