FOR UPDATE may leave spurious locks
FOR UPDATE may leave spurious locks
От:
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Дата:
Hello.
I noticed that $SUBJECT. "spurious" here means the locks on the rows
that are not seemingly qualified by the query condition (that is, EPQ
failure).
It doesn't seem to be a bug to me (or it
seems just inevitable.). But that doesn't seems to be described either
in the doc. If I'm right here, don't we need one, something like this?
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 1f9538f2fe..97253dedc6 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -200,6 +200,9 @@ TABLE [ ONLY ] table_name [ * ]
SELECT statement locks the selected rows
against concurrent updates. (See
below.)
+ Note that concurrent udpates may cause some unmatched rows locked.
+ SELECT statements with SKIP LOCKED may miss some rows that are not
+ returned by concurrent FOR_UPDATE queries.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center