[Commits] ff6f9a7: Fix crash on defragment and test failure fixes.

Jan Lindström jan.lindstrom at mariadb.com
Thu Sep 8 14:07:39 EEST 2016


revision-id: ff6f9a712d3ada6f35770d47ed5a3e87ebb765fa (mariadb-10.2.1-13-gff6f9a7)
parent(s): b1c035c672ce6c0c4aec8ddd6c0ac859869d8a11
committer: Jan Lindström
timestamp: 2016-09-08 14:07:18 +0300
message:

Fix crash on defragment and test failure fixes.

---
 mysql-test/include/have_no_undo_tablespaces.inc    |   4 +
 mysql-test/include/mix1.inc                        |   9 +-
 .../suite/innodb/include/show_i_s_tablespaces.inc  |  38 ++
 mysql-test/suite/innodb/r/innodb_mysql.result      |   4 +
 mysql-test/suite/innodb/t/innodb_mysql-master.opt  |   4 +-
 .../innodb/t/innodb_simulate_comp_failures.test    |   1 +
 mysql-test/suite/innodb_zip/r/16k.result           | 150 ++++----
 .../innodb_zip/r/wl6347_comp_indx_stat.result      |   6 -
 mysql-test/suite/innodb_zip/r/wl6560.result        | 418 ---------------------
 mysql-test/suite/innodb_zip/r/wl6915_1.result      |  39 +-
 mysql-test/suite/innodb_zip/t/16k-master.opt       |   3 +
 mysql-test/suite/innodb_zip/t/16k.test             |   8 +-
 mysql-test/suite/innodb_zip/t/disabled.def         |   2 +-
 mysql-test/suite/innodb_zip/t/large_blob.test      |   2 +-
 mysql-test/suite/innodb_zip/t/wl6560.test          |   7 +-
 mysql-test/suite/innodb_zip/t/wl6915_1.test        |   4 +-
 sql/handler.cc                                     |   5 +-
 storage/innobase/btr/btr0defragment.cc             |   3 +
 storage/innobase/handler/ha_innodb.cc              |  17 +-
 19 files changed, 175 insertions(+), 549 deletions(-)

diff --git a/mysql-test/include/have_no_undo_tablespaces.inc b/mysql-test/include/have_no_undo_tablespaces.inc
new file mode 100644
index 0000000..4c163e7
--- /dev/null
+++ b/mysql-test/include/have_no_undo_tablespaces.inc
@@ -0,0 +1,4 @@
+if (`select count(*) = 0 from information_schema.global_variables where variable_name like 'innodb_undo_tablespaces' and variable_value = 0`)
+{
+  --skip Test requires innodb_undo_tablespaces=0
+}
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index bfe1567..7eae423 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -624,6 +624,11 @@ DROP TABLE t1,t2,t3;
 # Test bug when trying to drop data file which no InnoDB directory entry
 #
 
+--disable_query_log
+call mtr.add_suppression("InnoDB: Table .*bug29807.*");
+call mtr.add_suppression("InnoDB: Cannot open table test/bug29807 from");
+--enable_query_log
+
 create table t1 (a int) engine=innodb;
 let $MYSQLD_DATADIR= `select @@datadir`;
 copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm;
@@ -631,10 +636,6 @@ copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm;
 select * from bug29807;
 drop table t1;
 drop table bug29807;
---disable_query_log
-call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
-call mtr.add_suppression("InnoDB: Cannot open table test/bug29807 from");
---enable_query_log
 
 
 #
diff --git a/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
new file mode 100644
index 0000000..a79bc3c
--- /dev/null
+++ b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
@@ -0,0 +1,38 @@
+# This script assumes that the caller did the following;
+#     LET $MYSQLD_DATADIR = `select @@datadir`;
+#     LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
+--echo === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+--disable_query_log
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
+--replace_result ./ MYSQLD_DATADIR/  $MYSQLD_DATADIR/ MYSQLD_DATADIR/  $MYSQLD_DATADIR MYSQLD_DATADIR/  $MYSQL_TMP_DIR MYSQL_TMP_DIR  $INNODB_PAGE_SIZE DEFAULT
+SELECT s.name 'Space_Name',
+	s.space_type 'Space_Type',
+	s.page_size 'Page_Size',
+	s.zip_page_size 'Zip_Size',
+	s.row_format 'Formats_Permitted',
+	d.path 'Path'
+	FROM information_schema.innodb_sys_tablespaces s,
+	     information_schema.innodb_sys_datafiles d
+	WHERE s.space = d.space
+	AND s.name NOT LIKE 'mysql/%'
+	AND s.name NOT LIKE 'sys/%'
+	ORDER BY s.space;
+
+# This SELECT will not show UNDO or TEMPORARY tablespaces since
+# they are only in FILES, not SYS_TABLESPACES.
+--echo === information_schema.files ===
+--replace_regex  /innodb_file_per_table.[0-9]+/innodb_file_per_table.##/   /#P#/#p#/  /#SP#/#sp#/
+--replace_result ./ MYSQLD_DATADIR/  $MYSQLD_DATADIR/ MYSQLD_DATADIR/  $MYSQLD_DATADIR MYSQLD_DATADIR/  $MYSQL_TMP_DIR MYSQL_TMP_DIR  $INNODB_PAGE_SIZE DEFAULT
+SELECT 	s.name 'Space_Name',
+	f.file_type 'File_Type',
+	f.engine 'Engine',
+	f.status 'Status',
+	f.tablespace_name 'Tablespace_Name',
+	f.file_name 'Path'
+	FROM information_schema.files f,
+	     information_schema.innodb_sys_tablespaces s
+	WHERE f.file_id = s.space
+	AND s.name NOT LIKE 'mysql/%'
+	AND s.name NOT LIKE 'sys/%'
+	ORDER BY f.file_id;
+--enable_query_log
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index 900e381..a057719 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -1,5 +1,9 @@
 set global innodb_support_xa=default;
