summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-03-22 16:28:51 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-03-22 16:28:51 +0300
commit074583a730d62d616061f06e810c0dfdf4aeddcc (patch)
tree1fef9d45dab47fa4d783abace538a791c958b006 /sql/slave.cc
parent5d407d0c1aa8a7cb5f18a5a26cb517f8b4eb84fa (diff)
parenta35418784bc35f5b6c461689c954bdcfbb4c9b33 (diff)
downloadmariadb-git-074583a730d62d616061f06e810c0dfdf4aeddcc.tar.gz
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts: Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test Text conflict in sql/item_func.cc
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc33
1 files changed, 30 insertions, 3 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 60fd66382a9..9ad382a5cd0 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -45,6 +45,7 @@
#ifdef HAVE_REPLICATION
#include "rpl_tblmap.h"
+#include "debug_sync.h"
#define FLAGSTR(V,F) ((V)&(F)?#F" ":"")
@@ -1213,7 +1214,16 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
unavailable (very old master not supporting UNIX_TIMESTAMP()?).
*/
- DBUG_SYNC_POINT("debug_lock.before_get_UNIX_TIMESTAMP", 10);
+ DBUG_EXECUTE_IF("dbug.before_get_UNIX_TIMESTAMP",
+ {
+ const char act[]=
+ "now "
+ "wait_for signal.get_unix_timestamp";
+ DBUG_ASSERT(opt_debug_sync_timeout > 0);
+ DBUG_ASSERT(!debug_sync_set_action(current_thd,
+ STRING_WITH_LEN(act)));
+ };);
+
master_res= NULL;
if (!mysql_real_query(mysql, STRING_WITH_LEN("SELECT UNIX_TIMESTAMP()")) &&
(master_res= mysql_store_result(mysql)) &&
@@ -1252,7 +1262,15 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
Note: we could have put a @@SERVER_ID in the previous SELECT
UNIX_TIMESTAMP() instead, but this would not have worked on 3.23 masters.
*/
- DBUG_SYNC_POINT("debug_lock.before_get_SERVER_ID", 10);
+ DBUG_EXECUTE_IF("dbug.before_get_SERVER_ID",
+ {
+ const char act[]=
+ "now "
+ "wait_for signal.get_server_id";
+ DBUG_ASSERT(opt_debug_sync_timeout > 0);
+ DBUG_ASSERT(!debug_sync_set_action(current_thd,
+ STRING_WITH_LEN(act)));
+ };);
master_res= NULL;
master_row= NULL;
if (!mysql_real_query(mysql,
@@ -2877,7 +2895,16 @@ pthread_handler_t handle_slave_io(void *arg)
connected:
- DBUG_SYNC_POINT("debug_lock.before_get_running_status_yes", 10);
+ DBUG_EXECUTE_IF("dbug.before_get_running_status_yes",
+ {
+ const char act[]=
+ "now "
+ "wait_for signal.io_thread_let_running";
+ DBUG_ASSERT(opt_debug_sync_timeout > 0);
+ DBUG_ASSERT(!debug_sync_set_action(thd,
+ STRING_WITH_LEN(act)));
+ };);
+
// TODO: the assignment below should be under mutex (5.0)
mi->slave_running= MYSQL_SLAVE_RUN_CONNECT;
thd->slave_net = &mysql->net;