diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-01-20 15:49:48 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-01-20 15:49:48 +0200 |
commit | 87a61355e8e499baf7908862711c26aa0225bf32 (patch) | |
tree | 7122052c801b5f1ee4a93af2348fad916aa2f86b /sql/sp_head.h | |
parent | 7ea413ac2d80c7f03d1dbad90ac30ecddd8b2835 (diff) | |
parent | bc43bf3e430c20bc2178e584215bd443054709d6 (diff) | |
download | mariadb-git-87a61355e8e499baf7908862711c26aa0225bf32.tar.gz |
Merge 10.3 into 10.4
The MDEV-17062 fix in commit c4195305b2a8431f39a4c75cc1c66ba43685f7a0
was omitted.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index 3085c248924..6cf4610c466 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -1,6 +1,7 @@ /* -*- C++ -*- */ /* Copyright (c) 2002, 2011, Oracle and/or its affiliates. + Copyright (c) 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -124,10 +125,11 @@ bool check_routine_name(const LEX_CSTRING *ident); class sp_head :private Query_arena, - public Database_qualified_name + public Database_qualified_name, + public Sql_alloc { - sp_head(const sp_head &); /**< Prevent use of these */ - void operator=(sp_head &); + sp_head(const sp_head &)= delete; + void operator=(sp_head &)= delete; protected: MEM_ROOT main_mem_root; @@ -318,14 +320,14 @@ public: */ SQL_I_List<Item_trigger_field> m_trg_table_fields; - static void * - operator new(size_t size) throw (); - - static void - operator delete(void *ptr, size_t size) throw (); - - sp_head(sp_package *parent, const Sp_handler *handler, - enum_sp_aggregate_type); +protected: + sp_head(MEM_ROOT *mem_root, sp_package *parent, const Sp_handler *handler, + enum_sp_aggregate_type agg_type); + virtual ~sp_head(); +public: + static void destroy(sp_head *sp); + static sp_head *create(sp_package *parent, const Sp_handler *handler, + enum_sp_aggregate_type agg_type); /// Initialize after we have reset mem_root void @@ -343,7 +345,6 @@ public: void set_stmt_end(THD *thd); - virtual ~sp_head(); bool execute_trigger(THD *thd, @@ -968,10 +969,16 @@ public: bool m_is_instantiated; bool m_is_cloning_routine; - sp_package(LEX *top_level_lex, +private: + sp_package(MEM_ROOT *mem_root, + LEX *top_level_lex, const sp_name *name, const Sp_handler *sph); ~sp_package(); +public: + static sp_package *create(LEX *top_level_lex, const sp_name *name, + const Sp_handler *sph); + bool add_routine_declaration(LEX *lex) { return m_routine_declarations.check_dup_qualified(lex->sphead) || |