|
|
@ -615,14 +615,8 @@ bool users_update(PGconn *conn, K_ITEM *u_item, char *oldhash, |
|
|
|
PARCHKVAL(par, 3, params); |
|
|
|
PARCHKVAL(par, 3, params); |
|
|
|
|
|
|
|
|
|
|
|
conned = CKPQConn(&conn); |
|
|
|
conned = CKPQConn(&conn); |
|
|
|
// Beginning of a write txn
|
|
|
|
if (!CKPQBegin(conn)) |
|
|
|
res = CKPQExec(conn, "Begin", CKPQ_WRITE); |
|
|
|
|
|
|
|
rescode = CKPQResultStatus(res); |
|
|
|
|
|
|
|
CKPQClear(res); |
|
|
|
|
|
|
|
if (!PGOK(rescode)) { |
|
|
|
|
|
|
|
PGLOGERR("Begin", rescode, conn); |
|
|
|
|
|
|
|
goto unparam; |
|
|
|
goto unparam; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = CKPQExecParams(conn, upd, par, NULL, (const char **)params, NULL, NULL, 0, CKPQ_WRITE); |
|
|
|
res = CKPQExecParams(conn, upd, par, NULL, (const char **)params, NULL, NULL, 0, CKPQ_WRITE); |
|
|
|
rescode = CKPQResultStatus(res); |
|
|
|
rescode = CKPQResultStatus(res); |
|
|
@ -873,14 +867,8 @@ bool users_replace(PGconn *conn, K_ITEM *u_item, K_ITEM *old_u_item, char *by, |
|
|
|
PARCHKVAL(par, 3, params); |
|
|
|
PARCHKVAL(par, 3, params); |
|
|
|
|
|
|
|
|
|
|
|
conned = CKPQConn(&conn); |
|
|
|
conned = CKPQConn(&conn); |
|
|
|
// Beginning of a write txn
|
|
|
|
if (!CKPQBegin(conn)) |
|
|
|
res = CKPQExec(conn, "Begin", CKPQ_WRITE); |
|
|
|
|
|
|
|
rescode = CKPQResultStatus(res); |
|
|
|
|
|
|
|
CKPQClear(res); |
|
|
|
|
|
|
|
if (!PGOK(rescode)) { |
|
|
|
|
|
|
|
PGLOGERR("Begin", rescode, conn); |
|
|
|
|
|
|
|
goto unparam; |
|
|
|
goto unparam; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = CKPQExecParams(conn, upd, par, NULL, (const char **)params, NULL, NULL, 0, CKPQ_WRITE); |
|
|
|
res = CKPQExecParams(conn, upd, par, NULL, (const char **)params, NULL, NULL, 0, CKPQ_WRITE); |
|
|
|
rescode = CKPQResultStatus(res); |
|
|
|
rescode = CKPQResultStatus(res); |
|
|
@ -1687,13 +1675,8 @@ bool workers_update(PGconn *conn, K_ITEM *item, char *difficultydefault, |
|
|
|
PARCHKVAL(par, 3, params); |
|
|
|
PARCHKVAL(par, 3, params); |
|
|
|
|
|
|
|
|
|
|
|
conned = CKPQConn(&conn); |
|
|
|
conned = CKPQConn(&conn); |
|
|
|
res = CKPQExec(conn, "Begin", CKPQ_WRITE); |
|
|
|
if (!CKPQBegin(conn)) |
|
|
|
rescode = CKPQResultStatus(res); |
|
|
|
|
|
|
|
CKPQClear(res); |
|
|
|
|
|
|
|
if (!PGOK(rescode)) { |
|
|
|
|
|
|
|
PGLOGERR("Begin", rescode, conn); |
|
|
|
|
|
|
|
goto unparam; |
|
|
|
goto unparam; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = CKPQExecParams(conn, upd, par, NULL, (const char **)params, NULL, NULL, 0, CKPQ_WRITE); |
|
|
|
res = CKPQExecParams(conn, upd, par, NULL, (const char **)params, NULL, NULL, 0, CKPQ_WRITE); |
|
|
|
rescode = CKPQResultStatus(res); |
|
|
|
rescode = CKPQResultStatus(res); |
|
|
|