diff options
author | unknown <konstantin@bodhi.netgear> | 2006-07-06 22:55:48 +0400 |
---|---|---|
committer | unknown <konstantin@bodhi.netgear> | 2006-07-06 22:55:48 +0400 |
commit | df9b4754b7680fae685d34a9ed1210452f6f8088 (patch) | |
tree | a054d3ff659c59af94637b315fc1234edc00dbcf /sql/slave.cc | |
parent | d2b4e9c8e22f3d06848701e8fa1e9c800c471960 (diff) | |
parent | 7982816b8adac32e055849f0e8d15a973889ad1d (diff) | |
download | mariadb-git-df9b4754b7680fae685d34a9ed1210452f6f8088.tar.gz |
Merge bodhi.netgear:/opt/local/work/tmp_merge
into bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge-with-5.0
mysql-test/r/create.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.h:
Auto merged
sql/tztime.cc:
Auto merged
include/my_sys.h:
Manual merge (second attempt).
mysql-test/r/bdb.result:
Manual merge (second attempt).
mysql-test/t/bdb.test:
Manual merge (second attempt).
mysys/my_malloc.c:
Manual merge (second attempt).
mysys/safemalloc.c:
Manual merge (second attempt).
sql/ha_federated.cc:
Manual merge (second attempt).
sql/log_event.cc:
Manual merge (second attempt).
sql/set_var.cc:
Manual merge (second attempt).
sql/set_var.h:
Manual merge (second attempt).
sql/slave.cc:
Manual merge (second attempt).
sql/slave.h:
Manual merge (second attempt).
sql/sql_class.h:
Manual merge (second attempt).
sql/sql_table.cc:
Manual merge (second attempt).
sql/sql_udf.cc:
Manual merge (second attempt).
sql/sql_yacc.yy:
Manual merge (second attempt).
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index d9895323b92..2bc3b1c4bfd 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1347,9 +1347,8 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db, // save old db in case we are creating in a different database save_db = thd->db; save_db_length= thd->db_length; - thd->db = (char*)db; - DBUG_ASSERT(thd->db != 0); - thd->db_length= strlen(thd->db); + DBUG_ASSERT(db != 0); + thd->reset_db((char*)db, strlen(db)); mysql_parse(thd, thd->query, packet_len); // run create table thd->db = save_db; // leave things the way the were before thd->db_length= save_db_length; @@ -3511,8 +3510,9 @@ err: sql_print_information("Slave I/O thread exiting, read up to log '%s', position %s", IO_RPL_LOG_NAME, llstr(mi->master_log_pos,llbuff)); VOID(pthread_mutex_lock(&LOCK_thread_count)); - thd->query = thd->db = 0; // extra safety - thd->query_length= thd->db_length= 0; + thd->query= 0; // extra safety + thd->query_length= 0; + thd->reset_db(NULL, 0); VOID(pthread_mutex_unlock(&LOCK_thread_count)); if (mysql) { @@ -3760,8 +3760,10 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \ should already have done these assignments (each event which sets these variables is supposed to set them to 0 before terminating)). */ - thd->query= thd->db= thd->catalog= 0; - thd->query_length= thd->db_length= 0; + thd->catalog= 0; + thd->reset_db(NULL, 0); + thd->query= 0; + thd->query_length= 0; VOID(pthread_mutex_unlock(&LOCK_thread_count)); thd->proc_info = "Waiting for slave mutex on exit"; pthread_mutex_lock(&rli->run_lock); |