summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-03-16 22:41:30 +0200
committermonty@mysql.com <>2004-03-16 22:41:30 +0200
commit350b4335696fc88efa2bbf2139d2f8bf9aa5701c (patch)
treeaf285d8080c003d1ecb1479ec43c9b6996fd567f /sql/repl_failsafe.cc
parent861bf3c8c031ea80076acb7f7466bda73b23213c (diff)
parent325f6615254c871d71d9d71bb5910a61d9a61ea2 (diff)
downloadmariadb-git-350b4335696fc88efa2bbf2139d2f8bf9aa5701c.tar.gz
merge with 4.0
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index d125c95e839..6cd07e16647 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -768,7 +768,7 @@ int load_master_data(THD* thd)
We do not want anyone messing with the slave at all for the entire
duration of the data load.
*/
- LOCK_ACTIVE_MI;
+ pthread_mutex_lock(&LOCK_active_mi);
lock_slave_threads(active_mi);
init_thread_mask(&restart_thread_mask,active_mi,0 /*not inverse*/);
if (restart_thread_mask &&
@@ -777,7 +777,7 @@ int load_master_data(THD* thd)
{
send_error(thd,error);
unlock_slave_threads(active_mi);
- UNLOCK_ACTIVE_MI;
+ pthread_mutex_unlock(&LOCK_active_mi);
return 1;
}
@@ -911,7 +911,7 @@ int load_master_data(THD* thd)
strmake(active_mi->master_log_name, row[0],
sizeof(active_mi->master_log_name));
active_mi->master_log_pos = strtoull(row[1], (char**) 0, 10);
- // don't hit the magic number
+ /* don't hit the magic number */
if (active_mi->master_log_pos < BIN_LOG_HEADER_SIZE)
active_mi->master_log_pos = BIN_LOG_HEADER_SIZE;
/*
@@ -938,7 +938,7 @@ int load_master_data(THD* thd)
{
send_error(thd, 0, "Failed purging old relay logs");
unlock_slave_threads(active_mi);
- UNLOCK_ACTIVE_MI;
+ pthread_mutex_unlock(&LOCK_active_mi);
return 1;
}
pthread_mutex_lock(&active_mi->rli.data_lock);
@@ -969,7 +969,7 @@ int load_master_data(THD* thd)
err:
unlock_slave_threads(active_mi);
- UNLOCK_ACTIVE_MI;
+ pthread_mutex_unlock(&LOCK_active_mi);
thd->proc_info = 0;
mysql_close(&mysql); // safe to call since we always do mysql_init()