summaryrefslogtreecommitdiff
path: root/myisam/mi_locking.c
diff options
context:
space:
mode:
authorunknown <monty@tik.mysql.fi>2001-05-23 02:40:46 +0300
committerunknown <monty@tik.mysql.fi>2001-05-23 02:40:46 +0300
commit4b799725034bd5f2d7cda76d8a5bcb3b42cb88f3 (patch)
tree22a09c551394dd62383433e28ef919ca86f669b7 /myisam/mi_locking.c
parent8ec67661b4327060a12f9888a1179d5161e4b9c4 (diff)
downloadmariadb-git-4b799725034bd5f2d7cda76d8a5bcb3b42cb88f3.tar.gz
Don't write rows in MyISAM tables when using count(distinct)
Don't read MyISAM header when running without locking include/myisam.h: Don't read header when running without locking. myisam/mi_locking.c: Don't update changed flag for temporary files. myisam/mi_open.c: Don't read header when running without locking. myisam/mi_static.c: Don't read header when running without locking. sql/item_sum.cc: Don't write rows in MyISAM tables when using count(distinct) sql/mysqld.cc: Don't read MyISAM header when running without locking. Remove -Sg option. sql/sql_analyse.h: Remove duplicate header. sql/sql_select.cc: Cleaned up prototypes. Don't write rows to count(DISTINCT) MyISAM tables. sql/sql_select.h: Cleaned up prototypes. sql/table.h: A BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'myisam/mi_locking.c')
-rw-r--r--myisam/mi_locking.c13
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;
}