MySQL 9.1.0
Source Code Documentation
dd.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 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__DD_INCLUDED
25#define DD__DD_INCLUDED
26
27namespace dd {
28
29///////////////////////////////////////////////////////////////////////////
30
31// enum type to pass to init() function.
33 DD_INITIALIZE = 1,
38};
39
40/**
41 Initialize data dictionary upon server startup, server startup on old
42 data directory or install data dictionary for the first time.
43
44 @param dd_init - Option for initialization, population or deletion
45 of data dictionary.
46
47 @return false - On success
48 @return true - On error
49*/
50bool init(enum_dd_init_type dd_init);
51
52/**
53 Shuts down the data dictionary instance by deleting
54 the instance of dd::Dictionary_impl* upon server shutdown.
55
56 @return false - On success
57 @return true - If invoked when data dictionary instance
58 is not yet initialized.
59*/
60bool shutdown();
61
62/**
63 Get the data dictionary instance.
64
65 @returns 'Dictionary*' pointer to data dictionary instance.
66 Else returns NULL if data dictionary is not
67 initialized.
68*/
69class Dictionary *get_dictionary();
70
71/**
72 Create a instance of data dictionary object of type X.
73 E.g., X could be 'dd::Table', 'dd::View' and etc.
74
75 @returns Pointer to the newly allocated dictionary object.
76*/
77template <typename X>
79
80///////////////////////////////////////////////////////////////////////////
81
82} // namespace dd
83
84#endif // DD__DD_INCLUDED
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
class Dictionary * get_dictionary()
Get the data dictionary instance.
Definition: dd.cc:76
enum_dd_init_type
Definition: dd.h:32
X * create_object()
Create a instance of data dictionary object of type X.
Definition: dd.cc:79
bool shutdown()
Shuts down the data dictionary instance by deleting the instance of dd::Dictionary_impl* upon server ...
Definition: dd.cc:71
bool init(enum_dd_init_type dd_init)
Initialize data dictionary upon server startup, server startup on old data directory or install data ...
Definition: dd.cc:58
#define X(b)
Definition: xcom_base.cc:9161