sql/slave.cc
mutex now initialized in the constructor sql/sql_class.h intialize MASTER_INFO mutex in the constructor sql/sql_repl.cc fixed typo in error message if the user does not specify offset in CHANGE MASTER TO, set it to skip magic number repl-tests/test-repl-ts/repl-timestamp.master.reject New BitKeeper file ``repl-tests/test-repl-ts/repl-timestamp.master.reject'' BitKeeper/etc/ignore: Added repl-tests/test-repl-ts/repl-timestamp.master.reject to the ignore list sql/slave.cc: mutex now initialized in the constructor sql/sql_class.h: intialize MASTER_INFO mutex in the constructor sql/sql_repl.cc: fixed typo in error message if the user does not specify offset in CHANGE MASTER TO, set it to skip magic number
This commit is contained in:
parent
a1b03526fc
commit
745f1197f6
@ -172,3 +172,4 @@ mysql-test/var/lib/test/elt_ck1.MYI
|
||||
mysql-test/var/lib/test/elt_ck2.frm
|
||||
mysql-test/var/lib/test/elt_ck2.MYD
|
||||
mysql-test/var/lib/test/elt_ck2.MYI
|
||||
repl-tests/test-repl-ts/repl-timestamp.master.reject
|
||||
|
2
repl-tests/test-repl-ts/repl-timestamp.master.reject
Normal file
2
repl-tests/test-repl-ts/repl-timestamp.master.reject
Normal file
@ -0,0 +1,2 @@
|
||||
unix_timestamp(t)
|
||||
973302660
|
@ -290,8 +290,6 @@ int init_master_info(MASTER_INFO* mi)
|
||||
char fname[FN_REFLEN+128];
|
||||
fn_format(fname, master_info_file, mysql_data_home, "", 4+16+32);
|
||||
|
||||
if(!mi->inited)
|
||||
pthread_mutex_init(&mi->lock, NULL);
|
||||
|
||||
// we need a mutex while we are changing master info parameters to
|
||||
// keep other threads from reading bogus info
|
||||
@ -353,7 +351,7 @@ int init_master_info(MASTER_INFO* mi)
|
||||
master_connect_retry);
|
||||
|
||||
}
|
||||
|
||||
|
||||
mi->inited = 1;
|
||||
pthread_mutex_unlock(&mi->lock);
|
||||
|
||||
|
@ -64,9 +64,17 @@ typedef struct st_master_info
|
||||
uint connect_retry;
|
||||
pthread_mutex_t lock;
|
||||
bool inited;
|
||||
|
||||
|
||||
st_master_info():inited(0),pending(0)
|
||||
{ host[0] = 0; user[0] = 0; password[0] = 0;}
|
||||
{
|
||||
host[0] = 0; user[0] = 0; password[0] = 0;
|
||||
pthread_mutex_init(&lock, NULL);
|
||||
}
|
||||
|
||||
~st_master_info()
|
||||
{
|
||||
pthread_mutex_destroy(&lock);
|
||||
}
|
||||
|
||||
inline void inc_pending(ulonglong val)
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
|
||||
|
||||
if(pos < 4)
|
||||
{
|
||||
errmsg = "Contratulations! You have hit the magic number and can win \
|
||||
errmsg = "Congratulations! You have hit the magic number and can win \
|
||||
sweepstakes if you report the bug";
|
||||
goto err;
|
||||
}
|
||||
@ -616,7 +616,7 @@ int change_master(THD* thd)
|
||||
{
|
||||
// if we change host or port, we must reset the postion
|
||||
glob_mi.log_file_name[0] = 0;
|
||||
glob_mi.pos = 0;
|
||||
glob_mi.pos = 4; // skip magic number
|
||||
}
|
||||
|
||||
if(lex_mi->log_file_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user