summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authormats@mysql.com <>2004-12-03 12:13:51 +0100
committermats@mysql.com <>2004-12-03 12:13:51 +0100
commit2bbdf2403dc9b6b8b4d4803c5e81b05958ea2890 (patch)
tree9bc3bd40e4b1f44785c9ff7e39f7d045b8960d70 /sql/log_event.h
parent3455e345b2e9cd0674f3ed4abbebdbef6d5748b8 (diff)
downloadmariadb-git-2bbdf2403dc9b6b8b4d4803c5e81b05958ea2890.tar.gz
Bug#6391 (binlog-do-db rules ignored)
CREATE DATABASE statement used the current database instead of the database created when checking conditions for replication. CREATE/DROP/ALTER DATABASE statements are now replicated based on the manipulated database.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r--sql/log_event.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index 1606659e21e..8a2334e8574 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -264,6 +264,19 @@ struct sql_ex_info
*/
#define LOG_EVENT_THREAD_SPECIFIC_F 0x4
+/*
+ Suppress the generation of 'USE' statements before the actual
+ statement. This flag should be set for any events that does not need
+ the current database set to function correctly. Most notable cases
+ are 'CREATE DATABASE' and 'DROP DATABASE'.
+
+ This flags should only be used in exceptional circumstances, since
+ it introduce a significant change in behaviour regarding the
+ replication logic together with the flags --binlog-do-db and
+ --replicated-do-db.
+ */
+#define LOG_EVENT_SUPPRESS_USE_F 0x8
+
enum Log_event_type
{
UNKNOWN_EVENT= 0, START_EVENT= 1, QUERY_EVENT= 2, STOP_EVENT= 3,
@@ -331,8 +344,9 @@ public:
/*
Some 16 flags. Only one is really used now; look above for
- LOG_EVENT_TIME_F, LOG_EVENT_FORCED_ROTATE_F, LOG_EVENT_THREAD_SPECIFIC_F
- for notes.
+ LOG_EVENT_TIME_F, LOG_EVENT_FORCED_ROTATE_F,
+ LOG_EVENT_THREAD_SPECIFIC_F, and LOG_EVENT_SUPPRESS_USE_F for
+ notes.
*/
uint16 flags;
@@ -465,7 +479,7 @@ public:
#ifndef MYSQL_CLIENT
Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
- bool using_trans);
+ bool using_trans, bool suppress_use);
const char* get_db() { return db; }
#ifdef HAVE_REPLICATION
void pack_info(Protocol* protocol);