summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-10-05 16:15:30 +0300
committerMichael Widenius <monty@askmonty.org>2011-10-05 16:15:30 +0300
commit5ed31f107353ecd2f6ab0a13aa6f5fa319556eda (patch)
treedf911852d93e162e1d51500fa3aaccb8a687083d /storage
parentf40f0ff679471948a6366ddfad9377b83abdf345 (diff)
parent5c3e18fe0e35fe8dc389238e84e644115e9a8535 (diff)
downloadmariadb-git-5ed31f107353ecd2f6ab0a13aa6f5fa319556eda.tar.gz
Automatic merge
Diffstat (limited to 'storage')
-rw-r--r--storage/maria/ma_checkpoint.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/storage/maria/ma_checkpoint.c b/storage/maria/ma_checkpoint.c
index ae705fc2c0c..602e5da3065 100644
--- a/storage/maria/ma_checkpoint.c
+++ b/storage/maria/ma_checkpoint.c
@@ -603,24 +603,25 @@ pthread_handler_t ma_checkpoint_background(void *arg)
want to checkpoint every minute, hence the positive
maria_checkpoint_min_activity.
*/
- if (horizon != log_horizon_at_last_checkpoint &&
- (ulonglong) (horizon - log_horizon_at_last_checkpoint) <=
+ if ((ulonglong) (horizon - log_horizon_at_last_checkpoint) <=
maria_checkpoint_min_log_activity &&
((ulonglong) (maria_pagecache->global_cache_write -
pagecache_flushes_at_last_checkpoint) *
maria_pagecache->block_size) <=
maria_checkpoint_min_cache_activity)
{
- /* don't take checkpoint, so don't know what to flush */
- pages_to_flush_before_next_checkpoint= 0;
+ /*
+ Not enough has happend since last checkpoint.
+ Sleep for a while and try again later
+ */
sleep_time= interval;
break;
}
sleep_time= 1;
ma_checkpoint_execute(CHECKPOINT_MEDIUM, TRUE);
/*
- Snapshot this kind of "state" of the engine. Note that the value below
- is possibly greater than last_checkpoint_lsn.
+ Snapshot this kind of "state" of the engine. Note that the value
+ below is possibly greater than last_checkpoint_lsn.
*/
log_horizon_at_last_checkpoint= translog_get_horizon();
pagecache_flushes_at_last_checkpoint=