Commit e9de6386 authored by Eugene Kosov's avatar Eugene Kosov

MDEV-18115 remove now unneeded constraint

log_group_max_size: is not needed because redo log do not use fil_io() now
parent 744d545f
...@@ -1296,7 +1296,8 @@ struct my_option xb_server_options[] = ...@@ -1296,7 +1296,8 @@ struct my_option xb_server_options[] =
{"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE, {"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE,
"Ignored for mysqld option compatibility", "Ignored for mysqld option compatibility",
(G_PTR*) &srv_log_file_size, (G_PTR*) &srv_log_file_size, 0, (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<ulonglong>::max(), 0,
UNIV_PAGE_SIZE_MAX, 0}, UNIV_PAGE_SIZE_MAX, 0},
{"innodb_log_files_in_group", OPT_INNODB_LOG_FILES_IN_GROUP, {"innodb_log_files_in_group", OPT_INNODB_LOG_FILES_IN_GROUP,
"Ignored for mysqld option compatibility", "Ignored for mysqld option compatibility",
......
...@@ -314,6 +314,15 @@ ...@@ -314,6 +314,15 @@
VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion. VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
NUMERIC_MIN_VALUE 1 NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100 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 @@ @@ -1273,7 +1273,7 @@
SESSION_VALUE NULL SESSION_VALUE NULL
DEFAULT_VALUE 8192 DEFAULT_VALUE 8192
......
...@@ -116,6 +116,8 @@ this program; if not, write to the Free Software Foundation, Inc., ...@@ -116,6 +116,8 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include "ut0mutex.h" #include "ut0mutex.h"
#include "row0ext.h" #include "row0ext.h"
#include <limits>
#define thd_get_trx_isolation(X) ((enum_tx_isolation)thd_tx_isolation(X)) #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); extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all);
...@@ -3709,15 +3711,6 @@ static int innodb_init_params() ...@@ -3709,15 +3711,6 @@ static int innodb_init_params()
DBUG_RETURN(HA_ERR_INITIALIZATION); 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); DBUG_ASSERT(innodb_change_buffering <= IBUF_USE_ALL);
/* Check that interdependent parameters have sane values. */ /* Check that interdependent parameters have sane values. */
...@@ -19725,7 +19718,8 @@ static MYSQL_SYSVAR_ULONG(log_buffer_size, srv_log_buffer_size, ...@@ -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, static MYSQL_SYSVAR_ULONGLONG(log_file_size, srv_log_file_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Size of each log file in a log group.", "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<ulonglong>::max(),
UNIV_PAGE_SIZE_MAX);
/* OS_FILE_LOG_BLOCK_SIZE would be more appropriate than 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. */ but fil_space_t is being used for the redo log, and it uses data pages. */
......
...@@ -43,10 +43,6 @@ Created 12/9/1995 Heikki Tuuri ...@@ -43,10 +43,6 @@ Created 12/9/1995 Heikki Tuuri
using st_::span; using st_::span;
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
/** Maximum number of srv_n_log_files, or innodb_log_files_in_group */ /** Maximum number of srv_n_log_files, or innodb_log_files_in_group */
#define SRV_N_LOG_FILES_MAX 100 #define SRV_N_LOG_FILES_MAX 100
...@@ -449,12 +445,6 @@ or the MySQL version that created the redo log file. */ ...@@ -449,12 +445,6 @@ or the MySQL version that created the redo log file. */
header */ header */
#define LOG_FILE_HDR_SIZE (4 * OS_FILE_LOG_BLOCK_SIZE) #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 LogSysMutex;
typedef ib_mutex_t FlushOrderMutex; typedef ib_mutex_t FlushOrderMutex;
......
...@@ -1597,8 +1597,6 @@ dberr_t srv_start(bool create_new_db) ...@@ -1597,8 +1597,6 @@ dberr_t srv_start(bool create_new_db)
srv_n_log_files_found = i; srv_n_log_files_found = i;
ut_a(srv_log_file_size <= log_group_max_size);
std::vector<std::string> file_names; std::vector<std::string> file_names;
for (unsigned j = 0; j < srv_n_log_files_found; j++) { for (unsigned j = 0; j < srv_n_log_files_found; j++) {
......
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