MySQL 8.0.32
Source Code Documentation
item_strfunc.h
Go to the documentation of this file.
1/* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23/* This file defines all string functions */
24#ifndef ITEM_STRFUNC_INCLUDED
25#define ITEM_STRFUNC_INCLUDED
26
27#include <assert.h>
28#include <sys/types.h>
29
30#include <cstdint> // uint32_t
31
32#include "lex_string.h"
33#include "libbinlogevents/include/uuid.h" // Uuid
34#include "m_ctype.h"
35
36#include "my_hostname.h" // HOSTNAME_LENGTH
37#include "my_inttypes.h"
38#include "my_table_map.h"
39#include "my_time.h"
41#include "mysql_com.h"
42#include "mysql_time.h"
43#include "sql/enum_query_type.h"
44#include "sql/field.h"
45#include "sql/item.h"
46#include "sql/item_cmpfunc.h" // Item_bool_func
47#include "sql/item_func.h" // Item_func
48#include "sql/parse_location.h" // POS
49#include "sql/sql_const.h"
50#include "sql_string.h"
51#include "template_utils.h" // pointer_cast
52
53class MY_LOCALE;
54class PT_item_list;
55class THD;
56class my_decimal;
57struct Parse_context;
58
59template <class T>
60class List;
61
63 const char *name, CHARSET_INFO *name_cs = system_charset_info);
64
65/**
66 Generate Universal Unique Identifier (UUID).
67
68 @param str Pointer to string which will hold the UUID.
69
70 @return str Pointer to string which contains the UUID.
71*/
72
74
75class Item_str_func : public Item_func {
77
78 public:
80
81 explicit Item_str_func(const POS &pos) : super(pos) {}
82
84
85 Item_str_func(const POS &pos, Item *a) : Item_func(pos, a) {}
86
87 Item_str_func(Item *a, Item *b) : Item_func(a, b) {}
88
89 Item_str_func(const POS &pos, Item *a, Item *b) : Item_func(pos, a, b) {}
90
91 Item_str_func(Item *a, Item *b, Item *c) : Item_func(a, b, c) {}
92
93 Item_str_func(const POS &pos, Item *a, Item *b, Item *c)
94 : Item_func(pos, a, b, c) {}
95
96 Item_str_func(Item *a, Item *b, Item *c, Item *d) : Item_func(a, b, c, d) {}
97
98 Item_str_func(const POS &pos, Item *a, Item *b, Item *c, Item *d)
99 : Item_func(pos, a, b, c, d) {}
100
101 Item_str_func(Item *a, Item *b, Item *c, Item *d, Item *e)
102 : Item_func(a, b, c, d, e) {}
103
104 Item_str_func(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e)
105 : Item_func(pos, a, b, c, d, e) {}
106 Item_str_func(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e,
107 Item *f)
108 : Item_func(pos, a, b, c, d, e, f) {}
110
111 Item_str_func(const POS &pos, PT_item_list *opt_list)
112 : Item_func(pos, opt_list) {}
113
114 longlong val_int() override { return val_int_from_string(); }
115 double val_real() override { return val_real_from_string(); }
116 my_decimal *val_decimal(my_decimal *) override;
117 bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override {
118 return get_date_from_string(ltime, fuzzydate);
119 }
120 bool get_time(MYSQL_TIME *ltime) override {
121 return get_time_from_string(ltime);
122 }
123 enum Item_result result_type() const override { return STRING_RESULT; }
124 void left_right_max_length(THD *thd);
125 bool fix_fields(THD *thd, Item **ref) override;
126 bool resolve_type(THD *thd) override {
127 if (param_type_is_default(thd, 0, -1)) return true;
128 return false;
129 }
131
132 protected:
133 /**
134 Calls push_warning_printf for packet overflow.
135 @return error_str().
136 */
137 String *push_packet_overflow_warning(THD *thd, const char *func);
138};
139
140/*
141 Functions that return values with ASCII repertoire
142*/
145
146 public:
149 }
150
153 }
154 Item_str_ascii_func(const POS &pos, Item *a) : Item_str_func(pos, a) {
156 }
157
160 }
161 Item_str_ascii_func(const POS &pos, Item *a, Item *b)
162 : Item_str_func(pos, a, b) {
164 }
165
168 }
169 Item_str_ascii_func(const POS &pos, Item *a, Item *b, Item *c)
170 : Item_str_func(pos, a, b, c) {
172 }
173
174 String *val_str(String *str) override {
176 }
177 String *val_str_ascii(String *) override = 0;
178};
179
180class Item_func_md5 final : public Item_str_ascii_func {
182
183 public:
184 Item_func_md5(const POS &pos, Item *a) : Item_str_ascii_func(pos, a) {}
185 String *val_str_ascii(String *) override;
186 bool resolve_type(THD *thd) override;
187 const char *func_name() const override { return "md5"; }
188};
189
191 public:
192 Item_func_sha(const POS &pos, Item *a) : Item_str_ascii_func(pos, a) {}
193 String *val_str_ascii(String *) override;
194 bool resolve_type(THD *thd) override;
195 const char *func_name() const override { return "sha"; }
196};
197
199 public:
200 Item_func_sha2(const POS &pos, Item *a, Item *b)
201 : Item_str_ascii_func(pos, a, b) {}
202 String *val_str_ascii(String *) override;
203 bool resolve_type(THD *thd) override;
204 const char *func_name() const override { return "sha2"; }
205};
206
209
210 public:
211 Item_func_to_base64(const POS &pos, Item *a) : Item_str_ascii_func(pos, a) {}
212 String *val_str_ascii(String *) override;
213 bool resolve_type(THD *) override;
214 const char *func_name() const override { return "to_base64"; }
215};
216
218 public:
219 Item_func_statement_digest(const POS &pos, Item *query_string)
220 : Item_str_ascii_func(pos, query_string) {}
221
222 const char *func_name() const override { return "statement_digest"; }
223 bool check_function_as_value_generator(uchar *checker_args) override {
225 pointer_cast<Check_function_as_value_generator_parameters *>(
226 checker_args);
227 func_arg->banned_function_name = func_name();
228 return (func_arg->source == VGS_GENERATED_COLUMN);
229 }
230
231 bool resolve_type(THD *thd) override;
232
233 String *val_str_ascii(String *) override;
234
235 private:
237};
238
240 public:
241 Item_func_statement_digest_text(const POS &pos, Item *query_string)
242 : Item_str_func(pos, query_string) {}
243
244 const char *func_name() const override { return "statement_digest_text"; }
245
246 /**
247 The type is always LONGTEXT, just like the digest_text columns in
248 Performance Schema
249 */
250 bool resolve_type(THD *thd) override;
251
252 bool check_function_as_value_generator(uchar *checker_args) override {
254 pointer_cast<Check_function_as_value_generator_parameters *>(
255 checker_args);
256 func_arg->banned_function_name = func_name();
257 return (func_arg->source == VGS_GENERATED_COLUMN);
258 }
259 String *val_str(String *) override;
260
261 private:
263};
264
267
268 public:
269 Item_func_from_base64(const POS &pos, Item *a) : Item_str_func(pos, a) {}
270 String *val_str(String *) override;
271 bool resolve_type(THD *thd) override;
272 const char *func_name() const override { return "from_base64"; }
273};
274
278
279 public:
280 Item_func_aes_encrypt(const POS &pos, Item *a, Item *b)
281 : Item_str_func(pos, a, b) {}
282 Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c)
283 : Item_str_func(pos, a, b, c) {}
284 Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d)
285 : Item_str_func(pos, a, b, c, d) {}
286 Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d,
287 Item *e)
288 : Item_str_func(pos, a, b, c, d, e) {}
289 Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d,
290 Item *e, Item *f)
291 : Item_str_func(pos, a, b, c, d, e, f) {}
292 bool itemize(Parse_context *pc, Item **res) override;
293 String *val_str(String *) override;
294 bool resolve_type(THD *) override;
295 const char *func_name() const override { return "aes_encrypt"; }
296};
297
300
301 public:
302 Item_func_aes_decrypt(const POS &pos, Item *a, Item *b)
303 : Item_str_func(pos, a, b) {}
304 Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c)
305 : Item_str_func(pos, a, b, c) {}
306 Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d)
307 : Item_str_func(pos, a, b, c, d) {}
308 Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d,
309 Item *e)
310 : Item_str_func(pos, a, b, c, d, e) {}
311 Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d,
312 Item *e, Item *f)
313 : Item_str_func(pos, a, b, c, d, e, f) {}
314 bool itemize(Parse_context *pc, Item **res) override;
315 String *val_str(String *) override;
316 bool resolve_type(THD *thd) override;
317 const char *func_name() const override { return "aes_decrypt"; }
318};
319
322
323 /** limitation from the SSL library */
325
326 public:
327 Item_func_random_bytes(const POS &pos, Item *a) : Item_str_func(pos, a) {}
328
329 bool itemize(Parse_context *pc, Item **res) override;
330 bool resolve_type(THD *thd) override;
331 String *val_str(String *a) override;
332
333 const char *func_name() const override { return "random_bytes"; }
334};
335
337 String tmp_value{"", 0, collation.collation}; // Initialize to empty
338 public:
339 Item_func_concat(const POS &pos, PT_item_list *opt_list)
340 : Item_str_func(pos, opt_list) {}
342 Item_func_concat(const POS &pos, Item *a, Item *b)
343 : Item_str_func(pos, a, b) {}
344
345 String *val_str(String *) override;
346 bool resolve_type(THD *thd) override;
347 const char *func_name() const override { return "concat"; }
348};
349
351 String tmp_value{"", 0, collation.collation}; // Initialize to empty
352 public:
355 null_on_null = false;
356 }
357 Item_func_concat_ws(const POS &pos, PT_item_list *opt_list)
358 : Item_str_func(pos, opt_list) {
359 null_on_null = false;
360 }
361 String *val_str(String *) override;
362 bool resolve_type(THD *thd) override;
363 const char *func_name() const override { return "concat_ws"; }
364};
365
368
369 public:
371 Item_func_reverse(const POS &pos, Item *a) : Item_str_func(pos, a) {}
372
373 String *val_str(String *) override;
374 bool resolve_type(THD *thd) override;
375 const char *func_name() const override { return "reverse"; }
376};
377
380 /// Holds result in case we need to allocate our own result buffer.
382
383 public:
385 : Item_str_func(pos, org, find, replace) {}
386 String *val_str(String *) override;
387 bool resolve_type(THD *thd) override;
388 const char *func_name() const override { return "replace"; }
389};
390
393 /// Holds result in case we need to allocate our own result buffer.
395
396 public:
398 Item *new_str)
399 : Item_str_func(pos, org, start, length, new_str) {}
400 String *val_str(String *) override;
401 bool resolve_type(THD *thd) override;
402 const char *func_name() const override { return "insert"; }
403};
404
406 protected:
410
411 public:
412 Item_str_conv(const POS &pos, Item *item) : Item_str_func(pos, item) {}
413 String *val_str(String *) override;
414};
415
417 public:
418 Item_func_lower(const POS &pos, Item *item) : Item_str_conv(pos, item) {}
419 const char *func_name() const override { return "lower"; }
420 bool resolve_type(THD *) override;
421};
422
424 public:
425 Item_func_upper(const POS &pos, Item *item) : Item_str_conv(pos, item) {}
426 const char *func_name() const override { return "upper"; }
427 bool resolve_type(THD *) override;
428};
429
432
433 public:
434 Item_func_left(const POS &pos, Item *a, Item *b) : Item_str_func(pos, a, b) {}
435 String *val_str(String *) override;
436 bool resolve_type(THD *thd) override;
437 const char *func_name() const override { return "left"; }
438};
439
442
443 public:
444 Item_func_right(const POS &pos, Item *a, Item *b)
445 : Item_str_func(pos, a, b) {}
446 String *val_str(String *) override;
447 bool resolve_type(THD *thd) override;
448 const char *func_name() const override { return "right"; }
449};
450
453
455
456 public:
458 Item_func_substr(const POS &pos, Item *a, Item *b) : super(pos, a, b) {}
459
460 Item_func_substr(Item *a, Item *b, Item *c) : Item_str_func(a, b, c) {}
461 Item_func_substr(const POS &pos, Item *a, Item *b, Item *c)
462 : super(pos, a, b, c) {}
463
464 String *val_str(String *) override;
465 bool resolve_type(THD *thd) override;
466 const char *func_name() const override { return "substr"; }
467};
468
471
472 public:
473 Item_func_substr_index(const POS &pos, Item *a, Item *b, Item *c)
474 : Item_str_func(pos, a, b, c) {}
475 String *val_str(String *) override;
476 bool resolve_type(THD *) override;
477 const char *func_name() const override { return "substring_index"; }
478};
479
481 public:
482 /**
483 Why all the trim modes in this enum?
484 We need to maintain parsing information, so that our print() function
485 can reproduce correct messages and view definitions.
486 */
494 };
495
496 private:
500 const bool m_trim_leading;
501 const bool m_trim_trailing;
502
503 public:
505 : Item_str_func(a, b),
506 m_trim_mode(tm),
509
510 Item_func_trim(const POS &pos, Item *a, Item *b, TRIM_MODE tm)
511 : Item_str_func(pos, a, b),
512 m_trim_mode(tm),
515
517 : Item_str_func(a),
518 m_trim_mode(tm),
521
522 Item_func_trim(const POS &pos, Item *a, TRIM_MODE tm)
523 : Item_str_func(pos, a),
524 m_trim_mode(tm),
527
528 bool trim_leading() const {
531 }
532
533 bool trim_trailing() const {
536 }
537
538 String *val_str(String *) override;
539 bool resolve_type(THD *) override;
540 const char *func_name() const override {
541 switch (m_trim_mode) {
543 return "trim";
544 case TRIM_BOTH:
545 return "trim";
546 case TRIM_LEADING:
547 return "ltrim";
548 case TRIM_TRAILING:
549 return "rtrim";
550 case TRIM_LTRIM:
551 return "ltrim";
552 case TRIM_RTRIM:
553 return "rtrim";
554 }
555 return nullptr;
556 }
557 void print(const THD *thd, String *str,
558 enum_query_type query_type) const override;
559};
560
561class Item_func_ltrim final : public Item_func_trim {
562 public:
563 Item_func_ltrim(const POS &pos, Item *a)
564 : Item_func_trim(pos, a, TRIM_LTRIM) {}
565};
566
567class Item_func_rtrim final : public Item_func_trim {
568 public:
569 Item_func_rtrim(const POS &pos, Item *a)
570 : Item_func_trim(pos, a, TRIM_RTRIM) {}
571};
572
575
576 public:
579 }
580 explicit Item_func_sysconst(const POS &pos) : super(pos) {
582 }
583
584 Item *safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override;
585 /*
586 Used to create correct Item name in new converted item in
587 safe_charset_converter, return string representation of this function
588 call
589 */
590 virtual const Name_string fully_qualified_func_name() const = 0;
591 bool check_function_as_value_generator(uchar *checker_args) override {
593 pointer_cast<Check_function_as_value_generator_parameters *>(
594 checker_args);
595 func_arg->banned_function_name = func_name();
596 return ((func_arg->source == VGS_GENERATED_COLUMN) ||
597 (func_arg->source == VGS_CHECK_CONSTRAINT));
598 }
599};
600
603
604 public:
605 explicit Item_func_database(const POS &pos) : Item_func_sysconst(pos) {}
606
607 bool itemize(Parse_context *pc, Item **res) override;
608
609 String *val_str(String *) override;
610 bool resolve_type(THD *) override {
612 set_nullable(true);
613 return false;
614 }
615 const char *func_name() const override { return "database"; }
616 const Name_string fully_qualified_func_name() const override {
617 return NAME_STRING("database()");
618 }
619};
620
623
624 protected:
625 /// True when function value is evaluated, set to false after each execution
626 bool m_evaluated = false;
627
628 /// Evaluate user name, must be called once per execution
629 bool evaluate(const char *user, const char *host);
630 type_conversion_status save_in_field_inner(Field *field, bool) override;
631
632 public:
634 explicit Item_func_user(const POS &pos) : super(pos) {
636 }
637
639 return INNER_TABLE_BIT;
640 }
641
642 bool itemize(Parse_context *pc, Item **res) override;
643
644 bool check_function_as_value_generator(uchar *checker_args) override {
646 pointer_cast<Check_function_as_value_generator_parameters *>(
647 checker_args);
648 func_arg->banned_function_name = func_name();
649 return true;
650 }
651 bool resolve_type(THD *) override {
653 return false;
654 }
655 void cleanup() override {
656 m_evaluated = false;
659 }
660 const char *func_name() const override { return "user"; }
661 const Name_string fully_qualified_func_name() const override {
662 return NAME_STRING("user()");
663 }
664
665 String *val_str(String *) override;
666};
667
670
672
673 protected:
674 type_conversion_status save_in_field_inner(Field *field, bool) override;
675
676 public:
677 explicit Item_func_current_user(const POS &pos) : super(pos) {}
678
679 bool itemize(Parse_context *pc, Item **res) override;
680 const char *func_name() const override { return "current_user"; }
681 const Name_string fully_qualified_func_name() const override {
682 return NAME_STRING("current_user()");
683 }
684
685 String *val_str(String *) override;
686};
687
690
691 public:
693 Item_func_soundex(const POS &pos, Item *a) : Item_str_func(pos, a) {}
694 String *val_str(String *) override;
695 bool resolve_type(THD *thd) override;
696 const char *func_name() const override { return "soundex"; }
697};
698
699class Item_func_elt final : public Item_str_func {
700 public:
701 Item_func_elt(const POS &pos, PT_item_list *opt_list)
702 : Item_str_func(pos, opt_list) {}
703 double val_real() override;
704 longlong val_int() override;
705 String *val_str(String *str) override;
706 bool resolve_type(THD *thd) override;
707 const char *func_name() const override { return "elt"; }
708};
709
710class Item_func_make_set final : public Item_str_func {
712
715
716 public:
717 Item_func_make_set(const POS &pos, Item *a, PT_item_list *opt_list)
718 : Item_str_func(pos, opt_list), item(a) {}
719
720 bool itemize(Parse_context *pc, Item **res) override;
721 String *val_str(String *str) override;
722 bool fix_fields(THD *thd, Item **ref) override {
723 assert(fixed == 0);
724 bool res = ((!item->fixed && item->fix_fields(thd, &item)) ||
727 return res;
728 }
729 void split_sum_func(THD *thd, Ref_item_array ref_item_array,
730 mem_root_deque<Item *> *fields) override;
731 bool resolve_type(THD *) override;
732 void update_used_tables() override;
733 const char *func_name() const override { return "make_set"; }
734
735 bool walk(Item_processor processor, enum_walk walk, uchar *arg) override {
736 if ((walk & enum_walk::PREFIX) && (this->*processor)(arg)) return true;
737 if (item->walk(processor, walk, arg)) return true;
738 for (uint i = 0; i < arg_count; i++) {
739 if (args[i]->walk(processor, walk, arg)) return true;
740 }
741 return ((walk & enum_walk::POSTFIX) && (this->*processor)(arg));
742 }
743
744 Item *transform(Item_transformer transformer, uchar *arg) override;
745 void print(const THD *thd, String *str,
746 enum_query_type query_type) const override;
747};
748
752
753 public:
754 Item_func_format(const POS &pos, Item *org, Item *dec)
755 : Item_str_ascii_func(pos, org, dec) {}
756 Item_func_format(const POS &pos, Item *org, Item *dec, Item *lang)
757 : Item_str_ascii_func(pos, org, dec, lang) {}
758
759 MY_LOCALE *get_locale(Item *item);
760 String *val_str_ascii(String *) override;
761 bool resolve_type(THD *thd) override;
762 const char *func_name() const override { return "format"; }
763 void print(const THD *thd, String *str,
764 enum_query_type query_type) const override;
765};
766
767class Item_func_char final : public Item_str_func {
768 public:
770 : Item_str_func(pos, list) {
772 }
774 : Item_str_func(pos, list) {
776 }
777 String *val_str(String *) override;
778 bool resolve_type(THD *thd) override {
779 if (param_type_is_default(thd, 0, -1, MYSQL_TYPE_LONGLONG)) return true;
781 return false;
782 }
783 const char *func_name() const override { return "char"; }
784};
785
786class Item_func_repeat final : public Item_str_func {
788
789 public:
790 Item_func_repeat(const POS &pos, Item *arg1, Item *arg2)
791 : Item_str_func(pos, arg1, arg2) {}
792 String *val_str(String *) override;
793 bool resolve_type(THD *thd) override;
794 const char *func_name() const override { return "repeat"; }
795};
796
797class Item_func_space final : public Item_str_func {
798 public:
799 Item_func_space(const POS &pos, Item *arg1) : Item_str_func(pos, arg1) {}
800 String *val_str(String *) override;
801 bool resolve_type(THD *) override;
802 const char *func_name() const override { return "space"; }
803};
804
805class Item_func_rpad final : public Item_str_func {
807
808 public:
809 Item_func_rpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
810 : Item_str_func(pos, arg1, arg2, arg3) {}
811 String *val_str(String *) override;
812 bool resolve_type(THD *) override;
813 const char *func_name() const override { return "rpad"; }
814};
815
816class Item_func_lpad final : public Item_str_func {
818
819 public:
820 Item_func_lpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
821 : Item_str_func(pos, arg1, arg2, arg3) {}
822 String *val_str(String *) override;
823 bool resolve_type(THD *) override;
824 const char *func_name() const override { return "lpad"; }
825};
826
828 /// Buffer to store the binary result
830
831 public:
832 Item_func_uuid_to_bin(const POS &pos, Item *arg1)
833 : Item_str_func(pos, arg1) {}
834 Item_func_uuid_to_bin(const POS &pos, Item *arg1, Item *arg2)
835 : Item_str_func(pos, arg1, arg2) {}
836 String *val_str(String *) override;
837 bool resolve_type(THD *) override;
838 const char *func_name() const override { return "uuid_to_bin"; }
839};
840
842 /// Buffer to store the text result
844
845 public:
846 Item_func_bin_to_uuid(const POS &pos, Item *arg1)
847 : Item_str_ascii_func(pos, arg1) {}
848 Item_func_bin_to_uuid(const POS &pos, Item *arg1, Item *arg2)
849 : Item_str_ascii_func(pos, arg1, arg2) {}
850 String *val_str_ascii(String *) override;
851 bool resolve_type(THD *thd) override;
852 const char *func_name() const override { return "bin_to_uuid"; }
853};
854
855class Item_func_is_uuid final : public Item_bool_func {
857
858 public:
859 Item_func_is_uuid(const POS &pos, Item *a) : Item_bool_func(pos, a) {}
860 longlong val_int() override;
861 const char *func_name() const override { return "is_uuid"; }
862 bool resolve_type(THD *thd) override {
863 bool res = super::resolve_type(thd);
864 set_nullable(true);
865 return res;
866 }
867};
868
869class Item_func_conv final : public Item_str_func {
870 public:
871 // 64 digits plus possible '-'.
872 static constexpr uint32_t CONV_MAX_LENGTH = 64U + 1U;
873 Item_func_conv(const POS &pos, Item *a, Item *b, Item *c)
874 : Item_str_func(pos, a, b, c) {}
875 const char *func_name() const override { return "conv"; }
876 String *val_str(String *) override;
877 bool resolve_type(THD *) override;
878};
879
882
883 public:
884 Item_func_hex(const POS &pos, Item *a) : Item_str_ascii_func(pos, a) {}
885 const char *func_name() const override { return "hex"; }
886 String *val_str_ascii(String *) override;
887 bool resolve_type(THD *thd) override;
888};
889
890class Item_func_unhex final : public Item_str_func {
892
893 public:
894 Item_func_unhex(const POS &pos, Item *a) : Item_str_func(pos, a) {
895 /* there can be bad hex strings */
896 set_nullable(true);
897 }
898 const char *func_name() const override { return "unhex"; }
899 String *val_str(String *) override;
900 bool resolve_type(THD *thd) override;
901};
902
903#ifndef NDEBUG
905 protected:
908 const bool is_min;
909
910 public:
911 Item_func_like_range(const POS &pos, Item *a, Item *b, bool is_min_arg)
912 : Item_str_func(pos, a, b), is_min(is_min_arg) {
913 set_nullable(true);
914 }
915 String *val_str(String *) override;
916 bool resolve_type(THD *thd) override {
917 if (param_type_is_default(thd, 0, 1)) return true;
918 if (param_type_is_default(thd, 1, 2, MYSQL_TYPE_LONGLONG)) return true;
920 return false;
921 }
922};
923
925 public:
927 : Item_func_like_range(pos, a, b, true) {}
928 const char *func_name() const override { return "like_range_min"; }
929};
930
932 public:
934 : Item_func_like_range(pos, a, b, false) {}
935 const char *func_name() const override { return "like_range_max"; }
936};
937#endif
938
939/**
940 The following types of conversions are considered safe:
941
942 Conversion to and from "binary".
943 Conversion to Unicode.
944 Other kind of conversions are potentially lossy.
945*/
947 protected:
948 /// If true, conversion is needed so do it, else allow string copy.
950 /// The character set we are converting to
952 /// The character set we are converting from
953 const CHARSET_INFO *m_from_cs{nullptr};
955 /// Marks whether the underlying Item is constant and may be cached.
957 /// Length argument value, if any given.
958 longlong m_cast_length{-1}; // a priori not used
959 public:
960 bool m_safe;
961
962 protected:
963 /**
964 Helper for CAST and CONVERT type resolution: common logic to compute the
965 maximum numbers of characters of the type of the conversion.
966
967 @returns the maximum numbers of characters possible after the conversion
968 */
970
971 bool resolve_type(THD *thd) override;
972
973 public:
975 bool cache_if_const)
976 : Item_str_func(a), m_cast_cs(cs_arg) {
977 if (cache_if_const && args[0]->may_evaluate_const(thd)) {
978 uint errors = 0;
979 String tmp, *str = args[0]->val_str(&tmp);
980 if (!str || str_value.copy(str->ptr(), str->length(), str->charset(),
981 m_cast_cs, &errors))
982 null_value = true;
983 m_use_cached_value = true;
985 m_safe = (errors == 0);
986 } else {
987 m_use_cached_value = false;
988 // Marks whether the conversion is safe
990 cs_arg == &my_charset_bin || (cs_arg->state & MY_CS_UNICODE));
991 }
992 }
993 Item_charset_conversion(const POS &pos, Item *a, const CHARSET_INFO *cs_arg)
994 : Item_str_func(pos, a), m_cast_cs(cs_arg) {}
995
996 String *val_str(String *) override;
997};
998
1000 public:
1001 Item_typecast_char(THD *thd, Item *a, longlong length_arg,
1002 const CHARSET_INFO *cs_arg)
1003 : Item_charset_conversion(thd, a, cs_arg, false) {
1004 m_cast_length = length_arg;
1005 }
1006 Item_typecast_char(const POS &pos, Item *a, longlong length_arg,
1007 const CHARSET_INFO *cs_arg)
1008 : Item_charset_conversion(pos, a, cs_arg) {
1009 m_cast_length = length_arg;
1010 }
1011 enum Functype functype() const override { return TYPECAST_FUNC; }
1012 bool eq(const Item *item, bool binary_cmp) const override;
1013 const char *func_name() const override { return "cast_as_char"; }
1014 void print(const THD *thd, String *str,
1015 enum_query_type query_type) const override;
1016};
1017
1018class Item_load_file final : public Item_str_func {
1020
1022
1023 public:
1024 Item_load_file(const POS &pos, Item *a) : Item_str_func(pos, a) {}
1025
1026 bool itemize(Parse_context *pc, Item **res) override;
1027 String *val_str(String *) override;
1028 const char *func_name() const override { return "load_file"; }
1030 return INNER_TABLE_BIT;
1031 }
1032 bool resolve_type(THD *thd) override {
1033 if (param_type_is_default(thd, 0, 1)) return true;
1036 set_nullable(true);
1037 return false;
1038 }
1039 bool check_function_as_value_generator(uchar *checker_args) override {
1041 pointer_cast<Check_function_as_value_generator_parameters *>(
1042 checker_args);
1043 func_arg->banned_function_name = func_name();
1044 return true;
1045 }
1046};
1047
1049 public:
1050 Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c)
1051 : Item_str_func(pos, a, b, c) {}
1052 Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c, Item *d)
1053 : Item_str_func(pos, a, b, c, d) {}
1054 Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c, Item *d,
1055 Item *e)
1056 : Item_str_func(pos, a, b, c, d, e) {}
1057 String *val_str(String *str) override;
1058 bool resolve_type(THD *) override;
1059 const char *func_name() const override { return "export_set"; }
1060};
1061
1064
1065 public:
1066 Item_func_quote(const POS &pos, Item *a) : Item_str_func(pos, a) {}
1067 const char *func_name() const override { return "quote"; }
1068 String *val_str(String *) override;
1069 bool resolve_type(THD *thd) override;
1070};
1071
1073 public:
1075 : Item_charset_conversion(pos, a, cs) {
1076 m_safe = false;
1077 }
1078
1080 bool cache_if_const)
1081 : Item_charset_conversion(thd, a, cs, cache_if_const) {
1082 assert(args[0]->fixed);
1083 }
1084 const char *func_name() const override { return "convert"; }
1085 void print(const THD *thd, String *str,
1086 enum_query_type query_type) const override;
1087};
1088
1091
1093
1094 public:
1096 const LEX_STRING &collation_string_arg)
1097 : super(pos, a, nullptr), collation_string(collation_string_arg) {}
1098
1099 bool itemize(Parse_context *pc, Item **res) override;
1100 String *val_str(String *) override;
1101 bool resolve_type(THD *) override;
1102 bool eq(const Item *item, bool binary_cmp) const override;
1103 const char *func_name() const override { return "collate"; }
1104 enum Functype functype() const override { return COLLATE_FUNC; }
1105 void print(const THD *thd, String *str,
1106 enum_query_type query_type) const override;
1108 /* this function is transparent for view updating */
1109 return args[0]->field_for_view_update();
1110 }
1111};
1112
1113class Item_func_charset final : public Item_str_func {
1114 public:
1115 Item_func_charset(const POS &pos, Item *a) : Item_str_func(pos, a) {
1116 null_on_null = false;
1117 }
1118 String *val_str(String *) override;
1119 const char *func_name() const override { return "charset"; }
1120 bool resolve_type(THD *thd) override {
1122 set_nullable(false);
1123 return Item_str_func::resolve_type(thd);
1124 }
1125};
1126
1128 public:
1129 Item_func_collation(const POS &pos, Item *a) : Item_str_func(pos, a) {
1130 null_on_null = false;
1131 }
1132 String *val_str(String *) override;
1133 const char *func_name() const override { return "collation"; }
1134 bool resolve_type(THD *thd) override {
1135 if (Item_str_func::resolve_type(thd)) return true;
1137 set_nullable(false);
1138 return false;
1139 }
1140};
1141
1144
1150 const bool as_binary;
1151
1152 public:
1153 Item_func_weight_string(const POS &pos, Item *a, uint result_length_arg,
1154 uint num_codepoints_arg, uint flags_arg,
1155 bool as_binary_arg = false)
1156 : Item_str_func(pos, a),
1157 flags(flags_arg),
1158 num_codepoints(num_codepoints_arg),
1159 result_length(result_length_arg),
1160 as_binary(as_binary_arg) {}
1161
1162 bool itemize(Parse_context *pc, Item **res) override;
1163
1164 const char *func_name() const override { return "weight_string"; }
1165 bool eq(const Item *item, bool binary_cmp) const override;
1166 String *val_str(String *) override;
1167 bool resolve_type(THD *) override;
1168 void print(const THD *thd, String *str,
1169 enum_query_type query_type) const override;
1170};
1171
1172class Item_func_crc32 final : public Item_int_func {
1174
1175 public:
1176 Item_func_crc32(const POS &pos, Item *a) : Item_int_func(pos, a) {
1177 unsigned_flag = true;
1178 }
1179 const char *func_name() const override { return "crc32"; }
1180 bool resolve_type(THD *thd) override {
1181 if (param_type_is_default(thd, 0, 1)) return true;
1182 max_length = 10;
1183 return false;
1184 }
1185 longlong val_int() override;
1186};
1187
1190
1191 public:
1193 : Item_int_func(pos, a) {}
1194 const char *func_name() const override { return "uncompressed_length"; }
1195 bool resolve_type(THD *thd) override {
1196 if (param_type_is_default(thd, 0, 1)) return true;
1197 max_length = 10;
1198 return false;
1199 }
1200 longlong val_int() override;
1201};
1202
1203class Item_func_compress final : public Item_str_func {
1205
1206 public:
1207 Item_func_compress(const POS &pos, Item *a) : Item_str_func(pos, a) {}
1208 bool resolve_type(THD *thd) override;
1209 const char *func_name() const override { return "compress"; }
1210 String *val_str(String *str) override;
1211};
1212
1215
1216 public:
1217 Item_func_uncompress(const POS &pos, Item *a) : Item_str_func(pos, a) {}
1218 bool resolve_type(THD *thd) override {
1219 if (Item_str_func::resolve_type(thd)) return true;
1220 set_nullable(true);
1222 return false;
1223 }
1224 const char *func_name() const override { return "uncompress"; }
1225 String *val_str(String *str) override;
1226};
1227
1228class Item_func_uuid final : public Item_str_func {
1230
1231 public:
1233 explicit Item_func_uuid(const POS &pos) : Item_str_func(pos) {}
1234
1235 bool itemize(Parse_context *pc, Item **res) override;
1237 return RAND_TABLE_BIT;
1238 }
1239 bool resolve_type(THD *) override;
1240 const char *func_name() const override { return "uuid"; }
1241 String *val_str(String *) override;
1242 bool check_function_as_value_generator(uchar *checker_args) override {
1244 pointer_cast<Check_function_as_value_generator_parameters *>(
1245 checker_args);
1246 func_arg->banned_function_name = func_name();
1247 return ((func_arg->source == VGS_GENERATED_COLUMN) ||
1248 (func_arg->source == VGS_CHECK_CONSTRAINT));
1249 }
1250};
1251
1254
1255 public:
1257 explicit Item_func_current_role(const POS &pos)
1258 : super(pos), value_cache_set(false) {}
1259 const char *func_name() const override { return "current_role"; }
1260 void cleanup() override;
1261 String *val_str(String *) override;
1262 bool resolve_type(THD *) override {
1264 return false;
1265 }
1267 return NAME_STRING("current_role()");
1268 }
1269
1270 protected:
1271 void set_current_role(THD *thd);
1272 /** a flag whether @ref value_cache is set or not */
1274 /**
1275 @brief Cache for the result value
1276
1277 Set by init(). And consumed by val_str().
1278 Needed to avoid re-calculation of the current_roles() in the
1279 course of the query.
1280 */
1282};
1283
1286
1287 public:
1289 explicit Item_func_roles_graphml(const POS &pos)
1290 : super(pos), value_cache_set(false) {}
1291 String *val_str(String *) override;
1292 void cleanup() override;
1293
1294 bool resolve_type(THD *) override {
1296 return false;
1297 }
1298
1299 const char *func_name() const override { return "roles_graphml"; }
1300
1302 return NAME_STRING("roles_graphml()");
1303 }
1304
1305 protected:
1306 bool calculate_graphml(THD *thd);
1307 /**
1308 @brief Cache for the result value
1309
1310 Set by init(). And consumed by val_str().
1311 Needed to avoid re-calculation of the current_roles() in the
1312 course of the query.
1313 */
1315
1316 /** Set to true if @ref value_cache is set */
1318};
1319
1321 public:
1323 : Item_str_func(pos, a, b, c) {}
1324
1325 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1326 bool resolve_type(THD *) override {
1327 /*
1328 There are 14 kinds of grants, with a max length
1329 per privileges is 11 chars.
1330 So, setting max approximate to 200.
1331 */
1333 set_nullable(true);
1334 null_on_null = false;
1335
1336 return false;
1337 }
1338
1339 const char *func_name() const override { return "get_dd_column_privileges"; }
1340
1341 String *val_str(String *) override;
1342};
1343
1345 public:
1347 : Item_str_func(pos, a, b, c) {}
1348
1349 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1350 bool resolve_type(THD *) override {
1351 // maximum string length of all options is expected
1352 // to be less than 256 characters.
1354 set_nullable(false);
1355 null_on_null = false;
1356
1357 return false;
1358 }
1359
1360 const char *func_name() const override { return "get_dd_create_options"; }
1361
1362 String *val_str(String *) override;
1363};
1364
1366 public:
1368 : Item_str_func(pos, a) {}
1369
1370 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1371 bool resolve_type(THD *) override {
1372 // maximum string length of all options is expected
1373 // to be less than 256 characters.
1375 set_nullable(false);
1376 null_on_null = false;
1377
1378 return false;
1379 }
1380
1381 const char *func_name() const override { return "get_dd_schema_options"; }
1382
1383 String *val_str(String *) override;
1384};
1385
1387 public:
1389 : Item_str_func(pos, list) {}
1390
1391 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1392 bool resolve_type(THD *) override {
1393 /*
1394 maximum expected string length to be less than 2048 characters,
1395 which is same as size of column holding comments in dictionary,
1396 i.e., the mysql.tables.comment DD column.
1397 */
1399 set_nullable(true);
1400 null_on_null = false;
1401
1402 return false;
1403 }
1404
1405 const char *func_name() const override {
1406 return "internal_get_comment_or_error";
1407 }
1408
1409 String *val_str(String *) override;
1410};
1411
1413 public:
1415 : Item_str_func(pos, a, b) {}
1416
1417 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1418 bool resolve_type(THD *) override {
1419 /* maximum string length of the property value is expected
1420 to be less than 256 characters. */
1422 set_nullable(false);
1423 null_on_null = false;
1424
1425 return false;
1426 }
1427
1428 const char *func_name() const override {
1429 return "get_dd_tablespace_private_data";
1430 }
1431
1432 String *val_str(String *) override;
1433};
1434
1436 public:
1438 : Item_str_func(pos, a, b) {}
1439
1440 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1441 bool resolve_type(THD *) override {
1442 /* maximum string length of the property value is expected
1443 to be less than 256 characters. */
1445 set_nullable(false);
1446 null_on_null = false;
1447
1448 return false;
1449 }
1450
1451 const char *func_name() const override { return "get_dd_index_private_data"; }
1452
1453 String *val_str(String *) override;
1454};
1455
1457 public:
1459 : Item_str_func(pos, a) {}
1460
1461 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1462 bool resolve_type(THD *) override {
1463 // maximum string length of all options is expected
1464 // to be less than 256 characters.
1466 set_nullable(true);
1467 null_on_null = false;
1468
1469 return false;
1470 }
1471
1472 const char *func_name() const override {
1473 return "internal_get_partition_nodegroup";
1474 }
1475
1476 String *val_str(String *) override;
1477};
1478
1480 public:
1482 Item *d)
1483 : Item_str_func(pos, a, b, c, d) {}
1484
1485 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1486 bool resolve_type(THD *) override {
1487 // maximum string length of all options is expected
1488 // to be less than 256 characters.
1490 set_nullable(true);
1491 null_on_null = false;
1492
1493 return false;
1494 }
1495
1496 const char *func_name() const override { return "internal_tablespace_type"; }
1497
1498 String *val_str(String *) override;
1499};
1500
1502 public:
1504 Item *b, Item *c, Item *d)
1505 : Item_str_func(pos, a, b, c, d) {}
1506
1507 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1508 bool resolve_type(THD *) override {
1509 // maximum string length of all options is expected
1510 // to be less than 256 characters.
1512 set_nullable(true);
1513 null_on_null = false;
1514
1515 return false;
1516 }
1517
1518 const char *func_name() const override {
1519 return "internal_tablespace_logfile_group_name";
1520 }
1521
1522 String *val_str(String *) override;
1523};
1524
1526 public:
1528 Item *c, Item *d)
1529 : Item_str_func(pos, a, b, c, d) {}
1530
1531 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1532 bool resolve_type(THD *) override {
1533 // maximum string length of all options is expected
1534 // to be less than 256 characters.
1536 set_nullable(true);
1537 null_on_null = false;
1538
1539 return false;
1540 }
1541
1542 const char *func_name() const override {
1543 return "internal_tablespace_status";
1544 }
1545 String *val_str(String *) override;
1546};
1547
1549 public:
1551 Item *c, Item *d)
1552 : Item_str_func(pos, a, b, c, d) {}
1553
1554 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1555 bool resolve_type(THD *) override {
1556 // maximum string length of all options is expected
1557 // to be less than 256 characters.
1559 set_nullable(true);
1560 null_on_null = false;
1561
1562 return false;
1563 }
1564
1565 const char *func_name() const override {
1566 return "internal_tablespace_row_format";
1567 }
1568
1569 String *val_str(String *) override;
1570};
1571
1573 public:
1575 Item *d)
1576 : Item_str_func(pos, a, b, c, d) {}
1577
1578 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1579 bool resolve_type(THD *) override {
1580 // maximum string length of all options is expected
1581 // to be less than 256 characters.
1583 set_nullable(true);
1584 null_on_null = false;
1585
1586 return false;
1587 }
1588
1589 const char *func_name() const override { return "internal_tablespace_extra"; }
1590
1591 String *val_str(String *) override;
1592};
1593
1595 public:
1597 : Item_str_func(pos, list) {}
1598
1599 bool resolve_type(THD *) override {
1600 set_nullable(false);
1602 return false;
1603 }
1604
1605 const char *func_name() const override { return "convert_cpu_id_mask"; }
1606
1607 String *val_str(String *) override;
1608};
1609
1611 public:
1613 : Item_str_func(pos, a, b) {}
1614
1615 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1616 bool resolve_type(THD *) override {
1618 set_nullable(true);
1619 null_on_null = false;
1620
1621 return false;
1622 }
1623
1624 const char *func_name() const override { return "get_dd_property_key_value"; }
1625
1626 String *val_str(String *) override;
1627};
1628
1630 public:
1632 : Item_str_func(pos, a, b) {}
1633
1634 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1635 bool resolve_type(THD *) override {
1637 set_nullable(true);
1638 null_on_null = false;
1639
1640 return false;
1641 }
1642
1643 const char *func_name() const override { return "remove_dd_property_key"; }
1644
1645 String *val_str(String *) override;
1646};
1647
1649 public:
1651 : Item_str_func(pos, a, b) {}
1652
1653 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1654 bool resolve_type(THD *) override {
1655 // maximum string length of all options is expected
1656 // to be less than 256 characters.
1658 set_nullable(true);
1659 null_on_null = false;
1660
1661 return false;
1662 }
1663
1664 const char *func_name() const override {
1665 return "convert_interval_to_user_interval";
1666 }
1667
1668 String *val_str(String *) override;
1669};
1670
1672 public:
1674 : Item_str_func(pos, list) {}
1675
1676 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1677 bool resolve_type(THD *) override {
1679 set_nullable(true);
1680 null_on_null = false;
1681
1682 return false;
1683 }
1684
1685 const char *func_name() const override { return "internal_get_username"; }
1686
1687 String *val_str(String *) override;
1688};
1689
1691 public:
1693 : Item_str_func(pos, list) {}
1694
1695 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1696 bool resolve_type(THD *) override {
1698 set_nullable(true);
1699 null_on_null = false;
1700
1701 return false;
1702 }
1703
1704 const char *func_name() const override { return "internal_get_hostname"; }
1705
1706 String *val_str(String *) override;
1707};
1708
1710 public:
1712 : Item_str_func(pos) {}
1713
1714 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1715 bool resolve_type(THD *) override {
1717 set_nullable(true);
1718 null_on_null = false;
1719
1720 return false;
1721 }
1722
1723 const char *func_name() const override {
1724 return "internal_get_enabled_role_json";
1725 }
1726
1727 String *val_str(String *) override;
1728};
1729
1731 public:
1733 : Item_str_func(pos) {}
1734
1735 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1736 bool resolve_type(THD *) override {
1738 set_nullable(true);
1739 null_on_null = false;
1740
1741 return false;
1742 }
1743
1744 const char *func_name() const override {
1745 return "internal_get_mandatory_roles_json";
1746 }
1747
1748 String *val_str(String *) override;
1749};
1750
1752 public:
1754 : Item_str_func(pos, list) {}
1755
1756 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1757 bool resolve_type(THD *) override {
1758 // maximum string length of all options is expected
1759 // to be less than 256 characters.
1761 set_nullable(false);
1762 null_on_null = false;
1763
1764 return false;
1765 }
1766
1767 const char *func_name() const override {
1768 return "internal_get_dd_column_extra";
1769 }
1770
1771 String *val_str(String *) override;
1772};
1773
1774#endif /* ITEM_STRFUNC_INCLUDED */
void set(const DTCollation &dt)
Definition: item.h:193
void set_repertoire(uint repertoire_arg)
Definition: item.h:219
const CHARSET_INFO * collation
Definition: item.h:175
Definition: field.h:574
Definition: item_cmpfunc.h:292
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_cmpfunc.h:326
The following types of conversions are considered safe:
Definition: item_strfunc.h:946
const CHARSET_INFO * m_cast_cs
The character set we are converting to.
Definition: item_strfunc.h:951
bool m_safe
Definition: item_strfunc.h:960
bool m_charset_conversion
If true, conversion is needed so do it, else allow string copy.
Definition: item_strfunc.h:949
const CHARSET_INFO * m_from_cs
The character set we are converting from.
Definition: item_strfunc.h:953
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3611
Item_charset_conversion(const POS &pos, Item *a, const CHARSET_INFO *cs_arg)
Definition: item_strfunc.h:993
bool m_use_cached_value
Marks whether the underlying Item is constant and may be cached.
Definition: item_strfunc.h:956
String * val_str(String *) override
Definition: item_strfunc.cc:3502
longlong m_cast_length
Length argument value, if any given.
Definition: item_strfunc.h:958
String m_tmp_value
Definition: item_strfunc.h:954
Item_charset_conversion(THD *thd, Item *a, const CHARSET_INFO *cs_arg, bool cache_if_const)
Definition: item_strfunc.h:974
uint32 compute_max_char_length()
Helper for CAST and CONVERT type resolution: common logic to compute the maximum numbers of character...
Definition: item_strfunc.cc:3580
Definition: item.h:4103
Definition: item_strfunc.h:298
Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:306
Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_strfunc.h:308
String * val_str(String *) override
Definition: item_strfunc.cc:652
Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:304
Item_func_aes_decrypt(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:302
Item_str_func super
Definition: item_strfunc.h:299
const char * func_name() const override
Definition: item_strfunc.h:317
Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e, Item *f)
Definition: item_strfunc.h:311
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:642
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:699
Definition: item_strfunc.h:275
Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e, Item *f)
Definition: item_strfunc.h:289
String * val_str(String *) override
Definition: item_strfunc.cc:578
const char * func_name() const override
Definition: item_strfunc.h:295
Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:282
Item_func_aes_encrypt(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:280
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:568
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:632
Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:284
String tmp_value
Definition: item_strfunc.h:276
Item_str_func super
Definition: item_strfunc.h:277
Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_strfunc.h:286
Definition: item_strfunc.h:841
char m_text_buf[binary_log::Uuid::TEXT_LENGTH+1]
Buffer to store the text result.
Definition: item_strfunc.h:843
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2857
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:2866
Item_func_bin_to_uuid(const POS &pos, Item *arg1, Item *arg2)
Definition: item_strfunc.h:848
Item_func_bin_to_uuid(const POS &pos, Item *arg1)
Definition: item_strfunc.h:846
const char * func_name() const override
Definition: item_strfunc.h:852
Definition: item_strfunc.h:767
Item_func_char(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:769
Item_func_char(const POS &pos, PT_item_list *list, const CHARSET_INFO *cs)
Definition: item_strfunc.h:773
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:778
String * val_str(String *) override
Definition: item_strfunc.cc:2497
const char * func_name() const override
Definition: item_strfunc.h:783
Definition: item_strfunc.h:1113
Item_func_charset(const POS &pos, Item *a)
Definition: item_strfunc.h:1115
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1120
String * val_str(String *) override
Definition: item_strfunc.cc:3165
const char * func_name() const override
Definition: item_strfunc.h:1119
Definition: item_strfunc.h:1127
String * val_str(String *) override
Definition: item_strfunc.cc:3179
const char * func_name() const override
Definition: item_strfunc.h:1133
Item_func_collation(const POS &pos, Item *a)
Definition: item_strfunc.h:1129
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1134
Definition: item_strfunc.h:1203
String buffer
Definition: item_strfunc.h:1204
Item_func_compress(const POS &pos, Item *a)
Definition: item_strfunc.h:1207
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:4050
String * val_str(String *str) override
Definition: item_strfunc.cc:4058
const char * func_name() const override
Definition: item_strfunc.h:1209
Definition: item_strfunc.h:350
const char * func_name() const override
Definition: item_strfunc.h:363
Item_func_concat_ws(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:357
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1171
String tmp_value
Definition: item_strfunc.h:351
String * val_str(String *) override
concat with separator.
Definition: item_strfunc.cc:1138
Item_func_concat_ws(mem_root_deque< Item * > *list)
Definition: item_strfunc.h:353
Definition: item_strfunc.h:336
String * val_str(String *) override
Concatenate args with the following premises: If only one arg (which is ok), return value of arg;.
Definition: item_strfunc.cc:1092
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1114
Item_func_concat(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:342
Item_func_concat(Item *a, Item *b)
Definition: item_strfunc.h:341
Item_func_concat(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:339
const char * func_name() const override
Definition: item_strfunc.h:347
String tmp_value
Definition: item_strfunc.h:337
Definition: item_strfunc.h:1072
Item_func_conv_charset(const POS &pos, Item *a, const CHARSET_INFO *cs)
Definition: item_strfunc.h:1074
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:3072
const char * func_name() const override
Definition: item_strfunc.h:1084
Item_func_conv_charset(THD *thd, Item *a, const CHARSET_INFO *cs, bool cache_if_const)
Definition: item_strfunc.h:1079
Definition: item_strfunc.h:869
String * val_str(String *) override
Definition: item_strfunc.cc:3001
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2994
static constexpr uint32_t CONV_MAX_LENGTH
Definition: item_strfunc.h:872
Item_func_conv(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:873
const char * func_name() const override
Definition: item_strfunc.h:875
Definition: item_strfunc.h:1594
const char * func_name() const override
Definition: item_strfunc.h:1605
Item_func_convert_cpu_id_mask(const POS &pos, Item *list)
Definition: item_strfunc.h:1596
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1599
String * val_str(String *) override
Definition: item_strfunc.cc:5038
Definition: item_strfunc.h:1648
const char * func_name() const override
Definition: item_strfunc.h:1664
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1654
enum Functype functype() const override
Definition: item_strfunc.h:1653
String * val_str(String *) override
Definition: item_strfunc.cc:5252
Item_func_convert_interval_to_user_interval(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1650
Definition: item_strfunc.h:1172
const char * func_name() const override
Definition: item_strfunc.h:1179
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1180
Item_func_crc32(const POS &pos, Item *a)
Definition: item_strfunc.h:1176
longlong val_int() override
Definition: item_strfunc.cc:4038
String value
Definition: item_strfunc.h:1173
Definition: item_strfunc.h:1252
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:1266
void set_current_role(THD *thd)
Definition: item_strfunc.cc:5094
Item_func_current_role()
Definition: item_strfunc.h:1256
const char * func_name() const override
Definition: item_strfunc.h:1259
bool value_cache_set
a flag whether value_cache is set or not
Definition: item_strfunc.h:1273
Item_func_sysconst super
Definition: item_strfunc.h:1253
Item_func_current_role(const POS &pos)
Definition: item_strfunc.h:1257
String * val_str(String *) override
Definition: item_strfunc.cc:5089
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1262
String value_cache
Cache for the result value.
Definition: item_strfunc.h:1281
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.cc:5081
Definition: item_strfunc.h:668
Item_func_user super
Definition: item_strfunc.h:669
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:2026
Item_func_current_user(const POS &pos)
Definition: item_strfunc.h:677
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:681
const char * func_name() const override
Definition: item_strfunc.h:680
type_conversion_status save_in_field_inner(Field *field, bool) override
We override Item::save_in_field_inner() for reasons explained in the comment of that function - we ne...
Definition: item_strfunc.cc:1971
String * val_str(String *) override
Definition: item_strfunc.cc:1977
Name_resolution_context * context
Definition: item_strfunc.h:671
Definition: item_strfunc.h:601
Item_func_sysconst super
Definition: item_strfunc.h:602
String * val_str(String *) override
Definition: item_strfunc.cc:1941
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:1933
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:610
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:616
Item_func_database(const POS &pos)
Definition: item_strfunc.h:605
const char * func_name() const override
Definition: item_strfunc.h:615
Definition: item_strfunc.h:699
const char * func_name() const override
Definition: item_strfunc.h:707
longlong val_int() override
Definition: item_strfunc.cc:2352
String * val_str(String *str) override
Definition: item_strfunc.cc:2365
double val_real() override
Definition: item_strfunc.cc:2340
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2322
Item_func_elt(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:701
Definition: item_strfunc.h:1048
Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1050
Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_strfunc.h:1054
Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1052
String * val_str(String *str) override
Definition: item_strfunc.cc:3732
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3801
const char * func_name() const override
Definition: item_strfunc.h:1059
Definition: item_strfunc.h:749
const char * func_name() const override
Definition: item_strfunc.h:762
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:2309
String tmp_str
Definition: item_strfunc.h:750
MY_LOCALE * get_locale(Item *item)
Definition: item_strfunc.cc:2180
MY_LOCALE * locale
Definition: item_strfunc.h:751
Item_func_format(const POS &pos, Item *org, Item *dec)
Definition: item_strfunc.h:754
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:2218
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2195
Item_func_format(const POS &pos, Item *org, Item *dec, Item *lang)
Definition: item_strfunc.h:756
Definition: item_strfunc.h:265
String tmp_value
Definition: item_strfunc.h:266
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:801
const char * func_name() const override
Definition: item_strfunc.h:272
String * val_str(String *) override
Definition: item_strfunc.cc:813
Item_func_from_base64(const POS &pos, Item *a)
Definition: item_strfunc.h:269
Definition: item_strfunc.h:1320
Item_func_get_dd_column_privileges(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1322
const char * func_name() const override
Definition: item_strfunc.h:1339
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1326
enum Functype functype() const override
Definition: item_strfunc.h:1325
String * val_str(String *) override
This function prepares string with list of column privileges.
Definition: item_strfunc.cc:4334
Definition: item_strfunc.h:1344
enum Functype functype() const override
Definition: item_strfunc.h:1349
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1350
String * val_str(String *) override
This function prepares string representing create_options for table.
Definition: item_strfunc.cc:4406
Item_func_get_dd_create_options(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1346
const char * func_name() const override
Definition: item_strfunc.h:1360
Definition: item_strfunc.h:1435
const char * func_name() const override
Definition: item_strfunc.h:1451
Item_func_get_dd_index_private_data(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1437
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1441
String * val_str(String *) override
This function prepares string representing se_private_data for index.
Definition: item_strfunc.cc:4951
enum Functype functype() const override
Definition: item_strfunc.h:1440
Definition: item_strfunc.h:1610
String * val_str(String *) override
This function prepares string representing value stored at key supplied.
Definition: item_strfunc.cc:5149
enum Functype functype() const override
Definition: item_strfunc.h:1615
Item_func_get_dd_property_key_value(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1612
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1616
const char * func_name() const override
Definition: item_strfunc.h:1624
Definition: item_strfunc.h:1365
String * val_str(String *) override
This function prepares string representing options for a schema.
Definition: item_strfunc.cc:4607
const char * func_name() const override
Definition: item_strfunc.h:1381
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1371
enum Functype functype() const override
Definition: item_strfunc.h:1370
Item_func_get_dd_schema_options(const POS &pos, Item *a)
Definition: item_strfunc.h:1367
Definition: item_strfunc.h:1412
String * val_str(String *) override
This function prepares string representing se_private_data for tablespace.
Definition: item_strfunc.cc:4885
const char * func_name() const override
Definition: item_strfunc.h:1428
enum Functype functype() const override
Definition: item_strfunc.h:1417
Item_func_get_dd_tablespace_private_data(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1414
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1418
Definition: item_strfunc.h:1456
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1462
String * val_str(String *) override
Definition: item_strfunc.cc:4732
enum Functype functype() const override
Definition: item_strfunc.h:1461
Item_func_get_partition_nodegroup(const POS &pos, Item *a)
Definition: item_strfunc.h:1458
const char * func_name() const override
Definition: item_strfunc.h:1472
Definition: item_strfunc.h:880
String tmp_value
Definition: item_strfunc.h:881
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3356
Item_func_hex(const POS &pos, Item *a)
Definition: item_strfunc.h:884
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:3368
const char * func_name() const override
Definition: item_strfunc.h:885
Definition: item_strfunc.h:391
String * val_str(String *) override
Definition: item_strfunc.cc:1322
const char * func_name() const override
Definition: item_strfunc.h:402
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1374
String tmp_value_res
Holds result in case we need to allocate our own result buffer.
Definition: item_strfunc.h:394
Item_func_insert(const POS &pos, Item *org, Item *start, Item *length, Item *new_str)
Definition: item_strfunc.h:397
String tmp_value
Definition: item_strfunc.h:392
Definition: item_strfunc.h:1386
Item_func_internal_get_comment_or_error(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1388
const char * func_name() const override
Definition: item_strfunc.h:1405
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1392
String * val_str(String *) override
Definition: item_strfunc.cc:4655
enum Functype functype() const override
Definition: item_strfunc.h:1391
Definition: item_strfunc.h:1751
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1757
String * val_str(String *) override
This function prepares string representing EXTRA column for I_S.COLUMNS.
Definition: item_strfunc.cc:5428
const char * func_name() const override
Definition: item_strfunc.h:1767
Item_func_internal_get_dd_column_extra(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1753
enum Functype functype() const override
Definition: item_strfunc.h:1756
Definition: item_strfunc.h:1709
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1715
enum Functype functype() const override
Definition: item_strfunc.h:1714
Item_func_internal_get_enabled_role_json(const POS &pos)
Definition: item_strfunc.h:1711
String * val_str(String *) override
Definition: item_strfunc.cc:5347
const char * func_name() const override
Definition: item_strfunc.h:1723
Definition: item_strfunc.h:1690
Item_func_internal_get_hostname(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1692
enum Functype functype() const override
Definition: item_strfunc.h:1695
const char * func_name() const override
Definition: item_strfunc.h:1704
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1696
String * val_str(String *) override
Definition: item_strfunc.cc:5312
Definition: item_strfunc.h:1730
const char * func_name() const override
Definition: item_strfunc.h:1744
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1736
enum Functype functype() const override
Definition: item_strfunc.h:1735
Item_func_internal_get_mandatory_roles_json(const POS &pos)
Definition: item_strfunc.h:1732
String * val_str(String *) override
Definition: item_strfunc.cc:5379
Definition: item_strfunc.h:1671
String * val_str(String *) override
Definition: item_strfunc.cc:5275
Item_func_internal_get_username(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1673
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1677
enum Functype functype() const override
Definition: item_strfunc.h:1676
const char * func_name() const override
Definition: item_strfunc.h:1685
Definition: item_strfunc.h:1572
String * val_str(String *) override
Definition: item_strfunc.cc:4851
const char * func_name() const override
Definition: item_strfunc.h:1589
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1579
enum Functype functype() const override
Definition: item_strfunc.h:1578
Item_func_internal_tablespace_extra(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1574
const char * func_name() const override
Definition: item_strfunc.h:1518
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1508
String * val_str(String *) override
Definition: item_strfunc.cc:4789
Item_func_internal_tablespace_logfile_group_name(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1503
enum Functype functype() const override
Definition: item_strfunc.h:1507
Definition: item_strfunc.h:1548
const char * func_name() const override
Definition: item_strfunc.h:1565
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1555
Item_func_internal_tablespace_row_format(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1550
String * val_str(String *) override
Definition: item_strfunc.cc:4829
enum Functype functype() const override
Definition: item_strfunc.h:1554
Definition: item_strfunc.h:1525
Item_func_internal_tablespace_status(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1527
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1532
String * val_str(String *) override
Definition: item_strfunc.cc:4812
enum Functype functype() const override
Definition: item_strfunc.h:1531
const char * func_name() const override
Definition: item_strfunc.h:1542
Definition: item_strfunc.h:1479
enum Functype functype() const override
Definition: item_strfunc.h:1485
String * val_str(String *) override
Definition: item_strfunc.cc:4772
const char * func_name() const override
Definition: item_strfunc.h:1496
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1486
Item_func_internal_tablespace_type(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1481
Definition: item_strfunc.h:855
const char * func_name() const override
Definition: item_strfunc.h:861
longlong val_int() override
Definition: item_strfunc.cc:2908
Item_func_is_uuid(const POS &pos, Item *a)
Definition: item_strfunc.h:859
Item_bool_func super
Definition: item_strfunc.h:856
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:862
Definition: item_strfunc.h:430
Item_func_left(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:434
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1490
String tmp_value
Definition: item_strfunc.h:431
String * val_str(String *) override
Definition: item_strfunc.cc:1443
const char * func_name() const override
Definition: item_strfunc.h:437
Definition: item_strfunc.h:931
const char * func_name() const override
Definition: item_strfunc.h:935
Item_func_like_range_max(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:933
Definition: item_strfunc.h:924
const char * func_name() const override
Definition: item_strfunc.h:928
Item_func_like_range_min(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:926
Definition: item_strfunc.h:904
String max_str
Definition: item_strfunc.h:907
const bool is_min
Definition: item_strfunc.h:908
Item_func_like_range(const POS &pos, Item *a, Item *b, bool is_min_arg)
Definition: item_strfunc.h:911
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:916
String min_str
Definition: item_strfunc.h:906
String * val_str(String *) override
Definition: item_strfunc.cc:3442
Definition: item_strfunc.h:416
const char * func_name() const override
Definition: item_strfunc.h:419
Item_func_lower(const POS &pos, Item *item)
Definition: item_strfunc.h:418
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1421
Definition: item_strfunc.h:816
String * val_str(String *) override
Definition: item_strfunc.cc:2921
Item_func_lpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
Definition: item_strfunc.h:820
String tmp_value
Definition: item_strfunc.h:817
String lpad_str
Definition: item_strfunc.h:817
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2788
const char * func_name() const override
Definition: item_strfunc.h:824
Definition: item_strfunc.h:561
Item_func_ltrim(const POS &pos, Item *a)
Definition: item_strfunc.h:563
Definition: item_strfunc.h:710
Item_func_make_set(const POS &pos, Item *a, PT_item_list *opt_list)
Definition: item_strfunc.h:717
String * val_str(String *str) override
Definition: item_strfunc.cc:2427
bool walk(Item_processor processor, enum_walk walk, uchar *arg) override
Traverses a tree of Items in prefix and/or postfix order.
Definition: item_strfunc.h:735
Item_str_func super
Definition: item_strfunc.h:711
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:2486
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2401
String tmp_str
Definition: item_strfunc.h:714
void split_sum_func(THD *thd, Ref_item_array ref_item_array, mem_root_deque< Item * > *fields) override
See comments in Item_cmp_func::split_sum_func()
Definition: item_strfunc.cc:2395
bool fix_fields(THD *thd, Item **ref) override
Definition: item_strfunc.h:722
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:2385
const char * func_name() const override
Definition: item_strfunc.h:733
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_strfunc.cc:2419
Item * item
Definition: item_strfunc.h:713
Item * transform(Item_transformer transformer, uchar *arg) override
Transform an Item_func object with a transformer callback function.
Definition: item_strfunc.cc:2479
Definition: item_strfunc.h:180
const char * func_name() const override
Definition: item_strfunc.h:187
Item_func_md5(const POS &pos, Item *a)
Definition: item_strfunc.h:184
String tmp_value
Definition: item_strfunc.h:181
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:226
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:184
Definition: item_strfunc.h:1062
String * val_str(String *) override
QUOTE() function returns argument string in single quotes suitable for using in a SQL statement.
Definition: item_strfunc.cc:3858
Item_func_quote(const POS &pos, Item *a)
Definition: item_strfunc.h:1066
String tmp_value
Definition: item_strfunc.h:1063
const char * func_name() const override
Definition: item_strfunc.h:1067
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3820
Definition: item_strfunc.h:320
static const ulonglong MAX_RANDOM_BYTES_BUFFER
limitation from the SSL library
Definition: item_strfunc.h:324
Item_str_func super
Definition: item_strfunc.h:321
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:723
Item_func_random_bytes(const POS &pos, Item *a)
Definition: item_strfunc.h:327
String * val_str(String *a) override
Definition: item_strfunc.cc:729
const char * func_name() const override
Definition: item_strfunc.h:333
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:706
Definition: item_strfunc.h:1629
Item_func_remove_dd_property_key(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1631
const char * func_name() const override
Definition: item_strfunc.h:1643
String * val_str(String *) override
This function removes a key value from given property string.
Definition: item_strfunc.cc:5206
enum Functype functype() const override
Definition: item_strfunc.h:1634
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1635
Definition: item_strfunc.h:786
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2547
String * val_str(String *) override
Item_func_repeat::str is carefully written to avoid reallocs as much as possible at the cost of a loc...
Definition: item_strfunc.cc:2587
String tmp_value
Definition: item_strfunc.h:787
Item_func_repeat(const POS &pos, Item *arg1, Item *arg2)
Definition: item_strfunc.h:790
const char * func_name() const override
Definition: item_strfunc.h:794
Definition: item_strfunc.h:378
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1302
String * val_str(String *) override
Replace all occurrences of string2 in string1 with string3.
Definition: item_strfunc.cc:1240
const char * func_name() const override
Definition: item_strfunc.h:388
String tmp_value
Definition: item_strfunc.h:379
String tmp_value_res
Holds result in case we need to allocate our own result buffer.
Definition: item_strfunc.h:381
String tmp_value2
Definition: item_strfunc.h:379
Item_func_replace(const POS &pos, Item *org, Item *find, Item *replace)
Definition: item_strfunc.h:384
Definition: item_strfunc.h:366
Item_func_reverse(Item *a)
Definition: item_strfunc.h:370
String * val_str(String *) override
Definition: item_strfunc.cc:1192
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1228
String tmp_value
Definition: item_strfunc.h:367
Item_func_reverse(const POS &pos, Item *a)
Definition: item_strfunc.h:371
const char * func_name() const override
Definition: item_strfunc.h:375
Definition: item_strfunc.h:440
Item_func_right(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:444
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1521
const char * func_name() const override
Definition: item_strfunc.h:448
String * val_str(String *) override
Definition: item_strfunc.cc:1499
String tmp_value
Definition: item_strfunc.h:441
Definition: item_strfunc.h:1284
Item_func_roles_graphml(const POS &pos)
Definition: item_strfunc.h:1289
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.cc:5132
String value_cache
Cache for the result value.
Definition: item_strfunc.h:1314
Item_func_sysconst super
Definition: item_strfunc.h:1285
const char * func_name() const override
Definition: item_strfunc.h:1299
Item_func_roles_graphml()
Definition: item_strfunc.h:1288
bool calculate_graphml(THD *thd)
Constructs and caches the graphml string.
Definition: item_strfunc.cc:5112
String * val_str(String *) override
Definition: item_strfunc.cc:5127
bool value_cache_set
Set to true if value_cache is set.
Definition: item_strfunc.h:1317
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1294
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:1301
Definition: item_strfunc.h:805
String tmp_value
Definition: item_strfunc.h:806
Item_func_rpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
Definition: item_strfunc.h:809
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2690
String * val_str(String *) override
Definition: item_strfunc.cc:2716
const char * func_name() const override
Definition: item_strfunc.h:813
String rpad_str
Definition: item_strfunc.h:806
Definition: item_strfunc.h:567
Item_func_rtrim(const POS &pos, Item *a)
Definition: item_strfunc.h:569
Definition: item_strfunc.h:1089
bool eq(const Item *item, bool binary_cmp) const override
Definition: item_strfunc.cc:3139
LEX_STRING collation_string
Definition: item_strfunc.h:1092
Item_field * field_for_view_update() override
Definition: item_strfunc.h:1107
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:3154
Item_func_set_collation(const POS &pos, Item *a, const LEX_STRING &collation_string_arg)
Definition: item_strfunc.h:1095
const char * func_name() const override
Definition: item_strfunc.h:1103
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3099
enum Functype functype() const override
Definition: item_strfunc.h:1104
String * val_str(String *) override
Definition: item_strfunc.cc:3091
Item_str_func super
Definition: item_strfunc.h:1090
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:3081
Definition: item_strfunc.h:198
const char * func_name() const override
Definition: item_strfunc.h:204
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:270
Item_func_sha2(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:200
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:344
Definition: item_strfunc.h:190
const char * func_name() const override
Definition: item_strfunc.h:195
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:234
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:255
Item_func_sha(const POS &pos, Item *a)
Definition: item_strfunc.h:192
Definition: item_strfunc.h:688
Item_func_soundex(const POS &pos, Item *a)
Definition: item_strfunc.h:693
String tmp_value
Definition: item_strfunc.h:689
Item_func_soundex(Item *a)
Definition: item_strfunc.h:692
String * val_str(String *) override
Definition: item_strfunc.cc:2078
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2034
const char * func_name() const override
Definition: item_strfunc.h:696
Definition: item_strfunc.h:797
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2631
String * val_str(String *) override
Definition: item_strfunc.cc:2662
const char * func_name() const override
Definition: item_strfunc.h:802
Item_func_space(const POS &pos, Item *arg1)
Definition: item_strfunc.h:799
Definition: item_strfunc.h:239
bool resolve_type(THD *thd) override
The type is always LONGTEXT, just like the digest_text columns in Performance Schema.
Definition: item_strfunc.cc:1053
const char * func_name() const override
Definition: item_strfunc.h:244
uchar * m_token_buffer
Definition: item_strfunc.h:262
Item_func_statement_digest_text(const POS &pos, Item *query_string)
Definition: item_strfunc.h:241
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_strfunc.h:252
String * val_str(String *) override
Definition: item_strfunc.cc:1061
Definition: item_strfunc.h:217
uchar * m_token_buffer
Definition: item_strfunc.h:236
Item_func_statement_digest(const POS &pos, Item *query_string)
Definition: item_strfunc.h:219
const char * func_name() const override
Definition: item_strfunc.h:222
String * val_str_ascii(String *) override
Implementation of the STATEMENT_DIGEST() native function.
Definition: item_strfunc.cc:1023
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1008
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_strfunc.h:223
Definition: item_strfunc.h:469
String * val_str(String *) override
Definition: item_strfunc.cc:1628
Item_func_substr_index(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:473
String tmp_value
Definition: item_strfunc.h:470
const char * func_name() const override
Definition: item_strfunc.h:477
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1618
Definition: item_strfunc.h:451
const char * func_name() const override
Definition: item_strfunc.h:466
Item_func_substr(Item *a, Item *b)
Definition: item_strfunc.h:457
Item_func_substr(Item *a, Item *b, Item *c)
Definition: item_strfunc.h:460
String tmp_value
Definition: item_strfunc.h:454
Item_func_substr(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:458
Item_str_func super
Definition: item_strfunc.h:452
String * val_str(String *) override
Definition: item_strfunc.cc:1531
Item_func_substr(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:461
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1578
Definition: item_strfunc.h:573
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_strfunc.h:591
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item_strfunc.cc:1911
virtual const Name_string fully_qualified_func_name() const =0
Item_func_sysconst(const POS &pos)
Definition: item_strfunc.h:580
Item_str_func super
Definition: item_strfunc.h:574
Item_func_sysconst()
Definition: item_strfunc.h:577
Definition: item_strfunc.h:207
const char * func_name() const override
Definition: item_strfunc.h:214
Item_func_to_base64(const POS &pos, Item *a)
Definition: item_strfunc.h:211
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:763
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:779
String tmp_value
Definition: item_strfunc.h:208
Definition: item_strfunc.h:480
const bool m_trim_trailing
Definition: item_strfunc.h:501
bool trim_trailing() const
Definition: item_strfunc.h:533
bool trim_leading() const
Definition: item_strfunc.h:528
const char * func_name() const override
Definition: item_strfunc.h:540
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1842
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:1881
TRIM_MODE
Why all the trim modes in this enum? We need to maintain parsing information, so that our print() fun...
Definition: item_strfunc.h:487
@ TRIM_BOTH_DEFAULT
Definition: item_strfunc.h:488
@ TRIM_LTRIM
Definition: item_strfunc.h:492
@ TRIM_RTRIM
Definition: item_strfunc.h:493
@ TRIM_BOTH
Definition: item_strfunc.h:489
@ TRIM_LEADING
Definition: item_strfunc.h:490
@ TRIM_TRAILING
Definition: item_strfunc.h:491
Item_func_trim(Item *a, TRIM_MODE tm)
Definition: item_strfunc.h:516
Item_func_trim(Item *a, Item *b, TRIM_MODE tm)
Definition: item_strfunc.h:504
Item_func_trim(const POS &pos, Item *a, TRIM_MODE tm)
Definition: item_strfunc.h:522
String tmp_value
Definition: item_strfunc.h:497
const TRIM_MODE m_trim_mode
Definition: item_strfunc.h:499
Item_func_trim(const POS &pos, Item *a, Item *b, TRIM_MODE tm)
Definition: item_strfunc.h:510
String remove
Definition: item_strfunc.h:498
const bool m_trim_leading
Definition: item_strfunc.h:500
String * val_str(String *) override
Definition: item_strfunc.cc:1745
Definition: item_strfunc.h:1213
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1218
const char * func_name() const override
Definition: item_strfunc.h:1224
String * val_str(String *str) override
Definition: item_strfunc.cc:4107
String buffer
Definition: item_strfunc.h:1214
Item_func_uncompress(const POS &pos, Item *a)
Definition: item_strfunc.h:1217
Definition: item_strfunc.h:1188
const char * func_name() const override
Definition: item_strfunc.h:1194
Item_func_uncompressed_length(const POS &pos, Item *a)
Definition: item_strfunc.h:1192
String value
Definition: item_strfunc.h:1189
longlong val_int() override
Definition: item_strfunc.cc:4009
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1195
Definition: item_strfunc.h:890
Item_func_unhex(const POS &pos, Item *a)
Definition: item_strfunc.h:894
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3398
String * val_str(String *) override
Convert given hex string to a binary string.
Definition: item_strfunc.cc:3410
String tmp_value
Definition: item_strfunc.h:891
const char * func_name() const override
Definition: item_strfunc.h:898
Definition: item_strfunc.h:423
Item_func_upper(const POS &pos, Item *item)
Definition: item_strfunc.h:425
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1432
const char * func_name() const override
Definition: item_strfunc.h:426
Definition: item_strfunc.h:621
Item_func_user(const POS &pos)
Definition: item_strfunc.h:634
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_strfunc.h:638
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:661
String * val_str(String *) override
Definition: item_strfunc.cc:1962
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:2016
Item_func_sysconst super
Definition: item_strfunc.h:622
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.h:655
Item_func_user()
Definition: item_strfunc.h:633
const char * func_name() const override
Definition: item_strfunc.h:660
bool evaluate(const char *user, const char *host)
Evaluate user name, must be called once per execution.
Definition: item_strfunc.cc:1993
type_conversion_status save_in_field_inner(Field *field, bool) override
We override Item::save_in_field_inner() for reasons explained in the comment of that function - we ne...
Definition: item_strfunc.cc:1957
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:651
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_strfunc.h:644
bool m_evaluated
True when function value is evaluated, set to false after each execution.
Definition: item_strfunc.h:626
Definition: item_strfunc.h:827
String * val_str(String *) override
Definition: item_strfunc.cc:2823
Item_func_uuid_to_bin(const POS &pos, Item *arg1, Item *arg2)
Definition: item_strfunc.h:834
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2815
Item_func_uuid_to_bin(const POS &pos, Item *arg1)
Definition: item_strfunc.h:832
const char * func_name() const override
Definition: item_strfunc.h:838
uchar m_bin_buf[binary_log::Uuid::BYTE_LENGTH]
Buffer to store the binary result.
Definition: item_strfunc.h:829
Definition: item_strfunc.h:1228
Item_func_uuid(const POS &pos)
Definition: item_strfunc.h:1233
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_strfunc.h:1242
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_strfunc.h:1236
String * val_str(String *) override
Definition: item_strfunc.cc:4315
const char * func_name() const override
Definition: item_strfunc.h:1240
Item_func_uuid()
Definition: item_strfunc.h:1232
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:4194
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:4200
Item_str_func super
Definition: item_strfunc.h:1229
Definition: item_strfunc.h:1142
String * val_str(String *) override
Definition: item_strfunc.cc:3266
bool eq(const Item *item, bool binary_cmp) const override
Definition: item_strfunc.cc:3247
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3213
const char * func_name() const override
Definition: item_strfunc.h:1164
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:3190
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:3201
const uint num_codepoints
Definition: item_strfunc.h:1147
String tmp_value
Definition: item_strfunc.h:1145
Item_str_func super
Definition: item_strfunc.h:1143
Item_field * m_field_ref
Definition: item_strfunc.h:1149
const uint result_length
Definition: item_strfunc.h:1148
Item_func_weight_string(const POS &pos, Item *a, uint result_length_arg, uint num_codepoints_arg, uint flags_arg, bool as_binary_arg=false)
Definition: item_strfunc.h:1153
const bool as_binary
Definition: item_strfunc.h:1150
uint flags
Definition: item_strfunc.h:1146
Definition: item_func.h:93
Item ** args
Array of pointers to arguments.
Definition: item_func.h:100
Functype
Definition: item_func.h:178
@ COLLATE_FUNC
Definition: item_func.h:224
@ DD_INTERNAL_FUNC
Definition: item_func.h:234
@ TYPECAST_FUNC
Definition: item_func.h:226
bool param_type_is_default(THD *thd, uint start, uint end, uint step, enum_field_types def)
For arguments of this Item_func ("args" array), in range [start, start+step, start+2*step,...
Definition: item_func.cc:516
bool fix_fields(THD *, Item **ref) override
Definition: item_func.cc:394
uint arg_count
How many arguments in 'args'.
Definition: item_func.h:123
bool null_on_null
Affects how to determine that NULL argument implies a NULL function return.
Definition: item_func.h:157
Definition: item_func.h:928
Definition: item_strfunc.h:1018
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:3659
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1032
String tmp_value
Definition: item_strfunc.h:1021
Item_str_func super
Definition: item_strfunc.h:1019
String * val_str(String *) override
Definition: item_strfunc.cc:3667
bool check_function_as_value_generator(uchar *checker_args) override
Check if this item is allowed for a virtual column or inside a default expression.
Definition: item_strfunc.h:1039
Item_load_file(const POS &pos, Item *a)
Definition: item_strfunc.h:1024
const char * func_name() const override
Definition: item_strfunc.h:1028
table_map get_initial_pseudo_tables() const override
Returns the pseudo tables depended upon in order to evaluate this function expression.
Definition: item_strfunc.h:1029
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:10588
virtual const char * func_name() const =0
Definition: item_strfunc.h:143
Item_str_ascii_func(Item *a, Item *b)
Definition: item_strfunc.h:158
Item_str_ascii_func(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:169
String * val_str_ascii(String *) override=0
Item_str_ascii_func()
Definition: item_strfunc.h:147
Item_str_ascii_func(Item *a, Item *b, Item *c)
Definition: item_strfunc.h:166
String ascii_buf
Definition: item_strfunc.h:144
Item_str_ascii_func(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:161
Item_str_ascii_func(const POS &pos, Item *a)
Definition: item_strfunc.h:154
Item_str_ascii_func(Item *a)
Definition: item_strfunc.h:151
String * val_str(String *str) override
Definition: item_strfunc.h:174
Definition: item_strfunc.h:405
String * val_str(String *) override
Definition: item_strfunc.cc:1389
Item_str_conv(const POS &pos, Item *item)
Definition: item_strfunc.h:412
String tmp_value
Definition: item_strfunc.h:409
uint multiply
Definition: item_strfunc.h:407
my_charset_conv_case converter
Definition: item_strfunc.h:408
Definition: item_strfunc.h:75
Item_str_func()
Definition: item_strfunc.h:79
String * val_str_from_val_str_ascii(String *str, String *str2)
Definition: item_strfunc.cc:141
Item_str_func(Item *a, Item *b)
Definition: item_strfunc.h:87
my_decimal * val_decimal(my_decimal *) override
Definition: item_strfunc.cc:173
String * push_packet_overflow_warning(THD *thd, const char *func)
Calls push_warning_printf for packet overflow.
Definition: item_strfunc.cc:1480
Item_str_func(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:111
Item_str_func(mem_root_deque< Item * > *list)
Definition: item_strfunc.h:109
Item_str_func(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:93
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override
Definition: item_strfunc.h:117
Item_func super
Definition: item_strfunc.h:76
bool get_time(MYSQL_TIME *ltime) override
Definition: item_strfunc.h:120
Item_str_func(Item *a)
Definition: item_strfunc.h:83
Item_str_func(Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:96
void left_right_max_length(THD *thd)
Definition: item_strfunc.cc:1463
enum Item_result result_type() const override
Definition: item_strfunc.h:123
Item_str_func(Item *a, Item *b, Item *c)
Definition: item_strfunc.h:91
longlong val_int() override
Definition: item_strfunc.h:114
Item_str_func(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e, Item *f)
Definition: item_strfunc.h:106
Item_str_func(const POS &pos, Item *a)
Definition: item_strfunc.h:85
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:126
double val_real() override
Definition: item_strfunc.h:115
Item_str_func(const POS &pos)
Definition: item_strfunc.h:81
Item_str_func(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:89
Item_str_func(Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_strfunc.h:101
bool fix_fields(THD *thd, Item **ref) override
Definition: item_strfunc.cc:163
Item_str_func(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_strfunc.h:104
Item_str_func(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:98
Definition: item_strfunc.h:999
const char * func_name() const override
Definition: item_strfunc.h:1013
Item_typecast_char(THD *thd, Item *a, longlong length_arg, const CHARSET_INFO *cs_arg)
Definition: item_strfunc.h:1001
Item_typecast_char(const POS &pos, Item *a, longlong length_arg, const CHARSET_INFO *cs_arg)
Definition: item_strfunc.h:1006
bool eq(const Item *item, bool binary_cmp) const override
Definition: item_strfunc.cc:3472
enum Functype functype() const override
Definition: item_strfunc.h:1011
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:3489
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:850
String str_value
str_values's main purpose is to cache the value in save_in_field
Definition: item.h:3310
void set_nullable(bool nullable)
Definition: item.h:3400
DTCollation collation
Character set and collation properties assigned for this Item.
Definition: item.h:3317
bool is_nullable() const
Definition: item.h:3399
bool get_time_from_string(MYSQL_TIME *ltime)
Convert val_str() to time in MYSQL_TIME.
Definition: item.cc:1518
void set_data_type_blob(uint32 max_l)
Set the Item to be of BLOB type.
Definition: item.h:1531
virtual Item_field * field_for_view_update()
Definition: item.h:2965
virtual bool fix_fields(THD *, Item **)
Definition: item.cc:4867
bool fixed
True if item has been resolved.
Definition: item.h:3388
bool null_value
True if item is null.
Definition: item.h:3425
virtual bool check_cols(uint c)
Definition: item.cc:1189
bool unsigned_flag
Definition: item.h:3426
longlong val_int_from_string()
Definition: item.cc:499
bool get_date_from_string(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_str() to date in MYSQL_TIME.
Definition: item.cc:1431
virtual bool walk(Item_processor processor, enum_walk walk, uchar *arg)
Traverses a tree of Items in prefix and/or postfix order.
Definition: item.h:2429
void set_data_type_string(uint32 max_l)
Set the Item to be variable length string.
Definition: item.h:1449
bool may_evaluate_const(const THD *thd) const
Return true if this is a const item that may be evaluated in the current phase of statement processin...
Definition: item.cc:1181
virtual String * val_str(String *str)=0
uint32 max_length
Maximum length of result of evaluating this item, in number of bytes.
Definition: item.h:3335
double val_real_from_string()
Definition: item.cc:445
Definition: sql_list.h:433
Definition: sql_locale.h:36
Storage for name strings.
Definition: item.h:286
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independe...
Definition: parse_tree_helpers.h:104
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:138
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:166
void mem_free()
Definition: sql_string.h:377
void mark_as_const()
Definition: sql_string.h:246
bool copy()
Definition: sql_string.cc:191
void set(String &str, size_t offset, size_t arg_length)
Definition: sql_string.h:279
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:109
my_decimal class limits 'decimal_t' type to what we need in MySQL.
Definition: my_decimal.h:93
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:30
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
@ MYSQL_TYPE_LONGLONG
Definition: field_types.h:61
static const std::string dec("DECRYPTION")
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:176
Item *(Item::* Item_transformer)(uchar *arg)
Type for transformers used by Item::transform and Item::compile.
Definition: item.h:720
#define NAME_STRING(x)
Definition: item.h:346
CHARSET_INFO * mysqld_collation_get_by_name(const char *name, CHARSET_INFO *name_cs=system_charset_info)
Get collation by name, send error to client on failure.
Definition: item_strfunc.cc:5020
String * mysql_generate_uuid(String *str)
Generate Universal Unique Identifier (UUID).
Definition: item_strfunc.cc:4208
A better implementation of the UNIX ctype(3) library.
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1536
size_t(* my_charset_conv_case)(const CHARSET_INFO *, char *, size_t, char *, size_t)
Definition: m_ctype.h:294
static constexpr uint32_t MY_CS_UNICODE
Definition: m_ctype.h:129
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:510
#define MY_REPERTOIRE_ASCII
Definition: m_ctype.h:149
Common definition used by mysys, performance schema and server & client.
static constexpr int HOSTNAME_LENGTH
Definition: my_hostname.h:42
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
unsigned char uchar
Definition: my_inttypes.h:51
long long int longlong
Definition: my_inttypes.h:54
uint32_t uint32
Definition: my_inttypes.h:66
uint64_t table_map
Definition: my_table_map.h:29
Interface for low level time utilities.
unsigned int my_time_flags_t
Flags to str_to_datetime and number_to_datetime.
Definition: my_time.h:93
Common definition between mysql server & client.
#define MAX_BLOB_WIDTH
Default width for blob in bytes.
Definition: mysql_com.h:904
#define USERNAME_LENGTH
Definition: mysql_com.h:68
#define USERNAME_CHAR_LENGTH
Definition: mysql_com.h:63
Time declarations shared between the server and client API: you should not add anything to this heade...
char * user
Definition: mysqladmin.cc:59
const char * host
Definition: mysqladmin.cc:58
static bool replace
Definition: mysqlimport.cc:65
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1063
Definition: commit_order_queue.h:33
const byte * find(const Pages *pages, const page_id_t &page_id) noexcept
Find a doublewrite copy of a page.
Definition: buf0dblwr.cc:3592
PT & ref(PT *tp)
Definition: tablespace_impl.cc:358
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2876
type_conversion_status
Status when storing a value in a field or converting from one datatype to another.
Definition: field.h:201
@ VGS_CHECK_CONSTRAINT
Definition: field.h:475
@ VGS_GENERATED_COLUMN
Definition: field.h:473
@ DERIVATION_COERCIBLE
Definition: field.h:181
@ DERIVATION_SYSCONST
Definition: field.h:182
File containing constants that can be used throughout the server.
constexpr const table_map RAND_TABLE_BIT
Definition: sql_const.h:111
enum_walk
Enumeration for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:286
bool(Item::*)(unsigned char *) Item_processor
Processor type for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:304
constexpr const table_map INNER_TABLE_BIT
Definition: sql_const.h:109
constexpr const int MAX_FIELD_NAME
Definition: sql_const.h:43
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:32
Definition: m_ctype.h:382
uint state
Definition: m_ctype.h:386
Struct used to pass around arguments to/from check_function_as_value_generator.
Definition: item.h:486
const char * banned_function_name
the name of the function which is not allowed
Definition: item.h:500
Value_generator_source source
Definition: item.h:498
Definition: mysql_lex_string.h:34
Definition: mysql_time.h:81
Definition: item.h:396
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:120
Bison "location" class.
Definition: parse_location.h:42
static const size_t BYTE_LENGTH
The number of bytes in the data of a Uuid.
Definition: uuid.h:136
static const size_t TEXT_LENGTH
The number of bytes in the textual representation of a Uuid.
Definition: uuid.h:159
unsigned int uint
Definition: uca-dump.cc:29
Item_result
Type of the user defined function return slot and arguments.
Definition: udf_registration_types.h:38
@ STRING_RESULT
not valid for UDFs
Definition: udf_registration_types.h:40