$dbh = DBI->connect("dbi:mysqlPP:$dsn;host=$host", $user, $pw,
{PrintError => 1, RaiseError => 1});
if (!$dbh) {
    print "error: connection: $DBI::err\n$DBI::errstr\n$DBI::state\n";
}
$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::err\n$DBI::errstr\n$DBI::state\n";
}

is there any bug in mysqlPP? or am i missing something obvious.

Please help in resolving this error.

Regards,
Ganesh

Reply via email to