mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-481 Assertion `pins->pin[i] == 0' failed in _lf_pinbox_put_pins on concurrent OPTIMIZE TABLE and DML with Aria tables
A bug in the lock-free hash implementation! when lsearch() has not found the key, the caller needs to unpin all the three pins, because lsearch() was using all the three.
This commit is contained in:
parent
0b5564b86c
commit
1f92707978
1 changed files with 3 additions and 1 deletions
|
@ -268,8 +268,10 @@ static LF_SLIST *lsearch(LF_SLIST * volatile *head, CHARSET_INFO *cs,
|
|||
int res= lfind(head, cs, hashnr, key, keylen, &cursor, pins);
|
||||
if (res)
|
||||
_lf_pin(pins, 2, cursor.curr);
|
||||
_lf_unpin(pins, 0);
|
||||
else
|
||||
_lf_unpin(pins, 2);
|
||||
_lf_unpin(pins, 1);
|
||||
_lf_unpin(pins, 0);
|
||||
return res ? cursor.curr : 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue