diff options
author | monty@tik.mysql.fi <> | 2001-05-23 02:40:46 +0300 |
---|---|---|
committer | monty@tik.mysql.fi <> | 2001-05-23 02:40:46 +0300 |
commit | 8685094e159f29f2b00642f579be4ca681a10247 (patch) | |
tree | 22a09c551394dd62383433e28ef919ca86f669b7 /myisam/mi_locking.c | |
parent | a3be64bfa519ff04d5b6a9be8dfb2e255ee3862b (diff) | |
download | mariadb-git-8685094e159f29f2b00642f579be4ca681a10247.tar.gz |
Don't write rows in MyISAM tables when using count(distinct)
Don't read MyISAM header when running without locking
Diffstat (limited to 'myisam/mi_locking.c')
-rw-r--r-- | myisam/mi_locking.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c index e067e80fcf3..8ef5db1d344 100644 --- a/myisam/mi_locking.c +++ b/myisam/mi_locking.c @@ -412,11 +412,14 @@ int _mi_mark_file_changed(MI_INFO *info) share->global_changed=1; share->state.open_count++; } - mi_int2store(buff,share->state.open_count); - buff[2]=1; /* Mark that it's changed */ - return (my_pwrite(share->kfile,buff,sizeof(buff), - sizeof(share->state.header), - MYF(MY_NABP))); + if (!share->temporary) + { + mi_int2store(buff,share->state.open_count); + buff[2]=1; /* Mark that it's changed */ + return (my_pwrite(share->kfile,buff,sizeof(buff), + sizeof(share->state.header), + MYF(MY_NABP))); + } } return 0; } |