Skip Menu |

This queue is for tickets about the Bot-BasicBot-Pluggable CPAN distribution.

Report information
The Basics
Id: 75849
Status: resolved
Priority: 0/
Queue: Bot-BasicBot-Pluggable

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

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



Subject: Bot::BasicBot::Pluggable::Store::DBI TABLE exists test broken
Date: Sat, 17 Mar 2012 16:30:16 -0500
To: bug-Bot-BasicBot-Pluggable [...] rt.cpan.org
From: Michael Alexander <omniminded1 [...] gmail.com>
__SUBJECT__ Bot::BasicBot::Pluggable::Store::DBI TABLE exists test broken __BODY__ Module: Bot::BasicBot::Pluggable::Store::DBI VERSION = '0.96' Perl: perl 5, version 12, subversion 2 (v5.12.2 (*)) built for i386-openbsd with 4 registered patches Operating system: OpenBSD 4.9 GENERIC.MP#794 i386 I installed and ran Bot::Infobot which uses B::BB::P and got the following error: DBD::SQLite::db do failed: table "infobot-brane" already exists at /home/omni/perl5/lib/perl5/Bot/BasicBot/Pluggable/Store/DBI.pm line 38. As you can see from the error message I used the DBD configuration that utilizes DBD::SQLite. I am told the error is the result of B::BB::P::Store::DBI failing to determine if table "infobot-brane" exists. I temporarily modified my local install of B::BB::P::Store::DBI with a suggested fix and the error disappeared. This was the fix... Line 33... https://metacpan.org/source/DIZ/Bot-BasicBot-Pluggable-0.96/lib/Bot/BasicBot/Pluggable/Store/DBI.pm#L33 Line 33 original... my $sth = $self->dbh->table_info( '', '', $table, "TABLE" ); Line 33 fixed... my $sth = $self->dbh->table_info( '%', '%', $table, "TABLE" ); I was already chatting in #london.pm at irc.perl.org for help with Bot::Infobot. The relevant discussion is below. Saturday, March 17th, 2012 [13:24] <@castaway> ok, well it seems to be trying to create the tables when they already exist [13:26] <@castaway> its way of finding out if the table exists is broken... [13:26] <@castaway> https://metacpan.org/source/DIZ/Bot-BasicBot-Pluggable-0.96/lib/Bot/BasicBot/Pluggable/Store/DBI.pm#L33- should be '%' instead of '' [13:26] <@castaway> imo anyway [13:31] <omni> my $sth = $self->dbh->table_info( '%', '%', $table, "TABLE" ); --?? [13:31] <@castaway> aye, I think so [13:32] <omni> can i modify the module source without breaking anything to test it? [13:32] <@castaway> thats a leading question :) [13:32] <@castaway> if the only thing thats using it is you trying things out... yes.. [13:35] <omni> since its local its exclusive. i dont see the harm of changing it and changing it back - this is the sole use ofthis (local) module [13:36] <@castaway> neither do I [13:36] <@castaway> just dont forget it after ;) [13:36] <omni> i will do it all right away [13:47] <omni> castaway, that fixed the error :) [13:59] <@castaway> now you submit a bug / patch to bot-basicbot-pluggable [14:04] <omni> never submitted a bug / patch before actually. and unless you are positive it is a fix because i am not knowledgable enough on this to have any idea [14:04] <@theorbtwo> There's a first time for everything.
Hi, I'm just cleaning up ancient RT tickets and found this one, so my apologies for the hilariously belated response. On 2012-03-17 21:30:28, omniminded1@gmail.com wrote: Show quoted text
> I installed and ran Bot::Infobot which uses B::BB::P and got the > following > error: > > DBD::SQLite::db do failed: table "infobot-brane" already exists at > /home/omni/perl5/lib/perl5/Bot/BasicBot/Pluggable/Store/DBI.pm line > 38. > > As you can see from the error message I used the DBD configuration > that > utilizes DBD::SQLite. > > I am told the error is the result of B::BB::P::Store::DBI failing to > determine if table "infobot-brane" exists. > > I temporarily modified my local install of B::BB::P::Store::DBI with a > suggested fix and the error disappeared. This was the fix... > > Line 33... > https://metacpan.org/source/DIZ/Bot-BasicBot-Pluggable- > 0.96/lib/Bot/BasicBot/Pluggable/Store/DBI.pm#L33 > > Line 33 original... > my $sth = $self->dbh->table_info( '', '', $table, "TABLE" ); > > Line 33 fixed... > my $sth = $self->dbh->table_info( '%', '%', $table, "TABLE" ); >
That looks sane. I've applied that fix in https://github.com/bigpresh/bot-basicbot-pluggable/pull/11 I'll test it, merge it and get a release out. Thanks, very belatedly!