gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: fix limit binding


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: fix limit binding
Date: Mon, 20 Mar 2017 15:18:44 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 3ea60fb  fix limit binding
3ea60fb is described below

commit 3ea60fbc60932ca411ad31df9dfd18dd1fb26016
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Mar 20 15:20:46 2017 +0100

    fix limit binding
---
 src/backenddb/plugin_merchantdb_postgres.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/backenddb/plugin_merchantdb_postgres.c 
b/src/backenddb/plugin_merchantdb_postgres.c
index 8d62057..afd6e8e 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -170,7 +170,7 @@ postgres_initialize (void *cls)
            ",proposal_data BYTEA NOT NULL"
            ",h_proposal_data BYTEA NOT NULL"
            ",timestamp INT8 NOT NULL"
-           ",row_id SERIAL"
+           ",row_id BIGSERIAL"
           ",PRIMARY KEY (order_id, merchant_pub)"
            ");");
 
@@ -840,19 +840,19 @@ postgres_find_proposal_data_by_date_and_range (void *cls,
                                                
TALER_MERCHANTDB_ProposalDataCallback cb,
                                                void *cb_cls)
 {
-
+  uint64_t s64 = start;
+  uint64_t r64 = nrows;
   struct PostgresClosure *pg = cls;
   PGresult *result;
   unsigned int n;
-  unsigned int i;
-
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_absolute_time (&date),
     GNUNET_PQ_query_param_auto_from_type (merchant_pub),
-    GNUNET_PQ_query_param_uint32 (&start),
-    GNUNET_PQ_query_param_uint32 (&nrows),
+    GNUNET_PQ_query_param_uint64 (&s64),
+    GNUNET_PQ_query_param_uint64 (&r64),
     GNUNET_PQ_query_param_end
   };
+
   result = GNUNET_PQ_exec_prepared (pg->conn,
                                     "find_proposal_data_by_date_and_range",
                                     params);
@@ -862,12 +862,13 @@ postgres_find_proposal_data_by_date_and_range (void *cls,
     PQclear (result);
     return GNUNET_SYSERR;
   }
-  if (0 == (n = PQntuples (result)) || NULL == cb)
+  if ( (0 == (n = PQntuples (result))) ||
+       (NULL == cb) )
   {
     PQclear (result);
     return n;
   }
-  for (i = 0; i < n; i++)
+  for (unsigned int i = 0; i < n; i++)
   {
     char *order_id;
     json_t *proposal_data;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]