MySQL 8.0.33
Source Code Documentation
character_sets.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 2023, 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 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 DD_TABLES__CHARACTER_SETS_INCLUDED
24#define DD_TABLES__CHARACTER_SETS_INCLUDED
25
26#include <string>
27
29#include "sql/dd/string_type.h"
31
32class THD;
33
34namespace dd {
35class Global_name_key;
36class Raw_record;
37
38namespace tables {
39
40///////////////////////////////////////////////////////////////////////////
41
43 public:
44 static const Character_sets &instance();
45
46 static const CHARSET_INFO *name_collation();
47
55 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
56 };
57
62 };
63
65
67
68 bool populate(THD *thd) const override;
69
70 // Charset objects are not created and cached, the keys are just referenced
71 // in FK constraints from other tables. Accessing charset information from
72 // within the server is done against the 'all_charsets' global structure.
73 Charset *create_entity_object(const Raw_record &) const override;
74
76 const String_type &charset_name);
77};
78
79///////////////////////////////////////////////////////////////////////////
80
81} // namespace tables
82} // namespace dd
83
84#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:33
Definition: charset.h:45
Definition: entity_object_table_impl.h:45
Definition: object_keys.h:122
Definition: raw_record.h:45
Definition: character_sets.h:42
Charset * create_entity_object(const Raw_record &) const override
Definition: character_sets.cc:165
enum_foreign_keys
Definition: character_sets.h:64
@ FK_DEFAULT_COLLATION_ID
Definition: character_sets.h:64
enum_fields
Definition: character_sets.h:48
@ FIELD_OPTIONS
Definition: character_sets.h:54
@ FIELD_ID
Definition: character_sets.h:49
@ FIELD_MB_MAX_LENGTH
Definition: character_sets.h:53
@ FIELD_NAME
Definition: character_sets.h:50
@ FIELD_COMMENT
Definition: character_sets.h:52
@ FIELD_DEFAULT_COLLATION_ID
Definition: character_sets.h:51
@ NUMBER_OF_FIELDS
Definition: character_sets.h:55
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:58
@ INDEX_UK_DEFAULT_COLLATION_ID
Definition: character_sets.h:61
@ INDEX_PK_ID
Definition: character_sets.h:59
@ INDEX_UK_NAME
Definition: character_sets.h:60
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:42
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Definition: m_ctype.h:382
unsigned int uint
Definition: uca9-dump.cc:74