Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: AWNCORP [...] cpan.org
Cc:
AdminCc:

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



# test case my ($sql, @bind) = sql_interp 'INSERT INTO `group`', \%item; # issue This doesn't produce the correct SQL statement. The reason I assume is because the mysql table name is escaped using backticks which is neccessary because it is a keyword. Un-escaping it fixes the problem but renders the statement useless as the database thinks I am using the keyword. This has been tested with SQLite and MySQL.
Subject: Re: [rt.cpan.org #54129]
Date: Fri, 29 Jan 2010 13:54:53 -0500
To: bug-SQL-Interp [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Show quoted text
> # test case > my ($sql, @bind) = sql_interp 'INSERT INTO `group`', \%item; > > # issue > This doesn't produce the correct SQL statement. The reason I assume is > because the mysql table name is escaped using backticks which is > neccessary because it is a keyword. Un-escaping it fixes the problem but > renders the statement useless as the database thinks I am using the > keyword. This has been tested with SQLite and MySQL.
Thanks for the report. A patch and test would be welcome. Mark
Fixed on git: https://code.blicky.net/yorhel/SQL-Interp/commit/6acb93f4cab30c55f909bb2c5419007881a14ce3 Will make it into the next release, which I'll upload within a week or so.