Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl multithreading and mysql

Status
Not open for further replies.

byleth

Programmer
Feb 27, 2004
70
PT
Hi,

i'm using Perl 5.8.1,

the 'use' part of the script is:

use threads;
use threads::shared;
use DBI;


now, i'm getting this error when trying to access a MySql database in a thread that it's not the main thread:

------
thread failed to start: DBD::mysql::dr connect failed: handle 1 is owned by thread 804b878 not current thread 8395e38 (handles can't be shared between threads and your driver may need a CLONE method added) at /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi/DBI.pm line 585.
------

there is no problem if i try to access the database in the main thread, so the code it's right.

i don´t really know what i'm doing wrong, and i don´t understand what that error means.

thank you in advance...
 
Looks as if MySQL doesn't support threads byleth

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top