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