$dbh = DBI->connect("dbi:mysqlPP:$dsn;host=$host", $user, $pw,
{PrintError => 1, RaiseError => 1});
if (!$dbh) {
print "error: connection: $DBI::errn$DBI::errstrn$DBI::staten";
}
$drh = DBI->install_driver("mysqlPP");
$ary_ref = $dbh->selectcol_arrayref("SELECT pui,spuid FROM inven WHERE dispatchdate="0000-00-00" and dupli is NULL LIMIT 0, 5000", { Columns=>[1,2] });
%masterdb = @$ary_ref; # build hash from key-value pairs so $hash{$id} => name
$sth = $dbh->prepare("SELECT DISTINCT spuid FROM inven WHERE dispatchdate"0000-00-00" and dupli is NULL LIMIT 0, 1000");
$sth->execute();
while ( @row = $sth->fetchrow_array ) {
push(@dspu, "@row.dat");
}
The above code which uses mysqlPP module is giving our of memory exception and not getting executed. Where as if it uses ODBC connection it is working without any exception. First query will fetch 3000 records and 2nd query fetches 500 records. it may increase in later stages.
$dbh = DBI->connect("dbi:ODBC:$dsn", $user, $pw,
{PrintError => 1, RaiseError => 1});
if (!$dbh) {
print "error: connection: $DBI::errn$DBI::errstrn$DBI::staten";
}
Is there any bug in mysqlPP? or am i missing something obvious.