1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge InnoDB 5.7 from mysql-5.7.9.

Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge
This commit is contained in:
Jan Lindström
2016-08-12 11:17:45 +03:00
parent 848d211c5c
commit 2e814d4702
835 changed files with 174739 additions and 84445 deletions

View File

@@ -947,6 +947,7 @@ desc t1;
Field Type Null Key Default Extra
t int(11) NO MUL 1
drop table t1;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -1009,6 +1010,7 @@ select * from t2;
number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
drop table t1,t2;
SET sql_mode = default;
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
@@ -1316,16 +1318,80 @@ INSERT INTO t2 VALUES (10, 'old'), (20, 'other');
UPDATE t1 SET c1 = 'other' WHERE c1 = 'old';
ERROR 23000: Foreign key constraint for table 't1', record 'other-somevalu' would lead to a duplicate entry in table 't2', key 'c1'
DROP TABLE t2,t1;
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);
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);
delete from t1 where id=0;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `t1` (`id`) ON DELETE CASCADE)
delete from t1 where id=15;
Got one of the listed errors
delete from t1 where id=255;
delete from t1 where id=0;
drop table t1;
CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
@@ -1628,6 +1694,7 @@ a
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);
analyze table t1;
select * from t1 order by a,b,c,d;
a b c d e
1 1 a 1 1
@@ -1689,10 +1756,10 @@ variable_value
16384
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
variable_value - @innodb_rows_deleted_orig
71
311
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig
964
1204
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig
866
@@ -2259,7 +2326,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2287,9 +2354,16 @@ select * from t1 where a=20 and b is null;
a b
20 NULL
drop table t1;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (v varchar(65530), key(v));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
SET GLOBAL innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
drop table t1;
create table t1 (v varchar(65536));
Warnings:
@@ -2309,7 +2383,8 @@ t1 CREATE TABLE `t1` (
`v` mediumtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
set storage_engine=MyISAM;
SET sql_mode = default;
set default_storage_engine=MyISAM;
create table t1 (v varchar(16384)) engine=innodb;
drop table t1;
create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
@@ -2434,6 +2509,10 @@ t9 CREATE TABLE `t9` (
KEY `col1` (`col1`,`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768), index(col1))
character set = latin1 engine = innodb;
Warnings:
@@ -2450,6 +2529,9 @@ create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
SET GLOBAL innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2457,6 +2539,9 @@ t1 CREATE TABLE `t1` (
KEY `col1` (`col1`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4;
set global innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768) primary key)
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
@@ -2469,6 +2554,10 @@ ERROR 42000: Specified key was too long; max key length is 767 bytes
create table t4 (col1 blob, primary key(col1(768)))
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
SET sql_mode = default;
set global innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t1
(
id INT PRIMARY KEY
@@ -2485,7 +2574,7 @@ INSERT INTO t2 VALUES(1);
DELETE FROM t1 WHERE id = 1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
DROP TABLE t1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
Got one of the listed errors
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS=1;
@@ -2608,6 +2697,7 @@ d varchar(255) character set utf8,
e varchar(255) character set utf8,
key (a,b,c,d,e)) engine=innodb;
ERROR 42000: Specified key was too long; max key length is 3072 bytes
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;
@@ -2723,6 +2813,7 @@ t2 CREATE TABLE `t2` (
KEY `t2_ibfk_0` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2,t1;
SET sql_mode = default;
CREATE TABLE t1 (
field1 varchar(8) NOT NULL DEFAULT '',
field2 varchar(8) NOT NULL DEFAULT '',
@@ -3095,7 +3186,7 @@ t1 CREATE TABLE `t1` (
CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
set innodb_strict_mode=on;
SET innodb_strict_mode=ON;
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),
@@ -3106,7 +3197,8 @@ c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
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;
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
ERROR 42000: Row size too large (> {checked_valid}). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
SET innodb_strict_mode=OFF;
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'