Skip to content

Commit 5ce9a03

Browse files
committed
Merge branch '11.4' into 11.8
2 parents d198be3 + 152ed78 commit 5ce9a03

File tree

166 files changed

+3143
-940
lines changed

Some content is hidden

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

166 files changed

+3143
-940
lines changed

cmake/install_layout.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock"
163163
SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system")
164164
SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d")
165165
SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d")
166+
SET(INSTALL_RUNDATADIR_RPM "/run/mariadb")
166167
SET(INSTALL_PAMDIR_RPM "/${INSTALL_LIBDIR_RPM}/security")
167168
SET(INSTALL_PAMDATADIR_RPM "/etc/security")
168169

@@ -193,7 +194,8 @@ SET(INSTALL_SUPPORTFILESDIR_DEB "share/mariadb")
193194
#
194195
SET(INSTALL_MYSQLDATADIR_DEB "/var/lib/mysql")
195196

196-
SET(INSTALL_UNIX_ADDRDIR_DEB "/run/mysqld/mysqld.sock")
197+
SET(INSTALL_RUNDATADIR_DEB "/run/mysqld")
198+
SET(INSTALL_UNIX_ADDRDIR_DEB "${INSTALL_RUNDATADIR_DEB}/mysqld.sock")
197199
SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system")
198200
SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d")
199201
SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d")
@@ -257,3 +259,7 @@ IF(NOT MYSQL_UNIX_ADDR)
257259
SET(MYSQL_UNIX_ADDR ${INSTALL_UNIX_ADDRDIR})
258260
ENDIF()
259261

262+
IF(NOT INSTALL_RUNDATADIR)
263+
get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY)
264+
SET(INSTALL_RUNDATADIR "${MYSQL_UNIX_DIR}" CACHE FILEPATH "Rundata installation directory" ${FORCE})
265+
ENDIF()

cmake/systemd.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ MACRO(CHECK_SYSTEMD)
5050
SET(SYSTEMD_SCRIPTS ${SYSTEMD_SCRIPTS} galera_recovery)
5151
ENDIF()
5252
IF(DEB)
53-
SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=+/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld")
54-
SET(SYSTEMD_EXECSTARTPOST "ExecStartPost=+/etc/mysql/debian-start")
53+
SET(SYSTEMD_EXECSTARTPOST "ExecStartPost=!/etc/mysql/debian-start")
5554
ENDIF()
5655
IF(URING_FOUND)
5756
SET(SYSTEMD_LIMIT "# For liburing and io_uring_setup()

debian/control

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,7 @@ Description: Connect storage engine JDBC interface for MariaDB server.
980980

981981
Package: mariadb-plugin-s3
982982
Architecture: any
983-
Depends: libcurl4,
984-
mariadb-server (= ${server:Version}),
983+
Depends: mariadb-server (= ${server:Version}),
985984
${misc:Depends},
986985
${shlibs:Depends}
987986
Description: Amazon S3 archival storage engine for MariaDB
@@ -1010,8 +1009,7 @@ Description: RocksDB storage engine for MariaDB server
10101009

10111010
Package: mariadb-plugin-oqgraph
10121011
Architecture: any
1013-
Depends: libjudydebian1,
1014-
mariadb-server (= ${server:Version}),
1012+
Depends: mariadb-server (= ${server:Version}),
10151013
${misc:Depends},
10161014
${shlibs:Depends}
10171015
Breaks: mariadb-oqgraph-engine-10.0,
@@ -1076,8 +1074,7 @@ Description: Spider storage engine for MariaDB server
10761074

10771075
Package: mariadb-plugin-gssapi-server
10781076
Architecture: any
1079-
Depends: libgssapi-krb5-2,
1080-
mariadb-server,
1077+
Depends: mariadb-server (= ${server:Version}),
10811078
${misc:Depends},
10821079
${shlibs:Depends}
10831080
Breaks: mariadb-gssapi-server-10.1,
@@ -1100,8 +1097,7 @@ Description: GSSAPI authentication plugin for MariaDB server
11001097

11011098
Package: mariadb-plugin-gssapi-client
11021099
Architecture: any
1103-
Depends: libgssapi-krb5-2,
1104-
mariadb-client (= ${binary:Version}),
1100+
Depends: mariadb-client (= ${binary:Version}),
11051101
${misc:Depends},
11061102
${shlibs:Depends}
11071103
Breaks: mariadb-gssapi-client-10.1,
@@ -1120,8 +1116,7 @@ Description: GSSAPI authentication plugin for MariaDB client
11201116

11211117
Package: mariadb-plugin-cracklib-password-check
11221118
Architecture: any
1123-
Depends: libcrack2 (>= 2.9.0),
1124-
mariadb-server,
1119+
Depends: mariadb-server,
11251120
${misc:Depends},
11261121
${shlibs:Depends}
11271122
Description: CrackLib Password Validation Plugin for MariaDB server
@@ -1134,8 +1129,7 @@ Description: CrackLib Password Validation Plugin for MariaDB server
11341129

11351130
Package: mariadb-plugin-hashicorp-key-management
11361131
Architecture: any
1137-
Depends: libcurl4,
1138-
mariadb-server,
1132+
Depends: mariadb-server,
11391133
${misc:Depends},
11401134
${shlibs:Depends}
11411135
Description: Hashicorp Key Management plugin for MariaDB

debian/mariadb-server.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ lib/systemd/system/mariadb@.socket
1515
lib/systemd/system/mysql.service
1616
lib/systemd/system/mysqld.service
1717
support-files/rpm/enable_encryption.preset etc/mysql/mariadb.conf.d/99-enable-encryption.cnf.preset
18+
usr/lib/tmpfiles.d/mariadb.conf
1819
usr/bin/aria_chk
1920
usr/bin/aria_dump_log
2021
usr/bin/aria_ftdump

debian/not-installed

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ usr/lib/*/pkgconfig/mariadb.pc
2222
usr/bin/uca-dump
2323
usr/bin/wsrep_sst_backup
2424
usr/lib/sysusers.d/mariadb.conf # Not used (yet) in Debian systemd
25-
usr/lib/tmpfiles.d/mariadb.conf # Not used (yet) in Debian systemd
2625
usr/sbin/rcmysql
2726
usr/share/doc/mariadb-server/COPYING (related file: "debian/tmp/usr/share/mariadb/mroonga/COPYING")
2827
usr/share/doc/mariadb-server/CREDITS

include/typelib.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ typedef struct st_typelib { /* Different types saved here */
2525
const char *name; /* Name of typelib */
2626
const char **type_names;
2727
unsigned int *type_lengths;
28+
/*
29+
An array of indexes of enum values that are no longer supported and so are
30+
hidden. One cannot specify hidden values, an attempt to do so will produce
31+
a warning (while an attempt to use a name that was never part of this set
32+
will produce an error).
33+
*/
2834
const int *hidden_values;
2935
} TYPELIB;
3036

