Skip Menu |

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 72343
Status: resolved
Priority: 0/
Queue: DBI

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

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



Subject: Problem with Sponge driver call in DBI::DBD::SqlEngine
# Temporary kludge: DBD::Sponge dies if @tables is empty. :-( @tables or return; my $dbh2 = $dbh->func("sql_sponge_driver"); my $sth = $dbh2->prepare( "TABLE_INFO", { rows => \@tables, NAMES => $names, } ); $sth or $dbh->set_err( $DBI::stderr, $dbh2->errstr ); return $sth; There is no such attrib called "NAMES". It should be "NAME". This is causing the TABLE_INFO call to not use the proper names. Also, can DBD::Sponge be fixed to accept empty-tabled rows?
On Thu Nov 10 15:55:04 2011, BBYRD wrote: Show quoted text
> # Temporary kludge: DBD::Sponge dies if @tables is empty. :-( > @tables or return; > > my $dbh2 = $dbh->func("sql_sponge_driver"); > my $sth = $dbh2->prepare( > "TABLE_INFO", > { > rows => \@tables, > NAMES => $names, > } > ); > $sth or $dbh->set_err( $DBI::stderr, $dbh2->errstr ); > return $sth; > > > There is no such attrib called "NAMES". It should be "NAME". This is > causing the TABLE_INFO call to not use the proper names.
I have fixed this and removed the comment/return for "kludge" as DBD::Sponge does support an empty table array. Show quoted text
> Also, can DBD::Sponge be fixed to accept empty-tabled rows?
Don't think this is possible or meaningful: select * from table where 1 = 0 produces an empty result-set. How are you supposed to tell the difference between reaching the end of the result set and there being no result-set. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #72343] Problem with Sponge driver call in DBI::DBD::SqlEngine
Date: Wed, 30 Nov 2011 10:24:56 +0100
To: bug-DBI [...] rt.cpan.org
From: Jens Rehsack <rehsack [...] googlemail.com>
2011/11/30 Martin J Evans via RT <bug-DBI@rt.cpan.org>: Show quoted text
>       Queue: DBI >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=72343 > > > On Thu Nov 10 15:55:04 2011, BBYRD wrote:
>>         # Temporary kludge: DBD::Sponge dies if @tables is empty. :-( >>         @tables or return; >> >>         my $dbh2 = $dbh->func("sql_sponge_driver"); >>         my $sth = $dbh2->prepare( >>                                   "TABLE_INFO", >>                                   { >>                                      rows  => \@tables, >>                                      NAMES => $names, >>                                   } >>                                 ); >>         $sth or $dbh->set_err( $DBI::stderr, $dbh2->errstr ); >>         return $sth; >> >> >> There is no such attrib called "NAMES".  It should be "NAME".  This is >> causing the TABLE_INFO call to not use the proper names.
> > I have fixed this and removed the comment/return for "kludge" as > DBD::Sponge does support an empty table array. >
>> Also, can DBD::Sponge be fixed to accept empty-tabled rows?
> > Don't think this is possible or meaningful: > > select * from table where 1 = 0 produces an empty result-set. How are > you supposed to tell the difference between reaching the end of the > result set and there being no result-set.
Did you check out the sqlengine branch where such fixes should be done (and partially did meanwhile)? /Jens
On Wed Nov 30 04:25:06 2011, rehsack@googlemail.com wrote: Show quoted text
> Did you check out the sqlengine branch where such fixes should be > done (and partially did meanwhile)? > > /Jens
No, it has been over a year since I used that branch and I forgot about it. I was just trying to help out with the growing bugs. I will revert the change later this morning and you can do it in whatever branch you are using. Martin -- Martin J. Evans Wetherby, UK
On Wed Nov 30 04:30:42 2011, MJEVANS wrote: Show quoted text
> On Wed Nov 30 04:25:06 2011, rehsack@googlemail.com wrote: >
> > Did you check out the sqlengine branch where such fixes should be > > done (and partially did meanwhile)? > > > > /Jens
> > No, it has been over a year since I used that branch and I forgot about > it. I was just trying to help out with the growing bugs. I will revert > the change later this morning and you can do it in whatever branch you > are using. > > Martin
Reverted change in trunk and added to sqlengine branch. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #72343] Problem with Sponge driver call in DBI::DBD::SqlEngine
Date: Wed, 30 Nov 2011 12:11:46 +0100
To: bug-DBI [...] rt.cpan.org
From: Jens Rehsack <rehsack [...] googlemail.com>
2011/11/30 Martin J Evans via RT <bug-DBI@rt.cpan.org>: Show quoted text
>       Queue: DBI >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=72343 > > > On Wed Nov 30 04:30:42 2011, MJEVANS wrote:
>> On Wed Nov 30 04:25:06 2011, rehsack@googlemail.com wrote: >>
>> > Did you check out the sqlengine branch where such fixes should be >> > done (and partially did meanwhile)? >> > >> > /Jens
>> >> No, it has been over a year since I used that branch and I forgot about >> it. I was just trying to help out with the growing bugs. I will revert >> the change later this morning and you can do it in whatever branch you >> are using. >> >> Martin
> > Reverted change in trunk and added to sqlengine branch.
I hope I find the required time soon to complete Proc::ProcessTable to start with neded fixes and improvements of S::S and sqlengine DBI branch. Thanks, Martin. /Jens
Fix in commit rev 15424
Closing as resolved. Thanks!