summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authoracurtis@xiphis.org <>2005-06-09 17:15:06 +0100
committeracurtis@xiphis.org <>2005-06-09 17:15:06 +0100
commit3b8c3bd7e1d26423756301891cfdf6d181652699 (patch)
treed9346272a66df32b694fc91151af4459d92c8e47 /myisam
parentd08d1a88e080a5febdcb9826b4113918ff4fd473 (diff)
parent304bb0c66d8d6f22d93548aa8fb141560186a2d2 (diff)
downloadmariadb-git-3b8c3bd7e1d26423756301891cfdf6d181652699.tar.gz
Merge
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 38f3ebaa20a..9e003a18dac 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -3871,6 +3871,14 @@ int update_state_info(MI_CHECK *param, MI_INFO *info,uint update)
if (!share->state.create_time)
share->state.create_time=share->state.check_time;
}
+ /*
+ 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. Only when table is write locked is it
+ necessary to perform this synch.
+ */
+ 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;