mariadb/sql/slave.h

133 lines
3.8 KiB
C
Raw Normal View History

#ifndef SLAVE_H
#define SLAVE_H
#define SLAVE_NET_TIMEOUT 3600
#define MAX_SLAVE_ERROR 2000
extern ulong slave_net_timeout, master_retry_count;
extern MY_BITMAP slave_error_mask;
extern bool use_slave_mask;
typedef struct st_master_info
{
char log_file_name[FN_REFLEN];
ulonglong pos,pending;
File fd; // we keep the file open, so we need to remember the file pointer
IO_CACHE file;
// the variables below are needed because we can change masters on the fly
char host[HOSTNAME_LENGTH+1];
char user[USERNAME_LENGTH+1];
char password[HASH_PASSWORD_LENGTH+1];
uint port;
uint connect_retry;
pthread_mutex_t lock;
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
2001-01-17 13:47:33 +01:00
pthread_cond_t cond;
bool inited;
st_master_info():pending(0),fd(-1),inited(0)
{
host[0] = 0; user[0] = 0; password[0] = 0;
Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro (For glibc 2.2) client/thread_test.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro dbug/dbug.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro heap/hp_open.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro isam/open.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro myisam/mi_open.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro mysys/thr_alarm.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro mysys/thr_lock.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro mysys/thr_rwlock.c: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/ha_berkeley.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/ha_innobase.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/hash_filo.h: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/hostname.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/item_func.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/log.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/mysqld.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/slave.h: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/sql_class.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/sql_class.h: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/sql_insert.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro sql/sql_udf.cc: Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro
2001-03-26 00:05:04 +02:00
pthread_mutex_init(&lock, MY_MUTEX_INIT_FAST);
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
2001-01-17 13:47:33 +01:00
pthread_cond_init(&cond, NULL);
}
~st_master_info()
{
pthread_mutex_destroy(&lock);
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
2001-01-17 13:47:33 +01:00
pthread_cond_destroy(&cond);
}
inline void inc_pending(ulonglong val)
{
pending += val;
}
inline void inc_pos(ulonglong val)
{
pthread_mutex_lock(&lock);
pos += val + pending;
pending = 0;
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
2001-01-17 13:47:33 +01:00
pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&lock);
}
// thread safe read of position - not needed if we are in the slave thread,
// but required otherwise
inline void read_pos(ulonglong& var)
{
pthread_mutex_lock(&lock);
var = pos;
pthread_mutex_unlock(&lock);
}
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
2001-01-17 13:47:33 +01:00
int wait_for_pos(THD* thd, String* log_name, ulonglong log_pos);
} MASTER_INFO;
typedef struct st_table_rule_ent
{
char* db;
char* tbl_name;
uint key_len;
} TABLE_RULE_ENT;
#define TABLE_RULE_HASH_SIZE 16
fixed warning in sql_class.cc added gdb support, mysqld options per test, and other cool stuff to mysql-test-run added --replicate-wild-do/ignore-table more test cases client/mysqltest.c: fixed a reject file bug mysql-test/mysql-test-run: support for gdb and running only one test case sql/mysql_priv.h: wild_compare needs to be global sql/mysqld.cc: --replicate-wild-do/ignore-table sql/slave.cc: wild,wild sql/slave.h: wild fixes sql/sql_class.cc: fixed compiler warning sql/sql_string.cc: wild stuff needs to be global BitKeeper/etc/ignore: Added BitKeeper/tmp/gone mysql-test/r/3.23/rpl mysql-test/r/3.23/rpl.reject mysql-test/var/lib/bar/bar.frm mysql-test/var/lib/bar/bar.MYD mysql-test/var/lib/bar/bar.MYI mysql-test/var/lib/foo/foo.frm mysql-test/var/lib/foo/foo.MYD mysql-test/var/lib/foo/foo.MYI mysql-test/var/lib/test/bar.frm mysql-test/var/lib/test/bar.MYD mysql-test/var/lib/test/bar.MYI mysql-test/var/lib/test/choo.frm mysql-test/var/lib/test/choo.MYD mysql-test/var/lib/test/choo.MYI mysql-test/var/slave-data/bar/bar.frm mysql-test/var/slave-data/bar/bar.MYD mysql-test/var/slave-data/bar/bar.MYI mysql-test/var/slave-data/foo/foo.frm mysql-test/var/slave-data/foo/foo.MYD mysql-test/var/slave-data/foo/foo.MYI mysql-test/var/slave-data/test/bar.frm mysql-test/var/slave-data/test/bar.MYD mysql-test/var/slave-data/test/bar.MYI mysql-test/var/slave-data/test/choo.frm mysql-test/var/slave-data/test/choo.MYD mysql-test/var/slave-data/test/choo.MYI mysql-test/var/tmp/README to the ignore list
2000-11-21 07:38:08 +01:00
#define TABLE_RULE_ARR_SIZE 16
int flush_master_info(MASTER_INFO* mi);
int mysql_table_dump(THD* thd, char* db, char* tbl_name, int fd = -1);
// if fd is -1, dump to NET
int fetch_nx_table(THD* thd, MASTER_INFO* mi);
// retrieve non-exitent table from master
// the caller must set thd->last_nx_table and thd->last_nx_db first
int show_master_info(THD* thd);
int show_binlog_info(THD* thd);
repl-tests/test-repl-ts/repl-timestamp.master.reject this file needs to be deleted sql/log_event.cc fixed warnings sql/log_event.h fixed () #define bug sql/mysqlbinlog.cc fixed length argument - was supposed to be one less sql/mysqld.cc replicate-do/ignore-table now works, wild does not yet sql/mysql_priv.h updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/slave.cc changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h changes for replicate-do/ignore-table sql/sql_class.cc slave_thread variable to THD sql/sql_class.h added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc updating argument to add_tables_to_list() sql/sql_table.cc fixed bug in mysql_rm_table() sql/sql_yacc.yy fixed up add_table_to_list() calls to accept updating argument sql/table.h added updating to TABLE_LIST repl-tests/test-repl-ts/repl-timestamp.master.reject: this file needs to be deleted sql/log_event.cc: fixed warnings sql/log_event.h: fixed () #define bug sql/mysql_priv.h: updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/mysqlbinlog.cc: fixed length argument - was supposed to be one less sql/mysqld.cc: replicate-do/ignore-table now works, wild does not yet sql/slave.cc: changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h: changes for replicate-do/ignore-table sql/sql_class.cc: slave_thread variable to THD sql/sql_class.h: added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc: updating argument to add_tables_to_list() sql/sql_table.cc: fixed bug in mysql_rm_table() sql/sql_yacc.yy: fixed up add_table_to_list() calls to accept updating argument sql/table.h: added updating to TABLE_LIST
2000-11-14 07:43:02 +01:00
int tables_ok(THD* thd, TABLE_LIST* tables);
// see if the query uses any tables that should not be replicated
int db_ok(const char* db, I_List<i_string> &do_list,
I_List<i_string> &ignore_list );
// check to see if the database is ok to operate on with respect to the
// do and ignore lists - used in replication
repl-tests/test-repl-ts/repl-timestamp.master.reject this file needs to be deleted sql/log_event.cc fixed warnings sql/log_event.h fixed () #define bug sql/mysqlbinlog.cc fixed length argument - was supposed to be one less sql/mysqld.cc replicate-do/ignore-table now works, wild does not yet sql/mysql_priv.h updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/slave.cc changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h changes for replicate-do/ignore-table sql/sql_class.cc slave_thread variable to THD sql/sql_class.h added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc updating argument to add_tables_to_list() sql/sql_table.cc fixed bug in mysql_rm_table() sql/sql_yacc.yy fixed up add_table_to_list() calls to accept updating argument sql/table.h added updating to TABLE_LIST repl-tests/test-repl-ts/repl-timestamp.master.reject: this file needs to be deleted sql/log_event.cc: fixed warnings sql/log_event.h: fixed () #define bug sql/mysql_priv.h: updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/mysqlbinlog.cc: fixed length argument - was supposed to be one less sql/mysqld.cc: replicate-do/ignore-table now works, wild does not yet sql/slave.cc: changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h: changes for replicate-do/ignore-table sql/sql_class.cc: slave_thread variable to THD sql/sql_class.h: added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc: updating argument to add_tables_to_list() sql/sql_table.cc: fixed bug in mysql_rm_table() sql/sql_yacc.yy: fixed up add_table_to_list() calls to accept updating argument sql/table.h: added updating to TABLE_LIST
2000-11-14 07:43:02 +01:00
int add_table_rule(HASH* h, const char* table_spec);
fixed warning in sql_class.cc added gdb support, mysqld options per test, and other cool stuff to mysql-test-run added --replicate-wild-do/ignore-table more test cases client/mysqltest.c: fixed a reject file bug mysql-test/mysql-test-run: support for gdb and running only one test case sql/mysql_priv.h: wild_compare needs to be global sql/mysqld.cc: --replicate-wild-do/ignore-table sql/slave.cc: wild,wild sql/slave.h: wild fixes sql/sql_class.cc: fixed compiler warning sql/sql_string.cc: wild stuff needs to be global BitKeeper/etc/ignore: Added BitKeeper/tmp/gone mysql-test/r/3.23/rpl mysql-test/r/3.23/rpl.reject mysql-test/var/lib/bar/bar.frm mysql-test/var/lib/bar/bar.MYD mysql-test/var/lib/bar/bar.MYI mysql-test/var/lib/foo/foo.frm mysql-test/var/lib/foo/foo.MYD mysql-test/var/lib/foo/foo.MYI mysql-test/var/lib/test/bar.frm mysql-test/var/lib/test/bar.MYD mysql-test/var/lib/test/bar.MYI mysql-test/var/lib/test/choo.frm mysql-test/var/lib/test/choo.MYD mysql-test/var/lib/test/choo.MYI mysql-test/var/slave-data/bar/bar.frm mysql-test/var/slave-data/bar/bar.MYD mysql-test/var/slave-data/bar/bar.MYI mysql-test/var/slave-data/foo/foo.frm mysql-test/var/slave-data/foo/foo.MYD mysql-test/var/slave-data/foo/foo.MYI mysql-test/var/slave-data/test/bar.frm mysql-test/var/slave-data/test/bar.MYD mysql-test/var/slave-data/test/bar.MYI mysql-test/var/slave-data/test/choo.frm mysql-test/var/slave-data/test/choo.MYD mysql-test/var/slave-data/test/choo.MYI mysql-test/var/tmp/README to the ignore list
2000-11-21 07:38:08 +01:00
int add_wild_table_rule(DYNAMIC_ARRAY* a, const char* table_spec);
repl-tests/test-repl-ts/repl-timestamp.master.reject this file needs to be deleted sql/log_event.cc fixed warnings sql/log_event.h fixed () #define bug sql/mysqlbinlog.cc fixed length argument - was supposed to be one less sql/mysqld.cc replicate-do/ignore-table now works, wild does not yet sql/mysql_priv.h updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/slave.cc changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h changes for replicate-do/ignore-table sql/sql_class.cc slave_thread variable to THD sql/sql_class.h added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc updating argument to add_tables_to_list() sql/sql_table.cc fixed bug in mysql_rm_table() sql/sql_yacc.yy fixed up add_table_to_list() calls to accept updating argument sql/table.h added updating to TABLE_LIST repl-tests/test-repl-ts/repl-timestamp.master.reject: this file needs to be deleted sql/log_event.cc: fixed warnings sql/log_event.h: fixed () #define bug sql/mysql_priv.h: updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/mysqlbinlog.cc: fixed length argument - was supposed to be one less sql/mysqld.cc: replicate-do/ignore-table now works, wild does not yet sql/slave.cc: changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h: changes for replicate-do/ignore-table sql/sql_class.cc: slave_thread variable to THD sql/sql_class.h: added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc: updating argument to add_tables_to_list() sql/sql_table.cc: fixed bug in mysql_rm_table() sql/sql_yacc.yy: fixed up add_table_to_list() calls to accept updating argument sql/table.h: added updating to TABLE_LIST
2000-11-14 07:43:02 +01:00
void init_table_rule_hash(HASH* h, bool* h_inited);
fixed warning in sql_class.cc added gdb support, mysqld options per test, and other cool stuff to mysql-test-run added --replicate-wild-do/ignore-table more test cases client/mysqltest.c: fixed a reject file bug mysql-test/mysql-test-run: support for gdb and running only one test case sql/mysql_priv.h: wild_compare needs to be global sql/mysqld.cc: --replicate-wild-do/ignore-table sql/slave.cc: wild,wild sql/slave.h: wild fixes sql/sql_class.cc: fixed compiler warning sql/sql_string.cc: wild stuff needs to be global BitKeeper/etc/ignore: Added BitKeeper/tmp/gone mysql-test/r/3.23/rpl mysql-test/r/3.23/rpl.reject mysql-test/var/lib/bar/bar.frm mysql-test/var/lib/bar/bar.MYD mysql-test/var/lib/bar/bar.MYI mysql-test/var/lib/foo/foo.frm mysql-test/var/lib/foo/foo.MYD mysql-test/var/lib/foo/foo.MYI mysql-test/var/lib/test/bar.frm mysql-test/var/lib/test/bar.MYD mysql-test/var/lib/test/bar.MYI mysql-test/var/lib/test/choo.frm mysql-test/var/lib/test/choo.MYD mysql-test/var/lib/test/choo.MYI mysql-test/var/slave-data/bar/bar.frm mysql-test/var/slave-data/bar/bar.MYD mysql-test/var/slave-data/bar/bar.MYI mysql-test/var/slave-data/foo/foo.frm mysql-test/var/slave-data/foo/foo.MYD mysql-test/var/slave-data/foo/foo.MYI mysql-test/var/slave-data/test/bar.frm mysql-test/var/slave-data/test/bar.MYD mysql-test/var/slave-data/test/bar.MYI mysql-test/var/slave-data/test/choo.frm mysql-test/var/slave-data/test/choo.MYD mysql-test/var/slave-data/test/choo.MYI mysql-test/var/tmp/README to the ignore list
2000-11-21 07:38:08 +01:00
void init_table_rule_array(DYNAMIC_ARRAY* a, bool* a_inited);
void init_slave_skip_errors(char* arg);
void end_slave(); // clean up
int init_master_info(MASTER_INFO* mi);
void end_master_info(MASTER_INFO* mi);
extern bool opt_log_slave_updates ;
pthread_handler_decl(handle_slave,arg);
extern bool volatile abort_loop, abort_slave, slave_running;
Added last_errno and last_error to show slave status slave will skip the first SQL_SLAVE_SKIP_COUNTER events on start - this is needed to recover from broken replication when the next log event(s) should just be skipped. Rotate binlogs when max_binlog_size is reached include/my_sys.h: added my_snprintf() include/mysqld_error.h: more error messages mysql-test/r/rpl000014.result: updated results for new SHOW SLAVE STATUS format mysql-test/r/rpl000015.result: update for SHOW SLAVE STATUS mysql-test/r/rpl000016.result: update for additions to the test mysql-test/t/rpl000016.test: test max_binlog_size and slave_skip_counter mysys/my_vsnprintf.c: added my_snprintf() sql/gen_lex_hash.cc: old values could not do it sql/lex.h: updates for SQL_SLAVE_SKIP_COUNTER sql/log.cc: rotate binlogs when max_binlog_size is reached sql/mysqld.cc: added max_binlog_size sql/share/czech/errmsg.txt: new errors sql/share/danish/errmsg.txt: new errors sql/share/dutch/errmsg.txt: new errors sql/share/english/errmsg.txt: new errors sql/share/estonian/errmsg.txt: new errors sql/share/french/errmsg.txt: new errors sql/share/german/errmsg.txt: new errors sql/share/greek/errmsg.txt: new errors sql/share/hungarian/errmsg.txt: new errors sql/share/italian/errmsg.txt: new errors sql/share/japanese/errmsg.txt: new errors sql/share/korean/errmsg.txt: new errors sql/share/norwegian-ny/errmsg.txt: new errors sql/share/norwegian/errmsg.txt: new errors sql/share/polish/errmsg.txt: new errors sql/share/portuguese/errmsg.txt: new errors sql/share/romanian/errmsg.txt: new errors sql/share/russian/errmsg.txt: new errors, translated untranslated messages sql/share/slovak/errmsg.txt: new errors sql/share/spanish/errmsg.txt: new errors sql/share/swedish/errmsg.txt: new errors sql/slave.cc: updates for slave_skip_counter and extension to show slave status sql/slave.h: slave_skip_counter sql/sql_repl.cc: use error messages from errmsg.txt sql/sql_yacc.yy: skip_slave_counter
2001-01-24 17:15:34 +01:00
extern uint32 slave_skip_counter;
// needed for problems when slave stops and
// we want to restart it skipping one or more events in the master log that
// have caused errors, and have been manually applied by DBA already
extern pthread_t slave_real_id;
extern THD* slave_thd;
extern MASTER_INFO glob_mi;
extern HASH replicate_do_table, replicate_ignore_table;
repl-tests/test-repl-ts/repl-timestamp.master.reject this file needs to be deleted sql/log_event.cc fixed warnings sql/log_event.h fixed () #define bug sql/mysqlbinlog.cc fixed length argument - was supposed to be one less sql/mysqld.cc replicate-do/ignore-table now works, wild does not yet sql/mysql_priv.h updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/slave.cc changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h changes for replicate-do/ignore-table sql/sql_class.cc slave_thread variable to THD sql/sql_class.h added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc updating argument to add_tables_to_list() sql/sql_table.cc fixed bug in mysql_rm_table() sql/sql_yacc.yy fixed up add_table_to_list() calls to accept updating argument sql/table.h added updating to TABLE_LIST repl-tests/test-repl-ts/repl-timestamp.master.reject: this file needs to be deleted sql/log_event.cc: fixed warnings sql/log_event.h: fixed () #define bug sql/mysql_priv.h: updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/mysqlbinlog.cc: fixed length argument - was supposed to be one less sql/mysqld.cc: replicate-do/ignore-table now works, wild does not yet sql/slave.cc: changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h: changes for replicate-do/ignore-table sql/sql_class.cc: slave_thread variable to THD sql/sql_class.h: added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc: updating argument to add_tables_to_list() sql/sql_table.cc: fixed bug in mysql_rm_table() sql/sql_yacc.yy: fixed up add_table_to_list() calls to accept updating argument sql/table.h: added updating to TABLE_LIST
2000-11-14 07:43:02 +01:00
extern DYNAMIC_ARRAY replicate_wild_do_table, replicate_wild_ignore_table;
extern bool do_table_inited, ignore_table_inited,
wild_do_table_inited, wild_ignore_table_inited;
extern bool table_rules_on;
#ifndef DBUG_OFF
extern int disconnect_slave_event_count, abort_slave_event_count ;
#endif
// the master variables are defaults read from my.cnf or command line
extern uint master_port, master_connect_retry;
extern my_string master_user, master_password, master_host,
master_info_file;
extern I_List<i_string> replicate_do_db, replicate_ignore_db;
extern I_List<i_string_pair> replicate_rewrite_db;
extern I_List<THD> threads;
#endif
repl-tests/test-repl-ts/repl-timestamp.master.reject this file needs to be deleted sql/log_event.cc fixed warnings sql/log_event.h fixed () #define bug sql/mysqlbinlog.cc fixed length argument - was supposed to be one less sql/mysqld.cc replicate-do/ignore-table now works, wild does not yet sql/mysql_priv.h updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/slave.cc changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h changes for replicate-do/ignore-table sql/sql_class.cc slave_thread variable to THD sql/sql_class.h added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc updating argument to add_tables_to_list() sql/sql_table.cc fixed bug in mysql_rm_table() sql/sql_yacc.yy fixed up add_table_to_list() calls to accept updating argument sql/table.h added updating to TABLE_LIST repl-tests/test-repl-ts/repl-timestamp.master.reject: this file needs to be deleted sql/log_event.cc: fixed warnings sql/log_event.h: fixed () #define bug sql/mysql_priv.h: updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/mysqlbinlog.cc: fixed length argument - was supposed to be one less sql/mysqld.cc: replicate-do/ignore-table now works, wild does not yet sql/slave.cc: changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h: changes for replicate-do/ignore-table sql/sql_class.cc: slave_thread variable to THD sql/sql_class.h: added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc: updating argument to add_tables_to_list() sql/sql_table.cc: fixed bug in mysql_rm_table() sql/sql_yacc.yy: fixed up add_table_to_list() calls to accept updating argument sql/table.h: added updating to TABLE_LIST
2000-11-14 07:43:02 +01:00