Skip to content

Commit f2ccfca

Browse files
committed
Merge branch '10.1' into 10.2
2 parents ac3e3e1 + 599a060 commit f2ccfca

File tree

7 files changed

+33
-12
lines changed

7 files changed

+33
-12
lines changed

extra/mariabackup/CMakeLists.txt

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

9494

9595
########################################################################
96-
# xbstream binary
96+
# mbstream binary
9797
########################################################################
9898
MYSQL_ADD_EXECUTABLE(mbstream
9999
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
@@ -909,7 +909,7 @@ struct my_option xb_client_options[] =
909909

910910
{"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output "
911911
"in the specified format."
912-
"Supported format is 'xbstream'."
912+
"Supported format is 'mbstream' or 'xbstream'."
913913
,
914914
(G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR,
915915
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1718,7 +1718,8 @@ xb_get_one_option(int optid,
17181718
xtrabackup_target_dir= xtrabackup_real_target_dir;
17191719
break;
17201720
case OPT_XTRA_STREAM:
1721-
if (!strcasecmp(argument, "xbstream"))
1721+
if (!strcasecmp(argument, "mbstream") ||
1722+
!strcasecmp(argument, "xbstream"))
17221723
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
17231724
else
17241725
{

scripts/wsrep_sst_mariabackup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ read_cnf()
386386

387387
get_stream()
388388
{
389-
if [[ $sfmt == 'xbstream' ]];then
390-
wsrep_log_info "Streaming with xbstream"
389+
if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then
390+
wsrep_log_info "Streaming with ${sfmt}"
391391
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
392392
strmcmd="${XBSTREAM_BIN} -x"
393393
else

sql/log_event.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6731,7 +6731,7 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len,
67316731
{
67326732
DBUG_ENTER("Load_log_event::copy_log_event");
67336733
uint data_len;
6734-
if ((int) event_len < body_offset)
6734+
if ((int) event_len <= body_offset)
67356735
DBUG_RETURN(1);
67366736
char* buf_end = (char*)buf + event_len;
67376737
/* this is the beginning of the post-header */
@@ -10373,6 +10373,12 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len,
1037310373

1037410374
uint8 const post_header_len= description_event->post_header_len[event_type-1];
1037510375

10376+
if (event_len < (uint)(common_header_len + post_header_len))
10377+
{
10378+
m_cols.bitmap= 0;
10379+
DBUG_VOID_RETURN;
10380+
}
10381+
1037610382
DBUG_PRINT("enter",("event_len: %u common_header_len: %d "
1037710383
"post_header_len: %d",
1037810384
event_len, common_header_len,
@@ -11994,6 +12000,7 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len,
1199412000
const char *post_start= buf + common_header_len;
1199512001

1199612002
post_start+= TM_MAPID_OFFSET;
12003+
VALIDATE_BYTES_READ(post_start, buf, event_len);
1199712004
if (post_header_len == 6)
1199812005
{
1199912006
/* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */

sql/log_event.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,15 @@ class Query_compressed_log_event:public Query_log_event{
21932193
****************************************************************************/
21942194
struct sql_ex_info
21952195
{
2196-
sql_ex_info() {} /* Remove gcc warning */
2196+
sql_ex_info():
2197+
cached_new_format(-1),
2198+
field_term_len(0),
2199+
enclosed_len(0),
2200+
line_term_len(0),
2201+
line_start_len(0),
2202+
escaped_len(0),
2203+
empty_flags(0)
2204+
{} /* Remove gcc warning */
21972205
const char* field_term;
21982206
const char* enclosed;
21992207
const char* line_term;

sql/wsrep_mysqld.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ int wsrep_init()
628628
{
629629
// enable normal operation in case no provider is specified
630630
wsrep_ready_set(TRUE);
631-
wsrep_inited= 1;
632631
global_system_variables.wsrep_on = 0;
633632
wsrep_init_args args;
634633
args.logger_cb = wsrep_log_cb;
@@ -639,10 +638,15 @@ int wsrep_init()
639638
{
640639
DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode));
641640
WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode);
641+
wsrep_ready_set(FALSE);
642642
wsrep->free(wsrep);
643643
free(wsrep);
644644
wsrep = NULL;
645645
}
646+
else
647+
{
648+
wsrep_inited= 1;
649+
}
646650
return rcode;
647651
}
648652
else

0 commit comments

Comments
 (0)