summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@dator8>2010-10-28 16:31:21 +0200
committerMikael Ronstrom <mikael@dator8>2010-10-28 16:31:21 +0200
commit99cd83f6309e39e200e4667ede5dbeb3ea2cb76b (patch)
tree7920fd2c20fdf0cf2b4d35dfde3e7f9ad35cfa5b /sql/rpl_rli.cc
parentc69df74959d48f8548b092648dac1306ee5c8085 (diff)
downloadmariadb-git-99cd83f6309e39e200e4667ede5dbeb3ea2cb76b.tar.gz
Added THD wait state for MASTER POS WAIT
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index af9b452acd8..d02aadee701 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -26,6 +26,8 @@
#include "rpl_utility.h"
#include "transaction.h"
#include "sql_parse.h" // end_trans, ROLLBACK
+#include <mysql/plugin.h>
+#include <mysql/service_thd_wait.h>
static int count_relay_log_space(Relay_log_info* rli);
@@ -792,6 +794,7 @@ int Relay_log_info::wait_for_pos(THD* thd, String* log_name,
We are going to mysql_cond_(timed)wait(); if the SQL thread stops it
will wake us up.
*/
+ thd_wait_begin(thd, THD_WAIT_BINLOG);
if (timeout > 0)
{
/*
@@ -809,6 +812,7 @@ int Relay_log_info::wait_for_pos(THD* thd, String* log_name,
}
else
mysql_cond_wait(&data_cond, &data_lock);
+ thd_wait_end(thd);
DBUG_PRINT("info",("Got signal of master update or timed out"));
if (error == ETIMEDOUT || error == ETIME)
{