mysql-test/main/alter_table_lock.result

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
#
2-
# MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in
3-
# Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK)
4-
#
5-
SET @max_session_mem_used_save= @@max_session_mem_used;
6-
CREATE TABLE t1 (a INT);
7-
SELECT * FROM t1;
8-
a
9-
ALTER TABLE x MODIFY xx INT;
10-
ERROR 42S02: Table 'test.x' doesn't exist
11-
SET SESSION max_session_mem_used= 8192;
12-
LOCK TABLE t1 WRITE;
13-
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
14-
SET SESSION max_session_mem_used = @max_session_mem_used_save;
15-
UNLOCK TABLES;
16-
DROP TABLE t1;
17-
#
18-
# End of 10.5 tests
19-
#
20-
#
212
# MDEV-28943 Online alter fails under LOCK TABLE with ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
223
#
234
create table t1 (f int) engine=innodb;
@@ -58,9 +39,6 @@ alter online table t1 add column s blob not null, algorithm=inplace;
5839
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
5940
drop table t1;
6041
#
61-
# End of 10.11 tests
62-
#
63-
#
6442
# MDEV-35611 Assertion failure in Diagnostics_area::sql_errno upon interrupted ALTER
6543
#
6644
CREATE TABLE t (a INT) ENGINE=MyISAM;
@@ -76,6 +54,4 @@ disconnect con1;
7654
connection default;
7755
UNLOCK TABLES;
7856
DROP TABLE t;
79-
#
8057
# End of 11.4 tests
81-
#

mysql-test/main/alter_table_lock.test

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,6 @@
11
--source include/not_embedded.inc
22
--source include/have_innodb.inc
33

