1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Use a session variable, columnstore_cache_flush_threshold,

to allow the user to set the threshold, instead of using a
hard coded value.
This commit is contained in:
Gagan Goel
2020-08-18 16:39:07 -04:00
parent 47f2291f9f
commit b3ae9cf04e
3 changed files with 27 additions and 2 deletions

View File

@ -32,7 +32,6 @@
#endif
#define CACHE_PREFIX "#cache#"
#define CACHE_FLUSH_THRESHOLD 1000000
handlerton* mcs_hton = NULL;
// This is the maria handlerton that we need for the cache
@ -1205,7 +1204,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 >= get_cache_flush_threshold(current_thd))
{
if ((error= cache->flush_insert_cache()))
{