X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG40,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <832088.86114.qm@web65503.mail.ac4.yahoo.com> References: <832088 DOT 86114 DOT qm AT web65503 DOT mail DOT ac4 DOT yahoo DOT com> Date: Mon, 26 Apr 2010 12:22:21 +0200 Message-ID: Subject: Re: perl script fails in 1.7 From: Reini Urban To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 2010/4/26 larry s: > I have a perl script that ran fine until I upgraded to 1.7.=A0 It uses DB= I to access a mysql database and I have boiled down the problem area to the= following: > [top stuff omitted] > my $server =3D 'remotesvr'; > my $database =3D 'tcdump'; > print "\nConnecting to mysql on $server ...\t"; > my $dbh =3D DBI->connect("DBI:mysql:tcdump:$server", 'auser', 'pw', {Rais= eError =3D> 1 } ) > =A0=A0=A0 or die "Couldn't connect to database: $DBI::errstr\n"; > if ($dbh) { print "Connected to mysql database ($database) on $server \n"= ; } > > my $sth =3D $dbh->prepare("DESCRIBE aindex") ; > $sth->execute() or die "STMT=3D execute err=3D " . $dbh->errstr; > > while (my @rowx =3D $sth->fetchrow_array() ) { > =A0=A0=A0=A0=A0=A0=A0 foreach my $jkl (@rowx) { > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (defined($jkl)) { > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 pri= nt "$jkl \t"; > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } > =A0=A0=A0=A0=A0=A0=A0 } > =A0=A0=A0=A0=A0=A0=A0 print "\n"; > } > > > When run, the fetchrow in the while causes: > DBD::mysql::st fetchrow_array failed: fetch() without execute() at ./test= z.pl line 31. > Uncaught exception from user code: > =A0=A0=A0=A0=A0=A0=A0 DBD::mysql::st fetchrow_array failed: fetch() witho= ut execute() at ./testz.pl line 31. > =A0at ./testz.pl line 31 > > It still runs fine when run from Linux machines with perl 5.8.8, so I'm w= ondering 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 --=20 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