summaryrefslogtreecommitdiff
path: root/myisam/myisamchk.c
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-07-19 18:17:29 +0500
committerunknown <hf@deer.(none)>2003-07-19 18:17:29 +0500
commit5aef292a075a49c75590e6cf8e2ffcbdd0b77ca8 (patch)
tree3f085dfe9c1a2e4205df93973faab0e2876a5155 /myisam/myisamchk.c
parent0fd6f4049de2f4ba2a4f4197a7ef596ec0598eb6 (diff)
downloadmariadb-git-5aef292a075a49c75590e6cf8e2ffcbdd0b77ca8.tar.gz
Fix for #712 with Serg's suggestions
myisam/mi_locking.c: Here we use F_EXTRA_LCK myisam/myisamchk.c: lines of "locking - emulation" replaced with mi_lock_database call myisam/myisamdef.h: no need for MI_TEMPORARY_TABLE sql/ha_myisam.cc: We use F_WRLCK instead MI_TEMPORARY_TABLE
Diffstat (limited to 'myisam/myisamchk.c')
-rw-r--r--myisam/myisamchk.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index a7df01e0169..17daab67522 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -878,10 +878,7 @@ static int myisamchk(MI_CHECK *param, my_string filename)
param->error_printed=0;
goto end2;
}
- share->w_locks++; /* Mark for writeinfo */
- share->tot_locks++;
- info->lock_type= F_EXTRA_LCK; /* Simulate as locked */
- info->tmp_lock_type=lock_type;
+ mi_lock_database(info, F_EXTRA_LCK);
datafile=info->dfile;
if (param->testflag & (T_REP_ANY | T_SORT_RECORDS | T_SORT_INDEX))
@@ -1057,8 +1054,7 @@ static int myisamchk(MI_CHECK *param, my_string filename)
VOID(lock_file(param, share->kfile,0L,F_UNLCK,"indexfile",filename));
info->update&= ~HA_STATE_CHANGED;
}
- share->w_locks--;
- share->tot_locks--;
+ mi_lock_database(info, F_UNLCK);
end2:
if (mi_close(info))
{