Skip Menu |

This queue is for tickets about the DBD-PgPP CPAN distribution.

Report information
The Basics
Id: 23900
Status: resolved
Priority: 0/
Queue: DBD-PgPP

People
Owner: Nobody in particular
Requestors: private
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.05
Fixed in: 0.06



Subject: Handling of a '?'-containing argument in function execute
What: Show quoted text
> If one of the parameters passed to the execute function happens to be '?', > then the subsequent run through the loop will incorrectly substitute this > with the next parameter. > > Example: > my $add = $dbh->prepare( "insert into info (grp, name, www, id) values > (?,?,?,?)"); > $add->execute(''GroupA","?",''none", 1) ; > > Where: function execute > In line 362 ($statement =~ s/\?/$quoted_param/e;) >
On Tue Dec 12 10:42:21 2006, FrCa wrote: Show quoted text
> What:
> > If one of the parameters passed to the execute function happens to
be '?', Show quoted text
> > then the subsequent run through the loop will incorrectly substitute
this Show quoted text
> > with the next parameter. > > > > Example: > > my $add = $dbh->prepare( "insert into info (grp, name, www, id) values > > (?,?,?,?)"); > > $add->execute(''GroupA","?",''none", 1) ; > > > > Where: function execute > > In line 362 ($statement =~ s/\?/$quoted_param/e;) > >
>
I've added a modification to run through statements needing placeholder replacement in a way that doesn't cause the problem reported here. I've attached the modified module. I'm using the version 0.005 code. I'd be grateful if someone could merge this change (if it passes) or add their own separate fix. This pure perl postgres module is very useful for my company and we'd love to see it working as well as possible.

Message body is not shown because it is too large.

Oops. Attached the wrong file. Her's the POSTGRESQL one (not the mysql one). Sorry.

Message body is not shown because it is too large.

This issue is believed to be fixed in DBD::PgPP 0.06. Thanks for the suggested patch. There are some other cases that your fix didn't address, so I've used a different implementation instead. Please reopen this ticket if you can still reproduce the problem in that version. Apologies for the absurdly long delay. -- Aaron Crane