gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 15/15: handle partner_serial_id being NULL


From: gnunet
Subject: [taler-exchange] 15/15: handle partner_serial_id being NULL
Date: Sun, 27 Nov 2022 22:14:39 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

commit 07b4b1aa3f2c9ac74462ff3cb2b6a32c25e13c2e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Nov 27 22:06:59 2022 +0100

    handle partner_serial_id being NULL
---
 src/exchangedb/pg_get_reserve_history.c | 4 ++--
 src/exchangedb/procedures.sql           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/exchangedb/pg_get_reserve_history.c 
b/src/exchangedb/pg_get_reserve_history.c
index 8b8e280a..6042a620 100644
--- a/src/exchangedb/pg_get_reserve_history.c
+++ b/src/exchangedb/pg_get_reserve_history.c
@@ -803,7 +803,7 @@ TEH_PG_get_reserve_history (void *cls,
            "     ON (am.purse_pub = pm.purse_pub AND"
            "         am.reserve_pub = pm.reserve_pub)"
            " WHERE pm.reserve_pub=$1"
-           "  AND pm.partner_serial_id=0" /* must be local! */
+           "  AND COALESCE(pm.partner_serial_id,0)=0" /* must be local! */
            "  AND NOT pdes.refunded;");
   PREPARE (pg,
            "history_by_reserve",
@@ -1097,7 +1097,7 @@ TEH_PG_get_reserve_status (void *cls,
            "         am.reserve_pub = pm.reserve_pub)"
            " WHERE pm.reserve_pub=$1"
            "  AND pm.merge_timestamp >= $2"
-           "  AND pm.partner_serial_id=0" /* must be local! */
+           "  AND COALESCE(pm.partner_serial_id,0)=0" /* must be local! */
            "  AND NOT pdes.refunded;");
   PREPARE (pg,
            "history_by_reserve_truncated",
diff --git a/src/exchangedb/procedures.sql b/src/exchangedb/procedures.sql
index f0df6444..ff3ddb3f 100644
--- a/src/exchangedb/procedures.sql
+++ b/src/exchangedb/procedures.sql
@@ -1519,7 +1519,7 @@ out_conflict=FALSE;
 out_balance_ok=TRUE;
 
 -- See if we can finish the merge or need to update the trigger time and 
partner.
-SELECT partner_serial_id
+SELECT COALESCE(partner_serial_id,0)
       ,reserve_pub
   INTO psi
       ,my_reserve_pub

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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