apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r672712 - /apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c
Date Mon, 30 Jun 2008 05:50:58 GMT
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) {



Mime
View raw message