Attention is currently required from: keith, pespin.
fixeria has posted comments on this change by keith. ( https://gerrit.osmocom.org/c/osmo-msc/+/28340?usp=email )
Change subject: sqlite optimisation: Avoid unneeded database operation ......................................................................
Patch Set 5:
(2 comments)
File src/libmsc/db.c:
https://gerrit.osmocom.org/c/osmo-msc/+/28340/comment/80b7de71_ed68cf76?usp=... : PS4, Line 302: id = $id LIMIT 1
I consider it standard practice to add a LIMIT 1 to a query that is only intended to ever delete max […]
Not sure if this really a standard practice, given that not all database bacnends support the `LIMIT` statement in `DELETE FROM` queries. I am not strictly against this as it does not hurt, but it looks redundant to me. The uniqueness of `id` (primary key) must be guaranteed by the database engine, so either you have exactly one record matching your query or none.
https://gerrit.osmocom.org/c/osmo-msc/+/28340/comment/d55a8767_86c83c79?usp=... : PS4, Line 303: DB_STMT_SMS_DEL_EXPIRED I believe this was already brought up here by other reviewers: we now have two identical queries in the array. One of them should be removed to avoid duplication (can be done in a separate patch).