diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-10-23 13:28:03 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-10-23 13:28:03 -0600 |
commit | a23f2a3abd3d220136b4ec1518b83281043cd05b (patch) | |
tree | c5c654aca3970830687c68cb22289835e1719233 /sql/sql_repl.cc | |
parent | b303703bd6329d34634daf902994fb37f0d0f8cb (diff) | |
download | mariadb-git-a23f2a3abd3d220136b4ec1518b83281043cd05b.tar.gz |
cleanup
removal of duplicate code in mf_iocache.cc
work on failsafe replication
work on SEQ_READ_APPEND io cache
include/my_sys.h:
updates for SEQ_READ_APPEND
libmysql/Makefile.am:
fix for mysys/mf_iocache.c
libmysql/libmysql.c:
updates for new format of SHOW SLAVE HOSTS
mysql-test/r/rpl000001.result:
test replication of LOAD DATA LOCAL INFILE
mysql-test/r/rpl000002.result:
updated test result
mysql-test/t/rpl000001.test:
test LOAD DATA LOCAL INFILE
mysys/mf_iocache.c:
cleanup to remove duplicate functionality
some work on SEQ_READ_APPEND
sql/mf_iocache.cc:
cleanup to remove duplicate functionality
sql/repl_failsafe.cc:
more work on failsafe replication
sql/repl_failsafe.h:
more work on failsafe replication
sql/slave.cc:
cleanup
more work on failsafe replication
sql/sql_load.cc:
fixed bug on replicating empty file loads
got LOAD DATA LOCAL INFILE to work again, and to be replicated
sql/sql_repl.cc:
cleanup
more work on failsafe replication
sql/sql_repl.h:
more work on failsafe replication
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index e05b17bedef..b5300813410 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -140,6 +140,11 @@ int register_slave(THD* thd, uchar* packet, uint packet_length) get_object(p,si->user); get_object(p,si->password); si->port = uint2korr(p); + p += 2; + si->rpl_recovery_rank = uint4korr(p); + p += 4; + if (!(si->master_id = uint4korr(p))) + si->master_id = server_id; si->thd = thd; pthread_mutex_lock(&LOCK_slave_list); @@ -534,6 +539,7 @@ impossible position"; DBUG_PRINT("wait",("waiting for data on binary log")); if (!thd->killed) pthread_cond_wait(&COND_binlog_update, log_lock); + DBUG_PRINT("wait",("binary log received update")); break; default: @@ -1253,6 +1259,8 @@ int show_slave_hosts(THD* thd) field_list.push_back(new Item_empty_string("Password",20)); } field_list.push_back(new Item_empty_string("Port",20)); + field_list.push_back(new Item_empty_string("Rpl_recovery_rank", 20)); + field_list.push_back(new Item_empty_string("Master_id", 20)); if (send_fields(thd, field_list, 1)) DBUG_RETURN(-1); @@ -1271,6 +1279,8 @@ int show_slave_hosts(THD* thd) net_store_data(packet, si->password); } net_store_data(packet, (uint32) si->port); + net_store_data(packet, si->rpl_recovery_rank); + net_store_data(packet, si->master_id); if (my_net_write(net, (char*)packet->ptr(), packet->length())) { pthread_mutex_unlock(&LOCK_slave_list); @@ -1616,7 +1626,8 @@ int log_loaded_block(IO_CACHE* file) { LOAD_FILE_INFO* lf_info; uint block_len ; - if (!(block_len = file->rc_end - file->buffer)) + char* buffer = (char*)file->buffer; + if (!(block_len = file->rc_end - buffer)) return 0; lf_info = (LOAD_FILE_INFO*)file->arg; if (lf_info->last_pos_in_file != HA_POS_ERROR && @@ -1625,14 +1636,14 @@ int log_loaded_block(IO_CACHE* file) lf_info->last_pos_in_file = file->pos_in_file; if (lf_info->wrote_create_file) { - Append_block_log_event a(lf_info->thd, (char*) file->buffer, block_len); + Append_block_log_event a(lf_info->thd, buffer, block_len); mysql_bin_log.write(&a); } else { Create_file_log_event c(lf_info->thd,lf_info->ex,lf_info->db, lf_info->table_name, *lf_info->fields, - lf_info->handle_dup, (char*) file->buffer, + lf_info->handle_dup, buffer, block_len); mysql_bin_log.write(&c); lf_info->wrote_create_file = 1; |