From 47f2291f9f51b6dc6e687c8c631f26a2de4d5475 Mon Sep 17 00:00:00 2001 From: Gagan Goel Date: Mon, 17 Aug 2020 16:44:08 -0400 Subject: [PATCH] Number of cached rows can be > CACHE_FLUSH_THRESHOLD (in case of batch inserts). --- dbcon/mysql/ha_mcs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbcon/mysql/ha_mcs.cpp b/dbcon/mysql/ha_mcs.cpp index 6879f4995..598eb51af 100644 --- a/dbcon/mysql/ha_mcs.cpp +++ b/dbcon/mysql/ha_mcs.cpp @@ -1205,7 +1205,7 @@ my_bool get_status_and_flush_cache(void *param, { ha_rows num_rows = cache->num_rows_cached(); if ((!cache->insert_command && num_rows != 0) || - num_rows == CACHE_FLUSH_THRESHOLD) + num_rows >= CACHE_FLUSH_THRESHOLD) { if ((error= cache->flush_insert_cache())) {