summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-21 12:54:56 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-21 12:54:56 +0200
commit59d51f0c12d6f2bccc8354079be67c6e520d3675 (patch)
treed4bf888eceb9434807dd4889fd04257d5bf5ad2b /mysql-test/suite/innodb/t
parentfb8bc59f0120fbd3517a291e71d81c3d11443baa (diff)
parent4368efe870f225279106798f71978b68c473e2ab (diff)
downloadmariadb-git-59d51f0c12d6f2bccc8354079be67c6e520d3675.tar.gz
Merge branch '10.2' into bb-10.2-connector-c-integ-subm
Diffstat (limited to 'mysql-test/suite/innodb/t')
-rw-r--r--mysql-test/suite/innodb/t/auto_increment_dup.opt2
-rw-r--r--mysql-test/suite/innodb/t/auto_increment_dup.test132
-rw-r--r--mysql-test/suite/innodb/t/create_isl_with_direct.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-16k.test21
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-discard.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-table.test33
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-tempfile.test7
-rw-r--r--mysql-test/suite/innodb/t/innodb-blob.test54
-rw-r--r--mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test24
-rw-r--r--mysql-test/suite/innodb/t/innodb-fk-warnings.test20
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev-7408.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev-7513.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev7046.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-virtual-columns.test6
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-1.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test10
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test10
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-zip.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb.test146
-rw-r--r--mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test52
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12400341.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12902967.test9
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491-master.opt5
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491.test56
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30423.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34053.test20
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34300.test28
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60049-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60049.test17
-rw-r--r--mysql-test/suite/innodb/t/innodb_corrupt_bit.test22
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_big5.test25
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_latin1.test25
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_utf8.test25
-rw-r--r--mysql-test/suite/innodb/t/innodb_gis.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql-master.opt4
-rw-r--r--mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test4
-rw-r--r--mysql-test/suite/innodb/t/strict_mode.test2
45 files changed, 542 insertions, 263 deletions
diff --git a/mysql-test/suite/innodb/t/auto_increment_dup.opt b/mysql-test/suite/innodb/t/auto_increment_dup.opt
new file mode 100644
index 00000000000..ab372c3a6fc
--- /dev/null
+++ b/mysql-test/suite/innodb/t/auto_increment_dup.opt
@@ -0,0 +1,2 @@
+--innodb_autoinc_lock_mode=1
+--innodb_lock_wait_timeout=2
diff --git a/mysql-test/suite/innodb/t/auto_increment_dup.test b/mysql-test/suite/innodb/t/auto_increment_dup.test
index 798a4ecbff7..45e4559a038 100644
--- a/mysql-test/suite/innodb/t/auto_increment_dup.test
+++ b/mysql-test/suite/innodb/t/auto_increment_dup.test
@@ -10,6 +10,125 @@
drop table if exists t1;
--enable_warnings
+set global transaction isolation level repeatable read;
+
+CREATE TABLE t1(
+ id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ k INT,
+ c CHAR(1),
+ UNIQUE KEY(k)) ENGINE=InnoDB;
+
+SHOW CREATE TABLE t1;
+
+--enable_info
+
+--echo #
+--echo # Sequential execution
+--echo #
+
+INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1';
+
+--echo #
+--echo # 1 duplicate
+--echo #
+INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
+--echo #
+--echo # 5 rows, consecutive auto_inc values
+--echo #
+
+SELECT * FROM t1 order by k;
+
+DROP TABLE t1;
+
+CREATE TABLE t1(
+ id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ k INT,
+ c CHAR(1),
+ UNIQUE KEY(k)) ENGINE=InnoDB;
+
+--echo #
+--echo # Sequential execution 2
+--echo #
+
+INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
+
+--echo #
+--echo # 1 duplicate
+--echo #
+INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1';
+--echo #
+--echo # 5 rows, consecutive auto_inc values
+--echo #
+
+SELECT * FROM t1 order by k;
+
+DROP TABLE t1;
+
+CREATE TABLE t1(
+ id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ k INT,
+ c CHAR(1),
+ UNIQUE KEY(k)) ENGINE=InnoDB;
+
+--echo #
+--echo # Parallel execution
+--echo #
+
+--connect(con1, localhost, root)
+--connect(con2, localhost, root)
+
+--send SET DEBUG_SYNC='now WAIT_FOR write_row_done'
+--connection con1
+--echo #
+--echo # Connection 1
+--echo #
+SET DEBUG_SYNC='ha_write_row_end SIGNAL write_row_done WAIT_FOR continue';
+--send INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1'
+--connection con2
+--echo #
+--echo # Connection 2
+--echo #
+--reap
+SET DEBUG_SYNC='execute_command_after_close_tables SIGNAL continue';
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
+
+--connection con1
+--echo #
+--echo # 2 duplicates
+--echo #
+--reap
+--connection default
+--echo #
+--echo # 3 rows
+--echo #
+
+SELECT * FROM t1 order by k;
+
+INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
+
+SELECT * FROM t1 order by k;
+
+
+--disable_info
+
+--disconnect con1
+--disconnect con2
+
+--connection default
+
+DROP TABLE t1;
+
+--echo #
+--echo # Parallel test with read_committed
+--echo #
+
+set global transaction isolation level read committed;
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
CREATE TABLE t1(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
k INT,
@@ -23,10 +142,16 @@ CREATE TABLE t1(
--connection con1
+--echo #
+--echo # Connection 1
+--echo #
SET DEBUG_SYNC='ha_write_row_end SIGNAL continue2 WAIT_FOR continue1';
--send INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1'
--connection con2
+--echo #
+--echo # Connection 2
+--echo #
SET DEBUG_SYNC='ha_write_row_start WAIT_FOR continue2';
SET DEBUG_SYNC='after_mysql_insert SIGNAL continue1';
INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
@@ -35,6 +160,10 @@ INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
--reap
--disable_info
SET DEBUG_SYNC='RESET';
+
+--echo #
+--echo # 5 rows, gap in autoinc values
+--echo #
SELECT * FROM t1 ORDER BY k;
--disconnect con1
@@ -43,3 +172,6 @@ SELECT * FROM t1 ORDER BY k;
--connection default
DROP TABLE t1;
+
+set global transaction isolation level repeatable read;
+
diff --git a/mysql-test/suite/innodb/t/create_isl_with_direct.test b/mysql-test/suite/innodb/t/create_isl_with_direct.test
index 34ea9c77703..83c7507e025 100644
--- a/mysql-test/suite/innodb/t/create_isl_with_direct.test
+++ b/mysql-test/suite/innodb/t/create_isl_with_direct.test
@@ -3,7 +3,7 @@
--source include/not_windows.inc
--disable_query_log
-CALL mtr.add_suppression("\\[Warning\\] InnoDB: Failed to set O_DIRECT on file ./ibdata1: OPEN: Invalid argument, continuing anyway. O_DIRECT is known to result in 'Invalid argument' on Linux on tmpfs, see MySQL Bug#26662.");
+CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*");
# The below mtr suppression to avoid failure in solaris platform.
CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to set DIRECTIO_ON on file.*");
diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test
index 3cd90a00d55..ad09666442d 100644
--- a/mysql-test/suite/innodb/t/innodb-16k.test
+++ b/mysql-test/suite/innodb/t/innodb-16k.test
@@ -3,16 +3,20 @@
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
+call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
+
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
# These values can change during the test
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`;
+let $innodb_large_prefix_orig = `SELECT @@innodb_large_prefix`;
--enable_query_log
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_large_prefix = OFF;
--echo # Test 1) Show the page size from Information Schema
@@ -374,16 +378,6 @@ CREATE INDEX t1t ON t1 (t(767));
--error 1713
UPDATE t1 SET t=@e;
-# The function dict_index_too_big_for_undo() prevents us from adding
-# one more index. But it is too late. The record is already too big.
-
---error ER_TOO_BIG_ROWSIZE
-CREATE INDEX t1u ON t1 (u(767));
-
---error ER_TOO_BIG_ROWSIZE
-CREATE INDEX t1ut ON t1 (u(767), t(767));
-CREATE INDEX t1st ON t1 (s(767), t(767));
-
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -520,11 +514,7 @@ UPDATE bug12547647 SET c = REPEAT('b',16928);
SHOW WARNINGS;
DROP TABLE bug12547647;
-
-
-# The following should fail in non-strict mode too.
-
-SET SESSION innodb_strict_mode = off;
+SET SESSION innodb_strict_mode = on;
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
@@ -974,4 +964,5 @@ row_format=compact,ENGINE=INNODB;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig;
+EVAL SET GLOBAL innodb_large_prefix = $innodb_large_prefix_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-alter-discard.test b/mysql-test/suite/innodb/t/innodb-alter-discard.test
index 80678cef0a6..19ba7c3a3ca 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-discard.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-discard.test
@@ -3,6 +3,8 @@
--source include/not_embedded.inc
--source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*");
+
let $MYSQLD_DATADIR=`select @@datadir`;
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t(a INT)ENGINE=InnoDB;
@@ -23,6 +25,12 @@ EOF
-- enable_reconnect
-- source include/wait_until_connected_again.inc
+call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
+call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
+call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
+call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*");
+call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*");
call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
call mtr.add_suppression("InnoDB: Table 'test/t'$");
diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test
index 2ad9c8791cb..45342b4a218 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-table.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-table.test
@@ -138,3 +138,36 @@ SHOW CREATE TABLE child;
DROP TABLE child, parent;
+#
+# MDEV-10535: ALTER TABLE causes standalone/wsrep cluster crash
+#
+CREATE TABLE IF NOT EXISTS ticket (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ mask VARCHAR(16) DEFAULT '' NOT NULL,
+ subject VARCHAR(255) DEFAULT '' NOT NULL,
+ is_closed TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL,
+ is_deleted TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL,
+ team_id INT UNSIGNED DEFAULT 0 NOT NULL,
+ category_id INT UNSIGNED DEFAULT 0 NOT NULL,
+ first_message_id INT UNSIGNED DEFAULT 0 NOT NULL,
+ created_date INT UNSIGNED,
+ updated_date INT UNSIGNED,
+ due_date INT UNSIGNED,
+ first_wrote_address_id INT UNSIGNED NOT NULL DEFAULT 0,
+ last_wrote_address_id INT UNSIGNED NOT NULL DEFAULT 0,
+ spam_score DECIMAL(4,4) NOT NULL DEFAULT 0,
+ spam_training VARCHAR(1) NOT NULL DEFAULT '',
+ interesting_words VARCHAR(255) NOT NULL DEFAULT '',
+ next_action VARCHAR(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (id)
+) ENGINE=InnoDB;
+
+ALTER TABLE ticket
+ CHANGE COLUMN team_id group_id INT UNSIGNED NOT NULL DEFAULT 0,
+ CHANGE COLUMN category_id bucket_id INT UNSIGNED NOT NULL DEFAULT 0,
+ ADD COLUMN org_id INT UNSIGNED NOT NULL DEFAULT 0,
+ ADD INDEX org_id (org_id);
+
+SHOW CREATE TABLE ticket;
+
+DROP TABLE ticket;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
index ec1ea35f1cf..e1e736fc678 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
@@ -20,6 +20,13 @@
--echo # in-place ALTERs of the same table will not be blocked due to
--echo # temporary tablename.
+# As we intentionally crash below, there could be partially written
+# pages that are then recovered from the doublewrite buffer
+call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed
+");
+call mtr.add_suppression("InnoDB: file read of space .* page .*");
+call mtr.add_suppression("InnoDB: Trying to recover it from the doublewrite buffer.");
+
let datadir= `select @@datadir`;
--let $_server_id= `SELECT @@server_id`
diff --git a/mysql-test/suite/innodb/t/innodb-blob.test b/mysql-test/suite/innodb/t/innodb-blob.test
index 8aa113fc3ca..c1f9ee5992f 100644
--- a/mysql-test/suite/innodb/t/innodb-blob.test
+++ b/mysql-test/suite/innodb/t/innodb-blob.test
@@ -3,6 +3,7 @@
# columns are stored off-page.
--source include/have_innodb.inc
+# The 7000 in this test is a bit less than half the innodb_page_size.
--source include/have_innodb_16k.inc
# DEBUG_SYNC must be compiled in.
@@ -15,6 +16,8 @@
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
+call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
+
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t3 (a INT PRIMARY KEY, b TEXT, c TEXT) ENGINE=InnoDB;
@@ -41,7 +44,7 @@ connect (con2,localhost,root,,);
# Check that the above SELECT is blocked
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = 'Sending data' and
+ where state in ('Sending data', 'Opening tables') and
info = 'SELECT a, RIGHT(b,20) FROM t1';
--source include/wait_condition.inc
@@ -51,7 +54,7 @@ connection con1;
reap;
connection default;
reap;
-SET DEBUG_DBUG='+d,row_ins_extern_checkpoint';
+SET DEBUG='+d,row_ins_extern_checkpoint';
SET DEBUG_SYNC='before_row_ins_extern_latch SIGNAL rec_not_blob WAIT_FOR crash';
ROLLBACK;
BEGIN;
@@ -68,7 +71,8 @@ SELECT a, RIGHT(b,20) FROM t1;
SELECT a FROM t1;
# Request a crash, and restart the server.
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
INSERT INTO t2 VALUES (42);
@@ -80,7 +84,6 @@ connection default;
--error 2013
reap;
-# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
@@ -90,41 +93,34 @@ CHECK TABLE t1;
INSERT INTO t3 VALUES
(1,REPEAT('d',7000),REPEAT('e',100)),
(2,REPEAT('g',7000),REPEAT('h',100));
-SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR go';
+SET DEBUG_SYNC='blob_write_middle SIGNAL go_sel WAIT_FOR go_upd';
# This should move column b off-page.
--send
UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
+--echo # Connection con1:
connect (con1,localhost,root,,);
-SET DEBUG_SYNC='now WAIT_FOR have_latch';
+SET DEBUG_SYNC='now WAIT_FOR go_sel';
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT @@tx_isolation;
-
-# this one should block
--- send
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
+set debug_sync='now SIGNAL go_upd';
-connect (con2,localhost,root,,);
-
-# Check that the above SELECT is blocked
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = 'Sending data' and
- info = 'SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3';
---source include/wait_condition.inc
-
-SET DEBUG_SYNC='now SIGNAL go';
+--echo # Connection default:
+connection default;
+--echo # reap UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
+reap;
+--echo # Connection con1:
connection con1;
-reap;
+SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
+
disconnect con1;
connection default;
-reap;
-
CHECK TABLE t1,t2,t3;
-connection con2;
+connect (con2,localhost,root,,);
BEGIN;
INSERT INTO t2 VALUES (347);
connection default;
@@ -134,7 +130,7 @@ connection default;
# remain open while we are writing the off-page columns and are
# stuck in the DEBUG_SYNC. A checkpoint involves a flush, which
# would wait for the buffer-fix to cease.
-SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
+SET DEBUG='+d,row_upd_extern_checkpoint';
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
# This should move column b off-page.
--send
@@ -148,7 +144,8 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
# Request a crash, and restart the server.
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
COMMIT;
@@ -159,7 +156,6 @@ connection default;
--error 2013
reap;
-# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
@@ -178,7 +174,7 @@ connection default;
# remain open while we are writing the off-page columns and are
# stuck in the DEBUG_SYNC. A checkpoint involves a flush, which
# would wait for the buffer-fix to cease.
-SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
+SET DEBUG='+d,row_upd_extern_checkpoint';
SET DEBUG_SYNC='after_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
# This should move column b off-page.
--send
@@ -192,7 +188,8 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: after_row_upd_extern';
# Request a crash, and restart the server.
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
COMMIT;
@@ -203,7 +200,6 @@ connection default;
--error 2013
reap;
-# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
index 33e2b863684..97b259ee047 100644
--- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
+++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
@@ -1 +1,2 @@
--log-error=$MYSQLTEST_VARDIR/tmp/my_restart.err
+--innodb_buffer_pool_size=24M
diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
index 79f7999d115..cbf2d0c9805 100644
--- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
+++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
@@ -1,8 +1,3 @@
-if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB before 5.6.17
-}
-
--echo #
--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
--echo # OPERATION IF IT IS DONE IN-PLACE
@@ -14,8 +9,13 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where
--source include/not_embedded.inc
# DBUG_SUICIDE() hangs under valgrind
--source include/not_valgrind.inc
-# No windows, need perl
---source include/not_windows.inc
+
+CREATE TABLE t1(
+ a INT AUTO_INCREMENT PRIMARY KEY,
+ b CHAR(1),
+ c INT,
+ INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
# The flag innodb_change_buffering_debug is only available in debug builds.
# It instructs InnoDB to try to evict pages from the buffer pool when
@@ -24,13 +24,6 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where
SET GLOBAL innodb_change_buffering_debug = 1;
let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err;
-CREATE TABLE t1(
- a INT AUTO_INCREMENT PRIMARY KEY,
- b CHAR(1),
- c INT,
- INDEX(b))
-ENGINE=InnoDB;
-
# Create enough rows for the table, so that the change buffer will be
# used for modifying the secondary index page. There must be multiple
# index pages, because changes to the root page are never buffered.
@@ -48,7 +41,6 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
BEGIN;
SELECT b FROM t1 LIMIT 3;
@@ -60,7 +52,7 @@ DELETE FROM t1 WHERE a=1;
# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
INSERT INTO t1 VALUES(1,'X',1);
-SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
+SET DEBUG='+d,crash_after_log_ibuf_upd_inplace';
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
# This should force a change buffer merge
diff --git a/mysql-test/suite/innodb/t/innodb-fk-warnings.test b/mysql-test/suite/innodb/t/innodb-fk-warnings.test
index a95a7f55a40..f45ae00d788 100644
--- a/mysql-test/suite/innodb/t/innodb-fk-warnings.test
+++ b/mysql-test/suite/innodb/t/innodb-fk-warnings.test
@@ -87,16 +87,16 @@ create temporary table t1(a int not null primary key, b int, key(b)) engine=inno
--echo Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(b) references t1(a).
--echo Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
--echo Warning 1215 Cannot add foreign key constraint
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#--error 1005
-#create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#show warnings;
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#--error 1005
-#alter table t1 add foreign key(b) references t1(a);
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#show warnings;
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+--error 1005
+create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+show warnings;
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+--error 1005
+alter table t1 add foreign key(b) references t1(a);
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+show warnings;
drop table t1;
#
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7408.test b/mysql-test/suite/innodb/t/innodb-mdev-7408.test
index d1cd1879bb1..46f1afca27b 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev-7408.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7408.test
@@ -1,5 +1,7 @@
--source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: User stopword table .* does not exist.");
+
select @@global.innodb_ft_server_stopword_table;
CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
--error 1231
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt b/mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt
new file mode 100644
index 00000000000..a2a7d5f6adf
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt
@@ -0,0 +1 @@
+--innodb-strict-mode=0
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7513.test b/mysql-test/suite/innodb/t/innodb-mdev-7513.test
index b929ea14781..88f941ef70d 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev-7513.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7513.test
@@ -3,6 +3,7 @@
# MDEV-7513: ib_warn_row_too_big dereferences null thd
+call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
call mtr.add_suppression("Row size too large (> 8126)*");
--disable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test
index b4085228e02..208dcd52f35 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev7046.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test
@@ -12,6 +12,7 @@
call mtr.add_suppression("InnoDB: File ./test/t1*");
call mtr.add_suppression("InnoDB: Error number*");
call mtr.add_suppression("InnoDB: File ./test/t1#p#p1#sp#p1sp0.ibd: 'rename' returned OS error*");
+call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
# MDEV-7046: MySQL#74480 - Failing assertion: os_file_status(newpath, &exists, &type)
# after Operating system error number 36 in a file operation
diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns.test b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
index 368c6fc8cb1..0e0d6dbb2f5 100644
--- a/mysql-test/suite/innodb/t/innodb-virtual-columns.test
+++ b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
@@ -33,6 +33,8 @@ CREATE TABLE IF NOT EXISTS grad_degree (
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
@@ -137,6 +139,8 @@ CREATE TABLE IF NOT EXISTS grad_degree (
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
@@ -251,6 +255,8 @@ CREATE TABLE IF NOT EXISTS grad_degree (
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
ALTER TABLE grad_degree DROP COLUMN ofis_deg_status2, DROP COLUMN ofis_deg_status3,
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-1.test b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
index b1db34976a9..6c2607effe8 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-1.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
@@ -3,6 +3,8 @@
-- source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
index 4b03ac008d2..982149f356c 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
@@ -17,6 +17,12 @@
# allow test to run only when innodb-page-size=16
--source include/have_innodb_16k.inc
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
+call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
+call mtr.add_suppression("InnoDB: Tablespace flags: .* corrupted in file: .* ");
+call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*");
+flush tables;
let MYSQLD_DATADIR =`SELECT @@datadir`;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
@@ -524,8 +530,8 @@ SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure";
--replace_regex /'.*t1.cfg'/'t1.cfg'/
-# Following alter is not failing
-#--error ER_INTERNAL_ERROR
+# Following alter is failing
+--error ER_INTERNAL_ERROR
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure";
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index 9c0c11fadab..05c4c04f2d3 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -15,6 +15,16 @@
-- source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
+call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
+call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
+call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*");
+call mtr.add_suppression("InnoDB: Tablespace flags: .*");
+call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened.");
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*");
+call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*");
+
let MYSQLD_DATADIR =`SELECT @@datadir`;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522\\t1.ibd'/;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
index d139e0b700d..395e4def85d 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
@@ -7,6 +7,8 @@
# allow test to run only when innodb-page-size=16
--source include/have_innodb_16k.inc
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test
index c9e7748cb47..b04c726b74a 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522.test
@@ -3,6 +3,8 @@
-- source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 2e7306c8e29..e456d48b5c2 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -31,8 +31,15 @@ set optimizer_switch = 'mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
# the test to be run multiple times without restarting the mysqld server.
# See Bug#43309 Test main.innodb can't be run twice
-- disable_query_log
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: in ALTER TABLE `test`.`t1`");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: in RENAME TABLE table `test`.`t1`");
+
+SET @innodb_thread_sleep_delay_orig = @@innodb_thread_sleep_delay;
+
SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
+--disable_warnings
SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
SET @innodb_rows_updated_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated');
@@ -41,6 +48,7 @@ SET @innodb_row_lock_current_waits_orig = (SELECT variable_value FROM informatio
SET @innodb_row_lock_time_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time');
SET @innodb_row_lock_time_max_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max');
SET @innodb_row_lock_time_avg_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg');
+--enable_warnings
-- enable_query_log
--disable_warnings
@@ -677,6 +685,8 @@ drop table t1;
# Test of multi-table-delete
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -720,6 +730,7 @@ select * from t1;
select * from t2;
select * from t2;
drop table t1,t2;
+SET sql_mode = default;
#
# A simple test with some isolation levels
@@ -1056,18 +1067,84 @@ UPDATE t1 SET c1 = 'other' WHERE c1 = 'old';
DROP TABLE t2,t1;
#
-# test for recursion depth limit
+# test for FK cascade depth limit
#
+call mtr.add_suppression("Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 255. Please drop excessive foreign constraints and try again");
+
create table t1(
id int primary key,
pid int,
index(pid),
foreign key(pid) references t1(id) on delete cascade) engine=innodb;
-insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
- (8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
--- error 1451
+insert into t1 values
+( 0, 0), ( 1, 0), ( 2, 1), ( 3, 2),
+( 4, 3), ( 5, 4), ( 6, 5), ( 7, 6),
+( 8, 7), ( 9, 8), ( 10, 9), ( 11, 10),
+( 12, 11), ( 13, 12), ( 14, 13), ( 15, 14),
+( 16, 15), ( 17, 16), ( 18, 17), ( 19, 18),
+( 20, 19), ( 21, 20), ( 22, 21), ( 23, 22),
+( 24, 23), ( 25, 24), ( 26, 25), ( 27, 26),
+( 28, 27), ( 29, 28), ( 30, 29), ( 31, 30),
+( 32, 31), ( 33, 32), ( 34, 33), ( 35, 34),
+( 36, 35), ( 37, 36), ( 38, 37), ( 39, 38),
+( 40, 39), ( 41, 40), ( 42, 41), ( 43, 42),
+( 44, 43), ( 45, 44), ( 46, 45), ( 47, 46),
+( 48, 47), ( 49, 48), ( 50, 49), ( 51, 50),
+( 52, 51), ( 53, 52), ( 54, 53), ( 55, 54),
+( 56, 55), ( 57, 56), ( 58, 57), ( 59, 58),
+( 60, 59), ( 61, 60), ( 62, 61), ( 63, 62),
+( 64, 63), ( 65, 64), ( 66, 65), ( 67, 66),
+( 68, 67), ( 69, 68), ( 70, 69), ( 71, 70),
+( 72, 71), ( 73, 72), ( 74, 73), ( 75, 74),
+( 76, 75), ( 77, 76), ( 78, 77), ( 79, 78),
+( 80, 79), ( 81, 80), ( 82, 81), ( 83, 82),
+( 84, 83), ( 85, 84), ( 86, 85), ( 87, 86),
+( 88, 87), ( 89, 88), ( 90, 89), ( 91, 90),
+( 92, 91), ( 93, 92), ( 94, 93), ( 95, 94),
+( 96, 95), ( 97, 96), ( 98, 97), ( 99, 98),
+(100, 99), (101, 100), (102, 101), (103, 102),
+(104, 103), (105, 104), (106, 105), (107, 106),
+(108, 107), (109, 108), (110, 109), (111, 110),
+(112, 111), (113, 112), (114, 113), (115, 114),
+(116, 115), (117, 116), (118, 117), (119, 118),
+(120, 119), (121, 120), (122, 121), (123, 122),
+(124, 123), (125, 124), (126, 125), (127, 126),
+(128, 127), (129, 128), (130, 129), (131, 130),
+(132, 131), (133, 132), (134, 133), (135, 134),
+(136, 135), (137, 136), (138, 137), (139, 138),
+(140, 139), (141, 140), (142, 141), (143, 142),
+(144, 143), (145, 144), (146, 145), (147, 146),
+(148, 147), (149, 148), (150, 149), (151, 150),
+(152, 151), (153, 152), (154, 153), (155, 154),
+(156, 155), (157, 156), (158, 157), (159, 158),
+(160, 159), (161, 160), (162, 161), (163, 162),
+(164, 163), (165, 164), (166, 165), (167, 166),
+(168, 167), (169, 168), (170, 169), (171, 170),
+(172, 171), (173, 172), (174, 173), (175, 174),
+(176, 175), (177, 176), (178, 177), (179, 178),
+(180, 179), (181, 180), (182, 181), (183, 182),
+(184, 183), (185, 184), (186, 185), (187, 186),
+(188, 187), (189, 188), (190, 189), (191, 190),
+(192, 191), (193, 192), (194, 193), (195, 194),
+(196, 195), (197, 196), (198, 197), (199, 198),
+(200, 199), (201, 200), (202, 201), (203, 202),
+(204, 203), (205, 204), (206, 205), (207, 206),
+(208, 207), (209, 208), (210, 209), (211, 210),
+(212, 211), (213, 212), (214, 213), (215, 214),
+(216, 215), (217, 216), (218, 217), (219, 218),
+(220, 219), (221, 220), (222, 221), (223, 222),
+(224, 223), (225, 224), (226, 225), (227, 226),
+(228, 227), (229, 228), (230, 229), (231, 230),
+(232, 231), (233, 232), (234, 233), (235, 234),
+(236, 235), (237, 236), (238, 237), (239, 238),
+(240, 239), (241, 240), (242, 241), (243, 242),
+(244, 243), (245, 244), (246, 245), (247, 246),
+(248, 247), (249, 248), (250, 249), (251, 250),
+(252, 251), (253, 252), (254, 253), (255, 254);
+--error ER_GET_ERRMSG,ER_ROW_IS_REFERENCED_2
delete from t1 where id=0;
-delete from t1 where id=15;
+delete from t1 where id=255;
+--error 0,ER_ROW_IS_REFERENCED_2
delete from t1 where id=0;
drop table t1;
@@ -1279,6 +1356,9 @@ drop table t1;
create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
select * from t1 order by a,b,c,d;
explain select * from t1 order by a,b,c,d;
drop table t1;
@@ -1342,10 +1422,12 @@ source include/varchar.inc;
#
# Some errors/warnings on create
#
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
+SET GLOBAL innodb_large_prefix=OFF;
create table t1 (v varchar(65530), key(v));
+SET GLOBAL innodb_large_prefix=default;
drop table t1;
create table t1 (v varchar(65536));
show create table t1;
@@ -1353,8 +1435,8 @@ drop table t1;
create table t1 (v varchar(65530) character set utf8);
show create table t1;
drop table t1;
-
-eval set storage_engine=$default;
+SET sql_mode = default;
+eval set default_storage_engine=$default;
# InnoDB specific varchar tests
create table t1 (v varchar(16384)) engine=innodb;
@@ -1459,7 +1541,7 @@ CREATE TABLE t1
id INT PRIMARY KEY
) ENGINE=InnoDB;
---error 1005,1005
+--error ER_CANNOT_ADD_FOREIGN,1005
CREATE TEMPORARY TABLE t2
(
id INT NOT NULL PRIMARY KEY,
@@ -1500,6 +1582,8 @@ show create table t9;
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+SET GLOBAL innodb_large_prefix=OFF;
# these should have their index length trimmed
create table t1 (col1 varchar(768), index(col1))
character set = latin1 engine = innodb;
@@ -1509,25 +1593,28 @@ create table t3 (col1 text, index(col1(768)))
character set = latin1 engine = innodb;
create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb;
+SET GLOBAL innodb_large_prefix=default;
show create table t1;
drop table t1, t2, t3, t4;
# these should be refused
---error 1071
+set global innodb_large_prefix=OFF;
+--error ER_TOO_LONG_KEY
create table t1 (col1 varchar(768) primary key)
character set = latin1 engine = innodb;
---error 1071
+--error ER_TOO_LONG_KEY
create table t2 (col1 varbinary(768) primary key)
character set = latin1 engine = innodb;
---error 1071
+--error ER_TOO_LONG_KEY
create table t3 (col1 text, primary key(col1(768)))
character set = latin1 engine = innodb;
---error 1071
+--error ER_TOO_LONG_KEY
create table t4 (col1 blob, primary key(col1(768)))
character set = latin1 engine = innodb;
-
+SET sql_mode = default;
+set global innodb_large_prefix=default;
#
# Test improved foreign key error messages (bug #3443)
#
@@ -1549,10 +1636,10 @@ INSERT INTO t2 VALUES(2);
INSERT INTO t1 VALUES(1);
INSERT INTO t2 VALUES(1);
---error 1451
+--error ER_ROW_IS_REFERENCED_2
DELETE FROM t1 WHERE id = 1;
---error 1451
+--error ER_ROW_IS_REFERENCED_2, 1217
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS=0;
@@ -1678,11 +1765,11 @@ insert into t2 values(2);
insert into t4 values(2);
insert into t2 values(1);
insert into t4 values(1);
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
update t1 set a=2;
-- error 1452
update t2 set a=2;
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
update t3 set a=2;
-- error 1452
update t4 set a=2;
@@ -1719,7 +1806,7 @@ create table t1 (a varchar(255) character set utf8,
# test the padding of BINARY types and collations (Bug #14189)
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
@@ -1751,11 +1838,11 @@ insert into t2 values(0x41);
select hex(s1) from t2;
update t1 set s1=0x123456 where a=2;
select hex(s1) from t2;
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
update t1 set s1=0x12 where a=1;
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
update t1 set s1=0x12345678 where a=1;
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
update t1 set s1=0x123457 where a=1;
update t1 set s1=0x1220 where a=1;
select hex(s1) from t2;
@@ -1763,11 +1850,11 @@ update t1 set s1=0x1200 where a=1;
select hex(s1) from t2;
update t1 set s1=0x4200 where a=1;
select hex(s1) from t2;
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
delete from t1 where a=1;
delete from t1 where a=2;
update t2 set s1=0x4120;
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
delete from t1;
delete from t1 where a!=3;
select a,hex(s1) from t1;
@@ -1786,7 +1873,7 @@ select hex(s1) from t2;
update t1 set s1=0x12 where a=2;
select hex(s1) from t2;
delete from t1 where a=1;
--- error 1451
+-- error ER_ROW_IS_REFERENCED_2
delete from t1 where a=2;
select a,hex(s1) from t1;
select hex(s1) from t2;
@@ -1803,7 +1890,7 @@ ALTER TABLE t2 ADD CONSTRAINT t2_ibfk_0 FOREIGN KEY (a) REFERENCES t1(a);
ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_0;
SHOW CREATE TABLE t2;
DROP TABLE t2,t1;
-
+SET sql_mode = default;
#
# Test case for bug #16229: MySQL/InnoDB uses full explicit table locks in trigger processing
#
@@ -2344,8 +2431,9 @@ DROP TABLE t1,t2;
#
# Bug #21101 (Prints wrong error message if max row size is too large)
#
-set innodb_strict_mode=on;
---error 1118
+SET innodb_strict_mode=ON;
+--replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
+--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1 (
c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
@@ -2356,6 +2444,7 @@ CREATE TABLE t1 (
c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE = InnoDB;
+SET innodb_strict_mode=OFF;
#
# Bug #31860 InnoDB assumes AUTOINC values can only be positive.
@@ -2512,6 +2601,7 @@ DROP TABLE bug35537;
DISCONNECT c1;
CONNECTION default;
+SET GLOBAL innodb_thread_sleep_delay = @innodb_thread_sleep_delay_orig;
SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
-- enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test b/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test
deleted file mode 100644
index 8553d97bd9e..00000000000
--- a/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test
+++ /dev/null
@@ -1,52 +0,0 @@
---source include/not_embedded.inc
---source include/not_crashrep.inc
---source include/have_innodb.inc
-
-call mtr.add_suppression("InnoDB: The total blob data length");
-
-let $old_max_allowed_packet = `select @@max_allowed_packet`;
-SET GLOBAL max_allowed_packet = 100*1024*1024;
-
-connect(big_packets,localhost,root,,);
-connection big_packets;
-
-CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB;
-
-# Insert a few rows (it doesn't really matter how many). These transactions
-# are committed once they are acked, so they should not be lost.
-INSERT INTO t1 (a, b) VALUES (1, '1');
-INSERT INTO t1 (a, b) VALUES (2, '2');
-INSERT INTO t1 (a, b) VALUES (3, '3');
-INSERT INTO t1 (a, b) VALUES (4, '4');
-INSERT INTO t1 (a, b) VALUES (5, '5');
-
-# The BLOB insert will fail, and should disappear. However all data committed
-# up to this point should not be lost.
-start transaction;
---replace_regex /\(> [0-9]*\)/(> ####)/
---error ER_TOO_BIG_ROWSIZE
-INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024));
-
-connection default;
-
-# We expect a restart.
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
---echo # Quick shutdown and restart server
---shutdown_server 0
-
-# Wait for the server to come back up, and reconnect.
---enable_reconnect
---source include/wait_until_connected_again.inc
-
-connection default;
-
-# We should see (1,2,3,4,5) here.
-SELECT a FROM t1;
-
-# Clean up.
-DROP TABLE t1;
-
---disable_query_log
-eval set global max_allowed_packet = $old_max_allowed_packet;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test
index 235ece04a8c..9a96f29fc3b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug12400341.test
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test
@@ -14,10 +14,8 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n
# undo slots of the previous test might exist still
--source include/not_windows.inc
-# Previous undo slots cause unnecessary failures
---source include/not_windows.inc
-
call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too*");
+call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot find a free slot for an undo log. Do you have too");
--disable_query_log
set @old_innodb_trx_rseg_n_slots_debug = @@innodb_trx_rseg_n_slots_debug;
diff --git a/mysql-test/suite/innodb/t/innodb_bug12902967.test b/mysql-test/suite/innodb/t/innodb_bug12902967.test
index 8e1b8199524..1b5df7fa165 100644
--- a/mysql-test/suite/innodb/t/innodb_bug12902967.test
+++ b/mysql-test/suite/innodb/t/innodb_bug12902967.test
@@ -9,6 +9,8 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
+call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key constraints which are not compatible with the new table definition.");
+
let error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/restart_mysqld.inc
@@ -20,11 +22,4 @@ create table t1 (f1 integer primary key) engine innodb;
--replace_regex /'\.\/test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
--error ER_ERROR_ON_RENAME
alter table t1 add constraint c1 foreign key (f1) references t1(f1);
---source include/restart_mysqld.inc
-perl;
-$file = $ENV{error_log};
-open (FILE, '<', $file) or die "can't open(< $file): $!\n";
-print ((grep { /^InnoDB:/ and not /aio/i and not /io_setup\(\) attempt [0-9]+ failed/ } <FILE>)[-2..-1]);
-EOF
-
drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt b/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
index 6b82baca147..410738202bd 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
@@ -1 +1,4 @@
---innodb_file_per_table=1 --skip-stack-trace --skip-core-file
+--innodb_file_per_table=1
+--skip-stack-trace
+--skip-core-file
+--loose-innodb_buffer_pool_load_at_startup=OFF
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test
index 16e88826c85..c73571af6dd 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test
@@ -1,41 +1,29 @@
#
# Test opening a corrupted table.
#
-
--- source include/not_encrypted.inc
-
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*");
-
-# Don't test under valgrind, memory leaks will occur
+# Valgrind can hang or return spurious messages on DBUG_SUICIDE
source include/not_valgrind.inc;
# Avoid CrashReporter popup on Mac
source include/not_crashrep.inc;
-# Don't test under embedded
+# Restarting is not supported under embedded
source include/not_embedded.inc;
# Require InnoDB
source include/have_innodb.inc;
# Require Debug for SET DEBUG
source include/have_debug.inc;
+# Not encrypted tables
+source include/not_encrypted.inc;
# Test could open crash reporter on Windows
# if compiler set up
source include/not_windows.inc;
-CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-CALL mtr.add_suppression("InnoDB: Database page corruption on disk or a failed");
-CALL mtr.add_suppression("InnoDB: Space .* file test/t1 read of page .*");
-CALL mtr.add_suppression("InnoDB: You may have to recover from a backup.");
-CALL mtr.add_suppression("InnoDB: It is also possible that your operatingsystem has corrupted its own file cache.");
-CALL mtr.add_suppression("InnoDB: and rebooting your computer removes the error.");
-CALL mtr.add_suppression("InnoDB: If the corrupt page is an index page you can also try to");
-CALL mtr.add_suppression("InnoDB: fix the corruption by dumping, dropping, and reimporting");
-CALL mtr.add_suppression("InnoDB: the corrupt table. You can use CHECK");
-CALL mtr.add_suppression("InnoDB: TABLE to scan your table for corruption.");
-CALL mtr.add_suppression("InnoDB: See also .* about forcing recovery.");
-
-
---echo # Create and populate the table to be corrupted
-CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
+--disable_query_log
+CALL mtr.add_suppression("\\[ERROR\\] \\[FATAL\\] InnoDB: Unable to read page \\[page id: space=.*, page number=.*\\] into the buffer pool after 100 attempts");
+CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Database page corruption on disk or a failed");
+--enable_query_log
+
+
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
--disable_query_log
--let $i = 10
@@ -50,17 +38,7 @@ INSERT INTO t1 (b) VALUES ('corrupt me');
let $MYSQLD_DATADIR=`select @@datadir`;
let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
---echo # Write file to make mysql-test-run.pl expect the "crash", but don't
---echo # start it until it's told to
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
---echo # We give 30 seconds to do a clean shutdown because we do not want
---echo # to redo apply the pages of t1.ibd at the time of recovery.
---echo # We want SQL to initiate the first access to t1.ibd.
-shutdown_server 30;
-
---echo # Wait until disconnected.
---source include/wait_until_disconnected.inc
+--source include/shutdown_mysqld.inc
--echo # Backup the t1.ibd before corrupting
--copy_file $t1_IBD $MYSQLD_DATADIR/test/t1.ibd.backup
@@ -92,10 +70,7 @@ while ($len = sysread IBD_FILE, $chunk, 1024)
close IBD_FILE;
EOF
---echo # Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
@@ -117,10 +92,7 @@ SLEEP 1;
--remove_file $MYSQLD_DATADIR/test/t1.ibd
--move_file $MYSQLD_DATADIR/test/t1.ibd.backup $MYSQLD_DATADIR/test/t1.ibd
---echo # Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
# because the session information is lost after server restart
diff --git a/mysql-test/suite/innodb/t/innodb_bug30423.test b/mysql-test/suite/innodb/t/innodb_bug30423.test
index bbb6f1155ff..de53a935156 100644
--- a/mysql-test/suite/innodb/t/innodb_bug30423.test
+++ b/mysql-test/suite/innodb/t/innodb_bug30423.test
@@ -139,6 +139,7 @@ analyze table bug30243_3;
# Following query plan shows that we get the correct rows per
# unique value (should be approximately 1 row per value)
+-- replace_column 9 ROWS
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
LEFT JOIN bug30243_3 sa_opportunities
@@ -159,6 +160,7 @@ analyze table bug30243_3;
# Following query plan shows that we get the correct rows per
# unique value (~1)
+-- replace_column 9 ROWS
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
LEFT JOIN bug30243_3 sa_opportunities
diff --git a/mysql-test/suite/innodb/t/innodb_bug34053.test b/mysql-test/suite/innodb/t/innodb_bug34053.test
index 56c26acb632..d93d5100d81 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34053.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34053.test
@@ -5,7 +5,7 @@
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
# we do not really care about what gets printed, we are only
# interested in getting success or failure according to our
@@ -20,8 +20,12 @@ FLUSH PRIVILEGES;
-- connection con1
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL innodb_status_output=ON;
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL innodb_status_output_locks=ON;
+
CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
-# this should only fail with UNIV_MEM_DEBUG
+DROP TABLE innodb_monitor;
CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
DROP TABLE innodb_mem_validate;
CREATE TABLE innodb_sql (a INT) ENGINE=INNODB;
@@ -36,16 +40,18 @@ CREATE TABLE nnodb_monitor (a INT) ENGINE=INNODB;
DROP TABLE nnodb_monitor;
-- connection default
-CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
-CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
+SET GLOBAL innodb_status_output=ON;
+SET GLOBAL innodb_status_output_locks=ON;
-- connection con1
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
-DROP TABLE innodb_monitor;
-DROP TABLE innodb_mem_validate;
+SET GLOBAL innodb_status_output=OFF;
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL innodb_status_output_locks=OFF;
-- connection default
-DROP TABLE innodb_monitor;
+SET GLOBAL innodb_status_output=OFF;
+SET GLOBAL innodb_status_output_locks=OFF;
DROP USER 'shane'@'localhost';
-- disconnect con1
diff --git a/mysql-test/suite/innodb/t/innodb_bug34300.test b/mysql-test/suite/innodb/t/innodb_bug34300.test
index 13c708b48d6..8c73af13bc1 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34300.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34300.test
@@ -1,35 +1,26 @@
-#
-# Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
-# http://bugs.mysql.com/34300
-#
+--echo #
+--echo # Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
+--echo #
-- source include/have_innodb.inc
-if (`select plugin_auth_version <= "5.6.22-MariaDB-72.0" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in XtraDB as of 5.6.22-MariaDB-72.0 or earlier
-}
-
-- disable_query_log
--- disable_result_log
-
-call mtr.add_suppression("InnoDB: The total blob data length");
+call mtr.add_suppression("InnoDB: Warning: a long semaphore wait:");
+call mtr.add_suppression("The age of the last checkpoint is");
# set packet size and reconnect
let $max_packet=`select @@global.max_allowed_packet`;
+-- enable_query_log
+
SET @@global.max_allowed_packet=16777216;
--connect (newconn, localhost, root,,)
---enable_result_log
-
CREATE TABLE bug34300 (
f4 TINYTEXT,
f6 MEDIUMTEXT,
f8 TINYBLOB
) ENGINE=InnoDB;
---replace_regex /\(> [0-9]*\)/(> ####)/
---error ER_TOO_BIG_ROWSIZE
INSERT INTO bug34300 VALUES ('xxx', repeat('a', 8459264), 'zzz');
SELECT f4, f8 FROM bug34300;
@@ -38,5 +29,10 @@ ALTER TABLE bug34300 ADD COLUMN (f10 INT);
SELECT f4, f8 FROM bug34300;
+--echo # Cleanup
DROP TABLE bug34300;
+
+-- disable_query_log
EVAL SET @@global.max_allowed_packet=$max_packet;
+-- enable_query_log
+
diff --git a/mysql-test/suite/innodb/t/innodb_bug60049-master.opt b/mysql-test/suite/innodb/t/innodb_bug60049-master.opt
index 741d8685459..22a5d4ed221 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60049-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug60049-master.opt
@@ -1 +1 @@
---loose-innodb-fast-shutdown=0
+--innodb_fast_shutdown=0
diff --git a/mysql-test/suite/innodb/t/innodb_bug60049.test b/mysql-test/suite/innodb/t/innodb_bug60049.test
index b1d56d16a5e..cb05ca297ea 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60049.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60049.test
@@ -5,12 +5,11 @@
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
--- source include/not_encrypted.inc
-
-call mtr.add_suppression('InnoDB: Error: Table "mysql"."innodb_(table|index)_stats" not found');
-call mtr.add_suppression('InnoDB: Error: Fetch of persistent statistics requested');
-- disable_query_log
+call mtr.add_suppression('\\[ERROR\\] InnoDB: Table `mysql`.`innodb_(table|index)_stats` not found');
+call mtr.add_suppression('\\[ERROR\\] InnoDB: Fetch of persistent statistics requested for table `mysql`.`gtid_executed`');
+
let $create1 = query_get_value(SHOW CREATE TABLE mysql.innodb_table_stats, Create Table, 1);
let $create2 = query_get_value(SHOW CREATE TABLE mysql.innodb_index_stats, Create Table, 1);
DROP TABLE mysql.innodb_index_stats;
@@ -23,10 +22,7 @@ DROP TABLE u;
SELECT @@innodb_fast_shutdown;
let $MYSQLD_DATADIR=`select @@datadir`;
-# Shut down the server
--- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- shutdown_server 30
--- source include/wait_until_disconnected.inc
+--source include/shutdown_mysqld.inc
# Check the tail of ID_IND (SYS_TABLES.ID)
let IBDATA1=$MYSQLD_DATADIR/ibdata1;
@@ -45,10 +41,7 @@ close(FILE);
print unpack("H*", $_), "\n";
EOF
-# Restart the server.
--- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- enable_reconnect
--- source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
-- disable_query_log
USE mysql;
diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
index ee04e8d66fc..52a318f0fa8 100644
--- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
+++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
@@ -2,32 +2,28 @@
# Test for persistent corrupt bit for corrupted index and table
#
-- source include/have_innodb.inc
-#-- source include/have_innodb_16k.inc
--- source include/not_embedded.inc
+--source include/not_embedded.inc
# This test needs debug server
-- source include/have_debug.inc
--- disable_query_log
-call mtr.add_suppression("Flagged corruption of idx.*in");
+--disable_query_log
+call mtr.add_suppression("Flagged corruption of.* in table .* in .*");
+--enable_query_log
set names utf8;
-SET UNIQUE_CHECKS=0;
-
CREATE TABLE corrupt_bit_test_ā(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(100),
c INT,
z INT,
INDEX idx(b))
-ENGINE=InnoDB;
+ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO corrupt_bit_test_ā VALUES(0,'x',1, 1);
-# This is the first unique index we intend to corrupt
CREATE UNIQUE INDEX idxā ON corrupt_bit_test_ā(c, b);
-# This is the second unique index we intend to corrupt
CREATE UNIQUE INDEX idxē ON corrupt_bit_test_ā(z, b);
SELECT * FROM corrupt_bit_test_ā;
@@ -37,9 +33,9 @@ INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_ā;
select count(*) from corrupt_bit_test_ā;
# This will flag all secondary indexes corrupted
-SET SESSION debug_dbug="+d,dict_set_index_corrupted";
+SET SESSION debug="+d,dict_set_index_corrupted";
check table corrupt_bit_test_ā;
-SET SESSION debug_dbug="";
+SET SESSION debug="-d,dict_set_index_corrupted";
# Cannot create new indexes while corrupted indexes exist
--error ER_INDEX_CORRUPT
@@ -79,8 +75,6 @@ set names utf8;
-- error ER_INDEX_CORRUPT
select z from corrupt_bit_test_ā;
-show create table corrupt_bit_test_ā;
-
# Drop the corrupted index
drop index idxē on corrupt_bit_test_ā;
@@ -90,13 +84,13 @@ CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
--error ER_INDEX_CORRUPT
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
-show create table corrupt_bit_test_ā;
drop index idx on corrupt_bit_test_ā;
# Now that there exist no corrupted indexes, we can create new indexes.
CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
+
# Now select back to normal
select z from corrupt_bit_test_ā limit 10;
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_big5.test b/mysql-test/suite/innodb/t/innodb_ctype_big5.test
new file mode 100644
index 00000000000..684a97983e5
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_ctype_big5.test
@@ -0,0 +1,25 @@
+--source include/have_innodb.inc
+--source include/have_big5.inc
+
+SET STORAGE_ENGINE=InnoDB;
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+
+SET NAMES big5;
+let $coll='big5_chinese_nopad_ci';
+let $coll_pad='big5_chinese_ci';
+--source include/ctype_pad.inc
+
+let $coll='big5_nopad_bin';
+let $coll_pad='big5_bin';
+--source include/ctype_pad.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_latin1.test b/mysql-test/suite/innodb/t/innodb_ctype_latin1.test
new file mode 100644
index 00000000000..0f88ae3212d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_ctype_latin1.test
@@ -0,0 +1,25 @@
+--source include/have_innodb.inc
+
+SET STORAGE_ENGINE=InnoDB;
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+
+SET NAMES latin1;
+
+let $coll='latin1_swedish_nopad_ci';
+let $coll_pad='latin1_swedish_ci';
+--source include/ctype_pad.inc
+
+let $coll='latin1_nopad_bin';
+let $coll_pad='latin1_bin';
+--source include/ctype_pad.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt b/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt
index cddf744de98..25eed3eb299 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt
@@ -1,3 +1,3 @@
---character-sets-dir=$MYSQL_TEST_DIR/std_data/
+--character-sets-dir=$MYSQL_TEST_DIR/std_data/ldml/
--default-storage-engine=InnoDB
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_utf8.test b/mysql-test/suite/innodb/t/innodb_ctype_utf8.test
new file mode 100644
index 00000000000..105f771d8b3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_ctype_utf8.test
@@ -0,0 +1,25 @@
+--source include/have_innodb.inc
+
+SET STORAGE_ENGINE=InnoDB;
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+
+SET NAMES utf8;
+
+let $coll='utf8_general_nopad_ci';
+let $coll_pad='utf8_general_ci';
+--source include/ctype_pad.inc
+
+let $coll='utf8_nopad_bin';
+let $coll_pad='utf8_bin';
+--source include/ctype_pad.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test
index 1adb14ea482..45d66d95002 100644
--- a/mysql-test/suite/innodb/t/innodb_gis.test
+++ b/mysql-test/suite/innodb/t/innodb_gis.test
@@ -6,5 +6,8 @@ SET storage_engine=innodb;
#
# Bug #15680 (SPATIAL key in innodb)
#
---error ER_TABLE_CANT_HANDLE_SPKEYS
+# MySQL 5.7 Introduces SPATIAL keys for InnoDB
+#--error ER_TABLE_CANT_HANDLE_SPKEYS
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
+drop table t1;
+
diff --git a/mysql-test/suite/innodb/t/innodb_mysql-master.opt b/mysql-test/suite/innodb/t/innodb_mysql-master.opt
index a177f285d66..a1ee2c096cf 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_mysql-master.opt
@@ -1 +1,3 @@
---loose-innodb-lock-wait-timeout=2 --default-storage-engine=MyISAM
+--loose-innodb-lock-wait-timeout=2
+--default-storage-engine=MyISAM
+--loose-innodb-large-prefix=off
diff --git a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test
index cf22935fad6..5a4978c9b37 100644
--- a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test
+++ b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test
@@ -1,6 +1,7 @@
--source include/big_test.inc
# test takes too long with valgrind
--source include/not_valgrind.inc
+--source include/have_debug.inc
--let $num_inserts = 1500
--let $num_ops = 3500
--source suite/innodb/include/innodb_simulate_comp_failures.inc
diff --git a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small.test b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small.test
index 1677a092e0c..79a16d36917 100644
--- a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small.test
+++ b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures_small.test
@@ -1,3 +1,6 @@
+--source include/have_debug.inc
+--source include/not_valgrind.inc
+
--let $num_inserts = 1000
--let $num_ops = 30
--source suite/innodb/include/innodb_simulate_comp_failures.inc
diff --git a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
index 73cd8a26f6f..01ced047302 100644
--- a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
+++ b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test
@@ -29,6 +29,7 @@ select * from information_schema.innodb_sys_foreign;
select * from information_schema.innodb_sys_foreign_cols;
select * from information_schema.innodb_sys_tablespaces;
select * from information_schema.innodb_sys_datafiles;
+--error 0,1109
select * from information_schema.innodb_changed_pages;
select * from information_schema.innodb_tablespaces_encryption;
select * from information_schema.innodb_tablespaces_scrubbing;
diff --git a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test
index c932e45591d..5d36cfdcbb9 100644
--- a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test
+++ b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test
@@ -10,8 +10,8 @@
-- source include/have_innodb_16k.inc
-- source include/not_embedded.inc
-call mtr.add_suppression("InnoDB: Error: Table \"mysql\".\"innodb_index_stats\" not found");
-call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table");
+call mtr.add_suppression("InnoDB: Table .*innodb_index_stats.* not found");
+call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table .*");
-- vertical_results
diff --git a/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test b/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test
index 4a3f7527c09..1603f3cd764 100644
--- a/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test
+++ b/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test
@@ -8,8 +8,8 @@
# test with 16k page size.
-- source include/have_innodb_16k.inc
-call mtr.add_suppression("InnoDB: Error: Table \"mysql\".\"innodb_index_stats\" not found");
-call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table");
+call mtr.add_suppression("InnoDB: Table `mysql`.`innodb_index_stats` not found");
+call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table.*");
-- vertical_results
diff --git a/mysql-test/suite/innodb/t/strict_mode.test b/mysql-test/suite/innodb/t/strict_mode.test
index 86b56a09c0e..48fc1ef7881 100644
--- a/mysql-test/suite/innodb/t/strict_mode.test
+++ b/mysql-test/suite/innodb/t/strict_mode.test
@@ -5,6 +5,8 @@
--echo # INNODB_STRICT_MODE = 1
--echo #
+call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
+
set innodb_strict_mode = 0;
create table t1 (id int auto_increment primary key,