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/myisamchk.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/myisamchk.c')
-rw-r--r-- | myisam/myisamchk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index f2b5525f22a..c776c80e3ec 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -729,6 +729,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) } share=info->s; share->options&= ~HA_OPTION_READ_ONLY_DATA; /* We are modifing it */ + share->tot_locks-= share->r_locks; share->r_locks=0; raid_chunks=share->base.raid_chunks; @@ -806,6 +807,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) rep_quick|=T_QUICK; } share=info->s; + share->tot_locks-= share->r_locks; share->r_locks=0; } @@ -835,6 +837,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) 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; datafile=info->dfile; @@ -1011,6 +1014,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) info->update&= ~HA_STATE_CHANGED; } share->w_locks--; + share->tot_locks--; end2: if (mi_close(info)) { |