in reply to Threads and multiple DBI connections
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>)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Threads and multiple DBI connections
by clone4 (Sexton) on Nov 01, 2010 at 17:06 UTC | |
by BrowserUk (Patriarch) on Nov 01, 2010 at 18:03 UTC | |
by clone4 (Sexton) on Nov 01, 2010 at 20:22 UTC | |
by BrowserUk (Patriarch) on Nov 01, 2010 at 22:02 UTC | |
by Anonymous Monk on Nov 02, 2010 at 11:17 UTC |