Skip to content

Commit 4ffa1ff

Browse files
committed
Merge 10.11 into 11.4
2 parents be0e3b2 + d0afe4b commit 4ffa1ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+461
-428
lines changed

mysql-test/main/grant_repair.result

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,6 @@ create role r1;
8888
drop role r1;
8989
rename table mysql.roles_mapping_bak to mysql.roles_mapping;
9090
#
91-
# MDEV-35622 SEGV, ASAN use-after-poison when reading system table with less than expected number of columns
92-
#
93-
call mtr.add_suppression("mysql.servers");
94-
alter table mysql.servers drop column owner;
95-
insert into mysql.servers values(0,0,0,0,0,0,0,0);
96-
flush privileges;
97-
ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted
98-
alter table mysql.servers add column Owner varchar(512) not null default '';
99-
#
10091
# MDEV-28482 SIGSEGV in get_access_value_from_val_int
10192
#
10293
create temporary table t1 select * from mysql.tables_priv;

mysql-test/main/grant_repair.test

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@ create role r1;
104104
drop role r1;
105105
rename table mysql.roles_mapping_bak to mysql.roles_mapping;
106106

107-
--echo #
108-
--echo # MDEV-35622 SEGV, ASAN use-after-poison when reading system table with less than expected number of columns
109-
--echo #
110-
call mtr.add_suppression("mysql.servers");
111-
alter table mysql.servers drop column owner;
112-
insert into mysql.servers values(0,0,0,0,0,0,0,0);
113-
--error ER_CANNOT_LOAD_FROM_TABLE_V2
114-
flush privileges;
115-
alter table mysql.servers add column Owner varchar(512) not null default '';
116-
117107
--echo #
118108
--echo # MDEV-28482 SIGSEGV in get_access_value_from_val_int
119109
--echo #

mysql-test/main/mysql_upgrade.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2533,7 +2533,8 @@ name dl
25332533
# Check that mysql_upgrade can be run on mysqldump
25342534
# of mysql schema from previous versions
25352535
#
2536-
call mtr.add_suppression("innodb_(table|index)_stats has length mismatch in the column name table_name");
2536+
call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table `mysql`\\.`gtid_slave_pos` but the required system tables mysql\\.innodb_table_stats and mysql\\.innodb_index_stats are not present or have unexpected structure");
2537+
call mtr.add_suppression("InnoDB: Unexpected length of mysql\\.innodb_table_stats\\.table_name");
25372538
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 21, found 20.");
25382539
#
25392540
# Upgrade from version 5.5

mysql-test/main/mysql_upgrade.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ SELECT * FROM mysql.plugin WHERE name='unix_socket';
540540
--echo #
541541

542542
# The warning appears during mysql_upgrade, before the schema becomes consistent
543-
call mtr.add_suppression("innodb_(table|index)_stats has length mismatch in the column name table_name");
543+
call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table `mysql`\\.`gtid_slave_pos` but the required system tables mysql\\.innodb_table_stats and mysql\\.innodb_index_stats are not present or have unexpected structure");
544+
call mtr.add_suppression("InnoDB: Unexpected length of mysql\\.innodb_table_stats\\.table_name");
544545
# This comes from opening 10.6 sys.host_summary view that uses sys.format_time function,
545546
# on still inconsistent mysql.proc, in older versions
546547
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 21, found 20.");

