diff options
author | Michael Widenius <monty@askmonty.org> | 2010-12-05 14:25:01 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-12-05 14:25:01 +0200 |
commit | a585745d4fd04c557a0d8f2fdacf10a35d77c8a3 (patch) | |
tree | e1ac3ea7d1364267351a56f3e263e2b109dc675f /storage | |
parent | 657e83cf4dee105ed0262acf14e3e9193cccd4b8 (diff) | |
download | mariadb-git-a585745d4fd04c557a0d8f2fdacf10a35d77c8a3.tar.gz |
Fixes to not trigger end-consistency testing of pagecache.
- Moved end_pagecache() to after maria_close()
- Flush page cache before closing files (in maria_pack)
Fixed test suite failure for PBXT
mysql-test/suite/pbxt/r/select.result:
We mask out the 'rows' column because it may differ from run to run
mysql-test/suite/pbxt/t/select.test:
We mask out the 'rows' column because it may differ from run to run
storage/maria/maria_chk.c:
Moved end_pagecache() to after maria_close() to not trigger end-consistency testing of pagecache.
storage/maria/maria_pack.c:
Moved end_pagecache() to after maria_close() to not trigger end-consistency testing of pagecache.
flush page cache before closing files.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/maria/maria_chk.c | 2 | ||||
-rw-r--r-- | storage/maria/maria_pack.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c index d065070693f..b9b0c681d0a 100644 --- a/storage/maria/maria_chk.c +++ b/storage/maria/maria_chk.c @@ -1339,12 +1339,12 @@ static int maria_chk(HA_CHECK *param, char *filename) maria_lock_database(info, F_UNLCK); end2: - end_pagecache(maria_pagecache, 1); if (maria_close(info)) { _ma_check_print_error(param, default_close_errmsg, my_errno, filename); DBUG_RETURN(1); } + end_pagecache(maria_pagecache, 1); if (error == 0) { if (param->out_flag & O_NEW_DATA) diff --git a/storage/maria/maria_pack.c b/storage/maria/maria_pack.c index 3e0ea3d571c..c09a6310ff4 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; @@ -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); } |