summaryrefslogtreecommitdiff
path: root/sql/events.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-06-19 14:27:53 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-06-19 14:27:53 +0300
commitfe593bf1ab939bf11827d0ab14ebb69387d9358c (patch)
treefc28fda969044b7b483e45355fc385e45f8554d3 /sql/events.cc
parentdb17ac9f072fd3d0a5dfa929fda1ad5429200370 (diff)
downloadmariadb-git-fe593bf1ab939bf11827d0ab14ebb69387d9358c.tar.gz
Bug #26418: Slave out of sync after
CREATE/DROP TEMPORARY TABLE + ROLLBACK on master The transaction ability of the storage engines of the tables on the replication master and the replication slave must generally be the same. When the storage engine type of the slave is non-transactional then transactions on the master that mix update of transactional and non-transactional tables should be avoided because they will cause inconsistency of the data between the master's transactional table and the slave's non-transactional table. The effect described by this bug is actually expected. A detailed test case is added (to be merged later to the updated rpl_ddl.test), as there was no coverage by the existing tests. Some code cleanup is also added by this change. mysql-test/r/rpl_innodb.result: Bug #26418: test case mysql-test/t/rpl_innodb.test: Bug #26418: test case sql/events.cc: Bug #26418: replace repeating code with a function call sql/sp.cc: Bug #26418: replace repeating code with a function call sql/sql_acl.cc: Bug #26418: replace repeating code with a function call sql/sql_class.cc: Bug #26418: remove dead code sql/sql_class.h: Bug #26418: remove dead code sql/sql_delete.cc: Bug #26418: replace repeating code with a function call sql/sql_parse.cc: Bug #26418: replace repeating code with a function call sql/sql_rename.cc: Bug #26418: replace repeating code with a function call sql/sql_tablespace.cc: Bug #26418: replace repeating code with a function call sql/sql_trigger.cc: Bug #26418: replace repeating code with a function call sql/sql_udf.cc: Bug #26418: replace repeating code with a function call sql/sql_view.cc: Bug #26418: replace repeating code with a function call
Diffstat (limited to 'sql/events.cc')
-rw-r--r--sql/events.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/sql/events.cc b/sql/events.cc
index 7838972a5d6..2d1b3c59a4c 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -425,12 +425,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data,
event_queue->create_event(thd, new_element, &created);
/* Binlog the create event. */
DBUG_ASSERT(thd->query && thd->query_length);
- if (mysql_bin_log.is_open())
- {
- thd->clear_error();
- thd->binlog_query(THD::MYSQL_QUERY_TYPE,
- thd->query, thd->query_length, FALSE, FALSE);
- }
+ write_bin_log(thd, TRUE, thd->query, thd->query_length);
}
}
pthread_mutex_unlock(&LOCK_event_metadata);
@@ -551,12 +546,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data,
new_element);
/* Binlog the alter event. */
DBUG_ASSERT(thd->query && thd->query_length);
- if (mysql_bin_log.is_open())
- {
- thd->clear_error();
- thd->binlog_query(THD::MYSQL_QUERY_TYPE,
- thd->query, thd->query_length, FALSE, FALSE);
- }
+ write_bin_log(thd, TRUE, thd->query, thd->query_length);
}
}
pthread_mutex_unlock(&LOCK_event_metadata);
@@ -631,12 +621,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists)
event_queue->drop_event(thd, dbname, name);
/* Binlog the drop event. */
DBUG_ASSERT(thd->query && thd->query_length);
- if (mysql_bin_log.is_open())
- {
- thd->clear_error();
- thd->binlog_query(THD::MYSQL_QUERY_TYPE,
- thd->query, thd->query_length, FALSE, FALSE);
- }
+ write_bin_log(thd, TRUE, thd->query, thd->query_length);
}
pthread_mutex_unlock(&LOCK_event_metadata);
DBUG_RETURN(ret);