MySQL 9.0.0
Source Code Documentation
procedure.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef DD__PROCEDURE_INCLUDED
25#define DD__PROCEDURE_INCLUDED
26
27#include "sql/dd/types/routine.h" // Routine
28
29struct MDL_key;
30
31namespace dd {
32
33class Procedure_impl;
34
35///////////////////////////////////////////////////////////////////////////
36
37class Procedure : virtual public Routine {
38 public:
40
41 bool update_name_key(Name_key *key) const override {
43 }
44
46 const String_type &name);
47
48 public:
49 ~Procedure() override = default;
50
51 public:
52 /**
53 Allocate a new object graph and invoke the copy constructor for
54 each object. Only used in unit testing.
55
56 @return pointer to dynamically allocated copy
57 */
58 Procedure *clone() const override = 0;
59
60 /**
61 Allocate a new object which can serve as a placeholder for the original
62 object in the Dictionary_client's dropped registry. Such object has the
63 same keys as the original but has no other info and as result occupies
64 less memory.
65 */
67
68 static void create_mdl_key(const String_type &schema_name,
69 const String_type &name, MDL_key *key) {
71 }
72};
73
74///////////////////////////////////////////////////////////////////////////
75
76} // namespace dd
77
78#endif // DD__PROCEDURE_INCLUDED
virtual const String_type & name() const =0
Definition: procedure_impl.h:48
Definition: procedure.h:37
~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:39
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:41
static void create_mdl_key(const String_type &schema_name, const String_type &name, MDL_key *key)
Definition: procedure.h:68
Definition: object_keys.h:435
Abstract base class for functions and procedures.
Definition: routine.h:61
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:67
@ RT_PROCEDURE
Definition: routine.h:88
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:290
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
unsigned long long Object_id
Definition: object_id.h:31
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Metadata lock object key.
Definition: mdl.h:365