mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 20:25:32 +02:00
free Sql_path in the destructor, perform cleanup in cleanup()
This commit is contained in:
parent
afc8a33496
commit
85b713b2a3
7 changed files with 8 additions and 9 deletions
|
|
@ -114,9 +114,6 @@ void sys_var_end()
|
|||
for (sys_var *var=all_sys_vars.first; var; var= var->next)
|
||||
var->cleanup();
|
||||
|
||||
global_system_variables.path.free();
|
||||
max_system_variables.path.free();
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -776,8 +776,6 @@ Sp_handler::db_find_routine(THD *thd, const Database_qualified_name *name,
|
|||
ret= db_load_routine(thd, name, sphp, sql_mode, sql_path, params, returns,
|
||||
body, chistics, definer, created, modified, NULL,
|
||||
creation_ctx);
|
||||
sql_path.free();
|
||||
|
||||
done:
|
||||
/*
|
||||
Restore the time zone flag as the timezone usage in proc table
|
||||
|
|
|
|||
|
|
@ -910,7 +910,6 @@ sp_head::~sp_head()
|
|||
delete_dynamic(&m_instr);
|
||||
delete m_pcont;
|
||||
free_items();
|
||||
m_sql_path.free();
|
||||
|
||||
/*
|
||||
If we have non-empty LEX stack then we just came out of parser with
|
||||
|
|
|
|||
|
|
@ -1909,7 +1909,6 @@ THD::~THD()
|
|||
#if defined(ENABLED_DEBUG_SYNC)
|
||||
debug_sync_end_thread(this);
|
||||
#endif
|
||||
variables.path.free();
|
||||
/* Ensure everything is freed */
|
||||
status_var.local_memory_used-= sizeof(THD);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public:
|
|||
set(std::move(rhs));
|
||||
}
|
||||
|
||||
~Sql_path() { free(); }
|
||||
|
||||
bool resolve(THD *thd, sp_head *caller, sp_name *name,
|
||||
const Sp_handler **sph, Database_qualified_name *pkgname) const;
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3398,8 +3398,6 @@ void plugin_thdvar_cleanup(THD *thd)
|
|||
thd->variables.default_master_connection.str= 0;
|
||||
thd->variables.default_master_connection.length= 0;
|
||||
|
||||
thd->variables.path.free();
|
||||
|
||||
mysql_mutex_lock(&LOCK_plugin);
|
||||
|
||||
unlock_variables(thd, &thd->variables);
|
||||
|
|
|
|||
|
|
@ -3186,4 +3186,10 @@ private:
|
|||
{
|
||||
return make_value_ptr(thd, global_system_variables.path);
|
||||
}
|
||||
|
||||
void cleanup() override
|
||||
{
|
||||
global_system_variables.path.free();
|
||||
max_system_variables.path.free();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue