Skip to content

Commit 5cf9d84

Browse files
committed
Merge 10.11 into 11.4
2 parents 9aa8512 + db13582 commit 5cf9d84

22 files changed

+563
-76
lines changed

cmake/cpack_rpm.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ IF(RPM MATCHES "fedora")
342342
ALTERNATIVE_NAME("shared" "mariadb-connector-c" ${MARIADB_CONNECTOR_C_VERSION}-1)
343343
ENDIF()
344344

345+
IF(RPM MATCHES "fedora|rhel|centos" AND NOT RPM MATCHES "rhel[78]")
346+
SETA(CPACK_RPM_server_PACKAGE_REQUIRES "(mysql-selinux >= 1.0.14 if selinux-policy-targeted)")
347+
ENDIF()
345348
SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang")
346349

347350
################

debian/control

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,7 @@ Description: Backup tool for MariaDB server
937937

938938
Package: mariadb-plugin-connect
939939
Architecture: any
940-
Depends: libxml2,
941-
mariadb-server (= ${server:Version}),
940+
Depends: mariadb-server (= ${server:Version}),
942941
unixodbc,
943942
${misc:Depends},
944943
${shlibs:Depends}

mysql-test/main/grant4.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ drop temporary table mysql.user;
143143
rename table mysql.user1 to mysql.user;
144144
# switching back from mysql.user to mysql.global_priv
145145
# switching from mysql.global_priv to mysql.user
146-
call mtr.add_suppression('mysql.user table is damaged');
146+
call mtr.add_suppression('mysql\\.user');
147147
rename table mysql.user to mysql.user1;
148148
create table mysql.user (Host char(100), User char(100));
149149
flush privileges;
150-
ERROR HY000: Fatal error: mysql.user table is damaged or in unsupported 3.20 format
150+
ERROR HY000: Cannot load from mysql.user. The table is probably corrupted
151151
drop table mysql.user;
152152
rename table mysql.user1 to mysql.user;
153153
# switching back from mysql.user to mysql.global_priv

mysql-test/main/grant4.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ source include/switch_to_mysql_global_priv.inc;
169169
# Bug#28986737: RENAMING AND REPLACING MYSQL.USER TABLE CAN LEAD TO A SERVER CRASH
170170
#
171171
source include/switch_to_mysql_user.inc;
172-
call mtr.add_suppression('mysql.user table is damaged');
172+
call mtr.add_suppression('mysql\\.user');
173173
rename table mysql.user to mysql.user1;
174174
create table mysql.user (Host char(100), User char(100));
175-
--error ER_UNKNOWN_ERROR
175+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
176176
flush privileges;
177177
drop table mysql.user;
178178
rename table mysql.user1 to mysql.user;

mysql-test/main/grant5.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ disconnect con1;
451451
connection default;
452452
drop database db;
453453
drop user foo;
454-
call mtr.add_suppression('mysql.host table is damaged');
454+
call mtr.add_suppression('mysql\\.host');
455455
create table mysql.host (c1 int);
456456
insert mysql.host values (1);
457457
flush privileges;
458-
ERROR HY000: Fatal error: mysql.host table is damaged or in unsupported 3.20 format
458+
ERROR HY000: Cannot load from mysql.host. The table is probably corrupted
459459
drop table mysql.host;
460460
#
461461
# MDEV-30826 Invalid data on mysql.host segfaults the server after an upgrade to 10.4

mysql-test/main/grant5.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@ drop user foo;
403403
#
404404
# MDEV-23009 SIGSEGV in get_field from acl_load (on optimized builds)
405405
#
406-
call mtr.add_suppression('mysql.host table is damaged');
406+
call mtr.add_suppression('mysql\\.host');
407407
create table mysql.host (c1 int);
408408
insert mysql.host values (1);
409-
--error ER_UNKNOWN_ERROR
409+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
410410
flush privileges;
411411
drop table mysql.host;
412412

