You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2008/06/30 07:50:58 UTC

svn commit: r672712 - /apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c

Author: bojan
Date: Sun Jun 29 22:50:58 2008
New Revision: 672712

URL: http://svn.apache.org/viewvc?rev=672712&view=rev
Log:
Backport r672711 from the trunk.
DBD rows are counted from one, but in PostgreSQL they start from zero.

Modified:
    apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c

Modified: apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c?rev=672712&r1=672711&r2=672712&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c (original)
+++ apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c Sun Jun 29 22:50:58 2008
@@ -258,7 +258,7 @@
     }
 
     if (res->random) {
-        if ((row->n > 0) && (size_t)row->n >= res->ntuples) {
+        if ((row->n >= 0) && (size_t)row->n >= res->ntuples) {
             *rowp = NULL;
             apr_pool_cleanup_run(pool, res->res, clear_result);
             res->res = NULL;
@@ -266,7 +266,7 @@
         }
     }
     else {
-        if ((row->n > 0) && (size_t)row->n >= res->ntuples) {
+        if ((row->n >= 0) && (size_t)row->n >= res->ntuples) {
             /* no data; we have to fetch some */
             row->n -= res->ntuples;
             if (res->res != NULL) {



Re: svn commit: r672712 - /apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
bojan@apache.org wrote:
> Backport r672711 from the trunk.
> DBD rows are counted from one, but in PostgreSQL they start from zero.

Sounds like a user-visible bugfix that needs to be called out in CHANGES?