MySQL 8.4.2
Source Code Documentation
pfs_name.h
Go to the documentation of this file.
1/* Copyright (c) 2021, 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 PFS_NAME_H
25#define PFS_NAME_H
26
27/**
28 @file storage/perfschema/pfs_name.h
29 Object names (declarations).
30*/
31
32#include <assert.h>
33#include <string.h>
34
35#include "my_hostname.h" // HOSTNAME_LENGTH
36#include "my_inttypes.h"
38#include "mysql_com.h" // NAME_LEN
39
40/* Not used yet. */
41#define ROLENAME_CHAR_LENGTH 32
42#define ROLENAME_LENGTH (ROLENAME_CHAR_LENGTH * SYSTEM_CHARSET_MBMAXLEN)
43
44struct CHARSET_INFO;
45class Field;
46
47template <int max_length>
49 public:
51
52 PFS_any_name(const PFS_any_name &other) {
53 assert(other.m_length <= max_length);
54
55 if (0 < other.m_length && other.m_length <= max_length) {
56 m_length = other.m_length;
57 memcpy(m_data, other.m_data, m_length);
58 } else {
59 m_length = 0;
60 }
61 }
62
64 assert(other.m_length <= max_length);
65
66 if (0 < other.m_length && other.m_length <= max_length) {
67 m_length = other.m_length;
68 memcpy(m_data, other.m_data, m_length);
69 } else {
70 m_length = 0;
71 }
72 return *this;
73 }
74
75 void reset() { m_length = 0; }
76
77 void set(const char *str, size_t len) {
78 assert(len <= max_length);
79
80 if (0 < len && len <= max_length) {
81 m_length = len;
82 memcpy(m_data, str, len);
83 } else {
84 m_length = 0;
85 }
86 }
87
88 void casedn(const CHARSET_INFO *cs) {
89 /*
90 Conversion in place:
91 - the string is not NUL terminated.
92 - the result after conversion can be shorter.
93 */
94 char *data = reinterpret_cast<char *>(m_data);
95 m_length = cs->cset->casedn(cs, data, m_length, data, m_length);
96 assert(m_length <= max_length);
97 }
98
99 size_t length() const { return m_length; }
100
101 const char *ptr() const { return reinterpret_cast<const char *>(m_data); }
102
103 void hash(const CHARSET_INFO *cs, uint64 *nr1, uint64 *nr2) const {
104 cs->coll->hash_sort(cs, m_data, m_length, nr1, nr2);
105 }
106
107 int sort(const CHARSET_INFO *cs,
108 const PFS_any_name<max_length> *other) const {
109 int cmp;
110 cmp = my_strnncoll(cs, m_data, m_length, other->m_data, other->m_length);
111 return cmp;
112 }
113
114 uchar m_data[max_length];
115 size_t m_length;
116};
117
118template <int max_length>
120 public:
122 m_data = nullptr;
123 m_length = 0;
124 }
125
127 assert(other.m_length <= max_length);
128
129 if (0 < other.m_length && other.m_length <= max_length) {
130 m_data = other.m_data;
131 m_length = other.m_length;
132 } else {
133 m_data = nullptr;
134 m_length = 0;
135 }
136 }
137
139 const PFS_any_name_view<max_length> &other) {
140 assert(other.m_length <= max_length);
141
142 if (0 < other.m_length && other.m_length <= max_length) {
143 m_data = other.m_data;
144 m_length = other.m_length;
145 } else {
146 m_data = nullptr;
147 m_length = 0;
148 }
149 return *this;
150 }
151
152 void reset() {
153 m_data = nullptr;
154 m_length = 0;
155 }
156
157 void set_view(const char *str, size_t len) {
158 assert(len <= max_length);
159
160 if (0 < len && len <= max_length) {
161 m_data = reinterpret_cast<const uchar *>(str);
162 m_length = len;
163 } else {
164 m_data = nullptr;
165 m_length = 0;
166 }
167 }
168
169 size_t length() const { return m_length; }
170
171 const char *ptr() const { return reinterpret_cast<const char *>(m_data); }
172
173 void hash(const CHARSET_INFO *cs, uint64 *nr1, uint64 *nr2) const {
174 cs->coll->hash_sort(cs, m_data, m_length, nr1, nr2);
175 }
176
177 int sort(const CHARSET_INFO *cs,
178 const PFS_any_name_view<max_length> *other) const {
179 int cmp;
180 cmp = my_strnncoll(cs, m_data, m_length, other->m_data, other->m_length);
181 return cmp;
182 }
183
184 const uchar *m_data;
185 size_t m_length;
186};
187
189 public:
190 static void normalize(const char *name, size_t name_len, char *buffer,
191 size_t buffer_len, const char **normalized_name,
192 size_t *normalized_len);
193
194 void reset() { m_name.reset(); }
195
196 void set(const char *str, size_t len);
197
198 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
199
200 int sort(const PFS_schema_name *other) const {
201 return m_name.sort(get_cs(), &other->m_name);
202 }
203
204 size_t length() const { return m_name.length(); }
205 const char *ptr() const { return m_name.ptr(); }
206 const CHARSET_INFO *charset() const { return get_cs(); }
207
208 private:
209 friend struct PFS_schema_name_view;
210
211 static const CHARSET_INFO *get_cs();
213};
214
216 public:
217 void reset() { m_name.reset(); }
218
219 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
220
221 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
222
223 int sort(const PFS_schema_name_view *other) const {
224 return m_name.sort(get_cs(), &other->m_name);
225 }
226
227 size_t length() const { return m_name.length(); }
228 const char *ptr() const { return m_name.ptr(); }
229 const CHARSET_INFO *charset() const { return get_cs(); }
230
231 private:
232 static const CHARSET_INFO *get_cs();
234};
235
237 public:
238 static void normalize(const char *name, size_t name_len, char *buffer,
239 size_t buffer_len, const char **normalized_name,
240 size_t *normalized_len);
241
242 void reset() { m_name.reset(); }
243
244 void set(const char *str, size_t len);
245
246 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
247
248 int sort(const PFS_table_name *other) const {
249 return m_name.sort(get_cs(), &other->m_name);
250 }
251
252 size_t length() const { return m_name.length(); }
253 const char *ptr() const { return m_name.ptr(); }
254 const CHARSET_INFO *charset() const { return get_cs(); }
255
256 private:
257 friend struct PFS_object_name;
258 friend struct PFS_table_name_view;
259
260 static const CHARSET_INFO *get_cs();
262};
263
265 public:
266 void reset() { m_name.reset(); }
267
268 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
269
270 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
271
272 int sort(const PFS_table_name_view *other) const {
273 return m_name.sort(get_cs(), &other->m_name);
274 }
275
276 size_t length() const { return m_name.length(); }
277 const char *ptr() const { return m_name.ptr(); }
278 const CHARSET_INFO *charset() const { return get_cs(); }
279
280 private:
281 friend struct PFS_object_name_view;
282
283 static const CHARSET_INFO *get_cs();
285};
286
288 public:
289 static void normalize(const char *name, size_t name_len, char *buffer,
290 size_t buffer_len, const char **normalized_name,
291 size_t *normalized_len);
292
293 void reset() { m_name.reset(); }
294
295 void set(const char *str, size_t len);
296
297 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
298
299 int sort(const PFS_routine_name *other) const {
300 return m_name.sort(get_cs(), &other->m_name);
301 }
302
303 size_t length() const { return m_name.length(); }
304 const char *ptr() const { return m_name.ptr(); }
305 const CHARSET_INFO *charset() const { return get_cs(); }
306
307 private:
308 friend struct PFS_object_name;
310
311 static const CHARSET_INFO *get_cs();
313};
314
316 public:
317 void reset() { m_name.reset(); }
318
319 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
320
321 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
322
323 int sort(const PFS_routine_name_view *other) const {
324 return m_name.sort(get_cs(), &other->m_name);
325 }
326
327 size_t length() const { return m_name.length(); }
328 const char *ptr() const { return m_name.ptr(); }
329 const CHARSET_INFO *charset() const { return get_cs(); }
330
331 private:
332 friend struct PFS_object_name_view;
333
334 static const CHARSET_INFO *get_cs();
336};
337
339 public:
340 void reset() { m_name.reset(); }
341
342 void set_as_table(const char *str, size_t len);
343 void set_as_routine(const char *str, size_t len);
344
345 void hash_as_table(uint64 *nr1, uint64 *nr2) const {
346 m_name.hash(PFS_table_name::get_cs(), nr1, nr2);
347 }
348
349 int sort_as_table(const PFS_object_name *other) const {
350 return m_name.sort(PFS_table_name::get_cs(), &other->m_name);
351 }
352
353 void hash_as_routine(uint64 *nr1, uint64 *nr2) const {
354 m_name.hash(PFS_routine_name::get_cs(), nr1, nr2);
355 }
356
357 int sort_as_routine(const PFS_object_name *other) const {
358 return m_name.sort(PFS_routine_name::get_cs(), &other->m_name);
359 }
360
362 m_name = other.m_name;
363 return *this;
364 }
365
367 m_name = other.m_name;
368 return *this;
369 }
370
371 size_t length() const { return m_name.length(); }
372 const char *ptr() const { return m_name.ptr(); }
373
374 private:
375 friend struct PFS_object_name_view;
376
378};
379
381 public:
382 void reset() { m_name.reset(); }
383
384 void set_view_as_table(const char *str, size_t len) {
385 m_name.set_view(str, len);
386 }
387 void set_view_as_routine(const char *str, size_t len) {
388 m_name.set_view(str, len);
389 }
390
391 void hash_as_table(uint64 *nr1, uint64 *nr2) const {
392 m_name.hash(PFS_table_name_view::get_cs(), nr1, nr2);
393 }
394
395 int sort_as_table(const PFS_object_name_view *other) const {
396 return m_name.sort(PFS_table_name_view::get_cs(), &other->m_name);
397 }
398
399 void hash_as_routine(uint64 *nr1, uint64 *nr2) const {
400 m_name.hash(PFS_routine_name_view::get_cs(), nr1, nr2);
401 }
402
403 int sort_as_routine(const PFS_object_name_view *other) const {
404 return m_name.sort(PFS_routine_name_view::get_cs(), &other->m_name);
405 }
406
408 m_name = other.m_name;
409 return *this;
410 }
411
413 m_name = other.m_name;
414 return *this;
415 }
416
417 size_t length() const { return m_name.length(); }
418 const char *ptr() const { return m_name.ptr(); }
419
420 private:
422};
423
425 public:
426 static void normalize(const char *name, size_t name_len, char *buffer,
427 size_t buffer_len, const char **normalized_name,
428 size_t *normalized_len);
429
430 void reset() { m_name.reset(); }
431
432 void set(const char *str, size_t len);
433
434 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
435
436 int sort(const PFS_index_name *other) const {
437 return m_name.sort(get_cs(), &other->m_name);
438 }
439
440 size_t length() const { return m_name.length(); }
441 const char *ptr() const { return m_name.ptr(); }
442 const CHARSET_INFO *charset() const { return get_cs(); }
443
444 private:
445 friend struct PFS_index_name_view;
446
447 static const CHARSET_INFO *get_cs();
449};
450
452 public:
453 void reset() { m_name.reset(); }
454
455 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
456
457 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
458
459 int sort(const PFS_index_name_view *other) const {
460 return m_name.sort(get_cs(), &other->m_name);
461 }
462
463 size_t length() const { return m_name.length(); }
464 const char *ptr() const { return m_name.ptr(); }
465 const CHARSET_INFO *charset() const { return get_cs(); }
466
467 private:
468 static const CHARSET_INFO *get_cs();
470};
471
473 public:
474 void reset() { m_name.reset(); }
475
476 void set(const char *str, size_t len);
477
478 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
479
480 int sort(const PFS_user_name *other) const {
481 return m_name.sort(get_cs(), &other->m_name);
482 }
483
484 size_t length() const { return m_name.length(); }
485 const char *ptr() const { return m_name.ptr(); }
486 const CHARSET_INFO *charset() const { return get_cs(); }
487
488 private:
489 friend struct PFS_user_name_view;
490
491 static const CHARSET_INFO *get_cs();
493};
494
496 public:
497 void reset() { m_name.reset(); }
498
499 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
500
501 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
502
503 int sort(const PFS_user_name_view *other) const {
504 return m_name.sort(get_cs(), &other->m_name);
505 }
506
507 size_t length() const { return m_name.length(); }
508 const char *ptr() const { return m_name.ptr(); }
509 const CHARSET_INFO *charset() const { return get_cs(); }
510
511 private:
512 static const CHARSET_INFO *get_cs();
514};
515
517 public:
518 void reset() { m_name.reset(); }
519
520 void set(const char *str, size_t len);
521
522 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
523
524 int sort(const PFS_host_name *other) const {
525 return m_name.sort(get_cs(), &other->m_name);
526 }
527
528 size_t length() const { return m_name.length(); }
529 const char *ptr() const { return m_name.ptr(); }
530 const CHARSET_INFO *charset() const { return get_cs(); }
531
532 private:
533 friend struct PFS_host_name_view;
534
535 static const CHARSET_INFO *get_cs();
537};
538
540 public:
541 void reset() { m_name.reset(); }
542
543 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
544
545 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
546
547 int sort(const PFS_host_name_view *other) const {
548 return m_name.sort(get_cs(), &other->m_name);
549 }
550
551 size_t length() const { return m_name.length(); }
552 const char *ptr() const { return m_name.ptr(); }
553 const CHARSET_INFO *charset() const { return get_cs(); }
554
555 private:
556 static const CHARSET_INFO *get_cs();
558};
559
561 public:
562 void reset() { m_name.reset(); }
563
564 void set(const char *str, size_t len);
565
566 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
567
568 int sort(const PFS_role_name *other) const {
569 return m_name.sort(get_cs(), &other->m_name);
570 }
571
572 size_t length() const { return m_name.length(); }
573 const char *ptr() const { return m_name.ptr(); }
574 const CHARSET_INFO *charset() const { return get_cs(); }
575
576 private:
577 friend struct PFS_role_name_view;
578
579 static const CHARSET_INFO *get_cs();
581};
582
584 public:
585 void reset() { m_name.reset(); }
586
587 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
588
589 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
590
591 int sort(const PFS_role_name_view *other) const {
592 return m_name.sort(get_cs(), &other->m_name);
593 }
594
595 size_t length() const { return m_name.length(); }
596 const char *ptr() const { return m_name.ptr(); }
597 const CHARSET_INFO *charset() const { return get_cs(); }
598
599 private:
600 static const CHARSET_INFO *get_cs();
602};
603
605 public:
606 void reset() { m_name.reset(); }
607
608 void set(const char *str, size_t len);
609
610 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
611
612 int sort(const PFS_file_name *other) const {
613 return m_name.sort(get_cs(), &other->m_name);
614 }
615
616 size_t length() const { return m_name.length(); }
617 const char *ptr() const { return m_name.ptr(); }
618 const CHARSET_INFO *charset() const { return get_cs(); }
619
620 private:
621 friend struct PFS_file_name_view;
622
623 static const CHARSET_INFO *get_cs();
625};
626
628 public:
629 void reset() { m_name.reset(); }
630
631 void set_view(const char *str, size_t len) { m_name.set_view(str, len); }
632
633 void hash(uint64 *nr1, uint64 *nr2) const { m_name.hash(get_cs(), nr1, nr2); }
634
635 int sort(const PFS_file_name_view *other) const {
636 return m_name.sort(get_cs(), &other->m_name);
637 }
638
639 size_t length() const { return m_name.length(); }
640 const char *ptr() const { return m_name.ptr(); }
641 const CHARSET_INFO *charset() const { return get_cs(); }
642
643 private:
644 static const CHARSET_INFO *get_cs();
646};
647
648#endif
Definition: field.h:575
static int cmp(Bigint *a, Bigint *b)
Definition: dtoa.cc:1059
A better implementation of the UNIX ctype(3) library.
int my_strnncoll(const CHARSET_INFO *cs, const uint8_t *a, size_t a_length, const uint8_t *b, size_t b_length)
Definition: m_ctype.h:633
Common definition used by mysys, performance schema and server & client.
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
uint64_t uint64
Definition: my_inttypes.h:69
Common definition between mysql server & client.
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
Definition: commit_order_queue.h:34
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
case opt name
Definition: sslopt-case.h:29
Definition: m_ctype.h:423
Definition: pfs_name.h:119
void reset()
Definition: pfs_name.h:152
void set_view(const char *str, size_t len)
Definition: pfs_name.h:157
PFS_any_name_view(const PFS_any_name_view &other)
Definition: pfs_name.h:126
size_t m_length
Definition: pfs_name.h:185
PFS_any_name_view< max_length > & operator=(const PFS_any_name_view< max_length > &other)
Definition: pfs_name.h:138
void hash(const CHARSET_INFO *cs, uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:173
size_t length() const
Definition: pfs_name.h:169
const char * ptr() const
Definition: pfs_name.h:171
PFS_any_name_view()
Definition: pfs_name.h:121
int sort(const CHARSET_INFO *cs, const PFS_any_name_view< max_length > *other) const
Definition: pfs_name.h:177
const uchar * m_data
Definition: pfs_name.h:184
Definition: pfs_name.h:48
int sort(const CHARSET_INFO *cs, const PFS_any_name< max_length > *other) const
Definition: pfs_name.h:107
void reset()
Definition: pfs_name.h:75
size_t m_length
Definition: pfs_name.h:115
PFS_any_name()
Definition: pfs_name.h:50
const char * ptr() const
Definition: pfs_name.h:101
void casedn(const CHARSET_INFO *cs)
Definition: pfs_name.h:88
void set(const char *str, size_t len)
Definition: pfs_name.h:77
PFS_any_name< max_length > & operator=(const PFS_any_name< max_length > &other)
Definition: pfs_name.h:63
size_t length() const
Definition: pfs_name.h:99
void hash(const CHARSET_INFO *cs, uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:103
uchar m_data[max_length]
Definition: pfs_name.h:114
PFS_any_name(const PFS_any_name &other)
Definition: pfs_name.h:52
Definition: pfs_name.h:627
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:198
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:633
const CHARSET_INFO * charset() const
Definition: pfs_name.h:641
size_t length() const
Definition: pfs_name.h:639
void reset()
Definition: pfs_name.h:629
int sort(const PFS_file_name_view *other) const
Definition: pfs_name.h:635
PFS_any_name_view< FN_REFLEN > m_name
Definition: pfs_name.h:645
const char * ptr() const
Definition: pfs_name.h:640
void set_view(const char *str, size_t len)
Definition: pfs_name.h:631
Definition: pfs_name.h:604
void set(const char *str, size_t len)
Definition: pfs_name.cc:194
const CHARSET_INFO * charset() const
Definition: pfs_name.h:618
int sort(const PFS_file_name *other) const
Definition: pfs_name.h:612
const char * ptr() const
Definition: pfs_name.h:617
void reset()
Definition: pfs_name.h:606
size_t length() const
Definition: pfs_name.h:616
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:610
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:196
PFS_any_name< FN_REFLEN > m_name
Definition: pfs_name.h:624
Definition: pfs_name.h:539
const char * ptr() const
Definition: pfs_name.h:552
PFS_any_name_view< HOSTNAME_LENGTH > m_name
Definition: pfs_name.h:557
void reset()
Definition: pfs_name.h:541
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:182
int sort(const PFS_host_name_view *other) const
Definition: pfs_name.h:547
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:545
void set_view(const char *str, size_t len)
Definition: pfs_name.h:543
size_t length() const
Definition: pfs_name.h:551
const CHARSET_INFO * charset() const
Definition: pfs_name.h:553
Definition: pfs_name.h:516
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:180
const CHARSET_INFO * charset() const
Definition: pfs_name.h:530
int sort(const PFS_host_name *other) const
Definition: pfs_name.h:524
PFS_any_name< HOSTNAME_LENGTH > m_name
Definition: pfs_name.h:536
const char * ptr() const
Definition: pfs_name.h:529
void reset()
Definition: pfs_name.h:518
void set(const char *str, size_t len)
Definition: pfs_name.cc:178
size_t length() const
Definition: pfs_name.h:528
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:522
Definition: pfs_name.h:451
size_t length() const
Definition: pfs_name.h:463
void set_view(const char *str, size_t len)
Definition: pfs_name.h:455
const char * ptr() const
Definition: pfs_name.h:464
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:166
const CHARSET_INFO * charset() const
Definition: pfs_name.h:465
int sort(const PFS_index_name_view *other) const
Definition: pfs_name.h:459
PFS_any_name_view< NAME_LEN > m_name
Definition: pfs_name.h:469
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:457
void reset()
Definition: pfs_name.h:453
Definition: pfs_name.h:424
size_t length() const
Definition: pfs_name.h:440
static void normalize(const char *name, size_t name_len, char *buffer, size_t buffer_len, const char **normalized_name, size_t *normalized_len)
Definition: pfs_name.cc:149
void set(const char *str, size_t len)
Definition: pfs_name.cc:160
const char * ptr() const
Definition: pfs_name.h:441
void reset()
Definition: pfs_name.h:430
int sort(const PFS_index_name *other) const
Definition: pfs_name.h:436
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:434
PFS_any_name< NAME_LEN > m_name
Definition: pfs_name.h:448
const CHARSET_INFO * charset() const
Definition: pfs_name.h:442
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:162
Definition: pfs_name.h:380
void reset()
Definition: pfs_name.h:382
int sort_as_routine(const PFS_object_name_view *other) const
Definition: pfs_name.h:403
void set_view_as_table(const char *str, size_t len)
Definition: pfs_name.h:384
int sort_as_table(const PFS_object_name_view *other) const
Definition: pfs_name.h:395
void hash_as_table(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:391
PFS_object_name_view & operator=(const PFS_routine_name_view &other)
Definition: pfs_name.h:407
size_t length() const
Definition: pfs_name.h:417
PFS_any_name_view< NAME_LEN > m_name
Definition: pfs_name.h:421
void set_view_as_routine(const char *str, size_t len)
Definition: pfs_name.h:387
void hash_as_routine(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:399
PFS_object_name_view & operator=(const PFS_table_name_view &other)
Definition: pfs_name.h:412
const char * ptr() const
Definition: pfs_name.h:418
Definition: pfs_name.h:338
int sort_as_routine(const PFS_object_name *other) const
Definition: pfs_name.h:357
void reset()
Definition: pfs_name.h:340
PFS_any_name< NAME_LEN > m_name
Definition: pfs_name.h:377
const char * ptr() const
Definition: pfs_name.h:372
PFS_object_name & operator=(const PFS_routine_name &other)
Definition: pfs_name.h:361
void set_as_table(const char *str, size_t len)
Definition: pfs_name.cc:136
PFS_object_name & operator=(const PFS_table_name &other)
Definition: pfs_name.h:366
size_t length() const
Definition: pfs_name.h:371
int sort_as_table(const PFS_object_name *other) const
Definition: pfs_name.h:349
void set_as_routine(const char *str, size_t len)
Definition: pfs_name.cc:145
void hash_as_routine(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:353
void hash_as_table(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:345
Definition: pfs_name.h:583
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:589
const char * ptr() const
Definition: pfs_name.h:596
size_t length() const
Definition: pfs_name.h:595
PFS_any_name_view< ROLENAME_LENGTH > m_name
Definition: pfs_name.h:601
void reset()
Definition: pfs_name.h:585
void set_view(const char *str, size_t len)
Definition: pfs_name.h:587
int sort(const PFS_role_name_view *other) const
Definition: pfs_name.h:591
const CHARSET_INFO * charset() const
Definition: pfs_name.h:597
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:190
Definition: pfs_name.h:560
PFS_any_name< ROLENAME_LENGTH > m_name
Definition: pfs_name.h:580
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:566
int sort(const PFS_role_name *other) const
Definition: pfs_name.h:568
size_t length() const
Definition: pfs_name.h:572
void set(const char *str, size_t len)
Definition: pfs_name.cc:186
void reset()
Definition: pfs_name.h:562
const char * ptr() const
Definition: pfs_name.h:573
const CHARSET_INFO * charset() const
Definition: pfs_name.h:574
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:188
Definition: pfs_name.h:315
int sort(const PFS_routine_name_view *other) const
Definition: pfs_name.h:323
const char * ptr() const
Definition: pfs_name.h:328
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:131
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:321
void set_view(const char *str, size_t len)
Definition: pfs_name.h:319
void reset()
Definition: pfs_name.h:317
const CHARSET_INFO * charset() const
Definition: pfs_name.h:329
PFS_any_name_view< NAME_LEN > m_name
Definition: pfs_name.h:335
size_t length() const
Definition: pfs_name.h:327
Definition: pfs_name.h:287
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:297
const CHARSET_INFO * charset() const
Definition: pfs_name.h:305
static void normalize(const char *name, size_t name_len, char *buffer, size_t buffer_len, const char **normalized_name, size_t *normalized_len)
Definition: pfs_name.cc:112
void reset()
Definition: pfs_name.h:293
size_t length() const
Definition: pfs_name.h:303
PFS_any_name< NAME_LEN > m_name
Definition: pfs_name.h:312
const char * ptr() const
Definition: pfs_name.h:304
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:127
int sort(const PFS_routine_name *other) const
Definition: pfs_name.h:299
void set(const char *str, size_t len)
Definition: pfs_name.cc:123
Definition: pfs_name.h:215
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:76
void reset()
Definition: pfs_name.h:217
int sort(const PFS_schema_name_view *other) const
Definition: pfs_name.h:223
void set_view(const char *str, size_t len)
Definition: pfs_name.h:219
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:221
size_t length() const
Definition: pfs_name.h:227
PFS_any_name_view< NAME_LEN > m_name
Definition: pfs_name.h:233
const CHARSET_INFO * charset() const
Definition: pfs_name.h:229
const char * ptr() const
Definition: pfs_name.h:228
Definition: pfs_name.h:188
size_t length() const
Definition: pfs_name.h:204
void set(const char *str, size_t len)
Definition: pfs_name.cc:64
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:72
const CHARSET_INFO * charset() const
Definition: pfs_name.h:206
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:198
int sort(const PFS_schema_name *other) const
Definition: pfs_name.h:200
const char * ptr() const
Definition: pfs_name.h:205
static void normalize(const char *name, size_t name_len, char *buffer, size_t buffer_len, const char **normalized_name, size_t *normalized_len)
Definition: pfs_name.cc:48
void reset()
Definition: pfs_name.h:194
PFS_any_name< NAME_LEN > m_name
Definition: pfs_name.h:212
Definition: pfs_name.h:264
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:108
void reset()
Definition: pfs_name.h:266
int sort(const PFS_table_name_view *other) const
Definition: pfs_name.h:272
PFS_any_name_view< NAME_LEN > m_name
Definition: pfs_name.h:284
size_t length() const
Definition: pfs_name.h:276
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:270
const CHARSET_INFO * charset() const
Definition: pfs_name.h:278
void set_view(const char *str, size_t len)
Definition: pfs_name.h:268
const char * ptr() const
Definition: pfs_name.h:277
Definition: pfs_name.h:236
const CHARSET_INFO * charset() const
Definition: pfs_name.h:254
void reset()
Definition: pfs_name.h:242
PFS_any_name< NAME_LEN > m_name
Definition: pfs_name.h:261
const char * ptr() const
Definition: pfs_name.h:253
static void normalize(const char *name, size_t name_len, char *buffer, size_t buffer_len, const char **normalized_name, size_t *normalized_len)
Definition: pfs_name.cc:80
int sort(const PFS_table_name *other) const
Definition: pfs_name.h:248
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:246
void set(const char *str, size_t len)
Definition: pfs_name.cc:96
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:104
size_t length() const
Definition: pfs_name.h:252
Definition: pfs_name.h:495
PFS_any_name_view< USERNAME_LENGTH > m_name
Definition: pfs_name.h:513
void reset()
Definition: pfs_name.h:497
void set_view(const char *str, size_t len)
Definition: pfs_name.h:499
const char * ptr() const
Definition: pfs_name.h:508
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:174
const CHARSET_INFO * charset() const
Definition: pfs_name.h:509
size_t length() const
Definition: pfs_name.h:507
int sort(const PFS_user_name_view *other) const
Definition: pfs_name.h:503
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:501
Definition: pfs_name.h:472
const char * ptr() const
Definition: pfs_name.h:485
size_t length() const
Definition: pfs_name.h:484
void set(const char *str, size_t len)
Definition: pfs_name.cc:170
void reset()
Definition: pfs_name.h:474
int sort(const PFS_user_name *other) const
Definition: pfs_name.h:480
static const CHARSET_INFO * get_cs()
Definition: pfs_name.cc:172
PFS_any_name< USERNAME_LENGTH > m_name
Definition: pfs_name.h:492
const CHARSET_INFO * charset() const
Definition: pfs_name.h:486
void hash(uint64 *nr1, uint64 *nr2) const
Definition: pfs_name.h:478