1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.11 into 11.0

This commit is contained in:
Marko Mäkelä
2023-11-24 11:20:56 +02:00
165 changed files with 2019 additions and 450 deletions

View File

@@ -25,6 +25,7 @@ call mtr.add_suppression("Table .*bug16720368.* is corrupted");
-- echo # Bug#16720368 INNODB CRASHES ON BROKEN #SQL*.IBD FILE AT STARTUP
-- echo #
SET GLOBAL innodb_stats_persistent=0;
CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB;

View File

@@ -1,5 +1,8 @@
--source include/innodb_page_size.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
let MYSQLD_DATADIR=`select @@datadir`;
@@ -76,3 +79,5 @@ EOF
UNLOCK TABLES;
SELECT * FROM t1;
DROP TABLE t1;
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;

View File

@@ -2,6 +2,8 @@
--source include/count_sessions.inc
--source include/default_charset.inc
SET GLOBAL innodb_stats_persistent = 0;
--echo #
--echo # Bug #19027905 ASSERT RET.SECOND DICT_CREATE_FOREIGN_CONSTRAINTS_LOW
--echo # DICT_CREATE_FOREIGN_CONSTR
@@ -126,6 +128,9 @@ FLUSH TABLES;
--let $shutdown_timeout=
disconnect incomplete;
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
INSERT INTO child SET a=0;
--error ER_NO_REFERENCED_ROW_2
INSERT INTO child SET a=1;
@@ -1132,4 +1137,6 @@ DROP TABLE binaries, collections;
--echo # End of 10.6 tests
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
--source include/wait_until_count_sessions.inc

View File

@@ -2,6 +2,9 @@
# This test is slow on buildbot.
--source include/big_test.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
FLUSH TABLES;
let $MYSQLD_TMPDIR = `SELECT @@tmpdir`;
@@ -222,3 +225,4 @@ SELECT * FROM t1;
DROP TABLE t1;
SET GLOBAL innodb_compression_algorithm=@save_algo;
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;

View File

@@ -13,6 +13,9 @@
--source include/have_innodb_16k.inc
--source include/have_partition.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
# Check index merge threshold by create index on all datatypes
CREATE TABLE tab(a BIGINT PRIMARY KEY,c1 TINYTEXT,c2 TEXT,c3 MEDIUMTEXT,
@@ -186,3 +189,5 @@ 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_stats_persistent = @save_stats_persistent;

View File

@@ -3,6 +3,9 @@
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
call mtr.add_suppression("InnoDB: Cannot add field .* in table");
let $MYSQLD_DATADIR= `select @@datadir`;
@@ -457,6 +460,7 @@ DROP TABLE t1;
--source include/wait_all_purged.inc
SET GLOBAL innodb_compression_level=@save_level;
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
DROP TABLE tlong;

View File

@@ -3,6 +3,7 @@
--source include/have_innodb.inc
--source include/have_innodb_32k.inc
SET GLOBAL innodb_stats_persistent = 0;
call mtr.add_suppression("Innodb: Cannot add field.*row size is");
let $MYSQLD_DATADIR= `select @@datadir`;

View File

@@ -4,6 +4,9 @@
--source include/innodb_page_size_small.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
LET $MYSQLD_DATADIR = `select @@datadir`;
LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
@@ -144,3 +147,5 @@ DROP TABLE parent;
--echo # temporary tablespace information
--echo #
SELECT SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE name like 'innodb_temporary';
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;

View File

@@ -4,7 +4,7 @@
let $MYSQLD_DATADIR=`select @@datadir`;
CREATE TABLE t1(f1 int auto_increment primary key,
f2 varchar(256),
f3 text) engine = innodb;
f3 text) engine = innodb stats_persistent=0;
let $numinserts = 500;
--disable_query_log
begin;

View File

@@ -49,7 +49,7 @@ SELECT COUNT(*) FROM t2;
connection con1;
EXPLAIN SELECT * FROM t2 WHERE val=4;
--source include/wait_all_purged.inc
SET GLOBAL innodb_max_purge_lag_wait=0;
--echo # After COMMIT and purge, the DELETE must show up.
EXPLAIN SELECT * FROM t1 WHERE val=4;