mysql-test/main/grant_repair.result

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#
2+
# MDEV-20257 Server crashes in Grant_table_base::init_read_record upon crash-upgrade
3+
#
14
call mtr.add_suppression("mysql.user");
25
# switching from mysql.global_priv to mysql.user
36
flush tables;
@@ -7,3 +10,99 @@ Error 145 Got error '145 "Table was marked as crashed and should be repaired"' f
710
Warning 1034 12544 clients are using or haven't closed the table properly
811
Note 1034 Table is fixed
912
# switching back from mysql.user to mysql.global_priv
13+
#
14+
# MDEV-28128 SIGSEGV in replace_column_table on GRANT
15+
#
16+
call mtr.add_suppression("The table is probably corrupted");
17+
create user a@localhost;
18+
rename table mysql.columns_priv to mysql.columns_priv_bak;
19+
create table mysql.columns_priv select * from mysql.columns_priv_bak;
20+
create table t (c int);
21+
grant update (c) on t to a@localhost;
22+
ERROR HY000: Cannot load from mysql.columns_priv. The table is probably corrupted
23+
drop table t;
24+
drop table mysql.columns_priv;
25+
rename table mysql.columns_priv_bak to mysql.columns_priv;
26+
drop user a@localhost;
27+
#
28+
# MDEV-23731 SIGSEGV in replace_user_table when changing mysql db tables
29+
#
30+
rename table mysql.global_priv to mysql.global_priv_bak;
31+
rename table mysql.user to mysql.user_bak;
32+
create table mysql.user (host char(100), user char(100)) engine=merge;
33+
alter user 'a' identified by '';
34+
ERROR HY000: Cannot load from mysql.user. The table is probably corrupted
35+
drop table mysql.user;
36+
rename table mysql.global_priv_bak to mysql.global_priv;
37+
rename table mysql.user_bak to mysql.user;
38+
#
39+
# MDEV-24206 SIGSEGV in replace_db_table on GRANT
40+
#
41+
rename table mysql.db to mysql.db_bak;
42+
create table mysql.db engine=memory select * from mysql.db_bak;
43+
grant select on mysql.* to 'a'@'a' identified by 'a';
44+
ERROR HY000: Cannot load from mysql.db. The table is probably corrupted
45+
drop table mysql.db;
46+
rename table mysql.db_bak to mysql.db;
47+
#
48+
# MDEV-24814 SIGSEGV in replace_table_table on GRANT
49+
#
50+
create user m@localhost;
51+
rename table mysql.tables_priv to mysql.tables_priv_bak;
52+
create table t (c int);
53+
create table mysql.tables_priv select * from mysql.tables_priv_bak;
54+
grant select on t to m@localhost;
55+
ERROR HY000: Cannot load from mysql.tables_priv. The table is probably corrupted
56+
drop table mysql.tables_priv;
57+
rename table mysql.tables_priv_bak to mysql.tables_priv;
58+
drop user m@localhost;
59+
drop table t;
60+
#
61+
# MDEV-27842 SIGSEGV in replace_routine_table on GRANT
62+
#
63+
create user a@b;
64+
set global log_bin_trust_function_creators=1;
65+
rename table mysql.procs_priv to mysql.procs_priv_bak;
66+
create table mysql.procs_priv (dummy int);
67+
create function f() returns int return (select 1 t);
68+
grant execute on function f to a@b;
69+
ERROR HY000: Cannot load from mysql.procs_priv. The table is probably corrupted
70+
drop table mysql.procs_priv;
71+
rename table mysql.procs_priv_bak to mysql.procs_priv;
72+
drop function f;
73+
drop user a@b;
74+
#
75+
# MDEV-27893 SIGSEGV in replace_proxies_priv_table on GRANT PROXY
76+
#
77+
rename table mysql.proxies_priv to mysql.proxies_priv_bak;
78+
create table mysql.proxies_priv select * from mysql.proxies_priv_bak;
79+
grant proxy on grant_plug to grant_plug_dest;
80+
ERROR HY000: Cannot load from mysql.proxies_priv. The table is probably corrupted
81+
drop table mysql.proxies_priv;
82+
rename table mysql.proxies_priv_bak to mysql.proxies_priv;
83+
#
84+
# MDEV-28773 SIGSEGV in TABLE::use_all_columns, replace_roles_mapping_table
85+
#
86+
rename table mysql.roles_mapping to mysql.roles_mapping_bak;
87+
create role r1;
88+
drop role r1;
89+
rename table mysql.roles_mapping_bak to mysql.roles_mapping;
90+
#
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+
#
100+
# MDEV-28482 SIGSEGV in get_access_value_from_val_int
101+
#
102+
create temporary table t1 select * from mysql.tables_priv;
103+
alter table mysql.tables_priv drop column timestamp;
104+
flush privileges;
105+
ERROR HY000: Cannot load from mysql.tables_priv. The table is probably corrupted
106+
alter table mysql.tables_priv add column Timestamp timestamp not null default now() on update now() after grantor;
107+
replace mysql.tables_priv select * from t1;
108+
# End of 10.11 tests

