summaryrefslogtreecommitdiff
path: root/myisam/mi_locking.c
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-08-25 14:27:32 +0300
committermonty@narttu.mysql.fi <>2003-08-25 14:27:32 +0300
commitf83e876065e4fe7c8214f418b9febe5be4d00cad (patch)
tree938a55a6e041a1bfd4c0e3a6e9df608ef77d093b /myisam/mi_locking.c
parent9d02d19ce8005ed455ab0649b876cd210458ff14 (diff)
downloadmariadb-git-f83e876065e4fe7c8214f418b9febe5be4d00cad.tar.gz
Update of VC++ project files (to remove link warnings)
Fix unlock error in myisamchk on windows when doing --sort-index Use SetFilePointer instead of SetFilePointerEx
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 22772a3dd2e..19fd99779ba 100644
--- a/myisam/mi_locking.c
+++ b/myisam/mi_locking.c
@@ -35,6 +35,7 @@ int mi_lock_database(MI_INFO *info, int lock_type)
MYISAM_SHARE *share=info->s;
uint flag;
DBUG_ENTER("mi_lock_database");
+ DBUG_PRINT("info",("lock_type: %d", lock_type));
if (share->options & HA_OPTION_READ_ONLY_DATA ||
info->lock_type == lock_type)
@@ -53,10 +54,13 @@ int mi_lock_database(MI_INFO *info, int lock_type)
{
switch (lock_type) {
case F_UNLCK:
+ DBUG_PRINT("info", ("old lock: %d", info->lock_type));
if (info->lock_type == F_RDLCK)
count= --share->r_locks;
- else
+ else if (info->lock_type == F_WRLCK)
count= --share->w_locks;
+ else
+ count= 1; /* F_EXTRA_LCK */
--share->tot_locks;
if (info->lock_type == F_WRLCK && !share->w_locks &&
!share->delay_key_write && flush_key_blocks(share->kfile,FLUSH_KEEP))