aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_batch2_reserves_in_insert.c
diff options
context:
space:
mode:
authorJoseph <Joseph.xu@efrei.net>2023-01-03 05:10:27 -0500
committerJoseph <Joseph.xu@efrei.net>2023-01-03 05:28:54 -0500
commitb001046a1e47fa48aacdb383ce58584b56eb2db7 (patch)
treefe508fce715671e8d6250a93ce14d69b3a65cfff /src/exchangedb/pg_batch2_reserves_in_insert.c
parent1c104ddf28082a50718cb3d34fdc098a26eb3883 (diff)
some modifications for batch update
Diffstat (limited to 'src/exchangedb/pg_batch2_reserves_in_insert.c')
-rw-r--r--src/exchangedb/pg_batch2_reserves_in_insert.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/exchangedb/pg_batch2_reserves_in_insert.c b/src/exchangedb/pg_batch2_reserves_in_insert.c
index 219261cc..08d3ee8e 100644
--- a/src/exchangedb/pg_batch2_reserves_in_insert.c
+++ b/src/exchangedb/pg_batch2_reserves_in_insert.c
@@ -819,15 +819,13 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
}
enum GNUNET_DB_QueryStatus qs3;
- PREPARE (pg,
- "reserves_update",
- "CALL exchange_do_batch_reserves_update"
- " ($1,$2,$3,$4,$5,$6,$7,$8,$9);");
+
for (unsigned int i = 0; i<reserves_length; i++)
{
if (! conflicts[i])
continue;
+ // fprintf(stdout, "%d\n", conflicts[i]);
{
// const struct TALER_EXCHANGEDB_ReserveInInfo *reserve = &reserves[i];
struct GNUNET_PQ_QueryParam params[] = {
@@ -841,7 +839,10 @@ TEH_PG_batch2_reserves_in_insert (void *cls,
GNUNET_PQ_query_param_string (notify_s[i]),
GNUNET_PQ_query_param_end
};
-
+ PREPARE (pg,
+ "reserves_update",
+ "CALL exchange_do_batch_reserves_update"
+ " ($1,$2,$3,$4,$5,$6,$7,$8,$9);");
qs3 = GNUNET_PQ_eval_prepared_non_select (pg->conn,
"reserves_update",
params);