View File

@@ -3,6 +3,9 @@
let $datadir=`select @@datadir`;
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
--echo #
--echo # MDEV-11369: Instant ADD COLUMN for InnoDB
--echo #
@@ -964,3 +967,4 @@ remove_file $datadir/test/mdev28822_100427_innodb.frm;
copy_file std_data/mysql_upgrade/mdev28822_100427_innodb.frm $datadir/test/mdev28822_100427_innodb.frm;
ALTER TABLE mdev28822_100427_innodb ADD i1 INTEGER, ALGORITHM=INSTANT;
DROP TABLE mdev28822_100427_innodb;
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;

View File

@@ -1,5 +1,8 @@
--source include/have_innodb.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
--echo #
--echo # MDEV-17821 Assertion `!page_rec_is_supremum(rec)' failed
--echo # in btr_pcur_store_position
@@ -527,3 +530,7 @@ ALTER TABLE t1 ADD COLUMN i INT GENERATED ALWAYS AS (1), DROP COLUMN i;
DROP TABLE t1;
--echo # End of 10.4 tests
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
--echo # End of 10.6 tests

View File

@@ -14,7 +14,7 @@ let MYSQLD_DATADIR=`select @@datadir`;
--echo #
CREATE TABLE t1(id INT PRIMARY KEY, c2 INT UNIQUE)
ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
ENGINE=InnoDB STATS_PERSISTENT=0 ROW_FORMAT=REDUNDANT;
CREATE TABLE t2 LIKE t1;
INSERT INTO t1 VALUES(0,2);
INSERT INTO t2 VALUES(2,1);

View File

