diff options
Diffstat (limited to 'sql/slave.h')
-rw-r--r-- | sql/slave.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/slave.h b/sql/slave.h index 311368a4b82..d04c0c13c23 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -16,8 +16,14 @@ typedef struct st_master_info pthread_mutex_t lock; pthread_cond_t cond; bool inited; + bool virtual_master; // for replay of binlogs from a directory + MYSQL_LOG vm_binlog; + LOG_INFO vm_linfo; + IO_CACHE vm_cache; + int vm_fd; + Log_event* vm_ev; - st_master_info():pending(0),fd(-1),inited(0) + st_master_info():pending(0),fd(-1),inited(0),virtual_master(0),vm_fd(-1) { host[0] = 0; user[0] = 0; password[0] = 0; pthread_mutex_init(&lock, MY_MUTEX_INIT_FAST); @@ -28,6 +34,8 @@ typedef struct st_master_info { pthread_mutex_destroy(&lock); pthread_cond_destroy(&cond); + if(virtual_master) + close_virtual_master(); } inline void inc_pending(ulonglong val) { @@ -51,6 +59,11 @@ typedef struct st_master_info } int wait_for_pos(THD* thd, String* log_name, ulonglong log_pos); + int setup_virtual_master(); + void close_virtual_master(); + uint read_event(); + int open_log(); + } MASTER_INFO; typedef struct st_table_rule_ent |