summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-01-28 17:58:14 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-01-28 17:58:14 +0200
commit36be0a5aef0376c526d68007da1c11ac440f0d8b (patch)
treeebe5d5f42cea7491fce3946f0f481adc894b9c71
parent3b1b665fcbe1b9ae7ee0d627105cfb69c9886179 (diff)
downloadmariadb-git-36be0a5aef0376c526d68007da1c11ac440f0d8b.tar.gz
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.
-rw-r--r--mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result2
-rw-r--r--mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test2
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result28
-rw-r--r--storage/innobase/handler/ha_innodb.cc25
4 files changed, 55 insertions, 2 deletions
diff --git a/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result
index 7a73dae473e..96e51e506f2 100644
--- a/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result
+++ b/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result
@@ -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))
diff --git a/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test b/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test
index 5a944f0ae8b..bca710386d0 100644
--- a/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test
+++ b/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test
@@ -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) ,
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index a6f626dd0b5..22105923764 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -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
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 0311b0400e6..7ccf296533a 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -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),