From f233c9778e91e4087e294fbe62ee32d51add9eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 20 Nov 2017 13:24:43 +0200 Subject: [PATCH] Adjust the MySQL 5.7 tests for MariaDB 10.2 --- .../innodb/r/innodb_bulk_create_index.result | 72 +++++++------------ .../r/innodb_bulk_create_index_flush.result | 13 ++-- ...nnodb_bulk_create_index_replication.result | 26 +++---- .../r/innodb_bulk_create_index_small.result | 24 +++---- .../innodb/t/innodb_bulk_create_index.test | 3 +- .../t/innodb_bulk_create_index_debug.test | 2 +- .../t/innodb_bulk_create_index_flush.test | 13 ++-- .../innodb_bulk_create_index_replication.test | 1 + .../t/innodb_bulk_create_index_small.test | 3 +- storage/innobase/row/row0merge.cc | 2 +- 10 files changed, 62 insertions(+), 97 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb_bulk_create_index.result b/mysql-test/suite/innodb/r/innodb_bulk_create_index.result index 78f0c256d85..ec7ce044cb7 100644 --- a/mysql-test/suite/innodb/r/innodb_bulk_create_index.result +++ b/mysql-test/suite/innodb/r/innodb_bulk_create_index.result @@ -33,15 +33,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -209,15 +205,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -385,15 +377,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -562,15 +550,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -740,15 +724,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -917,15 +897,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 diff --git a/mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result b/mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result index c0120ade42a..c795ee044e6 100644 --- a/mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result +++ b/mysql-test/suite/innodb/r/innodb_bulk_create_index_flush.result @@ -16,28 +16,29 @@ title VARCHAR(100) SELECT COUNT(*) FROM t1; COUNT(*) 10000 -SET SESSION debug="+d,ib_index_build_fail_before_flush"; +SET @saved_dbug= @@SESSION.debug_dbug; +SET debug_dbug='+d,ib_index_build_fail_before_flush'; CREATE INDEX idx_id ON t1(id); -ERROR HY000: Got error 1000 from storage engine +ERROR 70100: Query execution was interrupted CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK CREATE INDEX idx_title ON t1(title); -ERROR HY000: Got error 1000 from storage engine +ERROR 70100: Query execution was interrupted CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK CREATE FULLTEXT INDEX fidx_title ON t1(title); -ERROR HY000: Got error 1000 from storage engine +ERROR 70100: Query execution was interrupted CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK ALTER TABLE t1 ADD COLUMN content TEXT; -ERROR HY000: Got error 1000 from storage engine +ERROR 70100: Query execution was interrupted CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK -SET SESSION debug="-d,ib_index_build_fail_before_flush"; +SET debug_dbug= @saved_dbug; INSERT INTO t1 VALUES(10001, 10001, 'a10000'); ALTER TABLE t1 ADD UNIQUE INDEX idx_title(title); ERROR 23000: Duplicate entry 'a10000' for key 'idx_title' diff --git a/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result b/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result index 4adafa179b4..ae050170b4f 100644 --- a/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result +++ b/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result @@ -1,8 +1,6 @@ include/master-slave.inc -Warnings: -Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. -Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] +connection master; CREATE PROCEDURE populate_t1(load_even INT) BEGIN DECLARE i int DEFAULT 1; @@ -31,15 +29,11 @@ CREATE INDEX idx_id ON t1(id); CREATE INDEX idx_title ON t1(title); /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -148,6 +142,7 @@ class id title SELECT * FROM t_part WHERE title = 'a101'; class id title include/sync_slave_sql_with_master.inc +connection slave; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -165,11 +160,11 @@ t_part CREATE TABLE `t_part` ( `title` varchar(30) DEFAULT NULL, KEY `idx` (`class`,`id`,`title`(10)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE (id) -SUBPARTITION BY KEY (id) + PARTITION BY RANGE (`id`) +SUBPARTITION BY KEY (`id`) SUBPARTITIONS 4 -(PARTITION p0 VALUES LESS THAN (5000) ENGINE = InnoDB, - PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +(PARTITION `p0` VALUES LESS THAN (5000) ENGINE = InnoDB, + PARTITION `p1` VALUES LESS THAN MAXVALUE ENGINE = InnoDB) SELECT COUNT(*) FROM t1; COUNT(*) 97 @@ -220,6 +215,7 @@ SELECT * FROM t_part WHERE id = 101; class id title SELECT * FROM t_part WHERE title = 'a101'; class id title +connection master; DROP PROCEDURE populate_t1; DROP TABLE t1; DROP TABLE t_part; diff --git a/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result b/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result index db3eacaadc3..b48207d4497 100644 --- a/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result +++ b/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result @@ -28,15 +28,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -95,15 +91,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`id` = 10) +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table partitions type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 100.00 NULL -Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`class` AS `class`,`test`.`t1`.`id` AS `id`,`test`.`t1`.`title` AS `title` from `test`.`t1` where (`test`.`t1`.`title` = 'a10') +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index.test b/mysql-test/suite/innodb/t/innodb_bulk_create_index.test index 317f737f7c2..534b4de87f7 100644 --- a/mysql-test/suite/innodb/t/innodb_bulk_create_index.test +++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index.test @@ -14,8 +14,7 @@ ###################################################################### -- source include/not_embedded.inc --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc -- source include/big_test.inc # Test Row Format: REDUNDANT. diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test b/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test index ed6dbf238ea..83a12431802 100644 --- a/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test +++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index_debug.test @@ -4,7 +4,7 @@ # Test Restart & Crash Recovery. -- source include/big_test.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc # Test Row Format: REDUNDANT. let $row_format = REDUNDANT; diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test b/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test index 8ae4c5703d5..0cc52b46c20 100644 --- a/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test +++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index_flush.test @@ -33,29 +33,30 @@ CALL populate_t1(); SELECT COUNT(*) FROM t1; -SET SESSION debug="+d,ib_index_build_fail_before_flush"; +SET @saved_dbug= @@SESSION.debug_dbug; +SET debug_dbug='+d,ib_index_build_fail_before_flush'; --- error ER_GET_ERRNO +-- error ER_QUERY_INTERRUPTED CREATE INDEX idx_id ON t1(id); CHECK TABLE t1; --- error ER_GET_ERRNO +-- error ER_QUERY_INTERRUPTED CREATE INDEX idx_title ON t1(title); CHECK TABLE t1; --- error ER_GET_ERRNO +-- error ER_QUERY_INTERRUPTED CREATE FULLTEXT INDEX fidx_title ON t1(title); CHECK TABLE t1; --- error ER_GET_ERRNO +-- error ER_QUERY_INTERRUPTED ALTER TABLE t1 ADD COLUMN content TEXT; CHECK TABLE t1; -SET SESSION debug="-d,ib_index_build_fail_before_flush"; +SET debug_dbug= @saved_dbug; INSERT INTO t1 VALUES(10001, 10001, 'a10000'); diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_replication.test b/mysql-test/suite/innodb/t/innodb_bulk_create_index_replication.test index 714aabe3b9c..5b4eaae7557 100644 --- a/mysql-test/suite/innodb/t/innodb_bulk_create_index_replication.test +++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index_replication.test @@ -15,6 +15,7 @@ --source include/not_embedded.inc -- source include/have_innodb.inc +-- source include/have_partition.inc -- source include/master-slave.inc -- connection master diff --git a/mysql-test/suite/innodb/t/innodb_bulk_create_index_small.test b/mysql-test/suite/innodb/t/innodb_bulk_create_index_small.test index 76c80f4958d..d04dd59f7e7 100644 --- a/mysql-test/suite/innodb/t/innodb_bulk_create_index_small.test +++ b/mysql-test/suite/innodb/t/innodb_bulk_create_index_small.test @@ -2,8 +2,7 @@ # wl#7277: InnoDB: Bulk Load for Create Index # --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc # Create Insert Procedure DELIMITER |; diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index beb816d681f..017821fdf38 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -5024,7 +5024,7 @@ func_exit: ut_ad(need_flush_observer); DBUG_EXECUTE_IF("ib_index_build_fail_before_flush", - error = DB_FAIL; + error = DB_INTERRUPTED; ); if (error != DB_SUCCESS) {