MySQL 9.0.0
Source Code Documentation
resource_group_basic_types.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 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 RESOURCEGROUPS_RESOURCE_GROUP_BASIC_TYPES_H_
25#define RESOURCEGROUPS_RESOURCE_GROUP_BASIC_TYPES_H_
26
27#include "lex_string.h"
28#include "mysql_com.h" // NAME_LEN
29#include "sql/resourcegroups/platform/thread_attrs_api.h" // platform::cpu_id_t
30
31namespace resourcegroups {
32// Definitions for resource group basic types.
34struct Range {
35 Range() = default;
37 : m_start(start), m_end(end) {}
40};
41
42/**
43 To support logging of multiple warn conditions, these values have been
44 represented as powers of two.
45*/
46
47#define WARN_RESOURCE_GROUP_UNSUPPORTED 0x00001
48#define WARN_RESOURCE_GROUP_UNSUPPORTED_HINT 0x0002
49#define WARN_RESOURCE_GROUP_TYPE_MISMATCH 0x0004
50#define WARN_RESOURCE_GROUP_NOT_EXISTS 0x0008
51#define WARN_RESOURCE_GROUP_ACCESS_DENIED 0x0010
52
53class Resource_group;
57 int m_warn;
58};
59} // namespace resourcegroups
60#endif // RESOURCEGROUPS_RESOURCE_GROUP_BASIC_TYPES_H_
Class that represents an abstraction of the Resource Group.
Definition: resource_group.h:44
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
Common definition between mysql server & client.
#define NAME_CHAR_LEN
Field/table name length.
Definition: mysql_com.h:60
uint32_t cpu_id_t
Definition: thread_attrs_api.h:34
Definition: dd_resource_group.h:29
Type
Definition: resource_group_basic_types.h:33
Definition: resource_group_basic_types.h:34
Range(platform::cpu_id_t start, platform::cpu_id_t end)
Definition: resource_group_basic_types.h:36
platform::cpu_id_t m_start
Definition: resource_group_basic_types.h:38
platform::cpu_id_t m_end
Definition: resource_group_basic_types.h:39
Definition: resource_group_basic_types.h:54
Resource_group * m_cur_resource_group
Definition: resource_group_basic_types.h:55
char m_switch_resource_group_str[NAME_CHAR_LEN+1]
Definition: resource_group_basic_types.h:56
int m_warn
Definition: resource_group_basic_types.h:57