Commit 255c2398 authored by Ondrej Sury's avatar Ondrej Sury
Browse files

New upstream version 10.1.29

parent b662fa15
commit: f0e9bebd278b27e05d9c66746420b48535f2b86e
date: 2017-09-27 10:22:15 +0200
build-date: 2017-09-27 12:07:50 +0000
short: f0e9beb
commit: 05103c84ecc519eae4090b720f48203a648e2ab9
date: 2017-11-13 18:41:55 +0000
build-date: 2017-11-13 18:46:50 +0000
short: 05103c8
branch: HEAD
MariaDB source 10.1.28
MariaDB source 10.1.29
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=1
MYSQL_VERSION_PATCH=28
MYSQL_VERSION_PATCH=29
......@@ -1065,8 +1065,7 @@ static void fix_history(String *final_command);
static COMMANDS *find_command(char *name);
static COMMANDS *find_command(char cmd_name);
static bool add_line(String &buffer, char *line, ulong line_length,
char *in_string, bool *ml_comment, bool truncated);
static bool add_line(String &, char *, ulong, char *, bool *, bool);
static void remove_cntrl(String &buffer);
static void print_table_data(MYSQL_RES *result);
static void print_table_data_html(MYSQL_RES *result);
......@@ -1078,7 +1077,7 @@ static ulong start_timer(void);
static void end_timer(ulong start_time,char *buff);
static void mysql_end_timer(ulong start_time,char *buff);
static void nice_time(double sec,char *buff,bool part_second);
extern "C" sig_handler mysql_end(int sig);
extern "C" sig_handler mysql_end(int sig) __attribute__ ((noreturn));
extern "C" sig_handler handle_sigint(int sig);
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
static sig_handler window_resize(int sig);
......@@ -1095,7 +1094,7 @@ inline bool is_delimiter_command(char *name, ulong len)
only name(first DELIMITER_NAME_LEN bytes) is checked.
*/
return (len >= DELIMITER_NAME_LEN &&
!my_strnncoll(charset_info, (uchar*) name, DELIMITER_NAME_LEN,
!my_strnncoll(&my_charset_latin1, (uchar*) name, DELIMITER_NAME_LEN,
(uchar *) DELIMITER_NAME, DELIMITER_NAME_LEN));
}
......
......@@ -2670,10 +2670,11 @@ int main(int argc, char** argv)
if (!argc || opt_version)
{
if (!argc)
usage();
if (!opt_version)
{
usage();
retval= ERROR_STOP;
}
goto err;
}
......
......@@ -168,9 +168,14 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES
"MariaDB-client")
IF(WITH_WSREP)
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
"galera" "rsync" "lsof" "grep" "gawk" "iproute"
"coreutils" "findutils" "tar" "which")
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
"galera" "rsync" "lsof" "grep" "gawk" "iproute"
"coreutils" "findutils" "tar")
IF (RPM MATCHES "sles11")
SETA(CPACK_RPM_server_PACKAGE_REQUIRES "util-linux")
ELSE()
SETA(CPACK_RPM_server_PACKAGE_REQUIRES "which")
ENDIF()
ENDIF()
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
......
......@@ -20,6 +20,11 @@ IF(HAVE_C__Wvla)
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla")
ENDIF()
MY_CHECK_C_COMPILER_FLAG("-Wno-format-truncation")
IF(HAVE_C__Wno_format_truncation)
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wno-format-truncation")
ENDIF()
# Common warning flags for GCC and Clang
SET(MY_C_WARNING_FLAGS
"${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement")
......
INCLUDE (CheckCSourceRuns)
SET(WITH_PCRE "auto" CACHE STRING
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
MACRO (CHECK_PCRE)
IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE)
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD)
IF(NOT CMAKE_CROSSCOMPILING)
SET(CMAKE_REQUIRED_LIBRARIES "pcre")
CHECK_C_SOURCE_RUNS("
#include <pcre.h>
int main() {
return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
}" PCRE_STACK_SIZE_OK)
SET(CMAKE_REQUIRED_LIBRARIES)
ENDIF()
ENDIF()
IF(NOT HAVE_PCRE OR WITH_PCRE STREQUAL "bundled")
IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR
WITH_PCRE STREQUAL "bundled")
IF (WITH_PCRE STREQUAL "system")
MESSAGE(FATAL_ERROR "system pcre is not found or unusable")
ENDIF()
......
......@@ -26,7 +26,7 @@ ENDIF()
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
# Set the patch version
SET(WSREP_PATCH_VERSION "20")
SET(WSREP_PATCH_VERSION "21")
# Obtain wsrep API version
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
......
......@@ -1700,26 +1700,28 @@ copy_back()
ut_crc32_init();
/* copy undo tablespaces */
if (srv_undo_tablespaces > 0) {
dst_dir = (srv_undo_dir && *srv_undo_dir)
? srv_undo_dir : mysql_data_home;
ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
dst_dir = (srv_undo_dir && *srv_undo_dir)
? srv_undo_dir : mysql_data_home;
for (i = 1; i <= srv_undo_tablespaces; i++) {
char filename[20];
sprintf(filename, "undo%03u", (uint)i);
if (!(ret = copy_or_move_file(filename, filename,
dst_dir, 1))) {
goto cleanup;
}
}
ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
ds_destroy(ds_data);
ds_data = NULL;
for (i = 1; ; i++) {
char filename[20];
sprintf(filename, "undo%03u", (uint)i);
if (!file_exists(filename)) {
break;
}
if (!(ret = copy_or_move_file(filename, filename,
dst_dir, 1))) {
goto cleanup;
}
}
ds_destroy(ds_data);
ds_data = NULL;
/* copy redo logs */
dst_dir = (srv_log_group_home_dir && *srv_log_group_home_dir)
......@@ -1844,7 +1846,7 @@ copy_back()
}
}
/* copy buufer pool dump */
/* copy buffer pool dump */
if (innobase_buffer_pool_filename) {
const char *src_name;
......
......@@ -538,7 +538,7 @@ xb_msg_missing_lsn_data(
lsn_t missing_interval_start, /*!<in: interval start */
lsn_t missing_interval_end) /*!<in: interval end */
{
msg("xtrabackup: warning: changed page data missing for LSNs between "
msg("mariabackup: warning: changed page data missing for LSNs between "
LSN_PF " and " LSN_PF "\n", missing_interval_start,
missing_interval_end);
}
......@@ -615,7 +615,7 @@ xb_page_bitmap_init(void)
if (UNIV_UNLIKELY(bmp_start_lsn > bmp_end_lsn)) {
msg("xtrabackup: incremental backup LSN " LSN_PF
msg("mariabackup: incremental backup LSN " LSN_PF
" is larger than than the last checkpoint LSN " LSN_PF
"\n", bmp_start_lsn, bmp_end_lsn);
return NULL;
......@@ -700,7 +700,7 @@ xb_page_bitmap_init(void)
&current_page_end_lsn,
bmp_start_lsn))) {
msg("xtrabackup: Warning: changed page bitmap file "
msg("mariabackup: Warning: changed page bitmap file "
"\'%s\' corrupted\n", bitmap_file.name);
rbt_free(result);
free(bitmap_files.files);
......@@ -805,7 +805,7 @@ xb_page_bitmap_init(void)
if (UNIV_UNLIKELY(!last_page_ok)) {
msg("xtrabackup: warning: changed page bitmap file "
msg("mariabackup: warning: changed page bitmap file "
"\'%s\' corrupted.\n", bitmap_file.name);
rbt_free(result);
free(bitmap_files.files);
......
/******************************************************
XtraBackup: hot backup tool for InnoDB
MariaBackup: hot backup tool for InnoDB
(c) 2009-2013 Percona LLC and/or its affiliates.
Originally Created 3/3/2009 Yasufumi Kinoshita
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
......@@ -173,7 +173,7 @@ xb_fil_cur_open(
/* The following call prints an error message */
os_file_get_last_error(TRUE);
msg("[%02u] xtrabackup: error: cannot open "
msg("[%02u] mariabackup: error: cannot open "
"tablespace %s\n",
thread_n, cursor->abs_path);
......@@ -202,7 +202,7 @@ xb_fil_cur_open(
cursor->file = node->handle;
if (stat(cursor->abs_path, &cursor->statinfo)) {
msg("[%02u] xtrabackup: error: cannot stat %s\n",
msg("[%02u] mariabackup: error: cannot stat %s\n",
thread_n, cursor->abs_path);
xb_fil_cur_close(cursor);
......@@ -229,7 +229,7 @@ xb_fil_cur_open(
msg("[%02u] %s is compressed with page size = "
"%lu bytes\n", thread_n, node->name, page_size);
if (page_size_shift < 10 || page_size_shift > 14) {
msg("[%02u] xtrabackup: Error: Invalid "
msg("[%02u] mariabackup: Error: Invalid "
"page size: %lu.\n", thread_n, page_size);
ut_error;
}
......@@ -300,9 +300,9 @@ xb_fil_cur_read(
offset + to_read == cursor->statinfo.st_size) {
if (to_read < (ib_int64_t) cursor->page_size) {
msg("[%02u] xtrabackup: Warning: junk at the end of "
msg("[%02u] mariabackup: Warning: junk at the end of "
"%s:\n", cursor->thread_n, cursor->abs_path);
msg("[%02u] xtrabackup: Warning: offset = %llu, "
msg("[%02u] mariabackup: Warning: offset = %llu, "
"to_read = %llu\n",
cursor->thread_n,
(unsigned long long) offset,
......@@ -356,13 +356,13 @@ xb_fil_cur_read(
page_no < (ib_int64_t) FSP_EXTENT_SIZE * 3) {
/* skip doublewrite buffer pages */
xb_a(cursor->page_size == UNIV_PAGE_SIZE);
msg("[%02u] xtrabackup: "
msg("[%02u] mariabackup: "
"Page %lu is a doublewrite buffer page, "
"skipping.\n", cursor->thread_n, page_no);
} else {
retry_count--;
if (retry_count == 0) {
msg("[%02u] xtrabackup: "
msg("[%02u] mariabackup: "
"Error: failed to read page after "
"10 retries. File %s seems to be "
"corrupted.\n", cursor->thread_n,
......@@ -370,7 +370,7 @@ xb_fil_cur_read(
ret = XB_FIL_CUR_ERROR;
break;
}
msg("[%02u] xtrabackup: "
msg("[%02u] mariabackup: "
"Database page corruption detected at page "
"%lu, retrying...\n", cursor->thread_n,
page_no);
......
/******************************************************
XtraBackup: hot backup tool for InnoDB
MariaBackup: hot backup tool for InnoDB
(c) 2009-2013 Percona LLC and/or its affiliates.
Originally Created 3/3/2009 Yasufumi Kinoshita
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
......@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#include "write_filt.h"
#include "fil_cur.h"
#include "xtrabackup.h"
#include <os0proc.h>
/************************************************************************
Write-through page write filter. */
......@@ -68,18 +69,21 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name,
{
char meta_name[FN_REFLEN];
xb_delta_info_t info;
ulint buf_size;
xb_wf_incremental_ctxt_t *cp =
&(ctxt->u.wf_incremental_ctxt);
ctxt->cursor = cursor;
/* allocate buffer for incremental backup (4096 pages) */
buf_size = (cursor->page_size / 4 + 1) * cursor->page_size;
cp->delta_buf_base = static_cast<byte *>(ut_malloc(buf_size));
memset(cp->delta_buf_base, 0, buf_size);
cp->delta_buf = static_cast<byte *>
(ut_align(cp->delta_buf_base, UNIV_PAGE_SIZE_MAX));
cp->delta_buf_size = (cursor->page_size / 4) * cursor->page_size;
cp->delta_buf = (unsigned char *)os_mem_alloc_large(&cp->delta_buf_size);
if (!cp->delta_buf) {
msg("[%02u] mariabackup: Error: "
"cannot allocate %zu bytes\n",
cursor->thread_n, (size_t) cp->delta_buf_size);
return (FALSE);
}
/* write delta meta info */
snprintf(meta_name, sizeof(meta_name), "%s%s", dst_name,
......@@ -88,7 +92,7 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name,
info.zip_size = cursor->zip_size;
info.space_id = cursor->space_id;
if (!xb_write_delta_metadata(meta_name, &info)) {
msg("[%02u] xtrabackup: Error: "
msg("[%02u] mariabackup: Error: "
"failed to write meta info for %s\n",
cursor->thread_n, cursor->rel_path);
return(FALSE);
......@@ -183,10 +187,7 @@ static void
wf_incremental_deinit(xb_write_filt_ctxt_t *ctxt)
{
xb_wf_incremental_ctxt_t *cp = &(ctxt->u.wf_incremental_ctxt);
if (cp->delta_buf_base != NULL) {
ut_free(cp->delta_buf_base);
}
os_mem_free_large(cp->delta_buf, cp->delta_buf_size);
}
/************************************************************************
......
......@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
/* Incremental page filter context */
typedef struct {
byte *delta_buf_base;
ulint delta_buf_size;
byte *delta_buf;
ulint npages;
} xb_wf_incremental_ctxt_t;
......
......@@ -195,7 +195,7 @@ xb_write_galera_info(bool incremental_prepare)
fp = fopen(XB_GALERA_INFO_FILENAME, "w");
if (fp == NULL) {
msg("xtrabackup: error: "
msg("mariabackup: error: "
"could not create " XB_GALERA_INFO_FILENAME
", errno = %d\n",
errno);
......@@ -204,12 +204,12 @@ xb_write_galera_info(bool incremental_prepare)
seqno = wsrep_xid_seqno(&xid);
msg("xtrabackup: Recovered WSREP position: %s:%lld\n",
msg("mariabackup: Recovered WSREP position: %s:%lld\n",
uuid_str, (long long) seqno);
if (fprintf(fp, "%s:%lld", uuid_str, (long long) seqno) < 0) {
msg("xtrabackup: error: "
msg("mariabackup: error: "
"could not write to " XB_GALERA_INFO_FILENAME
", errno = %d\n",
errno);
......
/******************************************************
XtraBackup: hot backup tool for InnoDB
MariaBackup: hot backup tool for InnoDB
(c) 2009-2017 Percona LLC and/or its affiliates
Originally Created 3/3/2009 Yasufumi Kinoshita
Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
......@@ -837,6 +837,11 @@ struct my_option xb_client_options[] =
(uchar*) &opt_incremental_history_uuid, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"remove-original", OPT_REMOVE_ORIGINAL, "Remove .qp files after decompression.",
(uchar *) &opt_remove_original,
(uchar *) &opt_remove_original,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
"This option specifies which types of queries are allowed to complete "
"before innobackupex will issue the global lock. Default is all.",
......@@ -1154,13 +1159,13 @@ debug_sync_point(const char *name)
xtrabackup_target_dir);
fp = fopen(pid_path, "w");
if (fp == NULL) {
msg("xtrabackup: Error: cannot open %s\n", pid_path);
msg("mariabackup: Error: cannot open %s\n", pid_path);
exit(EXIT_FAILURE);
}
fprintf(fp, "%u\n", (uint) pid);
fclose(fp);
msg("xtrabackup: DEBUG: Suspending at debug sync point '%s'. "
msg("mariabackup: DEBUG: Suspending at debug sync point '%s'. "
"Resume with 'kill -SIGCONT %u'.\n", name, (uint) pid);
debug_sync_resumed= 0;
......@@ -1170,7 +1175,7 @@ debug_sync_point(const char *name)
}
/* On resume */
msg("xtrabackup: DEBUG: removing the pid file.\n");
msg("mariabackup: DEBUG: removing the pid file.\n");
my_delete(pid_path, MYF(MY_WME));
#endif
}
......@@ -1465,19 +1470,19 @@ innodb_init_param(void)
/* Check that values don't overflow on 32-bit systems. */
if (sizeof(ulint) == 4) {
if (xtrabackup_use_memory > UINT_MAX32) {
msg("xtrabackup: use-memory can't be over 4GB"
msg("mariabackup: use-memory can't be over 4GB"
" on 32-bit systems\n");
}
if (innobase_buffer_pool_size > UINT_MAX32) {
msg("xtrabackup: innobase_buffer_pool_size can't be "
msg("mariabackup: innobase_buffer_pool_size can't be "
"over 4GB on 32-bit systems\n");
goto error;
}
if (innobase_log_file_size > UINT_MAX32) {
msg("xtrabackup: innobase_log_file_size can't be "
msg("mariabackup: innobase_log_file_size can't be "
"over 4GB on 32-bit systemsi\n");
goto error;
......@@ -1504,9 +1509,9 @@ innodb_init_param(void)
read from MySQL .cnf file */
if (xtrabackup_backup) {
msg("xtrabackup: using the following InnoDB configuration:\n");
msg("mariabackup: using the following InnoDB configuration:\n");
} else {
msg("xtrabackup: using the following InnoDB configuration "
msg("mariabackup: using the following InnoDB configuration "
"for recovery:\n");
}
......@@ -1516,7 +1521,7 @@ innodb_init_param(void)
srv_data_home = (xtrabackup_backup && innobase_data_home_dir
? innobase_data_home_dir : default_path);
msg("xtrabackup: innodb_data_home_dir = %s\n", srv_data_home);
msg("mariabackup: innodb_data_home_dir = %s\n", srv_data_home);
/* Set default InnoDB data file size to 10 MB and let it be
auto-extending. Thus users can use InnoDB in >= 4.0 without having
......@@ -1525,7 +1530,7 @@ innodb_init_param(void)
if (!innobase_data_file_path) {
innobase_data_file_path = (char*) "ibdata1:10M:autoextend";
}
msg("xtrabackup: innodb_data_file_path = %s\n",
msg("mariabackup: innodb_data_file_path = %s\n",
innobase_data_file_path);
/* Since InnoDB edits the argument in the next call, we make another
......@@ -1536,7 +1541,7 @@ innodb_init_param(void)
ret = (my_bool) srv_parse_data_file_paths_and_sizes(
internal_innobase_data_file_path);
if (ret == FALSE) {
msg("xtrabackup: syntax error in innodb_data_file_path\n");
msg("mariabackup: syntax error in innodb_data_file_path\n");
mem_free_and_error:
free(internal_innobase_data_file_path);
internal_innobase_data_file_path = NULL;
......@@ -1569,7 +1574,7 @@ innodb_init_param(void)
if (xtrabackup_prepare && xtrabackup_incremental_dir) {
srv_log_group_home_dir = xtrabackup_incremental_dir;
}
msg("xtrabackup: innodb_log_group_home_dir = %s\n",
msg("mariabackup: innodb_log_group_home_dir = %s\n",
srv_log_group_home_dir);
srv_normalize_path_for_win(srv_log_group_home_dir);
......@@ -1591,9 +1596,9 @@ innodb_init_param(void)
srv_n_log_files = (ulint) innobase_log_files_in_group;
srv_log_file_size = (ulint) innobase_log_file_size;
msg("xtrabackup: innodb_log_files_in_group = %ld\n",
msg("mariabackup: innodb_log_files_in_group = %ld\n",
srv_n_log_files);
msg("xtrabackup: innodb_log_file_size = %lld\n",
msg("mariabackup: innodb_log_file_size = %lld\n",
(long long int) srv_log_file_size);
srv_log_buffer_size = (ulint) innobase_log_buffer_size;
......@@ -1724,7 +1729,7 @@ innodb_init_param(void)
return(FALSE);
error:
msg("xtrabackup: innodb_init_param(): Error occured.\n");
msg("mariabackup: innodb_init_param(): Error occured.\n");
return(TRUE);
}
......@@ -1755,7 +1760,7 @@ innodb_init(void)
return(FALSE);
error:
msg("xtrabackup: innodb_init(): Error occured.\n");
msg("mariabackup: innodb_init(): Error occured.\n");
return(TRUE);
}
......@@ -1765,7 +1770,7 @@ innodb_end()
srv_fast_shutdown = (ulint) innobase_fast_shutdown;
innodb_inited = 0;
msg("xtrabackup: starting shutdown with innodb_fast_shutdown = %lu\n",
msg("mariabackup: starting shutdown with innodb_fast_shutdown = %lu\n",
srv_fast_shutdown);
innodb_shutdown();
......@@ -1796,7 +1801,7 @@ xtrabackup_read_metadata(char *filename)
fp = fopen(filename,"r");
if(!fp) {
msg("xtrabackup: Error: cannot open %s\n", filename);
msg("mariabackup: Error: cannot open %s\n", filename);
return(FALSE);
}
......@@ -1875,7 +1880,7 @@ xtrabackup_stream_metadata(ds_ctxt_t *ds_ctxt)
stream = ds_open(ds_ctxt, XTRABACKUP_METADATA_FILENAME, &mystat);
if (stream == NULL) {
msg("xtrabackup: Error: cannot open output stream "
msg("mariabackup: Error: cannot open output stream "
"for %s\n", XTRABACKUP_METADATA_FILENAME);
return(FALSE);
}
......@@ -1908,7 +1913,7 @@ xtrabackup_write_metadata(const char *filepath)
fp = fopen(filepath, "w");
if(!fp) {
msg("xtrabackup: Error: cannot open %s\n", filepath);
msg("mariabackup: Error: cannot open %s\n", filepath);
return(FALSE);
}
if (fwrite(buf, len, 1, fp) < 1) {
......@@ -1958,11 +1963,11 @@ xb_read_delta_metadata(const char *filepath, xb_delta_info_t *info)
fclose(fp);
if (info->page_size == ULINT_UNDEFINED) {
msg("xtrabackup: page_size is required in %s\n", filepath);
msg("mariabackup: page_size is required in %s\n", filepath);
r = FALSE;
}
if (info->space_id == ULINT_UNDEFINED) {
msg("xtrabackup: Warning: This backup was taken with XtraBackup 2.0.1 "
msg("mariabackup: Warning: This backup was taken with XtraBackup 2.0.1 "
"or earlier, some DDL operations between full and incremental "
"backups may be handled incorrectly\n");
}
......@@ -1994,7 +1999,7 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
f = ds_open(ds_meta, filename, &mystat);
if (f == NULL) {
msg("xtrabackup: Error: cannot open output stream for %s\n",
msg("mariabackup: Error: cannot open output stream for %s\n",
filename);
return(FALSE);
}
......@@ -2365,14 +2370,14 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n)
if (write_filter->init != NULL &&
!write_filter->init(&write_filt_ctxt, dst_name, &cursor)) {
msg("[%02u] xtrabackup: error: "
msg("[%02u] mariabackup: error: "
"failed to initialize page write filter.\n", thread_n);
goto error;
}
dstfile = ds_open(ds_data, dst_name, &cursor.statinfo);
if (dstfile == NULL) {
msg("[%02u] xtrabackup: error: "
msg("[%02u] mariabackup: error: "
"cannot open the destination stream for %s\n",
thread_n, dst_name);
goto error;
......@@ -2422,7 +2427,7 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n)
if (write_filter && write_filter->deinit) {
write_filter->deinit(&write_filt_ctxt);;
}
msg("[%02u] xtrabackup: Error: "
msg("[%02u] mariabackup: Error: "
"xtrabackup_copy_datafile() failed.\n", thread_n);
return(TRUE); /*ERROR*/
......@@ -2434,10 +2439,10 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n)
if (write_filter && write_filter->deinit) {
write_filter->deinit(&write_filt_ctxt);
}
msg("[%02u] xtrabackup: Warning: We assume the "
msg("[%02u] mariabackup: Warning: We assume the "
"table was dropped during xtrabackup execution "
"and ignore the file.\n", thread_n);
msg("[%02u] xtrabackup: Warning: skipping tablespace %s.\n",
msg("[%02u] mariabackup: Warning: skipping tablespace %s.\n",
thread_n, node_name);
return(FALSE);
}
......@@ -2588,14 +2593,14 @@ xtrabackup_scan_log_recs(
break;
}
msg("xtrabackup: error:"
msg("mariabackup: error:"
" log block numbers mismatch:\n"
"xtrabackup: error: expected log block no. %lu,"
"mariabackup: error: expected log block no. %lu,"
" but got no. %lu from the log file.\n",
(ulong) scanned_no, (ulong) no);
if ((no - scanned_no) % blocks_in_group == 0) {
msg("xtrabackup: error:"
msg("mariabackup: error:"
" it looks like InnoDB log has wrapped"
" around before xtrabackup could"
" process all records due to either"
......@@ -2607,14 +2612,14 @@ xtrabackup_scan_log_recs(
} else if (!checksum_is_ok) {
/* Garbage or an incompletely written log block */
msg("xtrabackup: warning: Log block checksum mismatch"
msg("mariabackup: warning: Log block checksum mismatch"
" (block no %lu at lsn " LSN_PF "): \n"
"expected %lu, calculated checksum %lu\n",
(ulong) no,
scanned_lsn,
(ulong) log_block_get_checksum(log_block),
(ulong) log_block_calc_checksum(log_block));
msg("xtrabackup: warning: this is possible when the "
msg("mariabackup: warning: this is possible when the "
"log block has not been fully written by the "
"server, will retry later.\n");
*finished = true;
......@@ -2687,7 +2692,7 @@ xtrabackup_scan_log_recs(
}
if (ds_write(dst_log_file, log_sys->buf, write_size)) {
msg("xtrabackup: Error: "
msg("mariabackup: Error: "
"write to logfile failed\n");
return(false);
}
......@@ -2768,7 +2773,7 @@ xtrabackup_copy_logfile(lsn_t from_lsn, my_bool is_last)
error:
mutex_exit(&log_sys->mutex);
ds_close(dst_log_file);
msg("xtrabackup: Error: xtrabackup_copy_logfile() failed.\n");
msg("mariabackup: Error: xtrabackup_copy_logfile() failed.\n");
return(TRUE);
}
......@@ -2911,7 +2916,7 @@ data_copy_thread_func(
/* copy the datafile */
if(xtrabackup_copy_datafile(node, num)) {
msg("[%02u] xtrabackup: Error: "
msg("[%02u] mariabackup: Error: "
"failed to copy datafile.\n", num);
exit(EXIT_FAILURE);
}
......@@ -3083,25 +3088,25 @@ xb_load_tablespaces(void)
&flushed_lsn,
&sum_of_new_sizes);
if (err != DB_SUCCESS) {
msg("xtrabackup: Could not open or create data files.\n"
"xtrabackup: If you tried to add new data files, and it "
msg("mariabackup: Could not open or create data files.\n"
"mariabackup: If you tried to add new data files, and it "
"failed here,\n"
"xtrabackup: you should now edit innodb_data_file_path in "
"mariabackup: you should now edit innodb_data_file_path in "
"my.cnf back\n"
"xtrabackup: to what it was, and remove the new ibdata "
"mariabackup: to what it was, and remove the new ibdata "
"files InnoDB created\n"
"xtrabackup: in this failed attempt. InnoDB only wrote "
"mariabackup: in this failed attempt. InnoDB only wrote "
"those files full of\n"
"xtrabackup: zeros, but did not yet use them in any way. "
"mariabackup: zeros, but did not yet use them in any way. "
"But be careful: do not\n"
"xtrabackup: remove old data files which contain your "
"mariabackup: remove old data files which contain your "
"precious data!\n");
return(err);
}
/* create_new_db must not be TRUE.. */
if (create_new_db) {
msg("xtrabackup: could not find data files at the "
msg("mariabackup: could not find data files at the "
"specified datadir\n");
return(DB_ERROR);
}
......@@ -3120,7 +3125,7 @@ xb_load_tablespaces(void)
srv_undo_tablespaces_init(), because fil_is_user_tablespace_id() *
relies on srv_undo_tablespaces_open to be properly initialized */
msg("xtrabackup: Generating a list of tablespaces\n");
msg("mariabackup: Generating a list of tablespaces\n");
err = fil_load_single_table_tablespaces(xb_check_if_open_tablespace);
if (err != DB_SUCCESS) {
......@@ -3168,7 +3173,7 @@ xb_data_files_close(void)
}
if (i == 1000) {
msg("xtrabackup: Warning: %lu threads created by InnoDB"
msg("mariabackup: Warning: %lu threads created by InnoDB"
" had not exited at shutdown!\n",
(ulong) os_thread_count);
}
......@@ -3254,12 +3259,12 @@ xb_validate_name(
/* perform only basic validation. validate length and
path symbols */
if (len > NAME_LEN) {
msg("xtrabackup: name `%s` is too long.\n", name);
msg("mariabackup: name `%s` is too long.\n", name);
exit(EXIT_FAILURE);
}
p = strpbrk(name, "/\\~");
if (p && p - name < NAME_LEN) {
msg("xtrabackup: name `%s` is not valid.\n", name);
msg("mariabackup: name `%s` is not valid.\n", name);
exit(EXIT_FAILURE);
}
}
......@@ -3338,7 +3343,7 @@ xb_register_table(
const char* name) /*!< in: name of table */
{
if (strchr(name, '.') == NULL) {
msg("xtrabackup: `%s` is not fully qualified name.\n", name);
msg("mariabackup: `%s` is not fully qualified name.\n", name);
exit(EXIT_FAILURE);
}
......@@ -3360,7 +3365,7 @@ xb_add_regex_to_list(
if (ret != 0) {
regerror(ret, &compiled_regex, errbuf, sizeof(errbuf));
msg("xtrabackup: error: %s regcomp(%s): %s\n",
msg("mariabackup: error: %s regcomp(%s): %s\n",
error_context, regex, errbuf);
exit(EXIT_FAILURE);
}
......@@ -3429,7 +3434,7 @@ xb_load_list_file(
/* read and store the filenames */
fp = fopen(filename, "r");
if (!fp) {
msg("xtrabackup: cannot open %s\n",
msg("mariabackup: cannot open %s\n",
filename);
exit(EXIT_FAILURE);
}
......@@ -3438,7 +3443,7 @@ xb_load_list_file(
if (p) {
*p = '\0';
} else {
msg("xtrabackup: `%s...` name is too long", name_buf);
msg("mariabackup: `%s...` name is too long", name_buf);
exit(EXIT_FAILURE);
}
......@@ -3730,19 +3735,19 @@ xtrabackup_backup_func(void)
data_thread_ctxt_t *data_threads;
#ifdef USE_POSIX_FADVISE
msg("xtrabackup: uses posix_fadvise().\n");
msg("mariabackup: uses posix_fadvise().\n");
#endif
/* cd to datadir */
if (my_setwd(mysql_real_data_home,MYF(MY_WME)))
{
msg("xtrabackup: cannot my_setwd %s\n", mysql_real_data_home);
msg("mariabackup: cannot my_setwd %s\n", mysql_real_data_home);
exit(EXIT_FAILURE);
}
msg("xtrabackup: cd to %s\n", mysql_real_data_home);
msg("mariabackup: cd to %s\n", mysql_real_data_home);
msg("xtrabackup: open files limit requested %u, set to %u\n",
msg("mariabackup: open files limit requested %u, set to %u\n",
(uint) xb_open_files_limit,
xb_set_max_open_files(xb_open_files_limit));
......@@ -3757,7 +3762,7 @@ xtrabackup_backup_func(void)
srv_close_files = (bool)xb_close_files;
if (srv_close_files)
msg("xtrabackup: warning: close-files specified. Use it "
msg("mariabackup: warning: close-files specified. Use it "
"at your own risk. If there are DDL operations like table DROP TABLE "
"or RENAME TABLE during the backup, inconsistent backup will be "
"produced.\n");
......@@ -3779,7 +3784,7 @@ xtrabackup_backup_func(void)
} else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) {
srv_unix_file_flush_method = SRV_UNIX_O_DIRECT;
msg("xtrabackup: using O_DIRECT\n");
msg("mariabackup: using O_DIRECT\n");
} else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) {
srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC;
......@@ -3787,23 +3792,17 @@ xtrabackup_backup_func(void)
srv_unix_file_flush_method = SRV_UNIX_NOSYNC;
} else if (0 == ut_strcmp(srv_file_flush_method_str, "ALL_O_DIRECT")) {
srv_unix_file_flush_method = SRV_UNIX_ALL_O_DIRECT;
msg("xtrabackup: using ALL_O_DIRECT\n");
msg("mariabackup: using ALL_O_DIRECT\n");
} else if (0 == ut_strcmp(srv_file_flush_method_str,
"O_DIRECT_NO_FSYNC")) {
srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC;
msg("xtrabackup: using O_DIRECT_NO_FSYNC\n");
msg("mariabackup: using O_DIRECT_NO_FSYNC\n");
} else {
msg("xtrabackup: Unrecognized value %s for "
msg("mariabackup: Unrecognized value %s for "
"innodb_flush_method\n", srv_file_flush_method_str);
exit(EXIT_FAILURE);
}
/* We can only use synchronous unbuffered IO on Windows for now */
if (srv_file_flush_method_str != NULL) {
msg("xtrabackupp: Warning: "
"ignoring innodb_flush_method = %s on Windows.\n", srv_file_flush_method_str);
}
#ifdef _WIN32
srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
srv_use_native_aio = FALSE;
......@@ -3866,12 +3865,12 @@ xtrabackup_backup_func(void)
}
if ((log_opened && log_created)) {
msg(
"xtrabackup: Error: all log files must be created at the same time.\n"
"xtrabackup: All log files must be created also in database creation.\n"
"xtrabackup: If you want bigger or smaller log files, shut down the\n"
"xtrabackup: database and make sure there were no errors in shutdown.\n"
"xtrabackup: Then delete the existing log files. Edit the .cnf file\n"
"xtrabackup: and start the database again.\n");
"mariabackup: Error: all log files must be created at the same time.\n"
"mariabackup: All log files must be created also in database creation.\n"
"mariabackup: If you want bigger or smaller log files, shut down the\n"
"mariabackup: database and make sure there were no errors in shutdown.\n"
"mariabackup: Then delete the existing log files. Edit the .cnf file\n"
"mariabackup: and start the database again.\n");
//return(DB_ERROR);
exit(EXIT_FAILURE);
......@@ -3880,7 +3879,7 @@ xtrabackup_backup_func(void)
/* log_file_created must not be TRUE, if online */
if (log_file_created) {
msg("xtrabackup: Something wrong with source files...\n");
msg("mariabackup: Something wrong with source files...\n");
exit(EXIT_FAILURE);
}
......@@ -3890,7 +3889,7 @@ xtrabackup_backup_func(void)
if (xtrabackup_extra_lsndir
&&!my_stat(xtrabackup_extra_lsndir,&stat_info,MYF(0))
&& (my_mkdir(xtrabackup_extra_lsndir,0777,MYF(0)) < 0)) {
msg("xtrabackup: Error: cannot mkdir %d: %s\n",
msg("mariabackup: Error: cannot mkdir %d: %s\n",
my_errno, xtrabackup_extra_lsndir);
exit(EXIT_FAILURE);
}
......@@ -3898,7 +3897,7 @@ xtrabackup_backup_func(void)
/* create target dir if not exist */
if (!xtrabackup_stream_str && !my_stat(xtrabackup_target_dir,&stat_info,MYF(0))
&& (my_mkdir(xtrabackup_target_dir,0777,MYF(0)) < 0)){
msg("xtrabackup: Error: cannot mkdir %d: %s\n",
msg("mariabackup: Error: cannot mkdir %d: %s\n",
my_errno, xtrabackup_target_dir);
exit(EXIT_FAILURE);
}
......@@ -3984,7 +3983,7 @@ xtrabackup_backup_func(void)
memset(&stat_info, 0, sizeof(MY_STAT));
dst_log_file = ds_open(ds_redo, XB_LOG_FILENAME, &stat_info);
if (dst_log_file == NULL) {
msg("xtrabackup: error: failed to open the target stream for "
msg("mariabackup: error: failed to open the target stream for "
"'%s'.\n", XB_LOG_FILENAME);
ut_free(log_hdr_buf_);
exit(EXIT_FAILURE);
......@@ -3998,7 +3997,7 @@ xtrabackup_backup_func(void)
+ (sizeof "xtrabkup ") - 1));
if (ds_write(dst_log_file, log_hdr_buf, LOG_FILE_HDR_SIZE)) {
msg("xtrabackup: error: write to logfile failed\n");
msg("mariabackup: error: write to logfile failed\n");
ut_free(log_hdr_buf_);
exit(EXIT_FAILURE);
}
......@@ -4034,7 +4033,7 @@ xtrabackup_backup_func(void)
/* Populate fil_system with tablespaces to copy */
err = xb_load_tablespaces();
if (err != DB_SUCCESS) {
msg("xtrabackup: error: xb_load_tablespaces() failed with"
msg("mariabackup: error: xb_load_tablespaces() failed with"
"error code %lu\n", err);
exit(EXIT_FAILURE);
}
......@@ -4050,25 +4049,25 @@ xtrabackup_backup_func(void)
changed_page_bitmap = xb_page_bitmap_init();
}
if (!changed_page_bitmap) {
msg("xtrabackup: using the full scan for incremental "
msg("mariabackup: using the full scan for incremental "
"backup\n");
} else if (incremental_lsn != checkpoint_lsn_start) {
/* Do not print that bitmaps are used when dummy bitmap
is build for an empty LSN range. */
msg("xtrabackup: using the changed page bitmap\n");
msg("mariabackup: using the changed page bitmap\n");
}
}
ut_a(xtrabackup_parallel > 0);
if (xtrabackup_parallel > 1) {
msg("xtrabackup: Starting %u threads for parallel data "
msg("mariabackup: Starting %u threads for parallel data "
"files transfer\n", xtrabackup_parallel);
}
it = datafiles_iter_new(f_system);
if (it == NULL) {
msg("xtrabackup: Error: datafiles_iter_new() failed.\n");
msg("mariabackup: Error: datafiles_iter_new() failed.\n");
exit(EXIT_FAILURE);
}
......@@ -4123,7 +4122,7 @@ xtrabackup_backup_func(void)
err = recv_find_max_checkpoint(&max_cp_group, &max_cp_field);
if (err != DB_SUCCESS) {
msg("xtrabackup: Error: recv_find_max_checkpoint() failed.\n");
msg("mariabackup: Error: recv_find_max_checkpoint() failed.\n");
mutex_exit(&log_sys->mutex);
goto skip_last_cp;
}
......@@ -4137,14 +4136,14 @@ xtrabackup_backup_func(void)
mutex_exit(&log_sys->mutex);
msg("xtrabackup: The latest check point (for incremental): "
msg("mariabackup: The latest check point (for incremental): "
"'" LSN_PF "'\n", latest_cp);
}
skip_last_cp:
/* stop log_copying_thread */
log_copying = FALSE;
os_event_set(log_copying_stop);
msg("xtrabackup: Stopping log copying thread.\n");
msg("mariabackup: Stopping log copying thread.\n");
while (log_copying_running) {
msg(".");
os_thread_sleep(200000); /*0.2 sec*/
......@@ -4167,7 +4166,7 @@ xtrabackup_backup_func(void)
metadata_last_lsn = log_copy_scanned_lsn;
if (!xtrabackup_stream_metadata(ds_meta)) {
msg("xtrabackup: Error: failed to stream metadata.\n");
msg("mariabackup: Error: failed to stream metadata.\n");
exit(EXIT_FAILURE);
}
if (xtrabackup_extra_lsndir) {
......@@ -4176,7 +4175,7 @@ xtrabackup_backup_func(void)
sprintf(filename, "%s/%s", xtrabackup_extra_lsndir,
XTRABACKUP_METADATA_FILENAME);
if (!xtrabackup_write_metadata(filename)) {
msg("xtrabackup: Error: failed to write metadata "
msg("mariabackup: Error: failed to write metadata "
"to '%s'.\n", filename);
exit(EXIT_FAILURE);
}
......@@ -4198,7 +4197,7 @@ xtrabackup_backup_func(void)
wait_throttle = NULL;
}
msg("xtrabackup: Transaction log of lsn (" LSN_PF ") to (" LSN_PF
msg("mariabackup: Transaction log of lsn (" LSN_PF ") to (" LSN_PF
") was copied.\n", checkpoint_lsn_start, log_copy_scanned_lsn);
xb_filters_free();
......@@ -4206,7 +4205,7 @@ xtrabackup_backup_func(void)
/* Make sure that the latest checkpoint made it to xtrabackup_logfile */
if (latest_cp > log_copy_scanned_lsn) {
msg("xtrabackup: error: last checkpoint LSN (" LSN_PF
msg("mariabackup: error: last checkpoint LSN (" LSN_PF
") is larger than last copied LSN (" LSN_PF ").\n",
latest_cp, log_copy_scanned_lsn);
exit(EXIT_FAILURE);
......@@ -4267,7 +4266,7 @@ xtrabackup_init_temp_log(void)
/* The following call prints an error message */
os_file_get_last_error(TRUE);
msg("xtrabackup: Warning: cannot open %s. will try to find.\n",
msg("mariabackup: Warning: cannot open %s. will try to find.\n",
src_path);
/* check if ib_logfile0 may be xtrabackup_logfile */
......@@ -4277,7 +4276,7 @@ xtrabackup_init_temp_log(void)
&success,0);
if (!success) {
os_file_get_last_error(TRUE);
msg(" xtrabackup: Fatal error: cannot find %s.\n",
msg("mariabackup: Fatal error: cannot find %s.\n",
src_path);
goto error;
......@@ -4291,7 +4290,7 @@ xtrabackup_init_temp_log(void)
if ( ut_memcmp(log_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP,
(byte*)"xtrabkup", (sizeof "xtrabkup") - 1) == 0) {
msg(" xtrabackup: 'ib_logfile0' seems to be "
msg("mariabackup: 'ib_logfile0' seems to be "
"'xtrabackup_logfile'. will retry.\n");
os_file_close(src_file);
......@@ -4306,8 +4305,7 @@ xtrabackup_init_temp_log(void)
goto retry;
}
msg(" xtrabackup: Fatal error: cannot find %s.\n",
src_path);
msg("mariabackup: Fatal error: cannot find %s.\n", src_path);
os_file_close(src_file);
src_file = XB_FILE_UNDEFINED;
......@@ -4328,7 +4326,7 @@ xtrabackup_init_temp_log(void)
if ( ut_memcmp(log_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP,
(byte*)"xtrabkup", (sizeof "xtrabkup") - 1) != 0 ) {
msg("xtrabackup: notice: xtrabackup_logfile was already used "
msg("mariabackup: notice: xtrabackup_logfile was already used "
"to '--prepare'.\n");
goto skip_modify;
} else {
......@@ -4361,7 +4359,7 @@ xtrabackup_init_temp_log(void)
}
if (!checkpoint_found) {
msg("xtrabackup: No valid checkpoint found.\n");
msg("mariabackup: No valid checkpoint found.\n");
goto error;
}
......@@ -4467,7 +4465,7 @@ xtrabackup_init_temp_log(void)
file_size = os_file_get_size(src_file);
}
msg("xtrabackup: xtrabackup_logfile detected: size=" INT64PF ", "
msg("mariabackup: xtrabackup_logfile detected: size=" INT64PF ", "
"start_lsn=(" LSN_PF ")\n", file_size, max_lsn);
os_file_close(src_file);
......@@ -4503,7 +4501,7 @@ xtrabackup_init_temp_log(void)
free(log_buf);
if (src_file != XB_FILE_UNDEFINED)
os_file_close(src_file);
msg("xtrabackup: Error: xtrabackup_init_temp_log() failed.\n");
msg("mariabackup: Error: xtrabackup_init_temp_log() failed.\n");
return(TRUE); /*ERROR*/
}
......@@ -4555,14 +4553,14 @@ xb_space_create_file(
OS_FILE_READ_WRITE,
&ret,0);
if (!ret) {
msg("xtrabackup: cannot create file %s\n", path);
msg("mariabackup: cannot create file %s\n", path);
return ret;
}
ret = os_file_set_size(path, *file,
FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE);
if (!ret) {
msg("xtrabackup: cannot set size for file %s\n", path);
msg("mariabackup: cannot set size for file %s\n", path);
os_file_close(*file);
os_file_delete(0, path);
return ret;
......@@ -4606,7 +4604,7 @@ xb_space_create_file(
ut_free(buf);
if (!ret) {
msg("xtrabackup: could not write the first page to %s\n",
msg("mariabackup: could not write the first page to %s\n",
path);
os_file_close(*file);
os_file_delete(0, path);
......@@ -4670,7 +4668,7 @@ xb_delta_open_matching_space(
/* Create the database directory if it doesn't exist yet */
if (!os_file_create_directory(dest_dir, FALSE)) {
msg("xtrabackup: error: cannot create dir %s\n", dest_dir);
msg("mariabackup: error: cannot create dir %s\n", dest_dir);
return file;
}
......@@ -4703,13 +4701,13 @@ xb_delta_open_matching_space(
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%lu",
dbname, fil_space->id);
msg("xtrabackup: Renaming %s to %s.ibd\n",
msg("mariabackup: Renaming %s to %s.ibd\n",
fil_space->name, tmpname);
if (!fil_rename_tablespace(NULL, fil_space->id,
tmpname, NULL))
{
msg("xtrabackup: Cannot rename %s to %s\n",
msg("mariabackup: Cannot rename %s to %s\n",
fil_space->name, tmpname);
goto exit;
}
......@@ -4718,7 +4716,7 @@ xb_delta_open_matching_space(
if (space_id == ULINT_UNDEFINED)
{
msg("xtrabackup: Error: Cannot handle DDL operation on tablespace "
msg("mariabackup: Error: Cannot handle DDL operation on tablespace "
"%s\n", dest_space_name);
exit(EXIT_FAILURE);
}
......@@ -4730,13 +4728,13 @@ xb_delta_open_matching_space(
strncpy(tmpname, dest_space_name, FN_REFLEN);
msg("xtrabackup: Renaming %s to %s\n",
msg("mariabackup: Renaming %s to %s\n",
fil_space->name, dest_space_name);
if (!fil_rename_tablespace(NULL, fil_space->id, tmpname,
NULL))
{
msg("xtrabackup: Cannot rename %s to %s\n",
msg("mariabackup: Cannot rename %s to %s\n",
fil_space->name, dest_space_name);
goto exit;
}
......@@ -4748,7 +4746,7 @@ xb_delta_open_matching_space(
if (!fil_space_create(dest_space_name, space_id, 0,
FIL_TABLESPACE, 0, false)) {
msg("xtrabackup: Cannot create tablespace %s\n",
msg("mariabackup: Cannot create tablespace %s\n",
dest_space_name);
goto exit;
}
......@@ -4782,7 +4780,7 @@ xb_delta_open_matching_space(
if (ok) {
*success = TRUE;
} else {
msg("xtrabackup: Cannot open file %s\n", real_name);
msg("mariabackup: Cannot open file %s\n", real_name);
}
exit:
......@@ -4854,11 +4852,11 @@ xtrabackup_apply_delta(
page_size = info.page_size;
page_size_shift = get_bit_shift(page_size);
msg("xtrabackup: page size for %s is %lu bytes\n",
msg("mariabackup: page size for %s is %lu bytes\n",
src_path, page_size);
if (page_size_shift < 10 ||
page_size_shift > UNIV_PAGE_SIZE_SHIFT_MAX) {
msg("xtrabackup: error: invalid value of page_size "
msg("mariabackup: error: invalid value of page_size "
"(%lu bytes) read from %s\n", page_size, meta_path);
goto error;
}
......@@ -4869,7 +4867,7 @@ xtrabackup_apply_delta(
&success,0);
if (!success) {
os_file_get_last_error(TRUE);
msg("xtrabackup: error: cannot open %s\n", src_path);
msg("mariabackup: error: cannot open %s\n", src_path);
goto error;
}
......@@ -4881,7 +4879,7 @@ xtrabackup_apply_delta(
dbname, space_name, info.space_id, info.zip_size,
dst_path, sizeof(dst_path), &success);
if (!success) {
msg("xtrabackup: error: cannot open %s\n", dst_path);
msg("mariabackup: error: cannot open %s\n", dst_path);
goto error;
}
......@@ -4920,7 +4918,7 @@ xtrabackup_apply_delta(
last_buffer = TRUE;
break;
default:
msg("xtrabackup: error: %s seems not "
msg("mariabackup: error: %s seems not "
".delta file.\n", src_path);
goto error;
}
......@@ -4953,12 +4951,17 @@ xtrabackup_apply_delta(
if (offset_on_page == 0xFFFFFFFFUL)
break;
success = os_file_write(dst_path, dst_file,
incremental_buffer +
page_in_buffer * page_size,
(offset_on_page <<
page_size_shift),
page_size);
uchar *buf = incremental_buffer + page_in_buffer * page_size;
const os_offset_t off = os_offset_t(offset_on_page)*page_size;
if (off == 0) {
/* Fix tablespace size. */
os_offset_t n_pages = fsp_get_size_low(static_cast<ib_page_t *>(buf));
if (!os_file_set_size(dst_path, dst_file, n_pages*page_size))
goto error;
}
success = os_file_write(dst_path, dst_file, buf, off, page_size);
if (!success) {
goto error;
}
......@@ -4969,8 +4972,11 @@ xtrabackup_apply_delta(
if (incremental_buffer_base)
ut_free(incremental_buffer_base);
if (src_file != XB_FILE_UNDEFINED)
if (src_file != XB_FILE_UNDEFINED) {
os_file_close(src_file);
/* Remove .delta file after it was successfully applied.*/
os_file_delete(0,src_path);
}
if (dst_file != XB_FILE_UNDEFINED)
os_file_close(dst_file);
return TRUE;
......@@ -4982,7 +4988,7 @@ xtrabackup_apply_delta(
os_file_close(src_file);
if (dst_file != XB_FILE_UNDEFINED)
os_file_close(dst_file);
msg("xtrabackup: Error: xtrabackup_apply_delta(): "
msg("mariabackup: Error: xtrabackup_apply_delta(): "
"failed to apply %s to %s.\n", src_path, dst_path);
return FALSE;
}
......@@ -5046,7 +5052,7 @@ xb_process_datadir(
callback */
{
ulint ret;
char dbpath[FN_REFLEN];
char dbpath[OS_FILE_MAX_PATH];
os_file_dir_t dir;
os_file_dir_t dbdir;
os_file_stat_t dbinfo;
......@@ -5091,7 +5097,7 @@ xb_process_datadir(
os_file_closedir(dbdir);
} else {
msg("xtrabackup: Cannot open dir %s\n",
msg("mariabackup: Cannot open dir %s\n",
path);
}
......@@ -5099,7 +5105,7 @@ xb_process_datadir(
dir = os_file_opendir(path, FALSE);
if (dir == NULL) {
msg("xtrabackup: Cannot open dir %s\n",
msg("mariabackup: Cannot open dir %s\n",
path);
}
......@@ -5112,8 +5118,7 @@ xb_process_datadir(
goto next_datadir_item;
}
sprintf(dbpath, "%s/%s", path,
dbinfo.name);
snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name);
srv_normalize_path_for_win(dbpath);
dbdir = os_file_opendir(dbpath, FALSE);
......@@ -5242,7 +5247,7 @@ xtrabackup_close_temp_log(my_bool clear_flag)
error:
if (src_file != XB_FILE_UNDEFINED)
os_file_close(src_file);
msg("xtrabackup: Error: xtrabackup_close_temp_log() failed.\n");
msg("mariabackup: Error: xtrabackup_close_temp_log() failed.\n");
return(TRUE); /*ERROR*/
}
......@@ -5271,7 +5276,7 @@ xb_export_cfg_write_index_fields(
if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) {
msg("xtrabackup: Error: writing index fields.");
msg("mariabackup: Error: writing index fields.");
return(false);
}
......@@ -5285,7 +5290,7 @@ xb_export_cfg_write_index_fields(
if (fwrite(row, 1, sizeof(len), file) != sizeof(len)
|| fwrite(field->name, 1, len, file) != len) {
msg("xtrabackup: Error: writing index column.");
msg("mariabackup: Error: writing index column.");
return(false);
}
......@@ -5312,7 +5317,7 @@ xb_export_cfg_write_indexes(
mach_write_to_4(row, UT_LIST_GET_LEN(table->indexes));
if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) {
msg("xtrabackup: Error: writing index count.");
msg("mariabackup: Error: writing index count.");
return(false);
}
......@@ -5360,7 +5365,7 @@ xb_export_cfg_write_indexes(
if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) {
msg("xtrabackup: Error: writing index meta-data.");
msg("mariabackup: Error: writing index meta-data.");
return(false);
}
......@@ -5375,7 +5380,7 @@ xb_export_cfg_write_indexes(
if (fwrite(row, 1, sizeof(len), file) != sizeof(len)
|| fwrite(index->name, 1, len, file) != len) {
msg("xtrabackup: Error: writing index name.");
msg("mariabackup: Error: writing index name.");
return(false);
}
......@@ -5428,7 +5433,7 @@ xb_export_cfg_write_table(
mach_write_to_4(ptr, col->max_prefix);
if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) {
msg("xtrabackup: Error: writing table column data.");
msg("mariabackup: Error: writing table column data.");
return(false);
}
......@@ -5449,7 +5454,7 @@ xb_export_cfg_write_table(
if (fwrite(row, 1, sizeof(len), file) != sizeof(len)
|| fwrite(col_name, 1, len, file) != len) {
msg("xtrabackup: Error: writing column name.");
msg("mariabackup: Error: writing column name.");
return(false);
}
......@@ -5475,7 +5480,7 @@ xb_export_cfg_write_header(
mach_write_to_4(value, IB_EXPORT_CFG_VERSION_V1);
if (fwrite(&value, 1, sizeof(value), file) != sizeof(value)) {
msg("xtrabackup: Error: writing meta-data version number.");
msg("mariabackup: Error: writing meta-data version number.");
return(false);
}
......@@ -5491,7 +5496,7 @@ xb_export_cfg_write_header(
if (fwrite(&value, 1, sizeof(value), file) != sizeof(value)
|| fwrite(hostname, 1, len, file) != len) {
msg("xtrabackup: Error: writing hostname.");
msg("mariabackup: Error: writing hostname.");
return(false);
}
......@@ -5506,7 +5511,7 @@ xb_export_cfg_write_header(
if (fwrite(&value, 1, sizeof(value), file) != sizeof(value)
|| fwrite(table->name, 1, len, file) != len) {
msg("xtrabackup: Error: writing table name.");
msg("mariabackup: Error: writing table name.");
return(false);
}
......@@ -5517,7 +5522,7 @@ xb_export_cfg_write_header(
mach_write_to_8(row, table->autoinc);
if (fwrite(row, 1, sizeof(ib_uint64_t), file) != sizeof(ib_uint64_t)) {
msg("xtrabackup: Error: writing table autoinc value.");
msg("mariabackup: Error: writing table autoinc value.");
return(false);
}
......@@ -5536,7 +5541,7 @@ xb_export_cfg_write_header(
mach_write_to_4(ptr, table->n_cols);
if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) {
msg("xtrabackup: Error: writing table meta-data.");
msg("mariabackup: Error: writing table meta-data.");
return(false);
}
......@@ -5564,7 +5569,7 @@ xb_export_cfg_write(
file = fopen(file_path, "w+b");
if (file == NULL) {
msg("xtrabackup: Error: cannot open %s\n", node->name);
msg("mariabackup: Error: cannot open %s\n", node->name);
success = false;
} else {
......@@ -5580,7 +5585,7 @@ xb_export_cfg_write(
}
if (fclose(file) != 0) {
msg("xtrabackup: Error: cannot close %s\n", node->name);
msg("mariabackup: Error: cannot close %s\n", node->name);
success = false;
}
......@@ -5618,7 +5623,7 @@ store_binlog_info(
fp = fopen(filename, "w");
if (!fp) {
msg("xtrabackup: failed to open '%s'\n", filename);
msg("mariabackup: failed to open '%s'\n", filename);
return(false);
}
......@@ -5642,11 +5647,11 @@ xtrabackup_prepare_func(int argc, char ** argv)
if (my_setwd(xtrabackup_real_target_dir,MYF(MY_WME)))
{
msg("xtrabackup: cannot my_setwd %s\n",
msg("mariabackup: cannot my_setwd %s\n",
xtrabackup_real_target_dir);
exit(EXIT_FAILURE);
}
msg("xtrabackup: cd to %s\n", xtrabackup_real_target_dir);
msg("mariabackup: cd to %s\n", xtrabackup_real_target_dir);
encryption_plugin_prepare_init(argc, argv);
......@@ -5661,36 +5666,36 @@ xtrabackup_prepare_func(int argc, char ** argv)
XTRABACKUP_METADATA_FILENAME);
if (!xtrabackup_read_metadata(metadata_path)) {
msg("xtrabackup: Error: failed to read metadata from '%s'\n",
msg("mariabackup: Error: failed to read metadata from '%s'\n",
metadata_path);
exit(EXIT_FAILURE);
}
if (!strcmp(metadata_type, "full-backuped")) {
msg("xtrabackup: This target seems to be not prepared yet.\n");
msg("mariabackup: This target seems to be not prepared yet.\n");
} else if (!strcmp(metadata_type, "log-applied")) {
msg("xtrabackup: This target seems to be already "
msg("mariabackup: This target seems to be already "
"prepared with --apply-log-only.\n");
goto skip_check;
} else if (!strcmp(metadata_type, "full-prepared")) {
msg("xtrabackup: This target seems to be already prepared.\n");
msg("mariabackup: This target seems to be already prepared.\n");
} else {
msg("xtrabackup: This target seems not to have correct "
msg("mariabackup: This target seems not to have correct "
"metadata...\n");
exit(EXIT_FAILURE);
}
if (xtrabackup_incremental) {
msg("xtrabackup: error: applying incremental backup "
msg("mariabackup: error: applying incremental backup "
"needs target prepared with --apply-log-only.\n");
exit(EXIT_FAILURE);
}
skip_check:
if (xtrabackup_incremental
&& metadata_to_lsn != incremental_lsn) {
msg("xtrabackup: error: This incremental backup seems "
msg("mariabackup: error: This incremental backup seems "
"not to be proper for the target.\n"
"xtrabackup: Check 'to_lsn' of the target and "
"mariabackup: Check 'to_lsn' of the target and "
"'from_lsn' of the incremental.\n");
exit(EXIT_FAILURE);
}
......@@ -5727,7 +5732,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
if (xtrabackup_incremental) {
err = xb_data_files_init();
if (err != DB_SUCCESS) {
msg("xtrabackup: error: xb_data_files_init() failed "
msg("mariabackup: error: xb_data_files_init() failed "
"with error code %lu\n", err);
goto error_cleanup;
}
......@@ -5777,8 +5782,8 @@ xtrabackup_prepare_func(int argc, char ** argv)
srv_n_write_io_threads = 4;
}
msg("xtrabackup: Starting InnoDB instance for recovery.\n"
"xtrabackup: Using %lld bytes for buffer pool "
msg("mariabackup: Starting InnoDB instance for recovery.\n"
"mariabackup: Using %lld bytes for buffer pool "
"(set by --use-memory parameter)\n", xtrabackup_use_memory);
srv_max_buf_pool_modified_pct = (double)max_buf_pool_modified_pct;
......@@ -5790,54 +5795,8 @@ xtrabackup_prepare_func(int argc, char ** argv)
if(innodb_init())
goto error_cleanup;
if (xtrabackup_incremental) {
it = datafiles_iter_new(fil_system);
if (it == NULL) {
msg("xtrabackup: Error: datafiles_iter_new() failed.\n");
exit(EXIT_FAILURE);
}
while ((node = datafiles_iter_next(it)) != NULL) {
byte *header;
ulint size;
ulint actual_size;
mtr_t mtr;
buf_block_t *block;
ulint flags;
space = node->space;
/* Align space sizes along with fsp header. We want to process
each space once, so skip all nodes except the first one in a
multi-node space. */
if (UT_LIST_GET_PREV(chain, node) != NULL) {
continue;
}
mtr_start(&mtr);
mtr_s_lock(fil_space_get_latch(space->id, &flags), &mtr);
block = buf_page_get(space->id,
dict_tf_get_zip_size(flags),
0, RW_S_LATCH, &mtr);
header = FSP_HEADER_OFFSET + buf_block_get_frame(block);
size = mtr_read_ulint(header + FSP_SIZE, MLOG_4BYTES,
&mtr);
mtr_commit(&mtr);
fil_extend_space_to_desired_size(&actual_size, space->id, size);
}
datafiles_iter_free(it);
} /* if (xtrabackup_incremental) */
if (xtrabackup_export) {
msg("xtrabackup: export option is specified.\n");
msg("mariabackup: export option is specified.\n");
pfs_os_file_t info_file;
char info_file_path[FN_REFLEN];
ibool success;
......@@ -5854,7 +5813,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
it = datafiles_iter_new(fil_system);
if (it == NULL) {
msg("xtrabackup: Error: datafiles_iter_new() "
msg("mariabackup: Error: datafiles_iter_new() "
"failed.\n");
exit(EXIT_FAILURE);
}
......@@ -5901,7 +5860,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
table = dict_table_get_low(table_name);
if (!table) {
msg("xtrabackup: error: "
msg("mariabackup: error: "
"cannot find dictionary "
"record of table %s\n",
table_name);
......@@ -5916,7 +5875,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
index = dict_table_get_first_index(table);
n_index = UT_LIST_GET_LEN(table->indexes);
if (n_index > 31) {
msg("xtrabackup: warning: table '%s' has more "
msg("mariabackup: warning: table '%s' has more "
"than 31 indexes, .exp file was not "
"generated. Table will fail to import "
"on server version prior to 5.6.\n",
......@@ -5932,7 +5891,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
strncpy((char *) page + 12,
table_name, 500);
msg("xtrabackup: export metadata of "
msg("mariabackup: export metadata of "
"table '%s' to file `%s` "
"(%lu indexes)\n",
table_name, info_file_path,
......@@ -5946,7 +5905,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
strncpy((char *) page + n_index * 512 +
12, index->name, 500);
msg("xtrabackup: name=%s, "
msg("mariabackup: name=%s, "
"id.low=%lu, page=%lu\n",
index->name,
(ulint)(index->id &
......@@ -6010,17 +5969,17 @@ xtrabackup_prepare_func(int argc, char ** argv)
&& srv_start_lsn < incremental_to_lsn)
||(!xtrabackup_incremental
&& srv_start_lsn < metadata_to_lsn)) {
msg("xtrabackup: error: "
msg("mariabackup: error: "
"The transaction log file is corrupted.\n"
"xtrabackup: error: "
"mariabackup: error: "
"The log was not applied to the intended LSN!\n");
msg("xtrabackup: Log applied to lsn " LSN_PF "\n",
msg("mariabackup: Log applied to lsn " LSN_PF "\n",
srv_start_lsn);
if (xtrabackup_incremental) {
msg("xtrabackup: The intended lsn is " LSN_PF "\n",
msg("mariabackup: The intended lsn is " LSN_PF "\n",
incremental_to_lsn);
} else {
msg("xtrabackup: The intended lsn is " LSN_PF "\n",
msg("mariabackup: The intended lsn is " LSN_PF "\n",
metadata_to_lsn);
}
exit(EXIT_FAILURE);
......@@ -6061,7 +6020,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
sprintf(filename, "%s/%s", xtrabackup_target_dir, XTRABACKUP_METADATA_FILENAME);
if (!xtrabackup_write_metadata(filename)) {
msg("xtrabackup: Error: failed to write metadata "
msg("mariabackup: Error: failed to write metadata "
"to '%s'\n", filename);
exit(EXIT_FAILURE);
}
......@@ -6069,7 +6028,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
if(xtrabackup_extra_lsndir) {
sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_METADATA_FILENAME);
if (!xtrabackup_write_metadata(filename)) {
msg("xtrabackup: Error: failed to write "
msg("mariabackup: Error: failed to write "
"metadata to '%s'\n", filename);
exit(EXIT_FAILURE);
}
......@@ -6381,7 +6340,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
if (optend - argv[i] == 15 &&
!strncmp(argv[i], "--defaults-file", optend - argv[i])) {
msg("xtrabackup: Error: --defaults-file "
msg("mariabackup: Error: --defaults-file "
"must be specified first on the command "
"line\n");
exit(EXIT_FAILURE);
......@@ -6390,7 +6349,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
!strncmp(argv[i], "--defaults-extra-file",
optend - argv[i])) {
msg("xtrabackup: Error: --defaults-extra-file "
msg("mariabackup: Error: --defaults-extra-file "
"must be specified first on the command "
"line\n");
exit(EXIT_FAILURE);
......@@ -6441,7 +6400,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
}
if (!server_option) {
msg("xtrabackup: Error:"
msg("mariabackup: Error:"
" unknown argument: '%s'\n", opt);
exit(EXIT_FAILURE);
}
......@@ -6507,7 +6466,7 @@ int main(int argc, char **argv)
if ((!xtrabackup_print_param) && (!xtrabackup_prepare) && (strcmp(mysql_data_home, "./") == 0)) {
if (!xtrabackup_print_param)
usage();
msg("\nxtrabackup: Error: Please set parameter 'datadir'\n");
msg("\nmariabackup: Error: Please set parameter 'datadir'\n");
exit(EXIT_FAILURE);
}
......@@ -6576,7 +6535,7 @@ int main(int argc, char **argv)
error = 1;
if (error) {
msg("xtrabackup: value '%s' may be wrong format for "
msg("mariabackup: value '%s' may be wrong format for "
"incremental option.\n", xtrabackup_incremental);
exit(EXIT_FAILURE);
}
......@@ -6586,7 +6545,7 @@ int main(int argc, char **argv)
sprintf(filename, "%s/%s", xtrabackup_incremental_basedir, XTRABACKUP_METADATA_FILENAME);
if (!xtrabackup_read_metadata(filename)) {
msg("xtrabackup: error: failed to read metadata from "
msg("mariabackup: error: failed to read metadata from "
"%s\n", filename);
exit(EXIT_FAILURE);
}
......@@ -6599,7 +6558,7 @@ int main(int argc, char **argv)
sprintf(filename, "%s/%s", xtrabackup_incremental_dir, XTRABACKUP_METADATA_FILENAME);
if (!xtrabackup_read_metadata(filename)) {
msg("xtrabackup: error: failed to read metadata from "
msg("mariabackup: error: failed to read metadata from "
"%s\n", filename);
exit(EXIT_FAILURE);
}
......@@ -6636,7 +6595,7 @@ int main(int argc, char **argv)
}
if (xtrabackup_export && innobase_file_per_table == FALSE) {
msg("xtrabackup: auto-enabling --innodb-file-per-table due to "
msg("mariabackup: auto-enabling --innodb-file-per-table due to "
"the --export option\n");
innobase_file_per_table = TRUE;
}
......
......@@ -98,18 +98,23 @@ static struct my_option my_long_options[] =
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
void cleanup_and_exit(int exit_code)
static void cleanup_and_exit(int exit_code) __attribute__ ((noreturn));
static void cleanup_and_exit(int exit_code)
{
my_end(0);
exit(exit_code);
}
static void usage(my_bool version)
static void version()
{
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
if (version)
return;
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
}
static void usage() __attribute__ ((noreturn));
static void usage()
{
version();
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");
puts("Prints all arguments that is give to some program using the default files");
printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
......@@ -133,12 +138,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
cleanup_and_exit(0);
case 'I':
case '?':
usage(0);
usage();
case 'v':
verbose++;
break;
case 'V':
usage(1);
version();
/* fall through */
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
break;
......@@ -186,7 +192,7 @@ int main(int argc, char **argv)
nargs+= array_elements(mysqld_groups);
if (nargs < 2)
usage(0);
usage();
load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME));
if (!load_default_groups)
......
......@@ -174,7 +174,7 @@ register char **argv[];
break;
case 'V':
version=1;
/* fall through */
/* fall through */
case 'I':
case '?':
help=1; /* Help text written */
......
......@@ -12,6 +12,14 @@ before calling SSL_new();
*** end Note ***
yaSSL Release notes, version 2.4.4 (8/8/2017)
This release of yaSSL fixes an interop issue. A fix for detecting cipher
suites with non leading zeros is included as yaSSL only supports cipher
suites with leading zeros. Thanks for the report from Security Innovation
and Oracle.
Users interoping with other SSL stacks should update.
yaSSL Release notes, version 2.4.2 (9/22/2016)
This release of yaSSL fixes a medium security vulnerability. A fix for
potential AES side channel leaks is included that a local user monitoring
......
/*
Copyright (c) 2005, 2014, Oracle and/or its affiliates.
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -34,7 +35,7 @@
#include "rsa.h"
#define YASSL_VERSION "2.4.2"
#define YASSL_VERSION "2.4.4"
#if defined(__cplusplus)
......
/*
Copyright (c) 2005, 2014, Oracle and/or its affiliates
Copyright (c) 2005, 2017, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
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)
ssl.SetError(badVersion_error);
return;
}
if (cipher_suite_[0] != 0x00) {
ssl.SetError(unknown_cipher);
return;
}
ssl.set_pending(cipher_suite_[1]);
ssl.set_random(random_, server_end);
if (id_len_)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment