diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-06-12 12:49:42 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-06-12 12:49:42 +0300 |
commit | b52bb6eb82db8f3bff88efbf0876d364a3826cc1 (patch) | |
tree | af990fccfc13aff2de659ccda8a76472fcc74bd7 | |
parent | 4461b0f9b301233b245853b9b71b3770c24c5aac (diff) | |
download | mariadb-git-b52bb6eb82db8f3bff88efbf0876d364a3826cc1.tar.gz |
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.
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 2 | ||||
-rw-r--r-- | storage/innobase/ibuf/ibuf0ibuf.cc | 6 | ||||
-rw-r--r-- | storage/innobase/include/ibuf0ibuf.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/ibuf0ibuf.ic | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 5c6b992bf9b..66a28ea56b7 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -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) { diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index 04cee74e6ea..7b2bbdcd7c7 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -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, diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h index b5e3d1eddf7..8233a536abc 100644 --- a/storage/innobase/include/ibuf0ibuf.h +++ b/storage/innobase/include/ibuf0ibuf.h @@ -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; diff --git a/storage/innobase/include/ibuf0ibuf.ic b/storage/innobase/include/ibuf0ibuf.ic index f91ae5aee4a..355fad62f24 100644 --- a/storage/innobase/include/ibuf0ibuf.ic +++ b/storage/innobase/include/ibuf0ibuf.ic @@ -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) |