+Warnings:
+Warning	131	Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
 set session innodb_support_xa=default;
+Warnings:
+Warning	131	Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
 SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
 drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;
 drop procedure if exists p1;
diff --git a/mysql-test/suite/innodb/t/innodb_mysql-master.opt b/mysql-test/suite/innodb/t/innodb_mysql-master.opt
index a177f285..a1ee2c0 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 cf22935..5a4978c 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_zip/r/16k.result b/mysql-test/suite/innodb_zip/r/16k.result
index 3d9f395..8604932 100644
--- a/mysql-test/suite/innodb_zip/r/16k.result
+++ b/mysql-test/suite/innodb_zip/r/16k.result
@@ -8,7 +8,7 @@ variable_value
 SELECT variable_value FROM information_schema.global_status
 WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
 variable_value
-{checked_valid}
+512
 # Test 3) Query some information_shema tables that are dependent upon
 #         the page size.
 SELECT	t.name table_name, t.n_cols, t.flag table_flags,
@@ -20,28 +20,8 @@ WHERE	t.table_id = i.table_id
 AND	t.name LIKE 'mysql%'
 	ORDER BY t.name, i.index_id;
 table_name	n_cols	table_flags	index_name	root_page	type	n_fields	merge_threshold
-mysql/engine_cost	9	33	PRIMARY	3	3	3	50
-mysql/gtid_executed	6	33	PRIMARY	3	3	2	50
-mysql/help_category	7	33	PRIMARY	3	3	1	50
-mysql/help_category	7	33	name	4	2	1	50
-mysql/help_keyword	5	33	PRIMARY	3	3	1	50
-mysql/help_keyword	5	33	name	4	2	1	50
-mysql/help_relation	5	33	PRIMARY	3	3	2	50
-mysql/help_topic	9	33	PRIMARY	3	3	1	50
-mysql/help_topic	9	33	name	4	2	1	50
 mysql/innodb_index_stats	11	33	PRIMARY	3	3	4	50
 mysql/innodb_table_stats	9	33	PRIMARY	3	3	2	50
-mysql/plugin	5	33	PRIMARY	3	3	1	50
-mysql/servers	12	33	PRIMARY	3	3	1	50
-mysql/server_cost	7	33	PRIMARY	3	3	1	50
-mysql/slave_master_info	28	33	PRIMARY	3	3	1	50
-mysql/slave_relay_log_info	12	33	PRIMARY	3	3	1	50
-mysql/slave_worker_info	16	33	PRIMARY	3	3	2	50
-mysql/time_zone	5	33	PRIMARY	3	3	1	50
-mysql/time_zone_leap_second	5	33	PRIMARY	3	3	1	50
-mysql/time_zone_name	5	33	PRIMARY	3	3	1	50
-mysql/time_zone_transition	6	33	PRIMARY	3	3	2	50
-mysql/time_zone_transition_type	8	33	PRIMARY	3	3	2	50
 CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
 CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
 CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
@@ -209,35 +189,35 @@ Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=16
+t1	Compressed	row_format=COMPRESSED key_block_size=16
 ALTER TABLE t1 KEY_BLOCK_SIZE=8;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=8
+t1	Compressed	row_format=COMPRESSED key_block_size=8
 ALTER TABLE t1 KEY_BLOCK_SIZE=4;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=4
+t1	Compressed	row_format=COMPRESSED key_block_size=4
 ALTER TABLE t1 KEY_BLOCK_SIZE=2;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=2
+t1	Compressed	row_format=COMPRESSED key_block_size=2
 ALTER TABLE t1 KEY_BLOCK_SIZE=1;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=1
+t1	Compressed	row_format=COMPRESSED key_block_size=1
 ALTER TABLE t1 KEY_BLOCK_SIZE=0;
 SHOW WARNINGS;
 Level	Code	Message
@@ -253,35 +233,35 @@ Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=16
+t1	Compressed	row_format=COMPRESSED key_block_size=16
 ALTER TABLE t1 KEY_BLOCK_SIZE=8;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=8
+t1	Compressed	row_format=COMPRESSED key_block_size=8
 ALTER TABLE t1 KEY_BLOCK_SIZE=4;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=4
+t1	Compressed	row_format=COMPRESSED key_block_size=4
 ALTER TABLE t1 KEY_BLOCK_SIZE=2;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=2
+t1	Compressed	row_format=COMPRESSED key_block_size=2
 ALTER TABLE t1 KEY_BLOCK_SIZE=1;
 SHOW WARNINGS;
 Level	Code	Message
 SELECT table_name, row_format, create_options
 FROM information_schema.tables WHERE table_name = 't1';
 table_name	row_format	create_options
-t1	Compressed	row_format=COMPRESSED KEY_BLOCK_SIZE=1
+t1	Compressed	row_format=COMPRESSED key_block_size=1
 ALTER TABLE t1 KEY_BLOCK_SIZE=0;
 SHOW WARNINGS;
 Level	Code	Message
@@ -298,33 +278,37 @@ SHOW VARIABLES LIKE 'innodb_file_per_table';
 Variable_name	Value
 innodb_file_per_table	OFF
 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
-ERROR HY000: Table storage engine for 't4' doesn't have this option
+Got one of the listed errors
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1478	InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error	1031	Table storage engine for 't4' doesn't have this option
+Error	1005	Can't create table `test`.`t4` (errno: 140 "Wrong create options")
+Warning	1030	Got error 140 "Wrong create options" from storage engine InnoDB
 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
