MySQL 8.0.30
Source Code Documentation
procedure.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef DD__PROCEDURE_INCLUDED
24#define DD__PROCEDURE_INCLUDED
25
26#include "sql/dd/types/routine.h" // Routine
27
28struct MDL_key;
29
30namespace dd {
31
32class Procedure_impl;
33
34///////////////////////////////////////////////////////////////////////////
35
36class Procedure : virtual public Routine {
37 public:
39
40 bool update_name_key(Name_key *key) const override {
42 }
43
45 const String_type &name);
46
47 public:
48 ~Procedure() override = default;
49
50 public:
51 /**
52 Allocate a new object graph and invoke the copy constructor for
53 each object. Only used in unit testing.
54
55 @return pointer to dynamically allocated copy
56 */
57 Procedure *clone() const override = 0;
58
59 /**
60 Allocate a new object which can serve as a placeholder for the original
61 object in the Dictionary_client's dropped registry. Such object has the
62 same keys as the original but has no other info and as result occupies
63 less memory.
64 */
66
67 static void create_mdl_key(const String_type &schema_name,
68 const String_type &name, MDL_key *key) {
70 }
71};
72
73///////////////////////////////////////////////////////////////////////////
74
75} // namespace dd
76
77#endif // DD__PROCEDURE_INCLUDED
virtual const String_type & name() const =0
Definition: procedure_impl.h:47
Definition: procedure.h:36
~Procedure() override=default
Procedure * clone() const override=0
Allocate a new object graph and invoke the copy constructor for each object.
Procedure_impl Impl
Definition: procedure.h:38
Procedure * clone_dropped_object_placeholder() const override=0
Allocate a new object which can serve as a placeholder for the original object in the Dictionary_clie...
bool update_name_key(Name_key *key) const override
Definition: procedure.h:40
static void create_mdl_key(const String_type &schema_name, const String_type &name, MDL_key *key)
Definition: procedure.h:67
Definition: object_keys.h:434
Abstract base class for functions and procedures.
Definition: routine.h:60
virtual bool update_routine_name_key(Name_key *key, Object_id schema_id, const String_type &name) const =0
virtual Object_id schema_id() const =0
Routine_name_key Name_key
Definition: routine.h:66
@ RT_PROCEDURE
Definition: routine.h:87
static void create_mdl_key(enum_routine_type type, const String_type &schema_name, const String_type &name, MDL_key *key)
Definition: routine_impl.cc:283
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:42
unsigned long long Object_id
Definition: object_id.h:30
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Metadata lock object key.
Definition: mdl.h:364