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=email : 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=email : 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). -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28340?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I777155c0f818b979c636bb59953719e472771603 Gerrit-Change-Number: 28340 Gerrit-PatchSet: 5 Gerrit-Owner: keith <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <[email protected]> Gerrit-CC: pespin <[email protected]> Gerrit-Attention: pespin <[email protected]> Gerrit-Attention: keith <[email protected]> Gerrit-Comment-Date: Mon, 13 Oct 2025 07:44:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <[email protected]> Comment-In-Reply-To: keith <[email protected]>