-ERROR HY000: Table storage engine for 't5' doesn't have this option
+Got one of the listed errors
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1478	InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error	1031	Table storage engine for 't5' doesn't have this option
+Error	1005	Can't create table `test`.`t5` (errno: 140 "Wrong create options")
+Warning	1030	Got error 140 "Wrong create options" from storage engine InnoDB
 SET GLOBAL innodb_file_per_table = ON;
 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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
-ERROR HY000: Table storage engine for 't4' doesn't have this option
+Got one of the listed errors
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1478	InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error	1031	Table storage engine for 't4' doesn't have this option
+Error	1005	Can't create table `test`.`t4` (errno: 140 "Wrong create options")
+Warning	1030	Got error 140 "Wrong create options" from storage engine InnoDB
 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
-ERROR HY000: Table storage engine for 't5' doesn't have this option
+Got one of the listed errors
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1478	InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error	1031	Table storage engine for 't5' doesn't have this option
+Error	1005	Can't create table `test`.`t5` (errno: 140 "Wrong create options")
+Warning	1030	Got error 140 "Wrong create options" from storage engine InnoDB
 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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
@@ -420,10 +404,8 @@ CHECK TABLE t1;
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	range	b	b	769	NULL	12	100.00	Using where
-Warnings:
-Note	1003	/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where (`test`.`t1`.`b` like 'adfd%')
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	b	NULL	NULL	NULL	15	Using where
 DROP TABLE t1;
 # Test 8) Test creating a table that could lead to undo log overflow.
 CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
@@ -489,27 +471,27 @@ CREATE INDEX t1st ON t1 (s(767), t(767));
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
-  `a` blob,
-  `b` blob,
-  `c` blob,
-  `d` blob,
-  `e` blob,
-  `f` blob,
-  `g` blob,
-  `h` blob,
-  `i` blob,
-  `j` blob,
-  `k` blob,
-  `l` blob,
-  `m` blob,
-  `n` blob,
-  `o` blob,
-  `p` blob,
-  `q` blob,
-  `r` blob,
-  `s` blob,
-  `t` blob,
-  `u` blob,
+  `a` blob DEFAULT NULL,
+  `b` blob DEFAULT NULL,
+  `c` blob DEFAULT NULL,
+  `d` blob DEFAULT NULL,
+  `e` blob DEFAULT NULL,
+  `f` blob DEFAULT NULL,
+  `g` blob DEFAULT NULL,
+  `h` blob DEFAULT NULL,
+  `i` blob DEFAULT NULL,
+  `j` blob DEFAULT NULL,
+  `k` blob DEFAULT NULL,
+  `l` blob DEFAULT NULL,
+  `m` blob DEFAULT NULL,
+  `n` blob DEFAULT NULL,
+  `o` blob DEFAULT NULL,
+  `p` blob DEFAULT NULL,
+  `q` blob DEFAULT NULL,
+  `r` blob DEFAULT NULL,
+  `s` blob DEFAULT NULL,
+  `t` blob DEFAULT NULL,
+  `u` blob DEFAULT NULL,
   KEY `t1a` (`a`(767)),
   KEY `t1b` (`b`(767)),
   KEY `t1c` (`c`(767)),
@@ -620,22 +602,22 @@ CREATE INDEX ndx_p ON t12963823 (p(500));
 SHOW CREATE TABLE t12963823;
 Table	Create Table
 t12963823	CREATE TABLE `t12963823` (
-  `a` blob,
-  `b` blob,
-  `c` blob,
-  `d` blob,
-  `e` blob,
-  `f` blob,
-  `g` blob,
-  `h` blob,
-  `i` blob,
-  `j` blob,
-  `k` blob,
-  `l` blob,
-  `m` blob,
-  `n` blob,
-  `o` blob,
-  `p` blob,
+  `a` blob DEFAULT NULL,
+  `b` blob DEFAULT NULL,
+  `c` blob DEFAULT NULL,
+  `d` blob DEFAULT NULL,
+  `e` blob DEFAULT NULL,
+  `f` blob DEFAULT NULL,
+  `g` blob DEFAULT NULL,
+  `h` blob DEFAULT NULL,
+  `i` blob DEFAULT NULL,
+  `j` blob DEFAULT NULL,
+  `k` blob DEFAULT NULL,
+  `l` blob DEFAULT NULL,
+  `m` blob DEFAULT NULL,
+  `n` blob DEFAULT NULL,
+  `o` blob DEFAULT NULL,
+  `p` blob DEFAULT NULL,
   KEY `ndx_c` (`c`(500)),
   KEY `ndx_d` (`d`(500)),
   KEY `ndx_e` (`e`(500)),
@@ -727,11 +709,9 @@ EXPLAIN
 SELECT COUNT(*) FROM
 (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
 WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	PRIMARY	<derived2>	NULL	ALL	NULL	NULL	NULL	NULL	1537	100.00	NULL
-2	DERIVED	t1	NULL	index_merge	PRIMARY,idx	idx,PRIMARY	5,4	NULL	1537	100.00	Using sort_union(idx,PRIMARY); Using where
-Warnings:
-Note	1003	/* select#1 */ select count(0) AS `COUNT(*)` from (/* select#2 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` FORCE INDEX (PRIMARY) FORCE INDEX (`idx`) where ((`test`.`t1`.`a` between 2 and 7) or (`test`.`t1`.`pk` = 1000000))) `t`
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	<derived2>	ALL	NULL	NULL	NULL	NULL	1537	
+2	DERIVED	t1	index_merge	PRIMARY,idx	idx,PRIMARY	5,4	NULL	1537	Using sort_union(idx,PRIMARY); Using where
 SELECT COUNT(*) FROM
 (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
 WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
diff --git a/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
index 3b98527..509ffe9 100644
--- a/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
+++ b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
@@ -320,7 +320,6 @@ AND table_name='tab5' AND database_name='test'
 AND index_name like 'idx%' ;
 compress_stat	1
 The size of the tab5.ibd file: 5242880
-# restart
 # set the flag on (default off)
 SET GLOBAL innodb_cmp_per_index_enabled=ON;
 # set the flags
@@ -666,7 +665,6 @@ AND table_name='tab5' AND database_name='test'
 AND index_name like 'idx%' ;
 compress_stat	1
 The size of the tab5.ibd file: 2097152
-# restart
 # set the flag on (default off)
 SET GLOBAL innodb_cmp_per_index_enabled=ON;
 # set the flags
@@ -1964,7 +1962,6 @@ AND table_name='tab5' AND database_name='test'
 AND index_name like 'idx%' ;
 compress_stat	1
 The size of the tab5.ibd file: 65536
-# restart
 # set the flag on (default off)
 SET GLOBAL innodb_cmp_per_index_enabled=ON;
 # set the flags
@@ -2312,7 +2309,6 @@ AND table_name='tab5' AND database_name='test'
 AND index_name like 'idx%' ;
 compress_stat	1
 The size of the tab5.ibd file: 65536
-# restart
 # set the flag on (default off)
 SET GLOBAL innodb_cmp_per_index_enabled=ON;
 # set the flags
@@ -5113,7 +5109,6 @@ AND table_name='tab5' AND database_name='test'
 AND index_name like 'idx%' ;
 compress_stat	1
 The size of the tab5.ibd file: 65536
-# restart
 # set the flag on (default off)
 SET GLOBAL innodb_cmp_per_index_enabled=ON;
 # set the flags
@@ -6734,7 +6729,6 @@ AND table_name='tab5' AND database_name='test'
 AND index_name like 'idx%' ;
 compress_stat	1
 The size of the tab5.ibd file: 65536
-# restart
 # set the flag on (default off)
 SET GLOBAL innodb_cmp_per_index_enabled=ON;
 # set the flags
diff --git a/mysql-test/suite/innodb_zip/r/wl6560.result b/mysql-test/suite/innodb_zip/r/wl6560.result
deleted file mode 100644
index bf46d8a..0000000
--- a/mysql-test/suite/innodb_zip/r/wl6560.result
+++ /dev/null
@@ -1,418 +0,0 @@
-set global innodb_file_per_table = off;
-# files in MYSQL_DATA_DIR
-ibtmp1
-select @@global.innodb_file_per_table;
-@@global.innodb_file_per_table
-0
-create temporary table t1 (i int, f float, c char(100)) engine=innodb;
-insert into t1 values (100, 1.1, 'pune');
-insert into t1 values (99, 1.2, 'mumbai');
-insert into t1 values (98, 1.3, 'jaipur');
-insert into t1 values (97, 1.4, 'delhi');
-insert into t1 values (96, 1.5, 'ahmedabad');
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-select * from t1 where i = 98;
-i	f	c
-98	1.3	jaipur
-select * from t1 where i < 100;
-i	f	c
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-explain select * from t1 where f > 1.29999;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	5	33.33	Using where
-Warnings:
-Note	1003	/* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
-alter table t1 add index sec_index(f);
-explain select * from t1 where f > 1.29999;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	ALL	sec_index	NULL	NULL	NULL	5	60.00	Using where
-Warnings:
-Note	1003	/* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
-select * from t1 where f > 1.29999;
-i	f	c
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-explain select * from t1 where i = 100;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	5	20.00	Using where
-Warnings:
-Note	1003	/* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`i` = 100)
-alter table t1 add unique index pri_index(i);
-explain select * from t1 where i = 100;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	const	pri_index	pri_index	5	const	1	100.00	NULL
-Warnings:
-Note	1003	/* select#1 */ select '100' AS `i`,'1.1' AS `f`,'pune' AS `c` from `test`.`t1` where 1
-select * from t1 where i = 100;
-i	f	c
-100	1.1	pune
-delete from t1 where i < 97;
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-insert into t1 values (96, 1.5, 'kolkata');
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	kolkata
-update t1 set f = 1.44 where c = 'delhi';
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.44	delhi
-96	1.5	kolkata
-truncate table t1;
-insert into t1 values (100, 1.1, 'pune');
-insert into t1 values (99, 1.2, 'mumbai');
-insert into t1 values (98, 1.3, 'jaipur');
-insert into t1 values (97, 1.4, 'delhi');
-insert into t1 values (96, 1.5, 'ahmedabad');
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-alter table t1 discard tablespace;
-ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
-alter table t1 import tablespace;
-ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
-drop table t1;
-#files in MYSQL_TMP_DIR
-set global innodb_file_per_table = 1;
-select @@global.innodb_file_per_table;
-@@global.innodb_file_per_table
-1
-create temporary table t1
-(i int, f float, c char(100)) engine = innodb key_block_size = 4;
-show create table t1;
-Table	Create Table
-t1	CREATE TEMPORARY TABLE `t1` (
-  `i` int(11) DEFAULT NULL,
-  `f` float DEFAULT NULL,
-  `c` char(100) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
-#files in MYSQL_TMP_DIR
-#sql<temporary>.ibd
-insert into t1 values (100, 1.1, 'pune');
-insert into t1 values (99, 1.2, 'mumbai');
-insert into t1 values (98, 1.3, 'jaipur');
-insert into t1 values (97, 1.4, 'delhi');
-insert into t1 values (96, 1.5, 'ahmedabad');
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-select * from t1 where i = 98;
-i	f	c
-98	1.3	jaipur
-select * from t1 where i < 100;
-i	f	c
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-explain select * from t1 where f > 1.29999;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	5	33.33	Using where
-Warnings:
-Note	1003	/* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
-alter table t1 add index sec_index(f);
-explain select * from t1 where f > 1.29999;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	ALL	sec_index	NULL	NULL	NULL	5	60.00	Using where
-Warnings:
-Note	1003	/* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
-select * from t1 where f > 1.29999;
-i	f	c
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-explain select * from t1 where i = 100;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	5	20.00	Using where
-Warnings:
-Note	1003	/* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`i` = 100)
-alter table t1 add unique index pri_index(i);
-explain select * from t1 where i = 100;
-id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	NULL	const	pri_index	pri_index	5	const	1	100.00	NULL
-Warnings:
-Note	1003	/* select#1 */ select '100' AS `i`,'1.1' AS `f`,'pune' AS `c` from `test`.`t1` where 1
-select * from t1 where i = 100;
-i	f	c
-100	1.1	pune
-delete from t1 where i < 97;
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-insert into t1 values (96, 1.5, 'kolkata');
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	kolkata
-update t1 set f = 1.44 where c = 'delhi';
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.44	delhi
-96	1.5	kolkata
-truncate table t1;
-insert into t1 values (100, 1.1, 'pune');
-insert into t1 values (99, 1.2, 'mumbai');
-insert into t1 values (98, 1.3, 'jaipur');
-insert into t1 values (97, 1.4, 'delhi');
-insert into t1 values (96, 1.5, 'ahmedabad');
-select * from t1;
-i	f	c
-100	1.1	pune
-99	1.2	mumbai
-98	1.3	jaipur
-97	1.4	delhi
-96	1.5	ahmedabad
-alter table t1 discard tablespace;
-ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
-drop table t1;
-set global innodb_file_per_table = off;
-create temporary table t1
-(keyc int, c1 char(100), c2 char(100),
-primary key(keyc)) engine = innodb;
-CREATE PROCEDURE populate_t1()
-BEGIN
-DECLARE i INT DEFAULT 1;
-while (i <= 20000) DO
-insert into t1 values (i, 'a', 'b');
-SET i = i + 1;
-END WHILE;
-END|
-set autocommit=0;
-select count(*) from t1;
-count(*)
-0
-call populate_t1();
-select count(*) from t1;
-count(*)
-20000
-select * from t1 limit 10;
-keyc	c1	c2
-1	a	b
-2	a	b
-3	a	b
-4	a	b
-5	a	b
-6	a	b
-7	a	b
-8	a	b
-9	a	b
-10	a	b
-set autocommit=1;
-truncate table t1;
-select count(*) from t1;
-count(*)
-0
-drop procedure populate_t1;
-drop table t1;
-create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
-insert into t1 values (1, 'c', 'b');
-select * from t1;
-keyc	c1	c2
-1	c	b
-# restart
-# files in MYSQL_DATA_DIR
-ibtmp1
-use test;
-select * from t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
-"testing temp-table creation in --innodb_read_only mode"
-# restart: --innodb-read-only
-use test;
-show tables;
-Tables_in_test
-create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
-ERROR HY000: InnoDB is in read only mode.
-"testing system and temp tablespace name conflict"
-"restarting server in normal mode"
-# restart
-show tables;
-Tables_in_test
-create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
-drop table t1;
-# test condition of full-temp-tablespace
-# restart: --innodb_temp_data_file_path=ibtmp1:12M
-create temporary table t1
-(keyc int, c1 char(100), c2 char(100),
-primary key(keyc)) engine = innodb;
-CREATE PROCEDURE populate_t1()
-BEGIN
-DECLARE i INT DEFAULT 1;
-while (i <= 20000) DO
-insert into t1 values (i, 'a', 'b');
-SET i = i + 1;
-END WHILE;
-END|
-set autocommit=0;
-select count(*) from t1;
-count(*)
-0
-call populate_t1();
-ERROR HY000: The table 't1' is full
-drop procedure populate_t1;
-drop table t1;
-set innodb_strict_mode = off;
-set global innodb_file_per_table = 0;
-set global innodb_file_format = 'Antelope';
-create temporary table t (
-i int)
-engine = innodb row_format = compressed;
-show warnings;
-Level	Code	Message
-Warning	NUMBER	InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning	NUMBER	InnoDB: assuming ROW_FORMAT=DYNAMIC.
-drop table t;
-create temporary table t (
-i int)
-engine = innodb row_format = compressed key_block_size = 8;
-show warnings;
-Level	Code	Message
-Warning	NUMBER	InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning	NUMBER	InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning	NUMBER	InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
-Warning	NUMBER	InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning	NUMBER	InnoDB: assuming ROW_FORMAT=DYNAMIC.
-drop table t;
-set global innodb_file_per_table = 1;
-create temporary table t (
-i int)
-engine = innodb row_format = compressed key_block_size = 8;
-show warnings;
-Level	Code	Message
-Warning	NUMBER	InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning	NUMBER	InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
-Warning	NUMBER	InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning	NUMBER	InnoDB: assuming ROW_FORMAT=DYNAMIC.
-drop table t;
-create temporary table t (
-i int)
-engine = innodb row_format = dynamic;
-show warnings;
-Level	Code	Message
-#files in MYSQL_TMP_DIR
-drop table t;
-set innodb_strict_mode = on;
-create temporary table t (
-i int)
-engine = innodb row_format = dynamic;
-drop table t;
-set global innodb_file_format = 'Barracuda';
-set innodb_strict_mode = off;
-create temporary table t (
-i int)
-engine = innodb row_format = compressed key_block_size = 8;
-set innodb_strict_mode = default;
-#files in MYSQL_TMP_DIR
-#sql<temporary>.ibd
-drop table t;
-create temporary table t (
-i int)
-engine = innodb row_format = compressed;
-show warnings;
-Level	Code	Message
-#files in MYSQL_TMP_DIR
-#sql<temporary>.ibd
-drop table t;
-create temporary table t (
-i int)
-engine = innodb row_format = dynamic;
-show warnings;
-Level	Code	Message
-#files in MYSQL_TMP_DIR
-drop table t;
-set innodb_strict_mode = on;
-create temporary table t (
-i int)
-engine = innodb row_format = dynamic;
-show warnings;
-Level	Code	Message
-drop table t;
-set innodb_strict_mode = off;
-#files in MYSQL_TMP_DIR
-create temporary table t (
-i int)
-engine = innodb row_format = dynamic key_block_size = 4;
-show warnings;
-Level	Code	Message
-Warning	NUMBER	InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER unless ROW_FORMAT=COMPRESSED.
-#files in MYSQL_TMP_DIR
-#sql<temporary>.ibd
-drop table t;
-create temporary table t (
-i int)
-engine = innodb row_format = compact;
-show warnings;
-Level	Code	Message
-#files in MYSQL_TMP_DIR
-drop table t;
-create temporary table t (
-i int)
-engine = innodb key_block_size = 4;
-show warnings;
-Level	Code	Message
-#files in MYSQL_TMP_DIR
-#sql<temporary>.ibd
-drop table t;
-"testing temp tablespace non-support for raw device"
-"testing temp tablespace non-support for raw device"
-# restart
-show tables;
-Tables_in_test
-create temporary table t1 (
-keyc int, c1 char(100), c2 char(100)
-) engine = innodb;
-drop table t1;
-"try starting server with temp-tablespace size < min. threshold"
-"try starting server with sys-tablespace size < min. threshold"
-# restart
-show tables;
-Tables_in_test
-create temporary table t1 (
-keyc int, c1 char(100), c2 char(100)
-) engine = innodb;
-drop table t1;
-"try starting server with no file specified for temp-tablespace"
-# restart
-show tables;
-Tables_in_test
-create temporary table t1 (
-keyc int, c1 char(100), c2 char(100)
-) engine = innodb;
-drop table t1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6915_1.result b/mysql-test/suite/innodb_zip/r/wl6915_1.result
index 0ffc2f4..bba8109 100644
--- a/mysql-test/suite/innodb_zip/r/wl6915_1.result
+++ b/mysql-test/suite/innodb_zip/r/wl6915_1.result
@@ -270,9 +270,14 @@ rollback;
 set n = n - 1; 
 end while;
 end|
+connect  con1,localhost,root,,;
+connect  con2,localhost,root,,;
 #---client 1 : dml operation ---"
+connection con1;
 #---client 2 : dml operation ---"
+connection con2;
 # In connection 1
+connection con1;
 SELECT count(*) FROM t1_1;
 count(*)
 36
@@ -550,6 +555,7 @@ c1
 138
 140
 # In connection 2
+connection con2;
 SELECT count(*) FROM t1_2;
 count(*)
 36
@@ -827,6 +833,7 @@ c1
 138
 140
 # In connection 1
+connection con1;
 set AUTOCOMMIT = 0;
 ALTER TABLE t1_temp DROP PRIMARY KEY;
 ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
@@ -898,17 +905,9 @@ SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20;
 c1	c2	c3	c4	c5	c6	c7	c9
 20	1	a	a	a	a	a	100.550
 update ignore t1_temp set c1 = 20 WHERE c1 = 140 ;
-Warnings:
-Warning	1062	Duplicate entry '20' for key 'PRIMARY'
 update ignore t2_temp set c1 = 20 WHERE c1 = 140 ;
-Warnings:
-Warning	1062	Duplicate entry '20' for key 'PRIMARY'
 update ignore t3_temp set c1 = 20 WHERE c1 = 140 ;
-Warnings:
-Warning	1062	Duplicate entry '20' for key 'PRIMARY'
 update ignore t4_temp set c1 = 20 WHERE c1 = 140 ;
-Warnings:
-Warning	1062	Duplicate entry '20' for key 'PRIMARY'
 SELECT count(*) FROM t1_temp WHERE c1 = 140;
 count(*)
 1
@@ -938,11 +937,19 @@ SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
 c1	c2	c3	c4	c5	c6	c7	c9	c10	c11
 -2	-2	a	a	a	a	a	100.550	99	test
 DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+disconnect con1;
+connection con2;
 DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-# restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4
+disconnect con2;
+connection default;
+connect  con1,localhost,root,,;
+connect  con2,localhost,root,,;
+connection con1;
 call populate_tables('_1');;
+connection con2;
 call populate_tables('_2');;
 "#connection 1 - verify tables"
+connection con1;
 SELECT count(*) FROM t1_1;
 count(*)
 36
@@ -1220,7 +1227,9 @@ c1
 138
 140
 DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+disconnect con1;
 "#connection 2 - verify tables"
+connection con2;
 SELECT count(*) FROM t1_2;
 count(*)
 36
@@ -1498,10 +1507,16 @@ c1
 138
 140
 DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-# restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4
+disconnect con2;
+connection default;
+connect  con1,localhost,root,,;
+connect  con2,localhost,root,,;
+connection con1;
 call populate_tables('_1');;
+connection con2;
 call populate_tables('_2');;
 "#connection 1 - verify tables"
+connection con1;
 SELECT count(*) FROM t1_1;
 count(*)
 36
@@ -1779,7 +1794,9 @@ c1
 138
 140
 DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+disconnect con1;
 "#connection 2 - verify tables"
+connection con2;
 SELECT count(*) FROM t1_2;
 count(*)
 36
@@ -2057,4 +2074,6 @@ c1
 138
 140
 DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+disconnect con2;
+connection default;
 DROP PROCEDURE populate_tables;
diff --git a/mysql-test/suite/innodb_zip/t/16k-master.opt b/mysql-test/suite/innodb_zip/t/16k-master.opt
new file mode 100644
index 0000000..82f574a
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/16k-master.opt
@@ -0,0 +1,3 @@
+--loose-innodb-sys-indexes
+--loose-innodb-sys-tablespaces
+--loose-innodb-sys-datafiles
diff --git a/mysql-test/suite/innodb_zip/t/16k.test b/mysql-test/suite/innodb_zip/t/16k.test
index 274b0b8..2885d13 100644
--- a/mysql-test/suite/innodb_zip/t/16k.test
+++ b/mysql-test/suite/innodb_zip/t/16k.test
@@ -288,18 +288,18 @@ DROP TABLE t1;
 SET SESSION innodb_strict_mode = ON;
 SET GLOBAL innodb_file_per_table = OFF;
 SHOW VARIABLES LIKE 'innodb_file_per_table';
---error ER_ILLEGAL_HA
+--error ER_ILLEGAL_HA,1005
 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
 SHOW WARNINGS;
---error ER_ILLEGAL_HA
+--error ER_ILLEGAL_HA,1005
 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
 SHOW WARNINGS;
 SET GLOBAL innodb_file_per_table = ON;
 SET GLOBAL innodb_file_format = `Antelope`;
---error ER_ILLEGAL_HA
+--error ER_ILLEGAL_HA,1005
 CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
 SHOW WARNINGS;
---error ER_ILLEGAL_HA
+--error ER_ILLEGAL_HA,1005
 CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
 SHOW WARNINGS;
 SET GLOBAL innodb_file_format = `Barracuda`;
diff --git a/mysql-test/suite/innodb_zip/t/disabled.def b/mysql-test/suite/innodb_zip/t/disabled.def
index d3799d0..2808bc5 100644
--- a/mysql-test/suite/innodb_zip/t/disabled.def
+++ b/mysql-test/suite/innodb_zip/t/disabled.def
@@ -14,4 +14,4 @@ restart : Not supported by MariaDB 10.2 2/9/2016 jplindst
 innochecksum   : MDEV-10727 2/9/2016 jplindst 
 innochecksum_2 : MDEV-10727 2/9/2016 jplindst
 innochecksum_3 : MDEV-10727 2/9/2016 jplindst
-
+wl6560 : MDEV_10727
diff --git a/mysql-test/suite/innodb_zip/t/large_blob.test b/mysql-test/suite/innodb_zip/t/large_blob.test
index dc1dc2e..b9888cc 100644
--- a/mysql-test/suite/innodb_zip/t/large_blob.test
+++ b/mysql-test/suite/innodb_zip/t/large_blob.test
@@ -3,7 +3,7 @@
 --echo #
 
 --source include/have_innodb.inc
---source include/have_nodebug.inc
+--source include/not_debug.inc
 --source include/big_test.inc
 
 --disable_query_log
diff --git a/mysql-test/suite/innodb_zip/t/wl6560.test b/mysql-test/suite/innodb_zip/t/wl6560.test
index 041dd45..55d3674 100644
--- a/mysql-test/suite/innodb_zip/t/wl6560.test
+++ b/mysql-test/suite/innodb_zip/t/wl6560.test
@@ -164,12 +164,12 @@ select * from t1;
 #
 #
 --echo "testing temp-table creation in --innodb_read_only mode"
-let $restart_parameters = restart: --innodb-read-only;
+let $restart_parameters=--innodb-read-only;
 --source include/restart_mysqld.inc
 #
 use test;
 show tables;
---error ER_INNODB_READ_ONLY
+--error ER_INNODB_READ_ONLY, 1005
 create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
 
 #-----------------------------------------------------------------------------
@@ -198,7 +198,7 @@ drop table t1;
 #    and insert enough data to make it full.
 #
 --echo # test condition of full-temp-tablespace
-let $restart_parameters = restart: --innodb_temp_data_file_path=ibtmp1:12M;
+let $restart_parameters=--innodb_temp_data_file_path=ibtmp1:12M;
 --source include/restart_mysqld.inc
 #
 create temporary table t1
@@ -366,7 +366,6 @@ let SEARCH_PATTERN = support raw device;
 --source include/search_pattern_in_file.inc
 --remove_file $SEARCH_FILE
 
-let $restart_parameters = restart;
 --source include/start_mysqld.inc
 
 show tables;
diff --git a/mysql-test/suite/innodb_zip/t/wl6915_1.test b/mysql-test/suite/innodb_zip/t/wl6915_1.test
index 625c8a3..7f0f734 100644
--- a/mysql-test/suite/innodb_zip/t/wl6915_1.test
+++ b/mysql-test/suite/innodb_zip/t/wl6915_1.test
@@ -517,7 +517,7 @@ connection default;
 #
 ## trying with VALUES innodb_undo_tablespaces, innodb_undo_logs ,innodb_log_files_in_group
 ##
-let $restart_parameters = restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
+let $restart_parameters=--innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
 --source include/restart_mysqld.inc
 
 # Create two client for concurrent execution
@@ -574,7 +574,7 @@ disconnect con2;
 
 connection default;
 # innodb_undo_logs > non redo rsegment
-let $restart_parameters = restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
+let $restart_parameters=--innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
 --source include/restart_mysqld.inc
 
 connect (con1,localhost,root,,);
diff --git a/sql/handler.cc b/sql/handler.cc
index 875e3d5..6e9d8dc 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -359,7 +359,7 @@ int ha_init_errors(void)
   SETMSG(HA_ERR_NO_CONNECTION,          "Could not connect to storage engine");
   SETMSG(HA_ERR_TABLE_DEF_CHANGED,      ER_DEFAULT(ER_TABLE_DEF_CHANGED));
   SETMSG(HA_ERR_FOREIGN_DUPLICATE_KEY,  "FK constraint would lead to duplicate key");
-  SETMSG(HA_ERR_TABLE_NEEDS_UPGRADE,    "Table upgrade required. Please do \"REPAIR TABLE %`\" or dump/reload to fix it");
+  SETMSG(HA_ERR_TABLE_NEEDS_UPGRADE,    ER_DEFAULT(ER_TABLE_NEEDS_UPGRADE));
   SETMSG(HA_ERR_TABLE_READONLY,         ER_DEFAULT(ER_OPEN_AS_READONLY));
   SETMSG(HA_ERR_AUTOINC_READ_FAILED,    ER_DEFAULT(ER_AUTOINC_READ_FAILED));
   SETMSG(HA_ERR_AUTOINC_ERANGE,         ER_DEFAULT(ER_WARN_DATA_OUT_OF_RANGE));
@@ -3536,9 +3536,10 @@ void handler::print_error(int error, myf errflag)
     DBUG_VOID_RETURN;
   }
   case HA_ERR_TABLE_NEEDS_UPGRADE:
+    textno= ER_TABLE_NEEDS_UPGRADE;
     my_error(ER_TABLE_NEEDS_UPGRADE, errflag,
              "TABLE", table_share->table_name.str);
-    break;
+    DBUG_VOID_RETURN;
   case HA_ERR_NO_PARTITION_FOUND:
     textno=ER_WRONG_PARTITION_NAME;
     break;
diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc
index 52ed728..e4202b9 100644
--- a/storage/innobase/btr/btr0defragment.cc
+++ b/storage/innobase/btr/btr0defragment.cc
@@ -801,6 +801,9 @@ DECLARE_THREAD(btr_defragment_thread)(
 		cursor = btr_pcur_get_btr_cur(pcur);
 		index = btr_cur_get_index(cursor);
 		first_block = btr_cur_get_block(cursor);
+
+		mtr_x_lock(dict_index_get_lock(index), &mtr);
+		mtr.set_named_space(index->space);
 		last_block = btr_defragment_n_pages(first_block, index,
 						    srv_defragment_n_pages,
 						    &mtr);
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index f277d7a..16f3001 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -10676,7 +10676,7 @@ ha_innobase::innobase_get_index(
 			if (!key || ut_strcmp(index->name, key->name) != 0) {
 				ib::error() << " Index for key no " << keynr
 					    << " mysql name " << (key ? key->name : "NULL")
-					    << " InnoDB name " << index->name
+					    << " InnoDB name " << index->name()
 					    << " for table " << m_prebuilt->table->name.m_name;
 
 				for(ulint i=0; i < table->s->keys; i++) {
@@ -10686,7 +10686,7 @@ ha_innobase::innobase_get_index(
 					if (index) {
 						ib::info() << " Index for key no " << keynr
 							   << " mysql name " << (key ? key->name : "NULL")
-							   << " InnoDB name " << index->name
+							   << " InnoDB name " << index->name()
 							   << " for table " << m_prebuilt->table->name.m_name;
 					}
 				}
@@ -11683,9 +11683,8 @@ wsrep_append_foreign_key(
 		WSREP_ERROR(
 			"FK key set failed: %lu (%lu %lu), index: %s %s, %s",
 			rcode, referenced, shared,
-			(index && index->name)       ? index->name :
-				"void index",
-			(index && index->table_name) ? index->table_name :
+			(index)       ? index->name() : "void index",
+			(index && index->table) ? index->table->name.m_name :
 				"void table",
 			wsrep_thd_query(thd));
 		return DB_ERROR;
@@ -14840,9 +14839,7 @@ ha_innobase::discard_or_import_tablespace(
 
 		ib_senderrf(
 			m_prebuilt->trx->mysql_thd, IB_LOG_LEVEL_ERROR,
-			ER_READ_ONLY_MODE);
-		// JAN: TODO: MySQL 5.7
-			//ER_CANNOT_DISCARD_TEMPORARY_TABLE);
+			ER_CANNOT_DISCARD_TEMPORARY_TABLE);
 
 		DBUG_RETURN(HA_ERR_TABLE_NEEDS_UPGRADE);
 	}
@@ -14863,9 +14860,7 @@ ha_innobase::discard_or_import_tablespace(
 			MYF(0), discard ? "discard" : "import",
 			dict_table->name.m_name);
 
-		// JAN: TODO: MySQL 5.7
-		//DBUG_RETURN(HA_ERR_NOT_ALLOWED_COMMAND);
-		DBUG_RETURN(HA_ERR_TABLE_READONLY);
+		DBUG_RETURN(HA_ERR_NOT_ALLOWED_COMMAND);
 	}
 
 	TrxInInnoDB	trx_in_innodb(m_prebuilt->trx);



More information about the commits mailing list