summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-08-25 17:19:44 +0300
committerunknown <monty@narttu.mysql.fi>2003-08-25 17:19:44 +0300
commit413b57e14c23b42b1068fd6a95a5e1296029acd1 (patch)
tree28a19e92b8ac6f4ca2691bb1c3ae3056a65b006c /mysys
parente8007ae77b20a6c51daaa47da78c65fe0b0fdac8 (diff)
downloadmariadb-git-413b57e14c23b42b1068fd6a95a5e1296029acd1.tar.gz
Better fix for myisamchk --sort-index on windows
Fixed deadlock bug when doing resize of key buffer while key buffer was in active use myisam/mi_locking.c: Better fix for myisamchk --sort-index on windows mysql-test/r/symlink.result: Update results mysql-test/t/symlink.test: Update results mysys/mf_keycache.c: Fixed deadlock bug when doing resize of key buffer while key buffer was in active use sql/ha_myisam.cc: simple optimization sql/sql_show.cc: Fixed theoretical buffer overrun Reset variable properly before calling update_create_info()
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_keycache.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 6a037f13f05..4cb3681b8b8 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -705,11 +705,19 @@ int flush_key_blocks(File file, enum flush_type type)
static int flush_all_key_blocks()
{
- int error=0;
- while (_my_blocks_changed > 0)
- if (flush_key_blocks_int(_my_used_first->file, FLUSH_RELEASE))
- error=1;
- return error;
+ SEC_LINK **block, **end;
+ for (block= changed_blocks, end= block+CHANGED_BLOCKS_HASH;
+ block < end;
+ block++
+ )
+ {
+ while (*block)
+ {
+ if (flush_key_blocks_int((*block)->file, FLUSH_RELEASE))
+ return 1;
+ }
+ }
+ return 0;
}