4-
--echo #
5-
--echo # MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in
6-
--echo # Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK)
7-
--echo #
8-
9-
SET @max_session_mem_used_save= @@max_session_mem_used;
10-
11-
CREATE TABLE t1 (a INT);
12-
SELECT * FROM t1;
13-
14-
--error ER_NO_SUCH_TABLE
15-
ALTER TABLE x MODIFY xx INT;
16-
17-
SET SESSION max_session_mem_used= 8192;
18-
--error 0,ER_OPTION_PREVENTS_STATEMENT
19-
LOCK TABLE t1 WRITE;
20-
21-
--disable_warnings
22-
--error 0,ER_OPTION_PREVENTS_STATEMENT
23-
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b c INT;
24-
--enable_warnings
25-
26-
SET SESSION max_session_mem_used = @max_session_mem_used_save;
27-
UNLOCK TABLES;
28-
DROP TABLE t1;
29-
30-
--echo #
31-
--echo # End of 10.5 tests
32-
--echo #
33-
344
--echo #
355
--echo # MDEV-28943 Online alter fails under LOCK TABLE with ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
366
--echo #
@@ -75,10 +45,6 @@ lock table t1 write;
7545
alter online table t1 add column s blob not null, algorithm=inplace;
7646
drop table t1;
7747

78-
--echo #
79-
--echo # End of 10.11 tests
80-
--echo #
81-
8248
--echo #
8349
--echo # MDEV-35611 Assertion failure in Diagnostics_area::sql_errno upon interrupted ALTER
8450
--echo #
@@ -97,6 +63,4 @@ ALTER TABLE IF EXISTS t FORCE;
9763
UNLOCK TABLES;
9864
DROP TABLE t;
9965

100-
--echo #
10166
--echo # End of 11.4 tests
102-
--echo #

mysql-test/main/derived_split_innodb.result

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,71 @@ set statement optimizer_switch='split_materialized=off' for $query;
10361036
a b name total_amt
10371037
1 NULL A 10
10381038
DROP TABLE t1,t2;
1039+
#
1040+
# MDEV-37407 Wrong result with ORDER BY LIMIT
1041+
# Both, with and without split_materialized should
1042+
# produce the same results
1043+
#
1044+
SET @save_optimizer_switch= @@optimizer_switch;
1045+
CREATE TABLE t1
1046+
(a varchar(35), b varchar(4), KEY (a))
1047+
ENGINE=InnoDB;
1048+
INSERT INTO t1 VALUES
1049+
('Albania','AXA'), ('Australia','AUS'), ('Myanmar','MMR'),
1050+
('Bahamas','BS'), ('Brazil','BRA'), ('Barbados','BRB');
1051+
CREATE TABLE t2
1052+
(a varchar(4), b varchar(50), PRIMARY KEY (b,a), KEY (a))
1053+
ENGINE=InnoDB;
1054+
INSERT INTO t2 VALUES
1055+
('AUS','Anglican'), ('MMR','Baptist'), ('BS','Anglican'),
1056+
('BS','Baptist'), ('BS','Methodist'), ('BRB','Methodist'),
1057+
('BRA','Baptist'), ('USA','Baptist');
1058+
ANALYZE TABLE t1 PERSISTENT FOR ALL;
1059+
Table Op Msg_type Msg_text
1060+
test.t1 analyze status Engine-independent statistics collected
1061+
test.t1 analyze status OK
1062+
ANALYZE TABLE t2 PERSISTENT FOR ALL;
1063+
Table Op Msg_type Msg_text
1064+
test.t2 analyze status Engine-independent statistics collected
1065+
test.t2 analyze status OK
1066+
set optimizer_switch='split_materialized=off';
1067+
SELECT t1.a
1068+
FROM (SELECT a FROM t2 GROUP BY a ORDER BY a, COUNT(DISTINCT b) LIMIT 1) dt
1069+
JOIN t1 ON
1070+
dt.a=t1.b
1071+
WHERE t1.a LIKE 'B%';
1072+
a
1073+
set optimizer_switch='split_materialized=on';
1074+
SELECT t1.a
1075+
FROM (SELECT a FROM t2 GROUP BY a ORDER BY a, COUNT(DISTINCT b) LIMIT 1) dt
1076+
JOIN t1 ON
1077+
dt.a=t1.b
1078+
WHERE t1.a LIKE 'B%';
1079+
a
1080+
DROP TABLE t1,t2;
1081+
SET optimizer_switch= @save_optimizer_switch;
1082+
#
1083+
# MDEV-29638 Crash when considering Split-Materialized plan
1084+
#
1085+
set @save_optimizer_switch= @@optimizer_switch;
1086+
set optimizer_switch='condition_pushdown_for_derived=off,split_materialized=on';
1087+
CREATE TABLE t1 (id int PRIMARY KEY)engine=innodb;
1088+
CREATE TABLE t2 (id int PRIMARY KEY, c int) engine=innodb;
1089+
CREATE TABLE t3 (id int PRIMARY KEY, a int , b int, KEY (a))engine=innodb;
1090+
SELECT * FROM
1091+
(
1092+
SELECT DISTINCT t1.id
1093+
FROM t1 JOIN
1094+
(
1095+
SELECT t2.id FROM t2 JOIN t3
1096+
ON t3.id = t2.c
1097+
WHERE (t3.a > 2 AND t3.b = 2)
1098+
GROUP BY t2.id
1099+
) m2 ON m2.id = t1.id
1100+
) dt;
1101+
id
1102+
drop table t1, t2, t3;
1103+
SET optimizer_switch= @save_optimizer_switch;
10391104
# End of 10.11 tests
10401105
#
10411106
# MDEV-37057 Wrong result with LATERAL DERIVED

