Issue #3618513: Take a hold's anchor locks by primary key, so two holds cannot take them opposite ways round

Takes a hold's anchor locks by primary key, in id order, so two holds naming overlapping sets of anchors cannot take the same rows opposite ways round.

Measured on a load harness against MySQL 8, forty bookers on an eight thousand place house for ninety seconds: 1891 and 2047 claims refused with SQLSTATE[40001] before, 40 after.

The forty that remain come from the consumption SUM's own next-key locks and belong to [#3617101].

Kernel tests cannot see a row lock at all, SQLite dropping FOR UPDATE silently, so what they assert is the shape that makes the order deterministic.

Merge request reports

Loading
Loading