Skip to content

Commit ceda5f7

Browse files
committed
Merge branch '10.2' into 10.3
2 parents ade89fc + f2ccfca commit ceda5f7

File tree

63 files changed

+373
-173
lines changed

Some content is hidden

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

63 files changed

+373
-173
lines changed

cmake/cpack_rpm.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ SET(ignored
100100
"%ignore /etc"
101101
"%ignore /etc/init.d"
102102
"%ignore /etc/logrotate.d"
103+
"%ignore /etc/security"
103104
"%ignore /etc/systemd"
104105
"%ignore /etc/systemd/system"
106+
"%ignore /lib"
107+
"%ignore /lib/security"
105108
"%ignore ${CMAKE_INSTALL_PREFIX}"
106109
"%ignore ${CMAKE_INSTALL_PREFIX}/bin"
107110
"%ignore ${CMAKE_INSTALL_PREFIX}/include"

cmake/install_layout.cmake

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d")
139139
#
140140
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
141141
SET(INSTALL_LIBDIR_RPM "lib64")
142-
SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
143142
ELSE()
144143
SET(INSTALL_LIBDIR_RPM "lib")
145-
SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
146144
ENDIF()
145+
SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin")
147146
#
148147
SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
149148
#
@@ -164,6 +163,7 @@ SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock"
164163
SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system")
165164
SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d")
166165
SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d")
166+
SET(INSTALL_PAMDIR_RPM "/lib/security")
167167

168168
#
169169
# DEB layout
@@ -196,6 +196,11 @@ SET(INSTALL_UNIX_ADDRDIR_DEB "/var/run/mysqld/mysqld.sock")
196196
SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system")
197197
SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d")
198198
SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d")
199+
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
200+
SET(INSTALL_PAMDIR_DEB "/lib/x86_64-linux-gnu/security")
201+
ELSE()
202+
SET(INSTALL_PAMDIR_DEB "/lib/i386-linux-gnu/security")
203+
ENDIF()
199204

200205
#
201206
# SVR4 layout
@@ -235,17 +240,18 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
235240
# Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR
236241
# will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
237242
# layout is chosen)
238-
FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN SYSCONF SYSCONF2
239-
INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA UNIX_ADDR
240-
SYSTEMD_UNIT SYSTEMD_SYSUSERS SYSTEMD_TMPFILES)
241-
SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
242-
CACHE STRING "${var} installation directory" ${FORCE})
243-
MARK_AS_ADVANCED(INSTALL_${var}DIR)
244-
245-
IF(IS_ABSOLUTE ${INSTALL_${var}DIR})
246-
SET(INSTALL_${var}DIRABS ${INSTALL_${var}DIR})
247-
ELSE()
248-
SET(INSTALL_${var}DIRABS "${CMAKE_INSTALL_PREFIX}/${INSTALL_${var}DIR}")
243+
GET_CMAKE_PROPERTY(ALL_VARS VARIABLES)
244+
FOREACH (V ${ALL_VARS})
245+
IF (V MATCHES "^(INSTALL_([A-Z_0-9]+)DIR)_${INSTALL_LAYOUT}$")
246+
SET(var ${CMAKE_MATCH_1})
247+
SET(${var} "${${V}}" CACHE STRING "${CMAKE_MATCH_2} installation directory" ${FORCE})
248+
MARK_AS_ADVANCED(${var})
249+
250+
IF(IS_ABSOLUTE "${${var}}")
251+
SET(${var}ABS "${${var}}")
252+
ELSE()
253+
SET(${var}ABS "${CMAKE_INSTALL_PREFIX}/${${var}}")
254+
ENDIF()
249255
ENDIF()
250256
ENDFOREACH()
251257

