Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 96628
Status: resolved
Priority: 0/
Queue: SQL-Statement

People
Owner: Nobody in particular
Requestors: hv [...] crypt.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.406_002



CC: hv [...] crypt.org
Subject: SQL::Parser fails to parse insert with functions
Date: Sun, 22 Jun 2014 11:07:20 +0100
To: bug-SQL-Statement [...] rt.cpan.org
From: hv [...] crypt.org
This is SQL-Statement-1.405 running on perl-5.16.1. % ${PERL} -MSQL::Parser -wle '$sp=SQL::Parser->new("AnyData"); \ $sp->parse("insert t1 (c1, c2) values (now(), 1)")' Bad table or column name: '(' has chars not alphanumeric or underscore! at -e line 1. % This comes down to the handling of $val_str in SQL::Parser->INSERT: while ( $val_str =~ m/\((.+?)\)(?:,|$)/g ) .. which I think would need to find balanced parens to have a chance of doing the right thing (eg by using Regexp::Common's $RE{balanced}). Hope this helps, Hugo
From: spam-bitcard [...] yary.ack.org
I was also having function-with-parenthesis issues, and issued a path/pull-request. See https://github.com/perl5-dbi/SQL-Statement/pull/6