MySQL  8.0.18
Source Code Documentation
resource_group_basic_types.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
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 also distributed 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 included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef RESOURCEGROUPS_RESOURCE_GROUP_BASIC_TYPES_H_
24 #define RESOURCEGROUPS_RESOURCE_GROUP_BASIC_TYPES_H_
25 
26 #include "lex_string.h"
27 #include "mysql_com.h" // NAME_LEN
28 #include "sql/resourcegroups/platform/thread_attrs_api.h" // platform::cpu_id_t
29 
30 namespace resourcegroups {
31 // Definitions for resource group basic types.
33 struct Range {
34  Range() {}
36  : m_start(start), m_end(end) {}
39 };
40 
41 /**
42  To support logging of multiple warn conditions, these values have been
43  represented as powers of two.
44 */
45 
46 #define WARN_RESOURCE_GROUP_UNSUPPORTED 0x00001
47 #define WARN_RESOURCE_GROUP_UNSUPPORTED_HINT 0x0002
48 #define WARN_RESOURCE_GROUP_TYPE_MISMATCH 0x0004
49 #define WARN_RESOURCE_GROUP_NOT_EXISTS 0x0008
50 #define WARN_RESOURCE_GROUP_ACCESS_DENIED 0x0010
51 
52 class Resource_group;
56  int m_warn;
57 };
58 } // namespace resourcegroups
59 #endif // RESOURCEGROUPS_RESOURCE_GROUP_BASIC_TYPES_H_
platform::cpu_id_t m_start
Definition: resource_group_basic_types.h:37
#define NAME_CHAR_LEN
Field/table name length.
Definition: mysql_com.h:59
int m_warn
Definition: resource_group_basic_types.h:56
platform::cpu_id_t m_end
Definition: resource_group_basic_types.h:38
Class that represents an abstraction of the Resource Group.
Definition: resource_group.h:43
Range()
Definition: resource_group_basic_types.h:34
Range(platform::cpu_id_t start, platform::cpu_id_t end)
Definition: resource_group_basic_types.h:35
uint32_t cpu_id_t
Definition: thread_attrs_api.h:33
Common definition between mysql server & client.
Definition: resource_group_basic_types.h:33
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:188
Definition: resource_group_basic_types.h:53
Type
Definition: resource_group_basic_types.h:32
Resource_group * m_cur_resource_group
Definition: resource_group_basic_types.h:54
Definition: dd_resource_group.h:28
char m_switch_resource_group_str[NAME_CHAR_LEN+1]
Definition: resource_group_basic_types.h:55
static void start(PluginFuncEnv *env)
Definition: http_server_plugin.cc:572