diff options
-rw-r--r-- | extra/mariabackup/CMakeLists.txt | 2 | ||||
-rw-r--r-- | extra/mariabackup/innobackupex.cc | 9 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 5 | ||||
-rw-r--r-- | scripts/wsrep_sst_mariabackup.sh | 4 | ||||
-rw-r--r-- | sql/log_event.cc | 9 | ||||
-rw-r--r-- | sql/log_event.h | 10 | ||||
-rw-r--r-- | sql/wsrep_mysqld.cc | 6 |
7 files changed, 33 insertions, 12 deletions
diff --git a/extra/mariabackup/CMakeLists.txt b/extra/mariabackup/CMakeLists.txt index 8562ded85a1..fd3ebd68d64 100644 --- a/extra/mariabackup/CMakeLists.txt +++ b/extra/mariabackup/CMakeLists.txt @@ -93,7 +93,7 @@ ENDIF() ######################################################################## -# xbstream binary +# mbstream binary ######################################################################## MYSQL_ADD_EXECUTABLE(mbstream ds_buffer.cc diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc index 952d1f4ec63..f1627dd1bc5 100644 --- a/extra/mariabackup/innobackupex.cc +++ b/extra/mariabackup/innobackupex.cc @@ -586,8 +586,8 @@ static struct my_option ibx_long_options[] = {"stream", OPT_STREAM, "This option specifies the format in which to " "do the streamed backup. The option accepts a string argument. The " "backup will be done to STDOUT in the specified format. Currently, " - "the only supported formats are tar and xbstream. This option is " - "passed directly to xtrabackup's --stream option.", + "the only supported formats are tar and mbstream/xbstream. This " + "option is passed directly to xtrabackup's --stream option.", (uchar*) &ibx_xtrabackup_stream_str, (uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -655,7 +655,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu [--include=REGEXP] [--user=NAME]\n\ [--password=WORD] [--port=PORT] [--socket=SOCKET]\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\ [--databases=LIST] [--no-lock] \n\ [--tmpdir=DIRECTORY] [--tables-file=FILE]\n\ @@ -751,7 +751,8 @@ ibx_get_one_option(int optid, } break; case OPT_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { ibx_msg("Invalid --stream argument: %s\n", argument); diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 73318d121fd..d5e5fc49e75 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -909,7 +909,7 @@ struct my_option xb_client_options[] = {"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output " "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, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1718,7 +1718,8 @@ xb_get_one_option(int optid, xtrabackup_target_dir= xtrabackup_real_target_dir; break; case OPT_XTRA_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 55111b00ff9..4eb9917d341 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -386,8 +386,8 @@ read_cnf() get_stream() { - if [[ $sfmt == 'xbstream' ]];then - wsrep_log_info "Streaming with xbstream" + if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then + wsrep_log_info "Streaming with ${sfmt}" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then strmcmd="${XBSTREAM_BIN} -x" else diff --git a/sql/log_event.cc b/sql/log_event.cc index 1778cfbcda5..d5066fdabdf 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -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"); uint data_len; - if ((int) event_len < body_offset) + if ((int) event_len <= body_offset) DBUG_RETURN(1); char* buf_end = (char*)buf + event_len; /* this is the beginning of the post-header */ @@ -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]; + 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 " "post_header_len: %d", event_len, common_header_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; post_start+= TM_MAPID_OFFSET; + VALIDATE_BYTES_READ(post_start, buf, event_len); if (post_header_len == 6) { /* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */ diff --git a/sql/log_event.h b/sql/log_event.h index 368d9616daf..863d81c047a 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2193,7 +2193,15 @@ public: ****************************************************************************/ 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* enclosed; const char* line_term; diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index cfcc04bff2c..ba6c2d24f77 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -628,7 +628,6 @@ int wsrep_init() { // enable normal operation in case no provider is specified wsrep_ready_set(TRUE); - wsrep_inited= 1; global_system_variables.wsrep_on = 0; wsrep_init_args args; args.logger_cb = wsrep_log_cb; @@ -639,10 +638,15 @@ int wsrep_init() { DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode)); WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode); + wsrep_ready_set(FALSE); wsrep->free(wsrep); free(wsrep); wsrep = NULL; } + else + { + wsrep_inited= 1; + } return rcode; } else |