summaryrefslogtreecommitdiff
path: root/myisam/mi_locking.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-16 03:58:58 +0200
committerunknown <monty@donna.mysql.com>2000-11-16 03:58:58 +0200
commit3e6dac34cd5b8ef322d375f3af22137822656c8a (patch)
tree4b8f3df4d2aef33906b1e7e311b909e12f38539e /myisam/mi_locking.c
parentc7d2c59ceb4e3548eb74e5d8fba16e0f41ffc7d9 (diff)
downloadmariadb-git-3e6dac34cd5b8ef322d375f3af22137822656c8a.tar.gz
changed to use IO_CACHE instead of FILE
Docs/manual.texi: Type fixes myisam/mi_create.c: Fixed bug in update from different processes myisam/mi_locking.c: Fixed bug in update from different processes myisam/mi_open.c: Fixed bug in update from different processes myisam/mi_search.c: Fixed bug in update from different processes myisam/myisamdef.h: Fixed bug in update from different processes mysys/Makefile.am: Added mf_iocache2.c sql/log.cc: Changed to use IO_CACHE instead of FILE sql/sql_class.h: Changed to use IO_CACHE instead of FILE sql/sql_repl.cc: Changed to use IO_CACHE instead of FILE BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'myisam/mi_locking.c')
-rw-r--r--myisam/mi_locking.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c
index 4797584627a..45bb2cd7164 100644
--- a/myisam/mi_locking.c
+++ b/myisam/mi_locking.c
@@ -70,6 +70,7 @@ int mi_lock_database(MI_INFO *info, int lock_type)
{
share->state.process= share->last_process=share->this_process;
share->state.unique= info->last_unique= info->this_unique;
+ share->state.update_count= info->last_loop= ++info->this_loop;
if (mi_state_info_write(share->kfile, &share->state, 1))
error=my_errno;
share->changed=0;
@@ -346,6 +347,7 @@ int _mi_writeinfo(register MI_INFO *info, uint operation)
{ /* Two threads can't be here */
share->state.process= share->last_process= share->this_process;
share->state.unique= info->last_unique= info->this_unique;
+ share->state.update_count= info->last_loop= ++info->this_loop;
if ((error=mi_state_info_write(share->kfile, &share->state, 1)))
olderror=my_errno;
#ifdef __WIN__
@@ -377,12 +379,14 @@ int _mi_test_if_changed(register MI_INFO *info)
{
MYISAM_SHARE *share=info->s;
if (share->state.process != share->last_process ||
- share->state.unique != info->last_unique)
+ share->state.unique != info->last_unique ||
+ share->state.update_count != info->last_loop)
{ /* Keyfile has changed */
if (share->state.process != share->this_process)
VOID(flush_key_blocks(share->kfile,FLUSH_RELEASE));
share->last_process=share->state.process;
info->last_unique= share->state.unique;
+ info->last_loop= share->state.update_count;
info->update|= HA_STATE_WRITTEN; /* Must use file on next */
info->data_changed= 1; /* For mi_is_changed */
return 1;