Commit b52bb6eb authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-16469 SET GLOBAL innodb_change_buffering has no effect

When type of the settable global variable innodb_change_buffering was
changed from string to ENUM in MDEV-12218, the "shadow" variable ibuf_use
stopped being updated as a result of SET GLOBAL innodb_change_buffering.
Only on InnoDB startup, the parameter innodb_change_buffering would
take effect.

ibuf_use: Remove, and use the global variable innodb_change_buffering.
parent 4461b0f9
......@@ -209,7 +209,6 @@ static char* innobase_disable_monitor_counter;
static char* innobase_reset_monitor_counter;
static char* innobase_reset_all_monitor_counter;
static ulong innodb_change_buffering;
static ulong innodb_flush_method;
/* This variable can be set in the server configure file, specifying
......@@ -3859,7 +3858,6 @@ static int innodb_init_params()
}
DBUG_ASSERT(innodb_change_buffering <= IBUF_USE_ALL);
ibuf_use = ibuf_use_t(innodb_change_buffering);
/* Check that interdependent parameters have sane values. */
if (srv_max_buf_pool_modified_pct < srv_max_dirty_pages_pct_lwm) {
......
......@@ -185,7 +185,7 @@ it uses synchronous aio, it can access any pages, as long as it obeys the
access order rules. */
/** Operations that can currently be buffered. */
ibuf_use_t ibuf_use = IBUF_USE_ALL;
ulong innodb_change_buffering;
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
/** Flag to control insert buffer debugging. */
......@@ -3695,9 +3695,9 @@ ibuf_insert(
dberr_t err;
ulint entry_size;
ibool no_counter;
/* Read the settable global variable ibuf_use only once in
/* Read the settable global variable only once in
this function, so that we will have a consistent view of it. */
ibuf_use_t use = ibuf_use;
ibuf_use_t use = ibuf_use_t(innodb_change_buffering);
DBUG_ENTER("ibuf_insert");
DBUG_PRINT("ibuf", ("op: %d, space: " UINT32PF ", page_no: " UINT32PF,
......
......@@ -61,7 +61,7 @@ enum ibuf_use_t {
};
/** Operations that can currently be buffered. */
extern ibuf_use_t ibuf_use;
extern ulong innodb_change_buffering;
/** The insert buffer control structure */
extern ibuf_t* ibuf;
......
......@@ -124,7 +124,7 @@ ibuf_should_try(
a secondary index when we
decide */
{
return(ibuf_use != IBUF_USE_NONE
return(innodb_change_buffering
&& ibuf->max_size != 0
&& !dict_index_is_clust(index)
&& !dict_index_is_spatial(index)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment