summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorunknown <lars@mysql.com>2005-09-02 11:01:00 +0200
committerunknown <lars@mysql.com>2005-09-02 11:01:00 +0200
commita03acb3cb563d1fca182d358f2eb69890ca6ef4e (patch)
tree81b10f3950722872a2190f12419c6a2e89d7f6d2 /sql/log_event.cc
parentb287e9e5202cdf8c5f7b1fe3f8fad4b3d0d3e05b (diff)
parentee436f7c4a18e66c0195376b71289075ce88ec1e (diff)
downloadmariadb-git-a03acb3cb563d1fca182d358f2eb69890ca6ef4e.tar.gz
Merge mysql.com:/users/lthalmann/bk/mysql-4.1
into mysql.com:/users/lthalmann/bk/mysql-5.0 mysql-test/t/rpl_replicate_do.test: Auto merged scripts/Makefile.am: Auto merged Makefile.am: Manual merge mysql-test/r/rpl_replicate_do.result: Manual merge sql/log_event.cc: Manual merge sql/sql_parse.cc: Manual merge
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index e7eb9c7bda6..5cb4c289a10 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1554,6 +1554,16 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli, const char *query
clear_all_errors(thd, rli);
+ /*
+ Note: We do not need to execute reset_one_shot_variables() if this
+ db_ok() test fails.
+ Reason: The db stored in binlog events is the same for SET and for
+ its companion query. If the SET is ignored because of
+ db_ok(), the companion query will also be ignored, and if
+ the companion query is ignored in the db_ok() test of
+ ::exec_event(), then the companion SET also have so we
+ don't need to reset_one_shot_variables().
+ */
if (db_ok(thd->db, replicate_do_db, replicate_ignore_db))
{
thd->set_time((time_t)when);
@@ -2703,6 +2713,16 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
Create_file_log_event::exec_event() and then discarding Append_block and
al. Another way is do the filtering in the I/O thread (more efficient: no
disk writes at all).
+
+
+ Note: We do not need to execute reset_one_shot_variables() if this
+ db_ok() test fails.
+ Reason: The db stored in binlog events is the same for SET and for
+ its companion query. If the SET is ignored because of
+ db_ok(), the companion query will also be ignored, and if
+ the companion query is ignored in the db_ok() test of
+ ::exec_event(), then the companion SET also have so we
+ don't need to reset_one_shot_variables().
*/
if (db_ok(thd->db, replicate_do_db, replicate_ignore_db))
{