summaryrefslogtreecommitdiff
path: root/myisam/mi_close.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-06-17 12:34:19 +0300
committerunknown <monty@hundin.mysql.fi>2002-06-17 12:34:19 +0300
commita1583056718c443e6c7feb0dead456b6567c045c (patch)
tree7fb8a56e8b7982117d32b33392e0f6e1bc56a477 /myisam/mi_close.c
parent19e7bb150fffc487337d9b96cde681e6beb7e9c4 (diff)
downloadmariadb-git-a1583056718c443e6c7feb0dead456b6567c045c.tar.gz
Ensure that share->tot_locks s updated correctly
This fixes that mysamchk --sort-records works on windows. myisam/mi_check.c: Ensure that share->tot_locks s updated correctly myisam/mi_close.c: Ensure that share->tot_locks s updated correctly myisam/mi_dynrec.c: Ensure that share->tot_locks s updated correctly myisam/mi_open.c: Ensure that share->tot_locks s updated correctly myisam/mi_statrec.c: Ensure that share->tot_locks s updated correctly myisam/myisamchk.c: Ensure that share->tot_locks s updated correctly
Diffstat (limited to 'myisam/mi_close.c')
-rw-r--r--myisam/mi_close.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/myisam/mi_close.c b/myisam/mi_close.c
index bd8b9aff727..7197d0ba069 100644
--- a/myisam/mi_close.c
+++ b/myisam/mi_close.c
@@ -29,8 +29,7 @@ int mi_close(register MI_INFO *info)
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_close");
DBUG_PRINT("enter",("base: %lx reopen: %u locks: %u",
- info,(uint) share->reopen,
- (uint) (share->w_locks+share->r_locks)));
+ info,(uint) share->reopen, (uint) share->tot_locks));
pthread_mutex_lock(&THR_LOCK_myisam);
if (info->lock_type == F_EXTRA_LCK)
@@ -47,7 +46,10 @@ int mi_close(register MI_INFO *info)
pthread_mutex_lock(&share->intern_lock);
if (share->options & HA_OPTION_READ_ONLY_DATA)
+ {
share->r_locks--;
+ share->tot_locks--;
+ }
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
if (end_io_cache(&info->rec_cache))