debian/mariadb-server-10.3.install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ debian/additions/debian-start.inc.sh usr/share/mysql
33
debian/additions/echo_stderr usr/share/mysql
44
debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
55
etc/apparmor.d/usr.sbin.mysqld
6+
etc/security/user_map.conf
67
lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
8+
lib/*/security/pam_user_map.so
79
usr/bin/aria_chk
810
usr/bin/aria_dump_log
911
usr/bin/aria_ftdump

extra/mariabackup/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ENDIF()
9797

9898

9999
########################################################################
100-
# xbstream binary
100+
# mbstream binary
101101
########################################################################
102102
MYSQL_ADD_EXECUTABLE(mbstream
103103
ds_buffer.cc

extra/mariabackup/innobackupex.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,8 @@ static struct my_option ibx_long_options[] =
586586
{"stream", OPT_STREAM, "This option specifies the format in which to "
587587
"do the streamed backup. The option accepts a string argument. The "
588588
"backup will be done to STDOUT in the specified format. Currently, "
589-
"the only supported formats are tar and xbstream. This option is "
590-
"passed directly to xtrabackup's --stream option.",
589+
"the only supported formats are tar and mbstream/xbstream. This "
590+
"option is passed directly to xtrabackup's --stream option.",
591591
(uchar*) &ibx_xtrabackup_stream_str,
592592
(uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR,
593593
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -655,7 +655,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu
655655
[--include=REGEXP] [--user=NAME]\n\
656656
[--password=WORD] [--port=PORT] [--socket=SOCKET]\n\
657657
[--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\
658-
[--slave-info] [--galera-info] [--stream=tar|xbstream]\n\
658+
[--slave-info] [--galera-info] [--stream=tar|mbstream|xbstream]\n\
659659
[--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\
660660
[--databases=LIST] [--no-lock] \n\
661661
[--tmpdir=DIRECTORY] [--tables-file=FILE]\n\
@@ -751,7 +751,8 @@ ibx_get_one_option(int optid,
751751
}
752752
break;
753753
case OPT_STREAM:
754-
if (!strcasecmp(argument, "xbstream"))
754+
if (!strcasecmp(argument, "mbstream") ||
755+
!strcasecmp(argument, "xbstream"))
755756
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
756757
else {
757758
ibx_msg("Invalid --stream argument: %s\n", argument);

extra/mariabackup/xtrabackup.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ struct my_option xb_client_options[] =
905905

906906
{"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output "
907907
"in the specified format."
908-
"Supported format is 'xbstream'."
908+
"Supported format is 'mbstream' or 'xbstream'."
909909
,
910910
(G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR,
911911
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1712,7 +1712,8 @@ xb_get_one_option(int optid,
17121712
xtrabackup_target_dir= xtrabackup_real_target_dir;
17131713
break;
17141714
case OPT_XTRA_STREAM:
1715-
if (!strcasecmp(argument, "xbstream"))
1715+
if (!strcasecmp(argument, "mbstream") ||
1716+
!strcasecmp(argument, "xbstream"))
17161717
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
17171718
else
17181719
{

libmariadb

mysql-test/main/default_session.result

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,31 @@ a
9292
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
9393
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
9494
drop table t1;
95+
set time_zone='+00:00';
96+
create table t1 (a int, b datetime default from_unixtime(a), c datetime);
97+
insert t1 (a, c) values (1569495327, from_unixtime(1569495327));
98+
set time_zone='+01:00';
99+
insert t1 (a, c) values (1569495327, from_unixtime(1569495327));
100+
flush tables;
101+
insert t1 (a, c) values (1569495327, from_unixtime(1569495327));
102+
select * from t1;
103+
a b c
104+
1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27
105+
1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27
106+
1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27
107+
drop table t1;
108+
set time_zone = "+00:00";
109+
create table t1 (a int, b timestamp as (from_unixtime(a)) virtual);
110+
insert into t1 (a) value (1569495327);
111+
select a, b, from_unixtime(a) from t1;
112+
a b from_unixtime(a)
113+
1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27
114+
set time_zone = "+01:00";
115+
select a, b, from_unixtime(a) from t1;
116+
a b from_unixtime(a)
117+
1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27
118+
flush tables;
119+
select a, b, from_unixtime(a) from t1;
120+
a b from_unixtime(a)
121+
1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27
122+
drop table t1;

mysql-test/main/default_session.test

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,27 @@ insert t1 () values ();
8080
set sql_mode=default;
8181
select * from t1;
8282
drop table t1;
83+
84+
#
85+
# MDEV-21249 MariaDB 10.3.10 When referring to bigint to generate timestamp data in the virtual generated column, the value of the generated column does not change when the time zone changes
86+
#
87+
set time_zone='+00:00';
88+
create table t1 (a int, b datetime default from_unixtime(a), c datetime);
89+
insert t1 (a, c) values (1569495327, from_unixtime(1569495327));
90+
set time_zone='+01:00';
91+
insert t1 (a, c) values (1569495327, from_unixtime(1569495327));
92+
flush tables;
93+
insert t1 (a, c) values (1569495327, from_unixtime(1569495327));
94+
select * from t1;
95+
drop table t1;
96+
97+
# same with vcols
98+
set time_zone = "+00:00";
99+
create table t1 (a int, b timestamp as (from_unixtime(a)) virtual);
100+
insert into t1 (a) value (1569495327);
101+
select a, b, from_unixtime(a) from t1;
102+
set time_zone = "+01:00";
103+
select a, b, from_unixtime(a) from t1;
104+
flush tables;
105+
select a, b, from_unixtime(a) from t1;
106+
drop table t1;

mysql-test/main/func_regexp_pcre.result

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -888,33 +888,33 @@ Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
888888
SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
889889
CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
890890
1
891-
SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
892-
CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
891+
SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$';
892+
CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'
893893
0
894894
Warnings:
895895
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
896896
SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
897897
REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
898898
1
899-
SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
900-
REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
899+
SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$');
900+
REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')
901901
0
902902
Warnings:
903903
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
904904
SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
905905
LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
906906
243
907-
SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
908-
LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
907+
SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'));
908+
LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'))
909909
0
910910
Warnings:
911911
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
912912
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
913913
LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
914914
0
915-
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
916-
LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
917-
803
915+
SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''));
916+
LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', ''))
917+
1603
918918
Warnings:
919919
Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp
920920
SELECT REGEXP_INSTR('a_kollision', 'oll');

0 commit comments

Comments
 (0)