Comments - FOR UPDATE
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
The text is conflicting about the autocommit setting. First it says "applies only when autocommit is set to 0 or the SELECT is enclosed in a transaction" (notice the OR in between). And later says: "If autocommit is set to 1, the LOCK IN SHARE MODE and FOR UPDATE clauses have no effect."
For example MySQL documentation says it like this, which seems to be clearer: "Locking reads are only possible when autocommit is disabled (either by beginning transaction with START TRANSACTION or by setting autocommit to 0."