summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-05-31 11:26:58 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-05-31 11:26:58 +0800
commit5dd1abae7d2f9e56d1c3f54077057bd92387a600 (patch)
tree0c755db7145113fab3cace82e3536f6829a30360 /sql/log_event.cc
parent4cfc9d771a606117f37e543c1a117887cc58ec40 (diff)
downloadmariadb-git-5dd1abae7d2f9e56d1c3f54077057bd92387a600.tar.gz
BUG#43263 BEGIN skipped in some replicate-do-db cases
BEGIN/COMMIT/ROLLBACK was subject to replication db rules, and caused the boundary of a transaction not recognized correctly when these queries were ignored by the rules. Fixed the problem by skipping replication db rules for these statements. sql/log_event.cc: Skip checking replication db rules for BEGIN/COMMIT/ROLLBACK statements
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 3912308cafa..a440f010fa5 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1953,7 +1953,10 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli,
::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))
+ if (!strncmp(query_arg, "BEGIN", q_len_arg) ||
+ !strncmp(query_arg, "COMMIT", q_len_arg) ||
+ !strncmp(query_arg, "ROLLBACK", q_len_arg) ||
+ db_ok(thd->db, replicate_do_db, replicate_ignore_db))
{
thd->set_time((time_t)when);
thd->query_length= q_len_arg;