Skip to content

Commit e0a1c74

Browse files
committed
Merge branch '10.1' into 10.2
2 parents 4ec88ea + 2aa51f5 commit e0a1c74

File tree

186 files changed

+3307
-1578
lines changed

Some content is hidden

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

186 files changed

+3307
-1578
lines changed

client/mysql.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,8 +1065,7 @@ static void fix_history(String *final_command);
10651065

10661066
static COMMANDS *find_command(char *name);
10671067
static COMMANDS *find_command(char cmd_name);
1068-
static bool add_line(String &buffer, char *line, ulong line_length,
1069-
char *in_string, bool *ml_comment, bool truncated);
1068+
static bool add_line(String &, char *, ulong, char *, bool *, bool);
10701069
static void remove_cntrl(String &buffer);
10711070
static void print_table_data(MYSQL_RES *result);
10721071
static void print_table_data_html(MYSQL_RES *result);
@@ -1078,7 +1077,7 @@ static ulong start_timer(void);
10781077
static void end_timer(ulong start_time,char *buff);
10791078
static void mysql_end_timer(ulong start_time,char *buff);
10801079
static void nice_time(double sec,char *buff,bool part_second);
1081-
extern "C" sig_handler mysql_end(int sig);
1080+
extern "C" sig_handler mysql_end(int sig) __attribute__ ((noreturn));
10821081
extern "C" sig_handler handle_sigint(int sig);
10831082
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
10841083
static sig_handler window_resize(int sig);

cmake/cpack_rpm.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,14 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES
165165
"MariaDB-client")
166166

167167
IF(WITH_WSREP)
168-
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
169-
"galera" "rsync" "lsof" "grep" "gawk" "iproute"
170-
"coreutils" "findutils" "tar" "which")
168+
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
169+
"galera" "rsync" "lsof" "grep" "gawk" "iproute"
170+
"coreutils" "findutils" "tar")
171+
IF (RPM MATCHES "sles11")
172+
SETA(CPACK_RPM_server_PACKAGE_REQUIRES "util-linux")
173+
ELSE()
174+
SETA(CPACK_RPM_server_PACKAGE_REQUIRES "which")
175+
ENDIF()
171176
ENDIF()
172177

173178
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)

cmake/maintainer.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ IF(have_C__Wvla)
2020
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla")
2121
ENDIF()
2222

23+
MY_CHECK_C_COMPILER_FLAG("-Wno-format-truncation")
24+
IF(HAVE_C__Wno_format_truncation)
25+
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wno-format-truncation")
26+
ENDIF()
27+
2328
# Common warning flags for GCC and Clang
2429
SET(MY_C_WARNING_FLAGS
2530
"${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement")

cmake/pcre.cmake

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
INCLUDE (CheckCSourceRuns)
2+
13
SET(WITH_PCRE "auto" CACHE STRING
24
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
35

46
MACRO (CHECK_PCRE)
57
IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
6-
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE)
8+
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD)
9+
IF(NOT CMAKE_CROSSCOMPILING)
10+
SET(CMAKE_REQUIRED_LIBRARIES "pcre")
11+
CHECK_C_SOURCE_RUNS("
12+
#include <pcre.h>
13+
int main() {
14+
return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
15+
}" PCRE_STACK_SIZE_OK)
16+
SET(CMAKE_REQUIRED_LIBRARIES)
17+
ENDIF()
718
ENDIF()
8-
IF(NOT HAVE_PCRE OR WITH_PCRE STREQUAL "bundled")
19+
IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR
20+
WITH_PCRE STREQUAL "bundled")
921
IF (WITH_PCRE STREQUAL "system")
1022
MESSAGE(FATAL_ERROR "system pcre is not found or unusable")
1123
ENDIF()

extra/mariabackup/xtrabackup.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4512,7 +4512,7 @@ xb_process_datadir(
45124512
handle_datadir_entry_func_t func) /*!<in: callback */
45134513
{
45144514
ulint ret;
4515-
char dbpath[FN_REFLEN];
4515+
char dbpath[OS_FILE_MAX_PATH];
45164516
os_file_dir_t dir;
45174517
os_file_dir_t dbdir;
45184518
os_file_stat_t dbinfo;
@@ -4578,8 +4578,8 @@ xb_process_datadir(
45784578
goto next_datadir_item;
45794579
}
45804580

4581-
sprintf(dbpath, "%s/%s", path,
4582-
dbinfo.name);
4581+
snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name);
4582+
45834583
os_normalize_path(dbpath);
45844584

