MySQL 8.0.37
Source Code Documentation
global.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 DD_UPGRADE__GLOBAL_H_INCLUDED
25#define DD_UPGRADE__GLOBAL_H_INCLUDED
26
27#include <sys/types.h>
28
29#include "sql/table.h" // Table_check_intact
30
31class THD;
32class Time_zone;
33
34namespace dd {
35
36namespace upgrade_57 {
37
38const String_type ISL_EXT = ".isl";
39const String_type PAR_EXT = ".par";
40const String_type OPT_EXT = ".opt";
41const String_type NDB_EXT = ".ndb";
42extern const char *TRN_EXT;
43extern const char *TRG_EXT;
44
45const String_type IBD_EXT = ".ibd";
46const String_type index_stats = "innodb_index_stats";
47const String_type index_stats_backup = "innodb_index_stats_backup57";
48const String_type table_stats = "innodb_table_stats";
49const String_type table_stats_backup = "innodb_table_stats_backup57";
50
51/**
52 THD::mem_root is only switched with the given mem_root and switched back
53 on destruction. This does not free any mem_root.
54 */
58
59 public:
62};
63
64/**
65 RAII for handling open and close of event and proc tables.
66*/
67
71
72 public:
75};
76
77/**
78 Class to check the system tables we are using from 5.7 are
79 not corrupted before migrating the information to new DD.
80*/
82 protected:
83 void report_error(uint, const char *fmt, ...) override
84 MY_ATTRIBUTE((format(printf, 3, 4)));
85};
86
87} // namespace upgrade_57
88} // namespace dd
89#endif // DD_UPGRADE__GLOBAL_H_INCLUDED
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Definition: table.h:594
This class represents abstract time zone and provides basic interface for MYSQL_TIME <-> my_time_t co...
Definition: tztime.h:49
Class to check the system tables we are using from 5.7 are not corrupted before migrating the informa...
Definition: global.h:81
void report_error(uint, const char *fmt,...) override
Definition: global.cc:60
RAII for handling open and close of event and proc tables.
Definition: global.h:68
TABLE * m_table
Definition: global.h:70
THD * m_thd
Definition: global.h:69
~System_table_close_guard()
Definition: global.cc:55
System_table_close_guard(THD *thd, TABLE *table)
Definition: global.cc:52
THD::mem_root is only switched with the given mem_root and switched back on destruction.
Definition: global.h:55
MEM_ROOT * m_thd_prev_mem_root
Definition: global.h:57
THD * m_thd
Definition: global.h:56
~Thd_mem_root_guard()
Definition: global.cc:48
Thd_mem_root_guard(THD *thd, MEM_ROOT *mem_root)
Definition: global.cc:42
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
const String_type IBD_EXT
Definition: global.h:45
const String_type index_stats_backup
Definition: global.h:47
const String_type index_stats
Definition: global.h:46
const char * TRG_EXT
Definition: global.cc:40
const char * TRN_EXT
Definition: global.cc:39
const String_type table_stats_backup
Definition: global.h:49
const String_type PAR_EXT
Definition: global.h:39
const String_type table_stats
Definition: global.h:48
const String_type ISL_EXT
Definition: global.h:38
const String_type NDB_EXT
Definition: global.h:41
const String_type OPT_EXT
Definition: global.h:40
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: table.h:1398
unsigned int uint
Definition: uca9-dump.cc:75