Skip Menu |

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

Report information
The Basics
Id: 96853
Status: open
Priority: 0/
Queue: SQL-SplitStatement

People
Owner: emazep [...] gmail.com
Requestors: OKHARCH [...] cpan.org
Cc:
AdminCc:

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



Subject: placeholders count wrong in replace into table values (?,?,?) stmnt
$sql = 'replace into mac.cache(keymd5,ts,data) values (?,?,?)'; ($stmnts,$placeholders) = SQL::SplitStatement->new()->split_with_placeholders($sql); it returns $placeholders = [0] while it should [3].
On Tue Jul 01 01:29:34 2014, OKHARCH wrote: Show quoted text
> $sql = 'replace into mac.cache(keymd5,ts,data) values (?,?,?)'; > ($stmnts,$placeholders) = SQL::SplitStatement->new()-
> >split_with_placeholders($sql);
> > it returns $placeholders = [0] while it should [3].
It happens because the REPLACE keyword is not currently recognized, being an MySQL specific extension to the SQL standard (AFAIK). (Substituting REPLACE with INSERT in your example works indeed). I'll add the REPLACE handling in that context. Thanks for your report. -Emanuele