diff options
author | unknown <monty@hundin.mysql.fi> | 2002-06-17 12:34:19 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-06-17 12:34:19 +0300 |
commit | c99fd2caef34cab1677f44cb5c2337d7f6a5c8db (patch) | |
tree | 7fb8a56e8b7982117d32b33392e0f6e1bc56a477 /myisam/mi_close.c | |
parent | c47044f0aeede93e17a73cdc221ca6e38cd3f125 (diff) | |
download | mariadb-git-c99fd2caef34cab1677f44cb5c2337d7f6a5c8db.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.c | 6 |
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)) |