11 messages in com.mysql.lists.perlOdd prepare problem
FromSent OnAttachments
Amit Kumar29 Mar 2001 18:34 
Amit Kumar29 Mar 2001 22:40 
Tobias Brox30 Mar 2001 02:16 
A Kumar31 Mar 2001 17:37 
Tobias Brox01 Apr 2001 03:16 
Tobias Brox01 Apr 2001 04:09 
Tobias Brox01 Apr 2001 09:48 
barries01 Apr 2001 09:51 
barries01 Apr 2001 13:00 
A Kumar02 Apr 2001 16:21 
Tobias Brox02 Apr 2001 21:39 
Subject:Odd prepare problem
From:Amit Kumar (kuma@rpi.edu)
Date:03/29/2001 06:34:08 PM
List:com.mysql.lists.perl

I'm having a very odd problem when I try and perform a very simple query:

$sql_query = SELECT share_id FROM Shares WHERE share =" . $dbh->quote($share); $sth = $dbh->prepare($sql_query); $sth->execute;

the program will just stall at the prepare, like its waiting for the prepare to complete. When I do a "show processlist" I can see the that the mysql thread that the program is connected to shows its command as sleep.

What makes this really wired: 1) Other queries, even more complex ones, work on the same database in the same script. 2) If I turn on logging(DBD::Msql) then the query works and doesn't stall at the prepare. Of course that isn't a long term solution, because it is a complete waste of computer cycles. 3) This script ran perfectly on a RedHat 6.2 installation, but I switched to Mandrake 7.2 after a hardrive crash. Both installations were configured the same: I kept the stock perl installation and installed the following modules from source perl DBI DBI-1.14 Data-Dumper Data-Dumper-2.101 DBD::Mysql Msql-Mysql-modules-1.2215 4) I have tried this script on 2 different computers, with Mandrake 7.2, and have had identical results.

Any help would be greatly appreciated, because I'm at a complete loss.

Thanks