summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-11-21 10:32:08 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-11-21 10:32:08 +0200
commitbebe193979405b28b15af008621248ed117e54a4 (patch)
tree4947916c6c2afed02dc14494e8990d293c2c816d /mysql-test/suite
parentbb894f2376bff6ada36a3f627d4b1bf27ee9ca2a (diff)
parentb35a048ece4f5dd7c6757d86a303f27187a16117 (diff)
downloadmariadb-git-bebe193979405b28b15af008621248ed117e54a4.tar.gz
Merge 10.9 into 10.10
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result1
-rw-r--r--mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result1
-rw-r--r--mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test1
-rw-r--r--mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test1
-rw-r--r--mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test1
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package.result75
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-package.test72
-rw-r--r--mysql-test/suite/encryption/t/innochecksum.test14
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.result45
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.test59
-rw-r--r--mysql-test/suite/innodb/r/innodb-fkcheck.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb.result12
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty,32k.rdiff9
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty,64k.rdiff9
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty.result31
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty_notembedded.result30
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_crash.result16
-rw-r--r--mysql-test/suite/innodb/r/temporary_table.result12
-rw-r--r--mysql-test/suite/innodb/r/truncate_foreign.result10
-rw-r--r--mysql-test/suite/innodb/t/alter_dml_apply.test1
-rw-r--r--mysql-test/suite/innodb/t/import_corrupted.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-fkcheck.test13
-rw-r--r--mysql-test/suite/innodb/t/innodb.test12
-rw-r--r--mysql-test/suite/innodb/t/innodb_scrub.test1
-rw-r--r--mysql-test/suite/innodb/t/insert_into_empty.test39
-rw-r--r--mysql-test/suite/innodb/t/insert_into_empty_notembedded.test43
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_crash.test19
-rw-r--r--mysql-test/suite/innodb/t/log_file_size_online.test1
-rw-r--r--mysql-test/suite/innodb/t/temporary_table.test11
-rw-r--r--mysql-test/suite/innodb/t/truncate_foreign.test11
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug.result1
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug.test1
-rw-r--r--mysql-test/suite/innodb_gis/r/alter_spatial_index.result10
-rw-r--r--mysql-test/suite/innodb_gis/t/alter_spatial_index.test12
-rw-r--r--mysql-test/suite/innodb_zip/disabled.def1
-rw-r--r--mysql-test/suite/maria/rollback.result1
-rw-r--r--mysql-test/suite/maria/rollback.test2
-rw-r--r--mysql-test/suite/mariabackup/big_innodb_log.test1
-rw-r--r--mysql-test/suite/mariabackup/defer_space.result3
-rw-r--r--mysql-test/suite/mariabackup/defer_space.test19
-rw-r--r--mysql-test/suite/mariabackup/full_backup.opt1
-rw-r--r--mysql-test/suite/mariabackup/full_backup.result15
-rw-r--r--mysql-test/suite/mariabackup/full_backup.test24
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test1
-rw-r--r--mysql-test/suite/mariabackup/innodb_redo_overwrite.test1
-rw-r--r--mysql-test/suite/mariabackup/mdev-14447.combinations5
-rw-r--r--mysql-test/suite/plugins/r/test_sql_service.result1
-rw-r--r--mysql-test/suite/plugins/t/test_sql_service.test2
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test1
-rw-r--r--mysql-test/suite/versioning/r/partition.result23
-rw-r--r--mysql-test/suite/versioning/t/partition.test22
54 files changed, 671 insertions, 39 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result b/mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result
index 589570d8300..b11484367b8 100644
--- a/mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result
+++ b/mysql-test/suite/binlog/r/binlog_empty_xa_prepared.result
@@ -1,3 +1,4 @@
+RESET MASTER;
CREATE TEMPORARY SEQUENCE seq_1;
XA START '3';
CREATE TEMPORARY TABLE tmp_1(c INT);
diff --git a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result
index 789bc6cd178..7514380b715 100644
--- a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result
+++ b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_binary.result
@@ -1,3 +1,4 @@
+RESET MASTER;
#
# Verify that SET string values and character sets can be printed correctly
#
diff --git a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result
index 1b1d2a79725..a889a2fa82e 100644
--- a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result
+++ b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_ucs2.result
@@ -1,3 +1,4 @@
+RESET MASTER;
#
# Verify that SET string values and character sets can be printed correctly
#
diff --git a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result
index 6fdda842bac..e44d0a275d7 100644
--- a/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result
+++ b/mysql-test/suite/binlog/r/binlog_table_map_optional_metadata_utf32.result
@@ -1,3 +1,4 @@
+RESET MASTER;
#
# Verify that SET string values and character sets can be printed correctly
#
diff --git a/mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test b/mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test
index 2890c42a087..b127178ebf7 100644
--- a/mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test
+++ b/mysql-test/suite/binlog/t/binlog_empty_xa_prepared.test
@@ -4,7 +4,7 @@
--source include/have_binlog_format_mixed.inc
--source include/have_innodb.inc
-
+RESET MASTER; # clear binlogs
# MDEV-22420 DDL on temporary object is prohibited when XA is in prepare state
# Temporary sequnce may not be created within a transaction
diff --git a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test
index 5997cfd5d27..29e10ede98a 100644
--- a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test
+++ b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_binary.test
@@ -20,6 +20,7 @@
--let $MYSQLD_DATADIR= `select @@datadir`
--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
+RESET MASTER;
--echo #
--echo # Verify that SET string values and character sets can be printed correctly
--echo #
diff --git a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test
index 1e218acdfea..8c9e22421b6 100644
--- a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test
+++ b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_ucs2.test
@@ -21,6 +21,7 @@
--let $MYSQLD_DATADIR= `select @@datadir`
--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
+RESET MASTER;
--echo #
--echo # Verify that SET string values and character sets can be printed correctly
--echo #
diff --git a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test
index c1d449abf2f..094de058028 100644
--- a/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test
+++ b/mysql-test/suite/binlog/t/binlog_table_map_optional_metadata_utf32.test
@@ -21,6 +21,7 @@
--let $MYSQLD_DATADIR= `select @@datadir`
--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
+RESET MASTER;
--echo #
--echo # Verify that SET string values and character sets can be printed correctly
--echo #
diff --git a/mysql-test/suite/compat/oracle/r/sp-package.result b/mysql-test/suite/compat/oracle/r/sp-package.result
index daa244a3c5a..ef0acea5da1 100644
--- a/mysql-test/suite/compat/oracle/r/sp-package.result
+++ b/mysql-test/suite/compat/oracle/r/sp-package.result
@@ -3268,3 +3268,78 @@ a
This is db1.pkg1.p1
DROP DATABASE db1;
DROP DATABASE db2;
+#
+# MDEV-29370 Functions in packages are slow and seems to ignore deterministic
+#
+SET SQL_MODE=ORACLE;
+CREATE TABLE t1 (c1 CHAR(1));
+CREATE FUNCTION f1_deterministic()
+RETURN CHAR(1)
+DETERMINISTIC
+IS
+BEGIN
+RETURN 'X';
+END;
+//
+CREATE FUNCTION f2_not_deterministic()
+RETURN CHAR(1)
+IS
+BEGIN
+RETURN 'X';
+END;
+//
+CREATE PACKAGE pkg1
+IS
+PROCEDURE t1_populate(numrows INTEGER);
+FUNCTION f3_deterministic() RETURN CHAR(1) DETERMINISTIC;
+FUNCTION f4_not_deterministic() RETURN CHAR(1);
+END;
+//
+CREATE PACKAGE BODY pkg1
+IS
+PROCEDURE t1_populate(numrounds INTEGER)
+IS
+i INTEGER;
+BEGIN
+INSERT INTO t1 VALUES('Y');
+FOR i IN 1..numrounds LOOP
+INSERT INTO t1 SELECT * FROM t1;
+END LOOP;
+END;
+FUNCTION f3_deterministic() RETURN CHAR(1) DETERMINISTIC COMMENT 'xxx'
+ IS
+BEGIN
+RETURN 'X';
+END;
+FUNCTION f4_not_deterministic() RETURN CHAR(1)
+IS
+BEGIN
+RETURN 'X';
+END;
+END;
+//
+CALL pkg1.t1_populate(3);
+EXPLAIN EXTENDED SELECT 'Deterministic function', COUNT(*) FROM t1 WHERE c1 = f1_deterministic();
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where
+Warnings:
+Note 1003 select 'Deterministic function' AS "Deterministic function",count(0) AS "COUNT(*)" from "test"."t1" where "test"."t1"."c1" = <cache>("f1_deterministic"())
+EXPLAIN EXTENDED SELECT 'Non-deterministic function', COUNT(*) FROM t1 WHERE c1 = f2_not_deterministic();
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where
+Warnings:
+Note 1003 select 'Non-deterministic function' AS "Non-deterministic function",count(0) AS "COUNT(*)" from "test"."t1" where "test"."t1"."c1" = "f2_not_deterministic"()
+EXPLAIN EXTENDED SELECT 'Deterministic package function', COUNT(*) FROM t1 WHERE c1 = pkg1.f3_deterministic();
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where
+Warnings:
+Note 1003 select 'Deterministic package function' AS "Deterministic package function",count(0) AS "COUNT(*)" from "test"."t1" where "test"."t1"."c1" = <cache>("test"."pkg1"."f3_deterministic"())
+EXPLAIN EXTENDED SELECT 'Non-deterministic package function', COUNT(*) FROM t1 WHERE c1 = pkg1.f4_not_deterministic();
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where
+Warnings:
+Note 1003 select 'Non-deterministic package function' AS "Non-deterministic package function",count(0) AS "COUNT(*)" from "test"."t1" where "test"."t1"."c1" = "test"."pkg1"."f4_not_deterministic"()
+DROP TABLE t1;
+DROP FUNCTION f1_deterministic;
+DROP FUNCTION f2_not_deterministic;
+DROP PACKAGE pkg1;
diff --git a/mysql-test/suite/compat/oracle/t/sp-package.test b/mysql-test/suite/compat/oracle/t/sp-package.test
index 615ce51e195..0092c869d50 100644
--- a/mysql-test/suite/compat/oracle/t/sp-package.test
+++ b/mysql-test/suite/compat/oracle/t/sp-package.test
@@ -3016,3 +3016,75 @@ CALL db2.pkg1.p2_db1_pkg1_p1;
DROP DATABASE db1;
DROP DATABASE db2;
+
+
+--echo #
+--echo # MDEV-29370 Functions in packages are slow and seems to ignore deterministic
+--echo #
+
+SET SQL_MODE=ORACLE;
+
+CREATE TABLE t1 (c1 CHAR(1));
+
+DELIMITER //;
+CREATE FUNCTION f1_deterministic()
+RETURN CHAR(1)
+DETERMINISTIC
+IS
+BEGIN
+ RETURN 'X';
+END;
+//
+
+CREATE FUNCTION f2_not_deterministic()
+RETURN CHAR(1)
+IS
+BEGIN
+ RETURN 'X';
+END;
+//
+
+CREATE PACKAGE pkg1
+IS
+ PROCEDURE t1_populate(numrows INTEGER);
+ FUNCTION f3_deterministic() RETURN CHAR(1) DETERMINISTIC;
+ FUNCTION f4_not_deterministic() RETURN CHAR(1);
+END;
+//
+
+CREATE PACKAGE BODY pkg1
+IS
+ PROCEDURE t1_populate(numrounds INTEGER)
+ IS
+ i INTEGER;
+ BEGIN
+ INSERT INTO t1 VALUES('Y');
+ FOR i IN 1..numrounds LOOP
+ INSERT INTO t1 SELECT * FROM t1;
+ END LOOP;
+ END;
+ FUNCTION f3_deterministic() RETURN CHAR(1) DETERMINISTIC COMMENT 'xxx'
+ IS
+ BEGIN
+ RETURN 'X';
+ END;
+ FUNCTION f4_not_deterministic() RETURN CHAR(1)
+ IS
+ BEGIN
+ RETURN 'X';
+ END;
+END;
+//
+DELIMITER ;//
+
+CALL pkg1.t1_populate(3);
+
+EXPLAIN EXTENDED SELECT 'Deterministic function', COUNT(*) FROM t1 WHERE c1 = f1_deterministic();
+EXPLAIN EXTENDED SELECT 'Non-deterministic function', COUNT(*) FROM t1 WHERE c1 = f2_not_deterministic();
+EXPLAIN EXTENDED SELECT 'Deterministic package function', COUNT(*) FROM t1 WHERE c1 = pkg1.f3_deterministic();
+EXPLAIN EXTENDED SELECT 'Non-deterministic package function', COUNT(*) FROM t1 WHERE c1 = pkg1.f4_not_deterministic();
+
+DROP TABLE t1;
+DROP FUNCTION f1_deterministic;
+DROP FUNCTION f2_not_deterministic;
+DROP PACKAGE pkg1;
diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test
index 59d90fbb3d7..516bc0733d9 100644
--- a/mysql-test/suite/encryption/t/innochecksum.test
+++ b/mysql-test/suite/encryption/t/innochecksum.test
@@ -9,6 +9,7 @@
-- source include/have_file_key_management_plugin.inc
-- source include/innodb_page_size_small.inc
-- source include/innodb_checksum_algorithm.inc
+-- source include/maybe_debug.inc
if (!$INNOCHECKSUM) {
--echo Need innochecksum binary
@@ -18,6 +19,10 @@ if (!$INNOCHECKSUM) {
--disable_query_log
# This may be triggered on a slow system or one that lacks native AIO.
call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations");
+if ($have_debug) {
+SET GLOBAL DEBUG_DBUG='+d,ib_log_checkpoint_avoid_hard';
+call mtr.add_suppression("InnoDB: Crash recovery is broken due to insufficient innodb_log_file_size");
+}
--enable_query_log
let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`;
@@ -259,6 +264,15 @@ print FILE pack("H*", "c00lcafedeadb017");
close FILE or die "close";
EOF
+if (0 && $have_debug) { # these messages sometimes fail to appear
+--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN= InnoDB: Crash recovery is broken due to insufficient innodb_log_file_size; last checkpoint LSN=\\d+, current LSN=\\d+\\. Shutdown is in progress\\..*InnoDB: Crash recovery was broken.*
+--echo # FOUND 1 is expected for both.
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN= InnoDB: Crash recovery was broken
+--source include/search_pattern_in_file.inc
+}
+
-- disable_result_log
--error 1
--exec $INNOCHECKSUM $t1_IBD
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.result b/mysql-test/suite/federated/federatedx_create_handlers.result
index 0bec01ab30b..55756329ff3 100644
--- a/mysql-test/suite/federated/federatedx_create_handlers.result
+++ b/mysql-test/suite/federated/federatedx_create_handlers.result
@@ -489,6 +489,51 @@ a
1
2
3
+#
+# MDEV-29655: ASAN heap-use-after-free in
+# Pushdown_derived::Pushdown_derived
+#
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+CREATE TABLE federated.t1 (
+id int(20) NOT NULL,
+name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+INSERT INTO federated.t1 VALUES
+(3,'xxx'), (7,'yyy'), (4,'xxx'), (1,'zzz'), (5,'yyy');
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+CREATE TABLE federated.t1 (
+id int(20) NOT NULL,
+name varchar(16) NOT NULL default ''
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
+use federated;
+SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+WHERE id=2) dt2) dt;
+id name
+connection slave;
+CREATE TABLE federated.t10 (a INT,b INT);
+CREATE TABLE federated.t11 (a INT, b INT);
+INSERT INTO federated.t10 VALUES (1,1),(2,2);
+INSERT INTO federated.t11 VALUES (1,1),(2,2);
+connection master;
+CREATE TABLE federated.t10
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t10';
+CREATE TABLE federated.t11
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t11';
+use federated;
+SELECT * FROM t10 LEFT JOIN
+(t11, (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+WHERE id=2) dt2) dt
+) ON t10.a=t11.a;
+a b a b id name
+1 1 NULL NULL NULL NULL
+2 2 NULL NULL NULL NULL
set global federated_pushdown=0;
connection master;
DROP TABLE IF EXISTS federated.t1;
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.test b/mysql-test/suite/federated/federatedx_create_handlers.test
index 2d6c2bc4197..f827c141f3d 100644
--- a/mysql-test/suite/federated/federatedx_create_handlers.test
+++ b/mysql-test/suite/federated/federatedx_create_handlers.test
@@ -267,7 +267,6 @@ INSERT INTO federated.t2
SELECT * FROM (SELECT * FROM federated.t1 LIMIT 70000) dt;
SELECT COUNT(DISTINCT a) FROM federated.t2;
-
--echo #
--echo # MDEV-29640 FederatedX does not properly handle pushdown
--echo # in case of difference in local and remote table names
@@ -314,6 +313,64 @@ CREATE TABLE federated.t3 (a INT)
EXPLAIN SELECT * FROM federated.t3;
SELECT * FROM federated.t3;
+--echo #
+--echo # MDEV-29655: ASAN heap-use-after-free in
+--echo # Pushdown_derived::Pushdown_derived
+--echo #
+
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+
+CREATE TABLE federated.t1 (
+ id int(20) NOT NULL,
+ name varchar(16) NOT NULL default ''
+)
+DEFAULT CHARSET=latin1;
+
+INSERT INTO federated.t1 VALUES
+ (3,'xxx'), (7,'yyy'), (4,'xxx'), (1,'zzz'), (5,'yyy');
+
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval
+CREATE TABLE federated.t1 (
+ id int(20) NOT NULL,
+ name varchar(16) NOT NULL default ''
+)
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
+
+use federated;
+SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+ WHERE id=2) dt2) dt;
+
+connection slave;
+CREATE TABLE federated.t10 (a INT,b INT);
+CREATE TABLE federated.t11 (a INT, b INT);
+INSERT INTO federated.t10 VALUES (1,1),(2,2);
+INSERT INTO federated.t11 VALUES (1,1),(2,2);
+
+connection master;
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval
+CREATE TABLE federated.t10
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t10';
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval
+CREATE TABLE federated.t11
+ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t11';
+
+use federated;
+SELECT * FROM t10 LEFT JOIN
+ (t11, (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+ WHERE id=2) dt2) dt
+ ) ON t10.a=t11.a;
+
set global federated_pushdown=0;
source include/federated_cleanup.inc;
diff --git a/mysql-test/suite/innodb/r/innodb-fkcheck.result b/mysql-test/suite/innodb/r/innodb-fkcheck.result
index 2c2be83a3ff..f86ba50597f 100644
--- a/mysql-test/suite/innodb/r/innodb-fkcheck.result
+++ b/mysql-test/suite/innodb/r/innodb-fkcheck.result
@@ -33,11 +33,19 @@ b bigint unsigned NOT NULL,
d1 date NOT NULL,
PRIMARY KEY (b,d1)
) ENGINE=InnoDB;
+DROP TABLE b;
+set foreign_key_checks = 1;
+CREATE TABLE b (
+b bigint unsigned NOT NULL,
+d1 date NOT NULL,
+PRIMARY KEY (b,d1)
+) ENGINE=InnoDB;
ERROR HY000: Can't create table `bug_fk`.`b` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Error 1005 Can't create table `bug_fk`.`b` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `b`
+set foreign_key_checks = 0;
DROP TABLE IF EXISTS d;
Warnings:
Note 1051 Unknown table 'bug_fk.d'
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index 0d3034d91d8..742a822baa0 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -2522,9 +2522,19 @@ disconnect b;
set foreign_key_checks=0;
create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
-ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
set foreign_key_checks=1;
+insert into t2 values (1,1);
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
+set foreign_key_checks=0;
+drop table t1;
+set foreign_key_checks=1;
+insert into t2 values (1,1);
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
+create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
+ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
drop table t2;
+create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
+drop table t1;
set foreign_key_checks=0;
create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
diff --git a/mysql-test/suite/innodb/r/insert_into_empty,32k.rdiff b/mysql-test/suite/innodb/r/insert_into_empty,32k.rdiff
new file mode 100644
index 00000000000..9d40decbb30
--- /dev/null
+++ b/mysql-test/suite/innodb/r/insert_into_empty,32k.rdiff
@@ -0,0 +1,9 @@
+@@ -377,8 +377,6 @@
+ c09 text, c10 text, c11 text, c12 text) ENGINE=InnoDB;
+ SET GLOBAL INNODB_DEFAULT_ROW_FORMAT= COMPACT;
+ ALTER TABLE t1 FORCE;
+-Warnings:
+-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+ INSERT IGNORE INTO t1 VALUES
+ (1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)),
+ (2, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107));
diff --git a/mysql-test/suite/innodb/r/insert_into_empty,64k.rdiff b/mysql-test/suite/innodb/r/insert_into_empty,64k.rdiff
new file mode 100644
index 00000000000..9d40decbb30
--- /dev/null
+++ b/mysql-test/suite/innodb/r/insert_into_empty,64k.rdiff
@@ -0,0 +1,9 @@
+@@ -377,8 +377,6 @@
+ c09 text, c10 text, c11 text, c12 text) ENGINE=InnoDB;
+ SET GLOBAL INNODB_DEFAULT_ROW_FORMAT= COMPACT;
+ ALTER TABLE t1 FORCE;
+-Warnings:
+-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+ INSERT IGNORE INTO t1 VALUES
+ (1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)),
+ (2, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107));
diff --git a/mysql-test/suite/innodb/r/insert_into_empty.result b/mysql-test/suite/innodb/r/insert_into_empty.result
index 55828ae0a4f..dd4451deaa2 100644
--- a/mysql-test/suite/innodb/r/insert_into_empty.result
+++ b/mysql-test/suite/innodb/r/insert_into_empty.result
@@ -186,13 +186,33 @@ DROP TABLE t;
# MDEV-28327 InnoDB persistent statistics fail to update
# after bulk insert
#
-CREATE TABLE t1 (a INT PRIMARY KEY)ENGINE=InnoDB;
+CREATE TABLE t1 (a INT PRIMARY KEY)ENGINE=InnoDB
+STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
INSERT INTO t1 SELECT * FROM seq_1_to_4096;
# Wait till statistics update after bulk insert operation
-SELECT n_rows FROM mysql.innodb_table_stats WHERE TABLE_NAME="t1";
-n_rows
-4096
+SELECT n_rows>=4000 FROM mysql.innodb_table_stats WHERE TABLE_NAME="t1";
+n_rows>=4000
+1
+DROP TABLE t1;
+#
+# MDEV-27214 Import with disabled keys corrupts meta-data like rows, indexes, ...
+#
+SET UNIQUE_CHECKS=0;
+SET FOREIGN_KEY_CHECKS=0;
+CREATE TABLE `t1` (
+`id` int(11) NOT NULL,
+`a` int(11) DEFAULT NULL,
+PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
+INSERT INTO `t1` VALUES (1,2),(2,3),(3,4);
+# Wait till statistics update after bulk insert operation
+SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
+TABLE_ROWS AVG_ROW_LENGTH>0
+3 1
DROP TABLE t1;
+# End of 10.6 tests
#
# MDEV-26947 UNIQUE column checks fail in InnoDB resulting
# in table corruption
@@ -350,7 +370,7 @@ DROP TABLE t1, t2;
# MDEV-29801 Inconsistent ER_TOO_BIG_ROWSIZE during bulk
# insert operation
#
-call mtr.add_suppression("InnoDB: Cannot add field `c11` in table");
+call mtr.add_suppression("InnoDB: Cannot add field `(c0[36]|c11)` in table");
SET @format= @@innodb_default_row_format;
CREATE TABLE t1 (pk int primary key, c01 text, c02 text, c03 text,
c04 text, c05 text, c06 text, c07 text, c08 text,
@@ -367,3 +387,4 @@ Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT= @format;
+# End of 10.7 tests
diff --git a/mysql-test/suite/innodb/r/insert_into_empty_notembedded.result b/mysql-test/suite/innodb/r/insert_into_empty_notembedded.result
new file mode 100644
index 00000000000..5305b2e7a85
--- /dev/null
+++ b/mysql-test/suite/innodb/r/insert_into_empty_notembedded.result
@@ -0,0 +1,30 @@
+#
+# Start of 10.6 tests
+#
+#
+# MDEV-27214 Import with disabled keys corrupts meta-data like rows, indexes, ...
+#
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (id int, a int,PRIMARY KEY (id)) ENGINE=InnoDB
+STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
+INSERT INTO db1.t1 VALUES (1,2),(2,3),(3,4);
+DROP DATABASE IF EXISTS db1;
+CREATE DATABASE db1;
+# Wait till statistics update after bulk insert operation
+SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='db1';
+TABLE_ROWS AVG_ROW_LENGTH>0
+3 1
+OPTIMIZE TABLE db1.t1;
+Table Op Msg_type Msg_text
+db1.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+db1.t1 optimize status OK
+# Wait till statistics update after bulk insert operation
+SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='db1';
+TABLE_ROWS AVG_ROW_LENGTH>0
+3 1
+DROP DATABASE db1;
+#
+# End of 10.6 tests
+#
diff --git a/mysql-test/suite/innodb/r/instant_alter_crash.result b/mysql-test/suite/innodb/r/instant_alter_crash.result
index 843f33fddd1..f0fedcc7673 100644
--- a/mysql-test/suite/innodb/r/instant_alter_crash.result
+++ b/mysql-test/suite/innodb/r/instant_alter_crash.result
@@ -34,13 +34,15 @@ ROLLBACK;
InnoDB 0 transactions not purged
INSERT INTO t2 VALUES
(16,1551,'Omnium enim rerum'),(128,1571,' principia parva sunt');
+BEGIN;
+UPDATE t1 SET c2=c2+1;
connect ddl, localhost, root;
SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere';
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-UPDATE t1 SET c2=c2+1;
+COMMIT;
# Kill the server
disconnect ddl;
# restart
@@ -61,6 +63,8 @@ DELETE FROM t2;
ROLLBACK;
InnoDB 0 transactions not purged
INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum');
+BEGIN;
+DELETE FROM t1;
connect ddl, localhost, root;
ALTER TABLE t2 DROP COLUMN c3;
SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
@@ -68,7 +72,7 @@ ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum');
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-DELETE FROM t1;
+COMMIT;
# Kill the server
disconnect ddl;
# restart
@@ -138,6 +142,8 @@ InnoDB 0 transactions not purged
#
# MDEV-24323 Crash on recovery after kill during instant ADD COLUMN
#
+BEGIN;
+INSERT INTO t1 VALUES(0,0);
connect ddl, localhost, root;
CREATE TABLE t3(id INT PRIMARY KEY, c2 INT, v2 INT AS(c2) VIRTUAL, UNIQUE(v2))
ENGINE=InnoDB;
@@ -147,7 +153,7 @@ ALTER TABLE t3 ADD COLUMN c3 TEXT NOT NULL DEFAULT 'sic transit gloria mundi';
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-INSERT INTO t1 VALUES(0,0);
+COMMIT;
# Kill the server
disconnect ddl;
# restart
@@ -183,13 +189,15 @@ DROP TABLE t2,t3;
#
CREATE TABLE t2(a INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6);
+BEGIN;
+DELETE FROM t1;
connect ddl, localhost, root;
SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
ALTER TABLE t2 ADD COLUMN b TINYINT UNSIGNED NOT NULL DEFAULT 42 FIRST;
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-DELETE FROM t1;
+COMMIT;
# Kill the server
disconnect ddl;
# restart
diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result
index a8a073cb257..ffcee726f0d 100644
--- a/mysql-test/suite/innodb/r/temporary_table.result
+++ b/mysql-test/suite/innodb/r/temporary_table.result
@@ -789,4 +789,16 @@ CHECK TABLE t EXTENDED;
Table Op Msg_type Msg_text
test.t check status OK
DROP TEMPORARY TABLE t;
+#
+# MDEV-29978 Corruption errors upon CHECK on temporary InnoDB table
+#
+CREATE TEMPORARY TABLE t (f INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t (f) VALUES (1),(2);
+CHECK TABLE t;
+Table Op Msg_type Msg_text
+test.t check status OK
+CHECK TABLE t EXTENDED;
+Table Op Msg_type Msg_text
+test.t check status OK
+DROP TEMPORARY TABLE t;
# End of 10.6 tests
diff --git a/mysql-test/suite/innodb/r/truncate_foreign.result b/mysql-test/suite/innodb/r/truncate_foreign.result
index 3154674aabf..e587baa5288 100644
--- a/mysql-test/suite/innodb/r/truncate_foreign.result
+++ b/mysql-test/suite/innodb/r/truncate_foreign.result
@@ -80,9 +80,19 @@ SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (a), ALGORITHM=COPY;
INSERT INTO t1 VALUES (1,1);
LOCK TABLES t1 WRITE;
+SET FOREIGN_KEY_CHECKS=1;
TRUNCATE t1;
ERROR HY000: Cannot add foreign key constraint for `t1`
INSERT INTO t1 VALUES (2,2);
+ERROR HY000: Table 't1' was not locked with LOCK TABLES
+SELECT * FROM t1;
+pk a
+1 1
+UNLOCK TABLES;
+INSERT INTO t1 VALUES (2,2);
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
+SET FOREIGN_KEY_CHECKS=0;
+INSERT INTO t1 VALUES (2,2);
SELECT * FROM t1;
pk a
1 1
diff --git a/mysql-test/suite/innodb/t/alter_dml_apply.test b/mysql-test/suite/innodb/t/alter_dml_apply.test
index 01bfe458f1a..ac0455902fd 100644
--- a/mysql-test/suite/innodb/t/alter_dml_apply.test
+++ b/mysql-test/suite/innodb/t/alter_dml_apply.test
@@ -2,6 +2,7 @@
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_sequence.inc
+--source include/no_valgrind_without_big.inc
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
f3 CHAR(200), f4 CHAR(200),
diff --git a/mysql-test/suite/innodb/t/import_corrupted.test b/mysql-test/suite/innodb/t/import_corrupted.test
index 57c8c6dd9be..bc2ee341fe2 100644
--- a/mysql-test/suite/innodb/t/import_corrupted.test
+++ b/mysql-test/suite/innodb/t/import_corrupted.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/no_valgrind_without_big.inc
call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes");
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
diff --git a/mysql-test/suite/innodb/t/innodb-fkcheck.test b/mysql-test/suite/innodb/t/innodb-fkcheck.test
index 4657edc4d65..5ff3533fce1 100644
--- a/mysql-test/suite/innodb/t/innodb-fkcheck.test
+++ b/mysql-test/suite/innodb/t/innodb-fkcheck.test
@@ -46,7 +46,15 @@ show create table c;
#
# Note that column b has different type in parent table
#
---error 1005
+CREATE TABLE b (
+ b bigint unsigned NOT NULL,
+ d1 date NOT NULL,
+ PRIMARY KEY (b,d1)
+) ENGINE=InnoDB;
+DROP TABLE b;
+
+set foreign_key_checks = 1;
+--error ER_CANT_CREATE_TABLE
CREATE TABLE b (
b bigint unsigned NOT NULL,
d1 date NOT NULL,
@@ -54,6 +62,7 @@ CREATE TABLE b (
) ENGINE=InnoDB;
show warnings;
+set foreign_key_checks = 0;
DROP TABLE IF EXISTS d;
@@ -64,7 +73,7 @@ CREATE TABLE d (
CONSTRAINT bd_fk FOREIGN KEY (b) REFERENCES b (b)
) ENGINE=InnoDB;
-show warnings;
+show warnings;
set foreign_key_checks = 1;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 3df24735860..58e9899bd40 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -1592,12 +1592,22 @@ disconnect b;
set foreign_key_checks=0;
create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
+create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
+set foreign_key_checks=1;
+--error ER_NO_REFERENCED_ROW_2
+insert into t2 values (1,1);
+set foreign_key_checks=0;
+drop table t1;
+set foreign_key_checks=1;
+--error ER_NO_REFERENCED_ROW_2
+insert into t2 values (1,1);
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
--error ER_CANT_CREATE_TABLE
create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
-set foreign_key_checks=1;
drop table t2;
+create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
+drop table t1;
# test that FKs between different charsets are not accepted in CREATE even
# when f_k_c is 0
diff --git a/mysql-test/suite/innodb/t/innodb_scrub.test b/mysql-test/suite/innodb/t/innodb_scrub.test
index 88b4e9cfd76..c7d06187e9f 100644
--- a/mysql-test/suite/innodb/t/innodb_scrub.test
+++ b/mysql-test/suite/innodb/t/innodb_scrub.test
@@ -1,4 +1,5 @@
-- source include/have_innodb.inc
+-- source include/no_valgrind_without_big.inc
let $MYSQLD_DATADIR=`select @@datadir`;
CREATE TABLE t1(f1 int auto_increment primary key,
diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
index df04a207476..fab1b882868 100644
--- a/mysql-test/suite/innodb/t/insert_into_empty.test
+++ b/mysql-test/suite/innodb/t/insert_into_empty.test
@@ -1,5 +1,5 @@
--source include/have_innodb.inc
-
+--source include/innodb_page_size.inc
--source include/have_sequence.inc
--source include/maybe_debug.inc
--source include/have_partition.inc
@@ -199,15 +199,43 @@ DROP TABLE t;
--echo # MDEV-28327 InnoDB persistent statistics fail to update
--echo # after bulk insert
--echo #
-CREATE TABLE t1 (a INT PRIMARY KEY)ENGINE=InnoDB;
+CREATE TABLE t1 (a INT PRIMARY KEY)ENGINE=InnoDB
+STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
INSERT INTO t1 SELECT * FROM seq_1_to_4096;
--echo # Wait till statistics update after bulk insert operation
let $wait_condition= select n_rows > 100 from mysql.innodb_table_stats
where table_name="t1";
source include/wait_condition.inc;
-SELECT n_rows FROM mysql.innodb_table_stats WHERE TABLE_NAME="t1";
+# At innodb_page_size=4k this will be only 4075, not 4096. Add some slack.
+# This is related to MDEV-24621 and possibly MDEV-26740.
+SELECT n_rows>=4000 FROM mysql.innodb_table_stats WHERE TABLE_NAME="t1";
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-27214 Import with disabled keys corrupts meta-data like rows, indexes, ...
+--echo #
+
+SET UNIQUE_CHECKS=0;
+SET FOREIGN_KEY_CHECKS=0;
+CREATE TABLE `t1` (
+ `id` int(11) NOT NULL,
+ `a` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
+INSERT INTO `t1` VALUES (1,2),(2,3),(3,4);
+--echo # Wait till statistics update after bulk insert operation
+let $wait_condition= select n_rows > 0 from mysql.innodb_table_stats
+where database_name='test' and table_name='t1';
+source include/wait_condition.inc;
+SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
DROP TABLE t1;
+
+--echo # End of 10.6 tests
+
--echo #
--echo # MDEV-26947 UNIQUE column checks fail in InnoDB resulting
--echo # in table corruption
@@ -361,13 +389,14 @@ DROP TABLE t1, t2;
--echo # MDEV-29801 Inconsistent ER_TOO_BIG_ROWSIZE during bulk
--echo # insert operation
--echo #
-call mtr.add_suppression("InnoDB: Cannot add field `c11` in table");
+call mtr.add_suppression("InnoDB: Cannot add field `(c0[36]|c11)` in table");
SET @format= @@innodb_default_row_format;
CREATE TABLE t1 (pk int primary key, c01 text, c02 text, c03 text,
c04 text, c05 text, c06 text, c07 text, c08 text,
c09 text, c10 text, c11 text, c12 text) ENGINE=InnoDB;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT= COMPACT;
+--replace_result 1982 8126 4030 8126
ALTER TABLE t1 FORCE;
INSERT IGNORE INTO t1 VALUES
(1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)),
@@ -375,3 +404,5 @@ INSERT IGNORE INTO t1 VALUES
CHECK TABLE t1;
DROP TABLE t1;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT= @format;
+
+--echo # End of 10.7 tests
diff --git a/mysql-test/suite/innodb/t/insert_into_empty_notembedded.test b/mysql-test/suite/innodb/t/insert_into_empty_notembedded.test
new file mode 100644
index 00000000000..267501133ea
--- /dev/null
+++ b/mysql-test/suite/innodb/t/insert_into_empty_notembedded.test
@@ -0,0 +1,43 @@
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/innodb_page_size.inc
+--source include/maybe_debug.inc
+
+--echo #
+--echo # Start of 10.6 tests
+--echo #
+
+--echo #
+--echo # MDEV-27214 Import with disabled keys corrupts meta-data like rows, indexes, ...
+--echo #
+
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (id int, a int,PRIMARY KEY (id)) ENGINE=InnoDB
+STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
+INSERT INTO db1.t1 VALUES (1,2),(2,3),(3,4);
+--let $file = $MYSQLTEST_VARDIR/tmp/dump.sql
+--exec $MYSQL_DUMP db1 t1 >$file
+DROP DATABASE IF EXISTS db1;
+
+CREATE DATABASE db1;
+--exec $MYSQL db1 < $file
+--remove_file $file
+--echo # Wait till statistics update after bulk insert operation
+let $wait_condition= select n_rows > 0 from mysql.innodb_table_stats
+where database_name='db1' and table_name='t1';
+source include/wait_condition.inc;
+SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='db1';
+
+OPTIMIZE TABLE db1.t1;
+--echo # Wait till statistics update after bulk insert operation
+let $wait_condition= select n_rows > 0 from mysql.innodb_table_stats
+where database_name='db1' and table_name='t1';
+source include/wait_condition.inc;
+SELECT TABLE_ROWS, AVG_ROW_LENGTH>0 FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='db1';
+DROP DATABASE db1;
+
+--echo #
+--echo # End of 10.6 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/instant_alter_crash.test b/mysql-test/suite/innodb/t/instant_alter_crash.test
index 4d211ece106..0bd983a2b4c 100644
--- a/mysql-test/suite/innodb/t/instant_alter_crash.test
+++ b/mysql-test/suite/innodb/t/instant_alter_crash.test
@@ -47,6 +47,9 @@ ROLLBACK;
INSERT INTO t2 VALUES
(16,1551,'Omnium enim rerum'),(128,1571,' principia parva sunt');
+BEGIN;
+UPDATE t1 SET c2=c2+1;
+
connect ddl, localhost, root;
SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
--send
@@ -55,7 +58,7 @@ ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere';
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-UPDATE t1 SET c2=c2+1;
+COMMIT;
--source include/kill_mysqld.inc
disconnect ddl;
@@ -73,6 +76,8 @@ ROLLBACK;
--source include/wait_all_purged.inc
INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum');
+BEGIN;
+DELETE FROM t1;
connect ddl, localhost, root;
ALTER TABLE t2 DROP COLUMN c3;
@@ -83,7 +88,7 @@ ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum');
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-DELETE FROM t1;
+COMMIT;
--source include/kill_mysqld.inc
disconnect ddl;
@@ -177,6 +182,9 @@ DELETE FROM t2;
--echo #
--echo # MDEV-24323 Crash on recovery after kill during instant ADD COLUMN
--echo #
+BEGIN;
+INSERT INTO t1 VALUES(0,0);
+
connect ddl, localhost, root;
CREATE TABLE t3(id INT PRIMARY KEY, c2 INT, v2 INT AS(c2) VIRTUAL, UNIQUE(v2))
ENGINE=InnoDB;
@@ -189,7 +197,7 @@ ALTER TABLE t3 ADD COLUMN c3 TEXT NOT NULL DEFAULT 'sic transit gloria mundi';
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-INSERT INTO t1 VALUES(0,0);
+COMMIT;
--source include/kill_mysqld.inc
disconnect ddl;
@@ -207,6 +215,9 @@ DROP TABLE t2,t3;
CREATE TABLE t2(a INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6);
+BEGIN;
+DELETE FROM t1;
+
connect ddl, localhost, root;
SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever';
--send
@@ -215,7 +226,7 @@ ALTER TABLE t2 ADD COLUMN b TINYINT UNSIGNED NOT NULL DEFAULT 42 FIRST;
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-DELETE FROM t1;
+COMMIT;
--source include/kill_mysqld.inc
disconnect ddl;
diff --git a/mysql-test/suite/innodb/t/log_file_size_online.test b/mysql-test/suite/innodb/t/log_file_size_online.test
index f3c559a60a9..65551f13dbc 100644
--- a/mysql-test/suite/innodb/t/log_file_size_online.test
+++ b/mysql-test/suite/innodb/t/log_file_size_online.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
--source include/have_sequence.inc
+--source include/no_valgrind_without_big.inc
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test
index 0cc3b29feb1..5d7e5d51696 100644
--- a/mysql-test/suite/innodb/t/temporary_table.test
+++ b/mysql-test/suite/innodb/t/temporary_table.test
@@ -624,4 +624,15 @@ UPDATE t SET a=2;
CHECK TABLE t;
CHECK TABLE t EXTENDED;
DROP TEMPORARY TABLE t;
+
+--echo #
+--echo # MDEV-29978 Corruption errors upon CHECK on temporary InnoDB table
+--echo #
+
+CREATE TEMPORARY TABLE t (f INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t (f) VALUES (1),(2);
+CHECK TABLE t;
+CHECK TABLE t EXTENDED;
+DROP TEMPORARY TABLE t;
+
--echo # End of 10.6 tests
diff --git a/mysql-test/suite/innodb/t/truncate_foreign.test b/mysql-test/suite/innodb/t/truncate_foreign.test
index e40029e18be..abbe1b3df87 100644
--- a/mysql-test/suite/innodb/t/truncate_foreign.test
+++ b/mysql-test/suite/innodb/t/truncate_foreign.test
@@ -92,8 +92,19 @@ SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (a), ALGORITHM=COPY;
INSERT INTO t1 VALUES (1,1);
LOCK TABLES t1 WRITE;
+SET FOREIGN_KEY_CHECKS=1;
--error ER_CANNOT_ADD_FOREIGN
TRUNCATE t1;
+# Whether TRUNCATE succeeds or fails, it will reload FOREIGN KEY constraints.
+# As a result, ha_innobase::referenced_by_foreign_key() will retun TRUE
+# (for the self-referential key), and the statement will fail.
+--error ER_TABLE_NOT_LOCKED
+INSERT INTO t1 VALUES (2,2);
+SELECT * FROM t1;
+UNLOCK TABLES;
+--error ER_NO_REFERENCED_ROW_2
+INSERT INTO t1 VALUES (2,2);
+SET FOREIGN_KEY_CHECKS=0;
INSERT INTO t1 VALUES (2,2);
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug.result b/mysql-test/suite/innodb_fts/r/misc_debug.result
index 18f715b9d95..11df7d89f0b 100644
--- a/mysql-test/suite/innodb_fts/r/misc_debug.result
+++ b/mysql-test/suite/innodb_fts/r/misc_debug.result
@@ -62,7 +62,6 @@ SET @saved_debug_dbug= @@debug_dbug;
CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
TRUNCATE t1;
-ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine InnoDB
SET debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
# End of 10.3 tests
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test
index c086348b631..9246d27a704 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug.test
@@ -91,7 +91,6 @@ SET @saved_debug_dbug= @@debug_dbug;
CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
---error ER_GET_ERRNO
TRUNCATE t1;
SET debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
index ac4a9c7b1c4..5365e7d0f8c 100644
--- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
@@ -795,4 +795,14 @@ ENGINE=InnoDB;
INSERT INTO t VALUES (REPEAT('MariaDB Corporation Ab ',351),POINT(0,0));
ALTER TABLE t FORCE;
DROP TABLE t;
+#
+# MDEV-29856 heap-use-after-poison in row_merge_spatial_rows()
+# with PRIMARY KEY on column prefix
+#
+CREATE TABLE t (id INT, f TEXT, s POINT NOT NULL,
+PRIMARY KEY(id,f(1)), SPATIAL(s)) ENGINE=InnoDB;
+INSERT INTO t VALUES
+(1,REPEAT('x',8192),@p:=ST_GeomFromText('POINT(0 0)')),(2,'',@p);
+ALTER TABLE t FORCE;
+DROP TABLE t;
# End of 10.3 tests
diff --git a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
index 88e10d07b99..6f30b38b6d4 100644
--- a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
+++ b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
@@ -791,4 +791,16 @@ ALTER TABLE t FORCE;
# Cleanup
DROP TABLE t;
+--echo #
+--echo # MDEV-29856 heap-use-after-poison in row_merge_spatial_rows()
+--echo # with PRIMARY KEY on column prefix
+--echo #
+
+CREATE TABLE t (id INT, f TEXT, s POINT NOT NULL,
+ PRIMARY KEY(id,f(1)), SPATIAL(s)) ENGINE=InnoDB;
+INSERT INTO t VALUES
+(1,REPEAT('x',8192),@p:=ST_GeomFromText('POINT(0 0)')),(2,'',@p);
+ALTER TABLE t FORCE;
+DROP TABLE t;
+
--echo # End of 10.3 tests
diff --git a/mysql-test/suite/innodb_zip/disabled.def b/mysql-test/suite/innodb_zip/disabled.def
deleted file mode 100644
index 8b137891791..00000000000
--- a/mysql-test/suite/innodb_zip/disabled.def
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/mysql-test/suite/maria/rollback.result b/mysql-test/suite/maria/rollback.result
index 959f596edf2..2e58387ce57 100644
--- a/mysql-test/suite/maria/rollback.result
+++ b/mysql-test/suite/maria/rollback.result
@@ -1,3 +1,4 @@
+reset master;
call mtr.add_suppression("Table was marked as crashed");
call mtr.add_suppression("Checking table: .*");
create table t1 (a int primary key auto_increment, b int) engine=aria transactional= 1;
diff --git a/mysql-test/suite/maria/rollback.test b/mysql-test/suite/maria/rollback.test
index 1469c26eaa2..d42be9274e6 100644
--- a/mysql-test/suite/maria/rollback.test
+++ b/mysql-test/suite/maria/rollback.test
@@ -3,6 +3,8 @@
# no-protocol doesn't print warnings about repaired tables
--source include/no_protocol.inc
+reset master; # clear binlogs
+
call mtr.add_suppression("Table was marked as crashed");
call mtr.add_suppression("Checking table: .*");
diff --git a/mysql-test/suite/mariabackup/big_innodb_log.test b/mysql-test/suite/mariabackup/big_innodb_log.test
index 23ac59c13eb..85d22a8227b 100644
--- a/mysql-test/suite/mariabackup/big_innodb_log.test
+++ b/mysql-test/suite/mariabackup/big_innodb_log.test
@@ -5,6 +5,7 @@
# recovery process with such numbers.
--source include/have_innodb.inc
--source include/have_debug.inc
+--source include/no_valgrind_without_big.inc
--let MYSQLD_DATADIR= `select @@datadir`
let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --tmpdir=$MYSQL_TMP_DIR --debug-dbug=+d,innodb_small_log_block_no_limit;
diff --git a/mysql-test/suite/mariabackup/defer_space.result b/mysql-test/suite/mariabackup/defer_space.result
index 41239c476e7..6453aff5502 100644
--- a/mysql-test/suite/mariabackup/defer_space.result
+++ b/mysql-test/suite/mariabackup/defer_space.result
@@ -1,6 +1,7 @@
call mtr.add_suppression("InnoDB: Expected tablespace id .*");
# Mariabackup --backup with page0 INIT_PAGE redo record
# and there is no FILE_CREATE for the tablespace t1
+SET @save_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG="+d,checkpoint_after_file_create";
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -14,7 +15,7 @@ SELECT * FROM t1;
f1
1
DROP TABLE t1;
-SET DEBUG_DBUG="-d,checkpoint_after_file_create";
+SET @@SESSION.DEBUG_DBUG= @save_debug;
# Mariabackup fails after corrupting the page0 in disk
# and there is no INIT_PAGE for page0
CREATE TABLE t1(c INT) ENGINE=INNODB;
diff --git a/mysql-test/suite/mariabackup/defer_space.test b/mysql-test/suite/mariabackup/defer_space.test
index 65f2262fd1d..397a1ff5dc2 100644
--- a/mysql-test/suite/mariabackup/defer_space.test
+++ b/mysql-test/suite/mariabackup/defer_space.test
@@ -1,10 +1,12 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_embedded.inc
+--source include/no_valgrind_without_big.inc
call mtr.add_suppression("InnoDB: Expected tablespace id .*");
--echo # Mariabackup --backup with page0 INIT_PAGE redo record
--echo # and there is no FILE_CREATE for the tablespace t1
+SET @save_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG="+d,checkpoint_after_file_create";
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -25,7 +27,7 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir;
SELECT * FROM t1;
DROP TABLE t1;
rmdir $targetdir;
-SET DEBUG_DBUG="-d,checkpoint_after_file_create";
+SET @@SESSION.DEBUG_DBUG= @save_debug;
--echo # Mariabackup fails after corrupting the page0 in disk
--echo # and there is no INIT_PAGE for page0
@@ -38,16 +40,13 @@ let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
--echo # Corrupt the table
perl;
-use strict;
-use warnings;
-use Fcntl qw(:DEFAULT :seek);
-my $page_size = $ENV{INNODB_PAGE_SIZE};
+my $ps = $ENV{INNODB_PAGE_SIZE};
-sysopen FILE, "$ENV{MYSQLD_DATADIR}/test/t1.ibd", O_RDWR
-|| die "Cannot open t1.ibd\n";
-sysseek(FILE, 0, SEEK_SET) || die "Cannot seek t1.ibd\n";
-my $page=chr(0) x $page_size;
-syswrite(FILE, $page, $page_size)==$page_size;
+my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd";
+open(FILE, "+<$file") || die "Unable to open $file";
+binmode FILE;
+seek (FILE, 0, SEEK_SET) or die "seek";
+print FILE chr(0x00) x $ps;
close FILE or die "close";
EOF
diff --git a/mysql-test/suite/mariabackup/full_backup.opt b/mysql-test/suite/mariabackup/full_backup.opt
new file mode 100644
index 00000000000..7928cd812d0
--- /dev/null
+++ b/mysql-test/suite/mariabackup/full_backup.opt
@@ -0,0 +1 @@
+--innodb_undo_tablespaces=2
diff --git a/mysql-test/suite/mariabackup/full_backup.result b/mysql-test/suite/mariabackup/full_backup.result
index e2d5cf185d5..e69d00f86f6 100644
--- a/mysql-test/suite/mariabackup/full_backup.result
+++ b/mysql-test/suite/mariabackup/full_backup.result
@@ -12,3 +12,18 @@ SELECT * FROM t;
i
1
DROP TABLE t;
+#
+# MDEV-27121 mariabackup incompatible with disabled dedicated
+# undo log tablespaces
+#
+call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
+# restart: --innodb_undo_tablespaces=0
+# xtrabackup backup
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart: --innodb_undo_tablespaces=0
+# Display undo log files from target directory
+undo001
+undo002
diff --git a/mysql-test/suite/mariabackup/full_backup.test b/mysql-test/suite/mariabackup/full_backup.test
index 66bed34cf3d..a0243527438 100644
--- a/mysql-test/suite/mariabackup/full_backup.test
+++ b/mysql-test/suite/mariabackup/full_backup.test
@@ -29,3 +29,27 @@ SELECT * FROM t;
DROP TABLE t;
rmdir $targetdir;
+--echo #
+--echo # MDEV-27121 mariabackup incompatible with disabled dedicated
+--echo # undo log tablespaces
+--echo #
+call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
+
+let $restart_parameters=--innodb_undo_tablespaces=0;
+--source include/restart_mysqld.inc
+
+echo # xtrabackup backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+--enable_result_log
+
+echo # xtrabackup prepare;
+--disable_result_log
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+-- source include/restart_and_restore.inc
+--enable_result_log
+
+--echo # Display undo log files from target directory
+list_files $targetdir undo*;
+
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test
index 22165ff29be..8bbd4e761a6 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test
+++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test
@@ -1,6 +1,7 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_sequence.inc
+--source include/no_valgrind_without_big.inc
CREATE TABLE t(i INT) ENGINE=INNODB;
diff --git a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
index 34198222cea..ab5993d232c 100644
--- a/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
+++ b/mysql-test/suite/mariabackup/innodb_redo_overwrite.test
@@ -2,6 +2,7 @@
--source include/have_debug_sync.inc
--source include/have_debug.inc
--source include/have_sequence.inc
+--source include/no_valgrind_without_big.inc
CREATE TABLE t ENGINE=INNODB SELECT seq%10 i FROM seq_0_to_204796;
diff --git a/mysql-test/suite/mariabackup/mdev-14447.combinations b/mysql-test/suite/mariabackup/mdev-14447.combinations
new file mode 100644
index 00000000000..79e5f7836ed
--- /dev/null
+++ b/mysql-test/suite/mariabackup/mdev-14447.combinations
@@ -0,0 +1,5 @@
+[crc32]
+--innodb-checksum-algorithm=crc32
+
+[full_crc32]
+--innodb-checksum-algorithm=full_crc32
diff --git a/mysql-test/suite/plugins/r/test_sql_service.result b/mysql-test/suite/plugins/r/test_sql_service.result
index a68980bd021..2983da28cc9 100644
--- a/mysql-test/suite/plugins/r/test_sql_service.result
+++ b/mysql-test/suite/plugins/r/test_sql_service.result
@@ -1,3 +1,4 @@
+reset master;
install plugin test_sql_service soname 'test_sql_service';
show status like 'test_sql_service_passed';
Variable_name Value
diff --git a/mysql-test/suite/plugins/t/test_sql_service.test b/mysql-test/suite/plugins/t/test_sql_service.test
index 078992acdb4..2f53c1d5b3e 100644
--- a/mysql-test/suite/plugins/t/test_sql_service.test
+++ b/mysql-test/suite/plugins/t/test_sql_service.test
@@ -1,6 +1,8 @@
--source include/not_embedded.inc
--source include/have_log_bin.inc
+reset master; # clear binlogs
+
if (!$TEST_SQL_SERVICE_SO) {
skip No TEST_SQL_SERVICE plugin;
}
diff --git a/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test b/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test
index 5bee3c9a356..9b32552436f 100644
--- a/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test
+++ b/mysql-test/suite/sys_vars/t/wsrep_on_without_provider.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
+--source include/have_wsrep.inc
#
# @@global.wsrep_on is not allowed if there
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index e29aafc7c92..4a3f846ae49 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -96,6 +96,16 @@ with system versioning
partition by system_time (
partition p0 history,
partition pn current);
+create or replace table t1 (a int)
+partition by range (a) (
+partition p0 history,
+partition p1 current);
+ERROR HY000: Wrong partition type `SYSTEM_TIME` for partitioning by `RANGE`
+create or replace table t1 (b int)
+partition by range (a) (
+partition p0 current,
+partition p1 history);
+ERROR HY000: Wrong partition type `SYSTEM_TIME` for partitioning by `RANGE`
## ALTER TABLE
alter table t1 add partition (
partition p1 current);
@@ -150,7 +160,7 @@ partition by system_time limit 1;
alter table t1 change x big int;
create or replace table t1 (i int) engine myisam partition by hash(i) partitions 2;
alter table t1 add partition (partition px history);
-ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME`
+ERROR HY000: Wrong partition type `SYSTEM_TIME` for partitioning by `HASH`
## INSERT, UPDATE, DELETE
create or replace table t1 (x int)
with system versioning
@@ -1140,7 +1150,7 @@ drop table t1;
create table t1 (a int) with system versioning partition by system_time
(partition p1 history, partition pn current);
alter table t1 add partition (partition p2);
-ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME`
+ERROR HY000: Wrong partition type `HASH` for partitioning by `SYSTEM_TIME`
# MDEV-17891 Assertion failures in select_insert::abort_result_set and
# mysql_load upon attempt to replace into a full table
set @@max_heap_table_size= 1024*1024;
@@ -2314,6 +2324,15 @@ t1 CREATE TABLE `t1` (
PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
drop tables t1, tp1;
#
+# MDEV-29841 Partition by system_time can be converted into table but not back
+#
+create or replace table t (a int) with system versioning
+partition by system_time limit 10 partitions 3;
+alter table t convert partition p0 to table tp;
+alter table t convert table tp to partition p0;
+ERROR HY000: CONVERT TABLE TO PARTITION can only be used on RANGE/LIST partitions
+drop tables t, tp;
+#
# End of 10.7 tests
#
#
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index decf470926f..e865ec3b9f6 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -107,6 +107,18 @@ partition by system_time (
partition p0 history,
partition pn current);
+--error ER_PARTITION_WRONG_TYPE
+create or replace table t1 (a int)
+partition by range (a) (
+ partition p0 history,
+ partition p1 current);
+
+--error ER_PARTITION_WRONG_TYPE
+create or replace table t1 (b int)
+partition by range (a) (
+ partition p0 current,
+ partition p1 history);
+
--echo ## ALTER TABLE
@@ -1835,6 +1847,16 @@ drop tables t1, tp1;
}
--echo #
+--echo # MDEV-29841 Partition by system_time can be converted into table but not back
+--echo #
+create or replace table t (a int) with system versioning
+partition by system_time limit 10 partitions 3;
+alter table t convert partition p0 to table tp;
+--error ER_ONLY_ON_RANGE_LIST_PARTITION
+alter table t convert table tp to partition p0;
+drop tables t, tp;
+
+--echo #
--echo # End of 10.7 tests
--echo #