diff options
author | lars@mysql.com <> | 2005-09-01 17:58:00 +0200 |
---|---|---|
committer | lars@mysql.com <> | 2005-09-01 17:58:00 +0200 |
commit | 9dd14fc38132022fa527076a75512d8a4b38ca39 (patch) | |
tree | ab7c761fb3972c2af8302d0721af4fcae4e11b85 /sql/log_event.cc | |
parent | 7fd89c85b7b326fbfcf67ed6a1f1e8c72b05029e (diff) | |
download | mariadb-git-9dd14fc38132022fa527076a75512d8a4b38ca39.tar.gz |
BUG#12542: Added comments
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 66c732e8cb0..b08439a20b8 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1008,6 +1008,16 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli) #endif 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); @@ -1762,6 +1772,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)) { |