summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorJacob Mathew <jacob.mathew@mariadb.com>2018-03-13 16:15:37 -0700
committerJacob Mathew <jacob.mathew@mariadb.com>2018-03-13 16:15:37 -0700
commit1b82bec3c9ade9864dc9483e99d7b527ebff6bf1 (patch)
tree0f7cadc18142819248138802f73e4e0e638c8026 /mysql-test
parent90247658e066c3ae5da1fefb988f5564e24abc90 (diff)
parent9d95b8665a3d87ab857e77e220effc64454eb881 (diff)
downloadmariadb-git-bb-10.2-MDEV-14019.tar.gz
Merge branch '10.2' into bb-10.2-MDEV-14019bb-10.2-MDEV-14019
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/lib/My/Tee.pm2
-rw-r--r--mysql-test/r/query_cache.result19
-rw-r--r--mysql-test/r/sp.result8
-rw-r--r--mysql-test/r/warnings.result12
-rw-r--r--mysql-test/r/xa.result21
-rw-r--r--mysql-test/suite/encryption/r/innodb-discard-import.result2
-rw-r--r--mysql-test/suite/encryption/t/innodb-discard-import.test3
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_alter.result85
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_compatibility.result108
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_create,dynamic.rdiff11
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff11
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_create.result26
-rw-r--r--mysql-test/suite/innodb/r/file_format_defaults.result74
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_alter.test98
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_compatibility.test167
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_create.test28
-rw-r--r--mysql-test/suite/innodb/t/file_format_defaults-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/file_format_defaults.test76
-rw-r--r--mysql-test/t/query_cache.test15
-rw-r--r--mysql-test/t/sp.test10
-rw-r--r--mysql-test/t/warnings-master.opt2
-rw-r--r--mysql-test/t/warnings.test12
-rw-r--r--mysql-test/t/xa.test37
23 files changed, 824 insertions, 4 deletions
diff --git a/mysql-test/lib/My/Tee.pm b/mysql-test/lib/My/Tee.pm
index ee82e6f45ae..5985fe33739 100644
--- a/mysql-test/lib/My/Tee.pm
+++ b/mysql-test/lib/My/Tee.pm
@@ -1,4 +1,5 @@
package My::Tee;
+use IO::Handle;
# see PerlIO::via
@@ -16,6 +17,7 @@ sub WRITE
{
my ($obj, $buf, $fh) = @_;
print $fh $buf;
+ $fh->flush;
print $copyfh $buf;
return length($buf);
}
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index eb9b1d16011..ee734845a9e 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -2168,6 +2168,25 @@ show status like "Qcache_hits";
Variable_name Value
Qcache_hits 1
drop table t1;
+#
+# MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM
+# LAST_INSERT_ID ()
+# (part 2, part 1 is in sp.test)
+#
+create table t1 (a int);
+insert into t1 values (1);
+CREATE FUNCTION foo (i INT UNSIGNED ) RETURNS int deterministic RETURN 1;
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+SELECT foo( LAST_INSERT_ID() ) from t1;
+foo( LAST_INSERT_ID() )
+1
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+DROP FUNCTION foo;
+drop table t1;
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size= default;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index d99780ad2ee..274727d58c4 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -8335,3 +8335,11 @@ ERROR 42S22: Unknown column 'name2' in 'field list'
drop procedure p1;
drop procedure p2;
drop procedure p3;
+#
+# MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM
+# LAST_INSERT_ID ()
+# (part 1, part 2 is in query_cache.test)
+#
+CREATE PROCEDURE foo ( IN i INT UNSIGNED ) BEGIN END;
+CALL foo( LAST_INSERT_ID() );
+DROP PROCEDURE foo;
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 3f4f62dc935..596cf5f2795 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -357,3 +357,15 @@ Error 1062 Duplicate entry '11' for key 'a'
DROP TABLE t1;
DROP FUNCTION f1;
+connect con1,localhost,root,,;
+SELECT TIME('10:10:10.11111111111');
+TIME('10:10:10.11111111111')
+10:10:10.111111
+Warnings:
+Note 1292 Truncated incorrect time value: '10:10:10.11111111111'
+disconnect con1;
+connect con2,localhost,root,,;
+SHOW WARNINGS;
+Level Code Message
+disconnect con2;
+connection default;
diff --git a/mysql-test/r/xa.result b/mysql-test/r/xa.result
index 0470c284a29..6ae4a06399c 100644
--- a/mysql-test/r/xa.result
+++ b/mysql-test/r/xa.result
@@ -270,3 +270,24 @@ XA ROLLBACK 'xid1';
connection default;
DROP TABLE t1, t2;
disconnect con2;
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2);
+CREATE TABLE t3 (i INT) ENGINE=InnoDB;
+XA BEGIN 'xid1';
+REPLACE INTO t1 SELECT * FROM t2;
+connect con1,localhost,root,,test;
+XA BEGIN 'xid2';
+INSERT INTO t1 SELECT * FROM t2;
+connection default;
+REPLACE INTO t2 SELECT * FROM t2;
+connection con1;
+disconnect con1;
+connect con2,localhost,root,,test;
+INSERT INTO t3 VALUES (1);
+XA BEGIN 'xid3';
+disconnect con2;
+connection default;
+XA END 'xid1';
+XA ROLLBACK 'xid1';
+DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/encryption/r/innodb-discard-import.result b/mysql-test/suite/encryption/r/innodb-discard-import.result
index 91314a77177..69641be92f1 100644
--- a/mysql-test/suite/encryption/r/innodb-discard-import.result
+++ b/mysql-test/suite/encryption/r/innodb-discard-import.result
@@ -129,6 +129,6 @@ NOT FOUND /barfoo/ in t2.ibd
# t3 yes on expecting NOT FOUND
NOT FOUND /tmpres/ in t3.ibd
# t4 yes on expecting NOT FOUND
-NOT FOUND /mysql/ in t4.ibd
+# MDEV-15527 FIXME: Enable this test!
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/suite/encryption/t/innodb-discard-import.test b/mysql-test/suite/encryption/t/innodb-discard-import.test
index e105cf82b67..9e78df813f9 100644
--- a/mysql-test/suite/encryption/t/innodb-discard-import.test
+++ b/mysql-test/suite/encryption/t/innodb-discard-import.test
@@ -111,7 +111,8 @@ SELECT COUNT(*) FROM t4;
--let SEARCH_PATTERN=mysql
--echo # t4 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t4_IBD
--- source include/search_pattern_in_file.inc
+--echo # MDEV-15527 FIXME: Enable this test!
+#-- source include/search_pattern_in_file.inc
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/suite/innodb/r/default_row_format_alter.result b/mysql-test/suite/innodb/r/default_row_format_alter.result
new file mode 100644
index 00000000000..fd88fb5a3fe
--- /dev/null
+++ b/mysql-test/suite/innodb/r/default_row_format_alter.result
@@ -0,0 +1,85 @@
+SET @row_format = @@GLOBAL.innodb_default_row_format;
+####################################
+# Check if table rebuilding alter isn't affect if table is created
+# with explicit row_format
+CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 'abc');
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL row_format=COMPACT
+SET GLOBAL innodb_default_row_format=DYNAMIC;
+ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY;
+# Here we expect COMPACT because it was explicitly specified at CREATE
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL row_format=COMPACT
+DROP TABLE t1;
+####################################
+# Check if table rebuilding alter is affected when there is no
+# row_format specified at CREATE TABLE.
+SET GLOBAL innodb_default_row_format = COMPACT;
+CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 'abc');
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL
+SET GLOBAL innodb_default_row_format = DYNAMIC;
+ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY;
+# Here we expect DYNAMIC because there is no explicit ROW_FORMAT and the
+# default_row_format is changed to DYNAMIC just before ALTER
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Dynamic # # # # # # NULL # # NULL latin1_swedish_ci NULL
+DROP TABLE t1;
+####################################
+# Check the row_format effect on ALTER, ALGORITHM=COPY
+SET GLOBAL innodb_default_row_format = REDUNDANT;
+CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Redundant # # # # # # NULL # # NULL latin1_swedish_ci NULL
+SET GLOBAL innoDB_default_row_format = COMPACT;
+ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY;
+# Because of ALGORITHM=COPY, there is TABLE REBUILD and the table isn't
+# created with explicit row_format, so we expect ROW_FORMAT=COMPACT
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL
+DROP TABLE t1;
+
+###################################
+# Check the row_format effect on ALTER, ALGORITH=COPY on
+# create table with explicit row_format
+CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Redundant # # # # # # NULL # # NULL latin1_swedish_ci NULL row_format=REDUNDANT
+SET GLOBAL innoDB_default_row_format = COMPACT;
+ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY;
+# Because of ALGORITHM=COPY, there is TABLE REBUILD and the table is
+# created with explicit row_format, so we expect original
+# ROW_FORMAT=REDUNDANT
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Redundant # # # # # # NULL # # NULL latin1_swedish_ci NULL row_format=REDUNDANT
+DROP TABLE t1;
+
+##################################
+# Check row_format on ALTER ALGORITHM=INPLACE
+SET GLOBAL innodb_default_row_format=COMPACT;
+CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT, KEY k1(b(10))) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL
+SET GLOBAL innodb_default_row_format=DYNAMIC;
+ALTER TABLE t1 DROP INDEX k1;
+# Because it is in-place operation, there is no rebuild, so the
+# original format has to be retained.
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL
+DROP TABLE t1;
+SET GLOBAL innodb_default_row_format = @row_format;
diff --git a/mysql-test/suite/innodb/r/default_row_format_compatibility.result b/mysql-test/suite/innodb/r/default_row_format_compatibility.result
new file mode 100644
index 00000000000..c0fb8f029a5
--- /dev/null
+++ b/mysql-test/suite/innodb/r/default_row_format_compatibility.result
@@ -0,0 +1,108 @@
+SET @row_format = @@GLOBAL.innodb_default_row_format;
+SET @large_prefix = @@GLOBAL.innodb_large_prefix;
+SET @file_format = @@GLOBAL.innodb_file_format;
+SET GLOBAL innodb_file_format = barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+# ###########################################################
+# Check with Import/Export tablespace with Default_row_format
+SET GLOBAL innodb_default_row_format=Compact;
+SELECT @@innodb_default_row_format;
+@@innodb_default_row_format
+compact
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table
+1
+CREATE TABLE tab(a INT) ENGINE=InnoDB;
+SHOW TABLE STATUS LIKE 'tab';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+tab InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
+INSERT INTO tab VALUES(1);
+INSERT INTO tab VALUES(2);
+SELECT * FROM tab;
+a
+1
+2
+FLUSH TABLE tab FOR EXPORT;
+UNLOCK TABLES;
+DROP TABLE tab;
+SET GLOBAL innodb_default_row_format=Dynamic;
+CREATE TABLE tab(a INT) ENGINE=InnoDB;
+ALTER TABLE tab DISCARD TABLESPACE;
+ALTER TABLE tab IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1)
+DROP TABLE tab;
+SET GLOBAL innodb_default_row_format=Compact;
+SELECT @@innodb_default_row_format;
+@@innodb_default_row_format
+compact
+CREATE TABLE tab(a INT) ENGINE=InnoDB;
+SHOW TABLE STATUS LIKE 'tab';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+tab InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
+ALTER TABLE tab DISCARD TABLESPACE;
+ALTER TABLE tab IMPORT TABLESPACE;
+SELECT * FROM tab;
+a
+1
+2
+DROP TABLE tab;
+# ###########################################################
+SET GLOBAL innodb_default_row_format=Dynamic;
+SET GLOBAL innodb_large_prefix=ON;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SELECT @@innodb_default_row_format;
+@@innodb_default_row_format
+dynamic
+CREATE TABLE tab(a INT PRIMARY KEY, b VARCHAR(5000), KEY idx1(b(3070))) ENGINE= InnoDB;
+SHOW TABLE STATUS LIKE 'tab';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+tab InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
+INSERT INTO tab(a,b) VALUES(1,'Check with max column size');
+SELECT * FROM tab;
+a b
+1 Check with max column size
+SET GLOBAL innodb_default_row_format=COMPACT;
+ALTER TABLE tab ROW_FORMAT=COMPACT;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes
+DROP TABLE tab;
+SET GLOBAL innodb_default_row_format=Default;
+SELECT @@innodb_default_row_format;
+@@innodb_default_row_format
+dynamic
+SET GLOBAL innodb_default_row_format=Dynamic;
+SELECT @@innodb_default_row_format;
+@@innodb_default_row_format
+dynamic
+CREATE TABLE tab(a INT PRIMARY KEY, b VARCHAR(5000), KEY idx1(b(767))) ENGINE= InnoDB;
+SHOW TABLE STATUS LIKE 'tab';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+tab InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
+INSERT INTO tab(a,b) VALUES(1,'Check with max column size');
+SELECT * FROM tab;
+a b
+1 Check with max column size
+ALTER TABLE tab ROW_FORMAT=COMPACT;
+SHOW TABLE STATUS LIKE 'tab';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+tab InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPACT
+SELECT * FROM tab;
+a b
+1 Check with max column size
+ALTER TABLE tab ROW_FORMAT=COMPRESSED;
+SELECT * FROM tab;
+a b
+1 Check with max column size
+ALTER TABLE tab ROW_FORMAT=Dynamic;
+SHOW TABLE STATUS LIKE 'tab';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+tab InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC
+DROP TABLE tab;
+SET GLOBAL innodb_default_row_format = @row_format;
+SET GLOBAL innodb_large_prefix = @large_prefix;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SET GLOBAL innodb_file_format = @file_format;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
diff --git a/mysql-test/suite/innodb/r/default_row_format_create,dynamic.rdiff b/mysql-test/suite/innodb/r/default_row_format_create,dynamic.rdiff
new file mode 100644
index 00000000000..bb23b78213b
--- /dev/null
+++ b/mysql-test/suite/innodb/r/default_row_format_create,dynamic.rdiff
@@ -0,0 +1,11 @@
+--- default_row_format_create.result
++++ default_row_format_create,dynamic.result
+@@ -1,7 +1,7 @@
+ CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB;
+ SHOW TABLE STATUS LIKE 't1';
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+-t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
++t1 InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ SHOW TABLE STATUS LIKE 't1';
diff --git a/mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff b/mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff
new file mode 100644
index 00000000000..35aa402edd9
--- /dev/null
+++ b/mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff
@@ -0,0 +1,11 @@
+--- default_row_format_create.result
++++ default_row_format_create,redundant.result
+@@ -1,7 +1,7 @@
+ CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB;
+ SHOW TABLE STATUS LIKE 't1';
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+-t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
++t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ SHOW TABLE STATUS LIKE 't1';
diff --git a/mysql-test/suite/innodb/r/default_row_format_create.result b/mysql-test/suite/innodb/r/default_row_format_create.result
new file mode 100644
index 00000000000..e80c1283b37
--- /dev/null
+++ b/mysql-test/suite/innodb/r/default_row_format_create.result
@@ -0,0 +1,26 @@
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL
+DROP TABLE t1;
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC
+DROP TABLE t1;
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPACT
+DROP TABLE t1;
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=REDUNDANT
+DROP TABLE t1;
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 InnoDB # Compressed # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPRESSED key_block_size=1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/file_format_defaults.result b/mysql-test/suite/innodb/r/file_format_defaults.result
new file mode 100644
index 00000000000..5ea34ceb7b5
--- /dev/null
+++ b/mysql-test/suite/innodb/r/file_format_defaults.result
@@ -0,0 +1,74 @@
+call mtr.add_suppression("InnoDB: Cannot add field `c1` in table `test`\\.`tab0`");
+SELECT @@innodb_strict_mode;
+@@innodb_strict_mode
+1
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table
+1
+SET @file_format = @@GLOBAL.innodb_file_format;
+SET GLOBAL innodb_large_prefix=ON;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SET SQL_MODE=strict_all_tables;
+CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+SHOW CREATE TABLE tab0;
+Table Create Table
+tab0 CREATE TABLE `tab0` (
+ `c1` varchar(65530) DEFAULT NULL,
+ KEY `c1` (`c1`(3072))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+DROP TABLE tab0;
+CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB KEY_BLOCK_SIZE=2;
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
+ERROR HY000: Can't create table `test`.`tab0` (errno: 140 "Wrong create options")
+SET GLOBAL innodb_file_format=Default;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
+DROP TABLE tab0;
+SELECT @@innodb_file_format;
+@@innodb_file_format
+Barracuda
+SET GLOBAL innodb_strict_mode=OFF;
+SET GLOBAL innodb_strict_mode=Default;
+SELECT @@innodb_strict_mode;
+@@innodb_strict_mode
+1
+SET GLOBAL innodb_large_prefix=OFF;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SELECT @@innodb_large_prefix;
+@@innodb_large_prefix
+0
+SET GLOBAL innodb_large_prefix=Default;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SELECT @@innodb_large_prefix;
+@@innodb_large_prefix
+1
+SET GLOBAL innodb_file_format_max=Default;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SELECT @@innodb_file_format_max;
+@@innodb_file_format_max
+Antelope
+CREATE TABLE tab1(c1 int ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+SELECT @@innodb_file_format_max;
+@@innodb_file_format_max
+Barracuda
+SET GLOBAL innodb_file_format_max=Default;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SET GLOBAL innodb_large_prefix=off;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+SET GLOBAL innodb_file_format = @file_format;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
+DROP TABLE tab1;
diff --git a/mysql-test/suite/innodb/t/default_row_format_alter.test b/mysql-test/suite/innodb/t/default_row_format_alter.test
new file mode 100644
index 00000000000..8f7217bcf0c
--- /dev/null
+++ b/mysql-test/suite/innodb/t/default_row_format_alter.test
@@ -0,0 +1,98 @@
+--source include/have_innodb.inc
+
+SET @row_format = @@GLOBAL.innodb_default_row_format;
+
+--echo ####################################
+--echo # Check if table rebuilding alter isn't affect if table is created
+--echo # with explicit row_format
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 'abc');
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+
+SET GLOBAL innodb_default_row_format=DYNAMIC;
+ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY;
+
+--echo # Here we expect COMPACT because it was explicitly specified at CREATE
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+--echo ####################################
+--echo # Check if table rebuilding alter is affected when there is no
+--echo # row_format specified at CREATE TABLE.
+SET GLOBAL innodb_default_row_format = COMPACT;
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 'abc');
+
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+
+SET GLOBAL innodb_default_row_format = DYNAMIC;
+ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY;
+
+--echo # Here we expect DYNAMIC because there is no explicit ROW_FORMAT and the
+--echo # default_row_format is changed to DYNAMIC just before ALTER
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+--echo ####################################
+--echo # Check the row_format effect on ALTER, ALGORITHM=COPY
+SET GLOBAL innodb_default_row_format = REDUNDANT;
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
+
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+
+SET GLOBAL innoDB_default_row_format = COMPACT;
+ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY;
+
+--echo # Because of ALGORITHM=COPY, there is TABLE REBUILD and the table isn't
+--echo # created with explicit row_format, so we expect ROW_FORMAT=COMPACT
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+--echo
+--echo ###################################
+--echo # Check the row_format effect on ALTER, ALGORITH=COPY on
+--echo # create table with explicit row_format
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
+
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+
+SET GLOBAL innoDB_default_row_format = COMPACT;
+ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY;
+
+--echo # Because of ALGORITHM=COPY, there is TABLE REBUILD and the table is
+--echo # created with explicit row_format, so we expect original
+--echo # ROW_FORMAT=REDUNDANT
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+--echo
+--echo ##################################
+--echo # Check row_format on ALTER ALGORITHM=INPLACE
+SET GLOBAL innodb_default_row_format=COMPACT;
+
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT, KEY k1(b(10))) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, REPEAT('abc',1000));
+
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+
+SET GLOBAL innodb_default_row_format=DYNAMIC;
+ALTER TABLE t1 DROP INDEX k1;
+
+--echo # Because it is in-place operation, there is no rebuild, so the
+--echo # original format has to be retained.
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+SET GLOBAL innodb_default_row_format = @row_format;
diff --git a/mysql-test/suite/innodb/t/default_row_format_compatibility.test b/mysql-test/suite/innodb/t/default_row_format_compatibility.test
new file mode 100644
index 00000000000..17ab21ca06b
--- /dev/null
+++ b/mysql-test/suite/innodb/t/default_row_format_compatibility.test
@@ -0,0 +1,167 @@
+--source include/have_innodb.inc
+
+SET @row_format = @@GLOBAL.innodb_default_row_format;
+SET @large_prefix = @@GLOBAL.innodb_large_prefix;
+SET @file_format = @@GLOBAL.innodb_file_format;
+SET GLOBAL innodb_file_format = barracuda;
+
+# set the variables
+let $MYSQLD_DATADIR = `SELECT @@datadir`;
+
+--echo # ###########################################################
+--echo # Check with Import/Export tablespace with Default_row_format
+
+# Set row_format=Compact
+SET GLOBAL innodb_default_row_format=Compact;
+
+# Check row_format=Compact
+SELECT @@innodb_default_row_format;
+
+# Check file_per_table=1
+SELECT @@innodb_file_per_table;
+
+CREATE TABLE tab(a INT) ENGINE=InnoDB;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 'tab';
+
+INSERT INTO tab VALUES(1);
+INSERT INTO tab VALUES(2);
+
+# Check the rows
+SELECT * FROM tab;
+
+FLUSH TABLE tab FOR EXPORT;
+
+# Take the backup of the ibd and cfg files
+--copy_file $MYSQLD_DATADIR/test/tab.cfg $MYSQLD_DATADIR/tab.cfg
+--copy_file $MYSQLD_DATADIR/test/tab.ibd $MYSQLD_DATADIR/tab.ibd
+
+UNLOCK TABLES;
+
+# Cleanup
+DROP TABLE tab;
+
+# Set the default_row_format=Dynamic
+SET GLOBAL innodb_default_row_format=Dynamic;
+
+CREATE TABLE tab(a INT) ENGINE=InnoDB;
+
+# Remove the *.ibd file
+ALTER TABLE tab DISCARD TABLESPACE;
+
+# Move the *.ibd,*.cfg file into orginal location
+--move_file $MYSQLD_DATADIR/tab.cfg $MYSQLD_DATADIR/test/tab.cfg
+--move_file $MYSQLD_DATADIR/tab.ibd $MYSQLD_DATADIR/test/tab.ibd
+
+--error ER_TABLE_SCHEMA_MISMATCH
+ALTER TABLE tab IMPORT TABLESPACE;
+
+# Take the backup of the ibd and cfg files
+--copy_file $MYSQLD_DATADIR/test/tab.cfg $MYSQLD_DATADIR/tab.cfg
+--copy_file $MYSQLD_DATADIR/test/tab.ibd $MYSQLD_DATADIR/tab.ibd
+
+# Cleanup
+DROP TABLE tab;
+
+# Remove orphan files
+--remove_file $MYSQLD_DATADIR/test/tab.cfg
+--remove_file $MYSQLD_DATADIR/test/tab.ibd
+
+# Set the default_row_format=Compact
+SET GLOBAL innodb_default_row_format=Compact;
+
+# Check row_format=Compact
+SELECT @@innodb_default_row_format;
+
+CREATE TABLE tab(a INT) ENGINE=InnoDB;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 'tab';
+
+# Remove the *.ibd file
+ALTER TABLE tab DISCARD TABLESPACE;
+
+# Move the *ibd,*.cfg file into orginal location
+--move_file $MYSQLD_DATADIR/tab.cfg $MYSQLD_DATADIR/test/tab.cfg
+--move_file $MYSQLD_DATADIR/tab.ibd $MYSQLD_DATADIR/test/tab.ibd
+
+# Check import is successful (because same row_format)
+ALTER TABLE tab IMPORT TABLESPACE;
+
+# Check the rows
+SELECT * FROM tab;
+
+# Cleanup
+DROP TABLE tab;
+
+--echo # ###########################################################
+# Check when Index Column size (3070 bytes) is too long, Change row_format
+# Check when Index Column size (767 bytes), Change row_format
+# Dynamic to Compact to Dynamic
+
+# Set the default_row_format=Dynamic
+SET GLOBAL innodb_default_row_format=Dynamic;
+SET GLOBAL innodb_large_prefix=ON;
+
+SELECT @@innodb_default_row_format;
+
+CREATE TABLE tab(a INT PRIMARY KEY, b VARCHAR(5000), KEY idx1(b(3070))) ENGINE= InnoDB;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 'tab';
+
+INSERT INTO tab(a,b) VALUES(1,'Check with max column size');
+
+# Check by SELECT, no errors
+SELECT * FROM tab;
+
+# Change row_format to Compact
+SET GLOBAL innodb_default_row_format=COMPACT;
+
+# Check error ERROR 1709 (HY000): Index column size too large
+-- error ER_INDEX_COLUMN_TOO_LONG
+ALTER TABLE tab ROW_FORMAT=COMPACT;
+
+# Cleanup
+DROP TABLE tab;
+
+# Change the default_row_format to default
+SET GLOBAL innodb_default_row_format=Default;
+SELECT @@innodb_default_row_format;
+SET GLOBAL innodb_default_row_format=Dynamic;
+
+# Change row_format to Dynamic
+SELECT @@innodb_default_row_format;
+
+CREATE TABLE tab(a INT PRIMARY KEY, b VARCHAR(5000), KEY idx1(b(767))) ENGINE= InnoDB;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 'tab';
+
+INSERT INTO tab(a,b) VALUES(1,'Check with max column size');
+
+# Check by SELECT, no errors
+SELECT * FROM tab;
+
+# Check no errors because Compact allows 767 bytes
+ALTER TABLE tab ROW_FORMAT=COMPACT;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 'tab';
+
+# Check by SELECT, no errors
+SELECT * FROM tab;
+
+# Check no errors
+ALTER TABLE tab ROW_FORMAT=COMPRESSED;
+
+# Check by SELECT, no errors
+SELECT * FROM tab;
+
+# Check no errors
+ALTER TABLE tab ROW_FORMAT=Dynamic;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 'tab';
+
+# Cleanup
+DROP TABLE tab;
+
+SET GLOBAL innodb_default_row_format = @row_format;
+SET GLOBAL innodb_large_prefix = @large_prefix;
+SET GLOBAL innodb_file_format = @file_format;
diff --git a/mysql-test/suite/innodb/t/default_row_format_create.test b/mysql-test/suite/innodb/t/default_row_format_create.test
new file mode 100644
index 00000000000..e0981abf7eb
--- /dev/null
+++ b/mysql-test/suite/innodb/t/default_row_format_create.test
@@ -0,0 +1,28 @@
+--source include/have_innodb.inc
+--source include/innodb_row_format.inc
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/file_format_defaults-master.opt b/mysql-test/suite/innodb/t/file_format_defaults-master.opt
new file mode 100644
index 00000000000..202ecee6d48
--- /dev/null
+++ b/mysql-test/suite/innodb/t/file_format_defaults-master.opt
@@ -0,0 +1 @@
+--innodb_large_prefix=OFF --innodb_file_format=barracuda --innodb-file-format-check=off --innodb-file-format-max=antelope
diff --git a/mysql-test/suite/innodb/t/file_format_defaults.test b/mysql-test/suite/innodb/t/file_format_defaults.test
new file mode 100644
index 00000000000..d276ad6e834
--- /dev/null
+++ b/mysql-test/suite/innodb/t/file_format_defaults.test
@@ -0,0 +1,76 @@
+#***********************************************************
+# WL#7703:
+# Check the max key length 3072 when innodb_large_prefix=ON
+# Check boundary value of max key length 3073
+# When innodb_file_format=Antelope, compress DDLs fails
+# Check file_format_max becomes Barracuda on DDL operation
+# on compression table.
+#***********************************************************
+-- source include/have_innodb.inc
+-- source include/have_innodb_16k.inc
+
+call mtr.add_suppression("InnoDB: Cannot add field `c1` in table `test`\\.`tab0`");
+
+# Check some default settings
+SELECT @@innodb_strict_mode;
+
+SELECT @@innodb_file_per_table;
+
+SET @file_format = @@GLOBAL.innodb_file_format;
+
+SET GLOBAL innodb_large_prefix=ON;
+SET SQL_MODE=strict_all_tables;
+
+CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+SHOW CREATE TABLE tab0;
+DROP TABLE tab0;
+
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB KEY_BLOCK_SIZE=2;
+
+SET GLOBAL innodb_file_format=Antelope;
+
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
+
+SET GLOBAL innodb_file_format=Default;
+
+CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
+DROP TABLE tab0;
+
+SELECT @@innodb_file_format;
+
+SET GLOBAL innodb_strict_mode=OFF;
+
+# Check with default value
+SET GLOBAL innodb_strict_mode=Default;
+
+SELECT @@innodb_strict_mode;
+
+SET GLOBAL innodb_large_prefix=OFF;
+
+SELECT @@innodb_large_prefix;
+
+SET GLOBAL innodb_large_prefix=Default;
+
+# Check with default value
+SELECT @@innodb_large_prefix;
+
+SET GLOBAL innodb_file_format_max=Default;
+
+# Check with default value
+SELECT @@innodb_file_format_max;
+
+CREATE TABLE tab1(c1 int ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+
+# Check file format changed to Barracuda, on DDL operation
+SELECT @@innodb_file_format_max;
+
+SET GLOBAL innodb_file_format_max=Default;
+
+# Restore to the value that we explicitly used at startup.
+SET GLOBAL innodb_large_prefix=off;
+
+SET GLOBAL innodb_file_format = @file_format;
+
+DROP TABLE tab1;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index c354032bc36..1b1e24bc6f4 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -1767,6 +1767,21 @@ show status like "Qcache_inserts";
show status like "Qcache_hits";
drop table t1;
+--echo #
+--echo # MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM
+--echo # LAST_INSERT_ID ()
+--echo # (part 2, part 1 is in sp.test)
+--echo #
+
+create table t1 (a int);
+insert into t1 values (1);
+CREATE FUNCTION foo (i INT UNSIGNED ) RETURNS int deterministic RETURN 1;
+show status like "Qcache_queries_in_cache";
+SELECT foo( LAST_INSERT_ID() ) from t1;
+show status like "Qcache_queries_in_cache";
+DROP FUNCTION foo;
+drop table t1;
+
--echo restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size= default;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 68a0c060906..529ebd4736a 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -9840,3 +9840,13 @@ call p3();
drop procedure p1;
drop procedure p2;
drop procedure p3;
+
+--echo #
+--echo # MDEV-15328: MariaDB 10.2.13 Crashes upon CALL PROCEDURE PARAM
+--echo # LAST_INSERT_ID ()
+--echo # (part 1, part 2 is in query_cache.test)
+--echo #
+
+CREATE PROCEDURE foo ( IN i INT UNSIGNED ) BEGIN END;
+CALL foo( LAST_INSERT_ID() );
+DROP PROCEDURE foo;
diff --git a/mysql-test/t/warnings-master.opt b/mysql-test/t/warnings-master.opt
index 21356507809..1aa6001465b 100644
--- a/mysql-test/t/warnings-master.opt
+++ b/mysql-test/t/warnings-master.opt
@@ -1 +1 @@
---loose-skip-innodb
+--loose-skip-innodb --thread-handling=one-thread-per-connection
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 573f3c538c7..9360d32f93d 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -286,3 +286,15 @@ SHOW WARNINGS;
DROP TABLE t1;
DROP FUNCTION f1;
+
+# MDEV-14581 Warning info not cleared when caching THD
+connect (con1,localhost,root,,);
+SELECT TIME('10:10:10.11111111111');
+disconnect con1;
+
+connect (con2,localhost,root,,);
+SHOW WARNINGS;
+disconnect con2;
+
+connection default;
+
diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test
index 7303030921d..58ad1caaeef 100644
--- a/mysql-test/t/xa.test
+++ b/mysql-test/t/xa.test
@@ -394,6 +394,41 @@ DROP TABLE t1, t2;
disconnect con2;
-# Wait till all disconnects are completed
+#
+# MDEV 15217 Assertion `thd->transaction.xid_state.xid.is_null()' failed in trans_xa_start.
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2);
+CREATE TABLE t3 (i INT) ENGINE=InnoDB;
+
+XA BEGIN 'xid1';
+REPLACE INTO t1 SELECT * FROM t2;
+
+--connect (con1,localhost,root,,test)
+XA BEGIN 'xid2';
+--send
+INSERT INTO t1 SELECT * FROM t2;
+
+--connection default
+REPLACE INTO t2 SELECT * FROM t2;
+
+--connection con1
+--error 0, ER_LOCK_DEADLOCK, ER_LOCK_WAIT_TIMEOUT
+--reap
+--disconnect con1
+
+--connect (con2,localhost,root,,test)
+INSERT INTO t3 VALUES (1);
+XA BEGIN 'xid3';
+
+
+#Cleanup
+--disconnect con2
+--connection default
+XA END 'xid1';
+XA ROLLBACK 'xid1';
+DROP TABLE t1, t2, t3;
+
--source include/wait_until_count_sessions.inc