my $dbh_t = DBIx::Threaded->connect("DBI:mysql:database=$database;host +=$host", $ +user, $password); DBIx::Threaded->dbix_threaded_create_pool(10); my $dbh = DBI->connect("DBI:mysql:database=$database;host=$host", $use +r, $passwo +rd); my $sth = $dbh->prepare("SELECT id,domain,DATE(created) FROM domain_li +st"); $sth->execute();
I've never used DBIx::Threaded, so this is guesswork. But from a quick squint at the synosis, I suspect that you shouldn't be creating and using both a threaded handle and a non-threaded handle.
Try getting rid of the second connect, and use $dbh_t wherever you would normally use $dbh (Or just rename the former to the latter>)
In reply to Re: Threads and multiple DBI connections
by BrowserUk
in thread Threads and multiple DBI connections
by clone4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |