[MDEV-25383] SELECT page in the KB is inaccurate in regard to locking options Created: 2021-04-10 Updated: 2021-04-11 Resolved: 2021-04-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Locking |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
As of now, the KB page for SELECT statement goes like this:
Off-topic: INTO DUMPFILE has lost a square bracket and is shown as mandatory, it's obviously wrong. Thus, the locking part
expands into these combinations, if I got them right:
But this is not true. These ones don't work:
The first one can actually be a bug, it is strange that this works:
But this doesn't:
The ones with SKIP LOCKED are most likely rejected by design, so it just needs to be documented more precisely. |
| Comments |
| Comment by Elena Stepanova [ 2021-04-10 ] | |||||
|
Assigned to danblack to confirm that SKIP LOCKED is limited by design, and maybe to check SELECT ... WAIT n / SELECT ... NOWAIT – I'd expect that either both should work, or both shouldn't. | |||||
| Comment by Daniel Black [ 2021-04-11 ] | |||||
|
These look strange, however wait/nowait are table aliases rather than waiting directives.
So LOCK IN SHARE MODE / FOR UPDATE is part of the required syntax for WAIT / NOWAIT and I've extended those to include SKIP LOCKED. It seems attempting to remove that constraint is going to get into parser conflicts with wait/nowait being table aliases. As such I'll correct the KB. | |||||
| Comment by Daniel Black [ 2021-04-11 ] | |||||
|
Fixed KB for skip locked along with DUMPFILE representation. |