This indicated that DBD::AnyData is dying on the following line of code in the ad_data method:use Carp; $SIG{__DIE__} = \&Carp::confess;
I then wrote the following test program to exercise SQL::Statement directly:my $sth = $dbh->prepare("SELECT 1 FROM $table_name") or die DBI- +>errstr;
This produces: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(); for ($sql1, $sql2) { warn "trying: $_"; my $stmt = SQL::Statement->new($_,$parser); }
So "SELECT 1+0 from some_table" parses ok, but "SELECT 1 from some_table" doesn't!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! at + /usr/local/share/perl/5.10.0/SQL/Parser.pm line 2894.
I started with SQL::Statement 1.20. The problem persisted after upgrading to 1.23.
Looks to me like a bug in SQL::Statement. Its not recognising the literal value '1' as a simple expression. My guess is that this has stopped working in the last few releases of SQL::Statement, but DBD::AnyData relies on it.
Update: I've created an rt ticket.
In reply to Re: Saving data to XML file using DBD::AnyData
by snoopy
in thread Saving data to XML file using DBD::AnyData
by warsting
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |