diff options
author | monty@mashka.mysql.fi <> | 2002-07-23 18:31:22 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-07-23 18:31:22 +0300 |
commit | dddc20d9d1eea5fd526a2082a43801fed304afe4 (patch) | |
tree | 2e458857fc65791ee553b4cde0e28ef9459050a5 /sql/repl_failsafe.cc | |
parent | 373e19dca1d209476a15d7d61cb350361c9d6efa (diff) | |
download | mariadb-git-dddc20d9d1eea5fd526a2082a43801fed304afe4.tar.gz |
New SET syntax & system variables.
Made a some new buffers thread specific and changeable.
Resize of key_buffer.
AUTO_COMMIT -> AUTOCOMMIT
Fixed mutex bug in DROP DATABASE
Fixed bug when using auto_increment as second part of a key where first part could include NULL.
Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers.
Don't write message to error log when slave reconnects becasue of timeout.
Fixed possible update problem when using DELETE/UPDATE on small tables
(In some cases we used index even if table scanning would be better)
A lot of minior code cleanups
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r-- | sql/repl_failsafe.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 3b63a12c05c..f5f5b2de9fc 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -59,8 +59,8 @@ static int init_failsafe_rpl_thread(THD* thd) thd->system_thread = thd->bootstrap = 1; thd->client_capabilities = 0; my_net_init(&thd->net, 0); - thd->net.timeout = slave_net_timeout; - thd->max_packet_length=thd->net.max_packet; + thd->net.read_timeout = slave_net_timeout; + thd->max_client_packet_length=thd->net.max_packet; thd->master_access= ~0; thd->priv_user = 0; thd->system_thread = 1; @@ -68,10 +68,7 @@ static int init_failsafe_rpl_thread(THD* thd) thd->thread_id = thread_id++; pthread_mutex_unlock(&LOCK_thread_count); - if (init_thr_lock() || - my_pthread_setspecific_ptr(THR_THD, thd) || - my_pthread_setspecific_ptr(THR_MALLOC, &thd->mem_root) || - my_pthread_setspecific_ptr(THR_NET, &thd->net)) + if (init_thr_lock() || thd->store_globals()) { close_connection(&thd->net,ER_OUT_OF_RESOURCES); // is this needed? end_thread(thd,0); @@ -87,8 +84,8 @@ static int init_failsafe_rpl_thread(THD* thd) #endif thd->mem_root.free=thd->mem_root.used=0; - if (thd->max_join_size == (ulong) ~0L) - thd->options |= OPTION_BIG_SELECTS; + if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR) + thd->options|= OPTION_BIG_SELECTS; thd->proc_info="Thread initialized"; thd->version=refresh_version; @@ -626,7 +623,8 @@ int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi) return 1; if (!mc_mysql_connect(mysql, mi->host, mi->user, mi->password, 0, - mi->port, 0, 0)) + mi->port, 0, 0, + slave_net_timeout)) { sql_print_error("Connection to master failed: %s", mc_mysql_error(mysql)); |