MySQL 8.3.0
Source Code Documentation
collations.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__COLLATIONS_INCLUDED
24#define DD_TABLES__COLLATIONS_INCLUDED
25
26#include <string>
27
29#include "sql/dd/string_type.h"
31
32class THD;
33
34struct CHARSET_INFO;
35
36namespace dd {
37class Global_name_key;
38class Raw_record;
39
40namespace tables {
41
42///////////////////////////////////////////////////////////////////////////
43
45 public:
46 static const Collations &instance();
47
48 static const CHARSET_INFO *name_collation();
49
51 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
69 Collations();
70
71 bool populate(THD *thd) const override;
72
73 Collation *create_entity_object(const Raw_record &) const override;
74
77};
78
79///////////////////////////////////////////////////////////////////////////
80
81} // namespace tables
82} // namespace dd
83
84#endif // DD_TABLES__COLLATIONS_INCLUDED
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
Definition: collation.h:45
Definition: entity_object_table_impl.h:45
Definition: object_keys.h:122
Definition: raw_record.h:45
Definition: collations.h:44
Collations()
Definition: collations.cc:62
bool populate(THD *thd) const override
Execute low level code for populating the table.
Definition: collations.cc:95
enum_indexes
Definition: collations.h:61
@ INDEX_UK_NAME
Definition: collations.h:63
@ INDEX_K_CHARACTER_SET_ID
Definition: collations.h:64
@ INDEX_PK_ID
Definition: collations.h:62
static const CHARSET_INFO * name_collation()
Definition: collations.cc:56
enum_fields
Definition: collations.h:50
@ FIELD_NAME
Definition: collations.h:52
@ FIELD_OPTIONS
Definition: collations.h:57
@ FIELD_PAD_ATTRIBUTE
Definition: collations.h:56
@ FIELD_CHARACTER_SET_ID
Definition: collations.h:53
@ FIELD_IS_COMPILED
Definition: collations.h:54
@ FIELD_SORT_LENGTH
Definition: collations.h:55
@ NUMBER_OF_FIELDS
Definition: collations.h:58
@ FIELD_ID
Definition: collations.h:51
Collation * create_entity_object(const Raw_record &) const override
Definition: collations.cc:177
static const Collations & instance()
Definition: collations.cc:49
enum_foreign_keys
Definition: collations.h:67
@ FK_CHARACTER_SET_ID
Definition: collations.h:67
static bool update_object_key(Global_name_key *key, const String_type &collation_name)
Definition: collations.cc:183
char * collation_name
Definition: audit_api_message_emit.cc:184
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:422