From d5d7c8ba96fbf8800d7273034f56cbb39f379982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 2 Feb 2023 07:46:08 +0200 Subject: [PATCH] MDEV-30544 Deprecate innodb_defragment and related parameters There is a little used option innodb_defragment that would make OPTIMIZE TABLE not rebuild the table as usual for InnoDB, but instead cause the index B-trees to be optimized in place. This option uses excessive locking (exclusively locking index trees). It never covered SPATIAL INDEX or FULLTEXT INDEX. Storage space was never reclaimed. Because this option is not particularly useful and causes a maintenance burden (most recently in commit de4030e4d49805a7ded5c0bfee01cc3fd7623522), it is best to deprecate it, to prepare for its removal. --- mysql-test/main/lock_sync-master.opt | 1 - mysql-test/suite/innodb/r/defrag_mdl-9155.result | 4 ++++ .../suite/innodb/r/innodb_defrag_concurrent.result | 8 ++++++++ mysql-test/suite/innodb/r/innodb_defrag_stats.result | 6 ++++++ .../innodb/r/innodb_defrag_stats_many_tables.result | 4 ++++ mysql-test/suite/innodb/r/innodb_defragment.result | 6 ++++++ .../suite/innodb/r/innodb_defragment_small.result | 6 ++++++ mysql-test/suite/innodb/r/instant_alter_debug.result | 4 ++++ mysql-test/suite/innodb/t/innodb.opt | 1 - .../suite/sys_vars/r/innodb_defragment_basic.result | 6 ++++++ .../r/innodb_defragment_fill_factor_basic.result | 10 ++++++++++ ...innodb_defragment_fill_factor_n_recs_basic.result | 10 ++++++++++ .../r/innodb_defragment_frequency_basic.result | 10 ++++++++++ .../r/innodb_defragment_n_pages_basic.result | 8 ++++++++ .../r/innodb_defragment_stats_accuracy_basic.result | 8 ++++++++ storage/innobase/handler/ha_innodb.cc | 12 ++++++------ 16 files changed, 96 insertions(+), 8 deletions(-) delete mode 100644 mysql-test/suite/innodb/t/innodb.opt diff --git a/mysql-test/main/lock_sync-master.opt b/mysql-test/main/lock_sync-master.opt index a6700b8d18e..96f0ce3f36c 100644 --- a/mysql-test/main/lock_sync-master.opt +++ b/mysql-test/main/lock_sync-master.opt @@ -1,2 +1 @@ --default-storage-engine=MyISAM ---innodb-defragment=0 diff --git a/mysql-test/suite/innodb/r/defrag_mdl-9155.result b/mysql-test/suite/innodb/r/defrag_mdl-9155.result index 18b71f42381..b1b70de3373 100644 --- a/mysql-test/suite/innodb/r/defrag_mdl-9155.result +++ b/mysql-test/suite/innodb/r/defrag_mdl-9155.result @@ -1,4 +1,6 @@ set global innodb_defragment=1; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release create table t1 (a int not null primary key auto_increment, b varchar(256), key second(a, b)) engine=innodb; insert t1 select null, repeat('a', 256) from seq_1_to_100; select count(*) from t1; @@ -16,3 +18,5 @@ test.t1 optimize status OK connection con1; drop table t1; set global innodb_defragment=default; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release diff --git a/mysql-test/suite/innodb/r/innodb_defrag_concurrent.result b/mysql-test/suite/innodb/r/innodb_defrag_concurrent.result index 07c96e76213..72d520a61b4 100644 --- a/mysql-test/suite/innodb/r/innodb_defrag_concurrent.result +++ b/mysql-test/suite/innodb/r/innodb_defrag_concurrent.result @@ -3,6 +3,8 @@ SET @accuracy= @@GLOBAL.innodb_defragment_stats_accuracy; SET @sp= @@GLOBAL.innodb_stats_persistent; SET GLOBAL innodb_stats_persistent = 0; set global innodb_defragment_stats_accuracy = 80; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), c INT, @@ -18,6 +20,8 @@ connect con3,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect con4,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; SET @@global.innodb_defragment_n_pages = 20; +Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release CREATE TEMPORARY TABLE tt (a INT, KEY(a)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; INSERT INTO tt SELECT 0 FROM seq_1_to_180; INSERT INTO tt SELECT 5 FROM seq_1_to_160; @@ -98,5 +102,9 @@ count(stat_value) > 0 1 drop table t1; SET GLOBAL innodb_defragment_n_pages = @n_pages; +Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release SET GLOBAL innodb_defragment_stats_accuracy = @accuracy; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release SET GLOBAL innodb_stats_persistent = @sp; diff --git a/mysql-test/suite/innodb/r/innodb_defrag_stats.result b/mysql-test/suite/innodb/r/innodb_defrag_stats.result index c6fd7006f9e..1753ce36bed 100644 --- a/mysql-test/suite/innodb/r/innodb_defrag_stats.result +++ b/mysql-test/suite/innodb/r/innodb_defrag_stats.result @@ -1,4 +1,6 @@ SET GLOBAL innodb_defragment_stats_accuracy = 20; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release DELETE FROM mysql.innodb_index_stats; # Create table. CREATE TABLE t1 (a INT PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), @@ -77,6 +79,8 @@ t1 SECOND n_leaf_pages_reserved t1 SECOND n_page_split t1 SECOND n_pages_freed set global innodb_defragment_stats_accuracy = 40; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release INSERT INTO t1 (b) SELECT b from t1; SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats; table_name index_name stat_name @@ -116,6 +120,8 @@ drop index SECOND on t2; # MDEV-26636: Statistics must not be written for temporary tables # SET GLOBAL innodb_defragment_stats_accuracy = 1; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release CREATE TEMPORARY TABLE t (a INT PRIMARY KEY, c CHAR(255) NOT NULL) ENGINE=InnoDB; INSERT INTO t SELECT seq, '' FROM seq_1_to_100; diff --git a/mysql-test/suite/innodb/r/innodb_defrag_stats_many_tables.result b/mysql-test/suite/innodb/r/innodb_defrag_stats_many_tables.result index e668c38e059..37049b6386e 100644 --- a/mysql-test/suite/innodb/r/innodb_defrag_stats_many_tables.result +++ b/mysql-test/suite/innodb/r/innodb_defrag_stats_many_tables.result @@ -5,6 +5,8 @@ SET @start_flush_log_at_trx_commit = @@global.innodb_flush_log_at_trx_commit; SET @@global.innodb_flush_log_at_trx_commit=2; SET @start_innodb_defragment_stats_accuracy = @@global.innodb_defragment_stats_accuracy; SET @@global.innodb_defragment_stats_accuracy = 80; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), KEY SECOND(a, b)) ENGINE=INNODB; INSERT INTO t1 VALUES(1, REPEAT('A', 256)); INSERT INTO t1 (b) SELECT b from t1; @@ -34,5 +36,7 @@ sleep(15) select stat_value > 0 from mysql.innodb_index_stats where table_name like '%t1%' and stat_name = 'n_page_split'; stat_value > 0 SET @@global.innodb_defragment_stats_accuracy = @start_innodb_defragment_stats_accuracy; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release SET @@global.table_definition_cache = @start_table_definition_cache; DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/innodb_defragment.result b/mysql-test/suite/innodb/r/innodb_defragment.result index 533a39eec9d..72471060668 100644 --- a/mysql-test/suite/innodb/r/innodb_defragment.result +++ b/mysql-test/suite/innodb/r/innodb_defragment.result @@ -1,4 +1,6 @@ set global innodb_defragment_stats_accuracy = 80; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), KEY SECOND(a, b)) ENGINE=INNODB; optimize table t1; Table Op Msg_type Msg_text @@ -66,6 +68,8 @@ select count(stat_value) = 0 from mysql.innodb_index_stats where table_name like count(stat_value) = 0 1 SET @@global.innodb_defragment_n_pages = 3; +Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK @@ -104,6 +108,8 @@ select count(stat_value) = 0 from mysql.innodb_index_stats where table_name like count(stat_value) = 0 1 SET @@global.innodb_defragment_n_pages = 10; +Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release optimize table t1; Table Op Msg_type Msg_text test.t1 optimize status OK diff --git a/mysql-test/suite/innodb/r/innodb_defragment_small.result b/mysql-test/suite/innodb/r/innodb_defragment_small.result index fcb3bf2e07f..6b80637f3f8 100644 --- a/mysql-test/suite/innodb/r/innodb_defragment_small.result +++ b/mysql-test/suite/innodb/r/innodb_defragment_small.result @@ -1,6 +1,8 @@ SET @innodb_defragment_orig=@@GLOBAL.innodb_defragment; SET @innodb_optimize_fulltext_orig=@@GLOBAL.innodb_optimize_fulltext_only; SET GLOBAL innodb_defragment = 1; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release SET GLOBAL innodb_optimize_fulltext_only = 0; # # MDEV-12198 innodb_defragment=1 crashes server on @@ -27,6 +29,8 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK SET GLOBAL innodb_defragment = 0; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK @@ -37,4 +41,6 @@ Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; SET GLOBAL innodb_defragment = @innodb_defragment_orig; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release SET GLOBAL innodb_optimize_fulltext_only = @innodb_optimize_fulltext_orig; diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result index 7205fc48b50..6efe5d7c734 100644 --- a/mysql-test/suite/innodb/r/instant_alter_debug.result +++ b/mysql-test/suite/innodb/r/instant_alter_debug.result @@ -279,10 +279,14 @@ SET GLOBAL innodb_limit_optimistic_insert_debug = @old_limit; ALTER TABLE t1 ADD COLUMN b INT, ALGORITHM=INSTANT; SET @old_defragment = @@innodb_defragment; SET GLOBAL innodb_defragment = 1; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK SET GLOBAL innodb_defragment = @old_defragment; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL; CHECK TABLE t1; Table Op Msg_type Msg_text diff --git a/mysql-test/suite/innodb/t/innodb.opt b/mysql-test/suite/innodb/t/innodb.opt deleted file mode 100644 index 59e43fea231..00000000000 --- a/mysql-test/suite/innodb/t/innodb.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-defragment=0 \ No newline at end of file diff --git a/mysql-test/suite/sys_vars/r/innodb_defragment_basic.result b/mysql-test/suite/sys_vars/r/innodb_defragment_basic.result index 916bb5ca1a9..d9226fee99f 100644 --- a/mysql-test/suite/sys_vars/r/innodb_defragment_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_defragment_basic.result @@ -3,10 +3,14 @@ SELECT @orig; @orig 0 SET GLOBAL innodb_defragment = OFF; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment; @@global.innodb_defragment 0 SET GLOBAL innodb_defragment = ON; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment; @@global.innodb_defragment 1 @@ -16,3 +20,5 @@ SELECT @@global.innodb_defragment; @@global.innodb_defragment 1 SET GLOBAL innodb_defragment = @orig; +Warnings: +Warning 1287 '@@innodb_defragment' is deprecated and will be removed in a future release diff --git a/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_basic.result b/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_basic.result index 93a5af727c3..04db2580f15 100644 --- a/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_basic.result @@ -6,25 +6,33 @@ SELECT COUNT(@@global.innodb_defragment_fill_factor); COUNT(@@global.innodb_defragment_fill_factor) 1 SET @@global.innodb_defragment_fill_factor = 0.77777777777777; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_fill_factor; @@global.innodb_defragment_fill_factor 0.777778 SET @@global.innodb_defragment_fill_factor = 1; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_fill_factor; @@global.innodb_defragment_fill_factor 1.000000 SET @@global.innodb_defragment_fill_factor = 0.7; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_fill_factor; @@global.innodb_defragment_fill_factor 0.700000 SET @@global.innodb_defragment_fill_factor = -1; Warnings: +Warning 1287 '@@innodb_defragment_fill_factor' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_fill_factor value: '-1' SELECT @@global.innodb_defragment_fill_factor; @@global.innodb_defragment_fill_factor 0.700000 SET @@global.innodb_defragment_fill_factor = 2; Warnings: +Warning 1287 '@@innodb_defragment_fill_factor' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_fill_factor value: '2' SELECT @@global.innodb_defragment_fill_factor; @@global.innodb_defragment_fill_factor @@ -35,3 +43,5 @@ SELECT @@global.innodb_defragment_fill_factor; @@global.innodb_defragment_fill_factor 1.000000 SET @@global.innodb_defragment_fill_factor = @start_innodb_defragment_fill_factor; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor' is deprecated and will be removed in a future release diff --git a/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result b/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result index a8ca081d0f0..12bec5204f6 100644 --- a/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result @@ -6,25 +6,33 @@ SELECT COUNT(@@global.innodb_defragment_fill_factor_n_recs); COUNT(@@global.innodb_defragment_fill_factor_n_recs) 1 SET @@global.innodb_defragment_fill_factor_n_recs = 50; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor_n_recs' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs 50 SET @@global.innodb_defragment_fill_factor_n_recs = 100; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor_n_recs' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs 100 SET @@global.innodb_defragment_fill_factor_n_recs = 1; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor_n_recs' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs 1 SET @@global.innodb_defragment_fill_factor_n_recs = -1; Warnings: +Warning 1287 '@@innodb_defragment_fill_factor_n_recs' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_fill_factor... value: '-1' SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs 1 SET @@global.innodb_defragment_fill_factor_n_recs = 10000; Warnings: +Warning 1287 '@@innodb_defragment_fill_factor_n_recs' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_fill_factor... value: '10000' SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs @@ -40,3 +48,5 @@ SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs 100 SET @@global.innodb_defragment_fill_factor_n_recs = @start_innodb_defragment_fill_factor_n_recs; +Warnings: +Warning 1287 '@@innodb_defragment_fill_factor_n_recs' is deprecated and will be removed in a future release diff --git a/mysql-test/suite/sys_vars/r/innodb_defragment_frequency_basic.result b/mysql-test/suite/sys_vars/r/innodb_defragment_frequency_basic.result index d4314d6506e..b9f76d60dac 100644 --- a/mysql-test/suite/sys_vars/r/innodb_defragment_frequency_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_defragment_frequency_basic.result @@ -6,25 +6,33 @@ SELECT COUNT(@@global.innodb_defragment_frequency); COUNT(@@global.innodb_defragment_frequency) 1 SET @@global.innodb_defragment_frequency = 200; +Warnings: +Warning 1287 '@@innodb_defragment_frequency' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_frequency; @@global.innodb_defragment_frequency 200 SET @@global.innodb_defragment_frequency = 1; +Warnings: +Warning 1287 '@@innodb_defragment_frequency' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_frequency; @@global.innodb_defragment_frequency 1 SET @@global.innodb_defragment_frequency = 1000; +Warnings: +Warning 1287 '@@innodb_defragment_frequency' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_frequency; @@global.innodb_defragment_frequency 1000 SET @@global.innodb_defragment_frequency = -1; Warnings: +Warning 1287 '@@innodb_defragment_frequency' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_frequency value: '-1' SELECT @@global.innodb_defragment_frequency; @@global.innodb_defragment_frequency 1 SET @@global.innodb_defragment_frequency = 10000; Warnings: +Warning 1287 '@@innodb_defragment_frequency' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_frequency value: '10000' SELECT @@global.innodb_defragment_frequency; @@global.innodb_defragment_frequency @@ -40,3 +48,5 @@ SELECT @@global.innodb_defragment_frequency; @@global.innodb_defragment_frequency 1000 SET @@global.innodb_defragment_frequency = @start_innodb_defragment_frequency; +Warnings: +Warning 1287 '@@innodb_defragment_frequency' is deprecated and will be removed in a future release diff --git a/mysql-test/suite/sys_vars/r/innodb_defragment_n_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_defragment_n_pages_basic.result index 99b68b39ec4..823ddad7d59 100644 --- a/mysql-test/suite/sys_vars/r/innodb_defragment_n_pages_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_defragment_n_pages_basic.result @@ -7,22 +7,30 @@ COUNT(@@global.innodb_defragment_n_pages) 1 SET @@global.innodb_defragment_n_pages = 1; Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_n_pages value: '1' SELECT @@global.innodb_defragment_n_pages; @@global.innodb_defragment_n_pages 2 SET @@global.innodb_defragment_n_pages = 2; +Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_n_pages; @@global.innodb_defragment_n_pages 2 SET @@global.innodb_defragment_n_pages = 32; +Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_n_pages; @@global.innodb_defragment_n_pages 32 SET @@global.innodb_defragment_n_pages = 64; Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_n_pages value: '64' SELECT @@global.innodb_defragment_n_pages; @@global.innodb_defragment_n_pages 32 SET @@global.innodb_defragment_n_pages = @start_innodb_defragment_n_pages; +Warnings: +Warning 1287 '@@innodb_defragment_n_pages' is deprecated and will be removed in a future release diff --git a/mysql-test/suite/sys_vars/r/innodb_defragment_stats_accuracy_basic.result b/mysql-test/suite/sys_vars/r/innodb_defragment_stats_accuracy_basic.result index 025dacdb1ec..7a2abfa1350 100644 --- a/mysql-test/suite/sys_vars/r/innodb_defragment_stats_accuracy_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_defragment_stats_accuracy_basic.result @@ -6,21 +6,27 @@ SELECT COUNT(@@global.innodb_defragment_stats_accuracy); COUNT(@@global.innodb_defragment_stats_accuracy) 1 SET @@global.innodb_defragment_stats_accuracy = 1; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_stats_accuracy; @@global.innodb_defragment_stats_accuracy 1 SET @@global.innodb_defragment_stats_accuracy = 1000; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release SELECT @@global.innodb_defragment_stats_accuracy; @@global.innodb_defragment_stats_accuracy 1000 SET @@global.innodb_defragment_stats_accuracy = -1; Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_stats_accuracy value: '-1' SELECT @@global.innodb_defragment_stats_accuracy; @@global.innodb_defragment_stats_accuracy 0 SET @@global.innodb_defragment_stats_accuracy = 1000000000000; Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release Warning 1292 Truncated incorrect innodb_defragment_stats_accuracy value: '1000000000000' SELECT @@global.innodb_defragment_stats_accuracy; @@global.innodb_defragment_stats_accuracy @@ -31,3 +37,5 @@ SELECT @@global.innodb_defragment_stats_accuracy; @@global.innodb_defragment_stats_accuracy 4294967295 SET @@global.innodb_defragment_stats_accuracy = @start_innodb_defragment_stats_accuracy; +Warnings: +Warning 1287 '@@innodb_defragment_stats_accuracy' is deprecated and will be removed in a future release diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index de1f2042be3..2e79462a80f 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -19092,7 +19092,7 @@ static MYSQL_SYSVAR_BOOL(buffer_pool_load_at_startup, srv_buffer_pool_load_at_st NULL, NULL, TRUE); static MYSQL_SYSVAR_BOOL(defragment, srv_defragment, - PLUGIN_VAR_RQCMDARG, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, "Enable/disable InnoDB defragmentation (default FALSE). When set to FALSE, all existing " "defragmentation will be paused. And new defragmentation command will fail." "Paused defragmentation commands will resume when this variable is set to " @@ -19100,14 +19100,14 @@ static MYSQL_SYSVAR_BOOL(defragment, srv_defragment, NULL, NULL, FALSE); static MYSQL_SYSVAR_UINT(defragment_n_pages, srv_defragment_n_pages, - PLUGIN_VAR_RQCMDARG, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, "Number of pages considered at once when merging multiple pages to " "defragment", NULL, NULL, 7, 2, 32, 0); static MYSQL_SYSVAR_UINT(defragment_stats_accuracy, srv_defragment_stats_accuracy, - PLUGIN_VAR_RQCMDARG, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, "How many defragment stats changes there are before the stats " "are written to persistent storage. Set to 0 meaning disable " "defragment stats tracking.", @@ -19115,7 +19115,7 @@ static MYSQL_SYSVAR_UINT(defragment_stats_accuracy, static MYSQL_SYSVAR_UINT(defragment_fill_factor_n_recs, srv_defragment_fill_factor_n_recs, - PLUGIN_VAR_RQCMDARG, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, "How many records of space defragmentation should leave on the page. " "This variable, together with innodb_defragment_fill_factor, is introduced " "so defragmentation won't pack the page too full and cause page split on " @@ -19124,7 +19124,7 @@ static MYSQL_SYSVAR_UINT(defragment_fill_factor_n_recs, NULL, NULL, 20, 1, 100, 0); static MYSQL_SYSVAR_DOUBLE(defragment_fill_factor, srv_defragment_fill_factor, - PLUGIN_VAR_RQCMDARG, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, "A number between [0.7, 1] that tells defragmentation how full it should " "fill a page. Default is 0.9. Number below 0.7 won't make much sense." "This variable, together with innodb_defragment_fill_factor_n_recs, is " @@ -19134,7 +19134,7 @@ static MYSQL_SYSVAR_DOUBLE(defragment_fill_factor, srv_defragment_fill_factor, NULL, NULL, 0.9, 0.7, 1, 0); static MYSQL_SYSVAR_UINT(defragment_frequency, srv_defragment_frequency, - PLUGIN_VAR_RQCMDARG, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, "Do not defragment a single index more than this number of time per second." "This controls the number of time defragmentation thread can request X_LOCK " "on an index. Defragmentation thread will check whether "