summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-06 03:50:30 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-11 22:32:19 +0200
commitd7d9697d85cba6bb18bcb767ebd0005b1ae73e1c (patch)
treebd8b3aed0a74eb29cb15f64bbf1d97ecc002a4f7 /tests
parent985094601315c45c2e0a2ac8292df4c2f646c698 (diff)
less noise: simplify db_remove_reset()
db_remove_reset() needs to be called after each stmt run, whether it succeeded or not. In case sqlite3_clear_bindings() would fail to unbind a stmt, we would anyway be beyond recovery. There seem to be no plausible situations where such failure would occur, unless there have been no bindings in the first place. In case there was an SQL stmt failure, sqlite3_reset() will re-barf the same error message, we will always have logged it earlier already in the proper context. We are never evaluating the return value, nor would we know how to recover from non-success. The conclusions: - db_remove_reset() does not need to log any errors. - db_remove_reset() does not need to return success. Change-Id: I21678463e59f607f5f5c5732963e274392f0fffd
Diffstat (limited to 'tests')
-rw-r--r--tests/db/db_test.err5
1 files changed, 0 insertions, 5 deletions
diff --git a/tests/db/db_test.err b/tests/db/db_test.err
index ac0e2f1..1b08cec 100644
--- a/tests/db/db_test.err
+++ b/tests/db/db_test.err
@@ -29,7 +29,6 @@ struct hlr_subscriber {
db_subscr_create(dbc, imsi0) --> -EIO
DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi
-DDB Error in sqlite3_reset: 2067
DAUC IMSI='123456789000000': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi
db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0
@@ -40,12 +39,10 @@ struct hlr_subscriber {
db_subscr_create(dbc, imsi1) --> -EIO
DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi
-DDB Error in sqlite3_reset: 2067
DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi
db_subscr_create(dbc, imsi1) --> -EIO
DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi
-DDB Error in sqlite3_reset: 2067
DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi
db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> 0
@@ -56,12 +53,10 @@ struct hlr_subscriber {
db_subscr_create(dbc, imsi2) --> -EIO
DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi
-DDB Error in sqlite3_reset: 2067
DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi
db_subscr_create(dbc, imsi2) --> -EIO
DDB (2067) abort at 18 in [INSERT INTO subscriber (imsi) VALUES ($imsi)]: UNIQUE constraint failed: subscriber.imsi
-DDB Error in sqlite3_reset: 2067
DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi
db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0