From e9de6386ad9d53a3e6280722427b26123acc805a Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Fri, 10 Jan 2020 21:46:34 +0700 Subject: [PATCH] MDEV-18115 remove now unneeded constraint log_group_max_size: is not needed because redo log do not use fil_io() now --- extra/mariabackup/xtrabackup.cc | 3 ++- .../suite/sys_vars/r/sysvars_innodb,32bit.rdiff | 9 +++++++++ storage/innobase/handler/ha_innodb.cc | 14 ++++---------- storage/innobase/include/log0log.h | 10 ---------- storage/innobase/srv/srv0start.cc | 2 -- 5 files changed, 15 insertions(+), 23 deletions(-) diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 41476805956..6ac13752be2 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -1296,7 +1296,8 @@ struct my_option xb_server_options[] = {"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE, "Ignored for mysqld option compatibility", (G_PTR*) &srv_log_file_size, (G_PTR*) &srv_log_file_size, 0, - GET_ULL, REQUIRED_ARG, 48 << 20, 1 << 20, log_group_max_size, 0, + GET_ULL, REQUIRED_ARG, 48 << 20, 1 << 20, + std::numeric_limits::max(), 0, UNIV_PAGE_SIZE_MAX, 0}, {"innodb_log_files_in_group", OPT_INNODB_LOG_FILES_IN_GROUP, "Ignored for mysqld option compatibility", diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff index 60be1dc78a0..6745af1a36b 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff @@ -314,6 +314,15 @@ VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 100 +@@ -1240,7 +1240,7 @@ + VARIABLE_TYPE BIGINT UNSIGNED + VARIABLE_COMMENT Size of each log file in a log group. + NUMERIC_MIN_VALUE 1048576 +-NUMERIC_MAX_VALUE 17592186044415 ++NUMERIC_MAX_VALUE 18446744073709551615 + NUMERIC_BLOCK_SIZE 65536 + ENUM_VALUE_LIST NULL + READ_ONLY YES @@ -1273,7 +1273,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 8192 diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 17e3d1fa968..73aba96f741 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -116,6 +116,8 @@ this program; if not, write to the Free Software Foundation, Inc., #include "ut0mutex.h" #include "row0ext.h" +#include + #define thd_get_trx_isolation(X) ((enum_tx_isolation)thd_tx_isolation(X)) extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all); @@ -3709,15 +3711,6 @@ static int innodb_init_params() DBUG_RETURN(HA_ERR_INITIALIZATION); } - if (srv_n_log_files * srv_log_file_size >= log_group_max_size) { - /* Log group size is limited by the size of page number. - Remove this limitation when fil_io() is not used for - recovery log io. */ - ib::error() << "Combined size of log files must be < " - << log_group_max_size; - DBUG_RETURN(HA_ERR_INITIALIZATION); - } - DBUG_ASSERT(innodb_change_buffering <= IBUF_USE_ALL); /* Check that interdependent parameters have sane values. */ @@ -19725,7 +19718,8 @@ static MYSQL_SYSVAR_ULONG(log_buffer_size, srv_log_buffer_size, static MYSQL_SYSVAR_ULONGLONG(log_file_size, srv_log_file_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "Size of each log file in a log group.", - NULL, NULL, 96 << 20, 1 << 20, log_group_max_size, UNIV_PAGE_SIZE_MAX); + NULL, NULL, 96 << 20, 1 << 20, std::numeric_limits::max(), + UNIV_PAGE_SIZE_MAX); /* OS_FILE_LOG_BLOCK_SIZE would be more appropriate than UNIV_PAGE_SIZE_MAX, but fil_space_t is being used for the redo log, and it uses data pages. */ diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index 6ec5554f1d6..71602056e16 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -43,10 +43,6 @@ Created 12/9/1995 Heikki Tuuri using st_::span; -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - /** Maximum number of srv_n_log_files, or innodb_log_files_in_group */ #define SRV_N_LOG_FILES_MAX 100 @@ -449,12 +445,6 @@ or the MySQL version that created the redo log file. */ header */ #define LOG_FILE_HDR_SIZE (4 * OS_FILE_LOG_BLOCK_SIZE) -/* As long as fil_io() is used to handle log io, log group max size is limited -by (maximum page number) * (minimum page size). Page number type is uint32_t. -Remove this limitation if page number is no longer used for log file io. */ -static const ulonglong log_group_max_size = - ((ulonglong(UINT32_MAX) + 1) * UNIV_PAGE_SIZE_MIN - 1); - typedef ib_mutex_t LogSysMutex; typedef ib_mutex_t FlushOrderMutex; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index c659e2c2ced..bdf62df04ff 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -1597,8 +1597,6 @@ dberr_t srv_start(bool create_new_db) srv_n_log_files_found = i; - ut_a(srv_log_file_size <= log_group_max_size); - std::vector file_names; for (unsigned j = 0; j < srv_n_log_files_found; j++) {