Commit 14685b10 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-32050: Deprecate&ignore innodb_purge_rseg_truncate_frequency

The motivation of introducing the parameter
innodb_purge_rseg_truncate_frequency in
mysql/mysql-server@28bbd66ea5f6acf80fcb381057bb7ca5b7b188d2 and
mysql/mysql-server@8fc2120fed11d2498ecb3635d87f414c76985fce
seems to have been to avoid stalls due to freeing undo log pages
or truncating undo log tablespaces. In MariaDB Server,
innodb_undo_log_truncate=ON should be a much lighter operation
than in MySQL, because it will not involve any log checkpoint.

Another source of performance stalls should be
trx_purge_truncate_rseg_history(), which is shrinking the history list
by freeing the undo log pages whose undo records have been purged.
To alleviate that, we will introduce a purge_truncation_task that will
offload this from the purge_coordinator_task. In that way, the next
innodb_purge_batch_size pages may be parsed and purged while the pages
from the previous batch are being freed and the history list being shrunk.

The processing of innodb_undo_log_truncate=ON will still remain the
responsibility of the purge_coordinator_task.

purge_coordinator_state::count: Remove. We will ignore
innodb_purge_rseg_truncate_frequency, and act as if it had been
set to 1 (the maximum shrinking frequency).

purge_coordinator_state::do_purge(): Invoke an asynchronous task
purge_truncation_callback() to free the undo log pages.

purge_sys_t::iterator::free_history(): Free those undo log pages
that have been processed. This used to be a part of
trx_purge_truncate_history().

purge_sys_t::clone_end_view(): Take a new value of purge_sys.head
as a parameter, so that it will be updated while holding exclusive
purge_sys.latch. This is needed for race-free access to the field
in purge_truncation_callback().

