summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/r
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
commit347c164c35eddab388009470e6848cb361ac93f8 (patch)
tree2c0c44eac690f510bb0a35b2a13b36d606b77b6b /mysql-test/suite/innodb/r
parentReleasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff)
downloadmariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz
mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/r')
-rw-r--r--mysql-test/suite/innodb/r/alter_copy.result2
-rw-r--r--mysql-test/suite/innodb/r/alter_kill.result4
-rw-r--r--mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff121
-rw-r--r--mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff181
-rw-r--r--mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff164
-rw-r--r--mysql-test/suite/innodb/r/autoinc_debug.result57
-rw-r--r--mysql-test/suite/innodb/r/autoinc_import.result232
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize.result2
-rw-r--r--mysql-test/suite/innodb/r/cursor-restore-unique-null.result24
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result21
-rw-r--r--mysql-test/suite/innodb/r/full_crc32_import.result20
-rw-r--r--mysql-test/suite/innodb/r/import_bugs.result52
-rw-r--r--mysql-test/suite/innodb/r/import_hidden_fts.result45
-rw-r--r--mysql-test/suite/innodb/r/import_hidden_fts_debug.result76
-rw-r--r--mysql-test/suite/innodb/r/index_length.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-debug.result15
-rw-r--r--mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff5
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff17
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30113362.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch.result7
-rw-r--r--mysql-test/suite/innodb/r/innodb_timeout_rollback.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_ut_format_name.result5
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff12
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty.result53
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_crash.result24
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff4
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug.result53
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_extend.resultbin9115 -> 9503 bytes
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_import.result1
-rw-r--r--mysql-test/suite/innodb/r/lock_insert_into_empty.result5
-rw-r--r--mysql-test/suite/innodb/r/lock_isolation.result136
-rw-r--r--mysql-test/suite/innodb/r/log_upgrade_101_flags.result12
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/monitor.result56
-rw-r--r--mysql-test/suite/innodb/r/rename_table.result10
-rw-r--r--mysql-test/suite/innodb/r/restart,16k.rdiff (renamed from mysql-test/suite/innodb/r/restart,16k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,32k.rdiff (renamed from mysql-test/suite/innodb/r/restart,32k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,4k.rdiff (renamed from mysql-test/suite/innodb/r/restart,4k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,64k.rdiff (renamed from mysql-test/suite/innodb/r/restart,64k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,8k.rdiff (renamed from mysql-test/suite/innodb/r/restart,8k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff2
-rw-r--r--mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result8
-rw-r--r--mysql-test/suite/innodb/r/undo_space_dblwr.result9
-rw-r--r--mysql-test/suite/innodb/r/undo_truncate.result3
64 files changed, 1210 insertions, 296 deletions
diff --git a/mysql-test/suite/innodb/r/alter_copy.result b/mysql-test/suite/innodb/r/alter_copy.result
index 8c9e5966..72ae28e9 100644
--- a/mysql-test/suite/innodb/r/alter_copy.result
+++ b/mysql-test/suite/innodb/r/alter_copy.result
@@ -51,7 +51,7 @@ ADD INDEX(a,b,d), ADD INDEX(a,d,b), ADD INDEX(b,c,d), ADD INDEX(b,d,c),
ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR hung';
-# restart: --innodb-force-recovery=3 --debug_dbug=+d,recv_ran_out_of_buffer
+# restart: --innodb-force-recovery=3
disconnect hang;
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
diff --git a/mysql-test/suite/innodb/r/alter_kill.result b/mysql-test/suite/innodb/r/alter_kill.result
index 51814088..209a711d 100644
--- a/mysql-test/suite/innodb/r/alter_kill.result
+++ b/mysql-test/suite/innodb/r/alter_kill.result
@@ -15,9 +15,9 @@ disconnect con1;
# and recompute innodb_checksum_algorithm=crc32
# restart
SELECT COUNT(*) FROM bug16720368;
-ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
+ERROR HY000: Table `test`.`bug16720368` is corrupted. Please drop the table and recreate.
INSERT INTO bug16720368 VALUES(1);
-ERROR HY000: Table test/bug16720368 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`bug16720368` is corrupted. Please drop the table and recreate.
INSERT INTO bug16720368_1 VALUES(1);
# Shut down the server to uncorrupt the data.
# restart
diff --git a/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff b/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff
index 01db97e5..7c32d38a 100644
--- a/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff
+++ b/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff
@@ -1,42 +1,79 @@
-7,8c7,8
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-21,22c21,22
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-35,36c35,36
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-49,50c49,50
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-63,64c63,64
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-77,78c77,78
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-98,99c98,99
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
+--- alter_not_null.result
++++ alter_not_null,COPY,NON-STRICT.result~
+@@ -4,8 +4,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -18,8 +18,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -32,8 +32,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -46,8 +46,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc';
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -60,8 +60,8 @@
+ f1 f2 f3
+ 2 2 NULL
+ ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f3' at row 1
+ SELECT * FROM t1;
+@@ -74,8 +74,8 @@
+ f1 b
+ 10 NULL
+ ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'b' at row 1
+ SELECT * FROM t1;
+@@ -95,8 +95,8 @@
+ CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(1, NULL);
+ ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'c2' at row 1
+ SELECT * FROM t1;
diff --git a/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff b/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff
index e02d235c..37e97169 100644
--- a/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff
+++ b/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff
@@ -1,72 +1,109 @@
-7,10c7
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-13c10
-< 0
----
-> NULL
-21,24c18
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-27c21
-<
----
-> NULL
-35,38c29
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-41c32
-<
----
-> NULL
-49,52c40
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-55c43
-<
----
-> NULL
-63,66c51
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f3' at row 1
----
-> ERROR 01000: Data truncated for column 'f3' at row 1
-69c54
-< 2 2 0
----
-> 2 2 NULL
-77,80c62
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'b' at row 1
----
-> ERROR 01000: Data truncated for column 'b' at row 1
-83c65
-< 10 0
----
-> 10 NULL
-98,99c80,81
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
+--- alter_not_null.result
++++ alter_not_null,COPY,STRICT.result~
+@@ -4,13 +4,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-0
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 CHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -18,13 +15,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 VARCHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -32,13 +26,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 TEXT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -46,13 +37,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc';
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(2, 2, NULL);
+@@ -60,13 +48,10 @@
+ f1 f2 f3
+ 2 2 NULL
+ ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f3' at row 1
++ERROR 01000: Data truncated for column 'f3' at row 1
+ SELECT * FROM t1;
+ f1 f2 f3
+-2 2 0
++2 2 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL DEFAULT 0, b TINYINT)ENGINE=InnoDB;
+ INSERT INTO t1 VALUES(10, NULL);
+@@ -74,13 +59,10 @@
+ f1 b
+ 10 NULL
+ ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'b' at row 1
++ERROR 01000: Data truncated for column 'b' at row 1
+ SELECT * FROM t1;
+ f1 b
+-10 0
++10 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(a INT, v INT AS (a), c INT, d INT NOT NULL, e INT) ENGINE=InnoDB;
+ ALTER TABLE t1 DROP COLUMN c, CHANGE COLUMN e e INT NOT NULL;
+@@ -95,8 +77,8 @@
+ CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(1, NULL);
+ ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'c2' at row 1
+ SELECT * FROM t1;
diff --git a/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff b/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff
index ec97b174..555f4cdb 100644
--- a/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff
+++ b/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff
@@ -1,66 +1,98 @@
-7,10c7
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-13c10
-< 0
----
-> NULL
-21,24c18
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-27c21
-<
----
-> NULL
-35,38c29
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-41c32
-<
----
-> NULL
-49,52c40
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-55c43
-<
----
-> NULL
-63,66c51
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f3' at row 1
----
-> ERROR 01000: Data truncated for column 'f3' at row 1
-69c54
-< 2 2 0
----
-> 2 2 NULL
-77,80c62
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'b' at row 1
----
-> ERROR 01000: Data truncated for column 'b' at row 1
-83c65
-< 10 0
----
-> 10 NULL
+--- alter_not_null.result
++++ alter_not_null,INPLACE,STRICT.result~
+@@ -4,13 +4,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-0
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 CHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -18,13 +15,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 VARCHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -32,13 +26,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 TEXT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -46,13 +37,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc';
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(2, 2, NULL);
+@@ -60,13 +48,10 @@
+ f1 f2 f3
+ 2 2 NULL
+ ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f3' at row 1
++ERROR 01000: Data truncated for column 'f3' at row 1
+ SELECT * FROM t1;
+ f1 f2 f3
+-2 2 0
++2 2 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL DEFAULT 0, b TINYINT)ENGINE=InnoDB;
+ INSERT INTO t1 VALUES(10, NULL);
+@@ -74,13 +59,10 @@
+ f1 b
+ 10 NULL
+ ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'b' at row 1
++ERROR 01000: Data truncated for column 'b' at row 1
+ SELECT * FROM t1;
+ f1 b
+-10 0
++10 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(a INT, v INT AS (a), c INT, d INT NOT NULL, e INT) ENGINE=InnoDB;
+ ALTER TABLE t1 DROP COLUMN c, CHANGE COLUMN e e INT NOT NULL;
diff --git a/mysql-test/suite/innodb/r/autoinc_debug.result b/mysql-test/suite/innodb/r/autoinc_debug.result
index b3b7a469..59740e43 100644
--- a/mysql-test/suite/innodb/r/autoinc_debug.result
+++ b/mysql-test/suite/innodb/r/autoinc_debug.result
@@ -105,3 +105,60 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
SET DEBUG_SYNC='RESET';
+#
+# MDEV-33593: Auto increment deadlock error causes ASSERT in subsequent save point
+#
+CREATE TABLE t1(col1 INT PRIMARY KEY AUTO_INCREMENT, col2 INT) ENGINE=InnoDB;
+CREATE TABLE t2(col1 INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1(col2) values(100);
+connect con1, localhost, root,,;
+START TRANSACTION;
+# T1: Acquiring Row X lock on table t2
+INSERT INTO t2 values(100);
+connect con2, localhost, root,,;
+START TRANSACTION;
+# T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1
+UPDATE t1 SET col2 = 20 where col1 = 10;
+SET DEBUG_SYNC='lock_wait_before_suspend SIGNAL t2_waiting';
+INSERT INTO t2 values(100);
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR t2_waiting';
+# T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1
+SET DEBUG_SYNC='lock_wait_before_suspend SIGNAL t3_waiting';
+INSERT INTO t1(col2) SELECT col2 from t1;
+connection con1;
+SAVEPOINT s1;
+SET DEBUG_SYNC='now WAIT_FOR t3_waiting';
+# T1: Wait for (T3) auto increment lock on t1 causing T1 -> T3 -> T2 -> T1 deadlock
+SET debug_dbug = '+d,innodb_deadlock_victim_self';
+INSERT INTO t1(col2) VALUES(200);
+ERROR HY000: Failed to read auto-increment value from storage engine
+# The transaction should have been rolled back
+SELECT * FROM t1;
+col1 col2
+1 100
+SELECT * FROM t2;
+col1
+# Release the previous savepoint using the same name
+SAVEPOINT s1;
+COMMIT;
+connection con2;
+COMMIT;
+connection default;
+COMMIT;
+disconnect con1;
+disconnect con2;
+# Cleanup
+SELECT * FROM t1;
+col1 col2
+1 100
+2 100
+DROP TABLE t1;
+SELECT * FROM t2;
+col1
+100
+DROP TABLE t2;
+SET DEBUG_SYNC='RESET';
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/innodb/r/autoinc_import.result b/mysql-test/suite/innodb/r/autoinc_import.result
new file mode 100644
index 00000000..4a8ddd02
--- /dev/null
+++ b/mysql-test/suite/innodb/r/autoinc_import.result
@@ -0,0 +1,232 @@
+CREATE TABLE t1 (id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(42);
+CREATE TABLE t1b LIKE t1;
+INSERT INTO t1b VALUES(3);
+CREATE TABLE t1z LIKE t1;
+CREATE TABLE t1t (id TINYINT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t0t LIKE t1t;
+INSERT INTO t1t VALUES(123);
+FLUSH TABLES t1,t1b,t1t FOR EXPORT;
+UNLOCK TABLES;
+CREATE TABLE t5_7 LIKE t1;
+CREATE TABLE t5_7b LIKE t1b;
+CREATE TABLE t10_1 LIKE t1;
+CREATE TABLE t10_1b LIKE t1b;
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1b DISCARD TABLESPACE;
+ALTER TABLE t1z DISCARD TABLESPACE;
+ALTER TABLE t1t DISCARD TABLESPACE;
+ALTER TABLE t0t DISCARD TABLESPACE;
+ALTER TABLE t5_7 DISCARD TABLESPACE;
+ALTER TABLE t5_7b DISCARD TABLESPACE;
+ALTER TABLE t10_1 DISCARD TABLESPACE;
+ALTER TABLE t10_1b DISCARD TABLESPACE;
+FLUSH TABLES;
+ALTER TABLE t0t IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t0t.cfg', will attempt to import without schema verification
+INSERT INTO t0t VALUES(NULL);
+SELECT * FROM t0t;
+id
+123
+124
+DROP TABLE t0t;
+ALTER TABLE t1 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification
+ALTER TABLE t1b IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1b.cfg', will attempt to import without schema verification
+ALTER TABLE t1z IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1z.cfg', will attempt to import without schema verification
+ALTER TABLE t1t IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1t.cfg', will attempt to import without schema verification
+ALTER TABLE t5_7 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t5_7.cfg', will attempt to import without schema verification
+ALTER TABLE t5_7b IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t5_7b.cfg', will attempt to import without schema verification
+ALTER TABLE t10_1 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t10_1.cfg', will attempt to import without schema verification
+ALTER TABLE t10_1b IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t10_1b.cfg', will attempt to import without schema verification
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 128 to 123 on table `test`\.`t0t`/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 42 on table `test`\.`t1z`/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 128 to 123 on table `test`\.`t1t`/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 3 to 42 on table `test`\.`t5_7` \(created with version 50744\)/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 3 to 42 on table `test`\.`t10_1` \(created with version 100149\)/ in mysqld.1.err
+FOUND 5 /InnoDB: Resetting PAGE_ROOT_AUTO_INC/ in mysqld.1.err
+# restart: --read-only
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+# restart: --innodb-read-only --read-only
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+# restart: --innodb-read-only
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check status Operation failed
+test.t5_7b check status Operation failed
+test.t10_1 check status Operation failed
+test.t10_1b check status Operation failed
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check status Operation failed
+test.t5_7b check status Operation failed
+test.t10_1 check status Operation failed
+test.t10_1b check status Operation failed
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1b;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1t;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1z;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t5_7;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t5_7b;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t10_1;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t10_1b;
+COUNT(*)
+1
+# restart
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment checked and .frm file version updated
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment checked and .frm file version updated
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment checked and .frm file version updated
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment checked and .frm file version updated
+test.t10_1b check status OK
+INSERT INTO t1 VALUES(NULL);
+INSERT INTO t1b VALUES(NULL);
+INSERT INTO t1t VALUES(NULL);
+INSERT INTO t1z VALUES(NULL);
+INSERT INTO t5_7 VALUES(NULL);
+INSERT INTO t5_7b VALUES(NULL);
+INSERT INTO t10_1 VALUES(NULL);
+INSERT INTO t10_1b VALUES(NULL);
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check status OK
+test.t5_7b check status OK
+test.t10_1 check status OK
+test.t10_1b check status OK
+SELECT * FROM t1;
+id
+4
+42
+SELECT * FROM t1b;
+id
+3
+347
+SELECT * FROM t1t;
+id
+123
+124
+SELECT * FROM t1z;
+id
+42
+43
+SELECT * FROM t5_7;
+id
+42
+43
+SELECT * FROM t5_7b;
+id
+3
+347
+SELECT * FROM t10_1;
+id
+42
+43
+SELECT * FROM t10_1b;
+id
+3
+347
+DROP TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
index 44446602..ad1f3a44 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:29:25.129637040 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -14,7 +14,7 @@
-# bytes: 65536
+# bytes: 131072
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
--# bytes: 4194304
+-# bytes: 2097152
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
index ef55ad97..1412df39 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:31:39.288769153 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -13,7 +13,7 @@
-# bytes: 65536
+# bytes: 16384
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
- # bytes: 4194304
+ # bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
index bcdcea31..15692559 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:30:28.957174270 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -14,7 +14,7 @@
-# bytes: 65536
+# bytes: 262144
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
--# bytes: 4194304
+-# bytes: 2097152
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
index 7b699ef4..55cf5973 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:31:03.516962339 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -13,7 +13,7 @@
-# bytes: 65536
+# bytes: 32768
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
- # bytes: 4194304
+ # bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize.result b/mysql-test/suite/innodb/r/check_ibd_filesize.result
index 0d224d6a..b0f37618 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize.result
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize.result
@@ -10,7 +10,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
# bytes: 65536
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 4194304
+# bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/cursor-restore-unique-null.result b/mysql-test/suite/innodb/r/cursor-restore-unique-null.result
new file mode 100644
index 00000000..29edc47a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/cursor-restore-unique-null.result
@@ -0,0 +1,24 @@
+CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, UNIQUE KEY `b_c` (`b`,`c`))
+ENGINE=InnoDB, STATS_PERSISTENT=0;
+INSERT INTO t SET a = 1, c = 2;
+connect con1,localhost,root;
+BEGIN;
+INSERT INTO t SET a=2, c=2;
+connection default;
+BEGIN;
+SET DEBUG_SYNC="lock_wait_start SIGNAL select_locked";
+SELECT * FROM t FORCE INDEX(b) FOR UPDATE;
+connection con1;
+SET DEBUG_SYNC="now WAIT_FOR select_locked";
+ROLLBACK;
+connection default;
+# If the bug is not fixed, and the both unique index key fields are
+# NULL, there will be two (1, NULL, 2) rows in the result,
+# because cursor will be restored to (NULL, 2, 1) position for
+# secondary key instead of "supremum".
+a b c
+1 NULL 2
+COMMIT;
+SET DEBUG_SYNC="RESET";
+disconnect con1;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index 808e2270..80a0afb8 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -1035,9 +1035,22 @@ BEGIN;
INSERT INTO child SET a=1;
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`))
connection default;
+TRUNCATE TABLE parent;
+ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`parent` (`a`))
+DROP TABLE parent;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+SET innodb_lock_wait_timeout=0;
+RENAME TABLE parent TO transparent;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ALTER TABLE parent FORCE, ALGORITHM=COPY;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET innodb_lock_wait_timeout=0, foreign_key_checks=0;
TRUNCATE TABLE parent;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE parent;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ALTER TABLE parent FORCE, ALGORITHM=COPY;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
@@ -1052,7 +1065,13 @@ TRUNCATE TABLE parent;
ALTER TABLE parent FORCE, ALGORITHM=COPY;
ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
ALTER TABLE parent ADD COLUMN b INT, ALGORITHM=INSTANT;
-DROP TABLE child, parent;
+SET foreign_key_checks=ON;
+TRUNCATE TABLE parent;
+ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`parent` (`a`))
+ALTER TABLE parent FORCE, ALGORITHM=COPY;
+ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
+RENAME TABLE parent TO transparent;
+DROP TABLE child, transparent;
#
# MDEV-26217 Failing assertion: list.count > 0 in ut_list_remove
# or Assertion `lock->trx == this' failed in dberr_t trx_t::drop_table
diff --git a/mysql-test/suite/innodb/r/full_crc32_import.result b/mysql-test/suite/innodb/r/full_crc32_import.result
index 548e69c1..416f607c 100644
--- a/mysql-test/suite/innodb/r/full_crc32_import.result
+++ b/mysql-test/suite/innodb/r/full_crc32_import.result
@@ -50,7 +50,15 @@ t1 CREATE TABLE `t1` (
`b` blob DEFAULT NULL,
`c` blob DEFAULT NULL,
PRIMARY KEY (`a`)
-) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+# Auto increment value must be more than maximum column value
+SELECT MAX(a) FROM t1;
+MAX(a)
+45
+SELECT auto_increment FROM information_schema.tables
+WHERE table_name like 't1';
+auto_increment
+46
UPDATE t1 set b = repeat("de", 100) where b = repeat("cd", 200);
explain SELECT a FROM t1 where b = repeat("de", 100);
id select_type table type possible_keys key key_len ref rows Extra
@@ -132,7 +140,15 @@ t1 CREATE TABLE `t1` (
`c2` point NOT NULL,
`c3` linestring NOT NULL,
PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=16372 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=14325 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+# Auto increment value must be more than maximum column value
+SELECT MAX(c1) FROM t1;
+MAX(c1)
+14324
+SELECT auto_increment FROM information_schema.tables
+WHERE table_name like 't1';
+auto_increment
+14325
UPDATE t1 SET C2 = ST_GeomFromText('POINT(0 0)');
SELECT COUNT(*) FROM t1;
COUNT(*)
diff --git a/mysql-test/suite/innodb/r/import_bugs.result b/mysql-test/suite/innodb/r/import_bugs.result
index 98f3e767..26845e55 100644
--- a/mysql-test/suite/innodb/r/import_bugs.result
+++ b/mysql-test/suite/innodb/r/import_bugs.result
@@ -15,6 +15,58 @@ CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
DROP TABLE imp_t1, t1;
SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
#
+# MDEV-33400 Adaptive hash index corruption after DISCARD TABLESPACE
+#
+SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
+SET GLOBAL innodb_adaptive_hash_index=ON;
+CREATE TABLE t (a INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t SELECT * FROM seq_1_to_131;
+ALTER TABLE t ADD hid INT DEFAULT 2;
+INSERT INTO t VALUES (251,1);
+ALTER TABLE t DISCARD TABLESPACE;
+CHECK TABLE mysql.innodb_table_stats;
+Table Op Msg_type Msg_text
+mysql.innodb_table_stats check status OK
+DROP TABLE t;
+SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;
+# End of 10.4 tests
+#
+# MDEV-18288: Transportable Tablespaces leave AUTO_INCREMENT in mismatched
+# state, causing INSERT errors in newly imported tables when .cfg is not used.
+#
+CREATE TABLE t1(
+id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+PRIMARY KEY (id)
+) ENGINE=INNODB;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+INSERT INTO t1() VALUES();
+INSERT INTO t1() VALUES();
+FLUSH TABLES test.t1 FOR EXPORT;
+# Copy data file
+# Skip CFG file copy
+UNLOCK TABLES;
+DROP TABLE t1;
+ALTER TABLE t2 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
+SELECT * FROM t2 ORDER BY id;
+id
+1
+2
+INSERT INTO t2() VALUES();
+INSERT INTO t2() VALUES();
+INSERT INTO t2() VALUES();
+SELECT * FROM t2 ORDER BY id;
+id
+1
+2
+3
+4
+5
+DROP TABLE t2;
+# End of 10.5 tests
+#
# MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)'
# failed in dberr_t row_discard_tablespace_for_mysql
# (dict_table_t*, trx_t*)
diff --git a/mysql-test/suite/innodb/r/import_hidden_fts.result b/mysql-test/suite/innodb/r/import_hidden_fts.result
new file mode 100644
index 00000000..69120898
--- /dev/null
+++ b/mysql-test/suite/innodb/r/import_hidden_fts.result
@@ -0,0 +1,45 @@
+call mtr.add_suppression("InnoDB: Added system generated FTS_DOC_ID and FTS_DOC_ID_INDEX while importing the tablespace");
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) not null, fulltext f_idx(f2),
+f3 INT as (f1) VIRTUAL, INDEX(f3),
+f4 INT as (f1) STORED, INDEX(f4),
+f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
+INSERT INTO t1(f1, f2) VALUES(1, "on");
+INSERT INTO t1(f1, f2) SELECT seq, "si" FROM seq_2_to_256;
+ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL;
+ALTER TABLE t1 DROP COLUMN f6;
+ALTER TABLE t1 DROP INDEX f_idx;
+connect con1,localhost,root,,;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+DELETE FROM t1 WHERE f1 > 1;
+FLUSH TABLE t1 FOR EXPORT;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+backup: t1
+UNLOCK TABLES;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) not null,
+f3 INT as (f1) VIRTUAL, INDEX(f3),
+f4 INT as (f1) STORED, INDEX(f4),
+f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` char(2) NOT NULL,
+ `f3` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL,
+ `f4` int(11) GENERATED ALWAYS AS (`f1`) STORED,
+ `f5` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL,
+ PRIMARY KEY (`f1`),
+ KEY `f3` (`f3`),
+ KEY `f4` (`f4`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/import_hidden_fts_debug.result b/mysql-test/suite/innodb/r/import_hidden_fts_debug.result
new file mode 100644
index 00000000..2cf1746e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/import_hidden_fts_debug.result
@@ -0,0 +1,76 @@
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL, FULLTEXT f_idx(f2),
+f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB;
+INSERT INTO t1(f1, f2) VALUES(1, "on");
+ALTER TABLE t1 DROP INDEX f_idx;
+FLUSH TABLE t1 FOR EXPORT;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+backup: t1
+UNLOCK TABLES;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL,
+f3 CHAR(2) NOT NULL,
+f4 INT AS (f1) VIRTUAL, INDEX(f4))ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Number of indexes don't match, table has 2 indexes but the tablespace meta-data file has 3 indexes)
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL,
+f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+SET DEBUG_DBUG="+d,ib_import_set_index_root_failure";
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Too many active concurrent transactions
+SET DEBUG_DBUG="-d,ib_import_set_index_root_failure";
+SET DEBUG_DBUG="+d,ib_import_vcol_update_fail";
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR 23000: Can't write; duplicate key in table 't1'
+SET DEBUG_DBUG="-d,ib_import_vcol_update_fail";
+restore: t1 .ibd and .cfg files
+SET DEBUG_DBUG="+d,ib_import_fts_error";
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR 23000: Can't write; duplicate key in table 't1'
+SET DEBUG_DBUG="-d,ib_import_fts_error";
+unlink: t1.ibd
+unlink: t1.cfg
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
+WHERE table_id IN (SELECT table_id FROM information_schema.innodb_sys_tables where name="test/t1");
+NAME
+f1
+f2
+f3
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` char(2) NOT NULL,
+ `f3` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL,
+ PRIMARY KEY (`f1`),
+ KEY `f3` (`f3`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+FTS_DOC_ID BIGINT SIGNED NOT NULL,
+f2 CHAR(2) NOT NULL,
+FULLTEXT f_idx(f2))ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1, "on");
+ALTER TABLE t1 DROP INDEX f_idx;
+FLUSH TABLE t1 FOR EXPORT;
+backup: t1
+UNLOCK TABLES;
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL)ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Column f2 ordinal value mismatch, it's at 1 in the table and 2 in the tablespace meta-data file)
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/index_length.result b/mysql-test/suite/innodb/r/index_length.result
index cc92780a..e0d6a735 100644
--- a/mysql-test/suite/innodb/r/index_length.result
+++ b/mysql-test/suite/innodb/r/index_length.result
@@ -20,4 +20,12 @@ FLOOR(index_length/@@innodb_page_size)
2
disconnect stop_purge;
DROP TABLE t1;
+#
+# MDEV-22855 Assertion (!field->prefix_len ||
+# field->fixed_len == field->prefix_len)
+# failed in btr_node_ptr_max_size
+#
+CREATE TABLE t1(c CHAR(194) CHARACTER SET UTF32, KEY k1(c(193)))ENGINE=InnoDB;
+INSERT INTO t1 SET c='';
+DROP TABLE t1;
# End of 10.4 tests
diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result
index c55b4a3d..fd33581f 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result
@@ -108,11 +108,11 @@ DROP TABLE t;
# MDEV-26772 InnoDB DDL fails with DUPLICATE KEY error
#
create table t1(f1 int not null primary key,
-f2 int not null, index idx(f2))engine=innodb;
+f2 int not null, index idx(f2), index i(f2,f1))engine=innodb;
insert into t1 values(1, 1);
connect con1,localhost,root,,,;
SET DEBUG_SYNC='before_delete_table_stats SIGNAL blocked WAIT_FOR go';
-SET innodb_lock_wait_timeout=0;
+SET STATEMENT innodb_lock_wait_timeout=0 FOR
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR blocked';
@@ -124,6 +124,17 @@ connection con1;
connection default;
COMMIT;
SET DEBUG_SYNC=RESET;
+RENAME TABLE mysql.innodb_table_stats TO mysql.innodb_table_stats_hidden;
+connection con1;
+SET DEBUG_SYNC='innodb_commit_inplace_before_lock SIGNAL blocked WAIT_FOR go';
+ALTER TABLE t1 DROP INDEX i;
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR blocked';
+RENAME TABLE mysql.innodb_table_stats_hidden TO mysql.innodb_table_stats;
+SET DEBUG_SYNC='now SIGNAL go';
+connection con1;
+connection default;
+SET DEBUG_SYNC=RESET;
connection con1;
ALTER TABLE t1 RENAME KEY idx TO idx1, ALGORITHM=COPY;
disconnect con1;
diff --git a/mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result b/mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result
deleted file mode 100644
index 09e53b59..00000000
--- a/mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result
+++ /dev/null
@@ -1,10 +0,0 @@
-call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
-SET @saved_debug = @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,ib_lru_force_no_free_page";
-CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB;
-BEGIN;
-INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
-COMMIT;
-SET debug_dbug = @saved_debug;
-DROP TABLE t1;
-FOUND 1 /InnoDB: Difficult to find free blocks / in mysqld.1.err
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff b/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff
deleted file mode 100644
index bb902e18..00000000
--- a/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff
+++ /dev/null
@@ -1,5 +0,0 @@
-120,121c120
-< Warnings:
-< Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
----
-> ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.)
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff b/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff
index bb902e18..283bbe96 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff
+++ b/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff
@@ -1,5 +1,12 @@
-120,121c120
-< Warnings:
-< Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
----
-> ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.)
+--- innodb-wl5522.result
++++ innodb-wl5522,strict_crc32.result~
+@@ -131,8 +131,7 @@
+ ALTER TABLE t2 IMPORT TABLESPACE;
+ ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT)
+ ALTER TABLE t2 IMPORT TABLESPACE;
+-Warnings:
+-Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
++ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.)
+ DROP TABLE t2;
+ SET GLOBAL innodb_file_per_table = 1;
+ SELECT @@innodb_file_per_table;
diff --git a/mysql-test/suite/innodb/r/innodb_bug30113362.result b/mysql-test/suite/innodb/r/innodb_bug30113362.result
index cb0f5091..5d30c5c0 100644
--- a/mysql-test/suite/innodb/r/innodb_bug30113362.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30113362.result
@@ -37,7 +37,7 @@ test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
-1856
+1792
connection con2;
DELETE FROM t1 WHERE a00 = 'cnm';
COMMIT;
@@ -80,7 +80,7 @@ test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
-1856
+1792
DELETE FROM t1 WHERE a00 = 'dpn';
COMMIT;
INSERT INTO t1 SET a00 = 'dpn';
@@ -117,6 +117,6 @@ test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
CLUST_INDEX_SIZE
-1856
+1792
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index d142c0e4..9d8ead7a 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -431,10 +431,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
@@ -509,10 +505,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
@@ -1217,10 +1209,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
index 832a4800..94e40ee5 100644
--- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
+++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
@@ -86,7 +86,6 @@ buffer_flush_n_to_flush_by_age buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NUL
buffer_flush_adaptive_avg_time buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Avg time (ms) spent for adaptive flushing recently.
buffer_flush_adaptive_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of adaptive flushes passed during the recent Avg period.
buffer_LRU_get_free_loops buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total loops in LRU get free.
-buffer_LRU_get_free_waits buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total sleep waits in LRU get free.
buffer_flush_avg_page_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average number of pages at which flushing is happening
buffer_flush_lsn_avg_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average redo generation rate
buffer_flush_pct_for_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Percent of IO capacity used to avoid max dirty page limit
@@ -106,7 +105,6 @@ buffer_LRU_batch_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NUL
buffer_LRU_batch_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages scanned per LRU batch call
buffer_LRU_batch_flush_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Total pages flushed as part of LRU batches
buffer_LRU_batch_evict_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Total pages evicted as part of LRU batches
-buffer_LRU_single_flush_failure_count Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times attempt to flush a single page from LRU failed
buffer_LRU_get_free_search Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of searches performed for a clean page
buffer_LRU_search_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of LRU search
buffer_LRU_search_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times LRU search is performed
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch.result b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
index df6bc4b0..cb205b18 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
@@ -174,3 +174,10 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS LIMIT ROWS EXAMINED 5;
DROP TABLE t1;
+#
+# MDEV-33462 Disallow LOCK=NONE operation on statistics table
+#
+ALTER TABLE mysql.innodb_table_stats FORCE, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: innodb_table_stats. Try LOCK=SHARED
+ALTER TABLE mysql.innodb_index_stats FORCE, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: innodb_index_stats. Try LOCK=SHARED
diff --git a/mysql-test/suite/innodb/r/innodb_timeout_rollback.result b/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
index 30db5a21..5f99ad75 100644
--- a/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
+++ b/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
@@ -17,10 +17,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
@@ -41,4 +37,4 @@ a
drop table t1;
disconnect con1;
disconnect con2;
-End of 5.0 tests
+# End of 5.0 tests
diff --git a/mysql-test/suite/innodb/r/innodb_ut_format_name.result b/mysql-test/suite/innodb/r/innodb_ut_format_name.result
deleted file mode 100644
index 41a5b0f7..00000000
--- a/mysql-test/suite/innodb/r/innodb_ut_format_name.result
+++ /dev/null
@@ -1,5 +0,0 @@
-CREATE TABLE t (c INT) ENGINE=INNODB;
-SET @save_dbug = @@debug_dbug;
-SET debug_dbug = '+d,test_ut_format_name';
-DROP TABLE t;
-SET debug_dbug = @save_dbug;
diff --git a/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff b/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff
index baa017ec..ad3d03a7 100644
--- a/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff
+++ b/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff
@@ -1,2 +1,10 @@
-423a424
-> ERROR 42000: Row size too large (> 1982). 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.
+--- a/mysql-test/suite/innodb/r/insert_into_empty.result
++++ b/mysql-test/suite/innodb/r/insert_into_empty.result
+@@ -430,6 +430,7 @@
+ 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));
++ERROR 42000: Row size too large (> 1982). 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.
+ CHECK TABLE t1;
+ Table Op Msg_type Msg_text
+ test.t1 check status OK
diff --git a/mysql-test/suite/innodb/r/insert_into_empty.result b/mysql-test/suite/innodb/r/insert_into_empty.result
index 0cdee172..78d93494 100644
--- a/mysql-test/suite/innodb/r/insert_into_empty.result
+++ b/mysql-test/suite/innodb/r/insert_into_empty.result
@@ -251,6 +251,15 @@ c1
1984
3331
DROP TABLE t1;
+#
+# MDEV-33979 Disallow bulk insert operation during
+# partition update statement
+#
+CREATE TABLE t1(a INT KEY)ENGINE=InnoDB
+PARTITION BY KEY(a) PARTITIONS 16;
+INSERT INTO t1 VALUES(1);
+UPDATE t1 SET a = 2 WHERE a = 1;
+DROP TABLE t1;
# End of 10.6 tests
#
# MDEV-26947 UNIQUE column checks fail in InnoDB resulting
@@ -467,3 +476,47 @@ DROP TABLE t1;
CREATE TABLE t (a CHAR CHARACTER SET utf8) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT t SELECT left(seq,1) FROM seq_1_to_43691;
DROP TABLE t;
+#
+# MDEV-32453 Bulk insert fails to apply when trigger
+# does insert operation
+#
+CREATE TABLE t(c INT)ENGINE=InnoDB;
+CREATE TRIGGER t2_ai AFTER INSERT ON t FOR EACH ROW SET @a:=(SELECT * FROM t);
+BEGIN;
+INSERT INTO t VALUES (1),(1);
+ERROR 21000: Subquery returns more than 1 row
+COMMIT;
+DROP TABLE t;
+#
+# MDEV-33868 Assertion `trx->bulk_insert' failed in
+# innodb_prepare_commit_versioned
+#
+CREATE TABLE t (id INT) ENGINE=InnoDB;
+select 1 into outfile "VARDIR/tmp/t.outfile";
+BEGIN;
+LOAD DATA INFILE 'VARDIR/tmp/t.outfile' INTO TABLE t;
+COMMIT;
+DROP TABLE t;
+#
+# MDEV-33934 Assertion `!check_foreigns' failed in
+# trx_t::bulk_insert_apply_for_table(dict_table_t*)
+#
+CREATE TABLE t1(f1 INT,f2 INT,KEY(f1))engine=innodb;
+BEGIN;
+INSERT INTO t1 VALUES();
+SET STATEMENT FOREIGN_KEY_CHECKS=1 FOR SELECT * FROM t1;
+f1 f2
+NULL NULL
+COMMIT;
+DROP TABLE t1;
+#
+# MDEV-33970 Assertion `!m.first->second.is_bulk_insert()'
+# failed in trx_undo_report_row_operation()
+#
+CREATE TABLE t1(c1 INT,c2 CHAR) ENGINE=INNODB PARTITION BY KEY(c1) PARTITIONS 2;
+begin;
+INSERT INTO t1 VALUES(2,0);
+DELETE FROM t1;
+commit;
+DROP TABLE t1;
+# End of 10.11 tests
diff --git a/mysql-test/suite/innodb/r/instant_alter_crash.result b/mysql-test/suite/innodb/r/instant_alter_crash.result
index e423afe1..565f7e4b 100644
--- a/mysql-test/suite/innodb/r/instant_alter_crash.result
+++ b/mysql-test/suite/innodb/r/instant_alter_crash.result
@@ -202,27 +202,3 @@ Table Op Msg_type Msg_text
test.t2 check status OK
DROP TABLE t1,t2;
db.opt
-#
-# MDEV-26198 Assertion `0' failed in row_log_table_apply_op during
-# ADD PRIMARY KEY or OPTIMIZE TABLE
-#
-CREATE TABLE t1(f1 year default null, f2 year default null,
-f3 text, f4 year default null, f5 year default null,
-f6 year default null, f7 year default null,
-f8 year default null)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
-INSERT INTO t1 VALUES(1, 1, 1, 1, 1, 1, 1, 1);
-ALTER TABLE t1 ADD COLUMN f9 year default null, ALGORITHM=INPLACE;
-set DEBUG_SYNC="row_log_table_apply1_before SIGNAL con1_insert WAIT_FOR con1_finish";
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ADD COLUMN f10 YEAR DEFAULT NULL, ALGORITHM=INPLACE;
-connect con1,localhost,root,,,;
-SET DEBUG_SYNC="now WAIT_FOR con1_insert";
-INSERT IGNORE INTO t1 (f3) VALUES ( 'b' );
-INSERT IGNORE INTO t1 (f3) VALUES ( 'l' );
-SET DEBUG_SYNC="now SIGNAL con1_finish";
-connection default;
-disconnect con1;
-SET DEBUG_SYNC=RESET;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff b/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
index f442e406..cf72c37b 100644
--- a/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
@@ -2,7 +2,7 @@
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
--35
-+36
+-37
++38
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
# End of 10.6 tests
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result
index d6d49047..733a85aa 100644
--- a/mysql-test/suite/innodb/r/instant_alter_debug.result
+++ b/mysql-test/suite/innodb/r/instant_alter_debug.result
@@ -477,10 +477,59 @@ SET DEBUG_SYNC="now WAIT_FOR try_insert";
INSERT INTO t1 VALUES(1, 2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET DEBUG_SYNC="now SIGNAL alter_progress";
-disconnect con1;
connection default;
DROP TABLE t1;
+#
+# MDEV-26198 Assertion `0' failed in row_log_table_apply_op during
+# ADD PRIMARY KEY or OPTIMIZE TABLE
+#
+CREATE TABLE t1(f1 year default null, f2 year default null,
+f3 text, f4 year default null, f5 year default null,
+f6 year default null, f7 year default null,
+f8 year default null)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1, 1, 1, 1, 1, 1, 1);
+ALTER TABLE t1 ADD COLUMN f9 year default null, ALGORITHM=INPLACE;
+set DEBUG_SYNC="row_log_table_apply1_before SIGNAL con1_insert WAIT_FOR con1_finish";
+ALTER TABLE t1 ADD COLUMN f10 YEAR DEFAULT NULL, FORCE, ALGORITHM=INPLACE;
+connection con1;
+SET DEBUG_SYNC="now WAIT_FOR con1_insert";
+INSERT IGNORE INTO t1 (f3) VALUES ( 'b' );
+INSERT IGNORE INTO t1 (f3) VALUES ( 'l' );
+SET DEBUG_SYNC="now SIGNAL con1_finish";
+connection default;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+#
+# MDEV-19044 Alter table corrupts while applying the
+# modification log
+#
+CREATE TABLE t1 (
+f1 INT,
+f2 INT,
+f3 char(19) CHARACTER SET utf8mb3,
+f4 VARCHAR(500),
+f5 TEXT)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(3, 1, REPEAT('a', 2), REPEAT("b", 20),'a');
+ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL, ALGORITHM=INSTANT;
+INSERT INTO t1 VALUES(1, 2, REPEAT('InnoDB', 2),
+REPEAT("MariaDB", 20), REPEAT('a', 8000), 12);
+INSERT INTO t1 VALUES(1, 2, REPEAT('MYSQL', 2),
+REPEAT("MariaDB", 20), REPEAT('a', 8000), 12);
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL con1_begin WAIT_FOR con1_update';
+ALTER TABLE t1 MODIFY COLUMN f2 INT NOT NULL, FORCE, ALGORITHM=INPLACE;
+connection con1;
+SET DEBUG_SYNC='now WAIT_FOR con1_begin';
+UPDATE t1 SET f2=204 order by f1 limit 2;
+SET DEBUG_SYNC='now SIGNAL con1_update';
+connection default;
+disconnect con1;
SET DEBUG_SYNC=reset;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
# End of 10.4 tests
#
# MDEV-22867 Assertion instant.n_core_fields == n_core_fields
@@ -525,6 +574,6 @@ SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-35
+37
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
# End of 10.6 tests
diff --git a/mysql-test/suite/innodb/r/instant_alter_extend.result b/mysql-test/suite/innodb/r/instant_alter_extend.result
index 33a5f57c..c22043ec 100644
--- a/mysql-test/suite/innodb/r/instant_alter_extend.result
+++ b/mysql-test/suite/innodb/r/instant_alter_extend.result
Binary files differ
diff --git a/mysql-test/suite/innodb/r/instant_alter_import.result b/mysql-test/suite/innodb/r/instant_alter_import.result
index 3e7ee35f..6fe48fb6 100644
--- a/mysql-test/suite/innodb/r/instant_alter_import.result
+++ b/mysql-test/suite/innodb/r/instant_alter_import.result
@@ -64,6 +64,7 @@ alter table t1 discard tablespace;
flush tables t2 for export;
unlock tables;
alter table t1 import tablespace;
+# restart
select * from t1;
z
42
diff --git a/mysql-test/suite/innodb/r/lock_insert_into_empty.result b/mysql-test/suite/innodb/r/lock_insert_into_empty.result
index c1dea2fc..97369b58 100644
--- a/mysql-test/suite/innodb/r/lock_insert_into_empty.result
+++ b/mysql-test/suite/innodb/r/lock_insert_into_empty.result
@@ -47,6 +47,9 @@ CREATE TABLE t1 (k INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SET k=1;
START TRANSACTION;
INSERT INTO t1 SET k=2;
+SELECT count(*) > 0 FROM mysql.innodb_index_stats lock in share mode;
+count(*) > 0
+1
connect con1,localhost,root,,test;
SET innodb_lock_wait_timeout=0;
CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB
@@ -54,4 +57,6 @@ AS SELECT k FROM t1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
disconnect con1;
connection default;
+SET innodb_lock_wait_timeout=default;
DROP TABLE t1;
+DROP TABLE IF EXISTS t2;
diff --git a/mysql-test/suite/innodb/r/lock_isolation.result b/mysql-test/suite/innodb/r/lock_isolation.result
new file mode 100644
index 00000000..31843266
--- /dev/null
+++ b/mysql-test/suite/innodb/r/lock_isolation.result
@@ -0,0 +1,136 @@
+#
+# MDEV-26642 Weird SELECT view when a record is
+# modified to the same value by two transactions
+# MDEV-32898 Phantom rows caused by updates of PRIMARY KEY
+#
+CREATE TABLE t(a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t VALUES (1,1),(2,2);
+BEGIN;
+SELECT * FROM t LOCK IN SHARE MODE;
+a b
+1 1
+2 2
+connect con_weird,localhost,root;
+BEGIN;
+SELECT * FROM t;
+a b
+1 1
+2 2
+connect consistent,localhost,root;
+SET innodb_snapshot_isolation=ON;
+BEGIN;
+SELECT * FROM t;
+a b
+1 1
+2 2
+connection default;
+UPDATE t SET a=3 WHERE b=2;
+COMMIT;
+connection consistent;
+UPDATE t SET b=3;
+ERROR HY000: Record has changed since last read in table 't'
+SELECT * FROM t;
+a b
+1 1
+3 2
+COMMIT;
+connection con_weird;
+UPDATE t SET b=3;
+SELECT * FROM t;
+a b
+1 3
+2 2
+3 3
+COMMIT;
+connection default;
+SELECT * FROM t;
+a b
+1 3
+3 3
+DROP TABLE t;
+#
+# MDEV-26643 Inconsistent behaviors of UPDATE under
+# READ UNCOMMITTED and READ COMMITTED isolation level
+#
+CREATE TABLE t(a INT, b INT) ENGINE=InnoDB;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+BEGIN;
+UPDATE t SET a = 10;
+connection consistent;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+UPDATE t SET b = 20 WHERE a;
+connection default;
+COMMIT;
+connection consistent;
+SELECT * FROM t;
+a b
+10 20
+10 20
+connection default;
+TRUNCATE TABLE t;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+BEGIN;
+UPDATE t SET a = 10;
+connection consistent;
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+UPDATE t SET b = 20 WHERE a;
+connection default;
+COMMIT;
+connection consistent;
+SELECT * FROM t;
+a b
+10 20
+10 20
+connection default;
+TRUNCATE TABLE t;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+BEGIN;
+UPDATE t SET a = 10;
+connection con_weird;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+UPDATE t SET b = 20 WHERE a;
+connection default;
+SELECT * FROM t;
+a b
+10 1
+10 2
+COMMIT;
+connection con_weird;
+COMMIT;
+connection default;
+SELECT * FROM t;
+a b
+10 1
+10 20
+DROP TABLE t;
+#
+# MDEV-33802 Weird read view after ROLLBACK of other transactions
+#
+CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t SET a=1;
+BEGIN;
+INSERT INTO t SET a=2;
+connection consistent;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+ERROR HY000: Record has changed since last read in table 't'
+connection con_weird;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+connection default;
+ROLLBACK;
+connection con_weird;
+a b
+1 NULL
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+a b
+1 NULL
+disconnect con_weird;
+connection consistent;
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+a b
+1 NULL
+disconnect consistent;
+connection default;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/log_upgrade_101_flags.result b/mysql-test/suite/innodb/r/log_upgrade_101_flags.result
new file mode 100644
index 00000000..6ae7c848
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_upgrade_101_flags.result
@@ -0,0 +1,12 @@
+call mtr.add_suppression("InnoDB: The change buffer is corrupted");
+call mtr.add_suppression("InnoDB: Tablespace size stored in header is 768 pages, but the sum of data file sizes is 384 pages");
+call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of file");
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_upgrade --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_upgrade --innodb-force-recovery=5 --innodb-log-file-size=4m --innodb_page_size=32k --innodb_buffer_pool_size=10M
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+1
+FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+# restart
+# End of 10.5 tests
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff
index 118145be..118145be 100644
--- a/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff
index 33067866..33067866 100644
--- a/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff
index e50e4d2b..e50e4d2b 100644
--- a/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff
index 1bc03a5d..1bc03a5d 100644
--- a/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff
index 71c4c2e4..71c4c2e4 100644
--- a/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff
index e42b3de8..e42b3de8 100644
--- a/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff
index 6f08dab3..6f08dab3 100644
--- a/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff
index bd37d435..bd37d435 100644
--- a/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff
index 93c39ff6..93c39ff6 100644
--- a/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff
index 5e6c6221..5e6c6221 100644
--- a/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff
index 2cbf4cd9..2cbf4cd9 100644
--- a/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff
index c324969f..c324969f 100644
--- a/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff
index 4db669a8..4db669a8 100644
--- a/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff
index 5f79d77e..5f79d77e 100644
--- a/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result
index d99dd69e..1834032e 100644
--- a/mysql-test/suite/innodb/r/monitor.result
+++ b/mysql-test/suite/innodb/r/monitor.result
@@ -51,7 +51,6 @@ buffer_flush_n_to_flush_by_age disabled
buffer_flush_adaptive_avg_time disabled
buffer_flush_adaptive_avg_pass disabled
buffer_LRU_get_free_loops disabled
-buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
buffer_flush_lsn_avg_rate disabled
buffer_flush_pct_for_dirty disabled
@@ -71,7 +70,6 @@ buffer_LRU_batch_num_scan disabled
buffer_LRU_batch_scanned_per_call disabled
buffer_LRU_batch_flush_total_pages enabled
buffer_LRU_batch_evict_total_pages enabled
-buffer_LRU_single_flush_failure_count disabled
buffer_LRU_get_free_search disabled
buffer_LRU_search_scanned disabled
buffer_LRU_search_num_scan disabled
@@ -198,6 +196,7 @@ icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
+create temporary table orig_innodb_metrics as select name, enabled from information_schema.innodb_metrics;
set global innodb_monitor_disable = All;
select name from information_schema.innodb_metrics where enabled;
name
@@ -431,7 +430,7 @@ set global innodb_monitor_reset_all = default;
# MONITORS
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*1*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 0
@@ -439,13 +438,13 @@ SET GLOBAL innodb_monitor_enable='module_buffer_page';
INSERT INTO t1 VALUES (1), (2), (3), (4);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*2*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 1
SET GLOBAL innodb_monitor_disable='module_buffer_page';
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*3*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 0
@@ -455,13 +454,13 @@ ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value o
INSERT INTO t1 VALUES (5), (6), (7), (8);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*4*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 1
SET GLOBAL innodb_monitor_disable='%';
SET GLOBAL innodb_monitor_reset_all='%';
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*5*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 0
@@ -469,7 +468,7 @@ SET GLOBAL innodb_monitor_enable='ALL';
INSERT INTO t1 VALUES (9), (10), (11), (12);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*6*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 1
@@ -599,6 +598,41 @@ DROP TABLE t1;
DROP TABLE fl2;
DROP TABLE fl1;
DROP TABLE fl0;
-SET GLOBAL innodb_monitor_enable=default;
-SET GLOBAL innodb_monitor_disable=default;
-SET GLOBAL innodb_monitor_reset_all=default;
+set global innodb_monitor_disable = 'adaptive\\_hash\\_p%';
+set global innodb_monitor_disable = 'adaptive\\_hash\\_r%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_n%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_s%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_g%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_s%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_u%';
+set global innodb_monitor_disable = 'buffer\\_f%';
+set global innodb_monitor_disable = 'buffer\\_page\\_%';
+set global innodb_monitor_disable = 'c%';
+set global innodb_monitor_disable = 'ddl%';
+set global innodb_monitor_disable = 'icp%';
+set global innodb_monitor_disable = 'index\\_p%';
+set global innodb_monitor_disable = 'innodb\\_di%';
+set global innodb_monitor_disable = 'innodb\\_l%';
+set global innodb_monitor_disable = 'innodb\\_m%';
+set global innodb_monitor_disable = 'lock\\_re%';
+set global innodb_monitor_disable = 'lock\\_ta%';
+set global innodb_monitor_disable = 'log%';
+set global innodb_monitor_disable = 'm%';
+set global innodb_monitor_disable = 'p%';
+set global innodb_monitor_disable = 't%';
+set global innodb_monitor_enable = 'log\\_w%';
+set global innodb_monitor_enable = 'trx_rseg_history_len';
+set global innodb_monitor_enable = 'trx_undo_slots_cached';
+set global innodb_monitor_enable=default;
+Warnings:
+Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
+set global innodb_monitor_disable=default;
+Warnings:
+Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
+set global innodb_monitor_reset_all=default;
+Warnings:
+Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
+select name, orig.enabled, new.enabled from
+orig_innodb_metrics orig join information_schema.innodb_metrics new using(name)
+where orig.enabled != new.enabled;
+name enabled enabled
diff --git a/mysql-test/suite/innodb/r/rename_table.result b/mysql-test/suite/innodb/r/rename_table.result
index 0ed56005..a3bf5910 100644
--- a/mysql-test/suite/innodb/r/rename_table.result
+++ b/mysql-test/suite/innodb/r/rename_table.result
@@ -21,11 +21,17 @@ path
DROP DATABASE abc_def;
# restart
DROP DATABASE abc_def2;
-call mtr.add_suppression("InnoDB: (Operating system error|Error number \\d+ means|Cannot rename file)");
+call mtr.add_suppression("InnoDB: Cannot rename '.*t1.ibd' to '.*non_existing_db.*' because the target schema directory doesn't exist");
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(100);
RENAME TABLE t1 TO non_existing_db.t1;
ERROR HY000: Error on rename of './test/t1' to './non_existing_db/t1' (errno: 168 "Unknown (generic) error from engine")
-FOUND 1 /\[ERROR\] InnoDB: Cannot rename file '.*t1\.ibd' to '.*non_existing_db/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Cannot rename '.*t1\.ibd' to '.*non_existing_db/ in mysqld.1.err
+SET GLOBAL innodb_fast_shutdown=2;
+# restart
+SELECT * FROM t1;
+a
+100
DROP TABLE t1;
#
# MDEV-25509 Atomic DDL: Assertion `err != DB_DUPLICATE_KEY'
diff --git a/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,16k.rdiff
index b36ed067..b36ed067 100644
--- a/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,16k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,32k.rdiff
index 8fa05781..8fa05781 100644
--- a/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,32k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,4k.rdiff
index 7d084636..7d084636 100644
--- a/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,4k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,64k.rdiff
index 3ac9f45b..3ac9f45b 100644
--- a/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,64k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,8k.rdiff
index 4da55ebf..4da55ebf 100644
--- a/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,8k.rdiff
diff --git a/mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff
new file mode 100644
index 00000000..812632ac
--- /dev/null
+++ b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff
@@ -0,0 +1,2 @@
+91a92
+> ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
diff --git a/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result
index 21085e4c..1fde89ac 100644
--- a/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result
+++ b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result
@@ -82,3 +82,11 @@ f29(10), f30(10), f31(10), f32(10),
f33(10)))
ENGINE=InnoDB;
ERROR 42000: Too many key parts specified; max 32 parts allowed
+#
+# MDEV-31161 Assertion failures upon adding a too long key
+# to table with COMPRESSED row format
+#
+CREATE TABLE t1(pk INT PRIMARY KEY, f1 INT, f2 TEXT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+INSERT INTO t1 (pk) VALUES (1);
+ALTER TABLE t1 ADD KEY (f1), ADD KEY (f2(1000));
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/undo_space_dblwr.result b/mysql-test/suite/innodb/r/undo_space_dblwr.result
index d6822b20..4466df98 100644
--- a/mysql-test/suite/innodb/r/undo_space_dblwr.result
+++ b/mysql-test/suite/innodb/r/undo_space_dblwr.result
@@ -4,15 +4,14 @@ 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);
-InnoDB 0 transactions not purged
-set GLOBAL innodb_log_checkpoint_now=1;
+SET GLOBAL innodb_fast_shutdown = 0;
+# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
# Make the first page dirty for undo tablespace
set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = 1;
-SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
-SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+SET GLOBAL innodb_buf_flush_list_now = 1;
# Kill the server
-# restart
+# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
FOUND 1 /Checksum mismatch in the first page of file/ in mysqld.1.err
check table t1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/innodb/r/undo_truncate.result b/mysql-test/suite/innodb/r/undo_truncate.result
index f90bef94..6d77baa9 100644
--- a/mysql-test/suite/innodb/r/undo_truncate.result
+++ b/mysql-test/suite/innodb/r/undo_truncate.result
@@ -27,6 +27,7 @@ delete from t1;
connection con2;
delete from t2;
connection con1;
+SET GLOBAL innodb_max_undo_log_size = @@GLOBAL.innodb_page_size * 4294967296;
SET GLOBAL innodb_undo_log_truncate = 1;
commit;
disconnect con1;
@@ -35,6 +36,8 @@ commit;
disconnect con2;
connection default;
SET GLOBAL innodb_max_purge_lag_wait=0;
+SET GLOBAL innodb_max_undo_log_size=DEFAULT;
+SET GLOBAL innodb_max_purge_lag_wait=0;
set global innodb_fast_shutdown=0;
# restart
drop table t1, t2;