Commit f2ccfcac authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Merge branch '10.1' into 10.2

parents ac3e3e12 599a0609
...@@ -93,7 +93,7 @@ ENDIF() ...@@ -93,7 +93,7 @@ ENDIF()
######################################################################## ########################################################################
# xbstream binary # mbstream binary
######################################################################## ########################################################################
MYSQL_ADD_EXECUTABLE(mbstream MYSQL_ADD_EXECUTABLE(mbstream
ds_buffer.cc ds_buffer.cc
......
...@@ -586,8 +586,8 @@ static struct my_option ibx_long_options[] = ...@@ -586,8 +586,8 @@ static struct my_option ibx_long_options[] =
{"stream", OPT_STREAM, "This option specifies the format in which to " {"stream", OPT_STREAM, "This option specifies the format in which to "
"do the streamed backup. The option accepts a string argument. The " "do the streamed backup. The option accepts a string argument. The "
"backup will be done to STDOUT in the specified format. Currently, " "backup will be done to STDOUT in the specified format. Currently, "
"the only supported formats are tar and xbstream. This option is " "the only supported formats are tar and mbstream/xbstream. This "
"passed directly to xtrabackup's --stream option.", "option is passed directly to xtrabackup's --stream option.",
(uchar*) &ibx_xtrabackup_stream_str, (uchar*) &ibx_xtrabackup_stream_str,
(uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR, (uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -655,7 +655,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu ...@@ -655,7 +655,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu
[--include=REGEXP] [--user=NAME]\n\ [--include=REGEXP] [--user=NAME]\n\
[--password=WORD] [--port=PORT] [--socket=SOCKET]\n\ [--password=WORD] [--port=PORT] [--socket=SOCKET]\n\
[--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\ [--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\
[--slave-info] [--galera-info] [--stream=tar|xbstream]\n\ [--slave-info] [--galera-info] [--stream=tar|mbstream|xbstream]\n\
[--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\ [--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\
[--databases=LIST] [--no-lock] \n\ [--databases=LIST] [--no-lock] \n\
[--tmpdir=DIRECTORY] [--tables-file=FILE]\n\ [--tmpdir=DIRECTORY] [--tables-file=FILE]\n\
...@@ -751,7 +751,8 @@ ibx_get_one_option(int optid, ...@@ -751,7 +751,8 @@ ibx_get_one_option(int optid,
} }
break; break;
case OPT_STREAM: case OPT_STREAM:
if (!strcasecmp(argument, "xbstream")) if (!strcasecmp(argument, "mbstream") ||
!strcasecmp(argument, "xbstream"))
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
else { else {
ibx_msg("Invalid --stream argument: %s\n", argument); ibx_msg("Invalid --stream argument: %s\n", argument);
......
...@@ -909,7 +909,7 @@ struct my_option xb_client_options[] = ...@@ -909,7 +909,7 @@ struct my_option xb_client_options[] =
{"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output " {"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output "
"in the specified format." "in the specified format."
"Supported format is 'xbstream'." "Supported format is 'mbstream' or 'xbstream'."
, ,
(G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR, (G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -1718,7 +1718,8 @@ xb_get_one_option(int optid, ...@@ -1718,7 +1718,8 @@ xb_get_one_option(int optid,
xtrabackup_target_dir= xtrabackup_real_target_dir; xtrabackup_target_dir= xtrabackup_real_target_dir;
break; break;
case OPT_XTRA_STREAM: case OPT_XTRA_STREAM:
if (!strcasecmp(argument, "xbstream")) if (!strcasecmp(argument, "mbstream") ||
!strcasecmp(argument, "xbstream"))
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
else else
{ {
......
...@@ -386,8 +386,8 @@ read_cnf() ...@@ -386,8 +386,8 @@ read_cnf()
get_stream() get_stream()
{ {
if [[ $sfmt == 'xbstream' ]];then if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then
wsrep_log_info "Streaming with xbstream" wsrep_log_info "Streaming with ${sfmt}"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
strmcmd="${XBSTREAM_BIN} -x" strmcmd="${XBSTREAM_BIN} -x"
else else
......
...@@ -6731,7 +6731,7 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len, ...@@ -6731,7 +6731,7 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len,
{ {
DBUG_ENTER("Load_log_event::copy_log_event"); DBUG_ENTER("Load_log_event::copy_log_event");
uint data_len; uint data_len;
if ((int) event_len < body_offset) if ((int) event_len <= body_offset)
DBUG_RETURN(1); DBUG_RETURN(1);
char* buf_end = (char*)buf + event_len; char* buf_end = (char*)buf + event_len;
/* this is the beginning of the post-header */ /* this is the beginning of the post-header */
...@@ -10373,6 +10373,12 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, ...@@ -10373,6 +10373,12 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
uint8 const post_header_len= description_event->post_header_len[event_type-1]; uint8 const post_header_len= description_event->post_header_len[event_type-1];
if (event_len < (uint)(common_header_len + post_header_len))
{
m_cols.bitmap= 0;
DBUG_VOID_RETURN;
}
DBUG_PRINT("enter",("event_len: %u common_header_len: %d " DBUG_PRINT("enter",("event_len: %u common_header_len: %d "
"post_header_len: %d", "post_header_len: %d",
event_len, common_header_len, event_len, common_header_len,
...@@ -11994,6 +12000,7 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len, ...@@ -11994,6 +12000,7 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len,
const char *post_start= buf + common_header_len; const char *post_start= buf + common_header_len;
post_start+= TM_MAPID_OFFSET; post_start+= TM_MAPID_OFFSET;
VALIDATE_BYTES_READ(post_start, buf, event_len);
if (post_header_len == 6) if (post_header_len == 6)
{ {
/* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */ /* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */
......
...@@ -2193,7 +2193,15 @@ class Query_compressed_log_event:public Query_log_event{ ...@@ -2193,7 +2193,15 @@ class Query_compressed_log_event:public Query_log_event{
****************************************************************************/ ****************************************************************************/
struct sql_ex_info struct sql_ex_info
{ {
sql_ex_info() {} /* Remove gcc warning */ sql_ex_info():
cached_new_format(-1),
field_term_len(0),
enclosed_len(0),
line_term_len(0),
line_start_len(0),
escaped_len(0),
empty_flags(0)
{} /* Remove gcc warning */
const char* field_term; const char* field_term;
const char* enclosed; const char* enclosed;
const char* line_term; const char* line_term;
......
...@@ -628,7 +628,6 @@ int wsrep_init() ...@@ -628,7 +628,6 @@ int wsrep_init()
{ {
// enable normal operation in case no provider is specified // enable normal operation in case no provider is specified
wsrep_ready_set(TRUE); wsrep_ready_set(TRUE);
wsrep_inited= 1;
global_system_variables.wsrep_on = 0; global_system_variables.wsrep_on = 0;
wsrep_init_args args; wsrep_init_args args;
args.logger_cb = wsrep_log_cb; args.logger_cb = wsrep_log_cb;
...@@ -639,10 +638,15 @@ int wsrep_init() ...@@ -639,10 +638,15 @@ int wsrep_init()
{ {
DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode)); DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode));
WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode); WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode);
wsrep_ready_set(FALSE);
wsrep->free(wsrep); wsrep->free(wsrep);
free(wsrep); free(wsrep);
wsrep = NULL; wsrep = NULL;
} }
else
{
wsrep_inited= 1;
}
return rcode; return rcode;
} }
else else
......
Markdown is supported
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