diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-15 17:00:37 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-04-15 17:00:37 +0200 |
commit | 084675d4b43571d2df8f41bf79342f008a02f883 (patch) | |
tree | 84778d975834bb86b3bb4347e9a79bbdee984b12 | |
parent | c01897786f923c13b0f9df0d3547fa5310ef83b1 (diff) | |
download | mariadb-git-bb-10.4-aria3.tar.gz |
untouch read patchbb-10.4-aria3
-rw-r--r-- | storage/maria/ma_pagecache.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c index 73f205602d5..041bbd81735 100644 --- a/storage/maria/ma_pagecache.c +++ b/storage/maria/ma_pagecache.c @@ -2277,16 +2277,6 @@ restart: else { /* - The block was found in the cache. It's either a already read - block or a block waiting to be read by another thread. - */ - if (reg_req) - reg_requests(pagecache, block, 1); - KEYCACHE_DBUG_PRINT("find_block", - ("block->hash_link: %p hash_link: %p " - "block->status: %u", block->hash_link, - hash_link, block->status )); - /* block->hash_link != hash_link can only happen when the block is in PCBLOCK_IN_SWITCH above (is flushed out to be replaced by another block). The SWITCH code will change @@ -2297,6 +2287,16 @@ restart: page_status= (((block->hash_link == hash_link) && (block->status & PCBLOCK_READ)) ? PAGE_READ : PAGE_WAIT_TO_BE_READ); + /* + The block was found in the cache. It's either a already read + block or a block waiting to be read by another thread. + */ + if (reg_req && !(fast && page_status== PAGE_READ)) + reg_requests(pagecache, block, 1); + KEYCACHE_DBUG_PRINT("find_block", + ("block->hash_link: %p hash_link: %p " + "block->status: %u", block->hash_link, + hash_link, block->status )); } } @@ -2877,7 +2877,8 @@ static my_bool read_big_block(PAGECACHE *pagecache, bl->status|= PCBLOCK_READ; } remove_reader(bl); - unreg_request(pagecache, bl, 1); + if (page_st != PAGE_READ) + unreg_request(pagecache, bl, 1); } } if (page < our_page) |