MySQL 8.0.40
Source Code Documentation
procedure_impl.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_IMPL_INCLUDED
25#define DD__PROCEDURE_IMPL_INCLUDED
26
27#include <new>
28
29#include "my_inttypes.h"
31#include "sql/dd/impl/types/routine_impl.h" // dd::Routine_impl
33#include "sql/dd/object_id.h"
34#include "sql/dd/string_type.h"
35#include "sql/dd/types/procedure.h" // dd::Procedure
37#include "sql/dd/types/view.h"
38
39namespace dd {
40
41///////////////////////////////////////////////////////////////////////////
42
43class Open_dictionary_tables_ctx;
44class Parameter;
45class Weak_object;
46class Object_table;
47
48class Procedure_impl : public Routine_impl, public Procedure {
49 public:
50 Procedure_impl() = default;
51
52 ~Procedure_impl() override = default;
53
54 public:
56 const String_type &name) const override;
57
58 void debug_print(String_type &outb) const override;
59
60 // Fix "inherits ... via dominance" warnings
62 const Entity_object_impl *impl() const override {
64 }
65 Object_id id() const override { return Entity_object_impl::id(); }
66 bool is_persistent() const override {
68 }
69 const String_type &name() const override {
71 }
72 void set_name(const String_type &name) override {
74 }
75 const Object_table &object_table() const override {
77 }
78 Object_id schema_id() const override { return Routine_impl::schema_id(); }
81 }
82 enum_routine_type type() const override { return Routine_impl::type(); }
83 const String_type &definition() const override {
85 }
86 void set_definition(const String_type &definition) override {
88 }
89 const String_type &definition_utf8() const override {
91 }
94 }
95 const String_type &parameter_str() const override {
97 }
100 }
101 bool is_deterministic() const override {
103 }
104 void set_deterministic(bool deterministic) override {
105 Routine_impl::set_deterministic(deterministic);
106 }
109 }
112 }
115 }
118 }
119 ulonglong sql_mode() const override { return Routine_impl::sql_mode(); }
121 const String_type &definer_user() const override {
123 }
124 const String_type &definer_host() const override {
126 }
127 void set_definer(const String_type &username,
128 const String_type &hostname) override {
129 Routine_impl::set_definer(username, hostname);
130 }
133 }
136 }
139 }
142 }
145 }
148 }
149 ulonglong created(bool convert_time) const override {
150 return Routine_impl::created(convert_time);
151 }
154 }
155 ulonglong last_altered(bool convert_time) const override {
156 return Routine_impl::last_altered(convert_time);
157 }
160 }
161 const String_type &comment() const override {
162 return Routine_impl::comment();
163 }
164 void set_comment(const String_type &comment) override {
166 }
168 const Parameter_collection &parameters() const override {
170 }
171 bool update_name_key(Name_key *key) const override {
173 }
174
175 private:
176 Procedure_impl(const Procedure_impl &src);
177 Procedure_impl *clone() const override { return new Procedure_impl(*this); }
178
179 // N.B.: returning dd::Procedure from this function might confuse MSVC
180 // compiler thanks to diamond inheritance.
182 Procedure_impl *placeholder = new Procedure_impl();
183 placeholder->set_id(id());
184 placeholder->set_schema_id(schema_id());
185 placeholder->set_name(name());
186 return placeholder;
187 }
188};
189
190///////////////////////////////////////////////////////////////////////////
191
192} // namespace dd
193
194#endif // DD__PROCEDURE_IMPL_INCLUDED
Definition: collection.h:44
Definition: entity_object_impl.h:44
void set_name(const String_type &name) override
Definition: entity_object_impl.h:62
void set_id(Object_id id)
Definition: entity_object_impl.h:51
Object_id id() const override
The unique dictionary object id.
Definition: entity_object_impl.h:49
const String_type & name() const override
Definition: entity_object_impl.h:60
Entity_object_impl * impl() override
Definition: entity_object_impl.h:68
bool is_persistent() const override
Is dictionary object persistent in dictionary tables ?
Definition: entity_object_impl.h:57
This class represents all data dictionary table like mysql.tables, mysql.columns and more.
Definition: object_table.h:72
Definition: parameter.h:45
Definition: procedure_impl.h:48
void set_deterministic(bool deterministic) override
Definition: procedure_impl.h:104
const String_type & parameter_str() const override
Definition: procedure_impl.h:95
void set_created(ulonglong created) override
Definition: procedure_impl.h:152
void set_last_altered(ulonglong last_altered) override
Definition: procedure_impl.h:158
const Object_table & object_table() const override
Definition: procedure_impl.h:75
void set_sql_mode(ulonglong sm) override
Definition: procedure_impl.h:120
void set_sql_data_access(enum_sql_data_access sda) override
Definition: procedure_impl.h:110
~Procedure_impl() override=default
void set_definition(const String_type &definition) override
Definition: procedure_impl.h:86
void debug_print(String_type &outb) const override
Definition: procedure_impl.cc:58
void set_connection_collation_id(Object_id connection_collation_id) override
Definition: procedure_impl.h:140
const String_type & definition() const override
Definition: procedure_impl.h:83
ulonglong created(bool convert_time) const override
Definition: procedure_impl.h:149
Object_id schema_collation_id() const override
Definition: procedure_impl.h:143
void set_parameter_str(const String_type &parameter_str) override
Definition: procedure_impl.h:98
bool is_deterministic() const override
Definition: procedure_impl.h:101
const Parameter_collection & parameters() const override
Definition: procedure_impl.h:168
enum_sql_data_access sql_data_access() const override
Definition: procedure_impl.h:107
Object_id connection_collation_id() const override
Definition: procedure_impl.h:137
Object_id client_collation_id() const override
Definition: procedure_impl.h:131
void set_schema_id(Object_id schema_id) override
Definition: procedure_impl.h:79
void set_security_type(View::enum_security_type security_type) override
Definition: procedure_impl.h:116
Procedure_impl()=default
View::enum_security_type security_type() const override
Definition: procedure_impl.h:113
void set_schema_collation_id(Object_id schema_collation_id) override
Definition: procedure_impl.h:146
Parameter * add_parameter() override
Definition: procedure_impl.h:167
const String_type & definer_host() const override
Definition: procedure_impl.h:124
bool update_routine_name_key(Name_key *key, Object_id schema_id, const String_type &name) const override
Definition: procedure_impl.cc:43
bool update_name_key(Name_key *key) const override
Definition: procedure_impl.h:171
Procedure_impl * clone() const override
Allocate a new object graph and invoke the copy constructor for each object.
Definition: procedure_impl.h:177
const String_type & comment() const override
Definition: procedure_impl.h:161
Procedure_impl * clone_dropped_object_placeholder() const override
Allocate a new object which can serve as a placeholder for the original object in the Dictionary_clie...
Definition: procedure_impl.h:181
void set_name(const String_type &name) override
Definition: procedure_impl.h:72
Entity_object_impl * impl() override
Definition: procedure_impl.h:61
ulonglong sql_mode() const override
Definition: procedure_impl.h:119
const String_type & name() const override
Definition: procedure_impl.h:69
const String_type & definer_user() const override
Definition: procedure_impl.h:121
const String_type & definition_utf8() const override
Definition: procedure_impl.h:89
bool is_persistent() const override
Is dictionary object persistent in dictionary tables ?
Definition: procedure_impl.h:66
void set_definition_utf8(const String_type &definition_utf8) override
Definition: procedure_impl.h:92
enum_routine_type type() const override
Definition: procedure_impl.h:82
const Entity_object_impl * impl() const override
Definition: procedure_impl.h:62
void set_comment(const String_type &comment) override
Definition: procedure_impl.h:164
void set_client_collation_id(Object_id client_collation_id) override
Definition: procedure_impl.h:134
ulonglong last_altered(bool convert_time) const override
Definition: procedure_impl.h:155
Object_id id() const override
The unique dictionary object id.
Definition: procedure_impl.h:65
void set_definer(const String_type &username, const String_type &hostname) override
Definition: procedure_impl.h:127
Object_id schema_id() const override
Definition: procedure_impl.h:78
Definition: procedure.h:37
Definition: routine_impl.h:52
void set_definer(const String_type &username, const String_type &hostname) override
Definition: routine_impl.h:174
bool is_deterministic() const override
Definition: routine_impl.h:128
Object_id schema_collation_id() const override
Definition: routine_impl.h:200
const Object_table & object_table() const override
Definition: routine_impl.cc:244
ulonglong created(bool convert_time) const override
Definition: routine_impl.h:212
void set_comment(const String_type &comment) override
Definition: routine_impl.h:237
void set_parameter_str(const String_type &parameter_str) override
Definition: routine_impl.h:120
void set_sql_mode(ulonglong sm) override
Definition: routine_impl.h:164
ulonglong sql_mode() const override
Definition: routine_impl.h:162
const String_type & definer_host() const override
Definition: routine_impl.h:172
enum_sql_data_access sql_data_access() const override
Definition: routine_impl.h:138
Object_id client_collation_id() const override
Definition: routine_impl.h:184
void set_security_type(View::enum_security_type security_type) override
Definition: routine_impl.h:154
View::enum_security_type security_type() const override
Definition: routine_impl.h:150
const String_type & definer_user() const override
Definition: routine_impl.h:170
const String_type & parameter_str() const override
Definition: routine_impl.h:118
ulonglong last_altered(bool convert_time) const override
Definition: routine_impl.h:222
void set_schema_collation_id(Object_id schema_collation_id) override
Definition: routine_impl.h:204
void set_deterministic(bool deterministic) override
Definition: routine_impl.h:130
void set_definition(const String_type &definition) override
Definition: routine_impl.h:102
Object_id schema_id() const override
Definition: routine_impl.h:82
void set_definition_utf8(const String_type &definition_utf8) override
Definition: routine_impl.h:110
Object_id connection_collation_id() const override
Definition: routine_impl.h:192
void set_client_collation_id(Object_id client_collation_id) override
Definition: routine_impl.h:188
const String_type & definition_utf8() const override
Definition: routine_impl.h:106
void set_sql_data_access(enum_sql_data_access sda) override
Definition: routine_impl.h:142
void set_created(ulonglong created) override
Definition: routine_impl.h:216
const Parameter_collection & parameters() const override
Definition: routine_impl.h:245
enum_routine_type type() const override
Definition: routine_impl.h:90
Parameter * add_parameter() override
Definition: routine_impl.cc:236
void set_schema_id(Object_id schema_id) override
Definition: routine_impl.h:84
const String_type & definition() const override
Definition: routine_impl.h:100
void set_connection_collation_id(Object_id connection_collation_id) override
Definition: routine_impl.h:196
void set_last_altered(ulonglong last_altered) override
Definition: routine_impl.h:227
const String_type & comment() const override
Definition: routine_impl.h:235
Definition: object_keys.h:434
enum_sql_data_access
Definition: routine.h:90
enum_routine_type
Definition: routine.h:88
virtual bool update_name_key(Name_key *key) const
Definition: routine.h:78
enum_security_type
Definition: view.h:62
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
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