mysql-test/main/derived_split_innodb.test

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,77 @@ evalp set statement optimizer_switch='split_materialized=off' for $query;
632632

633633
DROP TABLE t1,t2;
634634

635+
--echo #
636+
--echo # MDEV-37407 Wrong result with ORDER BY LIMIT
637+
--echo # Both, with and without split_materialized should
638+
--echo # produce the same results
639+
--echo #
640+
641+
SET @save_optimizer_switch= @@optimizer_switch;
642+
643+
CREATE TABLE t1
644+
(a varchar(35), b varchar(4), KEY (a))
645+
ENGINE=InnoDB;
646+
647+
INSERT INTO t1 VALUES
648+
('Albania','AXA'), ('Australia','AUS'), ('Myanmar','MMR'),
649+
('Bahamas','BS'), ('Brazil','BRA'), ('Barbados','BRB');
650+
651+
CREATE TABLE t2
652+
(a varchar(4), b varchar(50), PRIMARY KEY (b,a), KEY (a))
653+
ENGINE=InnoDB;
654+
655+
INSERT INTO t2 VALUES
656+
('AUS','Anglican'), ('MMR','Baptist'), ('BS','Anglican'),
657+
('BS','Baptist'), ('BS','Methodist'), ('BRB','Methodist'),
658+
('BRA','Baptist'), ('USA','Baptist');
659+
660+
ANALYZE TABLE t1 PERSISTENT FOR ALL;
661+
ANALYZE TABLE t2 PERSISTENT FOR ALL;
662+
663+
let $q=
664+
SELECT t1.a
665+
FROM (SELECT a FROM t2 GROUP BY a ORDER BY a, COUNT(DISTINCT b) LIMIT 1) dt
666+
JOIN t1 ON
667+
dt.a=t1.b
668+
WHERE t1.a LIKE 'B%';
669+
670+
set optimizer_switch='split_materialized=off';
671+
eval $q;
672+
673+
set optimizer_switch='split_materialized=on';
674+
eval $q;
675+
676+
DROP TABLE t1,t2;
677+
678+
SET optimizer_switch= @save_optimizer_switch;
679+
680+
--echo #
681+
--echo # MDEV-29638 Crash when considering Split-Materialized plan
682+
--echo #
683+
684+
set @save_optimizer_switch= @@optimizer_switch;
685+
set optimizer_switch='condition_pushdown_for_derived=off,split_materialized=on';
686+
687+
CREATE TABLE t1 (id int PRIMARY KEY)engine=innodb;
688+
CREATE TABLE t2 (id int PRIMARY KEY, c int) engine=innodb;
689+
CREATE TABLE t3 (id int PRIMARY KEY, a int , b int, KEY (a))engine=innodb;
690+
691+
SELECT * FROM
692+
(
693+
SELECT DISTINCT t1.id
694+
FROM t1 JOIN
695+
(
696+
SELECT t2.id FROM t2 JOIN t3
697+
ON t3.id = t2.c
698+
WHERE (t3.a > 2 AND t3.b = 2)
699+
GROUP BY t2.id
700+
) m2 ON m2.id = t1.id
701+
) dt;
702+
703+
drop table t1, t2, t3;
704+
SET optimizer_switch= @save_optimizer_switch;
705+
635706
--echo # End of 10.11 tests
636707

637708
--echo #

0 commit comments

Comments
 (0)