diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 32402cb5d7c610f9ce30afd0c0c6fcc9f89c5f46..e2af8e3cb1b3c59ae9ed9ac85c259d63950c98d5 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -151,9 +151,6 @@ THD::THD():user_time(0), is_fatal_error(0), init(); /* Initialize sub structures */ bzero((char*) &mem_root,sizeof(mem_root)); - bzero((char*) &transaction.mem_root,sizeof(transaction.mem_root)); - bzero((char*) &con_root,sizeof(con_root)); - bzero((char*) &warn_root,sizeof(warn_root)); init_alloc_root(&warn_root, WARN_ALLOC_BLOCK_SIZE, WARN_ALLOC_PREALLOC_SIZE); user_connect=(USER_CONN *)0; hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0, @@ -355,7 +352,6 @@ THD::~THD() safeFree(db); safeFree(ip); free_root(&mem_root,MYF(0)); - free_root(&con_root,MYF(0)); free_root(&warn_root,MYF(0)); free_root(&transaction.mem_root,MYF(0)); mysys_var=0; // Safety (shouldn't be needed) diff --git a/sql/sql_class.h b/sql/sql_class.h index bc5441dbab5cf670a74e6c517dd652437c3eaa3b..f9d74f8b4dadf32869cf2c4f37d6986011cdee54 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -452,7 +452,6 @@ class THD :public ilink LEX main_lex; LEX *lex; // parse tree descriptor MEM_ROOT mem_root; // 1 command-life memory pool - MEM_ROOT con_root; // connection-life memory MEM_ROOT warn_root; // For warnings and errors Protocol *protocol; // Current protocol Protocol_simple protocol_simple; // Normal protocol diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index c4a1251cd3af0b2daa9a4dd47f4f46ed35c24859..7afc268b27004c7aa2bc1c430358d427e74670e7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -957,7 +957,6 @@ pthread_handler_decl(handle_one_connection,arg) } if (thd->user_connect) decrease_user_connections(thd->user_connect); - free_root(&thd->mem_root,MYF(0)); if (net->error && net->vio != 0 && net->report_error) { if (!thd->killed && thd->variables.log_warnings) @@ -1537,8 +1536,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd, #endif close_connection(thd, 0, 1); close_thread_tables(thd); // Free before kill - free_root(&thd->mem_root,MYF(0)); - free_root(&thd->transaction.mem_root,MYF(0)); kill_mysql(); error=TRUE; break;