MySQL 8.0.29
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
108
110 : Item_func(pos, opt_list) {}
111
112 longlong val_int() override { return val_int_from_string(); }
113 double val_real() override { return val_real_from_string(); }
114 my_decimal *val_decimal(my_decimal *) override;
115 bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) override {
116 return get_date_from_string(ltime, fuzzydate);
117 }
118 bool get_time(MYSQL_TIME *ltime) override {
119 return get_time_from_string(ltime);
120 }
121 enum Item_result result_type() const override { return STRING_RESULT; }
122 void left_right_max_length(THD *thd);
123 bool fix_fields(THD *thd, Item **ref) override;
124 bool resolve_type(THD *thd) override {
125 if (param_type_is_default(thd, 0, -1)) return true;
126 return false;
127 }
129
130 protected:
131 /**
132 Calls push_warning_printf for packet overflow.
133 @return error_str().
134 */
135 String *push_packet_overflow_warning(THD *thd, const char *func);
136};
137
138/*
139 Functions that return values with ASCII repertoire
140*/
143
144 public:
147 }
148
151 }
154 }
155
158 }
160 : Item_str_func(pos, a, b) {
162 }
163
166 }
168 : Item_str_func(pos, a, b, c) {
170 }
171
172 String *val_str(String *str) override {
174 }
175 String *val_str_ascii(String *) override = 0;
176};
177
178class Item_func_md5 final : public Item_str_ascii_func {
180
181 public:
183 String *val_str_ascii(String *) override;
184 bool resolve_type(THD *thd) override;
185 const char *func_name() const override { return "md5"; }
186};
187
189 public:
191 String *val_str_ascii(String *) override;
192 bool resolve_type(THD *thd) override;
193 const char *func_name() const override { return "sha"; }
194};
195
197 public:
199 : Item_str_ascii_func(pos, a, b) {}
200 String *val_str_ascii(String *) override;
201 bool resolve_type(THD *thd) override;
202 const char *func_name() const override { return "sha2"; }
203};
204
207
208 public:
210 String *val_str_ascii(String *) override;
211 bool resolve_type(THD *) override;
212 const char *func_name() const override { return "to_base64"; }
213};
214
216 public:
217 Item_func_statement_digest(const POS &pos, Item *query_string)
218 : Item_str_ascii_func(pos, query_string) {}
219
220 const char *func_name() const override { return "statement_digest"; }
221 bool check_function_as_value_generator(uchar *checker_args) override {
223 pointer_cast<Check_function_as_value_generator_parameters *>(
224 checker_args);
225 func_arg->banned_function_name = func_name();
226 return (func_arg->source == VGS_GENERATED_COLUMN);
227 }
228
229 bool resolve_type(THD *thd) override;
230
231 String *val_str_ascii(String *) override;
232
233 private:
235};
236
238 public:
240 : Item_str_func(pos, query_string) {}
241
242 const char *func_name() const override { return "statement_digest_text"; }
243
244 /**
245 The type is always LONGTEXT, just like the digest_text columns in
246 Performance Schema
247 */
248 bool resolve_type(THD *thd) override;
249
250 bool check_function_as_value_generator(uchar *checker_args) override {
252 pointer_cast<Check_function_as_value_generator_parameters *>(
253 checker_args);
254 func_arg->banned_function_name = func_name();
255 return (func_arg->source == VGS_GENERATED_COLUMN);
256 }
257 String *val_str(String *) override;
258
259 private:
261};
262
265
266 public:
268 String *val_str(String *) override;
269 bool resolve_type(THD *thd) override;
270 const char *func_name() const override { return "from_base64"; }
271};
272
276
277 public:
279 : Item_str_func(pos, a, b) {}
281 : Item_str_func(pos, a, b, c) {}
282
283 bool itemize(Parse_context *pc, Item **res) override;
284 String *val_str(String *) override;
285 bool resolve_type(THD *) override;
286 const char *func_name() const override { return "aes_encrypt"; }
287};
288
291
292 public:
294 : Item_str_func(pos, a, b) {}
296 : Item_str_func(pos, a, b, c) {}
297
298 bool itemize(Parse_context *pc, Item **res) override;
299 String *val_str(String *) override;
300 bool resolve_type(THD *thd) override;
301 const char *func_name() const override { return "aes_decrypt"; }
302};
303
306
307 /** limitation from the SSL library */
309
310 public:
312
313 bool itemize(Parse_context *pc, Item **res) override;
314 bool resolve_type(THD *thd) override;
315 String *val_str(String *a) override;
316
317 const char *func_name() const override { return "random_bytes"; }
318};
319
321 String tmp_value{"", 0, collation.collation}; // Initialize to empty
322 public:
324 : Item_str_func(pos, opt_list) {}
327 : Item_str_func(pos, a, b) {}
328
329 String *val_str(String *) override;
330 bool resolve_type(THD *thd) override;
331 const char *func_name() const override { return "concat"; }
332};
333
335 String tmp_value{"", 0, collation.collation}; // Initialize to empty
336 public:
338 : Item_str_func(list) {
339 null_on_null = false;
340 }
342 : Item_str_func(pos, opt_list) {
343 null_on_null = false;
344 }
345 String *val_str(String *) override;
346 bool resolve_type(THD *thd) override;
347 const char *func_name() const override { return "concat_ws"; }
348};
349
352
353 public:
356
357 String *val_str(String *) override;
358 bool resolve_type(THD *thd) override;
359 const char *func_name() const override { return "reverse"; }
360};
361
364 /// Holds result in case we need to allocate our own result buffer.
366
367 public:
369 : Item_str_func(pos, org, find, replace) {}
370 String *val_str(String *) override;
371 bool resolve_type(THD *thd) override;
372 const char *func_name() const override { return "replace"; }
373};
374
377 /// Holds result in case we need to allocate our own result buffer.
379
380 public:
382 Item *new_str)
383 : Item_str_func(pos, org, start, length, new_str) {}
384 String *val_str(String *) override;
385 bool resolve_type(THD *thd) override;
386 const char *func_name() const override { return "insert"; }
387};
388
390 protected:
394
395 public:
396 Item_str_conv(const POS &pos, Item *item) : Item_str_func(pos, item) {}
397 String *val_str(String *) override;
398};
399
401 public:
402 Item_func_lower(const POS &pos, Item *item) : Item_str_conv(pos, item) {}
403 const char *func_name() const override { return "lower"; }
404 bool resolve_type(THD *) override;
405};
406
408 public:
409 Item_func_upper(const POS &pos, Item *item) : Item_str_conv(pos, item) {}
410 const char *func_name() const override { return "upper"; }
411 bool resolve_type(THD *) override;
412};
413
416
417 public:
418 Item_func_left(const POS &pos, Item *a, Item *b) : Item_str_func(pos, a, b) {}
419 String *val_str(String *) override;
420 bool resolve_type(THD *thd) override;
421 const char *func_name() const override { return "left"; }
422};
423
426
427 public:
429 : Item_str_func(pos, a, b) {}
430 String *val_str(String *) override;
431 bool resolve_type(THD *thd) override;
432 const char *func_name() const override { return "right"; }
433};
434
437
439
440 public:
442 Item_func_substr(const POS &pos, Item *a, Item *b) : super(pos, a, b) {}
443
444 Item_func_substr(Item *a, Item *b, Item *c) : Item_str_func(a, b, c) {}
445 Item_func_substr(const POS &pos, Item *a, Item *b, Item *c)
446 : super(pos, a, b, c) {}
447
448 String *val_str(String *) override;
449 bool resolve_type(THD *thd) override;
450 const char *func_name() const override { return "substr"; }
451};
452
455
456 public:
458 : Item_str_func(pos, a, b, c) {}
459 String *val_str(String *) override;
460 bool resolve_type(THD *) override;
461 const char *func_name() const override { return "substring_index"; }
462};
463
465 public:
466 /**
467 Why all the trim modes in this enum?
468 We need to maintain parsing information, so that our print() function
469 can reproduce correct messages and view definitions.
470 */
478 };
479
480 private:
484 const bool m_trim_leading;
485 const bool m_trim_trailing;
486
487 public:
489 : Item_str_func(a, b),
490 m_trim_mode(tm),
493
495 : Item_str_func(pos, a, b),
496 m_trim_mode(tm),
499
501 : Item_str_func(a),
502 m_trim_mode(tm),
505
507 : Item_str_func(pos, a),
508 m_trim_mode(tm),
511
512 bool trim_leading() const {
515 }
516
517 bool trim_trailing() const {
520 }
521
522 String *val_str(String *) override;
523 bool resolve_type(THD *) override;
524 const char *func_name() const override {
525 switch (m_trim_mode) {
527 return "trim";
528 case TRIM_BOTH:
529 return "trim";
530 case TRIM_LEADING:
531 return "ltrim";
532 case TRIM_TRAILING:
533 return "rtrim";
534 case TRIM_LTRIM:
535 return "ltrim";
536 case TRIM_RTRIM:
537 return "rtrim";
538 }
539 return nullptr;
540 }
541 void print(const THD *thd, String *str,
542 enum_query_type query_type) const override;
543};
544
545class Item_func_ltrim final : public Item_func_trim {
546 public:
549};
550
551class Item_func_rtrim final : public Item_func_trim {
552 public:
555};
556
559
560 public:
563 }
564 explicit Item_func_sysconst(const POS &pos) : super(pos) {
566 }
567
568 Item *safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override;
569 /*
570 Used to create correct Item name in new converted item in
571 safe_charset_converter, return string representation of this function
572 call
573 */
574 virtual const Name_string fully_qualified_func_name() const = 0;
575 bool check_function_as_value_generator(uchar *checker_args) override {
577 pointer_cast<Check_function_as_value_generator_parameters *>(
578 checker_args);
579 func_arg->banned_function_name = func_name();
580 return ((func_arg->source == VGS_GENERATED_COLUMN) ||
581 (func_arg->source == VGS_CHECK_CONSTRAINT));
582 }
583};
584
587
588 public:
590
591 bool itemize(Parse_context *pc, Item **res) override;
592
593 String *val_str(String *) override;
594 bool resolve_type(THD *) override {
596 set_nullable(true);
597 return false;
598 }
599 const char *func_name() const override { return "database"; }
600 const Name_string fully_qualified_func_name() const override {
601 return NAME_STRING("database()");
602 }
603};
604
607
608 protected:
609 /// True when function value is evaluated, set to false after each execution
610 bool m_evaluated = false;
611
612 /// Evaluate user name, must be called once per execution
613 bool evaluate(const char *user, const char *host);
614 type_conversion_status save_in_field_inner(Field *field, bool) override;
615
616 public:
618 explicit Item_func_user(const POS &pos) : super(pos) {
620 }
621
623 return INNER_TABLE_BIT;
624 }
625
626 bool itemize(Parse_context *pc, Item **res) override;
627
628 bool check_function_as_value_generator(uchar *checker_args) override {
630 pointer_cast<Check_function_as_value_generator_parameters *>(
631 checker_args);
632 func_arg->banned_function_name = func_name();
633 return true;
634 }
635 bool resolve_type(THD *) override {
637 return false;
638 }
639 void cleanup() override {
640 m_evaluated = false;
643 }
644 const char *func_name() const override { return "user"; }
645 const Name_string fully_qualified_func_name() const override {
646 return NAME_STRING("user()");
647 }
648
649 String *val_str(String *) override;
650};
651
654
656
657 protected:
658 type_conversion_status save_in_field_inner(Field *field, bool) override;
659
660 public:
661 explicit Item_func_current_user(const POS &pos) : super(pos) {}
662
663 bool itemize(Parse_context *pc, Item **res) override;
664 const char *func_name() const override { return "current_user"; }
665 const Name_string fully_qualified_func_name() const override {
666 return NAME_STRING("current_user()");
667 }
668
669 String *val_str(String *) override;
670};
671
674
675 public:
678 String *val_str(String *) override;
679 bool resolve_type(THD *thd) override;
680 const char *func_name() const override { return "soundex"; }
681};
682
683class Item_func_elt final : public Item_str_func {
684 public:
686 : Item_str_func(pos, opt_list) {}
687 double val_real() override;
688 longlong val_int() override;
689 String *val_str(String *str) override;
690 bool resolve_type(THD *thd) override;
691 const char *func_name() const override { return "elt"; }
692};
693
694class Item_func_make_set final : public Item_str_func {
696
699
700 public:
702 : Item_str_func(pos, opt_list), item(a) {}
703
704 bool itemize(Parse_context *pc, Item **res) override;
705 String *val_str(String *str) override;
706 bool fix_fields(THD *thd, Item **ref) override {
707 assert(fixed == 0);
708 bool res = ((!item->fixed && item->fix_fields(thd, &item)) ||
711 return res;
712 }
713 void split_sum_func(THD *thd, Ref_item_array ref_item_array,
714 mem_root_deque<Item *> *fields) override;
715 bool resolve_type(THD *) override;
716 void update_used_tables() override;
717 const char *func_name() const override { return "make_set"; }
718
719 bool walk(Item_processor processor, enum_walk walk, uchar *arg) override {
720 if ((walk & enum_walk::PREFIX) && (this->*processor)(arg)) return true;
721 if (item->walk(processor, walk, arg)) return true;
722 for (uint i = 0; i < arg_count; i++) {
723 if (args[i]->walk(processor, walk, arg)) return true;
724 }
725 return ((walk & enum_walk::POSTFIX) && (this->*processor)(arg));
726 }
727
728 Item *transform(Item_transformer transformer, uchar *arg) override;
729 void print(const THD *thd, String *str,
730 enum_query_type query_type) const override;
731};
732
736
737 public:
739 : Item_str_ascii_func(pos, org, dec) {}
740 Item_func_format(const POS &pos, Item *org, Item *dec, Item *lang)
741 : Item_str_ascii_func(pos, org, dec, lang) {}
742
743 MY_LOCALE *get_locale(Item *item);
744 String *val_str_ascii(String *) override;
745 bool resolve_type(THD *thd) override;
746 const char *func_name() const override { return "format"; }
747 void print(const THD *thd, String *str,
748 enum_query_type query_type) const override;
749};
750
751class Item_func_char final : public Item_str_func {
752 public:
754 : Item_str_func(pos, list) {
756 }
758 : Item_str_func(pos, list) {
760 }
761 String *val_str(String *) override;
762 bool resolve_type(THD *thd) override {
763 if (param_type_is_default(thd, 0, -1, MYSQL_TYPE_LONGLONG)) return true;
765 return false;
766 }
767 const char *func_name() const override { return "char"; }
768};
769
770class Item_func_repeat final : public Item_str_func {
772
773 public:
774 Item_func_repeat(const POS &pos, Item *arg1, Item *arg2)
775 : Item_str_func(pos, arg1, arg2) {}
776 String *val_str(String *) override;
777 bool resolve_type(THD *thd) override;
778 const char *func_name() const override { return "repeat"; }
779};
780
781class Item_func_space final : public Item_str_func {
782 public:
783 Item_func_space(const POS &pos, Item *arg1) : Item_str_func(pos, arg1) {}
784 String *val_str(String *) override;
785 bool resolve_type(THD *) override;
786 const char *func_name() const override { return "space"; }
787};
788
789class Item_func_rpad final : public Item_str_func {
791
792 public:
793 Item_func_rpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
794 : Item_str_func(pos, arg1, arg2, arg3) {}
795 String *val_str(String *) override;
796 bool resolve_type(THD *) override;
797 const char *func_name() const override { return "rpad"; }
798};
799
800class Item_func_lpad final : public Item_str_func {
802
803 public:
804 Item_func_lpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
805 : Item_str_func(pos, arg1, arg2, arg3) {}
806 String *val_str(String *) override;
807 bool resolve_type(THD *) override;
808 const char *func_name() const override { return "lpad"; }
809};
810
812 /// Buffer to store the binary result
814
815 public:
817 : Item_str_func(pos, arg1) {}
818 Item_func_uuid_to_bin(const POS &pos, Item *arg1, Item *arg2)
819 : Item_str_func(pos, arg1, arg2) {}
820 String *val_str(String *) override;
821 bool resolve_type(THD *) override;
822 const char *func_name() const override { return "uuid_to_bin"; }
823};
824
826 /// Buffer to store the text result
828
829 public:
831 : Item_str_ascii_func(pos, arg1) {}
832 Item_func_bin_to_uuid(const POS &pos, Item *arg1, Item *arg2)
833 : Item_str_ascii_func(pos, arg1, arg2) {}
834 String *val_str_ascii(String *) override;
835 bool resolve_type(THD *thd) override;
836 const char *func_name() const override { return "bin_to_uuid"; }
837};
838
839class Item_func_is_uuid final : public Item_bool_func {
841
842 public:
844 longlong val_int() override;
845 const char *func_name() const override { return "is_uuid"; }
846 bool resolve_type(THD *thd) override {
847 bool res = super::resolve_type(thd);
848 set_nullable(true);
849 return res;
850 }
851};
852
853class Item_func_conv final : public Item_str_func {
854 public:
855 // 64 digits plus possible '-'.
856 static constexpr uint32_t CONV_MAX_LENGTH = 64U + 1U;
857 Item_func_conv(const POS &pos, Item *a, Item *b, Item *c)
858 : Item_str_func(pos, a, b, c) {}
859 const char *func_name() const override { return "conv"; }
860 String *val_str(String *) override;
861 bool resolve_type(THD *) override;
862};
863
866
867 public:
869 const char *func_name() const override { return "hex"; }
870 String *val_str_ascii(String *) override;
871 bool resolve_type(THD *thd) override;
872};
873
874class Item_func_unhex final : public Item_str_func {
876
877 public:
879 /* there can be bad hex strings */
880 set_nullable(true);
881 }
882 const char *func_name() const override { return "unhex"; }
883 String *val_str(String *) override;
884 bool resolve_type(THD *thd) override;
885};
886
887#ifndef NDEBUG
889 protected:
892 const bool is_min;
893
894 public:
895 Item_func_like_range(const POS &pos, Item *a, Item *b, bool is_min_arg)
896 : Item_str_func(pos, a, b), is_min(is_min_arg) {
897 set_nullable(true);
898 }
899 String *val_str(String *) override;
900 bool resolve_type(THD *thd) override {
901 if (param_type_is_default(thd, 0, 1)) return true;
902 if (param_type_is_default(thd, 1, 2, MYSQL_TYPE_LONGLONG)) return true;
904 return false;
905 }
906};
907
909 public:
911 : Item_func_like_range(pos, a, b, true) {}
912 const char *func_name() const override { return "like_range_min"; }
913};
914
916 public:
918 : Item_func_like_range(pos, a, b, false) {}
919 const char *func_name() const override { return "like_range_max"; }
920};
921#endif
922
923/**
924 The following types of conversions are considered safe:
925
926 Conversion to and from "binary".
927 Conversion to Unicode.
928 Other kind of conversions are potentially lossy.
929*/
931 protected:
932 /// If true, conversion is needed so do it, else allow string copy.
934 /// The character set we are converting to
936 /// The character set we are converting from
937 const CHARSET_INFO *m_from_cs{nullptr};
939 /// Marks whether the underlying Item is constant and may be cached.
941 /// Length argument value, if any given.
942 longlong m_cast_length{-1}; // a priori not used
943 public:
944 bool m_safe;
945
946 protected:
947 /**
948 Helper for CAST and CONVERT type resolution: common logic to compute the
949 maximum numbers of characters of the type of the conversion.
950
951 @returns the maximum numbers of characters possible after the conversion
952 */
954
955 bool resolve_type(THD *thd) override;
956
957 public:
959 bool cache_if_const)
960 : Item_str_func(a), m_cast_cs(cs_arg) {
961 if (cache_if_const && args[0]->may_evaluate_const(thd)) {
962 uint errors = 0;
963 String tmp, *str = args[0]->val_str(&tmp);
964 if (!str || str_value.copy(str->ptr(), str->length(), str->charset(),
965 m_cast_cs, &errors))
966 null_value = true;
967 m_use_cached_value = true;
969 m_safe = (errors == 0);
970 } else {
971 m_use_cached_value = false;
972 // Marks whether the conversion is safe
974 cs_arg == &my_charset_bin || (cs_arg->state & MY_CS_UNICODE));
975 }
976 }
978 : Item_str_func(pos, a), m_cast_cs(cs_arg) {}
979
980 String *val_str(String *) override;
981};
982
984 public:
985 Item_typecast_char(THD *thd, Item *a, longlong length_arg,
986 const CHARSET_INFO *cs_arg)
987 : Item_charset_conversion(thd, a, cs_arg, false) {
988 m_cast_length = length_arg;
989 }
990 Item_typecast_char(const POS &pos, Item *a, longlong length_arg,
991 const CHARSET_INFO *cs_arg)
992 : Item_charset_conversion(pos, a, cs_arg) {
993 m_cast_length = length_arg;
994 }
995 enum Functype functype() const override { return TYPECAST_FUNC; }
996 bool eq(const Item *item, bool binary_cmp) const override;
997 const char *func_name() const override { return "cast_as_char"; }
998 void print(const THD *thd, String *str,
999 enum_query_type query_type) const override;
1000};
1001
1002class Item_load_file final : public Item_str_func {
1004
1006
1007 public:
1009
1010 bool itemize(Parse_context *pc, Item **res) override;
1011 String *val_str(String *) override;
1012 const char *func_name() const override { return "load_file"; }
1014 return INNER_TABLE_BIT;
1015 }
1016 bool resolve_type(THD *thd) override {
1017 if (param_type_is_default(thd, 0, 1)) return true;
1020 set_nullable(true);
1021 return false;
1022 }
1023 bool check_function_as_value_generator(uchar *checker_args) override {
1025 pointer_cast<Check_function_as_value_generator_parameters *>(
1026 checker_args);
1027 func_arg->banned_function_name = func_name();
1028 return true;
1029 }
1030};
1031
1033 public:
1035 : Item_str_func(pos, a, b, c) {}
1037 : Item_str_func(pos, a, b, c, d) {}
1039 Item *e)
1040 : Item_str_func(pos, a, b, c, d, e) {}
1041 String *val_str(String *str) override;
1042 bool resolve_type(THD *) override;
1043 const char *func_name() const override { return "export_set"; }
1044};
1045
1048
1049 public:
1051 const char *func_name() const override { return "quote"; }
1052 String *val_str(String *) override;
1053 bool resolve_type(THD *thd) override;
1054};
1055
1057 public:
1060 m_safe = false;
1061 }
1062
1064 bool cache_if_const)
1065 : Item_charset_conversion(thd, a, cs, cache_if_const) {
1066 assert(args[0]->fixed);
1067 }
1068 const char *func_name() const override { return "convert"; }
1069 void print(const THD *thd, String *str,
1070 enum_query_type query_type) const override;
1071};
1072
1075
1077
1078 public:
1080 const LEX_STRING &collation_string_arg)
1081 : super(pos, a, nullptr), collation_string(collation_string_arg) {}
1082
1083 bool itemize(Parse_context *pc, Item **res) override;
1084 String *val_str(String *) override;
1085 bool resolve_type(THD *) override;
1086 bool eq(const Item *item, bool binary_cmp) const override;
1087 const char *func_name() const override { return "collate"; }
1088 enum Functype functype() const override { return COLLATE_FUNC; }
1089 void print(const THD *thd, String *str,
1090 enum_query_type query_type) const override;
1092 /* this function is transparent for view updating */
1093 return args[0]->field_for_view_update();
1094 }
1095};
1096
1097class Item_func_charset final : public Item_str_func {
1098 public:
1100 null_on_null = false;
1101 }
1102 String *val_str(String *) override;
1103 const char *func_name() const override { return "charset"; }
1104 bool resolve_type(THD *thd) override {
1106 set_nullable(false);
1107 return Item_str_func::resolve_type(thd);
1108 }
1109};
1110
1112 public:
1114 null_on_null = false;
1115 }
1116 String *val_str(String *) override;
1117 const char *func_name() const override { return "collation"; }
1118 bool resolve_type(THD *thd) override {
1119 if (Item_str_func::resolve_type(thd)) return true;
1121 set_nullable(false);
1122 return false;
1123 }
1124};
1125
1128
1134 const bool as_binary;
1135
1136 public:
1137 Item_func_weight_string(const POS &pos, Item *a, uint result_length_arg,
1138 uint num_codepoints_arg, uint flags_arg,
1139 bool as_binary_arg = false)
1140 : Item_str_func(pos, a),
1141 flags(flags_arg),
1142 num_codepoints(num_codepoints_arg),
1143 result_length(result_length_arg),
1144 as_binary(as_binary_arg) {}
1145
1146 bool itemize(Parse_context *pc, Item **res) override;
1147
1148 const char *func_name() const override { return "weight_string"; }
1149 bool eq(const Item *item, bool binary_cmp) const override;
1150 String *val_str(String *) override;
1151 bool resolve_type(THD *) override;
1152 void print(const THD *thd, String *str,
1153 enum_query_type query_type) const override;
1154};
1155
1156class Item_func_crc32 final : public Item_int_func {
1158
1159 public:
1161 unsigned_flag = true;
1162 }
1163 const char *func_name() const override { return "crc32"; }
1164 bool resolve_type(THD *thd) override {
1165 if (param_type_is_default(thd, 0, 1)) return true;
1166 max_length = 10;
1167 return false;
1168 }
1169 longlong val_int() override;
1170};
1171
1174
1175 public:
1177 : Item_int_func(pos, a) {}
1178 const char *func_name() const override { return "uncompressed_length"; }
1179 bool resolve_type(THD *thd) override {
1180 if (param_type_is_default(thd, 0, 1)) return true;
1181 max_length = 10;
1182 return false;
1183 }
1184 longlong val_int() override;
1185};
1186
1187class Item_func_compress final : public Item_str_func {
1189
1190 public:
1192 bool resolve_type(THD *thd) override;
1193 const char *func_name() const override { return "compress"; }
1194 String *val_str(String *str) override;
1195};
1196
1199
1200 public:
1202 bool resolve_type(THD *thd) override {
1203 if (Item_str_func::resolve_type(thd)) return true;
1204 set_nullable(true);
1206 return false;
1207 }
1208 const char *func_name() const override { return "uncompress"; }
1209 String *val_str(String *str) override;
1210};
1211
1212class Item_func_uuid final : public Item_str_func {
1214
1215 public:
1217 explicit Item_func_uuid(const POS &pos) : Item_str_func(pos) {}
1218
1219 bool itemize(Parse_context *pc, Item **res) override;
1221 return RAND_TABLE_BIT;
1222 }
1223 bool resolve_type(THD *) override;
1224 const char *func_name() const override { return "uuid"; }
1225 String *val_str(String *) override;
1226 bool check_function_as_value_generator(uchar *checker_args) override {
1228 pointer_cast<Check_function_as_value_generator_parameters *>(
1229 checker_args);
1230 func_arg->banned_function_name = func_name();
1231 return ((func_arg->source == VGS_GENERATED_COLUMN) ||
1232 (func_arg->source == VGS_CHECK_CONSTRAINT));
1233 }
1234};
1235
1238
1239 public:
1241 : Item_str_ascii_func(pos, a, b) {}
1242 bool resolve_type(THD *) override;
1243 const char *func_name() const override { return "gtid_subtract"; }
1244 String *val_str_ascii(String *) override;
1245};
1246
1249
1250 public:
1253 : super(pos), value_cache_set(false) {}
1254 const char *func_name() const override { return "current_role"; }
1255 void cleanup() override;
1256 String *val_str(String *) override;
1257 bool resolve_type(THD *) override {
1259 return false;
1260 }
1262 return NAME_STRING("current_role()");
1263 }
1264
1265 protected:
1266 void set_current_role(THD *thd);
1267 /** a flag whether @ref value_cache is set or not */
1269 /**
1270 @brief Cache for the result value
1271
1272 Set by init(). And consumed by val_str().
1273 Needed to avoid re-calculation of the current_roles() in the
1274 course of the query.
1275 */
1277};
1278
1281
1282 public:
1285 : super(pos), value_cache_set(false) {}
1286 String *val_str(String *) override;
1287 void cleanup() override;
1288
1289 bool resolve_type(THD *) override {
1291 return false;
1292 }
1293
1294 const char *func_name() const override { return "roles_graphml"; }
1295
1297 return NAME_STRING("roles_graphml()");
1298 }
1299
1300 protected:
1301 bool calculate_graphml(THD *thd);
1302 /**
1303 @brief Cache for the result value
1304
1305 Set by init(). And consumed by val_str().
1306 Needed to avoid re-calculation of the current_roles() in the
1307 course of the query.
1308 */
1310
1311 /** Set to true if @ref value_cache is set */
1313};
1314
1316 public:
1318 : Item_str_func(pos, a, b, c) {}
1319
1320 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1321 bool resolve_type(THD *) override {
1322 /*
1323 There are 14 kinds of grants, with a max length
1324 per privileges is 11 chars.
1325 So, setting max approximate to 200.
1326 */
1328 set_nullable(true);
1329 null_on_null = false;
1330
1331 return false;
1332 }
1333
1334 const char *func_name() const override { return "get_dd_column_privileges"; }
1335
1336 String *val_str(String *) override;
1337};
1338
1340 public:
1342 : Item_str_func(pos, a, b, c) {}
1343
1344 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1345 bool resolve_type(THD *) override {
1346 // maximum string length of all options is expected
1347 // to be less than 256 characters.
1349 set_nullable(false);
1350 null_on_null = false;
1351
1352 return false;
1353 }
1354
1355 const char *func_name() const override { return "get_dd_create_options"; }
1356
1357 String *val_str(String *) override;
1358};
1359
1361 public:
1363 : Item_str_func(pos, a) {}
1364
1365 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1366 bool resolve_type(THD *) override {
1367 // maximum string length of all options is expected
1368 // to be less than 256 characters.
1370 set_nullable(false);
1371 null_on_null = false;
1372
1373 return false;
1374 }
1375
1376 const char *func_name() const override { return "get_dd_schema_options"; }
1377
1378 String *val_str(String *) override;
1379};
1380
1382 public:
1384 : Item_str_func(pos, list) {}
1385
1386 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1387 bool resolve_type(THD *) override {
1388 /*
1389 maximum expected string length to be less than 2048 characters,
1390 which is same as size of column holding comments in dictionary,
1391 i.e., the mysql.tables.comment DD column.
1392 */
1394 set_nullable(true);
1395 null_on_null = false;
1396
1397 return false;
1398 }
1399
1400 const char *func_name() const override {
1401 return "internal_get_comment_or_error";
1402 }
1403
1404 String *val_str(String *) override;
1405};
1406
1408 public:
1410 : Item_str_func(pos, a, b) {}
1411
1412 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1413 bool resolve_type(THD *) override {
1414 /* maximum string length of the property value is expected
1415 to be less than 256 characters. */
1417 set_nullable(false);
1418 null_on_null = false;
1419
1420 return false;
1421 }
1422
1423 const char *func_name() const override {
1424 return "get_dd_tablespace_private_data";
1425 }
1426
1427 String *val_str(String *) override;
1428};
1429
1431 public:
1433 : Item_str_func(pos, a, b) {}
1434
1435 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1436 bool resolve_type(THD *) override {
1437 /* maximum string length of the property value is expected
1438 to be less than 256 characters. */
1440 set_nullable(false);
1441 null_on_null = false;
1442
1443 return false;
1444 }
1445
1446 const char *func_name() const override { return "get_dd_index_private_data"; }
1447
1448 String *val_str(String *) override;
1449};
1450
1452 public:
1454 : Item_str_func(pos, a) {}
1455
1456 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1457 bool resolve_type(THD *) override {
1458 // maximum string length of all options is expected
1459 // to be less than 256 characters.
1461 set_nullable(true);
1462 null_on_null = false;
1463
1464 return false;
1465 }
1466
1467 const char *func_name() const override {
1468 return "internal_get_partition_nodegroup";
1469 }
1470
1471 String *val_str(String *) override;
1472};
1473
1475 public:
1477 Item *d)
1478 : Item_str_func(pos, a, b, c, d) {}
1479
1480 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1481 bool resolve_type(THD *) override {
1482 // maximum string length of all options is expected
1483 // to be less than 256 characters.
1485 set_nullable(true);
1486 null_on_null = false;
1487
1488 return false;
1489 }
1490
1491 const char *func_name() const override { return "internal_tablespace_type"; }
1492
1493 String *val_str(String *) override;
1494};
1495
1497 public:
1499 Item *b, Item *c, Item *d)
1500 : Item_str_func(pos, a, b, c, d) {}
1501
1502 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1503 bool resolve_type(THD *) override {
1504 // maximum string length of all options is expected
1505 // to be less than 256 characters.
1507 set_nullable(true);
1508 null_on_null = false;
1509
1510 return false;
1511 }
1512
1513 const char *func_name() const override {
1514 return "internal_tablespace_logfile_group_name";
1515 }
1516
1517 String *val_str(String *) override;
1518};
1519
1521 public:
1523 Item *c, Item *d)
1524 : Item_str_func(pos, a, b, c, d) {}
1525
1526 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1527 bool resolve_type(THD *) override {
1528 // maximum string length of all options is expected
1529 // to be less than 256 characters.
1531 set_nullable(true);
1532 null_on_null = false;
1533
1534 return false;
1535 }
1536
1537 const char *func_name() const override {
1538 return "internal_tablespace_status";
1539 }
1540 String *val_str(String *) override;
1541};
1542
1544 public:
1546 Item *c, Item *d)
1547 : Item_str_func(pos, a, b, c, d) {}
1548
1549 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1550 bool resolve_type(THD *) override {
1551 // maximum string length of all options is expected
1552 // to be less than 256 characters.
1554 set_nullable(true);
1555 null_on_null = false;
1556
1557 return false;
1558 }
1559
1560 const char *func_name() const override {
1561 return "internal_tablespace_row_format";
1562 }
1563
1564 String *val_str(String *) override;
1565};
1566
1568 public:
1570 Item *d)
1571 : Item_str_func(pos, a, b, c, d) {}
1572
1573 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1574 bool resolve_type(THD *) override {
1575 // maximum string length of all options is expected
1576 // to be less than 256 characters.
1578 set_nullable(true);
1579 null_on_null = false;
1580
1581 return false;
1582 }
1583
1584 const char *func_name() const override { return "internal_tablespace_extra"; }
1585
1586 String *val_str(String *) override;
1587};
1588
1590 public:
1592 : Item_str_func(pos, list) {}
1593
1594 bool resolve_type(THD *) override {
1595 set_nullable(false);
1597 return false;
1598 }
1599
1600 const char *func_name() const override { return "convert_cpu_id_mask"; }
1601
1602 String *val_str(String *) override;
1603};
1604
1606 public:
1608 : Item_str_func(pos, a, b) {}
1609
1610 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1611 bool resolve_type(THD *) override {
1613 set_nullable(true);
1614 null_on_null = false;
1615
1616 return false;
1617 }
1618
1619 const char *func_name() const override { return "get_dd_property_key_value"; }
1620
1621 String *val_str(String *) override;
1622};
1623
1625 public:
1627 : Item_str_func(pos, a, b) {}
1628
1629 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1630 bool resolve_type(THD *) override {
1632 set_nullable(true);
1633 null_on_null = false;
1634
1635 return false;
1636 }
1637
1638 const char *func_name() const override { return "remove_dd_property_key"; }
1639
1640 String *val_str(String *) override;
1641};
1642
1644 public:
1646 : Item_str_func(pos, a, b) {}
1647
1648 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1649 bool resolve_type(THD *) override {
1650 // maximum string length of all options is expected
1651 // to be less than 256 characters.
1653 set_nullable(true);
1654 null_on_null = false;
1655
1656 return false;
1657 }
1658
1659 const char *func_name() const override {
1660 return "convert_interval_to_user_interval";
1661 }
1662
1663 String *val_str(String *) override;
1664};
1665
1667 public:
1669 : Item_str_func(pos, list) {}
1670
1671 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1672 bool resolve_type(THD *) override {
1674 set_nullable(true);
1675 null_on_null = false;
1676
1677 return false;
1678 }
1679
1680 const char *func_name() const override { return "internal_get_username"; }
1681
1682 String *val_str(String *) override;
1683};
1684
1686 public:
1688 : Item_str_func(pos, list) {}
1689
1690 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1691 bool resolve_type(THD *) override {
1693 set_nullable(true);
1694 null_on_null = false;
1695
1696 return false;
1697 }
1698
1699 const char *func_name() const override { return "internal_get_hostname"; }
1700
1701 String *val_str(String *) override;
1702};
1703
1705 public:
1707 : Item_str_func(pos) {}
1708
1709 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1710 bool resolve_type(THD *) override {
1712 set_nullable(true);
1713 null_on_null = false;
1714
1715 return false;
1716 }
1717
1718 const char *func_name() const override {
1719 return "internal_get_enabled_role_json";
1720 }
1721
1722 String *val_str(String *) override;
1723};
1724
1726 public:
1728 : Item_str_func(pos) {}
1729
1730 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1731 bool resolve_type(THD *) override {
1733 set_nullable(true);
1734 null_on_null = false;
1735
1736 return false;
1737 }
1738
1739 const char *func_name() const override {
1740 return "internal_get_mandatory_roles_json";
1741 }
1742
1743 String *val_str(String *) override;
1744};
1745
1747 public:
1749 : Item_str_func(pos, list) {}
1750
1751 enum Functype functype() const override { return DD_INTERNAL_FUNC; }
1752 bool resolve_type(THD *) override {
1753 // maximum string length of all options is expected
1754 // to be less than 256 characters.
1756 set_nullable(false);
1757 null_on_null = false;
1758
1759 return false;
1760 }
1761
1762 const char *func_name() const override {
1763 return "internal_get_dd_column_extra";
1764 }
1765
1766 String *val_str(String *) override;
1767};
1768
1769#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:930
const CHARSET_INFO * m_cast_cs
The character set we are converting to.
Definition: item_strfunc.h:935
bool m_safe
Definition: item_strfunc.h:944
bool m_charset_conversion
If true, conversion is needed so do it, else allow string copy.
Definition: item_strfunc.h:933
const CHARSET_INFO * m_from_cs
The character set we are converting from.
Definition: item_strfunc.h:937
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3453
Item_charset_conversion(const POS &pos, Item *a, const CHARSET_INFO *cs_arg)
Definition: item_strfunc.h:977
bool m_use_cached_value
Marks whether the underlying Item is constant and may be cached.
Definition: item_strfunc.h:940
String * val_str(String *) override
Definition: item_strfunc.cc:3344
longlong m_cast_length
Length argument value, if any given.
Definition: item_strfunc.h:942
String m_tmp_value
Definition: item_strfunc.h:938
Item_charset_conversion(THD *thd, Item *a, const CHARSET_INFO *cs_arg, bool cache_if_const)
Definition: item_strfunc.h:958
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:3422
Definition: item.h:4043
Definition: item_strfunc.h:289
String * val_str(String *) override
Definition: item_strfunc.cc:519
Item_func_aes_decrypt(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:295
Item_func_aes_decrypt(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:293
Item_str_func super
Definition: item_strfunc.h:290
const char * func_name() const override
Definition: item_strfunc.h:301
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:509
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:561
Definition: item_strfunc.h:273
String * val_str(String *) override
Definition: item_strfunc.cc:452
const char * func_name() const override
Definition: item_strfunc.h:286
Item_func_aes_encrypt(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:280
Item_func_aes_encrypt(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:278
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:442
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:499
String tmp_value
Definition: item_strfunc.h:274
Item_str_func super
Definition: item_strfunc.h:275
Definition: item_strfunc.h:825
char m_text_buf[binary_log::Uuid::TEXT_LENGTH+1]
Buffer to store the text result.
Definition: item_strfunc.h:827
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2716
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:2725
Item_func_bin_to_uuid(const POS &pos, Item *arg1, Item *arg2)
Definition: item_strfunc.h:832
Item_func_bin_to_uuid(const POS &pos, Item *arg1)
Definition: item_strfunc.h:830
const char * func_name() const override
Definition: item_strfunc.h:836
Definition: item_strfunc.h:751
Item_func_char(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:753
Item_func_char(const POS &pos, PT_item_list *list, const CHARSET_INFO *cs)
Definition: item_strfunc.h:757
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:762
String * val_str(String *) override
Definition: item_strfunc.cc:2356
const char * func_name() const override
Definition: item_strfunc.h:767
Definition: item_strfunc.h:1097
Item_func_charset(const POS &pos, Item *a)
Definition: item_strfunc.h:1099
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1104
String * val_str(String *) override
Definition: item_strfunc.cc:3007
const char * func_name() const override
Definition: item_strfunc.h:1103
Definition: item_strfunc.h:1111
String * val_str(String *) override
Definition: item_strfunc.cc:3021
const char * func_name() const override
Definition: item_strfunc.h:1117
Item_func_collation(const POS &pos, Item *a)
Definition: item_strfunc.h:1113
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1118
Definition: item_strfunc.h:1187
String buffer
Definition: item_strfunc.h:1188
Item_func_compress(const POS &pos, Item *a)
Definition: item_strfunc.h:1191
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3892
String * val_str(String *str) override
Definition: item_strfunc.cc:3900
const char * func_name() const override
Definition: item_strfunc.h:1193
Definition: item_strfunc.h:334
const char * func_name() const override
Definition: item_strfunc.h:347
Item_func_concat_ws(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:341
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1030
String tmp_value
Definition: item_strfunc.h:335
String * val_str(String *) override
concat with separator.
Definition: item_strfunc.cc:997
Item_func_concat_ws(mem_root_deque< Item * > *list)
Definition: item_strfunc.h:337
Definition: item_strfunc.h:320
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:954
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:976
Item_func_concat(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:326
Item_func_concat(Item *a, Item *b)
Definition: item_strfunc.h:325
Item_func_concat(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:323
const char * func_name() const override
Definition: item_strfunc.h:331
String tmp_value
Definition: item_strfunc.h:321
Definition: item_strfunc.h:1056
Item_func_conv_charset(const POS &pos, Item *a, const CHARSET_INFO *cs)
Definition: item_strfunc.h:1058
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:2927
const char * func_name() const override
Definition: item_strfunc.h:1068
Item_func_conv_charset(THD *thd, Item *a, const CHARSET_INFO *cs, bool cache_if_const)
Definition: item_strfunc.h:1063
Definition: item_strfunc.h:853
String * val_str(String *) override
Definition: item_strfunc.cc:2860
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2853
static constexpr uint32_t CONV_MAX_LENGTH
Definition: item_strfunc.h:856
Item_func_conv(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:857
const char * func_name() const override
Definition: item_strfunc.h:859
Definition: item_strfunc.h:1589
const char * func_name() const override
Definition: item_strfunc.h:1600
Item_func_convert_cpu_id_mask(const POS &pos, Item *list)
Definition: item_strfunc.h:1591
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1594
String * val_str(String *) override
Definition: item_strfunc.cc:4925
Definition: item_strfunc.h:1643
const char * func_name() const override
Definition: item_strfunc.h:1659
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1649
enum Functype functype() const override
Definition: item_strfunc.h:1648
String * val_str(String *) override
Definition: item_strfunc.cc:5139
Item_func_convert_interval_to_user_interval(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1645
Definition: item_strfunc.h:1156
const char * func_name() const override
Definition: item_strfunc.h:1163
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1164
Item_func_crc32(const POS &pos, Item *a)
Definition: item_strfunc.h:1160
longlong val_int() override
Definition: item_strfunc.cc:3880
String value
Definition: item_strfunc.h:1157
Definition: item_strfunc.h:1247
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:1261
void set_current_role(THD *thd)
Definition: item_strfunc.cc:4981
Item_func_current_role()
Definition: item_strfunc.h:1251
const char * func_name() const override
Definition: item_strfunc.h:1254
bool value_cache_set
a flag whether value_cache is set or not
Definition: item_strfunc.h:1268
Item_func_sysconst super
Definition: item_strfunc.h:1248
Item_func_current_role(const POS &pos)
Definition: item_strfunc.h:1252
String * val_str(String *) override
Definition: item_strfunc.cc:4976
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1257
String value_cache
Cache for the result value.
Definition: item_strfunc.h:1276
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.cc:4968
Definition: item_strfunc.h:652
Item_func_user super
Definition: item_strfunc.h:653
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:1885
Item_func_current_user(const POS &pos)
Definition: item_strfunc.h:661
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:665
const char * func_name() const override
Definition: item_strfunc.h:664
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:1830
String * val_str(String *) override
Definition: item_strfunc.cc:1836
Name_resolution_context * context
Definition: item_strfunc.h:655
Definition: item_strfunc.h:585
Item_func_sysconst super
Definition: item_strfunc.h:586
String * val_str(String *) override
Definition: item_strfunc.cc:1800
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:1792
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:594
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:600
Item_func_database(const POS &pos)
Definition: item_strfunc.h:589
const char * func_name() const override
Definition: item_strfunc.h:599
Definition: item_strfunc.h:683
const char * func_name() const override
Definition: item_strfunc.h:691
longlong val_int() override
Definition: item_strfunc.cc:2211
String * val_str(String *str) override
Definition: item_strfunc.cc:2224
double val_real() override
Definition: item_strfunc.cc:2199
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2181
Item_func_elt(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:685
Definition: item_strfunc.h:1032
Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1034
Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c, Item *d, Item *e)
Definition: item_strfunc.h:1038
Item_func_export_set(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1036
String * val_str(String *str) override
Definition: item_strfunc.cc:3574
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3643
const char * func_name() const override
Definition: item_strfunc.h:1043
Definition: item_strfunc.h:733
const char * func_name() const override
Definition: item_strfunc.h:746
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:2168
String tmp_str
Definition: item_strfunc.h:734
MY_LOCALE * get_locale(Item *item)
Definition: item_strfunc.cc:2039
MY_LOCALE * locale
Definition: item_strfunc.h:735
Item_func_format(const POS &pos, Item *org, Item *dec)
Definition: item_strfunc.h:738
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:2077
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2054
Item_func_format(const POS &pos, Item *org, Item *dec, Item *lang)
Definition: item_strfunc.h:740
Definition: item_strfunc.h:263
String tmp_value
Definition: item_strfunc.h:264
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:663
const char * func_name() const override
Definition: item_strfunc.h:270
String * val_str(String *) override
Definition: item_strfunc.cc:675
Item_func_from_base64(const POS &pos, Item *a)
Definition: item_strfunc.h:267
Definition: item_strfunc.h:1315
Item_func_get_dd_column_privileges(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1317
const char * func_name() const override
Definition: item_strfunc.h:1334
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1321
enum Functype functype() const override
Definition: item_strfunc.h:1320
String * val_str(String *) override
This function prepares string with list of column privileges.
Definition: item_strfunc.cc:4231
Definition: item_strfunc.h:1339
enum Functype functype() const override
Definition: item_strfunc.h:1344
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1345
String * val_str(String *) override
This function prepares string representing create_options for table.
Definition: item_strfunc.cc:4303
Item_func_get_dd_create_options(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:1341
const char * func_name() const override
Definition: item_strfunc.h:1355
Definition: item_strfunc.h:1430
const char * func_name() const override
Definition: item_strfunc.h:1446
Item_func_get_dd_index_private_data(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1432
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1436
String * val_str(String *) override
This function prepares string representing se_private_data for index.
Definition: item_strfunc.cc:4838
enum Functype functype() const override
Definition: item_strfunc.h:1435
Definition: item_strfunc.h:1605
String * val_str(String *) override
This function prepares string representing value stored at key supplied.
Definition: item_strfunc.cc:5036
enum Functype functype() const override
Definition: item_strfunc.h:1610
Item_func_get_dd_property_key_value(const POS &pos, Item *a, Item *b)
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:1611
const char * func_name() const override
Definition: item_strfunc.h:1619
Definition: item_strfunc.h:1360
String * val_str(String *) override
This function prepares string representing options for a schema.
Definition: item_strfunc.cc:4494
const char * func_name() const override
Definition: item_strfunc.h:1376
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1366
enum Functype functype() const override
Definition: item_strfunc.h:1365
Item_func_get_dd_schema_options(const POS &pos, Item *a)
Definition: item_strfunc.h:1362
Definition: item_strfunc.h:1407
String * val_str(String *) override
This function prepares string representing se_private_data for tablespace.
Definition: item_strfunc.cc:4772
const char * func_name() const override
Definition: item_strfunc.h:1423
enum Functype functype() const override
Definition: item_strfunc.h:1412
Item_func_get_dd_tablespace_private_data(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1409
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1413
Definition: item_strfunc.h:1451
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1457
String * val_str(String *) override
Definition: item_strfunc.cc:4619
enum Functype functype() const override
Definition: item_strfunc.h:1456
Item_func_get_partition_nodegroup(const POS &pos, Item *a)
Definition: item_strfunc.h:1453
const char * func_name() const override
Definition: item_strfunc.h:1467
Definition: item_strfunc.h:1236
const char * func_name() const override
Definition: item_strfunc.h:1243
Item_func_gtid_subtract(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1240
String buf1
Definition: item_strfunc.h:1237
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:4180
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:4162
String buf2
Definition: item_strfunc.h:1237
Definition: item_strfunc.h:864
String tmp_value
Definition: item_strfunc.h:865
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3198
Item_func_hex(const POS &pos, Item *a)
Definition: item_strfunc.h:868
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:3210
const char * func_name() const override
Definition: item_strfunc.h:869
Definition: item_strfunc.h:375
String * val_str(String *) override
Definition: item_strfunc.cc:1179
const char * func_name() const override
Definition: item_strfunc.h:386
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1231
String tmp_value_res
Holds result in case we need to allocate our own result buffer.
Definition: item_strfunc.h:378
Item_func_insert(const POS &pos, Item *org, Item *start, Item *length, Item *new_str)
Definition: item_strfunc.h:381
String tmp_value
Definition: item_strfunc.h:376
Definition: item_strfunc.h:1381
Item_func_internal_get_comment_or_error(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1383
const char * func_name() const override
Definition: item_strfunc.h:1400
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1387
String * val_str(String *) override
Definition: item_strfunc.cc:4542
enum Functype functype() const override
Definition: item_strfunc.h:1386
Definition: item_strfunc.h:1746
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1752
String * val_str(String *) override
This function prepares string representing EXTRA column for I_S.COLUMNS.
Definition: item_strfunc.cc:5315
const char * func_name() const override
Definition: item_strfunc.h:1762
Item_func_internal_get_dd_column_extra(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1748
enum Functype functype() const override
Definition: item_strfunc.h:1751
Definition: item_strfunc.h:1704
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1710
enum Functype functype() const override
Definition: item_strfunc.h:1709
Item_func_internal_get_enabled_role_json(const POS &pos)
Definition: item_strfunc.h:1706
String * val_str(String *) override
Definition: item_strfunc.cc:5234
const char * func_name() const override
Definition: item_strfunc.h:1718
Definition: item_strfunc.h:1685
Item_func_internal_get_hostname(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1687
enum Functype functype() const override
Definition: item_strfunc.h:1690
const char * func_name() const override
Definition: item_strfunc.h:1699
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1691
String * val_str(String *) override
Definition: item_strfunc.cc:5199
Definition: item_strfunc.h:1725
const char * func_name() const override
Definition: item_strfunc.h:1739
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1731
enum Functype functype() const override
Definition: item_strfunc.h:1730
Item_func_internal_get_mandatory_roles_json(const POS &pos)
Definition: item_strfunc.h:1727
String * val_str(String *) override
Definition: item_strfunc.cc:5266
Definition: item_strfunc.h:1666
String * val_str(String *) override
Definition: item_strfunc.cc:5162
Item_func_internal_get_username(const POS &pos, PT_item_list *list)
Definition: item_strfunc.h:1668
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1672
enum Functype functype() const override
Definition: item_strfunc.h:1671
const char * func_name() const override
Definition: item_strfunc.h:1680
Definition: item_strfunc.h:1567
String * val_str(String *) override
Definition: item_strfunc.cc:4738
const char * func_name() const override
Definition: item_strfunc.h:1584
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1574
enum Functype functype() const override
Definition: item_strfunc.h:1573
Item_func_internal_tablespace_extra(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1569
const char * func_name() const override
Definition: item_strfunc.h:1513
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1503
String * val_str(String *) override
Definition: item_strfunc.cc:4676
Item_func_internal_tablespace_logfile_group_name(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1498
enum Functype functype() const override
Definition: item_strfunc.h:1502
Definition: item_strfunc.h:1543
const char * func_name() const override
Definition: item_strfunc.h:1560
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1550
Item_func_internal_tablespace_row_format(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1545
String * val_str(String *) override
Definition: item_strfunc.cc:4716
enum Functype functype() const override
Definition: item_strfunc.h:1549
Definition: item_strfunc.h:1520
Item_func_internal_tablespace_status(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1522
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1527
String * val_str(String *) override
Definition: item_strfunc.cc:4699
enum Functype functype() const override
Definition: item_strfunc.h:1526
const char * func_name() const override
Definition: item_strfunc.h:1537
Definition: item_strfunc.h:1474
enum Functype functype() const override
Definition: item_strfunc.h:1480
String * val_str(String *) override
Definition: item_strfunc.cc:4659
const char * func_name() const override
Definition: item_strfunc.h:1491
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1481
Item_func_internal_tablespace_type(const POS &pos, Item *a, Item *b, Item *c, Item *d)
Definition: item_strfunc.h:1476
Definition: item_strfunc.h:839
const char * func_name() const override
Definition: item_strfunc.h:845
longlong val_int() override
Definition: item_strfunc.cc:2767
Item_func_is_uuid(const POS &pos, Item *a)
Definition: item_strfunc.h:843
Item_bool_func super
Definition: item_strfunc.h:840
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:846
Definition: item_strfunc.h:414
Item_func_left(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:418
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1348
String tmp_value
Definition: item_strfunc.h:415
String * val_str(String *) override
Definition: item_strfunc.cc:1300
const char * func_name() const override
Definition: item_strfunc.h:421
Definition: item_strfunc.h:915
const char * func_name() const override
Definition: item_strfunc.h:919
Item_func_like_range_max(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:917
Definition: item_strfunc.h:908
const char * func_name() const override
Definition: item_strfunc.h:912
Item_func_like_range_min(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:910
Definition: item_strfunc.h:888
String max_str
Definition: item_strfunc.h:891
const bool is_min
Definition: item_strfunc.h:892
Item_func_like_range(const POS &pos, Item *a, Item *b, bool is_min_arg)
Definition: item_strfunc.h:895
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:900
String min_str
Definition: item_strfunc.h:890
String * val_str(String *) override
Definition: item_strfunc.cc:3284
Definition: item_strfunc.h:400
const char * func_name() const override
Definition: item_strfunc.h:403
Item_func_lower(const POS &pos, Item *item)
Definition: item_strfunc.h:402
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1278
Definition: item_strfunc.h:800
String * val_str(String *) override
Definition: item_strfunc.cc:2780
Item_func_lpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
Definition: item_strfunc.h:804
String tmp_value
Definition: item_strfunc.h:801
String lpad_str
Definition: item_strfunc.h:801
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2647
const char * func_name() const override
Definition: item_strfunc.h:808
Definition: item_strfunc.h:545
Item_func_ltrim(const POS &pos, Item *a)
Definition: item_strfunc.h:547
Definition: item_strfunc.h:694
Item_func_make_set(const POS &pos, Item *a, PT_item_list *opt_list)
Definition: item_strfunc.h:701
String * val_str(String *str) override
Definition: item_strfunc.cc:2286
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:719
Item_str_func super
Definition: item_strfunc.h:695
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:2345
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2260
String tmp_str
Definition: item_strfunc.h:698
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:2254
bool fix_fields(THD *thd, Item **ref) override
Definition: item_strfunc.h:706
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:2244
const char * func_name() const override
Definition: item_strfunc.h:717
void update_used_tables() override
Updates used tables, not null tables information and accumulates properties up the item tree,...
Definition: item_strfunc.cc:2278
Item * item
Definition: item_strfunc.h:697
Item * transform(Item_transformer transformer, uchar *arg) override
Transform an Item_func object with a transformer callback function.
Definition: item_strfunc.cc:2338
Definition: item_strfunc.h:178
const char * func_name() const override
Definition: item_strfunc.h:185
Item_func_md5(const POS &pos, Item *a)
Definition: item_strfunc.h:182
String tmp_value
Definition: item_strfunc.h:179
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:222
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:180
Definition: item_strfunc.h:1046
String * val_str(String *) override
QUOTE() function returns argument string in single quotes suitable for using in a SQL statement.
Definition: item_strfunc.cc:3700
Item_func_quote(const POS &pos, Item *a)
Definition: item_strfunc.h:1050
String tmp_value
Definition: item_strfunc.h:1047
const char * func_name() const override
Definition: item_strfunc.h:1051
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3662
Definition: item_strfunc.h:304
static const ulonglong MAX_RANDOM_BYTES_BUFFER
limitation from the SSL library
Definition: item_strfunc.h:308
Item_str_func super
Definition: item_strfunc.h:305
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:585
Item_func_random_bytes(const POS &pos, Item *a)
Definition: item_strfunc.h:311
String * val_str(String *a) override
Definition: item_strfunc.cc:591
const char * func_name() const override
Definition: item_strfunc.h:317
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:568
Definition: item_strfunc.h:1624
Item_func_remove_dd_property_key(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:1626
const char * func_name() const override
Definition: item_strfunc.h:1638
String * val_str(String *) override
This function removes a key value from given property string.
Definition: item_strfunc.cc:5093
enum Functype functype() const override
Definition: item_strfunc.h:1629
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1630
Definition: item_strfunc.h:770
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2406
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:2446
String tmp_value
Definition: item_strfunc.h:771
Item_func_repeat(const POS &pos, Item *arg1, Item *arg2)
Definition: item_strfunc.h:774
const char * func_name() const override
Definition: item_strfunc.h:778
Definition: item_strfunc.h:362
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1159
String * val_str(String *) override
Replace all occurences of string2 in string1 with string3.
Definition: item_strfunc.cc:1097
const char * func_name() const override
Definition: item_strfunc.h:372
String tmp_value
Definition: item_strfunc.h:363
String tmp_value_res
Holds result in case we need to allocate our own result buffer.
Definition: item_strfunc.h:365
String tmp_value2
Definition: item_strfunc.h:363
Item_func_replace(const POS &pos, Item *org, Item *find, Item *replace)
Definition: item_strfunc.h:368
Definition: item_strfunc.h:350
Item_func_reverse(Item *a)
Definition: item_strfunc.h:354
String * val_str(String *) override
Definition: item_strfunc.cc:1049
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1085
String tmp_value
Definition: item_strfunc.h:351
Item_func_reverse(const POS &pos, Item *a)
Definition: item_strfunc.h:355
const char * func_name() const override
Definition: item_strfunc.h:359
Definition: item_strfunc.h:424
Item_func_right(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:428
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1379
const char * func_name() const override
Definition: item_strfunc.h:432
String * val_str(String *) override
Definition: item_strfunc.cc:1357
String tmp_value
Definition: item_strfunc.h:425
Definition: item_strfunc.h:1279
Item_func_roles_graphml(const POS &pos)
Definition: item_strfunc.h:1284
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.cc:5019
String value_cache
Cache for the result value.
Definition: item_strfunc.h:1309
Item_func_sysconst super
Definition: item_strfunc.h:1280
const char * func_name() const override
Definition: item_strfunc.h:1294
Item_func_roles_graphml()
Definition: item_strfunc.h:1283
bool calculate_graphml(THD *thd)
Constructs and caches the graphml string.
Definition: item_strfunc.cc:4999
String * val_str(String *) override
Definition: item_strfunc.cc:5014
bool value_cache_set
Set to true if value_cache is set.
Definition: item_strfunc.h:1312
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1289
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:1296
Definition: item_strfunc.h:789
String tmp_value
Definition: item_strfunc.h:790
Item_func_rpad(const POS &pos, Item *arg1, Item *arg2, Item *arg3)
Definition: item_strfunc.h:793
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2549
String * val_str(String *) override
Definition: item_strfunc.cc:2575
const char * func_name() const override
Definition: item_strfunc.h:797
String rpad_str
Definition: item_strfunc.h:790
Definition: item_strfunc.h:551
Item_func_rtrim(const POS &pos, Item *a)
Definition: item_strfunc.h:553
Definition: item_strfunc.h:1073
bool eq(const Item *item, bool binary_cmp) const override
Definition: item_strfunc.cc:2981
LEX_STRING collation_string
Definition: item_strfunc.h:1076
Item_field * field_for_view_update() override
Definition: item_strfunc.h:1091
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:2996
Item_func_set_collation(const POS &pos, Item *a, const LEX_STRING &collation_string_arg)
Definition: item_strfunc.h:1079
const char * func_name() const override
Definition: item_strfunc.h:1087
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2954
enum Functype functype() const override
Definition: item_strfunc.h:1088
String * val_str(String *) override
Definition: item_strfunc.cc:2946
Item_str_func super
Definition: item_strfunc.h:1074
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:2936
Definition: item_strfunc.h:196
const char * func_name() const override
Definition: item_strfunc.h:202
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:266
Item_func_sha2(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:198
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:340
Definition: item_strfunc.h:188
const char * func_name() const override
Definition: item_strfunc.h:193
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:230
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:251
Item_func_sha(const POS &pos, Item *a)
Definition: item_strfunc.h:190
Definition: item_strfunc.h:672
Item_func_soundex(const POS &pos, Item *a)
Definition: item_strfunc.h:677
String tmp_value
Definition: item_strfunc.h:673
Item_func_soundex(Item *a)
Definition: item_strfunc.h:676
String * val_str(String *) override
Definition: item_strfunc.cc:1937
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1893
const char * func_name() const override
Definition: item_strfunc.h:680
Definition: item_strfunc.h:781
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2490
String * val_str(String *) override
Definition: item_strfunc.cc:2521
const char * func_name() const override
Definition: item_strfunc.h:786
Item_func_space(const POS &pos, Item *arg1)
Definition: item_strfunc.h:783
Definition: item_strfunc.h:237
bool resolve_type(THD *thd) override
The type is always LONGTEXT, just like the digest_text columns in Performance Schema.
Definition: item_strfunc.cc:915
const char * func_name() const override
Definition: item_strfunc.h:242
uchar * m_token_buffer
Definition: item_strfunc.h:260
Item_func_statement_digest_text(const POS &pos, Item *query_string)
Definition: item_strfunc.h:239
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:250
String * val_str(String *) override
Definition: item_strfunc.cc:923
Definition: item_strfunc.h:215
uchar * m_token_buffer
Definition: item_strfunc.h:234
Item_func_statement_digest(const POS &pos, Item *query_string)
Definition: item_strfunc.h:217
const char * func_name() const override
Definition: item_strfunc.h:220
String * val_str_ascii(String *) override
Implementation of the STATEMENT_DIGEST() native function.
Definition: item_strfunc.cc:885
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:870
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:221
Definition: item_strfunc.h:453
String * val_str(String *) override
Definition: item_strfunc.cc:1486
Item_func_substr_index(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:457
String tmp_value
Definition: item_strfunc.h:454
const char * func_name() const override
Definition: item_strfunc.h:461
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1476
Definition: item_strfunc.h:435
const char * func_name() const override
Definition: item_strfunc.h:450
Item_func_substr(Item *a, Item *b)
Definition: item_strfunc.h:441
Item_func_substr(Item *a, Item *b, Item *c)
Definition: item_strfunc.h:444
String tmp_value
Definition: item_strfunc.h:438
Item_func_substr(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:442
Item_str_func super
Definition: item_strfunc.h:436
String * val_str(String *) override
Definition: item_strfunc.cc:1389
Item_func_substr(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:445
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1436
Definition: item_strfunc.h:557
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:575
Item * safe_charset_converter(THD *thd, const CHARSET_INFO *tocs) override
Definition: item_strfunc.cc:1770
virtual const Name_string fully_qualified_func_name() const =0
Item_func_sysconst(const POS &pos)
Definition: item_strfunc.h:564
Item_str_func super
Definition: item_strfunc.h:558
Item_func_sysconst()
Definition: item_strfunc.h:561
Definition: item_strfunc.h:205
const char * func_name() const override
Definition: item_strfunc.h:212
Item_func_to_base64(const POS &pos, Item *a)
Definition: item_strfunc.h:209
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:625
String * val_str_ascii(String *) override
Definition: item_strfunc.cc:641
String tmp_value
Definition: item_strfunc.h:206
Definition: item_strfunc.h:464
const bool m_trim_trailing
Definition: item_strfunc.h:485
bool trim_trailing() const
Definition: item_strfunc.h:517
bool trim_leading() const
Definition: item_strfunc.h:512
const char * func_name() const override
Definition: item_strfunc.h:524
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1701
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:1740
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:471
@ TRIM_BOTH_DEFAULT
Definition: item_strfunc.h:472
@ TRIM_LTRIM
Definition: item_strfunc.h:476
@ TRIM_RTRIM
Definition: item_strfunc.h:477
@ TRIM_BOTH
Definition: item_strfunc.h:473
@ TRIM_LEADING
Definition: item_strfunc.h:474
@ TRIM_TRAILING
Definition: item_strfunc.h:475
Item_func_trim(Item *a, TRIM_MODE tm)
Definition: item_strfunc.h:500
Item_func_trim(Item *a, Item *b, TRIM_MODE tm)
Definition: item_strfunc.h:488
Item_func_trim(const POS &pos, Item *a, TRIM_MODE tm)
Definition: item_strfunc.h:506
String tmp_value
Definition: item_strfunc.h:481
const TRIM_MODE m_trim_mode
Definition: item_strfunc.h:483
Item_func_trim(const POS &pos, Item *a, Item *b, TRIM_MODE tm)
Definition: item_strfunc.h:494
String remove
Definition: item_strfunc.h:482
const bool m_trim_leading
Definition: item_strfunc.h:484
String * val_str(String *) override
Definition: item_strfunc.cc:1604
Definition: item_strfunc.h:1197
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1202
const char * func_name() const override
Definition: item_strfunc.h:1208
String * val_str(String *str) override
Definition: item_strfunc.cc:3949
String buffer
Definition: item_strfunc.h:1198
Item_func_uncompress(const POS &pos, Item *a)
Definition: item_strfunc.h:1201
Definition: item_strfunc.h:1172
const char * func_name() const override
Definition: item_strfunc.h:1178
Item_func_uncompressed_length(const POS &pos, Item *a)
Definition: item_strfunc.h:1176
String value
Definition: item_strfunc.h:1173
longlong val_int() override
Definition: item_strfunc.cc:3851
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1179
Definition: item_strfunc.h:874
Item_func_unhex(const POS &pos, Item *a)
Definition: item_strfunc.h:878
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3240
String * val_str(String *) override
Convert given hex string to a binary string.
Definition: item_strfunc.cc:3252
String tmp_value
Definition: item_strfunc.h:875
const char * func_name() const override
Definition: item_strfunc.h:882
Definition: item_strfunc.h:407
Item_func_upper(const POS &pos, Item *item)
Definition: item_strfunc.h:409
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:1289
const char * func_name() const override
Definition: item_strfunc.h:410
Definition: item_strfunc.h:605
Item_func_user(const POS &pos)
Definition: item_strfunc.h:618
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:622
const Name_string fully_qualified_func_name() const override
Definition: item_strfunc.h:645
String * val_str(String *) override
Definition: item_strfunc.cc:1821
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:1875
Item_func_sysconst super
Definition: item_strfunc.h:606
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item_strfunc.h:639
Item_func_user()
Definition: item_strfunc.h:617
const char * func_name() const override
Definition: item_strfunc.h:644
bool evaluate(const char *user, const char *host)
Evaluate user name, must be called once per execution.
Definition: item_strfunc.cc:1852
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:1816
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:635
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:628
bool m_evaluated
True when function value is evaluated, set to false after each execution.
Definition: item_strfunc.h:610
Definition: item_strfunc.h:811
String * val_str(String *) override
Definition: item_strfunc.cc:2682
Item_func_uuid_to_bin(const POS &pos, Item *arg1, Item *arg2)
Definition: item_strfunc.h:818
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:2674
Item_func_uuid_to_bin(const POS &pos, Item *arg1)
Definition: item_strfunc.h:816
const char * func_name() const override
Definition: item_strfunc.h:822
uchar m_bin_buf[binary_log::Uuid::BYTE_LENGTH]
Buffer to store the binary result.
Definition: item_strfunc.h:813
Definition: item_strfunc.h:1212
Item_func_uuid(const POS &pos)
Definition: item_strfunc.h:1217
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:1226
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:1220
String * val_str(String *) override
Definition: item_strfunc.cc:4157
const char * func_name() const override
Definition: item_strfunc.h:1224
Item_func_uuid()
Definition: item_strfunc.h:1216
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:4036
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:4042
Item_str_func super
Definition: item_strfunc.h:1213
Definition: item_strfunc.h:1126
String * val_str(String *) override
Definition: item_strfunc.cc:3108
bool eq(const Item *item, bool binary_cmp) const override
Definition: item_strfunc.cc:3089
bool resolve_type(THD *) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.cc:3055
const char * func_name() const override
Definition: item_strfunc.h:1148
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:3032
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:3043
const uint num_codepoints
Definition: item_strfunc.h:1131
String tmp_value
Definition: item_strfunc.h:1129
Item_str_func super
Definition: item_strfunc.h:1127
Item_field * m_field_ref
Definition: item_strfunc.h:1133
const uint result_length
Definition: item_strfunc.h:1132
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:1137
const bool as_binary
Definition: item_strfunc.h:1134
uint flags
Definition: item_strfunc.h:1130
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:223
@ DD_INTERNAL_FUNC
Definition: item_func.h:233
@ TYPECAST_FUNC
Definition: item_func.h:225
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:895
Definition: item_strfunc.h:1002
bool itemize(Parse_context *pc, Item **res) override
The same as contextualize() but with additional parameter.
Definition: item_strfunc.cc:3501
bool resolve_type(THD *thd) override
Resolve type-related information for this item, such as result field type, maximum size,...
Definition: item_strfunc.h:1016
String tmp_value
Definition: item_strfunc.h:1005
Item_str_func super
Definition: item_strfunc.h:1003
String * val_str(String *) override
Definition: item_strfunc.cc:3509
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:1023
Item_load_file(const POS &pos, Item *a)
Definition: item_strfunc.h:1008
const char * func_name() const override
Definition: item_strfunc.h:1012
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:1013
void cleanup() override
Called for every Item after use (preparation and execution).
Definition: item.cc:10495
virtual const char * func_name() const =0
Definition: item_strfunc.h:141
Item_str_ascii_func(Item *a, Item *b)
Definition: item_strfunc.h:156
Item_str_ascii_func(const POS &pos, Item *a, Item *b, Item *c)
Definition: item_strfunc.h:167
String * val_str_ascii(String *) override=0
Item_str_ascii_func()
Definition: item_strfunc.h:145
Item_str_ascii_func(Item *a, Item *b, Item *c)
Definition: item_strfunc.h:164
String ascii_buf
Definition: item_strfunc.h:142
Item_str_ascii_func(const POS &pos, Item *a, Item *b)
Definition: item_strfunc.h:159
Item_str_ascii_func(const POS &pos, Item *a)
Definition: item_strfunc.h:152
Item_str_ascii_func(Item *a)
Definition: item_strfunc.h:149
String * val_str(String *str) override
Definition: item_strfunc.h:172
Definition: item_strfunc.h:389
String * val_str(String *) override
Definition: item_strfunc.cc:1246
Item_str_conv(const POS &pos, Item *item)
Definition: item_strfunc.h:396
String tmp_value
Definition: item_strfunc.h:393
uint multiply
Definition: item_strfunc.h:391
my_charset_conv_case converter
Definition: item_strfunc.h:392
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:137
Item_str_func(Item *a, Item *b)
Definition: item_strfunc.h:87
my_decimal * val_decimal(my_decimal *) override
Definition: item_strfunc.cc:169
String * push_packet_overflow_warning(THD *thd, const char *func)
Calls push_warning_printf for packet overflow.
Definition: item_strfunc.cc:1338
Item_str_func(const POS &pos, PT_item_list *opt_list)
Definition: item_strfunc.h:109
Item_str_func(mem_root_deque< Item * > *list)
Definition: item_strfunc.h:107
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:115
Item_func super
Definition: item_strfunc.h:76
bool get_time(MYSQL_TIME *ltime) override
Definition: item_strfunc.h:118
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:1321
enum Item_result result_type() const override
Definition: item_strfunc.h:121
Item_str_func(Item *a, Item *b, Item *c)
Definition: item_strfunc.h:91
longlong val_int() override
Definition: item_strfunc.h:112
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:124
double val_real() override
Definition: item_strfunc.h:113
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:159
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:983
const char * func_name() const override
Definition: item_strfunc.h:997
Item_typecast_char(THD *thd, Item *a, longlong length_arg, const CHARSET_INFO *cs_arg)
Definition: item_strfunc.h:985
Item_typecast_char(const POS &pos, Item *a, longlong length_arg, const CHARSET_INFO *cs_arg)
Definition: item_strfunc.h:990
bool eq(const Item *item, bool binary_cmp) const override
Definition: item_strfunc.cc:3314
enum Functype functype() const override
Definition: item_strfunc.h:995
void print(const THD *thd, String *str, enum_query_type query_type) const override
This method is used for to:
Definition: item_strfunc.cc:3331
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:3261
void set_nullable(bool nullable)
Definition: item.h:3344
DTCollation collation
Character set and collation properties assigned for this Item.
Definition: item.h:3268
bool is_nullable() const
Definition: item.h:3343
bool get_time_from_string(MYSQL_TIME *ltime)
Convert val_str() to time in MYSQL_TIME.
Definition: item.cc:1487
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:2926
virtual bool fix_fields(THD *, Item **)
Definition: item.cc:4819
bool fixed
True if item has been resolved.
Definition: item.h:3332
bool null_value
True if item is null.
Definition: item.h:3369
virtual bool check_cols(uint c)
Definition: item.cc:1158
bool unsigned_flag
Definition: item.h:3370
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:1400
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:1150
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:3286
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:945
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:65
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:4907
String * mysql_generate_uuid(String *str)
Generate Universal Unique Identifier (UUID).
Definition: item_strfunc.cc:4050
A better implementation of the UNIX ctype(3) library.
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1523
#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
Time handling defaults.
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:2531
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
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