45854585
dbdir = os_file_opendir(dbpath, FALSE);
@@ -5531,4 +5531,3 @@ static int get_exepath(char *buf, size_t size, const char *argv0)
55315531

55325532
return my_realpath(buf, argv0, 0);
55335533
}
5534-

extra/my_print_defaults.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,23 @@ static struct my_option my_long_options[] =
9898
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
9999
};
100100

101-
void cleanup_and_exit(int exit_code)
101+
static void cleanup_and_exit(int exit_code) __attribute__ ((noreturn));
102+
static void cleanup_and_exit(int exit_code)
102103
{
103104
my_end(0);
104105
exit(exit_code);
105106
}
106107

107-
static void usage(my_bool version)
108+
static void version()
108109
{
109-
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
110-
MACHINE_TYPE);
111-
if (version)
112-
return;
110+
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
111+
}
112+
113+
114+
static void usage() __attribute__ ((noreturn));
115+
static void usage()
116+
{
117+
version();
113118
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
114119
puts("Prints all arguments that is give to some program using the default files");
115120
printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
@@ -133,12 +138,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
133138
cleanup_and_exit(0);
134139
case 'I':
135140
case '?':
136-
usage(0);
141+
usage();
137142
case 'v':
138143
verbose++;
139144
break;
140145
case 'V':
141-
usage(1);
146+
version();
147+
/* fall through */
142148
case '#':
143149
DBUG_PUSH(argument ? argument : default_dbug_option);
144150
break;
@@ -186,7 +192,7 @@ int main(int argc, char **argv)
186192
nargs+= array_elements(mysqld_groups);
187193

188194
if (nargs < 2)
189-
usage(0);
195+
usage();
190196

191197
load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME));
192198
if (!load_default_groups)

extra/replace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ register char **argv[];
174174
break;
175175
case 'V':
176176
version=1;
177-
/* fall through */
177+
/* fall through */
178178
case 'I':
179179
case '?':
180180
help=1; /* Help text written */

extra/yassl/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ before calling SSL_new();
1212

1313
*** end Note ***
1414

15+
yaSSL Release notes, version 2.4.4 (8/8/2017)
16+
This release of yaSSL fixes an interop issue. A fix for detecting cipher
17+
suites with non leading zeros is included as yaSSL only supports cipher
18+
suites with leading zeros. Thanks for the report from Security Innovation
19+
and Oracle.
20+
21+
Users interoping with other SSL stacks should update.
22+
1523
yaSSL Release notes, version 2.4.2 (9/22/2016)
1624
This release of yaSSL fixes a medium security vulnerability. A fix for
1725
potential AES side channel leaks is included that a local user monitoring

extra/yassl/include/openssl/ssl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
2-
Copyright (c) 2005, 2014, Oracle and/or its affiliates.
2+
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
3+
Use is subject to license terms.
34
45
This program is free software; you can redistribute it and/or modify
56
it under the terms of the GNU General Public License as published by
@@ -34,7 +35,7 @@
3435
#include "rsa.h"
3536

3637

37-
#define YASSL_VERSION "2.4.2"
38+
#define YASSL_VERSION "2.4.4"
3839

3940

4041
#if defined(__cplusplus)

extra/yassl/src/yassl_imp.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2005, 2014, Oracle and/or its affiliates
2+
Copyright (c) 2005, 2017, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -1578,6 +1578,10 @@ void ServerHello::Process(input_buffer& input, SSL& ssl)
15781578
ssl.SetError(badVersion_error);
15791579
return;
15801580
}
1581+
if (cipher_suite_[0] != 0x00) {
1582+
ssl.SetError(unknown_cipher);
1583+
return;
1584+
}
15811585
ssl.set_pending(cipher_suite_[1]);
15821586
ssl.set_random(random_, server_end);
15831587
if (id_len_)

0 commit comments

Comments
 (0)