Skip Menu |

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

Report information
The Basics
Id: 82628
Status: resolved
Priority: 0/
Queue: DBD-Mock

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

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



Subject: problem with slice : DBI bind_columns: invalid number of arguments:
Date: Thu, 10 Jan 2013 19:31:51 -0600
To: bugs-dbd-mock [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
it should be noted that DBIx::Connector and DBIx::QueryLog are being used, and the code is tested and working against DBD::mysql ""DBI bind_columns: invalid number of arguments: got handle + 0, expected handle + between 1 and -1 Usage: $h->bind_columns(\$var1 [, \$var2, ...]) at /home/ccushing/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.2/x86_64-linux/DBI.pm line 2054. "" [2013-01-10T18:06:34] [Gator::Ticket::Mapper::Query::SQL::Ticket] [0.021273] SELECT rating, rating_time, staff_id, has_attachments, created_time, contents FROM posts INNER JOIN post_contents ON ( posts.post_id = post_contents.post_id ) WHERE ( posts.ticket_id = ? ) ORDER BY posts.post_id DESC : [15006288] at /home/ccushing/lib/Ticket/Mapper/Query/SQL/Ticket.pm line 31 my $posts = try { $self->_db->svp(sub { $_->selectall_arrayref( $sql, { Slice => {} }, @bind ) }); ... The problem appears to be with Slice, I removed slice and the code functions normally -- Caleb Cushing http://xenoterracide.com
On Thu Jan 10 20:32:01 2013, XENO wrote: Show quoted text
> it should be noted that DBIx::Connector and DBIx::QueryLog are being > used, and the code is tested and working against DBD::mysql > > ""DBI bind_columns: invalid number of arguments: got handle + 0, > expected handle + between 1 and -1 > Usage: $h->bind_columns(\$var1 [, \$var2, ...]) at > /home/ccushing/perl5/perlbrew/perls/perl- > 5.16.2/lib/site_perl/5.16.2/x86_64-linux/DBI.pm > line 2054. > "" > > [2013-01-10T18:06:34] [Gator::Ticket::Mapper::Query::SQL::Ticket] > [0.021273] SELECT rating, rating_time, staff_id, has_attachments, > created_time, contents FROM posts INNER JOIN post_contents ON ( > posts.post_id = post_contents.post_id ) WHERE ( posts.ticket_id = ? ) > ORDER BY posts.post_id DESC : [15006288] at > /home/ccushing/lib/Ticket/Mapper/Query/SQL/Ticket.pm line 31 > > my $posts > = try { > $self->_db->svp(sub { > $_->selectall_arrayref( $sql, { Slice => {} }, @bind ) > }); > ... > > The problem appears to be with Slice, I removed slice and the code > functions normally > -- > Caleb Cushing > > http://xenoterracide.com
Hi, I've recently picked up support for DBD::Mock and I've been trying to recreate this issue but can't. I suspect it has been resolved in an earlier version of DBD::Mock, but I've added in an new unit test to explicitly check for the issue (https://gitlab.com/scrapheap/DBD-Mock/blob/master/t/032_selectall_arrayref.t). I'll close this case, but if you still encountering this issue with the latest version of DBD::Mock then please let me know and I'll take another look at it. Regards, Jason.