diff options
Diffstat (limited to 'sql/sql_servers.cc')
-rw-r--r-- | sql/sql_servers.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index 1a33a91ce24..c0302d45fa6 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -33,12 +33,12 @@ currently running transactions etc will not be disrupted. */ +#include <my_global.h> #include "sql_priv.h" #include "sql_servers.h" #include "unireg.h" #include "sql_base.h" // close_mysql_tables #include "records.h" // init_read_record, end_read_record -#include "hash_filo.h" #include <m_ctype.h> #include <stdarg.h> #include "sp_head.h" @@ -158,7 +158,7 @@ bool servers_init(bool dont_read_servers_table) } /* Initialize the mem root for data */ - init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0); + init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0, MYF(MY_THREAD_SPECIFIC)); if (dont_read_servers_table) goto end; @@ -177,8 +177,6 @@ bool servers_init(bool dont_read_servers_table) */ return_val= servers_reload(thd); delete thd; - /* Remember that we don't have a THD */ - my_pthread_setspecific_ptr(THR_THD, 0); end: DBUG_RETURN(return_val); @@ -209,7 +207,7 @@ static bool servers_load(THD *thd, TABLE_LIST *tables) my_hash_reset(&servers_cache); free_root(&mem, MYF(0)); - init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0); + init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0)); if (init_read_record(&read_record_info,thd,table=tables[0].table,NULL,1,0, FALSE)) @@ -265,9 +263,9 @@ bool servers_reload(THD *thd) Execution might have been interrupted; only print the error message if an error condition has been raised. */ - if (thd->stmt_da->is_error()) + if (thd->get_stmt_da()->is_error()) sql_print_error("Can't open and lock privilege tables: %s", - thd->stmt_da->message()); + thd->get_stmt_da()->message()); return_val= FALSE; goto end; } @@ -632,7 +630,7 @@ int drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options) if (close_cached_connection_tables(thd, &name)) { - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR, "Server connection in use"); } @@ -1061,7 +1059,7 @@ int alter_server(THD *thd, LEX_SERVER_OPTIONS *server_options) if (close_cached_connection_tables(thd, &name)) { - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR, "Server connection in use"); } |