diff options
author | monty@hundin.mysql.fi <> | 2001-10-02 05:53:00 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-10-02 05:53:00 +0300 |
commit | 880026ccf667bf6e6adbd6cfa0abcf4268d68e4c (patch) | |
tree | b029d516fe4b48e540f64b01492d64cf5d68ad2f /myisam/mi_locking.c | |
parent | b5622e11dd4122959ec3deeac12686ff573a4f77 (diff) | |
download | mariadb-git-880026ccf667bf6e6adbd6cfa0abcf4268d68e4c.tar.gz |
Cleaned up SSL documentation
Fixes for embedded server
Made key_cache more configurable
Fixed that one can change key blocksize in MyISAM
A lot of optimizations to make MyISAM slightly faster
Diffstat (limited to 'myisam/mi_locking.c')
-rw-r--r-- | myisam/mi_locking.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c index 8ef5db1d344..b8ffc300fa9 100644 --- a/myisam/mi_locking.c +++ b/myisam/mi_locking.c @@ -50,6 +50,7 @@ int mi_lock_database(MI_INFO *info, int lock_type) count= --share->r_locks; else count= --share->w_locks; + --share->tot_locks; if (info->lock_type == F_WRLCK && !share->w_locks && !share->delay_key_write && flush_key_blocks(share->kfile,FLUSH_KEEP)) { @@ -153,6 +154,7 @@ int mi_lock_database(MI_INFO *info, int lock_type) } VOID(_mi_test_if_changed(info)); share->r_locks++; + share->tot_locks++; info->lock_type=lock_type; break; case F_WRLCK: @@ -200,6 +202,7 @@ int mi_lock_database(MI_INFO *info, int lock_type) VOID(_mi_test_if_changed(info)); info->lock_type=lock_type; share->w_locks++; + share->tot_locks++; break; default: break; /* Impossible */ @@ -295,13 +298,12 @@ my_bool mi_check_status(void* param) int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer) { - MYISAM_SHARE *share; DBUG_ENTER("_mi_readinfo"); - share=info->s; if (info->lock_type == F_UNLCK) { - if (!share->r_locks && !share->w_locks) + MYISAM_SHARE *share=info->s; + if (!share->tot_locks) { if ((info->tmp_lock_type=lock_type) != F_RDLCK) if (my_lock(share->kfile,lock_type,0L,F_TO_EOF, @@ -339,7 +341,7 @@ int _mi_writeinfo(register MI_INFO *info, uint operation) DBUG_ENTER("_mi_writeinfo"); error=0; - if (share->r_locks == 0 && share->w_locks == 0) + if (share->tot_locks == 0) { olderror=my_errno; /* Remember last error */ if (operation) |