Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
MySQL v8 has implemented enhanced control of locking in SELECT statements with joins, whereby you can lock some but not all tables in the join with FOR UPDATE OF <table>,<table>... and/or FOR SHARE OF <table>,<table>... (the latter equivalent to taking locks as in 'LOCK IN SHARE MODE').
This is very useful, because (for example) in a long running transaction that performs an update, you might often have joins with tables that aren't being updated, and these might be used by many other simultaneous sessions that you don't want to block. So it's important to only lock "FOR UPDATE" those tables actually being updated.
You can try doing this with subqueries, but it's very cumbersome.
Please implement the "FOR UPDATE OF ..." and "FOR SHARE OF ..." syntax!
(preferably allowing both in the same SELECT, for maximum control).
Thanks.
Attachments
Issue Links
- is part of
-
MDEV-28906 MySQL 8.0 desired compatibility
- Open