Fixed memory leaks. alias.test now runs clean with valgrind
This commit is contained in:
parent
f62f4bd563
commit
c46ce32cfb
@ -238,7 +238,7 @@ public:
|
||||
/// The class represents parse-time context, which keeps track of declared
|
||||
/// variables/parameters, conditions, handlers, cursors and labels.
|
||||
///
|
||||
/// sp_context objects are organized in a tree according to the following
|
||||
/// sp_pcontext objects are organized in a tree according to the following
|
||||
/// rules:
|
||||
/// - one sp_pcontext object corresponds for for each BEGIN..END block;
|
||||
/// - one sp_pcontext object corresponds for each exception handler;
|
||||
|
@ -92,6 +92,8 @@ private:
|
||||
|
||||
/*
|
||||
A typesafe wrapper around DYNAMIC_ARRAY
|
||||
|
||||
TODO: Change creator to take a THREAD_SPECIFIC option.
|
||||
*/
|
||||
|
||||
template <class Elem> class Dynamic_array
|
||||
@ -106,7 +108,7 @@ public:
|
||||
void init(uint prealloc=16, uint increment=16)
|
||||
{
|
||||
my_init_dynamic_array(&array, sizeof(Elem), prealloc, increment,
|
||||
MYF(MY_THREAD_SPECIFIC));
|
||||
MYF(0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3914,8 +3914,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
}
|
||||
else
|
||||
{
|
||||
Open_table_context ot_ctx(thd, MYSQL_OPEN_TEMPORARY_ONLY);
|
||||
if (open_table(thd, create_table, thd->mem_root, &ot_ctx))
|
||||
if (open_temporary_table(thd, create_table))
|
||||
{
|
||||
/*
|
||||
This shouldn't happen as creation of temporary table should make
|
||||
|
@ -153,7 +153,7 @@ int init_account_hash(void)
|
||||
{
|
||||
lf_hash_init(&account_hash, sizeof(PFS_account*), LF_HASH_UNIQUE,
|
||||
0, 0, account_hash_get_key, &my_charset_bin);
|
||||
account_hash.size= account_max;
|
||||
/* account_hash.size= account_max; */
|
||||
account_hash_inited= true;
|
||||
}
|
||||
return 0;
|
||||
|
@ -142,7 +142,7 @@ int init_digest_hash(void)
|
||||
lf_hash_init(&digest_hash, sizeof(PFS_statements_digest_stat*),
|
||||
LF_HASH_UNIQUE, 0, 0, digest_hash_get_key,
|
||||
&my_charset_bin);
|
||||
digest_hash.size= digest_max;
|
||||
/* digest_hash.size= digest_max; */
|
||||
digest_hash_inited= true;
|
||||
}
|
||||
return 0;
|
||||
|
@ -150,7 +150,7 @@ int init_host_hash(void)
|
||||
{
|
||||
lf_hash_init(&host_hash, sizeof(PFS_host*), LF_HASH_UNIQUE,
|
||||
0, 0, host_hash_get_key, &my_charset_bin);
|
||||
host_hash.size= host_max;
|
||||
/* host_hash.size= host_max; */
|
||||
host_hash_inited= true;
|
||||
}
|
||||
return 0;
|
||||
|
@ -515,7 +515,7 @@ int init_file_hash(void)
|
||||
{
|
||||
lf_hash_init(&filename_hash, sizeof(PFS_file*), LF_HASH_UNIQUE,
|
||||
0, 0, filename_hash_get_key, &my_charset_bin);
|
||||
filename_hash.size= file_max;
|
||||
/* filename_hash.size= file_max; */
|
||||
filename_hash_inited= true;
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
|
@ -385,7 +385,7 @@ int init_table_share_hash(void)
|
||||
{
|
||||
lf_hash_init(&table_share_hash, sizeof(PFS_table_share*), LF_HASH_UNIQUE,
|
||||
0, 0, table_share_hash_get_key, &my_charset_bin);
|
||||
table_share_hash.size= table_share_max;
|
||||
/* table_share_hash.size= table_share_max; */
|
||||
table_share_hash_inited= true;
|
||||
}
|
||||
return 0;
|
||||
|
@ -104,7 +104,7 @@ int init_setup_actor_hash(void)
|
||||
{
|
||||
lf_hash_init(&setup_actor_hash, sizeof(PFS_setup_actor*), LF_HASH_UNIQUE,
|
||||
0, 0, setup_actor_hash_get_key, &my_charset_bin);
|
||||
setup_actor_hash.size= setup_actor_max;
|
||||
/* setup_actor_hash.size= setup_actor_max; */
|
||||
setup_actor_hash_inited= true;
|
||||
}
|
||||
return 0;
|
||||
|
@ -99,7 +99,7 @@ int init_setup_object_hash(void)
|
||||
{
|
||||
lf_hash_init(&setup_object_hash, sizeof(PFS_setup_object*), LF_HASH_UNIQUE,
|
||||
0, 0, setup_object_hash_get_key, &my_charset_bin);
|
||||
setup_object_hash.size= setup_object_max;
|
||||
/* setup_object_hash.size= setup_object_max; */
|
||||
setup_object_hash_inited= true;
|
||||
}
|
||||
return 0;
|
||||
|
@ -150,7 +150,7 @@ int init_user_hash(void)
|
||||
{
|
||||
lf_hash_init(&user_hash, sizeof(PFS_user*), LF_HASH_UNIQUE,
|
||||
0, 0, user_hash_get_key, &my_charset_bin);
|
||||
user_hash.size= user_max;
|
||||
/* user_hash.size= user_max; */
|
||||
user_hash_inited= true;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user