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