mysql-test/main/servers.result

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ alter server s1 options(host 'server.example.org');
3737
rename table mysql.servers to mysql.servers_save;
3838
create table mysql.servers (x int);
3939
alter server s1 options(host 'server.example.org');
40-
ERROR HY000: The foreign server name you are trying to reference does not exist. Data source error: s1
40+
ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted
41+
drop server s1;
42+
ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted
4143
create server s2 foreign data wrapper foo options(user 'a');
42-
ERROR HY000: Can't read record in system table
44+
ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted
4345
drop table mysql.servers;
4446
rename table mysql.servers_save to mysql.servers;
47+
flush privileges;
4548
drop server s1;
4649
#
4750
# MDEV-35641 foreign server "disappears" after ALTERing the servers system table to use innodb and FLUSH PRIVILEGES
@@ -50,3 +53,54 @@ CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS (HOST '127.0.0.1');
5053
ALTER TABLE mysql.servers ENGINE=innodb;
5154
FLUSH PRIVILEGES;
5255
drop server s1;
56+
#
57+
# MDEV-35622 SEGV, ASAN use-after-poison when reading system table with less than expected number of columns
58+
# MDEV-37777 upgrade from MySQL 5.7 regression, mysql.servers invalid structure
59+
#
60+
# no crash:
61+
rename table mysql.servers to mysql.servers_save;
62+
create table mysql.servers like mysql.servers_save;
63+
alter table mysql.servers drop column owner;
64+
insert into mysql.servers values(0,0,0,0,0,0,0,0);
65+
flush privileges;
66+
ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted
67+
drop table mysql.servers;
68+
# w/o PK
69+
create table mysql.servers like mysql.servers_save;
70+
alter table mysql.servers drop primary key;
71+
insert into mysql.servers values(0,0,0,0,0,0,0,0,0);
72+
flush privileges;
73+
ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted
74+
drop table mysql.servers;
75+
# upgrade is ok
76+
create table mysql.servers like mysql.servers_save;
77+
alter table mysql.servers add column Options text;
78+
create server s1 foreign data wrapper mysql options (host '127.0.0.1');
79+
flush privileges;
80+
drop server s1;
81+
drop table mysql.servers;
82+
# MySQL 5.7 (MDEV-37777)
83+
create table mysql.servers like mysql.servers_save;
84+
alter table mysql.servers modify Host char(64) not null, modify Owner char(64) not null;
85+
create server s1 foreign data wrapper mysql options (host '127.0.0.1');
86+
flush privileges;
87+
drop server s1;
88+
drop table mysql.servers;
89+
rename table mysql.servers_save to mysql.servers;
90+
# plugin
91+
create table mysql.plugin_save like mysql.plugin;
92+
alter table mysql.plugin drop column dl;
93+
install soname "ha_example";
94+
ERROR HY000: Cannot load from mysql.plugin. The table is probably corrupted
95+
uninstall soname "ha_example";
96+
ERROR HY000: Cannot load from mysql.plugin. The table is probably corrupted
97+
drop table mysql.plugin;
98+
create table mysql.plugin like mysql.plugin_save;
99+
alter table mysql.plugin drop primary key;
100+
install soname "ha_example";
101+
ERROR HY000: Cannot load from mysql.plugin. The table is probably corrupted
102+
uninstall soname "ha_example";
103+
ERROR HY000: Cannot load from mysql.plugin. The table is probably corrupted
104+
drop table mysql.plugin;
105+
rename table mysql.plugin_save to mysql.plugin;
106+
# End of 10.11 tests

mysql-test/main/servers.test

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ create server s1 foreign data wrapper foo options(user 'a');
3434
alter server s1 options(host 'server.example.org');
3535
rename table mysql.servers to mysql.servers_save;
3636
create table mysql.servers (x int);
37-
--error ER_FOREIGN_SERVER_DOESNT_EXIST
37+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
3838
alter server s1 options(host 'server.example.org');
39-
--error ER_CANT_FIND_SYSTEM_REC
39+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
40+
drop server s1;
41+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
4042
create server s2 foreign data wrapper foo options(user 'a');
4143
drop table mysql.servers;
4244
rename table mysql.servers_save to mysql.servers;
45+
flush privileges;
4346
drop server s1;
4447

