MySQL 9.1.0
Source Code Documentation
dd_routine.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2016, 2024, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef DD_ROUTINE_INCLUDED
27#define DD_ROUTINE_INCLUDED
28
29#include "sql/table.h"
30
31class THD;
32class sp_head;
33struct st_sp_chistics;
34
35struct LEX_USER;
36
37namespace dd {
38class Routine;
39class Schema;
40
41/**
42 Prepares dd:Routine object from sp_head and updates DD tables
43 accordingly.
44
45 @param[in] thd Thread handle.
46 @param[in] schema Schema to create the routine in.
47 @param[in] sp Stored routine object to store.
48 @param[in] definer Stored routine definer.
49
50 @retval false ON SUCCESS
51 @retval true ON FAILURE
52*/
53
54bool create_routine(THD *thd, const Schema &schema, sp_head *sp,
55 const LEX_USER *definer);
56
57/**
58 Alters routine characteristics in the DD table.
59
60 @param[in] thd Thread handle.
61 @param[in] routine Procedure or Function to alter.
62 @param[in] chistics New values of stored routine attributes to write.
63
64 @retval false ON SUCCESS
65 @retval true ON FAILURE
66*/
67
68bool alter_routine(THD *thd, Routine *routine, st_sp_chistics *chistics);
69} // namespace dd
70#endif // DD_ROUTINE_INCLUDED
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
sp_head represents one instance of a stored program.
Definition: sp_head.h:383
borrowable::session_track::Schema< true > Schema
Definition: classic_protocol_session_track.h:288
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
bool alter_routine(THD *thd, Routine *routine, st_sp_chistics *chistics)
Alters routine characteristics in the DD table.
Definition: dd_routine.cc:480
bool create_routine(THD *thd, const Schema &schema, sp_head *sp, const LEX_USER *definer)
Prepares dd:Routine object from sp_head and updates DD tables accordingly.
Definition: dd_routine.cc:440
Definition: table.h:2767
Definition: sql_lex.h:2576