From b15615631f6ac5c6ce9faeed775ef4922c6ccc48 Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 26 Apr 2020 15:30:29 +0300 Subject: [PATCH] MDEV-18286 Assertion `pagecache->cnt_for_resize_op ... This patch is also pushed in 10.4. It's pushed separately in 10.5 as there are some additional cases in 10.5 to take care of. When merging if there is conflicts, use this code, not the 10.4 code. --- storage/maria/ma_pagecache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c index efad5ec75f3..119b5310f49 100644 --- a/storage/maria/ma_pagecache.c +++ b/storage/maria/ma_pagecache.c @@ -3710,6 +3710,7 @@ restart: { /* block is unregistered in read_big_block */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); + dec_counter_for_resize_op(pagecache); DBUG_PRINT("restart", ("big block fail, restarting...")); goto restart; } @@ -3754,6 +3755,7 @@ restart: unreg_request(pagecache, block, 1); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); + dec_counter_for_resize_op(pagecache); DBUG_PRINT("info", ("restarting...")); goto restart; } @@ -4176,6 +4178,7 @@ restart: unreg_request(pagecache, block, 1); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); + dec_counter_for_resize_op(pagecache); DBUG_PRINT("info", ("restarting...")); goto restart; }