Skip Menu |

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

Report information
The Basics
Id: 43477
Status: resolved
Priority: 0/
Queue: SQL-Interp

People
Owner: Nobody in particular
Requestors: metaperl [...] gmail.com
Cc:
AdminCc:

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



Subject: Support for MySQL REPLACE syntax needed
SQL::Interp needs support for the REPLACE INTO syntax: http://dev.mysql.com/doc/refman/5.1/en/replace.html It's a very simple one-line fix: [tbrannon@devel SQL-Interp-1.06]$ diff -u lib/SQL/Interp.pm lib/SQL/Interp.pm.orig --- lib/SQL/Interp.pm 2009-02-20 12:03:58.000000000 -0500 +++ lib/SQL/Interp.pm.orig 2007-12-20 13:11:59.000000000 -0500 @@ -191,7 +191,7 @@ _sql_interp_data($val); } keys %$item); } - elsif ($sql =~ /\b(REPLACE|INSERT)[\w\s]*\sINTO\s*$id_match\s*$/si) { + elsif ($sql =~ /\bINSERT[\w\s]*\sINTO\s*$id_match\s*$/si) { $item = [ $$item ] if ref $item eq 'SCALAR'; if (ref $item eq 'ARRAY') { $sql .= " VALUES(" . join(', ', map { [tbrannon@devel SQL-Interp-1.06]$
Thanks for the suggestion. This will appear in the next release.