Skip to content

Commit d4cb177

Browse files
committed
Merge 10.4 into 10.5
2 parents ca26953 + 4da2273 commit d4cb177

31 files changed

+529
-86
lines changed

cmake/Internal/CPack/CPackRPM.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ macro(restore WHAT)
2222
set(CPACK_RPM_PACKAGE_${WHAT} ${orig_CPACK_RPM_PACKAGE_${WHAT}})
2323
endmacro()
2424

25+
foreach (WHAT SUMMARY DESCRIPTION)
26+
if(NOT CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT})
27+
message(FATAL_ERROR "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT} is not defined")
28+
endif()
29+
endforeach()
30+
2531
set_from_component(LICENSE)
2632
set_from_component(VENDOR)
2733
set_from_component(VERSION)

cmake/cpack_rpm.cmake

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,26 @@ conditions of the GNU General Public License Version 2 (http://www.gnu.org/licen
6262
MariaDB documentation can be found at https://mariadb.com/kb
6363
MariaDB bug reports should be submitted through https://jira.mariadb.org")
6464

65+
# mariabackup
66+
SET(CPACK_RPM_backup_PACKAGE_SUMMARY "Backup tool for MariaDB server")
67+
SET(CPACK_RPM_backup_PACKAGE_DESCRIPTION "Mariabackup is an open source tool provided by MariaDB
68+
for performing physical online backups of InnoDB, Aria and MyISAM tables.
69+
For InnoDB, “hot online” backups are possible.
70+
It was originally forked from Percona XtraBackup 2.3.8.")
71+
6572
# Packages with default description
6673
SET(CPACK_RPM_client_PACKAGE_SUMMARY "MariaDB database client binaries")
74+
SET(CPACK_RPM_client_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
6775
SET(CPACK_RPM_common_PACKAGE_SUMMARY "MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)")
76+
SET(CPACK_RPM_common_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
6877
SET(CPACK_RPM_compat_PACKAGE_SUMMARY "MariaDB database client library MySQL compat package")
78+
SET(CPACK_RPM_compat_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
6979
SET(CPACK_RPM_devel_PACKAGE_SUMMARY "MariaDB database development files")
80+
SET(CPACK_RPM_devel_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
7081
SET(CPACK_RPM_server_PACKAGE_SUMMARY "MariaDB database server binaries")
82+
SET(CPACK_RPM_server_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
7183
SET(CPACK_RPM_test_PACKAGE_SUMMARY "MariaDB database regression test suite")
84+
SET(CPACK_RPM_test_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_DESCRIPTION}")
7285

7386
# libmariadb3
7487
SET(CPACK_RPM_shared_PACKAGE_SUMMARY "LGPL MariaDB database client library")
@@ -81,51 +94,6 @@ and PHP's mysqlnd extension.
8194
This product includes PHP software, freely available from
8295
http://www.php.net/software/")
8396

84-
# Summary and descriptions per package
85-
SET(CPACK_RPM_backup_PACKAGE_SUMMARY "Backup tool for MariaDB server")
86-
SET(CPACK_RPM_backup_PACKAGE_DESCRIPTION "Mariabackup is an open source tool provided by MariaDB
87-
for performing physical online backups of InnoDB, Aria and MyISAM tables.
88-
For InnoDB, “hot online” backups are possible.
89-
It was originally forked from Percona XtraBackup 2.3.8.")
90-
91-
SET(CPACK_RPM_cassandra-engine_PACKAGE_SUMMARY "Cassandra storage engine for MariaDB")
92-
SET(CPACK_RPM_cassandra-engine_PACKAGE_DESCRIPTION "The Cassandra Storage Engine allows access to data in a Cassandra cluster from
93-
MariaDB, combining the best of SQL and no-SQL worlds. Cassandra SE (storage
94-
engine) makes Cassandra's column family appear as a table in MariaDB that you
95-
can insert to, update, and select from. You can write joins against this table,
96-
it is possible to join data that's stored in MariaDB with data that's stored in
97-
Cassandra.")
98-
99-
SET(CPACK_RPM_connect-engine_PACKAGE_SUMMARY "Connect storage engine for MariaDB")
100-
SET(CPACK_RPM_connect-engine_PACKAGE_DESCRIPTION "Connect engine supports a number of file formats (dbf, xml, txt, bin, etc),
101-
connections to ODBC tables and remote MySQL tables, as well as a number of
102-
other interesting features.")
103-
104-
SET(CPACK_RPM_cracklib-password-check_PACKAGE_SUMMARY "CrackLib Password Validation Plugin for MariaDB")
105-
SET(CPACK_RPM_cracklib-password-check_PACKAGE_DESCRIPTION "This password validation plugin uses cracklib to allow only
106-
sufficiently secure (as defined by cracklib) user passwords in MariaDB.")
107-
108-
SET(CPACK_RPM_gssapi-server_PACKAGE_SUMMARY "GSSAPI authentication plugin for MariaDB server")
109-
SET(CPACK_RPM_gssapi-server_PACKAGE_DESCRIPTION "The gssapi authentication plugin allows the user to authenticate with services
110-
that use the Generic Security Services Application Program Interface (GSSAPI).
111-
The gssapi authentication plugin is most often used for authenticating with Microsoft Active Directory.")
112-
113-
SET(CPACK_RPM_oqgraph-engine_PACKAGE_SUMMARY "OQGraph storage engine for MariaDB")
114-
SET(CPACK_RPM_oqgraph-engine_PACKAGE_DESCRIPTION "The Open Query GRAPH computation engine, or OQGRAPH as the engine itself is called,
115-
allows you to handle hierarchies (tree structures) and complex graphs
116-
(nodes having many connections in several directions).
117-
It is intended to be used for retrieving hierarchical information, such as those used for graphs,
118-
routes or social relationships, in plain SQL.")
119-
120-
SET(CPACK_RPM_rocksdb-engine_PACKAGE_SUMMARY "RocksDB storage engine for MariaDB")
121-
SET(CPACK_RPM_rocksdb-engine_PACKAGE_DESCRIPTION "The RocksDB storage engine is a high performance storage engine, aimed
122-
at maximising storage efficiency while maintaining InnoDB-like performance.")
123-
124-
SET(CPACK_RPM_tokudb-engine_PACKAGE_SUMMARY "TokuDB storage engine for MariaDB")
125-
SET(CPACK_RPM_tokudb-engine_PACKAGE_DESCRIPTION "The TokuDB storage engine is for use in high-performance and write-intensive
126-
environments, offering increased compression and better performance based
127-
on fractal indexes.")
128-
12997
SET(CPACK_RPM_SPEC_MORE_DEFINE "
13098
%define mysql_vendor ${CPACK_PACKAGE_VENDOR}
13199
%define mysqlversion ${MYSQL_NO_DASH_VERSION}

extra/mariabackup/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,18 @@
1616

1717
OPTION(WITH_MARIABACKUP "Include mariabackup" ON)
1818
ADD_FEATURE_INFO(MARIABACKUP WITH_MARIABACKUP "MariaDB Backup Utility")
19+
1920
IF(NOT WITH_MARIABACKUP)
2021
RETURN()
2122
ENDIF()
2223

23-
2424
IF(NOT WIN32)
2525
CHECK_SYMBOL_EXISTS(regcomp regex.h HAVE_SYSTEM_REGEX)
2626
IF(HAVE_SYSTEM_REGEX)
2727
ADD_DEFINITIONS(-DHAVE_SYSTEM_REGEX)
2828
ENDIF()
2929
ENDIF()
3030

31-
3231
INCLUDE_DIRECTORIES(
3332
${CMAKE_SOURCE_DIR}/include
3433
${CMAKE_SOURCE_DIR}/sql

extra/mariabackup/xbstream.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ extract_worker_thread_func(void *arg)
440440
}
441441

442442
if (chunk.type == XB_CHUNK_TYPE_EOF) {
443-
pthread_mutex_lock(ctxt->mutex);
444443
pthread_mutex_unlock(&entry->mutex);
444+
pthread_mutex_lock(ctxt->mutex);
445445
my_hash_delete(ctxt->filehash, (uchar *) entry);
446446
pthread_mutex_unlock(ctxt->mutex);
447447

mysql-test/main/cte_nonrecursive.result

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,9 @@ disconnect con1;
16931693
#
16941694
# MDEV-22781: create view with CTE without default database
16951695
#
1696-
drop database test;
1696+
create database db;
1697+
use db;
1698+
drop database db;
16971699
create database db1;
16981700
create table db1.t1 (a int);
16991701
insert into db1.t1 values (3),(7),(1);
@@ -1723,7 +1725,6 @@ a
17231725
drop view db1.v1;
17241726
drop table db1.t1;
17251727
drop database db1;
1726-
create database test;
17271728
use test;
17281729
#
17291730
# MDEV-24597: CTE with union used multiple times in query
@@ -2136,6 +2137,54 @@ drop procedure sp1;
21362137
drop function g;
21372138
drop function f;
21382139
drop table t1;
2140+
#
2141+
# MDEV-27086: union using CTEs in CREATE TABLE
2142+
#
2143+
create or replace temporary table tmp as
2144+
with cte1 as (select 1 as a), cte2 as (select 2 as a)
2145+
select * from cte1 union select * from cte2;
2146+
select * from tmp;
2147+
a
2148+
1
2149+
2
2150+
create table t1 as
2151+
with cte1 as (select 1 as a), cte2 as (select 2 as a)
2152+
select * from cte1 union select * from cte2;
2153+
select * from t1;
2154+
a
2155+
1
2156+
2
2157+
insert into t1 values (3);
2158+
create table t2 as
2159+
with cte1 as (select * from t1 where a <2), cte2 as (select * from t1 where a > 2)
2160+
select * from cte1 union select * from cte2;
2161+
select * from t2;
2162+
a
2163+
1
2164+
3
2165+
drop table t1,t2;
2166+
#
2167+
# MDEV-26470: CTE in WITH clause of subquery used in DELETE
2168+
#
2169+
create table t1 (a int);
2170+
insert into t1 values (3), (7), (1), (5);
2171+
create table t2 (b int);
2172+
insert into t2 values (4), (1), (3), (2);
2173+
delete from t1
2174+
where a in (with cte(a) as (select * from t2 where b <=2) select a from cte);
2175+
select * from t1;
2176+
a
2177+
3
2178+
7
2179+
5
2180+
insert into t1 values (1), (3);
2181+
delete t1 from t1, t2
2182+
where t1.a=t2.b or
2183+
t1.a in (with cte(a) as (select b+1 from t2) select * from cte);
2184+
select * from t1;
2185+
a
2186+
7
2187+
drop table t1,t2;
21392188
# End of 10.2 tests
21402189
#
21412190
# MDEV-21673: several references to CTE that uses

mysql-test/main/cte_nonrecursive.test

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,9 @@ DROP TABLE test.t;
12171217
--echo # MDEV-22781: create view with CTE without default database
12181218
--echo #
12191219

1220-
drop database test;
1220+
create database db;
1221+
use db;
1222+
drop database db;
12211223
create database db1;
12221224
create table db1.t1 (a int);
12231225
insert into db1.t1 values (3),(7),(1);
@@ -1239,7 +1241,6 @@ drop view db1.v1;
12391241
drop table db1.t1;
12401242
drop database db1;
12411243

1242-
create database test;
12431244
use test;
12441245

12451246
--echo #
@@ -1590,6 +1591,52 @@ drop function g;
15901591
drop function f;
15911592
drop table t1;
15921593

1594+
--echo #
1595+
--echo # MDEV-27086: union using CTEs in CREATE TABLE
1596+
--echo #
1597+
1598+
create or replace temporary table tmp as
1599+
with cte1 as (select 1 as a), cte2 as (select 2 as a)
1600+
select * from cte1 union select * from cte2;
1601+
select * from tmp;
1602+
1603+
create table t1 as
1604+
with cte1 as (select 1 as a), cte2 as (select 2 as a)
1605+
select * from cte1 union select * from cte2;
1606+
select * from t1;
1607+
1608+
insert into t1 values (3);
1609+
1610+
create table t2 as
1611+
with cte1 as (select * from t1 where a <2), cte2 as (select * from t1 where a > 2)
1612+
select * from cte1 union select * from cte2;
1613+
select * from t2;
1614+
1615+
drop table t1,t2;
1616+
1617+
--echo #
1618+
--echo # MDEV-26470: CTE in WITH clause of subquery used in DELETE
1619+
--echo #
1620+
1621+
create table t1 (a int);
1622+
insert into t1 values (3), (7), (1), (5);
1623+
1624+
create table t2 (b int);
1625+
insert into t2 values (4), (1), (3), (2);
1626+
1627+
delete from t1
1628+
where a in (with cte(a) as (select * from t2 where b <=2) select a from cte);
1629+
select * from t1;
1630+
1631+
insert into t1 values (1), (3);
1632+
1633+
delete t1 from t1, t2
1634+
where t1.a=t2.b or
1635+
t1.a in (with cte(a) as (select b+1 from t2) select * from cte);
1636+
select * from t1;
1637+
1638+
drop table t1,t2;
1639+
15931640
--echo # End of 10.2 tests
15941641

15951642
--echo #

mysql-test/main/join.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,6 +3315,9 @@ SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2
33153315
WHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a );
33163316
a b c b c
33173317
DROP TABLE t1,t2;
3318+
select a.a from (select 1 as a) a, (select 2 as b) b cross join (select 3 as c) c left join (select 4 as d) d on 1;
3319+
a
3320+
1
33183321
#
33193322
# MDEV-19600: The optimizer should be able to produce rows=1 estimate for unique index with NULLable columns
33203323
#
@@ -3403,3 +3406,4 @@ id select_type table type possible_keys key key_len ref rows Extra
34033406
1 SIMPLE t3 ref a a 5 test.t2.key2 1
34043407
drop table t1,t2,t3;
34053408
drop table t1000,t10,t03;
3409+
# End of 10.3 tests

mysql-test/main/join.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,11 @@ SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2
17201720

17211721
DROP TABLE t1,t2;
17221722

1723+
#
1724+
# MDEV-20330 Combination of "," (comma), cross join and left join fails to parse
1725+
#
1726+
select a.a from (select 1 as a) a, (select 2 as b) b cross join (select 3 as c) c left join (select 4 as d) d on 1;
1727+
17231728
--echo #
17241729
--echo # MDEV-19600: The optimizer should be able to produce rows=1 estimate for unique index with NULLable columns
17251730
--echo #
@@ -1814,3 +1819,4 @@ WHERE
18141819
drop table t1,t2,t3;
18151820
drop table t1000,t10,t03;
18161821

1822+
--echo # End of 10.3 tests

mysql-test/main/parser.result

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,6 +1336,37 @@ view_definition
13361336
select 1 not between 2 like 3 and 4 AS `1 not between (2 like 3) and 4`
13371337
drop view v1;
13381338
#
1339+
# Start of 10.2 tests
1340+
#
1341+
#
1342+
# MDEV-27066 Fixed scientific notation parser
1343+
#
1344+
SELECT 1 1.e*1;
1345+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e*1' at line 1
1346+
SELECT 1 1.e/1;
1347+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e/1' at line 1
1348+
SELECT 1 1.e^1;
1349+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e^1' at line 1
1350+
SELECT 1 1.e%1;
1351+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e%1' at line 1
1352+
SELECT 1 1.e&1;
1353+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e&1' at line 1
1354+
SELECT 1 1.e|1;
1355+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e|1' at line 1
1356+
SELECT 1.e(1);
1357+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e(1)' at line 1
1358+
SELECT (1 1.e);
1359+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e)' at line 1
1360+
SELECT 1 1.e, 1;
1361+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e, 1' at line 1
1362+
CREATE TABLE scientific_notation (test int);
1363+
SELECT tmp 1.e.test FROM scientific_notation AS tmp;
1364+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.e.test FROM scientific_notation AS tmp' at line 1
1365+
DROP TABLE scientific_notation;
1366+
#
1367+
# End of 10.2 tests
1368+
#
1369+
#
13391370
# MDEV-10343 Providing compatibility for basic SQL data types
13401371
#
13411372
CREATE TABLE clob (clob int);

mysql-test/main/parser.test

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,52 @@ Select view_definition from information_schema.views where table_schema='test' a
13601360

13611361
drop view v1;
13621362

1363+
--echo #
1364+
--echo # Start of 10.2 tests
1365+
--echo #
1366+
--echo #
1367+
1368+
--echo # MDEV-27066 Fixed scientific notation parser
1369+
--echo #
1370+
1371+
--error ER_PARSE_ERROR
1372+
SELECT 1 1.e*1;
1373+
1374+
--error ER_PARSE_ERROR
1375+
SELECT 1 1.e/1;
1376+
1377+
--error ER_PARSE_ERROR
1378+
SELECT 1 1.e^1;
1379+
1380+
--error ER_PARSE_ERROR
1381+
SELECT 1 1.e%1;
1382+
1383+
--error ER_PARSE_ERROR
1384+
SELECT 1 1.e&1;
1385+
1386+
--error ER_PARSE_ERROR
1387+
SELECT 1 1.e|1;
1388+
1389+
--error ER_PARSE_ERROR
1390+
SELECT 1.e(1);
1391+
1392+
--error ER_PARSE_ERROR
1393+
SELECT (1 1.e);
1394+
1395+
--error ER_PARSE_ERROR
1396+
SELECT 1 1.e, 1;
1397+
1398+
CREATE TABLE scientific_notation (test int);
1399+
1400+
--error ER_PARSE_ERROR
1401+
SELECT tmp 1.e.test FROM scientific_notation AS tmp;
1402+
1403+
DROP TABLE scientific_notation;
1404+
1405+
--echo #
1406+
--echo # End of 10.2 tests
1407+
--echo #
1408+
13631409
--echo #
13641410
--echo # MDEV-10343 Providing compatibility for basic SQL data types
13651411
--echo #

0 commit comments

Comments
 (0)