mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
laptop commit, syncing with the repostitory. Fixed some bad bugs in replication
BUILD/compile-pentium-debug: added -DEXTRA_DEBUG sql/Makefile.am: added slave.h sql/log_event.h: max_buf -> event_len in read_log_event sql/mysql_priv.h: moved the slave part to slave.h sql/mysqld.cc: changes for replcate_do/ignore_table ( does not work yet) sql/slave.cc: removed the stuff covered by slave.h sql/sql_class.h: moved slave stuff to slave.h sql/sql_repl.h: removed stuff covered by slave.h BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
@@ -50,52 +50,6 @@ typedef struct st_log_info
|
||||
~st_log_info() { pthread_mutex_destroy(&lock);}
|
||||
} LOG_INFO;
|
||||
|
||||
typedef struct st_master_info
|
||||
{
|
||||
char log_file_name[FN_REFLEN];
|
||||
ulonglong pos,pending;
|
||||
FILE* file; // we keep the file open, so we need to remember the file pointer
|
||||
|
||||
// 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;
|
||||
bool inited;
|
||||
|
||||
st_master_info():inited(0),pending(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)
|
||||
{
|
||||
pending += val;
|
||||
}
|
||||
inline void inc_pos(ulonglong val)
|
||||
{
|
||||
pthread_mutex_lock(&lock);
|
||||
pos += val + pending;
|
||||
pending = 0;
|
||||
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);
|
||||
}
|
||||
} MASTER_INFO;
|
||||
|
||||
class MYSQL_LOG {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user