diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-11-17 17:23:46 -0700 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-11-17 17:23:46 -0700 |
commit | 4bcb4f4dae07d3ceca01f17ce97012c1d6046c6a (patch) | |
tree | c21577a3e1e1590e9241dd9b406c046d31a17123 /sql/slave.cc | |
parent | f5a488eef458ee68a8a20fc4e06503eba6d013f8 (diff) | |
download | mariadb-git-4bcb4f4dae07d3ceca01f17ce97012c1d6046c6a.tar.gz |
use env vars for socket/port in connect in mysqltest
--local-master option in mysql-test-run
do not log CREATE TABLE when doing table dump
fix replication to slave off 3.23 master
client/mysqltest.c:
fix to be able to use env vars for socket and port in connect
mysql-test/include/master-slave.inc:
connect to port specified in environment
mysql-test/mysql-test-run.sh:
added --local-master option - will assume master is on port 3306 on localhost
sql/log_event.cc:
fixes to slave off 3.23 master
sql/log_event.h:
fixes to slave off 3.23 master
sql/slave.cc:
do not log CREATE TABLE when doing table dump
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index b78cd0f0835..d6f0809c277 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -393,6 +393,7 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db, TABLE_LIST tables; int error= 1; handler *file; + uint save_options; if (packet_len == packet_error) { @@ -418,12 +419,17 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db, thd->current_tablenr = 0; thd->query_error = 0; thd->net.no_send_ok = 1; + + /* we do not want to log create table statement */ + save_options = thd->options; + thd->options &= ~OPTION_BIN_LOG; thd->proc_info = "Creating table from master dump"; // save old db in case we are creating in a different database char* save_db = thd->db; thd->db = (char*)db; mysql_parse(thd, thd->query, packet_len); // run create table thd->db = save_db; // leave things the way the were before + thd->options = save_options; if (thd->query_error) goto err; // mysql_parse took care of the error send @@ -1000,7 +1006,7 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len) int type_code = ev->get_type_code(); int exec_res; if (ev->server_id == ::server_id || - (slave_skip_counter && ev->get_type_code() != ROTATE_EVENT)) + (slave_skip_counter && type_code != ROTATE_EVENT)) { if(type_code == LOAD_EVENT) skip_load_data_infile(net); |