[MDEV-12761] Error return from external_lock make the server crash Created: 2017-05-09 Updated: 2017-05-16 Resolved: 2017-05-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.1.22 |
| Fix Version/s: | 10.1.24, 10.0.31, 10.2.7 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Olivier Bertrand | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Description |
|
This is due to:
Indeed, the m_lock_type variable is declared and described in handler.h as:
However, external_lock can be called in handler::ha_external_lock line 5828 with lock_type set to F_UNLCK but with this variable not having been set and still having a different value. On return, this function does set it line 5835 but only when there is no error. |
| Comments |
| Comment by Sergei Golubchik [ 2017-05-11 ] |
|
bertrandop, I'm trying to understand what's happening: 1. server does external_lock(F_RDLCK or F_WRLCK), Is that correct? If yes, then the fix should be, I guess, set m_lock_type=F_UNLCK even if external_lock(F_UNLCK) failed. |
| Comment by Olivier Bertrand [ 2017-05-11 ] |
|
Correct. But if so, what's the use of all these DBUG_ASSERT? |