Tim,

Whilst I'm trying to narrow this issue down to just DBI or DBD::ODBC here is a
level 2 trace (against the now installed DBD::ODBC 1.06):

[EMAIL PROTECTED] DBD-ODBC-1.06]$ perl -w x.pl 
    DBI 1.38-nothread dispatch trace level set to 2
    -> DBI->install_driver(ODBC) for linux perl=5.008 pid=22209 ruid=1000
euid=1000
       install_driver: DBD::ODBC version 1.06 loaded from
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBD/ODBC.pm
    <- install_driver= DBI::dr=HASH(0x81ea584)
    -> data_sources for DBD::ODBC::dr (DBI::dr=HASH(0x81ea584)~0x8242454 undef
undef)
Usage: DBD::ODBC::dr::data_sources(drh, attr = NULL) at
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm line 964.
    -- DBI::END
    -> disconnect_all for DBD::ODBC::dr (DBI::dr=HASH(0x81ea584)~0x8242454)
    <- disconnect_all= '' at DBI.pm line 652
!   -> DESTROY for DBD::ODBC::dr (DBI::dr=HASH(0x8242454)~INNER)
!   <- DESTROY= (not implemented) during global destruction

Martin
-- 
Martin J. Evans
Easysoft Ltd, UK
Development


On 12-Nov-2003 Tim Bunce wrote:
> On Wed, Nov 12, 2003 at 09:28:54AM -0000, Martin J. Evans wrote:
>> Hi,
>> 
>> I have:
>> 
>> [EMAIL PROTECTED] DBD-ODBC-1.06]$ perl -MDBI -e 'DBI->installed_versions'
>>   Perl            : 5.008
>>   OS              : linux
>>   DBI             : 1.38
>>   DBD::mysql      : 2.9002
>>   DBD::Sponge     : 11.09
>>   DBD::Proxy      : 0.2004
>>   DBD::ODBC       : 1.05
>>   DBD::Multiplex  : 0.9
>>   DBD::ExampleP   : 11.10
>> 
>> 
>> I was upgrading DBD::ODBC to 1.06 when tests 02simple 13 onwards failed.
>> I've
>> reduced this to the following simple perl and output:
>> 
>> use DBI;
>> 
>> my @data_sources = DBI->data_sources('ODBC');
>> print "Data sources:\n\t", join("\n\t",@data_sources),"\n\n";
>> 
>> [EMAIL PROTECTED] DBD-ODBC-1.06]$ perl x.pl 
>> Usage: DBD::ODBC::dr::data_sources(drh, attr = NULL) at
>> /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm line 964.
> 
> sub data_sources {
>     my ($class, $driver, @other) = @_;
>     my $drh = $class->install_driver($driver);
>     my @ds = $drh->data_sources(@other);
>     return @ds;
> }
> 
> So $class would be "DBI", $driver would be "ODBC" and @other would be empty.
> So then data_sources should be called with only the $drh as a parameter
> and that shouldn't cause an error.
> 
> Could you post a level 2 trace so we can see what's going on?
> 
>> perldoc DBI appears to say:
>>          @data_sources = DBI->data_sources($driver_name, \%attr, $dbh);
>> under SYNOPSIS and:
>>              @ary = DBI->data_sources($driver);
>>              @ary = DBI->data_sources($driver, \%attr);
>> under "data_sources"
>> 
>> The above code works fine with DBI 1.13 and DBD::ODBC 0.28.
> 
> It would be more helpful if you could narrow it down to one changed
> module instead of two. Also note that although the code that's failing
> is 'in' the driver, it's actually supplied by the DBI that's installed
> at the time the driver is compiled and installed.
> 
> Tim.

Reply via email to