summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/maria/ma_loghandler.c1
-rw-r--r--storage/maria/ma_pagecache.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index 7c6521e167a..a29c42cae68 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -7579,6 +7579,7 @@ my_bool translog_flush(TRANSLOG_ADDRESS lsn)
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
LINT_INIT(sent_to_disk);
+ LINT_INIT(last_buffer_no);
pthread_mutex_lock(&log_descriptor.log_flush_lock);
DBUG_PRINT("info", ("Everything is flushed up to (%lu,0x%lx)",
diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c
index 8b731f40cd0..83785e6a1af 100644
--- a/storage/maria/ma_pagecache.c
+++ b/storage/maria/ma_pagecache.c
@@ -1046,6 +1046,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
("thread %ld", last_thread->next->id));
pagecache_pthread_cond_signal(&last_thread->next->suspend);
}
+ DBUG_ASSERT((longlong) pagecache->cnt_for_resize_op >= 0);
#else
pagecache->cnt_for_resize_op--;
#endif
@@ -3626,6 +3627,8 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
*/
DBUG_ASSERT((block->status &
(PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0);
+
+ inc_counter_for_resize_op(pagecache);
/*
make_lock_and_pin() can't fail here, because we are keeping pin on the
block and it can't be evicted (which is cause of lock fail and retry)