CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: DBI:
Perl threading with DBI insertion


New User

Oct 18, 2016, 12:14 AM

Post #1 of 1 (25902 views)
Perl threading with DBI insertion Can't Post


I am facing problem in multithreading with perl. I have created 5 threads and executing all at a time, during data insertion in database I am facing problem here I am inserted ‘function Name’ with ‘cdets id’ . During insertion in data base mapping problem is coming. ‘Function name’ and ‘cdets id ‘ is mismatching during insert query.

I have 10 CDETS with 70 function. After threading process for 10 cdets in database results are showing 8 CDETS with 70 functions.
Here 2 CDETS are missing and its function updated in database with other cdets functions.

Note: SELECT LAST_INSERT_ID() is also not working with multithreading here.

Below is sample code:

use threads;

foreach my $id (@ddts) {

my $thread_1 = threads->create(\&ExecuteCommand, "$id");
if ($count1>=5){


How can I run all threads at a time by creating multiple database handlers.
Could anyone please help/guide me in troubleshooting this issue.
Any pointers would be helpful.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives