Attention is currently required from: fixeria, pespin.
keith 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 4:
(1 comment)
File src/libmsc/db.c:
https://gerrit.osmocom.org/c/osmo-msc/+/28340/comment/ce8942e1_460cd2a1?usp=... : PS4, Line 302: id = $id LIMIT 1
Why are you adding `LIMIT 1`? Can there really be more than one entry with `id = $id`?
I consider it standard practice to add a LIMIT 1 to a query that is only intended to ever delete maximum of 1 row.
I can't say off the top of my head where I learned this, but I have surely seen it. I don't know if there's any performance benefit. Maybe it's just one more of those oh so many things that programmers do to convey intention to other programmers but that one could always argue are not really necessary, because X or Y will "never" happen.