Skip to content

Commit 57add90

Browse files
committed
Do not expose ERR_VERIFY to client
Signed-off-by: Morgan Douglas <[email protected]>
1 parent 63b94af commit 57add90

File tree

9 files changed

+10
-11
lines changed

9 files changed

+10
-11
lines changed

Diff for: db/osqlcomm.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -7547,8 +7547,7 @@ int osql_process_packet(struct ireq *iq, uuid_t uuid, void *trans, char **pmsg,
75477547

75487548
if (rc != 0) {
75497549
if (rc != RC_INTERNAL_RETRY) {
7550-
errstat_cat_strf(&iq->errstat,
7551-
" unable to update record rc = %d", rc);
7550+
errstat_cat_strf(&iq->errstat," unable to update record");
75527551
}
75537552
if (gbl_enable_osql_logging)
75547553
logmsg(LOGMSG_DEBUG,

Diff for: db/sqlglue.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5243,7 +5243,7 @@ int sqlite3BtreeCommit(Btree *pBt)
52435243
if (clnt->early_retry == EARLY_ERR_VERIFY) {
52445244
clnt->osql.xerr.errval = ERR_BLOCK_FAILED + ERR_VERIFY;
52455245
errstat_cat_str(&(clnt->osql.xerr),
5246-
"unable to update record rc = 4");
5246+
"unable to update record");
52475247
} else if (clnt->early_retry == EARLY_ERR_SELECTV) {
52485248
clnt->osql.xerr.errval = ERR_CONSTR;
52495249
errstat_cat_str(&(clnt->osql.xerr),

Diff for: db/sqlinterfaces.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,7 @@ static int do_commitrollback(struct sqlthdstate *thd, struct sqlclntstate *clnt,
21822182
if (clnt->early_retry == EARLY_ERR_VERIFY) {
21832183
clnt->osql.xerr.errval = ERR_BLOCK_FAILED + ERR_VERIFY;
21842184
errstat_cat_str(&(clnt->osql.xerr),
2185-
"unable to update record rc = 4");
2185+
"unable to update record");
21862186
} else if (clnt->early_retry == EARLY_ERR_SELECTV) {
21872187
clnt->osql.xerr.errval = ERR_CONSTR;
21882188
errstat_cat_str(&(clnt->osql.xerr),

Diff for: db/sqloffload.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static int rese_commit(struct sqlclntstate *clnt, struct sql_thread *thd,
248248
} else {
249249
clnt->osql.xerr.errval = ERR_BLOCK_FAILED + ERR_VERIFY;
250250
errstat_cat_str(&(clnt->osql.xerr),
251-
"unable to update record rc = 4");
251+
"unable to update record");
252252
}
253253
rc = SQLITE_ABORT;
254254
} else if (clnt->early_retry == EARLY_ERR_SELECTV) {

Diff for: tests/dupewrite.test/t02.req.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[EXEC PROCEDURE test_dupe_insert_3()] failed with rc -3 [n = q:fetch()...]:7: statement must be read-only
1515
[EXEC PROCEDURE test_dupe_update_2()] failed with rc -3 [db:exec(sql):emit()...]:3: statement must be read-only
1616
[EXEC PROCEDURE test_dupe_update_3()] failed with rc -3 [n = q:fetch()...]:7: statement must be read-only
17-
[EXEC PROCEDURE test_dupe_update_4()] failed with rc -8 find old record failed unable to update record rc = 4
17+
[EXEC PROCEDURE test_dupe_update_4()] failed with rc -8 find old record failed unable to update record
1818
[EXEC PROCEDURE test_dupe_delete_2()] failed with rc -3 [db:exec(sql):emit()...]:3: statement must be read-only
1919
[EXEC PROCEDURE test_dupe_delete_3()] failed with rc -3 [n = q:fetch()...]:7: statement must be read-only
2020
[EXEC PROCEDURE test_dupe_delete_4()] failed with rc -8 Table 'dupe4' find old record failed unable to delete genid =XXXXXX rc=4

Diff for: tests/serialstep.test/s14_01.req.exp.alt2

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ done
55
done
66
(rows updated=1)
77
done
8-
[commit] failed with rc 2 find old record failed unable to update record rc = 4
8+
[commit] failed with rc 2 find old record failed unable to update record
99
done

Diff for: tests/serialstep.test/s2_01.req.exp.alt2

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ done
3535
(id=99, name='ytu', age=8, address=NULL, state='DB', zip=NULL)
3636
done
3737
done
38-
[commit] failed with rc 2 find old record failed unable to update record rc = 4
38+
[commit] failed with rc 2 find old record failed unable to update record
3939
done
4040
done
4141
done

Diff for: tests/tools/linearizable/jepsen/src/comdb2/core.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"Given an error string, identifies whether the error is safely retriable."
187187
[e]
188188
(or (re-find #"not serializable" e)
189-
(re-find #"unable to update record rc = 4" e)
189+
(re-find #"unable to update record" e)
190190
(re-find #"selectv constraints" e)
191191
(re-find #"Maximum number of retries done." e)))
192192

Diff for: tests/verify_error.test/t2_01.req.exp

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ done
3030
1 [truncate test2]
3131
done
3232
1 [commit]
33-
[commit] failed with rc 2 find old record failed unable to update record rc = 4
33+
[commit] failed with rc 2 find old record failed unable to update record
3434
done
3535
1 [select * from test1]
3636
(i=1, j=4)
@@ -51,7 +51,7 @@ done
5151
(rows updated=1)
5252
done
5353
1 [commit]
54-
[commit] failed with rc 2 find old record failed unable to update record rc = 4
54+
[commit] failed with rc 2 find old record failed unable to update record
5555
done
5656
1 [select * from test1]
5757
(i=1, j=4)

0 commit comments

Comments
 (0)