Skip to content

Commit

Permalink
Merge InnoDB 5.7 from mysql-5.7.14.
Browse files Browse the repository at this point in the history
Contains also:
       MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan)
       Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB

       MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
       enable tests that were fixed in MDEV-10549

       MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
       fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
  • Loading branch information
Jan Lindström committed Sep 8, 2016
1 parent 2e814d4 commit fec844a
Show file tree
Hide file tree
Showing 244 changed files with 15,710 additions and 9,153 deletions.
13 changes: 12 additions & 1 deletion include/my_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,18 @@ enum ha_base_keytype {
#define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191 /* Too many words in a phrase */
#define HA_ERR_DECRYPTION_FAILED 192 /* Table encrypted but
decypt failed */
#define HA_ERR_LAST 192 /* Copy of last error nr */
#define HA_ERR_FK_DEPTH_EXCEEDED 193 /* FK cascade depth exceeded */
#define HA_MISSING_CREATE_OPTION 194 /* Option Missing during Create */
#define HA_ERR_SE_OUT_OF_MEMORY 195 /* Out of memory in storage engine */
#define HA_ERR_TABLE_CORRUPT 196 /* Table/Clustered index is corrupted. */
#define HA_ERR_QUERY_INTERRUPTED 197 /* The query was interrupted */
#define HA_ERR_TABLESPACE_MISSING 198 /* Missing Tablespace */
#define HA_ERR_TABLESPACE_IS_NOT_EMPTY 199 /* Tablespace is not empty */
#define HA_ERR_WRONG_FILE_NAME 200 /* Invalid Filename */
#define HA_ERR_NOT_ALLOWED_COMMAND 201 /* Operation is not allowed */
#define HA_ERR_COMPUTE_FAILED 202 /* Compute generated column value failed */
#define HA_ERR_INNODB_READ_ONLY 203 /* InnoDB is in read only mode */
#define HA_ERR_LAST 203 /* Copy of last error nr * */

/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
Expand Down
13 changes: 12 additions & 1 deletion include/my_handler_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,18 @@ static const char *handler_error_messages[]=
"Disk full",
"Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this",
"Too many words in a FTS phrase or proximity search",
"Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match."
"Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.",
"Foreign key cascade delete/update exceeds max depth",
"Table storage engine found required create option missing",
"Out of memory in storage engine",
"Operation cannot be performed. The table is missing, corrupt or contains bad data.",
"Query execution was interrupted",
"Tablespace is missing for table",
"Tablespace is not empty",
"Incorrect File Name",
"Table storage engine found required create option missing",
"Compute virtual column value failed",
"InnoDB is in read only mode"
};

#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
4 changes: 0 additions & 4 deletions mysql-test/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ innodb-wl5522-debug-zip : broken upstream
innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
implicit_commit : MDEV-10549
lock_sync : MDEV-10548
innodb_mysql_sync : MDEV-10548
partition_debug_sync : MDEV-10548
4 changes: 4 additions & 0 deletions mysql-test/include/have_no_undo_tablespaces.inc
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 5 additions & 4 deletions mysql-test/include/mix1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -624,17 +624,18 @@ 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;
--error ER_NO_SUCH_TABLE_IN_ENGINE
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


#
Expand Down
1 change: 1 addition & 0 deletions mysql-test/r/partition_innodb_plugin.result
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
call mtr.add_suppression("InnoDB: Table .* does not exist in the InnoDB internal data dictionary .*");
#
# Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
# PARTITONING, ON INDEX CREATE
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/suite/galera/r/create.result
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ DROP TABLE t1, t2;
# MDEV-10235: Deadlock in CREATE TABLE ... AS SELECT .. if result set
# is empty in Galera
#
connection node_1;
CREATE TABLE t1(c1 INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
CREATE TABLE t2 AS SELECT * FROM t1 WHERE c1=2;
connection node_2;
SELECT * FROM t1;
c1
1
SELECT * FROM t2;
c1
DROP TABLE t1, t2;
disconnect node_2;
disconnect node_1;
# End of tests
2 changes: 0 additions & 2 deletions mysql-test/suite/handler/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################

innodb : MDEV-10549
1 change: 1 addition & 0 deletions mysql-test/suite/handler/innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ optimize table t1;
connection default;
handler t1 read next;
c1
1
handler t1 close;
connection con2;
Table Op Msg_type Msg_text
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

innodb.auto_increment_dup : MDEV-10548
innodb_skip_innodb_is_tables : MDEV-10200
innodb.innodb_bug13510739: MDEV-10549
innodb.defrag_mdl-9155 : MDEV-10551
innodb_defragment_fill_factor : MDEV-10771
38 changes: 38 additions & 0 deletions mysql-test/suite/innodb/include/show_i_s_tablespaces.inc
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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: .* ");
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
Expand Down
8 changes: 4 additions & 4 deletions mysql-test/suite/innodb/r/innodb_information_schema.result
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a
X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
X RECORD `test`.`t_max` PRIMARY 2 127.000000, 140517642401116, 32767.000000, 140517642401147, 8388607.000000, 140517642401180, 2147483647.000000, 140517642401216, 9223372036854775808.000000, 140517642401261
X RECORD `test`.`t_max` PRIMARY 2 127.000000, 140517642401116, 32767.000000, 140517642401147, 8388607.000000, 140517642401180, 2147483647.000000, 140517642401216, 9223372036854775808.000000, 140517642401261
X RECORD `test`.`t_min` PRIMARY 2 18446744073709551616.000000, 140517642401133, 18446744073709518848.000000, 140517642401179, 18446744073701163008.000000, 140517642401225, 18446744071562067968.000000, 140517642401271, 9223372036854775808.000000, 140517642401316
X RECORD `test`.`t_min` PRIMARY 2 18446744073709551616.000000, 140517642401133, 18446744073709518848.000000, 140517642401179, 18446744073701163008.000000, 140517642401225, 18446744071562067968.000000, 140517642401271, 9223372036854775808.000000, 140517642401316
X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
lock_table COUNT(*)
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/suite/innodb/r/innodb_mysql.result
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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: .* ");

let MYSQLD_DATADIR =`SELECT @@datadir`;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/t/innodb.test
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ insert into t1 values
(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 1296,1451
--error 4029,1451
delete from t1 where id=0;
delete from t1 where id=255;
--error 0,1451
Expand Down
4 changes: 3 additions & 1 deletion mysql-test/suite/innodb/t/innodb_mysql-master.opt
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit fec844a

Please sign in to comment.