4548
--echo #
@@ -50,3 +53,61 @@ CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS (HOST '127.0.0.1');
5053
ALTER TABLE mysql.servers ENGINE=innodb;
5154
FLUSH PRIVILEGES;
5255
drop server s1;
56+
57+
--echo #
58+
--echo # MDEV-35622 SEGV, ASAN use-after-poison when reading system table with less than expected number of columns
59+
--echo # MDEV-37777 upgrade from MySQL 5.7 regression, mysql.servers invalid structure
60+
--echo #
61+
62+
--echo # no crash:
63+
rename table mysql.servers to mysql.servers_save;
64+
create table mysql.servers like mysql.servers_save;
65+
alter table mysql.servers drop column owner;
66+
insert into mysql.servers values(0,0,0,0,0,0,0,0);
67+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
68+
flush privileges;
69+
drop table mysql.servers;
70+
71+
--echo # w/o PK
72+
create table mysql.servers like mysql.servers_save;
73+
alter table mysql.servers drop primary key;
74+
insert into mysql.servers values(0,0,0,0,0,0,0,0,0);
75+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
76+
flush privileges;
77+
drop table mysql.servers;
78+
79+
--echo # upgrade is ok
80+
create table mysql.servers like mysql.servers_save;
81+
alter table mysql.servers add column Options text;
82+
create server s1 foreign data wrapper mysql options (host '127.0.0.1');
83+
flush privileges;
84+
drop server s1;
85+
drop table mysql.servers;
86+
87+
--echo # MySQL 5.7 (MDEV-37777)
88+
create table mysql.servers like mysql.servers_save;
89+
alter table mysql.servers modify Host char(64) not null, modify Owner char(64) not null;
90+
create server s1 foreign data wrapper mysql options (host '127.0.0.1');
91+
flush privileges;
92+
drop server s1;
93+
drop table mysql.servers;
94+
rename table mysql.servers_save to mysql.servers;
95+
96+
--echo # plugin
97+
create table mysql.plugin_save like mysql.plugin;
98+
alter table mysql.plugin drop column dl;
99+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
100+
install soname "ha_example";
101+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
102+
uninstall soname "ha_example";
103+
drop table mysql.plugin;
104+
create table mysql.plugin like mysql.plugin_save;
105+
alter table mysql.plugin drop primary key;
106+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
107+
install soname "ha_example";
108+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
109+
uninstall soname "ha_example";
110+
drop table mysql.plugin;
111+
rename table mysql.plugin_save to mysql.plugin;
112+
113+
--echo # End of 10.11 tests
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
RESET MASTER;
2+
connect con1,localhost,root,,;
3+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
4+
CREATE TRIGGER tr BEFORE UPDATE ON t1 FOR EACH ROW BEGIN END;
5+
LOCK TABLES t1 WRITE;
6+
LOAD DATA INFILE 'x' INTO TABLE x;
7+
ERROR HY000: Table 'x' was not locked with LOCK TABLES
8+
SET AUTOCOMMIT= OFF;
9+
INSERT INTO t1 VALUES (1);
10+
SAVEPOINT A;
11+
COMMIT;
12+
disconnect con1;
13+
connect con2,localhost,root,,;
14+
SELECT 1;
15+
1
16+
1
17+
disconnect con2;
18+
connection default;
19+
include/show_binlog_events.inc
20+
Log_name Pos Event_type Server_id End_log_pos Info
21+
master-bin.000001 # Gtid # # GTID #-#-#
22+
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) ENGINE=InnoDB
23+
master-bin.000001 # Gtid # # GTID #-#-#
24+
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr BEFORE UPDATE ON t1 FOR EACH ROW BEGIN END
25+
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
26+
master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
27+
master-bin.000001 # Table_map # # table_id: # (test.t1)
28+
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
29+
master-bin.000001 # Query # # SAVEPOINT `A`
30+
master-bin.000001 # Xid # # COMMIT /* XID */
31+
DROP TABLE t1;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--source include/have_innodb.inc
2+
--source include/have_binlog_format_row.inc
3+
4+
RESET MASTER;
5+
6+
# This sequence of statements triggered a bug, where the pending LOCK TABLES
7+
# would skip flusing the pending row event for INSERT to the trx cache. And
8+
# Then the pending event would be overwritten by the SAVEPOINT, leaving an
9+
# invalid state in the THD. And then a later connection would pick the THD
10+
# with invalid state and trigger an assertion.
11+
--connect (con1,localhost,root,,)
12+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
13+
CREATE TRIGGER tr BEFORE UPDATE ON t1 FOR EACH ROW BEGIN END;
14+
LOCK TABLES t1 WRITE;
15+
--error ER_TABLE_NOT_LOCKED
16+
LOAD DATA INFILE 'x' INTO TABLE x;
17+
SET AUTOCOMMIT= OFF;
18+
INSERT INTO t1 VALUES (1);
19+
SAVEPOINT A;
20+
COMMIT;
21+
--disconnect con1
22+
23+
--connect (con2,localhost,root,,)
24+
SELECT 1;
25+
26+
# Cleanup
27+
--disconnect con2
28+
--connection default
29+
# Show the binlog events.
30+
# When the bug occurs, the Write_rows event is missing STMT_END_F.
31+
--source include/show_binlog_events.inc
32+
33+
DROP TABLE t1;

mysql-test/suite/galera/r/galera_ssl_compression.result

Lines changed: 0 additions & 31 deletions
This file was deleted.

mysql-test/suite/galera/t/galera_multi_level_fk_ddl_delete.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
--source include/have_innodb.inc
1515
--source include/have_debug.inc
1616
--source include/have_debug_sync.inc
17+
--source include/have_perfschema.inc
1718

1819
--echo #
1920
--echo # 1. BF-BF conflict on MDL locks between: DROP TABLE t6 and DELETE on t1

0 commit comments

Comments
 (0)