MySQL 8.4.2
Source Code Documentation
character_sets.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_TABLES__CHARACTER_SETS_INCLUDED
25#define DD_TABLES__CHARACTER_SETS_INCLUDED
26
27#include <string>
28
30#include "sql/dd/string_type.h"
32
33class THD;
34
35struct CHARSET_INFO;
36
37namespace dd {
38class Global_name_key;
39class Raw_record;
40
41namespace tables {
42
43///////////////////////////////////////////////////////////////////////////
44
46 public:
47 static const Character_sets &instance();
48
49 static const CHARSET_INFO *name_collation();
50
52 FIELD_ID = static_cast<uint>(Common_field::ID),
58 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
59 };
60
62 INDEX_PK_ID = static_cast<uint>(Common_index::PK_ID),
65 };
66
68
70
71 bool populate(THD *thd) const override;
72
73 // Charset objects are not created and cached, the keys are just referenced
74 // in FK constraints from other tables. Accessing charset information from
75 // within the server is done against the 'all_charsets' global structure.
76 Charset *create_entity_object(const Raw_record &) const override;
77
79 const String_type &charset_name);
80};
81
82///////////////////////////////////////////////////////////////////////////
83
84} // namespace tables
85} // namespace dd
86
87#endif // DD_TABLES__CHARACTER_SETS_INCLUDED
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: charset.h:46
Definition: entity_object_table_impl.h:46
Definition: object_keys.h:123
Definition: raw_record.h:46
Definition: character_sets.h:45
Charset * create_entity_object(const Raw_record &) const override
Definition: character_sets.cc:165
enum_foreign_keys
Definition: character_sets.h:67
@ FK_DEFAULT_COLLATION_ID
Definition: character_sets.h:67
enum_fields
Definition: character_sets.h:51
@ FIELD_OPTIONS
Definition: character_sets.h:57
@ FIELD_ID
Definition: character_sets.h:52
@ FIELD_MB_MAX_LENGTH
Definition: character_sets.h:56
@ FIELD_NAME
Definition: character_sets.h:53
@ FIELD_COMMENT
Definition: character_sets.h:55
@ FIELD_DEFAULT_COLLATION_ID
Definition: character_sets.h:54
@ NUMBER_OF_FIELDS
Definition: character_sets.h:58
static bool update_object_key(Global_name_key *key, const String_type &charset_name)
Definition: character_sets.cc:172
enum_indexes
Definition: character_sets.h:61
@ INDEX_UK_DEFAULT_COLLATION_ID
Definition: character_sets.h:64
@ INDEX_PK_ID
Definition: character_sets.h:62
@ INDEX_UK_NAME
Definition: character_sets.h:63
static const Character_sets & instance()
Definition: character_sets.cc:50
static const CHARSET_INFO * name_collation()
Definition: character_sets.cc:57
bool populate(THD *thd) const override
Execute low level code for populating the table.
Definition: character_sets.cc:98
Character_sets()
Definition: character_sets.cc:63
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
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Definition: m_ctype.h:423