summaryrefslogtreecommitdiff
path: root/sql/slave.h
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-01-17 05:47:33 -0700
committerunknown <sasha@mysql.sashanet.com>2001-01-17 05:47:33 -0700
commit4ac091636b0f366282a8a1c2ad2ff448a5c4a6f8 (patch)
tree6d77ea3fb9cae4b29069ce7d9ad832a29cd4e0b3 /sql/slave.h
parent22f568dc0d8e27442b1c0b2c5a0b6bf35c88401c (diff)
downloadmariadb-git-4ac091636b0f366282a8a1c2ad2ff448a5c4a6f8.tar.gz
rpl000016.test sync
rpl000001.result BitKeeper file /home/sasha/src/bk/mysql/mysql-test/r/rpl000001.result ignore Added BitKeeper/tmp/bkr3sAHD to the ignore list slave.h MASTER_POS_WAIT lex.h MASTER_POS_WAIT slave.cc MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in slave.cc debug abort count sql_repl.cc announce the log name at the start of the log with a fake rotate event item_create.h MASTER_POS_WAIT item_func.cc MASTER_POS_WAIT item_func.h MASTER_POS_WAIT sql_class.h enter_cond(), exit_cond() helper inliners item_create.cc added MASTER_POS_WAIT mysql-test-run.sh speed improvement fixes rpl000007.test sync rpl000003.test sleep -> sync rpl000004.test sleep -> sync, fixed clean up bug rpl000014.test sync rpl000009.test sync rpl000013.test sync rpl000001.test sleep -> sync rpl000008.test sync rpl000006.test sync on cleanup rpl000011.test sync rpl000012.test sync rpl000005.test sleep -> sync rpl000010.test sync rpl000015.test sync rpl000002.test sleep -> sync rpl000014.result we now know the master log name as soon as we connect mysql.cc added optional agrument to --wait mysqltest.c added save_master_pos and sync_with_master commands client/mysql.cc: added optional agrument to --wait client/mysqltest.c: added save_master_pos and sync_with_master commands mysql-test/mysql-test-run.sh: speed improvement fixes mysql-test/r/rpl000014.result: we now know the master log name as soon as we connect mysql-test/t/rpl000001.test: sleep -> sync mysql-test/t/rpl000002.test: sleep -> sync mysql-test/t/rpl000003.test: sleep -> sync mysql-test/t/rpl000004.test: sleep -> sync, fixed clean up bug mysql-test/t/rpl000005.test: sleep -> sync mysql-test/t/rpl000006.test: sync on cleanup mysql-test/t/rpl000007.test: sync mysql-test/t/rpl000008.test: sync mysql-test/t/rpl000009.test: sync mysql-test/t/rpl000010.test: sync mysql-test/t/rpl000011.test: sync mysql-test/t/rpl000012.test: sync mysql-test/t/rpl000013.test: sync mysql-test/t/rpl000014.test: sync mysql-test/t/rpl000015.test: sync BitKeeper/etc/ignore: Added BitKeeper/tmp/bkr3sAHD to the ignore list mysql-test/t/rpl000016.test: sync sql/item_create.cc: added MASTER_POS_WAIT sql/item_create.h: MASTER_POS_WAIT sql/item_func.cc: MASTER_POS_WAIT sql/item_func.h: MASTER_POS_WAIT sql/lex.h: MASTER_POS_WAIT sql/slave.cc: MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in debug abort count sql/slave.h: MASTER_POS_WAIT sql/sql_class.h: enter_cond(), exit_cond() helper inliners sql/sql_repl.cc: announce the log name at the start of the log with a fake rotate event
Diffstat (limited to 'sql/slave.h')
-rw-r--r--sql/slave.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/slave.h b/sql/slave.h
index c26be966fc3..b7e2d783749 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -14,17 +14,20 @@ typedef struct st_master_info
uint port;
uint connect_retry;
pthread_mutex_t lock;
+ pthread_cond_t cond;
bool inited;
st_master_info():pending(0),fd(-1),inited(0)
{
host[0] = 0; user[0] = 0; password[0] = 0;
pthread_mutex_init(&lock, NULL);
+ pthread_cond_init(&cond, NULL);
}
~st_master_info()
{
pthread_mutex_destroy(&lock);
+ pthread_cond_destroy(&cond);
}
inline void inc_pending(ulonglong val)
{
@@ -35,6 +38,7 @@ typedef struct st_master_info
pthread_mutex_lock(&lock);
pos += val + pending;
pending = 0;
+ pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&lock);
}
// thread safe read of position - not needed if we are in the slave thread,
@@ -45,6 +49,8 @@ typedef struct st_master_info
var = pos;
pthread_mutex_unlock(&lock);
}
+
+ int wait_for_pos(THD* thd, String* log_name, ulong log_pos);
} MASTER_INFO;
typedef struct st_table_rule_ent