MySQL  8.0.17
Source Code Documentation
dd_routine.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
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 also distributed 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 included with MySQL.
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 
25 #ifndef DD_ROUTINE_INCLUDED
26 #define DD_ROUTINE_INCLUDED
27 
28 #include "sql/table.h"
29 
30 class THD;
31 class sp_head;
32 struct st_sp_chistics;
33 
34 struct LEX_USER;
35 
36 namespace dd {
37 class Routine;
38 class Schema;
39 
40 /**
41  Prepares dd:Routine object from sp_head and updates DD tables
42  accordingly.
43 
44  @param[in] thd Thread handle.
45  @param[in] schema Schema to create the routine in.
46  @param[in] sp Stored routine object to store.
47  @param[in] definer Stored routine definer.
48 
49  @retval false ON SUCCESS
50  @retval true ON FAILURE
51 */
52 
53 bool create_routine(THD *thd, const Schema &schema, sp_head *sp,
54  const LEX_USER *definer);
55 
56 /**
57  Alters routine characteristics in the DD table.
58 
59  @param[in] thd Thread handle.
60  @param[in] routine Procedure or Function to alter.
61  @param[in] chistics New values of stored routine attributes to write.
62 
63  @retval false ON SUCCESS
64  @retval true ON FAILURE
65 */
66 
67 bool alter_routine(THD *thd, Routine *routine, st_sp_chistics *chistics);
68 } // namespace dd
69 #endif // DD_ROUTINE_INCLUDED
bool alter_routine(THD *thd, Routine *routine, st_sp_chistics *chistics)
Alters routine characteristics in the DD table.
Definition: dd_routine.cc:443
Definition: sql_lex.h:1889
Definition: table.h:2342
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:401
sp_head represents one instance of a stored program.
Definition: sp_head.h:405
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:39
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:777