mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@ -2167,6 +2167,39 @@ struct wait_for_commit
|
||||
void reinit();
|
||||
};
|
||||
|
||||
|
||||
class Sp_caches
|
||||
{
|
||||
public:
|
||||
sp_cache *sp_proc_cache;
|
||||
sp_cache *sp_func_cache;
|
||||
sp_cache *sp_package_spec_cache;
|
||||
sp_cache *sp_package_body_cache;
|
||||
Sp_caches()
|
||||
:sp_proc_cache(NULL),
|
||||
sp_func_cache(NULL),
|
||||
sp_package_spec_cache(NULL),
|
||||
sp_package_body_cache(NULL)
|
||||
{ }
|
||||
~Sp_caches()
|
||||
{
|
||||
// All caches must be freed by the caller explicitly
|
||||
DBUG_ASSERT(sp_proc_cache == NULL);
|
||||
DBUG_ASSERT(sp_func_cache == NULL);
|
||||
DBUG_ASSERT(sp_package_spec_cache == NULL);
|
||||
DBUG_ASSERT(sp_package_body_cache == NULL);
|
||||
}
|
||||
void sp_caches_swap(Sp_caches &rhs)
|
||||
{
|
||||
swap_variables(sp_cache*, sp_proc_cache, rhs.sp_proc_cache);
|
||||
swap_variables(sp_cache*, sp_func_cache, rhs.sp_func_cache);
|
||||
swap_variables(sp_cache*, sp_package_spec_cache, rhs.sp_package_spec_cache);
|
||||
swap_variables(sp_cache*, sp_package_body_cache, rhs.sp_package_body_cache);
|
||||
}
|
||||
void sp_caches_clear();
|
||||
};
|
||||
|
||||
|
||||
extern "C" void my_message_sql(uint error, const char *str, myf MyFlags);
|
||||
|
||||
/**
|
||||
@ -2185,7 +2218,8 @@ class THD :public Statement,
|
||||
*/
|
||||
public Item_change_list,
|
||||
public MDL_context_owner,
|
||||
public Open_tables_state
|
||||
public Open_tables_state,
|
||||
public Sp_caches
|
||||
{
|
||||
private:
|
||||
inline bool is_stmt_prepare() const
|
||||
@ -3180,10 +3214,6 @@ public:
|
||||
enum_sql_command last_sql_command; // Last sql_command exceuted in mysql_execute_command()
|
||||
|
||||
sp_rcontext *spcont; // SP runtime context
|
||||
sp_cache *sp_proc_cache;
|
||||
sp_cache *sp_func_cache;
|
||||
sp_cache *sp_package_spec_cache;
|
||||
sp_cache *sp_package_body_cache;
|
||||
|
||||
/** number of name_const() substitutions, see sp_head.cc:subst_spvars() */
|
||||
uint query_name_consts;
|
||||
|
Reference in New Issue
Block a user