diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-03-23 22:36:46 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-03-23 22:36:46 +0100 |
commit | f67a2211ec48b1b1502a7095c50cd9195d8235f8 (patch) | |
tree | 93e5d158a4a2a1dca4be915f8cf9dc79b3b6d96c /sql/log_event.cc | |
parent | a75d26946423d2142921411bf7bdc731eba4df1a (diff) | |
parent | 2783fc7d14bc8ad16acfeb509d3b19615023f47a (diff) | |
download | mariadb-git-f67a2211ec48b1b1502a7095c50cd9195d8235f8.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 78a351e1a9e..b56a9e2aee3 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1392,9 +1392,9 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet, if (packet->append(file, data_len - LOG_EVENT_MINIMAL_HEADER_LEN)) { /* - Fatal error occured when appending rest of the event + Fatal error occurred when appending rest of the event to packet, possible failures: - 1. EOF occured when reading from file, it's really an error + 1. EOF occurred when reading from file, it's really an error as there's supposed to be more bytes available. file->error will have been set to number of bytes left to read 2. Read was interrupted, file->error would normally be set to -1 @@ -4428,6 +4428,15 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, if (thd->m_digest != NULL) thd->m_digest->reset(thd->m_token_array, max_digest_length); + if (thd->slave_thread) + { + /* + The opt_log_slow_slave_statements variable can be changed + dynamically, so we have to set the sql_log_slow respectively. + */ + thd->variables.sql_log_slow= opt_log_slow_slave_statements; + } + thd->enable_slow_log= thd->variables.sql_log_slow; mysql_parse(thd, thd->query(), thd->query_length(), &parser_state, FALSE); @@ -7464,6 +7473,7 @@ bool slave_execute_deferred_events(THD *thd) return res; res= rgi->deferred_events->execute(rgi); + rgi->deferred_events->rewind(); return res; } @@ -11476,7 +11486,10 @@ Rows_log_event::write_row(rpl_group_info *rgi, /* unpack row into table->record[0] */ if ((error= unpack_current_row(rgi))) + { + table->file->print_error(error, MYF(0)); DBUG_RETURN(error); + } if (m_curr_row == m_rows_buf && !invoke_triggers) { @@ -12484,8 +12497,8 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi) We need to read the second image in the event of error to be able to skip to the next pair of updates */ - m_curr_row= m_curr_row_end; - unpack_current_row(rgi, &m_cols_ai); + if ((m_curr_row= m_curr_row_end)) + unpack_current_row(rgi, &m_cols_ai); thd_proc_info(thd, tmp); return error; } |