2010/4/26 larry s: > I have a perl script that ran fine until I upgraded to 1.7. It uses DBI to > access a mysql database and I have boiled down the problem area to the > following: > [top stuff omitted] > my $server = 'remotesvr'; > my $database = 'tcdump'; > print "\nConnecting to mysql on $server ...\t"; > my $dbh = DBI->connect("DBI:mysql:tcdump:$server", 'auser', 'pw', {RaiseError > => 1 } ) > or die "Couldn't connect to database: $DBI::errstr\n"; > if ($dbh) { print "Connected to mysql database ($database) on $server \n"; } > > my $sth = $dbh->prepare("DESCRIBE aindex") ; > $sth->execute() or die "STMT= execute err= " . $dbh->errstr; > > while (my @rowx = $sth->fetchrow_array() ) { > foreach my $jkl (@rowx) { > if (defined($jkl)) { > print "$jkl \t"; > } > } > print "\n"; > } > > > When run, the fetchrow in the while causes: > DBD::mysql::st fetchrow_array failed: fetch() without execute() at ./testz.pl > line 31. > Uncaught exception from user code: > DBD::mysql::st fetchrow_array failed: fetch() without execute() at > ./testz.pl line 31. > at ./testz.pl line 31 > > It still runs fine when run from Linux machines with perl 5.8.8, so I'm > wondering if it can be fixed for 5.10 or if there is a way to go back to 5.8 > on Cygwin 1.7.5.
That looks like a case where you just have to recompile DBD::mysql. (binary incompat) $ cpan > force install DBD::mysql -- Reini Urban http://phpwiki.org/ http://murbreak.at/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple