summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
authorunknown <mats@romeo.(none)>2006-11-10 15:10:41 +0100
committerunknown <mats@romeo.(none)>2006-11-10 15:10:41 +0100
commitbaaa102de52611e2eef0822bd129bf2ef343e4f1 (patch)
treed2bcf30804ac9fe4cbb41f7d84d8e565ef8ffe5f /sql/rpl_rli.cc
parent5bf5ccff63669bd8fcee74ecf0b1347058fb1be8 (diff)
downloadmariadb-git-baaa102de52611e2eef0822bd129bf2ef343e4f1.tar.gz
BUG#23171 (Illegal slave restart group position):
Second patch to fix skipping code. Moving relay and binary log position changing code from do_apply_event [old exec_event()] into do_update_pos() and doing other changes necessary to support that. Fixing a bug that can cause deadlock if rotating binary log when committing a changes to a transactional table that is not inside a transaction and cause a rotate log. sql/log.cc: Changing condition in binlog_commit() to skip calling binlog_end_trans() twice to match condition in binlog_end_trans(). sql/log_event.cc: Name change: apply_event_impl() -> do_apply_event() Name change: advance_coord_impl() -> do_update_pos() do_apply_event() now uses pointer to constant RELAY_LOG_INFO to prevent inadvertandly changing the position in the code. Doing this would make the skipping code loose track of where it is. All position changing code shall now be in do_update_pos(). Factoring out relay and binary log position updating code from do_apply_event() [previously exec_event()] into do_update_pos(). Using a safe approach to make it work: will refine the refactoring when the skipping code is implemented. Adding const casts where needed. Changing signature to use pointers to constant objects where needed. sql/rpl_rli.cc: Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO. Debriding code. sql/rpl_rli.h: Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO. Debriding code. sql/rpl_utility.cc: Using pointer to const RELAY_LOG_INFO to make it work with other code. sql/rpl_utility.h: Using pointer to const RELAY_LOG_INFO to make it work with other code. sql/slave.cc: Using pointer to const RELAY_LOG_INFO to make it work with other code. Adding const cast where necessary. sql/slave.h: Using pointer to const RELAY_LOG_INFO to make it work with other code.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index f01fc5d1c9e..75e4bd168ee 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -1056,30 +1056,19 @@ void st_relay_log_info::cached_charset_invalidate()
}
-bool st_relay_log_info::cached_charset_compare(char *charset)
+bool st_relay_log_info::cached_charset_compare(char *charset) const
{
DBUG_ENTER("st_relay_log_info::cached_charset_compare");
if (bcmp(cached_charset, charset, sizeof(cached_charset)))
{
- memcpy(cached_charset, charset, sizeof(cached_charset));
+ memcpy(const_cast<char*>(cached_charset), charset, sizeof(cached_charset));
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
-void st_relay_log_info::transaction_end(THD* thd)
-{
- DBUG_ENTER("st_relay_log_info::transaction_end");
-
- /*
- Nothing to do here right now.
- */
-
- DBUG_VOID_RETURN;
-}
-
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
void st_relay_log_info::cleanup_context(THD *thd, bool error)
{