summaryrefslogtreecommitdiff
path: root/storage/maria/maria_pack.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-12-06 10:25:44 +0200
committerMichael Widenius <monty@askmonty.org>2010-12-06 10:25:44 +0200
commitb7b25dc666a8d331d16231f9fb658af8c05ac694 (patch)
tree0c7798c2d187db0da7837a70f306a789afc16521 /storage/maria/maria_pack.c
parentab5e4eefd5d25c6e0755c2460dbb433a7a9e913b (diff)
parentb3c72b9a02e570a4a66ca0a64e94fe1116976c85 (diff)
downloadmariadb-git-b7b25dc666a8d331d16231f9fb658af8c05ac694.tar.gz
Merge with 5.1-release.
- Fixed problem with oqgraph and 'make dist' Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024). This will be fixed when mwl#128 is merged into 5.3.
Diffstat (limited to 'storage/maria/maria_pack.c')
-rw-r--r--storage/maria/maria_pack.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/maria/maria_pack.c b/storage/maria/maria_pack.c
index 1d2d3995bd8..8332af60de5 100644
--- a/storage/maria/maria_pack.c
+++ b/storage/maria/maria_pack.c
@@ -690,6 +690,8 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
error|=my_close(new_file,MYF(MY_WME));
if (!result_table)
{
+ (void) flush_pagecache_blocks(isam_file->s->pagecache, &isam_file->dfile,
+ FLUSH_RELEASE);
error|=my_close(isam_file->dfile.file, MYF(MY_WME));
isam_file->dfile.file= -1; /* Tell maria_close file is closed */
isam_file->s->bitmap.file.file= -1;
@@ -736,7 +738,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
VOID(my_delete(new_name,MYF(MY_WME)));
}
else
- error=my_redel(org_name,new_name,MYF(MY_WME | MY_COPYTIME));
+ error=my_redel(org_name, new_name, 0, MYF(MY_WME | MY_COPYTIME));
}
if (! error)
error=save_state(isam_file,mrg,new_length,glob_crc);
@@ -763,13 +765,13 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
DBUG_RETURN(0);
err:
- end_pagecache(maria_pagecache, 1);
free_counts_and_tree_and_queue(huff_trees,trees,huff_counts,fields);
if (new_file >= 0)
VOID(my_close(new_file,MYF(0)));
if (join_maria_file >= 0)
VOID(my_close(join_maria_file,MYF(0)));
mrg_close(mrg);
+ end_pagecache(maria_pagecache, 1);
VOID(fprintf(stderr, "Aborted: %s is not compressed\n", org_name));
DBUG_RETURN(-1);
}