From: lpsolit%gmail.com <> Date: Fri, 5 Aug 2005 00:07:10 +0000 (+0000) Subject: Bug 303088: MoreSQLData and FetchSQLData/FetchOneColumn may return wrong results... X-Git-Tag: bugzilla-2.20rc2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b8e9986d9583a5f14f026ea158eafe517c851a;p=thirdparty%2Fbugzilla.git Bug 303088: MoreSQLData and FetchSQLData/FetchOneColumn may return wrong results - Patch by Frédéric Buclin r=wurblzap,justdave a=justdave --- diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 153c0a6515..4f7b3b1f65 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -73,6 +73,9 @@ use constant BLOB_TYPE => DBI::SQL_BLOB; # Bugzilla.pm. See bug 192531 for details. our $_current_sth; our @SQLStateStack = (); + +my $_fetchahead; + sub SendSQL { my ($str) = @_; @@ -83,6 +86,8 @@ sub SendSQL { # This is really really ugly, but its what we get for not doing # error checking for 5 years. See bug 189446 and bug 192531 $_current_sth->{RaiseError} = 0; + + undef $_fetchahead; } # Its much much better to use bound params instead of this @@ -99,8 +104,6 @@ sub SqlQuote { return $res; } -# XXX - mod_perl -my $_fetchahead; sub MoreSQLData { return 1 if defined $_fetchahead;