|
|
@ -2904,9 +2904,6 @@ bool sharesummaries_to_markersummaries(PGconn *conn, WORKMARKERS *workmarkers, |
|
|
|
ss_item = ss_prev; |
|
|
|
ss_item = ss_prev; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (old_sharesummary_store->count == 0) |
|
|
|
|
|
|
|
reason = "no sharesummaries"; |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
if (conn == NULL) { |
|
|
|
if (conn == NULL) { |
|
|
|
conn = dbconnect(); |
|
|
|
conn = dbconnect(); |
|
|
|
conned = true; |
|
|
|
conned = true; |
|
|
@ -2930,6 +2927,7 @@ bool sharesummaries_to_markersummaries(PGconn *conn, WORKMARKERS *workmarkers, |
|
|
|
ms_item = ms_item->next; |
|
|
|
ms_item = ms_item->next; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (old_sharesummary_store->count > 0) { |
|
|
|
par = 0; |
|
|
|
par = 0; |
|
|
|
params[par++] = bigint_to_buf(workmarkers->workinfoidstart, NULL, 0); |
|
|
|
params[par++] = bigint_to_buf(workmarkers->workinfoidstart, NULL, 0); |
|
|
|
params[par++] = bigint_to_buf(workmarkers->workinfoidend, NULL, 0); |
|
|
|
params[par++] = bigint_to_buf(workmarkers->workinfoidend, NULL, 0); |
|
|
@ -2958,6 +2956,7 @@ bool sharesummaries_to_markersummaries(PGconn *conn, WORKMARKERS *workmarkers, |
|
|
|
reason = "delete mismatch"; |
|
|
|
reason = "delete mismatch"; |
|
|
|
goto rollback; |
|
|
|
goto rollback; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ok = workmarkers_process(conn, true, true, |
|
|
|
ok = workmarkers_process(conn, true, true, |
|
|
|
workmarkers->markerid, |
|
|
|
workmarkers->markerid, |
|
|
@ -2974,7 +2973,6 @@ rollback: |
|
|
|
res = PQexec(conn, "Rollback", CKPQ_WRITE); |
|
|
|
res = PQexec(conn, "Rollback", CKPQ_WRITE); |
|
|
|
|
|
|
|
|
|
|
|
PQclear(res); |
|
|
|
PQclear(res); |
|
|
|
} |
|
|
|
|
|
|
|
flail: |
|
|
|
flail: |
|
|
|
for (n = 0; n < par; n++) |
|
|
|
for (n = 0; n < par; n++) |
|
|
|
free(params[n]); |
|
|
|
free(params[n]); |
|
|
|