problem using load_diag.pl

problem using load_diag.pl

am 17.09.2003 18:34:47 von Dave Howorth

I'm trying to use LOAD DATA and it is returning Warnings: 12. I can't
use SHOW WARNINGS because I'm using mysql 3.23.49 since I'm on
Debian/Woody. A search of mysql list archives showed up a Perl script
called load_diag.pl by Paul Dubois that diagnoses problems in data files
so I've downloaded that.

Sadly, it is crashing. When I run it like this:

~/bin/load_diag.pl -u dhoworth attributes attributes.txt

it reports "Segmentation fault". When I run it in the debugger it
reports "Aborted". By single-stepping, I've tracked the failure to this
call:

DBD::mysql::dr::connect(/usr/lib/perl5/DBD/mysql.pm:131):
131:
DBD::mysql::db::_login($this, $dsn, $username, $password)
132:
or $this = undef;

It aborts when I try to single-step into it.

perl is v5.6.1, examining the modules shows

# $Id: DBI.pm,v 11.7 2002/02/07 03:00:53 timbo Exp $
$DBI::VERSION = 1.21; # ==> ALSO update the version in the pod text below!

# $Id: dbd.pm.in,v 1.6 1999/10/21 20:05:43 joe Exp $
$VERSION = '2.0416';


I've written a small Perl program to test my installation (see below)
and that works, as does the mysql client and mysqlcc, and I'm not sure
where to look next.

All suggestions welcome.

Thanks, Dave


===========

#!/usr/bin/perl
use strict;
use warnings;

use DBI;

my $dsn = 'dbi:mysql:t1';
my $user = 'dhoworth';
my $password = '';

my $dbh = DBI->connect($dsn, $user, $password,
{ RaiseError => 1 });

my $sth = $dbh->prepare('SELECT * FROM regions');

$sth->execute();

while (my @row = $sth->fetchrow_array)
{
print "@row\n";
}


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

crash in DBD::mysql::db::_login (was Re: problem using load_diag.pl)

am 18.09.2003 13:23:35 von Dave Howorth

I've solved my problem, which was warnings from LOAD DATA - they turned
out to be due to 3 'comment' lines in the data file (i.e. lines starting
with #) which I guess generated a warning for each of 4 fields for each
line, giving 12 warnings.

I still have no idea why there was a crash in DBD::mysql though.

Cheers, Dave

=========================
Dave Howorth wrote:
> I'm trying to use LOAD DATA and it is returning Warnings: 12. I can't
> use SHOW WARNINGS because I'm using mysql 3.23.49 since I'm on
> Debian/Woody. A search of mysql list archives showed up a Perl script
> called load_diag.pl by Paul Dubois that diagnoses problems in data files
> so I've downloaded that.
>
> Sadly, it is crashing. When I run it like this:
>
> ~/bin/load_diag.pl -u dhoworth attributes attributes.txt
>
> it reports "Segmentation fault". When I run it in the debugger it
> reports "Aborted". By single-stepping, I've tracked the failure to this
> call:
>
> DBD::mysql::dr::connect(/usr/lib/perl5/DBD/mysql.pm:131):
> 131: DBD::mysql::db::_login($this, $dsn, $username, $password)
> 132: or $this = undef;
>
> It aborts when I try to single-step into it.
>
> perl is v5.6.1, examining the modules shows
>
> # $Id: DBI.pm,v 11.7 2002/02/07 03:00:53 timbo Exp $
> $DBI::VERSION = 1.21; # ==> ALSO update the version in the pod text below!
>
> # $Id: dbd.pm.in,v 1.6 1999/10/21 20:05:43 joe Exp $
> $VERSION = '2.0416';
>
>
> I've written a small Perl program to test my installation (see below)
> and that works, as does the mysql client and mysqlcc, and I'm not sure
> where to look next.
>
> All suggestions welcome.
>
> Thanks, Dave
>
>
> ===========
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> use DBI;
>
> my $dsn = 'dbi:mysql:t1';
> my $user = 'dhoworth';
> my $password = '';
>
> my $dbh = DBI->connect($dsn, $user, $password,
> { RaiseError => 1 });
>
> my $sth = $dbh->prepare('SELECT * FROM regions');
>
> $sth->execute();
>
> while (my @row = $sth->fetchrow_array)
> {
> print "@row\n";
> }


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

crash in DBD::mysql::db::_login (was Re: problem using load_diag.pl)

am 18.09.2003 13:23:35 von Dave Howorth

I've solved my problem, which was warnings from LOAD DATA - they turned
out to be due to 3 'comment' lines in the data file (i.e. lines starting
with #) which I guess generated a warning for each of 4 fields for each
line, giving 12 warnings.

I still have no idea why there was a crash in DBD::mysql though.

Cheers, Dave

=========================
Dave Howorth wrote:
> I'm trying to use LOAD DATA and it is returning Warnings: 12. I can't
> use SHOW WARNINGS because I'm using mysql 3.23.49 since I'm on
> Debian/Woody. A search of mysql list archives showed up a Perl script
> called load_diag.pl by Paul Dubois that diagnoses problems in data files
> so I've downloaded that.
>
> Sadly, it is crashing. When I run it like this:
>
> ~/bin/load_diag.pl -u dhoworth attributes attributes.txt
>
> it reports "Segmentation fault". When I run it in the debugger it
> reports "Aborted". By single-stepping, I've tracked the failure to this
> call:
>
> DBD::mysql::dr::connect(/usr/lib/perl5/DBD/mysql.pm:131):
> 131: DBD::mysql::db::_login($this, $dsn, $username, $password)
> 132: or $this = undef;
>
> It aborts when I try to single-step into it.
>
> perl is v5.6.1, examining the modules shows
>
> # $Id: DBI.pm,v 11.7 2002/02/07 03:00:53 timbo Exp $
> $DBI::VERSION = 1.21; # ==> ALSO update the version in the pod text below!
>
> # $Id: dbd.pm.in,v 1.6 1999/10/21 20:05:43 joe Exp $
> $VERSION = '2.0416';
>
>
> I've written a small Perl program to test my installation (see below)
> and that works, as does the mysql client and mysqlcc, and I'm not sure
> where to look next.
>
> All suggestions welcome.
>
> Thanks, Dave
>
>
> ===========
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> use DBI;
>
> my $dsn = 'dbi:mysql:t1';
> my $user = 'dhoworth';
> my $password = '';
>
> my $dbh = DBI->connect($dsn, $user, $password,
> { RaiseError => 1 });
>
> my $sth = $dbh->prepare('SELECT * FROM regions');
>
> $sth->execute();
>
> while (my @row = $sth->fetchrow_array)
> {
> print "@row\n";
> }


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org