summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorLibing Song <anders.song@greatopensource.com>2011-01-19 01:38:10 +0800
committerLibing Song <anders.song@greatopensource.com>2011-01-19 01:38:10 +0800
commit2d0fcc1d44b72f00fea057f3eaf8975d55f9c5f5 (patch)
tree48e0ff06d27977ce1e9919d20903323c7d4ffa0b /sql/sql_repl.cc
parent634b102533d948f669f0291374664ce4e8780d49 (diff)
parent5d75729c928338c2b49752b9b271ff7eb9a261ec (diff)
downloadmariadb-git-2d0fcc1d44b72f00fea057f3eaf8975d55f9c5f5.tar.gz
Manual merge
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 4e8b70c58f6..5542a0342d1 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -25,6 +25,7 @@
#include "rpl_filter.h"
#include <my_dir.h>
#include "rpl_handler.h"
+#include "debug_sync.h"
int max_binlog_dump_events = 0; // unlimited
my_bool opt_sporadic_binlog_dump_fail = 0;
@@ -693,6 +694,19 @@ impossible position";
coord->pos= uint4korr(packet->ptr() + ev_offset + LOG_POS_OFFSET);
event_type= (Log_event_type)((*packet)[LOG_EVENT_OFFSET+ev_offset]);
+ DBUG_EXECUTE_IF("dump_thread_wait_before_send_xid",
+ {
+ if (event_type == XID_EVENT)
+ {
+ net_flush(net);
+ const char act[]=
+ "now "
+ "wait_for signal.continue";
+ DBUG_ASSERT(opt_debug_sync_timeout > 0);
+ DBUG_ASSERT(!debug_sync_set_action(current_thd,
+ STRING_WITH_LEN(act)));
+ }
+ });
if (event_type == FORMAT_DESCRIPTION_EVENT)
{
binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+ev_offset] &
@@ -718,6 +732,14 @@ impossible position";
goto err;
}
+ DBUG_EXECUTE_IF("dump_thread_wait_before_send_xid",
+ {
+ if (event_type == XID_EVENT)
+ {
+ net_flush(net);
+ }
+ });
+
DBUG_PRINT("info", ("log event code %d", event_type));
if (event_type == LOAD_EVENT)
{