diff options
author | unknown <monty@hundin.mysql.fi> | 2001-11-18 14:33:53 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-11-18 14:33:53 +0200 |
commit | b87029d80cc3476b8c57e1a0770623d4ed3e9c0a (patch) | |
tree | 1187f38a1c1328c1f13ef771f484af421ee2566b /innobase/buf | |
parent | 21259d25f3e76801631dbde560a6da5a65aa00f3 (diff) | |
parent | 421595c12e731bb50e6fe6f9985d950e023e4667 (diff) | |
download | mariadb-git-b87029d80cc3476b8c57e1a0770623d4ed3e9c0a.tar.gz |
Merge
Docs/manual.texi:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/btr/btr0cur.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/mysqld.cc:
Auto merged
mysql-test/t/myisam.test:
Auto merged
Diffstat (limited to 'innobase/buf')
-rw-r--r-- | innobase/buf/buf0flu.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c index 4217a3ba99b..8184f10d6e9 100644 --- a/innobase/buf/buf0flu.c +++ b/innobase/buf/buf0flu.c @@ -138,15 +138,11 @@ buf_flush_ready_for_flush( return(TRUE); - } else if ((block->old || (UT_LIST_GET_LEN(buf_pool->LRU) - < BUF_LRU_OLD_MIN_LEN)) - && (block->buf_fix_count == 0)) { + } else if (block->buf_fix_count == 0) { /* If we are flushing the LRU list, to avoid deadlocks we require the block not to be bufferfixed, and hence - not latched. Since LRU flushed blocks are soon moved - to the free list, it is good to flush only old blocks - from the end of the LRU list. */ + not latched. */ return(TRUE); } @@ -560,6 +556,15 @@ buf_flush_try_neighbors( block = buf_page_hash_get(space, i); + if (block && flush_type == BUF_FLUSH_LRU && i != offset + && !block->old) { + + /* We avoid flushing 'non-old' blocks in an LRU flush, + because the flushed blocks are soon freed */ + + continue; + } + if (block && buf_flush_ready_for_flush(block, flush_type)) { mutex_exit(&(buf_pool->mutex)); |