can"t call statistics_info() method

can"t call statistics_info() method

am 30.08.2011 05:26:35 von Keedi Kim

--000e0cd2541c2d17b804abb094ba
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have a problem to call statistics_info() method since 4.019.
I'm using DBD::mysql with Fey::Loader and before DBD::mysql 4.019,
Fey::Loader::mysql module has a fix up code to call statistics_info method.

> package # hide from PAUSE
> DBD::mysql::Fixup;
>
> BEGIN {
> unless ( defined &DBD::mysql::db::statistics_info ) {
> *DBD::mysql::db::statistics_info = \&_statistics_info;
> }
> }
>
> sub _statistics_info {
> ...
> }

Since DBD::mysql 4.019, following code was added.

> BEGIN {
> my @needs_async_check = qw/data_sources statistics_info
quote_identifier begin_work/;
>
> foreach my $method (@needs_async_check) {
> no strict 'refs';
>
> my $super = "SUPER::$method";
> *$method = sub {
> my $h = shift;
> return unless $h->func('_async_check');
> return $h->$super(@_);
> };
> }
> }

But when $dbh->statistics_info() method is called,
following error message is occurred.

Can't locate object method "statistics_info" via package
"DBD::mysql::db::SUPER" at
/home/askdna/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/ 5.14.1/i686-linux/DBD/
mysql.pm line 767.

my little script which call stastics_info() method looks like:

> #!/usr/bin/env perl
>
> use strict;
> use warnings;
> use DBI;
>
> my $dbh = DBI->connect(
> 'DBI:mysql:paste:127.0.0.1',
> 'paste',
> 'paste',
> {
> RaiseError => 1,
> AutoCommit => 1,
> },
> );
>
> my $key_info = $dbh->statistics_info( '', '', 'paste', 1, 1 );

Could you please tell me what is wrong in my code
or what I mis-understand about DBD::mysql.

Thanks :-)

Best Regards,

Keedi Kim

----
http://keedi.pe.kr

--000e0cd2541c2d17b804abb094ba--