MySQL 8.0.30
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
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 }
156 }
157
160 }
162 : Item_str_func(pos, a, b) {
164 }
165
168 }
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:
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:
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:
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:
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:
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:
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:
281 : Item_str_func(pos, a, b) {}
283 : Item_str_func(pos, a, b, c) {}
285 : Item_str_func(pos, a, b, c, d) {}
287 Item *e)
288 : Item_str_func(pos, a, b, c, d, e) {}
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:
303 : Item_str_func(pos, a, b) {}
305 : Item_str_func(pos, a, b, c) {}
307 : Item_str_func(pos, a, b, c, d) {}
309 Item *e)
310 : Item_str_func(pos, a, b, c, d, e) {}
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:
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:
340 : Item_str_func(pos, opt_list) {}
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 }
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:
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:
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:
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
511 : Item_str_func(pos, a, b),
512 m_trim_mode(tm),
515
517 : Item_str_func(a),
518 m_trim_mode(tm),
521
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:
565};
566
567class Item_func_rtrim final : public Item_func_trim {
568 public:
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:
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:
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:
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:
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:
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:
772 }
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:
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:
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:
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:
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:
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 }
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:
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:
1051 : Item_str_func(pos, a, b, c) {}
1053 : Item_str_func(pos, a, b, c, 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:
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:
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:
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:
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:
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:
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:
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 : Item_str_ascii_func(pos, a, b) {}
1258 bool resolve_type(THD *) override;
1259 const char *func_name() const override { return "gtid_subtract"; }
1260 String *val_str_ascii(String *) override;
1261};
1262
1265
1266 public:
1269 : super(pos), value_cache_set(false) {}
1270 const char *func_name() const override { return "current_role"; }
1271 void cleanup() override;
1272 String *val_str(String *) override;
1273 bool resolve_type(THD *) override {
1275 return false;
1276 }
1278 return NAME_STRING("current_role()");
1279 }
1280
1281 protected:
1282 void set_current_role(THD *thd);
1283 /** a flag whether @ref value_cache is set or not */
1285 /**
1286 @brief Cache for the result value
1287
1288 Set by init(). And consumed by val_str().
1289 Needed to avoid re-calculation of the current_roles() in the
1290 course of the query.
1291 */
1293};
1294
1297
1298 public:
1301 : super(pos), value_cache_set(false) {}
1302 String *val_str(String *) override;
1303 void cleanup() override;
1304
1305 bool resolve_type(THD *) override {
1307 return false;
1308 }
1309
1310 const char *func_name() const override { return "roles_graphml"; }
1311
1313 return NAME_STRING("roles_graphml()");
1314 }
1315
1316 protected:
1317 bool calculate_graphml(THD *thd);
1318 /**
1319 @brief Cache for the result value
1320
1321 Set by init(). And consumed by val_str().
1322 Needed to avoid re-calculation of the current_roles() in the
1323 course of the query.
1324 */
1326
1327 /** Set to true if @ref value_cache is set */
1329};
1330
1332 public:
1334 : Item_str_func(pos, a, b, c) {}
1335
1336 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1337 bool resolve_type(THD *) override {
1338 /*
1339 There are 14 kinds of grants, with a max length
1340 per privileges is 11 chars.
1341 So, setting max approximate to 200.
1342 */
1344 set_nullable(true);
1345 null_on_null = false;
1346
1347 return false;
1348 }
1349
1350 const char *func_name() const override { return "get_dd_column_privileges"; }
1351
1352 String *val_str(String *) override;
1353};
1354
1356 public:
1358 : Item_str_func(pos, a, b, c) {}
1359
1360 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1361 bool resolve_type(THD *) override {
1362 // maximum string length of all options is expected
1363 // to be less than 256 characters.
1365 set_nullable(false);
1366 null_on_null = false;
1367
1368 return false;
1369 }
1370
1371 const char *func_name() const override { return "get_dd_create_options"; }
1372
1373 String *val_str(String *) override;
1374};
1375
1377 public:
1379 : Item_str_func(pos, a) {}
1380
1381 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1382 bool resolve_type(THD *) override {
1383 // maximum string length of all options is expected
1384 // to be less than 256 characters.
1386 set_nullable(false);
1387 null_on_null = false;
1388
1389 return false;
1390 }
1391
1392 const char *func_name() const override { return "get_dd_schema_options"; }
1393
1394 String *val_str(String *) override;
1395};
1396
1398 public:
1400 : Item_str_func(pos, list) {}
1401
1402 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1403 bool resolve_type(THD *) override {
1404 /*
1405 maximum expected string length to be less than 2048 characters,
1406 which is same as size of column holding comments in dictionary,
1407 i.e., the mysql.tables.comment DD column.
1408 */
1410 set_nullable(true);
1411 null_on_null = false;
1412
1413 return false;
1414 }
1415
1416 const char *func_name() const override {
1417 return "internal_get_comment_or_error";
1418 }
1419
1420 String *val_str(String *) override;
1421};
1422
1424 public:
1426 : Item_str_func(pos, a, b) {}
1427
1428 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1429 bool resolve_type(THD *) override {
1430 /* maximum string length of the property value is expected
1431 to be less than 256 characters. */
1433 set_nullable(false);
1434 null_on_null = false;
1435
1436 return false;
1437 }
1438
1439 const char *func_name() const override {
1440 return "get_dd_tablespace_private_data";
1441 }
1442
1443 String *val_str(String *) override;
1444};
1445
1447 public:
1449 : Item_str_func(pos, a, b) {}
1450
1451 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1452 bool resolve_type(THD *) override {
1453 /* maximum string length of the property value is expected
1454 to be less than 256 characters. */
1456 set_nullable(false);
1457 null_on_null = false;
1458
1459 return false;
1460 }
1461
1462 const char *func_name() const override { return "get_dd_index_private_data"; }
1463
1464 String *val_str(String *) override;
1465};
1466
1468 public:
1470 : Item_str_func(pos, a) {}
1471
1472 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1473 bool resolve_type(THD *) override {
1474 // maximum string length of all options is expected
1475 // to be less than 256 characters.
1477 set_nullable(true);
1478 null_on_null = false;
1479
1480 return false;
1481 }
1482
1483 const char *func_name() const override {
1484 return "internal_get_partition_nodegroup";
1485 }
1486
1487 String *val_str(String *) override;
1488};
1489
1491 public:
1493 Item *d)
1494 : Item_str_func(pos, a, b, c, d) {}
1495
1496 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1497 bool resolve_type(THD *) override {
1498 // maximum string length of all options is expected
1499 // to be less than 256 characters.
1501 set_nullable(true);
1502 null_on_null = false;
1503
1504 return false;
1505 }
1506
1507 const char *func_name() const override { return "internal_tablespace_type"; }
1508
1509 String *val_str(String *) override;
1510};
1511
1513 public:
1515 Item *b, Item *c, Item *d)
1516 : Item_str_func(pos, a, b, c, d) {}
1517
1518 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1519 bool resolve_type(THD *) override {
1520 // maximum string length of all options is expected
1521 // to be less than 256 characters.
1523 set_nullable(true);
1524 null_on_null = false;
1525
1526 return false;
1527 }
1528
1529 const char *func_name() const override {
1530 return "internal_tablespace_logfile_group_name";
1531 }
1532
1533 String *val_str(String *) override;
1534};
1535
1537 public:
1539 Item *c, Item *d)
1540 : Item_str_func(pos, a, b, c, d) {}
1541
1542 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1543 bool resolve_type(THD *) override {
1544 // maximum string length of all options is expected
1545 // to be less than 256 characters.
1547 set_nullable(true);
1548 null_on_null = false;
1549
1550 return false;
1551 }
1552
1553 const char *func_name() const override {
1554 return "internal_tablespace_status";
1555 }
1556 String *val_str(String *) override;
1557};
1558
1560 public:
1562 Item *c, Item *d)
1563 : Item_str_func(pos, a, b, c, d) {}
1564
1565 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1566 bool resolve_type(THD *) override {
1567 // maximum string length of all options is expected
1568 // to be less than 256 characters.
1570 set_nullable(true);
1571 null_on_null = false;
1572
1573 return false;
1574 }
1575
1576 const char *func_name() const override {
1577 return "internal_tablespace_row_format";
1578 }
1579
1580 String *val_str(String *) override;
1581};
1582
1584 public:
1586 Item *d)
1587 : Item_str_func(pos, a, b, c, d) {}
1588
1589 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1590 bool resolve_type(THD *) override {
1591 // maximum string length of all options is expected
1592 // to be less than 256 characters.
1594 set_nullable(true);
1595 null_on_null = false;
1596
1597 return false;
1598 }
1599
1600 const char *func_name() const override { return "internal_tablespace_extra"; }
1601
1602 String *val_str(String *) override;
1603};
1604
1606 public:
1608 : Item_str_func(pos, list) {}
1609
1610 bool resolve_type(THD *) override {
1611 set_nullable(false);
1613 return false;
1614 }
1615
1616 const char *func_name() const override { return "convert_cpu_id_mask"; }
1617
1618 String *val_str(String *) override;
1619};
1620
1622 public:
1624 : Item_str_func(pos, a, b) {}
1625
1626 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1627 bool resolve_type(THD *) override {
1629 set_nullable(true);
1630 null_on_null = false;
1631
1632 return false;
1633 }
1634
1635 const char *func_name() const override { return "get_dd_property_key_value"; }
1636
1637 String *val_str(String *) override;
1638};
1639
1641 public:
1643 : Item_str_func(pos, a, b) {}
1644
1645 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1646 bool resolve_type(THD *) override {
1648 set_nullable(true);
1649 null_on_null = false;
1650
1651 return false;
1652 }
1653
1654 const char *func_name() const override { return "remove_dd_property_key"; }
1655
1656 String *val_str(String *) override;
1657};
1658
1660 public:
1662 : Item_str_func(pos, a, b) {}
1663
1664 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1665 bool resolve_type(THD *) override {
1666 // maximum string length of all options is expected
1667 // to be less than 256 characters.
1669 set_nullable(true);
1670 null_on_null = false;
1671
1672 return false;
1673 }
1674
1675 const char *func_name() const override {
1676 return "convert_interval_to_user_interval";
1677 }
1678
1679 String *val_str(String *) override;
1680};
1681
1683 public:
1685 : Item_str_func(pos, list) {}
1686
1687 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1688 bool resolve_type(THD *) override {
1690 set_nullable(true);
1691 null_on_null = false;
1692
1693 return false;
1694 }
1695
1696 const char *func_name() const override { return "internal_get_username"; }
1697
1698 String *val_str(String *) override;
1699};
1700
1702 public:
1704 : Item_str_func(pos, list) {}
1705
1706 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1707 bool resolve_type(THD *) override {
1709 set_nullable(true);
1710 null_on_null = false;
1711
1712 return false;
1713 }
1714
1715 const char *func_name() const override { return "internal_get_hostname"; }
1716
1717 String *val_str(String *) override;
1718};
1719
1721 public:
1723 : Item_str_func(pos) {}
1724
1725 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1726 bool resolve_type(THD *) override {
1728 set_nullable(true);
1729 null_on_null = false;
1730
1731 return false;
1732 }
1733
1734 const char *func_name() const override {
1735 return "internal_get_enabled_role_json";
1736 }
1737
1738 String *val_str(String *) override;
1739};
1740
1742 public:
1744 : Item_str_func(pos) {}
1745
1746 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1747 bool resolve_type(THD *) override {
1749 set_nullable(true);
1750 null_on_null = false;
1751
1752 return false;
1753 }
1754
1755 const char *func_name() const override {
1756 return "internal_get_mandatory_roles_json";
1757 }
1758
1759 String *val_str(String *) override;
1760};
1761
1763 public:
1765 : Item_str_func(pos, list) {}
1766
1767 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1768 bool resolve_type(THD *) override {
1769 // maximum string length of all options is expected
1770 // to be less than 256 characters.
1772 set_nullable(false);
1773 null_on_null = false;
1774
1775 return false;
1776 }
1777
1778 const char *func_name() const override {
1779 return "internal_get_dd_column_extra";
1780 }
1781
1782 String *val_str(String *) override;
1783};
1784
1785#endif /* ITEM_STRFUNC_INCLUDED */
void set(const DTCollation &dt)
Definition: item.h:192
void set_repertoire(uint repertoire_arg)
Definition: item.h:218
const CHARSET_INFO * collation
Definition: item.h:174
Definition: field.h:573
Definition: item_cmpfunc.h:285
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_cmpfunc.h:319
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:3602
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:3493
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:3571
Definition: item.h:4033
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:659
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:649
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:710
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:639
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:2865
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:2874
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:2505
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:3156
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:3170
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:4041
String * val_str(String *str) override
Definition: item_strfunc.cc:4049
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:1179
String tmp_value
Definition: item_strfunc.h:351
String * val_str(String *) override
concat with separator.
Definition: item_strfunc.cc:1146
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:1103
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1125
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:3076
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:3009
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3002
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:1605
const char * func_name() const override
Definition: item_strfunc.h:1616
Item_func_convert_cpu_id_mask(const POS &pos, Item *list)
Definition: item_strfunc.h:1607
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1610
String * val_str(String *) override
Definition: item_strfunc.cc:5089
Definition: item_strfunc.h:1659
const char * func_name() const override
Definition: item_strfunc.h:1675
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1665
enum Functype functype() const override
Definition: item_strfunc.h:1664
String * val_str(String *) override
Definition: item_strfunc.cc:5303
Item_func_convert_interval_to_user_interval(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1661
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:4029
String value
Definition: item_strfunc.h:1173
Definition: item_strfunc.h:1263
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:1277
void set_current_role(THD *thd)
Definition: item_strfunc.cc:5145
Item_func_current_role()
Definition: item_strfunc.h:1267
const char * func_name() const override
Definition: item_strfunc.h:1270
bool value_cache_set
a flag whether value_cache is set or not
Definition: item_strfunc.h:1284
Item_func_sysconst super
Definition: item_strfunc.h:1264
Item_func_current_role(const POS &pos)
Definition: item_strfunc.h:1268
String * val_str(String *) override
Definition: item_strfunc.cc:5140
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1273
String value_cache
Cache for the result value.
Definition: item_strfunc.h:1292
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.cc:5132
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:2034
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:1979
String * val_str(String *) override
Definition: item_strfunc.cc:1985
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:1949
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:1941
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:2360
String * val_str(String *str) override
Definition: item_strfunc.cc:2373
double val_real() override
Definition: item_strfunc.cc:2348
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2330
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:3723
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3792
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:2317
String tmp_str
Definition: item_strfunc.h:750
MY_LOCALE * get_locale(Item *item)
Definition: item_strfunc.cc:2188
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:2226
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2203
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:812
const char * func_name() const override
Definition: item_strfunc.h:272
String * val_str(String *) override
Definition: item_strfunc.cc:824
Item_func_from_base64(const POS &pos, Item *a)
Definition: item_strfunc.h:269
Definition: item_strfunc.h:1331
Item_func_get_dd_column_privileges(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1333
const char * func_name() const override
Definition: item_strfunc.h:1350
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1337
enum Functype functype() const override
Definition: item_strfunc.h:1336
String * val_str(String *) override
This function prepares string with list of column privileges.
Definition: item_strfunc.cc:4385
Definition: item_strfunc.h:1355
enum Functype functype() const override
Definition: item_strfunc.h:1360
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1361
String * val_str(String *) override
This function prepares string representing create_options for table.
Definition: item_strfunc.cc:4457
Item_func_get_dd_create_options(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1357
const char * func_name() const override
Definition: item_strfunc.h:1371
Definition: item_strfunc.h:1446
const char * func_name() const override
Definition: item_strfunc.h:1462
Item_func_get_dd_index_private_data(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1448
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1452
String * val_str(String *) override
This function prepares string representing se_private_data for index.
Definition: item_strfunc.cc:5002
enum Functype functype() const override
Definition: item_strfunc.h:1451
Definition: item_strfunc.h:1621
String * val_str(String *) override
This function prepares string representing value stored at key supplied.
Definition: item_strfunc.cc:5200
enum Functype functype() const override
Definition: item_strfunc.h:1626
Item_func_get_dd_property_key_value(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1623
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1627
const char * func_name() const override
Definition: item_strfunc.h:1635
Definition: item_strfunc.h:1376
String * val_str(String *) override
This function prepares string representing options for a schema.
Definition: item_strfunc.cc:4658
const char * func_name() const override
Definition: item_strfunc.h:1392
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1382
enum Functype functype() const override
Definition: item_strfunc.h:1381
Item_func_get_dd_schema_options(const POS &pos, Item *a)
Definition: item_strfunc.h:1378
Definition: item_strfunc.h:1423
String * val_str(String *) override
This function prepares string representing se_private_data for tablespace.
Definition: item_strfunc.cc:4936
const char * func_name() const override
Definition: item_strfunc.h:1439
enum Functype functype() const override
Definition: item_strfunc.h:1428
Item_func_get_dd_tablespace_private_data(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1425
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1429
Definition: item_strfunc.h:1467
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1473
String * val_str(String *) override
Definition: item_strfunc.cc:4783
enum Functype functype() const override
Definition: item_strfunc.h:1472
Item_func_get_partition_nodegroup(const POS &pos, Item *a)
Definition: item_strfunc.h:1469
const char * func_name() const override
Definition: item_strfunc.h:1483
Definition: item_strfunc.h:1252
const char * func_name() const override
Definition: item_strfunc.h:1259
Item_func_gtid_subtract(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1256
String buf1
Definition: item_strfunc.h:1253
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:4329
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:4311
String buf2
Definition: item_strfunc.h:1253
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:3347
Item_func_hex(const POS &pos, Item *a)
Definition: item_strfunc.h:884
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:3359
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:1328
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:1380
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:1397
Item_func_internal_get_comment_or_error(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1399
const char * func_name() const override
Definition: item_strfunc.h:1416
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1403
String * val_str(String *) override
Definition: item_strfunc.cc:4706
enum Functype functype() const override
Definition: item_strfunc.h:1402
Definition: item_strfunc.h:1762
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1768
String * val_str(String *) override
This function prepares string representing EXTRA column for I_S.COLUMNS.
Definition: item_strfunc.cc:5479
const char * func_name() const override
Definition: item_strfunc.h:1778
Item_func_internal_get_dd_column_extra(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1764
enum Functype functype() const override
Definition: item_strfunc.h:1767
Definition: item_strfunc.h:1720
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1726
enum Functype functype() const override
Definition: item_strfunc.h:1725
Item_func_internal_get_enabled_role_json(const POS &pos)
Definition: item_strfunc.h:1722
String * val_str(String *) override
Definition: item_strfunc.cc:5398
const char * func_name() const override
Definition: item_strfunc.h:1734
Definition: item_strfunc.h:1701
Item_func_internal_get_hostname(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1703
enum Functype functype() const override
Definition: item_strfunc.h:1706
const char * func_name() const override
Definition: item_strfunc.h:1715
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1707
String * val_str(String *) override
Definition: item_strfunc.cc:5363
Definition: item_strfunc.h:1741
const char * func_name() const override
Definition: item_strfunc.h:1755
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1747
enum Functype functype() const override
Definition: item_strfunc.h:1746
Item_func_internal_get_mandatory_roles_json(const POS &pos)
Definition: item_strfunc.h:1743
String * val_str(String *) override
Definition: item_strfunc.cc:5430
Definition: item_strfunc.h:1682
String * val_str(String *) override
Definition: item_strfunc.cc:5326
Item_func_internal_get_username(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1684
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1688
enum Functype functype() const override
Definition: item_strfunc.h:1687
const char * func_name() const override
Definition: item_strfunc.h:1696
Definition: item_strfunc.h:1583
String * val_str(String *) override
Definition: item_strfunc.cc:4902
const char * func_name() const override
Definition: item_strfunc.h:1600
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1590
enum Functype functype() const override
Definition: item_strfunc.h:1589
Item_func_internal_tablespace_extra(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1585
const char * func_name() const override
Definition: item_strfunc.h:1529
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1519
String * val_str(String *) override
Definition: item_strfunc.cc:4840
Item_func_internal_tablespace_logfile_group_name(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1514
enum Functype functype() const override
Definition: item_strfunc.h:1518
Definition: item_strfunc.h:1559
const char * func_name() const override
Definition: item_strfunc.h:1576
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1566
Item_func_internal_tablespace_row_format(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1561
String * val_str(String *) override
Definition: item_strfunc.cc:4880
enum Functype functype() const override
Definition: item_strfunc.h:1565
Definition: item_strfunc.h:1536
Item_func_internal_tablespace_status(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1538
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1543
String * val_str(String *) override
Definition: item_strfunc.cc:4863
enum Functype functype() const override
Definition: item_strfunc.h:1542
const char * func_name() const override
Definition: item_strfunc.h:1553
Definition: item_strfunc.h:1490
enum Functype functype() const override
Definition: item_strfunc.h:1496
String * val_str(String *) override
Definition: item_strfunc.cc:4823
const char * func_name() const override
Definition: item_strfunc.h:1507
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1497
Item_func_internal_tablespace_type(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1492
Definition: item_strfunc.h:855
const char * func_name() const override
Definition: item_strfunc.h:861
longlong val_int() override
Definition: item_strfunc.cc:2916
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:1497
String tmp_value
Definition: item_strfunc.h:431
String * val_str(String *) override
Definition: item_strfunc.cc:1449
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:3433
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:1427
Definition: item_strfunc.h:816
String * val_str(String *) override
Definition: item_strfunc.cc:2929
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:2796
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:2435
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:2494
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2409
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:2403
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:2393
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:2427
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:2487
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:3849
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:3811
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:734
Item_func_random_bytes(const POS &pos, Item *a)
Definition: item_strfunc.h:327
String * val_str(String *a) override
Definition: item_strfunc.cc:740
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:717
Definition: item_strfunc.h:1640
Item_func_remove_dd_property_key(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1642
const char * func_name() const override
Definition: item_strfunc.h:1654
String * val_str(String *) override
This function removes a key value from given property string.
Definition: item_strfunc.cc:5257
enum Functype functype() const override
Definition: item_strfunc.h:1645
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1646
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:2555
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:2595
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:1308
String * val_str(String *) override
Replace all occurrences of string2 in string1 with string3.
Definition: item_strfunc.cc:1246
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:1198
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1234
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:1528
const char * func_name() const override
Definition: item_strfunc.h:448
String * val_str(String *) override
Definition: item_strfunc.cc:1506
String tmp_value
Definition: item_strfunc.h:441
Definition: item_strfunc.h:1295
Item_func_roles_graphml(const POS &pos)
Definition: item_strfunc.h:1300
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.cc:5183
String value_cache
Cache for the result value.
Definition: item_strfunc.h:1325
Item_func_sysconst super
Definition: item_strfunc.h:1296
const char * func_name() const override
Definition: item_strfunc.h:1310
Item_func_roles_graphml()
Definition: item_strfunc.h:1299
bool calculate_graphml(THD *thd)
Constructs and caches the graphml string.
Definition: item_strfunc.cc:5163
String * val_str(String *) override
Definition: item_strfunc.cc:5178
bool value_cache_set
Set to true if value_cache is set.
Definition: item_strfunc.h:1328
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1305
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:1312
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:2698
String * val_str(String *) override
Definition: item_strfunc.cc:2724
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:3130
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:3145
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:3103
enum Functype functype() const override
Definition: item_strfunc.h:1104
String * val_str(String *) override
Definition: item_strfunc.cc:3095
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:3085
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:2086
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2042
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:2639
String * val_str(String *) override
Definition: item_strfunc.cc:2670
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:1064
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:1072
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:1034
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1019
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:1635
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:1625
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:1538
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:1585
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:1919
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:774
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:790
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:1850
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:1889
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:1753
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:4098
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:4000
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:3389
String * val_str(String *) override
Convert given hex string to a binary string.
Definition: item_strfunc.cc:3401
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:1438
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:1970
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:2024
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:2001
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:1965
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:2831
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:2823
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:4306
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:4185
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:4191
Item_str_func super
Definition: item_strfunc.h:1229
Definition: item_strfunc.h:1142
String * val_str(String *) override
Definition: item_strfunc.cc:3257
bool eq(const Item *item, bool binary_cmp) const override
Definition: item_strfunc.cc:3238
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3204
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:3181
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:3192
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:922
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:3650
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:3658
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:10539
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:1395
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:1487
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:1470
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:3463
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:3480
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:802
String str_value
str_values's main purpose is to cache the value in save_in_field
Definition: item.h:3251
void set_nullable(bool nullable)
Definition: item.h:3334
DTCollation collation
Character set and collation properties assigned for this Item.
Definition: item.h:3258
bool is_nullable() const
Definition: item.h:3333
bool get_time_from_string(MYSQL_TIME *ltime)
Convert val_str() to time in MYSQL_TIME.
Definition: item.cc:1498
void set_data_type_blob(uint32 max_l)
Set the Item to be of BLOB type.
Definition: item.h:1469
virtual Item_field * field_for_view_update()
Definition: item.h:2916
virtual bool fix_fields(THD *, Item **)
Definition: item.cc:4832
bool fixed
True if item has been resolved.
Definition: item.h:3322
bool null_value
True if item is null.
Definition: item.h:3359
virtual bool check_cols(uint c)
Definition: item.cc:1169
bool unsigned_flag
Definition: item.h:3360
longlong val_int_from_string()
Definition: item.cc:486
bool get_date_from_string(MYSQL_TIME *ltime, my_time_flags_t flags)
Convert val_str() to date in MYSQL_TIME.
Definition: item.cc:1411
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:2367
void set_data_type_string(uint32 max_l)
Set the Item to be variable length string.
Definition: item.h:1387
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:1161
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:3276
double val_real_from_string()
Definition: item.cc:432
Definition: sql_list.h:433
Definition: sql_locale.h:36
Storage for name strings.
Definition: item.h:285
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independe...
Definition: parse_tree_helpers.h:101
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:102
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_class.h:922
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
char * pos
Definition: do_ctype.cc:76
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:168
Item *(Item::* Item_transformer)(uchar *arg)
Type for transformers used by Item::transform and Item::compile.
Definition: item.h:719
#define NAME_STRING(x)
Definition: item.h:345
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:5071
String * mysql_generate_uuid(String *str)
Generate Universal Unique Identifier (UUID).
Definition: item_strfunc.cc:4199
A better implementation of the UNIX ctype(3) library.
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1525
#define MY_CS_UNICODE
Definition: m_ctype.h:117
size_t(* my_charset_conv_case)(const CHARSET_INFO *, char *, size_t, char *, size_t)
Definition: m_ctype.h:266
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:510
#define MY_REPERTOIRE_ASCII
Definition: m_ctype.h:129
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:902
#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:1055
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:2859
type_conversion_status
Status when storing a value in a field or converting from one datatype to another.
Definition: field.h:200
@ VGS_CHECK_CONSTRAINT
Definition: field.h:474
@ VGS_GENERATED_COLUMN
Definition: field.h:472
@ DERIVATION_COERCIBLE
Definition: field.h:180
@ DERIVATION_SYSCONST
Definition: field.h:181
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:292
bool(Item::*)(unsigned char *) Item_processor
Processor type for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:310
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:354
uint state
Definition: m_ctype.h:358
Struct used to pass around arguments to/from check_function_as_value_generator.
Definition: item.h:485
const char * banned_function_name
the name of the function which is not allowed
Definition: item.h:499
Value_generator_source source
Definition: item.h:497
Definition: mysql_lex_string.h:34
Definition: mysql_time.h:81
Definition: item.h:395
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:90
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