9 messages in com.mysql.lists.perlDBD::mysql sometimes fails to trap er...
FromSent OnAttachments
Jay Lawrence29 Apr 2002 09:04 
Chuck O'Donnell29 Apr 2002 10:43 
Jay Lawrence29 Apr 2002 12:11 
Chuck O'Donnell29 Apr 2002 12:13 
Jay Lawrence29 Apr 2002 13:13 
Keith Schincke29 Apr 2002 13:40 
Chuck O'Donnell29 Apr 2002 13:51 
Jay Lawrence30 Apr 2002 13:38 
Jochen Wiedmann01 May 2002 13:16 
Subject:DBD::mysql sometimes fails to trap errors with mysql_use_result
From:Jay Lawrence (ja@lawrence.net)
Date:04/30/2002 01:38:28 PM
List:com.mysql.lists.perl

I have located one wee deficiency with DBD::mysql.

In dbdimp.c around 1493 (sub dbd_st_fetch) if a mysql_fetch_row call does not succeed under mysql_use_result it will return a NULL meaning either end of set or an error has occured. You need to check mysql_errno / mysql_error first. In fact the docs say that mysql_eof is depricted.

Anywhoo, adding:

dbdimp.c line 1490-ish imp_sth->currow++; if (!(cols = mysql_fetch_row(imp_sth->cda))) { + D_imp_dbh_from_sth; + if (mysql_errno(&imp_dbh->mysql)) { + do_error(sth, mysql_errno(&imp_dbh->mysql), + mysql_error(&imp_dbh->mysql)); + } if (!mysql_eof(imp_sth->cda)) { D_imp_dbh_from_sth;

was reeeeealy helpful telling me more about my "Mysterious Problem" I've been trying to hunt down....

It has correctly reported my error and now I can move on and solve THAT problem! :))

Jay