mysql-test/main/grant_repair.test

Lines changed: 109 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#
2-
# MDEV-20257 Server crashes in Grant_table_base::init_read_record upon crash-upgrade
3-
#
1+
--echo #
2+
--echo # MDEV-20257 Server crashes in Grant_table_base::init_read_record upon crash-upgrade
3+
--echo #
44
source include/not_embedded.inc;
55

66
call mtr.add_suppression("mysql.user");
@@ -19,3 +19,109 @@ replace_result \\ /;
1919
flush privileges;
2020

2121
source include/switch_to_mysql_global_priv.inc;
22+
23+
--echo #
24+
--echo # MDEV-28128 SIGSEGV in replace_column_table on GRANT
25+
--echo #
26+
call mtr.add_suppression("The table is probably corrupted");
27+
create user a@localhost;
28+
rename table mysql.columns_priv to mysql.columns_priv_bak;
29+
create table mysql.columns_priv select * from mysql.columns_priv_bak;
30+
create table t (c int);
31+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
32+
grant update (c) on t to a@localhost;
33+
drop table t;
34+
drop table mysql.columns_priv;
35+
rename table mysql.columns_priv_bak to mysql.columns_priv;
36+
drop user a@localhost;
37+
38+
--echo #
39+
--echo # MDEV-23731 SIGSEGV in replace_user_table when changing mysql db tables
40+
--echo #
41+
rename table mysql.global_priv to mysql.global_priv_bak;
42+
rename table mysql.user to mysql.user_bak;
43+
create table mysql.user (host char(100), user char(100)) engine=merge;
44+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
45+
alter user 'a' identified by '';
46+
drop table mysql.user;
47+
rename table mysql.global_priv_bak to mysql.global_priv;
48+
rename table mysql.user_bak to mysql.user;
49+
50+
--echo #
51+
--echo # MDEV-24206 SIGSEGV in replace_db_table on GRANT
52+
--echo #
53+
rename table mysql.db to mysql.db_bak;
54+
create table mysql.db engine=memory select * from mysql.db_bak;
55+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
56+
grant select on mysql.* to 'a'@'a' identified by 'a';
57+
drop table mysql.db;
58+
rename table mysql.db_bak to mysql.db;
59+
60+
--echo #
61+
--echo # MDEV-24814 SIGSEGV in replace_table_table on GRANT
62+
--echo #
63+
create user m@localhost;
64+
rename table mysql.tables_priv to mysql.tables_priv_bak;
65+
create table t (c int);
66+
create table mysql.tables_priv select * from mysql.tables_priv_bak;
67+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
68+
grant select on t to m@localhost;
69+
drop table mysql.tables_priv;
70+
rename table mysql.tables_priv_bak to mysql.tables_priv;
71+
drop user m@localhost;
72+
drop table t;
73+
74+
--echo #
75+
--echo # MDEV-27842 SIGSEGV in replace_routine_table on GRANT
76+
--echo #
77+
create user a@b;
78+
set global log_bin_trust_function_creators=1;
79+
rename table mysql.procs_priv to mysql.procs_priv_bak;
80+
create table mysql.procs_priv (dummy int);
81+
create function f() returns int return (select 1 t);
82+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
83+
grant execute on function f to a@b;
84+
drop table mysql.procs_priv;
85+
rename table mysql.procs_priv_bak to mysql.procs_priv;
86+
drop function f;
87+
drop user a@b;
88+
89+
--echo #
90+
--echo # MDEV-27893 SIGSEGV in replace_proxies_priv_table on GRANT PROXY
91+
--echo #
92+
rename table mysql.proxies_priv to mysql.proxies_priv_bak;
93+
create table mysql.proxies_priv select * from mysql.proxies_priv_bak;
94+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
95+
grant proxy on grant_plug to grant_plug_dest;
96+
drop table mysql.proxies_priv;
97+
rename table mysql.proxies_priv_bak to mysql.proxies_priv;
98+
99+
--echo #
100+
--echo # MDEV-28773 SIGSEGV in TABLE::use_all_columns, replace_roles_mapping_table
101+
--echo #
102+
rename table mysql.roles_mapping to mysql.roles_mapping_bak;
103+
create role r1;
104+
drop role r1;
105+
rename table mysql.roles_mapping_bak to mysql.roles_mapping;
106+
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+
117+
--echo #
118+
--echo # MDEV-28482 SIGSEGV in get_access_value_from_val_int
119+
--echo #
120+
create temporary table t1 select * from mysql.tables_priv;
121+
alter table mysql.tables_priv drop column timestamp;
122+
--error ER_CANNOT_LOAD_FROM_TABLE_V2
123+
flush privileges;
124+
alter table mysql.tables_priv add column Timestamp timestamp not null default now() on update now() after grantor;
125+
replace mysql.tables_priv select * from t1;
126+
127+
--echo # End of 10.11 tests

