diff options
author | unknown <mronstrom@mysql.com> | 2005-06-03 17:13:43 +0200 |
---|---|---|
committer | unknown <mronstrom@mysql.com> | 2005-06-03 17:13:43 +0200 |
commit | f956ecd09a4897b5f7e65a0441445a52406a3a8a (patch) | |
tree | e497fef16e21c7ab513489de1f8d6a87f275505a /myisam/mi_check.c | |
parent | 0d4b118455b1b97e8adc316407e26a8d734d3f04 (diff) | |
download | mariadb-git-f956ecd09a4897b5f7e65a0441445a52406a3a8a.tar.gz |
Bug #10901
Analyze table corrupts the state on
data_file_length, records, index_file_length...
by writing the shared state when there is an updated internal
state due to inserts or deletes
Fixed by synching the shared state with the internal state before
writing it to disk
Added test cases of 2 error cases and a normal case in new
analyze test case
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r-- | myisam/mi_check.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index e78d831fde7..16946adb3e8 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -3623,6 +3623,12 @@ 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. + */ + share->state.state= *info->state; if (mi_state_info_write(share->kfile,&share->state,1+2)) goto err; share->changed=0; |