@@ -3,6 +3,9 @@
--source include/have_debug_sync.inc
--source include/have_sequence.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
SET @old_instant=
(SELECT variable_value FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column');
@@ -607,3 +610,7 @@ SET DEBUG_SYNC=RESET;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
--echo # End of 10.6 tests

View File

@@ -14,7 +14,7 @@ connect (prevent_purge,localhost,root);
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 () VALUES ();
ALTER TABLE t1 DROP f2, ADD COLUMN f2 INT;
ALTER TABLE t1 DROP f1;

View File

@@ -3,6 +3,8 @@
# The embedded server tests do not support restarting.
--source include/not_embedded.inc
SET GLOBAL innodb_stats_persistent = 0;
# Flush any open myisam tables from previous tests
FLUSH TABLES;

View File

@@ -170,6 +170,8 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' \(init function returned error\|registration as a STORAGE ENGINE failed\)");
call mtr.add_suppression("InnoDB: Table test/u[123] in the InnoDB data dictionary has tablespace id [1-9][0-9]*, but tablespace with that id or name does not exist\\. Have you deleted or moved \\.ibd files\\?");
call mtr.add_suppression("InnoDB: Cannot replay rename of tablespace.*");
call mtr.add_suppression("InnoDB: Attempted to open a previously opened tablespace");
call mtr.add_suppression("InnoDB: Recovery cannot access file");
FLUSH TABLES;
--enable_query_log

View File

@@ -0,0 +1,44 @@
--source include/have_debug.inc
--source include/linux.inc
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_sequence.inc
--echo #
--echo # MDEV-24670 avoid OOM by linux kernel co-operative memory management
--echo #
set @save_dbug=@@debug_dbug;
set @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
# Wait for the undo logs to be empty from previous tests.
# This is not an actual parameter, so there is no need to restore it.
set GLOBAL innodb_max_purge_lag_wait=0;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL innodb_limit_optimistic_insert_debug=2;
SET STATEMENT unique_checks=0, foreign_key_checks=0 FOR
INSERT INTO t1 SELECT * FROM seq_1_to_1000;
SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
DROP TABLE t1;
SELECT CAST(VARIABLE_VALUE AS INTEGER) INTO @dirty_prev
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
set debug_dbug="d,trigger_garbage_collection";
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size;
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN= InnoDB: Memory pressure event freed.*;
--source include/search_pattern_in_file.inc
set debug_dbug=@save_dbug;
--echo # End of 10.11 tests

View File

@@ -6,7 +6,7 @@ let MYSQLD_BASEDIR= `SELECT @@basedir`;
let MYSQLD_DATADIR= `SELECT @@datadir`;
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
create table t1(f1 int not null)engine=innodb;
create table t1(f1 int not null)engine=innodb stats_persistent=0;
insert into t1 values(1), (2), (3);
let $resultlog=$MYSQLTEST_VARDIR/tmp/result.log;

View File

@@ -1,6 +1,9 @@
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
--echo # Bug #12429576 - Test an assertion failure on purge.
CREATE TABLE t1_purge (
A int,
@@ -110,4 +113,6 @@ SHOW CREATE TABLE t12963823;
# We need to activate the purge thread before DROP TABLE.
-- source include/wait_all_purged.inc
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge, t12637786, t12963823;

View File

@@ -1,6 +1,9 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
--disable_query_log
call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
--enable_query_log
@@ -170,3 +173,7 @@ UNLOCK TABLES;
DROP TABLE t1;
--echo # End of 10.3 tests
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
--echo # End of 10.6 tests

View File

@@ -39,6 +39,8 @@ SELECT * FROM t;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
SET GLOBAL innodb_max_purge_lag_wait=0;
INSERT INTO mysql.innodb_index_stats
SELECT * FROM mysql.innodb_index_stats LIMIT 0;
--let $restart_parameters=
--source include/restart_mysqld.inc
SELECT * FROM t;

View File

@@ -1,2 +1,4 @@
--innodb-checksum-algorithm=crc32
--innodb-undo-tablespaces=0
--skip-innodb-fast-shutdown
--skip-innodb-buffer-pool-dump-at-shutdown

View File

@@ -10,7 +10,7 @@ SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=2;
let $MYSQLD_DATADIR=`select @@datadir`;
CREATE TABLE t1(f1 INT AUTO_INCREMENT PRIMARY KEY,
f2 VARCHAR(256) GENERATED ALWAYS as('repairman'),
INDEX idx(f2))ENGINE= InnoDB;
INDEX idx(f2))ENGINE= InnoDB STATS_PERSISTENT=0;
INSERT INTO t1(f1) SELECT seq FROM seq_1_to_50;
FLUSH TABLE t1 FOR EXPORT;
let SEARCH_PATTERN= repairman;

View File

@@ -1,2 +1,3 @@
--innodb-checksum-algorithm=crc32
--innodb-undo-tablespaces=0
--skip-innodb-buffer-pool-dump-at-shutdown

View File

@@ -156,7 +156,9 @@ SHOW CREATE TABLE tr;
SHOW CREATE TABLE tc;
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM tc;
--error ER_GET_ERRNO
SHOW CREATE TABLE td;
--error ER_GET_ERRNO
SELECT * FROM td;
# This table was converted to NO_ROLLBACK due to the SYS_TABLES.TYPE change.
SHOW CREATE TABLE tz;

View File

@@ -4,7 +4,7 @@
--source include/not_embedded.inc
FLUSH TABLES;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 VALUES (1),(2);
connect (wait,localhost,root,,test);

View File

@@ -8,7 +8,7 @@
let PAGE_SIZE=`select @@innodb_page_size`;
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
CREATE TABLE t1(a INT) row_format=redundant engine=innoDB stats_persistent=0;
INSERT INTO t1 VALUES(1);
let MYSQLD_DATADIR=`select @@datadir`;

View File

@@ -1,5 +1,8 @@
--source include/have_innodb.inc
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
SET innodb_strict_mode=OFF;
CREATE TABLE test_tab (
a_str_18 mediumtext,
@@ -151,3 +154,5 @@ ROLLBACK;
--source include/wait_all_purged.inc
DROP TABLE t1;
DROP TABLE t2;
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;

View File

@@ -1,2 +1,3 @@
--innodb_undo_tablespaces=3
--innodb_sys_tablespaces
--innodb-stats-persistent=0