Reviewed by: Vladislav Lesin
parent 21bec970
......@@ -1868,7 +1868,7 @@ static int prepare_export()
IF_WIN("\"","") "\"%s\" --mysqld \"%s\""
" --defaults-extra-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
" --innodb --innodb-fast-shutdown=0 --loose-partition"
" --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
" --innodb-buffer-pool-size=%llu"
" --console --skip-log-error --skip-log-bin --bootstrap %s< "
BOOTSTRAP_FILENAME IF_WIN("\"",""),
mariabackup_exe,
......@@ -1882,7 +1882,7 @@ static int prepare_export()
IF_WIN("\"","") "\"%s\" --mysqld"
" --defaults-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
" --innodb --innodb-fast-shutdown=0 --loose-partition"
" --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
" --innodb-buffer-pool-size=%llu"
" --console --log-error= --skip-log-bin --bootstrap %s< "
BOOTSTRAP_FILENAME IF_WIN("\"",""),
mariabackup_exe,
......
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
......@@ -2,5 +2,4 @@
--loose-innodb-buffer-page
--loose-innodb-buffer-page-lru
--innodb-defragment=1
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
......@@ -2,5 +2,4 @@
--innodb-tablespaces-encryption
--innodb-encrypt-tables=on
--innodb-encryption-threads=4
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
......@@ -2,5 +2,4 @@
--innodb-encryption-rotate-key-age=15
--innodb-encryption-threads=4
--innodb-tablespaces-encryption
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
......@@ -3,5 +3,4 @@
--innodb-tablespaces-encryption
--innodb-encryption-threads=2
--innodb-default-encryption-key-id=4
--innodb-purge-rseg-truncate-frequency=1
--skip-innodb-fast-shutdown
SET @@session.default_storage_engine = 'InnoDB';
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
drop table if exists t1;
# Case 1. Partitioning by RANGE based on a non-stored generated column.
CREATE TABLE t1 (
......@@ -135,4 +133,3 @@ DROP FUNCTION IF EXISTS f1;
DROP TRIGGER IF EXISTS trg1;
DROP TRIGGER IF EXISTS trg2;
set sql_warnings = 0;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_dbug=@@GLOBAL.debug_dbug;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(f1 INT NOT NULL, f2 int not null,
f3 int generated always as (f2 * 2) VIRTUAL,
primary key(f1), INDEX (f3))ENGINE=InnoDB;
......@@ -22,6 +20,5 @@ commit;
disconnect con1;
disconnect con2;
connection default;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
SET GLOBAL debug_dbug=@save_dbug;
DROP TABLE t1;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
connect purge_control,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
......@@ -39,4 +37,3 @@ InnoDB 0 transactions not purged
disconnect purge_control;
connection default;
drop table t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
set default_storage_engine=innodb;
set @old_dbug=@@global.debug_dbug;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @saved_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = OFF;
CREATE TABLE `t` (
......@@ -204,5 +202,4 @@ disconnect truncate;
connection default;
DROP TABLE t1, t2;
set debug_sync=reset;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET GLOBAL innodb_stats_persistent = @saved_stats_persistent;
SET default_storage_engine= innodb;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
#
# Bug 21922176 - PREBUILT->SEARCH_TUPLE CREATED WITHOUT INCLUDING
# THE NUMBER OF VIRTUAL COLUMNS
......@@ -194,7 +192,6 @@ ALTER TABLE t1 ADD COLUMN col7a INT GENERATED ALWAYS AS (col1 % col2)
VIRTUAL, ADD UNIQUE index idx (col1), algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: INPLACE ADD or DROP of virtual columns cannot be combined with other ALTER TABLE actions. Try ALGORITHM=COPY
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
#
# Bug 27122803 - BACKPORT FIX FOR BUG 25899959 TO MYSQL-5.7
#
......
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
#
# Bug#21869656 UNDO LOG DOES NOT CONTAIN ENOUGH INFORMATION
# ON INDEXED VIRTUAL COLUMNS
......@@ -173,4 +171,3 @@ CHECK TABLE t EXTENDED;
Table Op Msg_type Msg_text
test.t check status OK
DROP TABLE t;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -30,8 +30,6 @@
# Set the session storage engine
--source include/have_innodb.inc
eval SET @@session.default_storage_engine = 'InnoDB';
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
##### Workarounds for known open engine specific bugs
# none
......@@ -63,4 +61,3 @@ DROP TABLE t1;
#------------------------------------------------------------------------------#
# Cleanup
--source suite/gcol/inc/gcol_cleanup.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
--source include/have_innodb.inc
--source include/have_debug.inc
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_dbug=@@GLOBAL.debug_dbug;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(f1 INT NOT NULL, f2 int not null,
f3 int generated always as (f2 * 2) VIRTUAL,
primary key(f1), INDEX (f3))ENGINE=InnoDB;
......@@ -31,6 +29,5 @@ commit;
disconnect con1;
disconnect con2;
connection default;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
SET GLOBAL debug_dbug=@save_dbug;
DROP TABLE t1;
--source include/have_innodb.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
connect (purge_control,localhost,root);
START TRANSACTION WITH CONSISTENT SNAPSHOT;
......@@ -63,5 +60,3 @@ disconnect purge_control;
connection default;
drop table t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -6,8 +6,6 @@
set default_storage_engine=innodb;
set @old_dbug=@@global.debug_dbug;
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @saved_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = OFF;
......@@ -267,5 +265,4 @@ DROP TABLE t1, t2;
--source include/wait_until_count_sessions.inc
set debug_sync=reset;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET GLOBAL innodb_stats_persistent = @saved_stats_persistent;
......@@ -3,10 +3,6 @@
SET default_storage_engine= innodb;
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
--echo #
--echo # Bug 21922176 - PREBUILT->SEARCH_TUPLE CREATED WITHOUT INCLUDING
--echo # THE NUMBER OF VIRTUAL COLUMNS
......@@ -226,7 +222,6 @@ ALTER TABLE t1 ADD COLUMN col7a INT GENERATED ALWAYS AS (col1 % col2)
VIRTUAL, ADD UNIQUE index idx (col1), algorithm=inplace;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
--echo #
--echo # Bug 27122803 - BACKPORT FIX FOR BUG 25899959 TO MYSQL-5.7
......
--source include/have_innodb.inc
--source include/count_sessions.inc
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
--echo #
--echo # Bug#21869656 UNDO LOG DOES NOT CONTAIN ENOUGH INFORMATION
--echo # ON INDEXED VIRTUAL COLUMNS
......@@ -187,4 +183,3 @@ CHECK TABLE t EXTENDED;
DROP TABLE t;
--source include/wait_until_count_sessions.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
# Wait for everything to be purged.
# The user should have set innodb_purge_rseg_truncate_frequency=1.
--disable_query_log
if (!$wait_all_purged)
......
......@@ -2,7 +2,6 @@
# Bug#16720368 INNODB CRASHES ON BROKEN #SQL*.IBD FILE AT STARTUP
#
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB;
connect con1,localhost,root;
CREATE TABLE bug16720368 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
......
SET @save_freq=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t (a int PRIMARY KEY, b int NOT NULL UNIQUE) engine = InnoDB, STATS_PERSISTENT=0;
InnoDB 0 transactions not purged
connect prevent_purge,localhost,root,,;
......@@ -40,4 +38,3 @@ disconnect con_del_2;
connection default;
SET DEBUG_SYNC = 'RESET';
DROP TABLE t;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_freq;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
#
# MDEV-12288 Reset DB_TRX_ID when the history is removed,
# to speed up MVCC
#
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1(a INT PRIMARY KEY, b INT NOT NULL)
ROW_FORMAT=REDUNDANT ENGINE=InnoDB;
InnoDB 0 transactions not purged
......@@ -49,4 +46,3 @@ a b c
1 2 NULL
3 -3 NULL
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -165,8 +165,6 @@ ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fail
ALTER TABLE child FORCE;
DELETE FROM parent;
DROP TABLE child,parent;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SELECT unique_constraint_name FROM information_schema.referential_constraints
WHERE table_name = 't2';
unique_constraint_name
......@@ -730,7 +728,6 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
#
# MDEV-17187 table doesn't exist in engine after ALTER other tables
# with CONSTRAINTs
......@@ -1034,8 +1031,6 @@ DROP TABLE IF EXISTS t2, t1;
#
# MDEV-30531 Corrupt index(es) on busy table when using FOREIGN KEY
#
SET @freq=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE collections (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
collectionhash varchar(255) NOT NULL DEFAULT '0',
......@@ -1061,7 +1056,6 @@ CHECK TABLE binaries, collections EXTENDED;
Table Op Msg_type Msg_text
test.binaries check status OK
test.collections check status OK
SET GLOBAL innodb_purge_rseg_truncate_frequency=@freq;
disconnect con1;
DROP TABLE binaries, collections;
# End of 10.6 tests
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(id INT PRIMARY key, val VARCHAR(16000))
ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 (id,val) SELECT 2*seq,'x' FROM seq_0_to_1023;
......@@ -29,4 +27,3 @@ disconnect con1;
connection default;
COMMIT;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE tab(a BIGINT PRIMARY KEY,c1 TINYTEXT,c2 TEXT,c3 MEDIUMTEXT,
c4 TINYBLOB,c5 BLOB,c6 MEDIUMBLOB,c7 LONGBLOB) ENGINE=InnoDB;
CREATE INDEX index1 ON tab(c1(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51';
......@@ -1309,4 +1307,3 @@ name count_reset
index_page_merge_attempts 2
index_page_merge_successful 2
DROP TABLE tab1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -9,9 +9,7 @@ variable_value
# Each row format has its own amount of overhead that
# varies depending on number of fields and other overhead.
SET SESSION innodb_strict_mode = ON;
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_level=@@GLOBAL.innodb_compression_level;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET GLOBAL innodb_compression_level=1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
......@@ -506,7 +504,6 @@ ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
DROP TABLE t1;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SET GLOBAL innodb_compression_level=@save_level;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
DROP TABLE tlong;
......
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
call mtr.add_suppression("Innodb: Cannot add field.*row size is");
# Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
......
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT table_id INTO @table_stats_id FROM information_schema.innodb_sys_tables
WHERE name = 'mysql/innodb_table_stats';
SELECT table_id INTO @index_stats_id FROM information_schema.innodb_sys_tables
......@@ -168,7 +166,6 @@ name num_rows ref_count
test/parent 1 2
DROP TABLE child;
DROP TABLE parent;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
#
# MDEV-29479 I_S.INNODB_SYS_TABLESPACES doesn't have
# temporary tablespace information
......
# Ensure that purge will not crash on the table after we corrupt it.
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET GLOBAL innodb_fast_shutdown=0;
# Create and populate the table to be corrupted
set global innodb_file_per_table=ON;
......
......@@ -4,8 +4,6 @@
#
# Set up the test with a procedure and a function.
#
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency= 1;
CREATE PROCEDURE insert_n(start int, end int)
BEGIN
DECLARE i INT DEFAULT start;
......@@ -84,7 +82,6 @@ test.t1 check status OK
#
disconnect con2;
disconnect con3;
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
DROP TABLE t1;
DROP PROCEDURE insert_n;
DROP FUNCTION num_pages_get;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked;
SET GLOBAL innodb_stats_include_delete_marked = ON;
SET @saved_traditional = @@GLOBAL.innodb_stats_traditional;
......@@ -105,4 +103,3 @@ DROP TABLE t1,t2;
SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked;
SET GLOBAL innodb_stats_traditional = @saved_traditional;
SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -312,12 +312,11 @@
connection default;
InnoDB 0 transactions not purged
DROP TABLE t1,t2,t3,t4,big;
@@ -2836,7 +2868,7 @@
@@ -2836,6 +2868,6 @@
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-209
+211
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
#
......@@ -52,8 +52,6 @@ connect analyze, localhost, root;
connection default;
SET timestamp = 42;
SET time_zone='+03:00';
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET @old_instant=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column');
......@@ -2873,7 +2871,6 @@ FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
209
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
#
# MDEV-18266: Changing an index comment unnecessarily rebuilds index
......
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
#
# MDEV-17821 Assertion `!page_rec_is_supremum(rec)' failed
# in btr_pcur_store_position
......@@ -208,7 +206,6 @@ DROP TABLE t1;
# MDEV-23801 Assertion index->table->instant... failed
# in btr_pcur_store_position()
#
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t (
pk int auto_increment,
c01 char(255) not null default repeat('a',255),
......@@ -232,7 +229,6 @@ INSERT INTO t () VALUES (),();
ROLLBACK;
DELETE FROM t;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
CREATE TABLE tt ENGINE=InnoDB AS SELECT c FROM t;
DROP TABLE t, tt;
# End of 10.3 tests
......@@ -489,7 +485,6 @@ ALTER TABLE t1 ADD COLUMN(f2 INT NOT NULL, f3 INT NOT NULL,
f4 INT NOT NULL, f5 INT NOT NULL),
CHANGE COLUMN f1 f1 CHAR(10) DEFAULT NULL;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
#
# MDEV-26420 Buffer overflow on instant ADD/DROP of generated column
#
......
......@@ -20,7 +20,6 @@ COMMIT;
# Kill the server
disconnect ddl;
# restart
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1;
id c2
0 2
......@@ -46,8 +45,6 @@ COMMIT;
# Kill the server
disconnect ddl;
# restart
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1;
id c2
0 3
......@@ -76,7 +73,6 @@ COMMIT;
# Kill the server
disconnect ddl;
# restart
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
FOUND 3 /\[Note\] InnoDB: Rolled back recovered transaction / in mysqld.1.err
SELECT * FROM t1;
id c2
......
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET @old_instant=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column');
......@@ -523,7 +521,6 @@ test.t1 check status OK
DROP TABLE t1;
SET DEBUG_SYNC=RESET;
# End of 10.5 tests
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
......
--- instant_alter_purge.result
+++ instant_alter_purge,release.result
@@ -32,16 +32,11 @@
@@ -32,15 +32,10 @@
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
DELETE FROM t1;
......@@ -16,4 +16,3 @@
connection default;
-SET DEBUG_SYNC=RESET;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
InnoDB 0 transactions not purged
#
# MDEV-17793 Crash in purge after instant DROP and emptying the table
......@@ -22,4 +20,3 @@ ALTER TABLE t1 DROP extra;
disconnect prevent_purge;
InnoDB 0 transactions not purged
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -47,11 +47,8 @@ CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB;
# Kill the server
disconnect to_be_killed;
# restart
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
DROP TABLE foo;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency=@saved_frequency;
SELECT * FROM empty;
id c2 d1
SELECT * FROM once;
......
......@@ -3,7 +3,6 @@ create table t1(f1 int not null)engine=innodb;
insert into t1 values(1), (2), (3);
# Change the page offset
FOUND 1 /page id mismatch/ in result.log
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
InnoDB 0 transactions not purged
drop table t1;
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\.");
SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
# Bug #12429576 - Test an assertion failure on purge.
CREATE TABLE t1_purge (
A int,
......@@ -118,4 +116,3 @@ t12963823 CREATE TABLE `t12963823` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
InnoDB 0 transactions not purged
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge, t12637786, t12963823;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (
a SERIAL, b CHAR(255) NOT NULL DEFAULT '', c BOOLEAN DEFAULT false,
l LINESTRING NOT NULL DEFAULT ST_linefromtext('linestring(448 -689,
......@@ -169,4 +167,3 @@ page 5: N_RECS=0x0001
UNLOCK TABLES;
DROP TABLE t1;
# End of 10.3 tests
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET GLOBAL
innodb_file_per_table=OFF,
innodb_purge_rseg_truncate_frequency=1,
innodb_immediate_scrub_data_uncompressed=ON;
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
f3 INT NOT NULL, INDEX(f1),
......
SET @save_debug=@@GLOBAL.INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG;
SET @save_scrub=@@GLOBAL.INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED;
SET @save_freq=@@GLOBAL.INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY;
SET GLOBAL INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY=1;
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED=1;
SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=2;
CREATE TABLE t1(f1 INT AUTO_INCREMENT PRIMARY KEY,
......@@ -19,4 +17,3 @@ UNLOCK TABLES;
DROP TABLE t1;
SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=@save_debug;
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED=@save_scrub;
SET GLOBAL INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY = @save_freq;
......@@ -8,10 +8,7 @@ connection default;
SET DEBUG_SYNC='now WAIT_FOR c';
# restart
disconnect wait;
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
SELECT COUNT(*) FROM t1;
COUNT(*)
0
......
......@@ -2,7 +2,6 @@
# Bug #20445525 ADD A CONSISTENCY CHECK AGAINST DB_TRX_ID BEING
# IN THE FUTURE
#
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
INSERT INTO t1 VALUES(1);
InnoDB 0 transactions not purged
......
......@@ -144,8 +144,6 @@ CHECK TABLE test_tab;
Table Op Msg_type Msg_text
test.test_tab check status OK
DROP TABLE test_tab;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TEMPORARY TABLE t2(i INT)ENGINE=InnoDB;
CREATE TABLE t1(i TEXT NOT NULL) ENGINE=INNODB;
BEGIN;
......@@ -156,4 +154,3 @@ ROLLBACK;
InnoDB 0 transactions not purged
DROP TABLE t1;
DROP TABLE t2;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -4,7 +4,6 @@ Variable_name Value
innodb_doublewrite ON
create table t1(f1 int not null, f2 int not null)engine=innodb;
insert into t1 values (1, 1);
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
InnoDB 0 transactions not purged
set GLOBAL innodb_log_checkpoint_now=1;
# Make the first page dirty for undo tablespace
......
SET GLOBAL innodb_undo_log_truncate = 0;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Page_Size Zip_Size Path
innodb_undo001 DEFAULT DEFAULT MYSQLD_DATADIR//undo001
......@@ -33,7 +32,6 @@ connection con2;
commit;
disconnect con2;
connection default;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET GLOBAL innodb_max_purge_lag_wait=0;
set global innodb_fast_shutdown=0;
# restart
......
SET GLOBAL innodb_undo_log_truncate = 1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
create table t1(keyc int primary key, c char(100)) engine = innodb;
begin;
commit;
......
......@@ -27,7 +27,6 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`bug16720368` is corrupted");
-- echo #
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB;
......
......@@ -3,8 +3,6 @@
source include/have_debug.inc;
source include/have_debug_sync.inc;
SET @save_freq=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t (a int PRIMARY KEY, b int NOT NULL UNIQUE) engine = InnoDB, STATS_PERSISTENT=0;
--source include/wait_all_purged.inc
......@@ -86,5 +84,4 @@ INSERT INTO t VALUES(30, 20); # trx_4
SET DEBUG_SYNC = 'RESET';
DROP TABLE t;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_freq;
--source include/wait_until_count_sessions.inc
......@@ -2,16 +2,12 @@
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
let MYSQLD_DATADIR=`select @@datadir`;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
--echo #
--echo # MDEV-12288 Reset DB_TRX_ID when the history is removed,
--echo # to speed up MVCC
--echo #
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1(a INT PRIMARY KEY, b INT NOT NULL)
ROW_FORMAT=REDUNDANT ENGINE=InnoDB;
--source include/wait_all_purged.inc
......@@ -80,4 +76,3 @@ EOF
UNLOCK TABLES;
SELECT * FROM t1;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -138,9 +138,6 @@ ALTER TABLE child FORCE;
DELETE FROM parent;
DROP TABLE child,parent;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SELECT unique_constraint_name FROM information_schema.referential_constraints
WHERE table_name = 't2';
......@@ -737,7 +734,6 @@ disconnect con1;
--source include/wait_all_purged.inc
CHECK TABLE t1;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
--echo #
--echo # MDEV-17187 table doesn't exist in engine after ALTER other tables
......@@ -1080,9 +1076,6 @@ DROP TABLE IF EXISTS t2, t1;
--echo # MDEV-30531 Corrupt index(es) on busy table when using FOREIGN KEY
--echo #
SET @freq=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE collections (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
collectionhash varchar(255) NOT NULL DEFAULT '0',
......@@ -1111,7 +1104,6 @@ REPLACE INTO binaries (id) VALUES (NULL);
SET GLOBAL innodb_max_purge_lag_wait=0;
CHECK TABLE binaries, collections EXTENDED;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@freq;
--disconnect con1
......
......@@ -3,9 +3,6 @@
--source include/have_debug.inc
--source include/have_debug_sync.inc
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1(id INT PRIMARY key, val VARCHAR(16000))
ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 (id,val) SELECT 2*seq,'x' FROM seq_0_to_1023;
......@@ -44,4 +41,3 @@ disconnect con1;
connection default;
COMMIT;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
......@@ -13,9 +13,6 @@
--source include/have_innodb_16k.inc
--source include/have_partition.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
# Check index merge threshold by create index on all datatypes
CREATE TABLE tab(a BIGINT PRIMARY KEY,c1 TINYTEXT,c2 TEXT,c3 MEDIUMTEXT,
......@@ -189,4 +186,3 @@ CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=45';
--source suite/innodb/include/innodb_merge_threshold_secondary.inc
DROP TABLE tab1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -16,9 +16,7 @@ SELECT variable_value FROM information_schema.global_status
--echo # varies depending on number of fields and other overhead.
SET SESSION innodb_strict_mode = ON;
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET @save_level=@@GLOBAL.innodb_compression_level;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET GLOBAL innodb_compression_level=1;
# Compressed table: compressBound() for the s390x DFLTCC instruction
......@@ -458,7 +456,6 @@ DROP TABLE t1;
--source include/wait_all_purged.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SET GLOBAL innodb_compression_level=@save_level;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
......
......@@ -3,8 +3,6 @@
--source include/have_innodb.inc
--source include/have_innodb_32k.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
call mtr.add_suppression("Innodb: Cannot add field.*row size is");
let $MYSQLD_DATADIR= `select @@datadir`;
......
......@@ -4,8 +4,6 @@
--source include/innodb_page_size_small.inc
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
LET $MYSQLD_DATADIR = `select @@datadir`;
LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
......@@ -140,7 +138,6 @@ WHERE name LIKE "%parent";
DROP TABLE child;
DROP TABLE parent;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
--echo #
--echo # MDEV-29479 I_S.INNODB_SYS_TABLESPACES doesn't have
......
......@@ -16,7 +16,6 @@ call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
--enable_query_log
--echo # Ensure that purge will not crash on the table after we corrupt it.
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET GLOBAL innodb_fast_shutdown=0;
--echo # Create and populate the table to be corrupted
......
......@@ -6,8 +6,6 @@
--echo #
--source include/have_innodb.inc
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency= 1;
DELIMITER ~~;
CREATE PROCEDURE insert_n(start int, end int)
......@@ -90,7 +88,6 @@ CHECK TABLE t1;
--echo #
disconnect con2;
disconnect con3;
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
DROP TABLE t1;
DROP PROCEDURE insert_n;
DROP FUNCTION num_pages_get;
--source include/have_innodb.inc
--source include/have_sequence.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked;
SET GLOBAL innodb_stats_include_delete_marked = ON;
SET @saved_traditional = @@GLOBAL.innodb_stats_traditional;
......@@ -84,4 +82,3 @@ DROP TABLE t1,t2;
SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked;
SET GLOBAL innodb_stats_traditional = @saved_traditional;
SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -44,8 +44,6 @@ connect analyze, localhost, root;
connection default;
SET timestamp = 42;
SET time_zone='+03:00';
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET @old_instant=
(SELECT variable_value FROM information_schema.global_status
......@@ -906,7 +904,6 @@ DROP TABLE t1;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
SET GLOBAL innodb_instant_alter_column_allowed = @saved_allowance;
--echo #
......
--source include/have_innodb.inc
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--echo #
--echo # MDEV-17821 Assertion `!page_rec_is_supremum(rec)' failed
--echo # in btr_pcur_store_position
......@@ -217,8 +214,6 @@ DROP TABLE t1;
--echo # in btr_pcur_store_position()
--echo #
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t (
pk int auto_increment,
c01 char(255) not null default repeat('a',255),
......@@ -245,7 +240,6 @@ ROLLBACK;
DELETE FROM t;
--source include/wait_all_purged.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
CREATE TABLE tt ENGINE=InnoDB AS SELECT c FROM t;
DROP TABLE t, tt;
......@@ -524,7 +518,6 @@ ALTER TABLE t1 ADD COLUMN(f2 INT NOT NULL, f3 INT NOT NULL,
f4 INT NOT NULL, f5 INT NOT NULL),
CHANGE COLUMN f1 f1 CHAR(10) DEFAULT NULL;
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
--echo #
--echo # MDEV-26420 Buffer overflow on instant ADD/DROP of generated column
......
......@@ -36,7 +36,6 @@ COMMIT;
disconnect ddl;
--source include/start_mysqld.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1;
SELECT * FROM t2;
BEGIN;
......@@ -64,9 +63,6 @@ COMMIT;
disconnect ddl;
--source include/start_mysqld.inc
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1;
SELECT * FROM t2;
BEGIN;
......@@ -94,8 +90,6 @@ COMMIT;
disconnect ddl;
--source include/start_mysqld.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN= \[Note\] InnoDB: Rolled back recovered transaction ;
-- source include/search_pattern_in_file.inc
......
......@@ -3,9 +3,6 @@
--source include/have_debug_sync.inc
--source include/have_sequence.inc
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET @old_instant=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column');
......@@ -607,8 +604,6 @@ SET DEBUG_SYNC=RESET;
--echo # End of 10.5 tests
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
......@@ -4,8 +4,6 @@ if ($have_debug) {
--source include/have_debug_sync.inc
}
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--source include/wait_all_purged.inc
--echo #
......@@ -34,4 +32,3 @@ disconnect prevent_purge;
let $wait_all_purged= 0;
--source include/wait_all_purged.inc
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -60,11 +60,8 @@ CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB;
disconnect to_be_killed;
--source include/start_mysqld.inc
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
DROP TABLE foo;
--source include/wait_all_purged.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=@saved_frequency;
SELECT * FROM empty;
SELECT * FROM once;
......
......@@ -63,7 +63,6 @@ let SEARCH_PATTERN=page id mismatch;
--remove_file $resultlog
let $restart_parameters=--innodb-force-recovery=1;
--source include/start_mysqld.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--source include/wait_all_purged.inc
drop table t1;
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd': Page read from tablespace is corrupted\\.");
......
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--echo # Bug #12429576 - Test an assertion failure on purge.
CREATE TABLE t1_purge (
A int,
......@@ -114,4 +111,3 @@ SHOW CREATE TABLE t12963823;
-- source include/wait_all_purged.inc
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge, t12637786, t12963823;
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
......@@ -5,10 +5,6 @@
call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
--enable_query_log
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (
a SERIAL, b CHAR(255) NOT NULL DEFAULT '', c BOOLEAN DEFAULT false,
l LINESTRING NOT NULL DEFAULT ST_linefromtext('linestring(448 -689,
......@@ -174,5 +170,3 @@ UNLOCK TABLES;
DROP TABLE t1;
--echo # End of 10.3 tests
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -4,7 +4,6 @@
SET GLOBAL
innodb_file_per_table=OFF,
innodb_purge_rseg_truncate_frequency=1,
innodb_immediate_scrub_data_uncompressed=ON;
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
f3 INT NOT NULL, INDEX(f1),
......
......@@ -4,9 +4,7 @@
SET @save_debug=@@GLOBAL.INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG;
SET @save_scrub=@@GLOBAL.INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED;
SET @save_freq=@@GLOBAL.INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY;
SET GLOBAL INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY=1;
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED=1;
SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=2;
let $MYSQLD_DATADIR=`select @@datadir`;
......@@ -28,4 +26,3 @@ UNLOCK TABLES;
DROP TABLE t1;
SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=@save_debug;
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED=@save_scrub;
SET GLOBAL INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY = @save_freq;
......@@ -34,7 +34,6 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags;
--let $d=--innodb-data-home-dir=$bugdir --innodb-log-group-home-dir=$bugdir
--let $d=$d --innodb-data-file-path=ibdata1:1M:autoextend
--let $d=$d --innodb-undo-tablespaces=0
--let $d=$d --innodb-purge-rseg-truncate-frequency=1
--let $d=$d --skip-innodb-fast-shutdown
--let $restart_noprint=1
--let $restart_parameters=$d --innodb-stats-persistent=0
......
......@@ -17,10 +17,7 @@ SET DEBUG_SYNC='now WAIT_FOR c';
--source include/restart_mysqld.inc
disconnect wait;
SET @save_frequency=@@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--source include/wait_all_purged.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
--replace_result 2 0
SELECT COUNT(*) FROM t1;
......
......@@ -6,7 +6,6 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
let PAGE_SIZE=`select @@innodb_page_size`;
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
......
......@@ -141,8 +141,6 @@ SELECT COUNT(*) FROM test_tab;
CHECK TABLE test_tab;
DROP TABLE test_tab;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TEMPORARY TABLE t2(i INT)ENGINE=InnoDB;
CREATE TABLE t1(i TEXT NOT NULL) ENGINE=INNODB;
BEGIN;
......@@ -153,4 +151,3 @@ ROLLBACK;
--source include/wait_all_purged.inc
DROP TABLE t1;
DROP TABLE t2;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -9,7 +9,6 @@ show variables like 'innodb_doublewrite';
create table t1(f1 int not null, f2 int not null)engine=innodb;
insert into t1 values (1, 1);
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
--source include/wait_all_purged.inc
set GLOBAL innodb_log_checkpoint_now=1;
......
......@@ -13,7 +13,6 @@ call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operation
--enable_query_log
SET GLOBAL innodb_undo_log_truncate = 0;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
LET $MYSQLD_DATADIR = `select @@datadir`;
LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
......@@ -53,7 +52,6 @@ connection default;
let $trx_before= `SHOW ENGINE INNODB STATUS`;
let $trx_before= `select substr('$trx_before',9)+2`;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SET GLOBAL innodb_max_purge_lag_wait=0;
set global innodb_fast_shutdown=0;
--source include/restart_mysqld.inc
......
......@@ -13,7 +13,6 @@
--source include/not_embedded.inc
SET GLOBAL innodb_undo_log_truncate = 1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
......
......@@ -33,10 +33,7 @@ connection default;
disconnect ddl1;
disconnect ddl2;
disconnect ddl3;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
CHECK TABLE t1,t2,t3;
Table Op Msg_type Msg_text
test.t1 check status OK
......
......@@ -111,13 +111,9 @@ disconnect ddl1;
disconnect ddl2;
disconnect ddl3;
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
# Wait for purge, so that any #sql-ib.ibd files from the previous kill
# will be deleted.
source ../../innodb/include/wait_all_purged.inc;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
CHECK TABLE t1,t2,t3;
DROP TABLE t1,t2,t3;
......
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (g MULTIPOINT NOT NULL) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('');
connect purge_control,localhost,root;
......@@ -10,4 +8,3 @@ ALTER TABLE t1 ADD SPATIAL INDEX (g);
disconnect purge_control;
InnoDB 0 transactions not purged
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb ROW_FORMAT=COMPRESSED;
insert into t1 values(1, Point(1,1));
insert into t1 values(2, Point(2,2));
......@@ -51,4 +49,3 @@ count(*)
SET debug_dbug = @saved_dbug;
InnoDB 0 transactions not purged
drop table t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
create table t (
b point not null,d point not null, spatial key (d),spatial key (b)
) engine=innodb;
InnoDB 0 transactions not purged
drop table t;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
connect control_purge,localhost,root,,;
connection default;
CREATE TABLE t1 (
......@@ -136,4 +134,3 @@ SPATIAL KEY (g6)
) ENGINE=InnoDB;
DROP TABLE t1,t2;
disconnect control_purge;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
--source include/have_innodb.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (g MULTIPOINT NOT NULL) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('');
......@@ -17,4 +14,3 @@ ALTER TABLE t1 ADD SPATIAL INDEX (g);
disconnect purge_control;
--source ../../innodb/include/wait_all_purged.inc
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -10,9 +10,6 @@
# Valgrind takes too much time on PB2 even in the --big-test runs.
--source include/not_valgrind.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb ROW_FORMAT=COMPRESSED;
# Insert enough values to let R-tree split.
......@@ -61,4 +58,3 @@ SET debug_dbug = @saved_dbug;
# Clean up.
drop table t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -6,9 +6,6 @@
# This test often times out with MSAN
--source include/not_msan.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
create table t (
b point not null,d point not null, spatial key (d),spatial key (b)
) engine=innodb;
......@@ -29,4 +26,3 @@ dec $n;
# Clean up.
drop table t;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -6,9 +6,6 @@
--source include/innodb_row_format.inc
--source include/count_sessions.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
connect (control_purge,localhost,root,,);
connection default;
......@@ -100,5 +97,3 @@ dec $index;
disconnect control_purge;
--source include/wait_until_count_sessions.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -2,8 +2,6 @@
# MDEV-21259 Assertion 'w != NORMAL || mach_read_from_4(ptr) != val'
# failed in mtr_t::write(), btr_free_externally_stored_field()
#
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (c TEXT, f2 INT PRIMARY KEY, f3 INT UNIQUE)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET @level= @@GLOBAL.innodb_compression_level;
......@@ -18,4 +16,3 @@ disconnect prevent_purge;
InnoDB 0 transactions not purged
DROP TABLE t1;
SET GLOBAL innodb_compression_level = @level;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
......@@ -5,9 +5,6 @@
--echo # failed in mtr_t::write(), btr_free_externally_stored_field()
--echo #
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (c TEXT, f2 INT PRIMARY KEY, f3 INT UNIQUE)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
......@@ -26,4 +23,3 @@ REPLACE INTO t1 SELECT * FROM t1;
DROP TABLE t1;
SET GLOBAL innodb_compression_level = @level;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes;
insert into t1(b, c) values("mariadb", "mariabackup");
InnoDB 0 transactions not purged
......
call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes;
insert into t1(b, c) values("mariadb", "mariabackup");
--source ../innodb/include/wait_all_purged.inc
......
......@@ -4,7 +4,11 @@ SELECT @global_start_value;
128
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_purge_rseg_truncate_frequency = 1;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SET @@global.innodb_purge_rseg_truncate_frequency = DEFAULT;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
128
......@@ -17,31 +21,41 @@ SELECT @@innodb_purge_rseg_truncate_frequency;
SELECT local.innodb_purge_rseg_truncate_frequency;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_purge_rseg_truncate_frequency = 1;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_purge_rseg_truncate_frequency = 1;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
SET @@global.innodb_purge_rseg_truncate_frequency = 1;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
SET @@global.innodb_purge_rseg_truncate_frequency = 128;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
128
'#--------------------FN_DYNVARS_046_05-------------------------#'
SET @@global.innodb_purge_rseg_truncate_frequency = -1;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1'
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
SET @@global.innodb_purge_rseg_truncate_frequency = -1024;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1024'
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
......@@ -98,16 +112,21 @@ SELECT @@global.innodb_purge_rseg_truncate_frequency;
1
'#---------------------FN_DYNVARS_046_08----------------------#'
SET @@global.innodb_purge_rseg_truncate_frequency = TRUE;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
SET @@global.innodb_purge_rseg_truncate_frequency = FALSE;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '0'
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
1
SET @@global.innodb_purge_rseg_truncate_frequency = @global_start_value;
Warnings:
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
SELECT @@global.innodb_purge_rseg_truncate_frequency;
@@global.innodb_purge_rseg_truncate_frequency
128
......@@ -320,7 +320,7 @@
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
VARIABLE_COMMENT Deprecated parameter with no effect
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
@@ -1393,7 +1393,7 @@
......
......@@ -1308,7 +1308,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
VARIABLE_COMMENT Deprecated parameter with no effect
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
NUMERIC_BLOCK_SIZE 0
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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