Skip Menu |

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

Report information
The Basics
Id: 85714
Status: rejected
Priority: 0/
Queue: DBD-AnyData

People
Owner: Nobody in particular
Requestors: john [...] jspect.fastmail.com.au
malcolm.davis [...] bms.com
Cc:
AdminCc:

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



Subject: dbd-anydata / dbi-dbd-sqlengine issue
Date: Tue, 21 May 2013 09:41:30 +1000
To: bug-DBD-AnyData [...] rt.cpan.org
From: John McMahon <john [...] jspect.fastmail.fm>
Hi Several years ago I dabbled with DBD::AnyData to read and merge a variety of csv data files. Recently I updated my DBI module to version 1.625 (and yesterday to 1.627). Since updating DBI my program has failed with an error message similar to that below (I have included a test script below that produces the error message). I have provided my current software version info below. I also have an older perl installation (v5.10) on my computer with DBI v1.616 and DBI-DBD-SqlEngine v0.03 that do not fail as reported here. Thanks John #[version]########################### Windows Version: Microsoft Windows XP [Version 5.1.2600] I am currently using ActiveState ActivePerl V5.14. 12:26>perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Modules: DBI version 1.627 DBI-DBD-SqlEngine version 0.06 SQL-Statement version 1.402 AnyData version 0.11 DBD-AnyData version 0.110 #[/version]########################### #[err msg]################################# DBD::AnyData::db do failed: Execution ERROR: Can't call method "complete_table_name" on an undefined value at C:/bin/Perl/Perl514/site/lib/DBI/DBD/SqlEngine.pm line 1503. called from tst_mkAP.pl at 10. at C:/bin/Perl/Perl514/site/lib/DBI/DBD/SqlEngine.pm line 1239 [for Statement "CREATE TABLE AP_mem ( date_index INTEGER, amount VARCHAR(15), acc1 VARCHAR(8), acc2 VARCHAR(8), description VARCHAR(30), voucher VARCHAR(5), costctr VARCHAR(5), date VARCHAR(12) )"] at tst_mkAP.pl line 10. #[/err msg]################################# #[test script]######################### #! perl -w use strict; use warnings; use DBI; # define transient storage table sub mk_APmem { my $dbh = shift @_; $dbh->do( qq{CREATE TABLE AP_mem ( date_index INTEGER, amount VARCHAR(15), acc1 VARCHAR(8), acc2 VARCHAR(8), description VARCHAR(30), voucher VARCHAR(5), costctr VARCHAR(5), date VARCHAR(12) )} ); my $insert = qq{ INSERT INTO AP_mem (date_index, amount, acc1, acc2, description, voucher, costctr, date) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?) }; # and return insert statement return $insert; } my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); my $flags = { col_names => 'Date,Description,AccNum,Debit,Credit' }; my $file = "C:\\Documents and Settings\\John\\My Documents\\dnload\\10457109_20130514.dat"; # my ($file, $flags, $dbh) = @_; # define data source # $dbh->func('CRU_in', 'CSV', $file, $flags, 'ad_catalog'); $dbh->func('CRU_in', 'Pipe', $file, $flags, 'ad_catalog'); # define transient storage table and return insert SQL Statement my $putAP = mk_APmem($dbh); print "$putAP\n"; #[/test script]######################### -- Regards John McMahon john@jspect.fastmail.com.au 04 2933 4203
DBI is marked to break DBD::AnyData 0.110 since DBI 1.623. Please don't use DBI >= 1.623 together with DBD::AnyData 0.110 ... If you want to read CSV files via DBI, take a look at DBD::CSV. Cheers, Jens
Subject: SqlEngine 0.06 new method expect $data->{'Database'} to reference database handle
Date: Wed, 29 May 2013 18:06:26 -0400
To: "bug-DBD-AnyData [...] rt.cpan.org" <bug-DBD-AnyData [...] rt.cpan.org>
From: "Davis, Malcolm" <malcolm.davis [...] bms.com>
I am trying to install DBD::AnyData in a new build of perl 5.16.3 using CPAN. The install failes because the test cases fail, generating error messages like: Can't call method "complete_table_name" on an undefined value at /ap/rhel6/lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi/DBI/DBD/SqlEngine.pm line 1503. The problem appears to be that the $data argument to the DBI::DBD::SqlEngine::new method contains a reference to the database handle under the 'Database' key. Unfortunately, the $table object created by the AnyData::prep_dbd_table method does not have this entry. So, $dbh gets set to undef at line 1599 of SqlEngine.pm which then leads to the error above. The stack trace just before that line is executed is @ = DBI::DBD::SqlEngine::Table::get_table_meta('DBD::AnyData::Table', undef, undef, 1) called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi/DBI/DBD/SqlEngine.pm' line 1601 $ = DBI::DBD::SqlEngine::Table::new('DBD::AnyData::Table', ref(HASH)) called from file '../blib/lib/DBD/AnyData.pm' line 560 $ = DBD::AnyData::Table::new('DBD::AnyData::Table', ref(HASH)) called from file '../blib/lib/DBD/AnyData.pm' line 542 $ = DBD::AnyData::Statement::open_table(ref(DBD::AnyData::Statement), ref(DBI::st), 'test_CSV', 1, 1) called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/SQL/Statement.pm' line 1256 . = eval {...} called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/SQL/Statement.pm' line 1254 @ = SQL::Statement::open_tables(ref(DBD::AnyData::Statement), ref(DBI::st), 1, 1) called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/SQL/Statement.pm' line 234 @ = SQL::Statement::CREATE(ref(DBD::AnyData::Statement), ref(DBI::st), ref(ARRAY)) called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/SQL/Statement.pm' line 157 $ = SQL::Statement::execute(ref(DBD::AnyData::Statement), ref(DBI::st), ref(ARRAY)) called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi/DBI/DBD/SqlEngine.pm' line 1239 . = eval {...} called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi/DBI/DBD/SqlEngine.pm' line 1237 $ = DBI::DBD::SqlEngine::st::execute(ref(DBI::st)) called from file '/ap/rhel6/lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi/DBI.pm' line 1618 $ = DBD::_::db::do(ref(DBI::db), 'CREATE TABLE test_CSV (name TEXT, country TEXT,sex TEXT)') called from file '/home/davism/.cpan/build/DBD-AnyData-0.110-ENSL_O/t/01-basic.t' line 65 . = main::test_dbd('CSV') called from file '/home/davism/.cpan/build/DBD-AnyData-0.110-ENSL_O/t/01-basic.t' line 41 . = main::test('DBD::AnyData', 'CSV') called from file '/home/davism/.cpan/build/DBD-AnyData-0.110-ENSL_O/t/01-basic.t' line 32 If I can provide any additional information, please let me know. Thanks, Malcolm This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.
You spend a lot of time analysing the failing places of your issue, but the root cause is, that I don't have the time to adopt DBD::AnyData to the new DBD::File / DBI::DBD::SqlEngine (for finally 5 hobbyists worldwide). That's why, DBI-1.625 marked DBD::AnyData as incompatible. Further discussions about that on dbi-users@ or dbi-dev@ mailing lists, please.
CC: "Dan [...] DWright.Org" <Dan [...] DWright.Org>
Subject: RE: [rt.cpan.org #85714] SqlEngine 0.06 new method expect $data->{'Database'} to reference database handle
Date: Thu, 30 May 2013 10:33:28 -0400
To: "bug-DBD-AnyData [...] rt.cpan.org" <bug-DBD-AnyData [...] rt.cpan.org>
From: "Davis, Malcolm" <malcolm.davis [...] bms.com>
Thanks. I am sorry I didn't see that the bug was already reported. I found the reporting mechanism on the CPAN site, but I didn't know how to get to the bug list page until after I got the automated reply to my message and at that point I wasn't sure how to respond that I realized that this was all covered without instigating a new bug report and apologizing immediately. I am hoping that the reply syntax in your subject is the right trick. I am afraid I also got to the process of installing DBD::AnyData through doing a cpan> install Bundle::Snapshot... from my old system, and that process goes out and just tries to install the latest of everything and so I never saw a complaint about incompatibility. I just wonder if there is a way to make the DBD::AnyData installer abort if the installed DBI is too new? I know they can require a package not be too old, but I suspect this is a rarer case. Finally, I must admit I don't know if anyone here is actually using DBD::AnyData at this point. It could have been it was installed in the past and is no longer in active use. I will check. If it is, I will look into what we need to do to keep it working: downgrade DBI, look at fixing the code,... In any event, I want to send out a thanks for having worked on the code in the first place, and for being there to respond to my report no matter how redundant it was. Thanks, Malcolm Show quoted text
>-----Original Message----- >From: Jens Rehsack via RT [mailto:bug-DBD-AnyData@rt.cpan.org] >Sent: Thursday, May 30, 2013 2:11 AM >To: Davis, Malcolm >Cc: Dan@DWright.Org >Subject: [rt.cpan.org #85714] SqlEngine 0.06 new method expect $data-
>>{'Database'} to reference database handle
> ><URL: https://rt.cpan.org/Ticket/Display.html?id=85714 > > >You spend a lot of time analysing the failing places of your issue, but >the root cause is, that I don't have the time to adopt DBD::AnyData to >the new DBD::File / DBI::DBD::SqlEngine (for finally 5 hobbyists >worldwide). > >That's why, DBI-1.625 marked DBD::AnyData as incompatible. > >Further discussions about that on dbi-users@ or dbi-dev@ mailing lists, >please.
This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.
CC: DBI Developers Mailing List <dbi-dev [...] perl.org>
Subject: Re: [rt.cpan.org #85714] SqlEngine 0.06 new method expect $data->{'Database'} to reference database handle
Date: Thu, 30 May 2013 17:26:56 +0200
To: bug-DBD-AnyData [...] rt.cpan.org
From: Jens Rehsack <rehsack [...] cpan.org>
On 30.05.13 16:33, Davis, Malcolm via RT wrote: Show quoted text
> Queue: DBD-AnyData > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85714 > > > Thanks. I am sorry I didn't see that the bug was already reported. I > found the reporting mechanism on the CPAN site, but I didn't know how to > get to the bug list page until after I got the automated reply to my > message and at that point I wasn't sure how to respond that I realized > that this was all covered without instigating a new bug report and > apologizing immediately. I am hoping that the reply syntax in your > subject is the right trick.
Partially - but you re-open the ticket doing that ;) But as long there is something unclear, feel free. For future responses for discussion only, I please you to use the dbi-dev@ mailing list. Show quoted text
> I am afraid I also got to the process of installing DBD::AnyData > through doing a cpan> install Bundle::Snapshot... from my old system, > and that process goes out and just tries to install the latest of > everything and so I never saw a complaint about incompatibility. I just > wonder if there is a way to make the DBD::AnyData installer abort if the > installed DBI is too new? I know they can require a package not be too > old, but I suspect this is a rarer case. > > Finally, I must admit I don't know if anyone here is actually using > DBD::AnyData at this point. It could have been it was installed in the > past and is no longer in active use. I will check. If it is, I will look > into what we need to do to keep it working: downgrade DBI, look at > fixing the code,...
If there is a business case, you maybe want to help get DBD::AnyData being ready for new DBI. If it's just for ancient reasons, there is no available timeslice of my spare time. Show quoted text
> In any event, I want to send out a thanks for having worked on the > code in the first place, and for being there to respond to my report no > matter how redundant it was.
You're welcome ;) Cheers, Jens Show quoted text
> Thanks, > Malcolm >
>> -----Original Message----- >> From: Jens Rehsack via RT [mailto:bug-DBD-AnyData@rt.cpan.org] >> Sent: Thursday, May 30, 2013 2:11 AM >> To: Davis, Malcolm >> Cc: Dan@DWright.Org >> Subject: [rt.cpan.org #85714] SqlEngine 0.06 new method expect $data-
>>> {'Database'} to reference database handle
>> >> <URL: https://rt.cpan.org/Ticket/Display.html?id=85714 > >> >> You spend a lot of time analysing the failing places of your issue, but >> the root cause is, that I don't have the time to adopt DBD::AnyData to >> the new DBD::File / DBI::DBD::SqlEngine (for finally 5 hobbyists >> worldwide). >> >> That's why, DBI-1.625 marked DBD::AnyData as incompatible. >> >> Further discussions about that on dbi-users@ or dbi-dev@ mailing lists, >> please.
> > This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited. >
Because of people can't search ...