mysql-test/main/ps.result

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6041,6 +6041,18 @@ a b c
60416041
1 1970-01-01 09:00:01 6
60426042
DROP TABLE t;
60436043
# End of 10.6 tests
6044+
# Beginning of 10.11 test
6045+
#
6046+
# MDEV-30277: Assertion failure in Diagnostics_area::set_error_status
6047+
# / Reprepare_observer::report_error
6048+
#
6049+
CREATE TABLE t (a INT);
6050+
PREPARE stmt FROM " DELETE FROM t LIMIT ?";
6051+
ALTER TABLE t FORCE;
6052+
EXECUTE stmt USING DEFAULT;
6053+
ERROR HY000: Default/ignore value is not supported for such parameter usage
6054+
DROP TABLE t;
6055+
# End of 10.11 test
60446056
#
60456057
# MDEV-34322: ASAN heap-buffer-overflow in Field::is_null / Item_param::assign_default or bogus ER_BAD_NULL_ERROR
60466058
#

mysql-test/main/ps.test

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5496,6 +5496,24 @@ SELECT * FROM t;
54965496

54975497
DROP TABLE t;
54985498
--echo # End of 10.6 tests
5499+
5500+
--echo # Beginning of 10.11 test
5501+
5502+
--echo #
5503+
--echo # MDEV-30277: Assertion failure in Diagnostics_area::set_error_status
5504+
--echo # / Reprepare_observer::report_error
5505+
--echo #
5506+
5507+
CREATE TABLE t (a INT);
5508+
PREPARE stmt FROM " DELETE FROM t LIMIT ?";
5509+
ALTER TABLE t FORCE;
5510+
--error ER_INVALID_DEFAULT_PARAM
5511+
EXECUTE stmt USING DEFAULT;
5512+
5513+
DROP TABLE t;
5514+
5515+
--echo # End of 10.11 test
5516+
54995517
--echo #
55005518
--echo # MDEV-34322: ASAN heap-buffer-overflow in Field::is_null / Item_param::assign_default or bogus ER_BAD_NULL_ERROR
55015519
--echo #

0 commit comments

Comments
 (0)