MDEV-18399 Recognize the deprecated parameters innodb_file_format, innodb_large_prefix
The parameters innodb_file_format and innodb_large_prefix were overridden in the Debian-distributed configuration files, because the default values of these parameters between MariaDB 5.5 and MariaDB 10.2 did not make any sense. To allow a more seamless upgrade from MariaDB 10.1 to later versions, let InnoDB recognize the parameters innodb_file_format and innodb_large_prefix and issue deprecation warnings for them if they are specified. A deprecation period of only one major release (one year between the MariaDB 10.2 and 10.3 releases) is insufficient for these widely used parameters.
This commit is contained in:
parent
3b1b665fcb
commit
36be0a5aef
@ -1388,7 +1388,7 @@ ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000));
|
||||
ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
|
||||
DROP TABLE worklog5743;
|
||||
set global innodb_large_prefix=0;
|
||||
ERROR HY000: Unknown system variable 'innodb_large_prefix'
|
||||
ERROR HY000: Variable 'innodb_large_prefix' is a read only variable
|
||||
CREATE TABLE worklog5743 (
|
||||
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
|
||||
PRIMARY KEY (col_1_varchar(3072))
|
||||
|
@ -1300,7 +1300,7 @@ ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000));
|
||||
DROP TABLE worklog5743;
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
--error ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global innodb_large_prefix=0;
|
||||
CREATE TABLE worklog5743 (
|
||||
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
|
||||
|
@ -904,6 +904,20 @@ NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_FILE_FORMAT
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE VARCHAR
|
||||
VARIABLE_COMMENT Deprecated parameter with no effect.
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_FILE_PER_TABLE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE ON
|
||||
@ -1296,6 +1310,20 @@ NUMERIC_BLOCK_SIZE 0
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_LARGE_PREFIX
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE VARCHAR
|
||||
VARIABLE_COMMENT Deprecated parameter with no effect.
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
|
@ -206,6 +206,11 @@ static char* innobase_reset_all_monitor_counter;
|
||||
|
||||
static ulong innodb_flush_method;
|
||||
|
||||
/** Deprecated; no effect other than issuing a deprecation warning. */
|
||||
static char* innodb_file_format;
|
||||
/** Deprecated; no effect other than issuing a deprecation warning. */
|
||||
static char* innodb_large_prefix;
|
||||
|
||||
/* This variable can be set in the server configure file, specifying
|
||||
stopword table to be used */
|
||||
static char* innobase_server_stopword_table;
|
||||
@ -3705,6 +3710,17 @@ static int innodb_init_params()
|
||||
char *default_path;
|
||||
ulong num_pll_degree;
|
||||
|
||||
if (innodb_large_prefix || innodb_file_format) {
|
||||
const char* p = innodb_file_format
|
||||
? "file_format"
|
||||
: "large_prefix";
|
||||
sql_print_warning("The parameter innodb_%s is deprecated"
|
||||
" and has no effect."
|
||||
" It may be removed in future releases."
|
||||
" See https://mariadb.com/kb/en/library/"
|
||||
"xtradbinnodb-file-format/", p);
|
||||
}
|
||||
|
||||
/* Check that values don't overflow on 32-bit systems. */
|
||||
if (sizeof(ulint) == 4) {
|
||||
if (innobase_buffer_pool_size > UINT_MAX32) {
|
||||
@ -18989,6 +19005,13 @@ static MYSQL_SYSVAR_ENUM(flush_method, innodb_flush_method,
|
||||
NULL, NULL, IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_FSYNC),
|
||||
&innodb_flush_method_typelib);
|
||||
|
||||
static MYSQL_SYSVAR_STR(file_format, innodb_file_format,
|
||||
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
|
||||
"Deprecated parameter with no effect.", NULL, NULL, NULL);
|
||||
static MYSQL_SYSVAR_STR(large_prefix, innodb_large_prefix,
|
||||
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
|
||||
"Deprecated parameter with no effect.", NULL, NULL, NULL);
|
||||
|
||||
static MYSQL_SYSVAR_BOOL(force_load_corrupted, srv_load_corrupted,
|
||||
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
|
||||
"Force InnoDB to load metadata of corrupted table.",
|
||||
@ -20033,6 +20056,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
|
||||
MYSQL_SYSVAR(read_io_threads),
|
||||
MYSQL_SYSVAR(write_io_threads),
|
||||
MYSQL_SYSVAR(file_per_table),
|
||||
MYSQL_SYSVAR(file_format), /* deprecated in MariaDB 10.2; no effect */
|
||||
MYSQL_SYSVAR(flush_log_at_timeout),
|
||||
MYSQL_SYSVAR(flush_log_at_trx_commit),
|
||||
MYSQL_SYSVAR(flush_method),
|
||||
@ -20046,6 +20070,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
|
||||
MYSQL_SYSVAR(ft_min_token_size),
|
||||
MYSQL_SYSVAR(ft_num_word_optimize),
|
||||
MYSQL_SYSVAR(ft_sort_pll_degree),
|
||||
MYSQL_SYSVAR(large_prefix), /* deprecated in MariaDB 10.2; no effect */
|
||||
MYSQL_SYSVAR(force_load_corrupted),
|
||||
MYSQL_SYSVAR(lock_schedule_algorithm),
|
||||
MYSQL_SYSVAR(locks_unsafe_for_binlog),
|
||||
|
Loading…
x
Reference in New Issue
Block a user