mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 20:25:32 +02:00
Bug #10901
After review fix Copy from internal state to share state only when in lock write mode (happens only when lock table x write has been performed since update_state_info is only called when holding a TL_READ_NO_INSERT lock normally. Previous patch would have failed in combination with delayed writes.
This commit is contained in:
parent
f956ecd09a
commit
26bd158216
1 changed files with 4 additions and 2 deletions
|
|
@ -3626,9 +3626,11 @@ int update_state_info(MI_CHECK *param, MI_INFO *info,uint update)
|
|||
/*
|
||||
When tables are locked we haven't synched the share state and the
|
||||
real state for a while so we better do it here before synching
|
||||
the share state to disk.
|
||||
the share state to disk. Only when table is write locked is it
|
||||
necessary to perform this synch.
|
||||
*/
|
||||
share->state.state= *info->state;
|
||||
if (info->lock_type == F_WRLCK)
|
||||
share->state.state= *info->state;
|
||||
if (mi_state_info_write(share->kfile,&share->state,1+2))
|
||||
goto err;
|
||||
share->changed=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue