summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-12-06 11:24:12 +0200
committerMichael Widenius <monty@askmonty.org>2010-12-06 11:24:12 +0200
commit42746a44a276ec6d7ee5217722015b1009e19fd3 (patch)
tree6c1174fc336868eb357aa64fe72e679e3a6f0ead /storage
parent26eb30d07f2088d8f2a939dfe697d9c4a9b54786 (diff)
parenta585745d4fd04c557a0d8f2fdacf10a35d77c8a3 (diff)
downloadmariadb-git-42746a44a276ec6d7ee5217722015b1009e19fd3.tar.gz
Merge with 5.1-release
Diffstat (limited to 'storage')
-rw-r--r--storage/maria/ma_loghandler.c8
-rw-r--r--storage/maria/maria_chk.c2
-rw-r--r--storage/maria/maria_pack.c4
-rw-r--r--storage/maria/unittest/ma_pagecache_consist.c1
-rw-r--r--storage/maria/unittest/ma_pagecache_rwconsist.c1
-rw-r--r--storage/maria/unittest/ma_test_loghandler_multithread-t.c5
-rw-r--r--storage/maria/unittest/ma_test_loghandler_pagecache-t.c2
7 files changed, 7 insertions, 16 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index a29c42cae68..97403920239 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -2466,14 +2466,6 @@ my_bool translog_prev_buffer_flush_wait(struct st_translog_buffer *buffer)
LSN_IN_PARTS(buffer->prev_sent_to_disk),
LSN_IN_PARTS(buffer->prev_buffer_offset)));
translog_buffer_lock_assert_owner(buffer);
- /*
- if prev_sent_to_disk == LSN_IMPOSSIBLE then
- prev_buffer_offset should be LSN_IMPOSSIBLE
- because it means that this buffer was never used
- */
- DBUG_ASSERT((buffer->prev_sent_to_disk == LSN_IMPOSSIBLE &&
- buffer->prev_buffer_offset == LSN_IMPOSSIBLE) ||
- buffer->prev_sent_to_disk != LSN_IMPOSSIBLE);
if (buffer->prev_buffer_offset != buffer->prev_sent_to_disk)
{
do {
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);
}
diff --git a/storage/maria/unittest/ma_pagecache_consist.c b/storage/maria/unittest/ma_pagecache_consist.c
index 7dbdba433c6..0a9e5737c7e 100644
--- a/storage/maria/unittest/ma_pagecache_consist.c
+++ b/storage/maria/unittest/ma_pagecache_consist.c
@@ -476,6 +476,7 @@ int main(int argc __attribute__((unused)),
pthread_mutex_unlock(&LOCK_thread_count);
DBUG_PRINT("info", ("thread ended"));
+ flush_pagecache_blocks(&pagecache, &file1, FLUSH_IGNORE_CHANGED);
end_pagecache(&pagecache, 1);
DBUG_PRINT("info", ("Page cache ended"));
diff --git a/storage/maria/unittest/ma_pagecache_rwconsist.c b/storage/maria/unittest/ma_pagecache_rwconsist.c
index a1a22b5e18d..ff386c48414 100644
--- a/storage/maria/unittest/ma_pagecache_rwconsist.c
+++ b/storage/maria/unittest/ma_pagecache_rwconsist.c
@@ -341,6 +341,7 @@ int main(int argc __attribute__((unused)),
pthread_mutex_unlock(&LOCK_thread_count);
DBUG_PRINT("info", ("thread ended"));
+ flush_pagecache_blocks(&pagecache, &file1, FLUSH_IGNORE_CHANGED);
end_pagecache(&pagecache, 1);
DBUG_PRINT("info", ("Page cache ended"));
diff --git a/storage/maria/unittest/ma_test_loghandler_multithread-t.c b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
index 354f5d12e08..dbf47ad2ee1 100644
--- a/storage/maria/unittest/ma_test_loghandler_multithread-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
@@ -269,11 +269,6 @@ int main(int argc __attribute__((unused)),
int *param, error;
int rc;
- /* Disabled until Sanja tests */
- plan(1);
- ok(1, "disabled");
- exit(0);
-
plan(WRITERS + FLUSHERS +
ITERATIONS * WRITERS * 3 + FLUSH_ITERATIONS * FLUSHERS );
diff --git a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
index bfbba5407c1..a32cf32c787 100644
--- a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
@@ -168,7 +168,7 @@ int main(int argc __attribute__((unused)), char *argv[])
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY,
0, LSN_IMPOSSIBLE);
- flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE);
+ flush_pagecache_blocks(&pagecache, &file1, FLUSH_RELEASE);
}
my_close(file1.file, MYF(MY_WME));
if ((file1.file= my_open(first_translog_file, O_RDONLY, MYF(MY_WME))) < 0)