118#define portable_sizeof_char_ptr 8
254#define IS_EQUAL_YES 1
255#define IS_EQUAL_PACK_LENGTH 2
257#define my_charset_numeric my_charset_latin1
258#define MY_REPERTOIRE_NUMERIC MY_REPERTOIRE_ASCII
286 return elements < 256 ? 1 : 2;
290 const uint len = (elements + 7) / 8;
291 return len > 4 ? 8 : len;
333#define ASSERT_COLUMN_MARKED_FOR_READ \
335 (!table->read_set || bitmap_is_set(table->read_set, field_index())))
336#define ASSERT_COLUMN_MARKED_FOR_WRITE \
337 assert(!table || (!table->write_set || \
338 bitmap_is_set(table->write_set, field_index())))
418 switch (pack_length) {
451template <
bool Is_big_endian>
454 if (to_length == 0)
return;
456 std::copy(from, from + std::min(to_length, from_length), to);
458 to[0] =
static_cast<char>(to[0] ^ 128);
460 const uchar *from_end = from + from_length;
461 const uchar *from_start = from_end - std::min(from_length, to_length);
462 std::reverse_copy(from_start, from_end, to);
464 to[0] =
static_cast<char>(to[0] ^ 128);
883 uchar null_bit_arg,
uchar auto_flags_arg,
const char *field_name_arg);
938 return store(nr,
false);
1075 return field_metadata;
1191 uint max_len [[maybe_unused]])
const {
1196 uint32 max_length [[maybe_unused]] = ~0
L)
const {
1280 void set_null(ptrdiff_t row_offset = 0);
1359 size_t trunc_pos [[maybe_unused]])
const {
1381 uchar *new_null_ptr, uint new_null_bit)
const {
1383 field->
move_field(new_ptr, new_null_ptr, new_null_bit);
1388 uchar *new_null_ptr, uint new_null_bit)
const;
1473 return return_value;
1549 uint max_length)
const {
1550 return pack(to, from, max_length);
1576 ulonglong value_options [[maybe_unused]])
const {
1590 void copy_data(ptrdiff_t src_record_offset);
1641 int cut_increment) {
1642 return set_warning(level, code, cut_increment,
nullptr,
nullptr);
1646 int cut_increment,
const char *view_db,
1647 const char *view_name);
1675 bool *has_overflow);
1727 virtual void hash(ulong *nr, ulong *nr2)
const;
1791 KEY *cur_index_info)
const;
1852 [[maybe_unused]])
const {
1968 const char *field_name_arg,
uint8 dec_arg,
bool zero_arg,
1989 size_t length,
const char *int_end,
2053 const char *well_formed_error_pos,
const char *cannot_convert_error_pos,
2054 const char *from_end_pos,
const char *
end,
bool count_spaces,
2060 const char *field_name_arg,
const CHARSET_INFO *charset_arg)
2061 :
Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2062 field_name_arg, charset_arg) {}
2075 TR_POSITIVE_OVERFLOW = 1,
2076 TR_NEGATIVE_OVERFLOW = 2
2081 const char *field_name_arg,
uint8 dec_arg,
bool zero_arg,
2083 :
Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2084 field_name_arg, dec_arg, zero_arg, unsigned_arg),
2102 const char *field_name_arg,
uint8 dec_arg,
bool zero_arg,
2104 :
Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2105 field_name_arg, dec_arg, zero_arg, unsigned_arg) {}
2120 void overflow(
bool negative);
2149 bool m_keep_precision{
false};
2164 const char *field_name_arg,
uint8 dec_arg,
bool zero_arg,
2167 const char *field_name_arg,
uint8 dec_arg,
2174 void set_value_on_overflow(
my_decimal *decimal_value,
bool sign) const;
2196 int *order_var)
const final;
2203 static Field *create_from_item(
const Item *item);
2212 const char *field_name_arg,
bool zero_arg,
bool unsigned_arg)
2213 :
Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2214 field_name_arg, 0, zero_arg, unsigned_arg) {}
2219 field_name_arg, 0, false, unsigned_arg) {}
2244 if (max_length > 0) *to = *from;
2249 uint param_data [[maybe_unused]])
final {
2263 const char *field_name_arg,
bool zero_arg,
bool unsigned_arg)
2264 :
Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2265 field_name_arg, 0, zero_arg, unsigned_arg) {}
2270 field_name_arg, 0, false, unsigned_arg) {}
2272 :
Field_short(len_arg, false, field_name_arg, unsigned_arg) {}
2301 uint param_data [[maybe_unused]])
final {
2314 const char *field_name_arg,
bool zero_arg,
bool unsigned_arg)
2315 :
Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2316 field_name_arg, 0, zero_arg, unsigned_arg) {}
2321 field_name_arg, 0, false, unsigned_arg) {}
2352 static const int PACK_LENGTH = 4;
2356 const char *field_name_arg,
bool zero_arg,
bool unsigned_arg)
2357 :
Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2358 field_name_arg, 0, zero_arg, unsigned_arg) {}
2363 field_name_arg, 0, false, unsigned_arg) {}
2393 uint param_data [[maybe_unused]])
final {
2398 return is_unsigned() ? 0xFFFFFFFFULL : 0x7FFFFFFFULL;
2404 static const int PACK_LENGTH = 8;
2408 const char *field_name_arg,
bool zero_arg,
bool unsigned_arg)
2409 :
Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2410 field_name_arg, 0, zero_arg, unsigned_arg) {}
2412 const char *field_name_arg,
bool unsigned_arg)
2415 field_name_arg, 0, false, unsigned_arg) {}
2444 uint param_data [[maybe_unused]])
final {
2449 return is_unsigned() ? 0xFFFFFFFFFFFFFFFFULL : 0x7FFFFFFFFFFFFFFFULL;
2457 const char *field_name_arg,
uint8 dec_arg,
bool zero_arg,
2459 :
Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2460 field_name_arg, dec_arg, zero_arg, unsigned_arg) {}
2462 uint8 dec_arg,
bool unsigned_arg)
2465 field_name_arg, dec_arg, false, unsigned_arg) {}
2490 return 0x1000000ULL;
2501 const char *field_name_arg,
uint8 dec_arg,
bool zero_arg,
2503 :
Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2504 field_name_arg, dec_arg, zero_arg, unsigned_arg) {}
2509 field_name_arg, dec_arg, false, false) {}
2511 uint8 dec_arg,
bool unsigned_arg)
2514 field_name_arg, dec_arg, false, unsigned_arg) {}
2516 uint8 dec_arg,
bool unsigned_arg,
bool not_fixed_arg)
2519 field_name_arg, dec_arg, false, unsigned_arg) {
2520 not_fixed = not_fixed_arg;
2546 return 0x20000000000000ULL;
2561 field_name_arg,
cs) {}
2751 [[nodiscard]]
bool set_datetime_warning(
2754 int truncate_increment);
2768 uchar auto_flags_arg,
const char *field_name_arg,
2772 ((normalize_dec(dec_arg)) ? normalize_dec(dec_arg) + 1 : 0),
2773 null_ptr_arg, null_bit_arg, auto_flags_arg, field_name_arg) {
2775 dec = normalize_dec(dec_arg);
2804 return date_flags(thd);
2824 return get_date_internal(ltime);
2832 bool get_internal_check_zero(
MYSQL_TIME *ltime,
2843 int *warnings)
final;
2859 const char *field_name_arg,
uint8 int_length_arg,
2861 :
Field_temporal(ptr_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
2862 field_name_arg, int_length_arg, dec_arg) {}
2899 void init_timestamp_flags();
2921 const char *field_name_arg,
uint8 dec_arg)
2923 auto_flags_arg, field_name_arg,
2952 const char *field_name_arg,
uint8 dec_arg)
2954 auto_flags_arg, field_name_arg,
2982 bool get_date_internal(
MYSQL_TIME *ltime)
const final;
2983 bool get_date_internal_at_utc(
MYSQL_TIME *ltime)
const final;
2984 void store_timestamp_internal(
const my_timeval *tm)
final;
2987 static const int PACK_LENGTH = 4;
2990 const char *field_name_arg);
3013 uint param_data [[maybe_unused]])
final {
3038 bool get_date_internal(
MYSQL_TIME *ltime)
const final;
3039 bool get_date_internal_at_utc(
MYSQL_TIME *ltime)
const final;
3043 void store_timestamp_internal(
const my_timeval *tm)
override;
3056 uchar auto_flags_arg,
const char *field_name_arg,
3107 enum Limits { MIN_YEAR = 1901, MAX_YEAR = 2155 };
3109 uchar auto_flags_arg,
const char *field_name_arg)
3110 :
Field_tiny(ptr_arg, 4, null_ptr_arg, null_bit_arg, auto_flags_arg,
3111 field_name_arg, true, true) {}
3114 0,
NONE, field_name_arg, true, true) {}
3135 static const int PACK_LENGTH = 3;
3137 bool get_date_internal(
MYSQL_TIME *ltime)
const final;
3143 uchar auto_flags_arg,
const char *field_name_arg)
3195 int *
error)
override = 0;
3201 int *warnings)
final;
3217 uchar auto_flags_arg,
const char *field_name_arg,
3219 :
Field_temporal(ptr_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
3239 uchar auto_flags_arg,
const char *field_name_arg)
3241 field_name_arg, 0) {}
3287 uchar auto_flags_arg,
const char *field_name_arg,
uint8 dec_arg)
3289 field_name_arg, dec_arg) {}
3299 NONE, field_name_arg, dec_arg) {}
3343 bool get_date_internal(
MYSQL_TIME *ltime)
const final;
3345 void store_timestamp_internal(
const my_timeval *tm)
final;
3348 static const int PACK_LENGTH = 8;
3363 uchar auto_flags_arg,
const char *field_name_arg)
3365 auto_flags_arg, field_name_arg, 0) {}
3368 field_name_arg, 0) {}
3391 uint param_data [[maybe_unused]])
final {
3401 bool get_date_internal(
MYSQL_TIME *ltime)
const final;
3405 void store_timestamp_internal(
const my_timeval *tm)
final;
3418 uchar auto_flags_arg,
const char *field_name_arg,
3421 auto_flags_arg, field_name_arg,
3433 field_name_arg, dec_arg) {}
3462 :
Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
3463 auto_flags_arg, field_name_arg,
cs) {}
3468 field_name_arg,
cs) {}
3494 const char *
string = pointer_cast<const char *>(
ptr);
3506 DBUG_PRINT(
"debug", (
"field_metadata: 0x%04x", field_metadata));
3508 return (((field_metadata >> 4) & 0x300) ^ 0x300) +
3509 (field_metadata & 0x00ff);
3512 uint16 mflags,
int *order_var)
const final;
3570 uint32 max_length = ~0
L)
const final;
3581 uchar *new_null_ptr, uint new_null_bit)
const final;
3588 void hash(ulong *nr, ulong *nr2)
const final;
3679 bool m_uses_backup{
false};
3688 memmove(
ptr + packlength, &from,
sizeof(
char *));
3693 uchar auto_flags_arg,
const char *field_name_arg,
3700 field_name_arg,
cs),
3702 m_keep_old_value(false) {
3704 if (set_packlength) {
3705 packlength = len_arg <= 255
3707 : len_arg <= 65535 ? 2 : len_arg <= 16777215 ? 3 : 4;
3714 packlength(field.packlength),
3717 m_keep_old_value(field.m_keep_old_value),
3748 uint32 max_length = ~0
L)
const override;
3772 void store_length(
uchar *i_ptr, uint i_packlength,
uint32 i_number);
3774 store_length(
ptr, packlength, number);
3777 return get_length(row_offset);
3779 uint32 get_length(ptrdiff_t row_offset = 0)
const;
3787 return get_blob_data(
ptr + packlength + row_offset);
3799 memcpy(&data, position,
sizeof(data));
3806 memcpy(
ptr + packlength, &data,
sizeof(
char *));
3810 store_length(ptr_ofs, packlength,
length);
3811 memcpy(ptr_ofs + packlength, &data,
sizeof(
char *));
3814 set_ptr_offset(0,
length, data);
3827 uint max_length)
const final;
3867 m_keep_old_value = old_value_flag;
3910 if (m_keep_old_value) {
3912 m_keep_old_value =
false;
3920 store_ptr_and_length(from,
length);
3931 bool backup_blob_field();
3937 void restore_blob_backup();
3954 uchar auto_flags_arg,
const char *field_name_arg,
3956 enum geometry_type geom_type_arg, std::optional<gis::srid_t> srid)
3957 :
Field_blob(ptr_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
3960 geom_type(geom_type_arg) {}
3962 enum geometry_type geom_type_arg, std::optional<gis::srid_t> srid)
3966 geom_type(geom_type_arg) {}
3984 if (res !=
TYPE_OK)
return res;
3997 std::optional<gis::srid_t>
get_srid()
const {
return m_srid; }
4007 uchar auto_flags_arg,
const char *field_name_arg,
4009 :
Field_blob(ptr_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
4066 longlong get_diff_vector_and_length(
4073 bool is_before_image_equal_to_after_image()
const;
4084 bool unpack_diff(
const uchar **from);
4126 uint32 max_length = ~0
L)
const final;
4144 const char *get_binary(ptrdiff_t row_offset = 0)
const;
4197 size_t elt_length, uint elt_decimals,
uchar *ptr_arg,
4198 uchar *null_ptr_arg, uint null_bit_arg,
4199 uchar auto_flags_arg,
const char *field_name_arg,
4218 uint
decimals()
const override {
return m_elt_decimals; }
4239 uchar *, uint)
const override;
4291 bool coerce_json_value(
const Json_wrapper *wr,
bool no_error,
4304 const char *get_index_name()
const;
4342 return pack_length_no_ptr();
4347 Field *get_conv_field();
4358 const char *field_name_arg, uint packlength_arg,
4360 :
Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
4361 field_name_arg, charset_arg),
4362 packlength(packlength_arg),
4363 typelib(typelib_arg) {
4367 uint packlength_arg,
TYPELIB *typelib_arg,
4371 field_name_arg, packlength_arg, typelib_arg, charset_arg) {}
4394 return (field_metadata & 0x00ff);
4419 const char *field_name_arg,
uint32 packlength_arg,
4421 :
Field_enum(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, auto_flags_arg,
4422 field_name_arg, packlength_arg, typelib_arg, charset_arg),
4423 empty_set_string(
"", 0, charset_arg) {
4432 field_name_arg, packlength_arg, typelib_arg, charset_arg) {}
4479 uchar auto_flags_arg,
const char *field_name_arg);
4496 assert(
ptr == a ||
ptr == b);
4497 const uint cmp_len = bytes_in_rec + (bit_len != 0 ? 1 : 0);
4511 int cmp_offset(ptrdiff_t row_offset)
const final;
4532 return (bytes_in_rec + ((bit_len > 0) ? 1 : 0));
4535 int *order_var)
const final;
4542 uchar *new_null_ptr, uint new_null_bit) const final;
4544 bit_ptr = bit_ptr_arg;
4545 bit_ofs = bit_ofs_arg;
4549 bit_ptr == down_cast<const Field_bit *>(field)->bit_ptr &&
4550 bit_ofs == down_cast<const Field_bit *>(field)->bit_ofs);
4555 if (bit_ptr !=
nullptr) bit_ptr += ptr_diff;
4557 void hash(ulong *nr, ulong *nr2)
const final;
4578 const char *field_name_arg);
4580 const char *field_name_arg)
4583 NONE, field_name_arg) {}
4603 bool treat_bit_as_char, uint pack_length_override,
4604 std::optional<gis::srid_t> srid,
bool is_array);
4698 void invoke_do_copy(
bool reverse =
false);
4699 void invoke_do_copy2(
const Field *from_field,
Field *to_field);
4732 size_t elements_count,
bool treat_bit_as_char,
4739 bool no_conversions);
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
unsigned int my_time_binary_length(unsigned int dec)
Calculate binary size of packed numeric time representation.
Definition: binary_log_funcs.cpp:56
unsigned int my_timestamp_binary_length(unsigned int dec)
Calculate on-disk size of a timestamp value.
Definition: binary_log_funcs.cpp:85
unsigned int my_datetime_binary_length(unsigned int dec)
Calculate binary size of packed datetime representation.
Definition: binary_log_funcs.cpp:70
Definition: sql_bitmap.h:154
Class is used as a BLOB field value storage for intermediate GROUP_CONCAT results.
Definition: table.h:1283
String tmp
Definition: field.h:4681
void(Copy_field *, const Field *, Field *) Copy_func
Convenience definition of a copy function returned by get_copy_func.
Definition: field.h:4677
Field * to_field() const
Definition: field.h:4703
Copy_field(Field *to, Field *from)
Definition: field.h:4685
Field * from_field() const
Definition: field.h:4701
This class represents the cost of evaluating an Item.
Definition: item.h:797
This class is a substitute for the Field classes during CREATE TABLE.
Definition: field.h:1884
my_decimal * val_decimal(my_decimal *) const final
Definition: field.h:1925
type_conversion_status store(longlong, bool) final
Definition: field.h:1909
bool is_wrapper_field() const final
If true, it's a Create_field_wrapper (a sub-class of Field used during CREATE/ALTER that we mustn't c...
Definition: field.h:1946
const Create_field * m_field
Definition: field.h:1885
Create_field_wrapper(const Create_field *fld)
Definition: field.cc:10449
size_t make_sort_key(uchar *, size_t) const final
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.h:1939
int cmp(const uchar *, const uchar *) const final
Definition: field.h:1933
void sql_type(String &) const final
Definition: field.h:1937
Item_result numeric_context_result_type() const final
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + ...
Definition: field.cc:10462
Item_result result_type() const final
Definition: field.cc:10458
longlong val_int(void) const final
Definition: field.h:1921
String * val_str(String *, String *) const final
Definition: field.h:1929
type_conversion_status store(const char *, size_t, const CHARSET_INFO *) final
Definition: field.h:1900
type_conversion_status store(double) final
Definition: field.h:1905
uint32 pack_length() const final
Definition: field.cc:10475
double val_real(void) const final
Definition: field.h:1917
const CHARSET_INFO * charset() const final
Definition: field.cc:10471
Field * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:1943
uint32 max_display_length() const final
Definition: field.cc:10479
type_conversion_status store_decimal(const my_decimal *) final
Definition: field.h:1913
enum_field_types type() const final
Definition: field.cc:10467
Create_field is a description a field/column that may or may not exists in a table.
Definition: create_field.h:51
Definition: sql_error.h:225
BIT field represented as chars for non-MyISAM tables.
Definition: field.h:4574
enum ha_base_keytype key_type() const final
Definition: field.h:4584
Field_bit_as_char(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg)
Definition: field.h:4579
Field_bit_as_char * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:4590
uchar * bit_ptr
Definition: field.h:4473
uchar bit_ofs
Definition: field.h:4474
bool eq(const Field *field) const final
Definition: field.h:4547
void get_image(uchar *buff, size_t length, const CHARSET_INFO *) const final
Definition: field.h:4512
uint row_pack_length() const final
Definition: field.h:4531
int cmp(const uchar *a, const uchar *b) const final
Definition: field.h:4495
enum_field_types type() const final
Definition: field.h:4480
uint bit_len
Definition: field.h:4475
void set_image(const uchar *buff, size_t length, const CHARSET_INFO *cs) final
Definition: field.h:4515
int cmp_binary_offset(ptrdiff_t row_offset) const final
Definition: field.h:4503
uint32 pack_length() const final
Definition: field.h:4528
Field_bit * clone(MEM_ROOT *mem_root) const override
Makes a shallow copy of the Field object.
Definition: field.h:4558
uint bytes_in_rec
Definition: field.h:4476
uint32 pack_length_in_rec() const final
Definition: field.h:4529
uint32 max_display_length() const final
Definition: field.h:4482
void set_key_image(const uchar *buff, size_t length) final
Definition: field.h:4520
enum ha_base_keytype key_type() const override
Definition: field.h:4481
type_conversion_status store(const char *to, size_t length, const CHARSET_INFO *charset) override
Definition: field.cc:8752
size_t make_sort_key(uchar *buff, size_t length) const final
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.h:4524
Item_result result_type() const final
Definition: field.h:4483
void move_field_offset(ptrdiff_t ptr_diff) final
Definition: field.h:4553
int key_cmp(const uchar *a, const uchar *b) const final
Definition: field.h:4507
type_conversion_status store(const char *to, size_t length, const CHARSET_INFO *charset) override
Definition: field.cc:7113
bool match_collation_to_optimize_range() const override
Definition: field.h:3728
const uchar * data_ptr() const final
Get a const pointer to the BLOB data of this field.
Definition: field.h:3790
String old_value
In order to support update of virtual generated columns of blob type, we need to allocate the space b...
Definition: field.h:3628
const uchar * get_blob_data() const
Get a const pointer to the BLOB data of this field.
Definition: field.h:3783
size_t get_field_buffer_size()
Definition: field.h:3771
bool m_uses_backup
Whether the field uses table's backup value storage.
Definition: field.h:3679
Field_blob(const Field_blob &field)
Copy static information and reset dynamic information.
Definition: field.h:3712
Field_blob * clone(MEM_ROOT *mem_root) const override
Makes a shallow copy of the Field object.
Definition: field.h:3821
uint32 pack_length_no_ptr() const
Return the packed length without the pointer size added.
Definition: field.h:3766
uint row_pack_length() const final
Definition: field.h:3767
uint packlength
The number of bytes used to represent the length of the blob.
Definition: field.h:3614
void set_keep_old_value(bool old_value_flag)
Mark that the BLOB stored in value should be copied before updating it.
Definition: field.h:3856
uint32 pack_length() const final
Definition: field.h:3754
void store_length(uint32 number)
Definition: field.h:3773
enum_field_types type() const override
Definition: field.h:3727
uchar * get_blob_data(ptrdiff_t row_offset=0)
Get a non-const pointer to the BLOB data of this field.
Definition: field.h:3785
Field_blob(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, const CHARSET_INFO *cs, bool set_packlength)
Definition: field.h:3696
uint32 max_data_length() const final
Get the maximum size of the data in packed format.
Definition: field.h:3768
static uchar * get_blob_data(const uchar *position)
Get the BLOB data pointer stored at the specified position in the record buffer.
Definition: field.h:3797
uint32 key_length() const override
Definition: field.h:3751
String value
The 'value'-object is a cache fronting the storage engine.
Definition: field.h:3619
void keep_old_value()
Save the current BLOB value to avoid that it gets overwritten.
Definition: field.h:3902
void set_ptr(const uchar *length, const uchar *data)
Definition: field.h:3804
int cmp(const uchar *a, const uchar *b) const final
Definition: field.h:3742
size_t make_sort_key(uchar *buff, size_t length) const override
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.cc:7318
void store_in_allocated_space(const char *from, uint32 length)
Use to store the blob value into an allocated space.
Definition: field.h:3919
enum ha_base_keytype key_type() const override
Definition: field.h:3729
void set_ptr_offset(ptrdiff_t ptr_diff, uint32 length, const uchar *data)
Definition: field.h:3808
bool has_charset() const override
Definition: field.h:3836
void store_ptr_and_length(const char *from, uint32 length)
Store ptr and length.
Definition: field.h:3686
void set_ptr(uint32 length, const uchar *data)
Definition: field.h:3813
String m_blob_backup
Backup String for table's blob fields.
Definition: field.h:3672
uint32 data_length(ptrdiff_t row_offset=0) const final
Definition: field.h:3776
bool m_keep_old_value
Whether we need to move the content of 'value' to 'old_value' before updating the BLOB stored in 'val...
Definition: field.h:3649
enum_field_types type() const final
Definition: field.h:3369
uchar * pack(uchar *to, const uchar *from, size_t max_length) const final
Pack the field into a format suitable for storage and transfer.
Definition: field.h:3387
const uchar * unpack(uchar *to, const uchar *from, uint param_data) final
Unpack a field from row data.
Definition: field.h:3390
enum ha_base_keytype key_type() const final
Definition: field.h:3370
Field_datetime * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3383
Field_datetime(const char *field_name_arg)
Definition: field.h:3366
bool zero_pack() const final
Definition: field.h:3381
Field_datetime(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg)
DATETIME columns can be defined as having CURRENT_TIMESTAMP as the default value on inserts or update...
Definition: field.h:3362
uint pack_length_from_metadata(uint field_metadata) const final
Definition: field.h:3443
enum_field_types real_type() const final
Definition: field.h:3440
Field_datetimef * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3434
enum_field_types type() const final
Definition: field.h:3439
Field_datetimef(bool is_nullable_arg, const char *field_name_arg, uint8 dec_arg)
Constructor for Field_datetimef.
Definition: field.h:3429
bool zero_pack() const final
Definition: field.h:3448
uint32 pack_length() const final
Definition: field.h:3442
enum_field_types binlog_type() const final
Definition: field.h:3441
Field_datetimef(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg)
Constructor for Field_datetimef.
Definition: field.h:3417
enum ha_base_keytype key_type() const final
Definition: field.h:2107
const uchar * unpack(uchar *to, const uchar *from, uint param_data) final
Unpack a field from row data.
Definition: field.h:2127
enum_field_types type() const final
Definition: field.h:2106
uchar * pack(uchar *to, const uchar *from, size_t max_length) const final
Pack the field into a format suitable for storage and transfer.
Definition: field.h:2130
Field_decimal(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2100
Field_decimal * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2123
Field_double(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, uint8 dec_arg, bool unsigned_arg)
Definition: field.h:2510
Field_double * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2537
enum ha_base_keytype key_type() const final
Definition: field.h:2523
Field_double(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2499
Field_double(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, uint8 dec_arg)
Definition: field.h:2505
ulonglong get_max_int_value() const final
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:2542
Field_double(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, uint8 dec_arg, bool unsigned_arg, bool not_fixed_arg)
Definition: field.h:2515
enum_field_types type() const final
Definition: field.h:2522
bool has_charset() const override
Definition: field.h:4400
bool optimize_range(uint, uint) const final
Whether this field can be used for index range scans when in the given keypart of the given index.
Definition: field.h:4398
uint pack_length_from_metadata(uint field_metadata) const final
Definition: field.h:4393
Field_enum(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint packlength_arg, TYPELIB *typelib_arg, const CHARSET_INFO *charset_arg)
Definition: field.h:4356
enum_field_types real_type() const override
Definition: field.h:4392
bool match_collation_to_optimize_range() const final
Definition: field.h:4374
Field_enum * clone(MEM_ROOT *mem_root) const override
Makes a shallow copy of the Field object.
Definition: field.h:4403
TYPELIB * typelib
Definition: field.h:4355
Field_enum(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, uint packlength_arg, TYPELIB *typelib_arg, const CHARSET_INFO *charset_arg)
Definition: field.h:4366
uint packlength
Definition: field.h:4352
enum Item_result cast_to_int_type() const final
Definition: field.h:4376
const CHARSET_INFO * sort_charset() const final
Definition: field.h:4402
enum Item_result cmp_type() const final
Definition: field.h:4375
bool zero_pack() const override
Definition: field.h:4397
uint row_pack_length() const final
Definition: field.h:4396
enum_field_types type() const final
Definition: field.h:4373
ulonglong get_max_int_value() const final
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:2486
Field_float(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2455
Field_float(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, uint8 dec_arg, bool unsigned_arg)
Definition: field.h:2461
Field_float * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2481
enum ha_base_keytype key_type() const final
Definition: field.h:2467
enum_field_types type() const final
Definition: field.h:2466
std::optional< gis::srid_t > get_srid() const
Definition: field.h:3997
enum geometry_type geom_type
Definition: field.h:3951
type_conversion_status reset() final
Non-nullable GEOMETRY types cannot have defaults, but the underlying blob must still be reset.
Definition: field.h:3982
geometry_type get_geometry_type() const final
Definition: field.h:3990
Field_geom * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3991
Field_geom(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, enum geometry_type geom_type_arg, std::optional< gis::srid_t > srid)
Definition: field.h:3961
bool match_collation_to_optimize_range() const final
Definition: field.h:3969
const std::optional< gis::srid_t > m_srid
Definition: field.h:3945
Field_geom(uchar *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, TABLE_SHARE *share, uint blob_pack_length, enum geometry_type geom_type_arg, std::optional< gis::srid_t > srid)
Definition: field.h:3953
enum_field_types type() const final
Definition: field.h:3968
enum ha_base_keytype key_type() const final
Definition: field.h:3967
A field that stores a JSON value.
Definition: field.h:4001
size_t make_sort_key(uchar *to, size_t length) const override
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.cc:8091
Field_json(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg)
Definition: field.h:4012
bool has_charset() const final
JSON columns don't have an associated charset.
Definition: field.h:4036
Field_json(uchar *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, TABLE_SHARE *share, uint blob_pack_length)
Definition: field.h:4006
const CHARSET_INFO * charset() const override
Return a text charset so that string functions automatically convert the field value to string and tr...
Definition: field.h:4023
const CHARSET_INFO * sort_charset() const final
Sort should treat the field as binary and not attempt any conversions.
Definition: field.h:4030
enum_field_types type() const override
Definition: field.h:4016
Field_long * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2385
enum_field_types type() const final
Definition: field.h:2365
uchar * pack(uchar *to, const uchar *from, size_t max_length) const final
Pack the field into a format suitable for storage and transfer.
Definition: field.h:2389
uint32 max_display_length() const final
Definition: field.h:2382
enum ha_base_keytype key_type() const final
Definition: field.h:2366
enum Item_result result_type() const final
Definition: field.h:2364
Field_long(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, bool unsigned_arg)
Definition: field.h:2359
ulonglong get_max_int_value() const final
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:2397
const uchar * unpack(uchar *to, const uchar *from, uint param_data) final
Unpack a field from row data.
Definition: field.h:2392
Field_long(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2354
ulonglong get_max_int_value() const final
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:2448
Field_longlong(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2406
enum_field_types type() const final
Definition: field.h:2417
uchar * pack(uchar *to, const uchar *from, size_t max_length) const final
Pack the field into a format suitable for storage and transfer.
Definition: field.h:2440
uint32 max_display_length() const final
Definition: field.h:2435
enum Item_result result_type() const final
Definition: field.h:2416
Field_longlong * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2436
bool can_be_compared_as_longlong() const final
Definition: field.h:2434
const uchar * unpack(uchar *to, const uchar *from, uint param_data) final
Unpack a field from row data.
Definition: field.h:2443
Field_longlong(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, bool unsigned_arg)
Definition: field.h:2411
enum ha_base_keytype key_type() const final
Definition: field.h:2418
bool is_updatable() const final
Checks whether a string field is part of write_set.
Definition: field.cc:10390
type_conversion_status report_if_important_data(const char *ptr, const char *end, bool count_spaces)
Definition: field.cc:6126
uint32 max_data_length() const override
Get the maximum size of the data in packed format.
Definition: field.cc:6259
type_conversion_status check_string_copy_error(const char *well_formed_error_pos, const char *cannot_convert_error_pos, const char *from_end_pos, const char *end, bool count_spaces, const CHARSET_INFO *cs)
Report "not well formed" or "cannot convert" error after storing a character string info a field.
Definition: field.cc:6083
Field_longstr(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, const CHARSET_INFO *charset_arg)
Definition: field.h:2058
type_conversion_status store_decimal(const my_decimal *d) override
Decimal representation of Field_str.
Definition: field.cc:6253
uint32 max_display_length() const final
Definition: field.h:2340
enum Item_result result_type() const final
Definition: field.h:2322
Field_medium * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2341
Field_medium(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, bool unsigned_arg)
Definition: field.h:2317
ulonglong get_max_int_value() const final
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:2345
enum_field_types type() const final
Definition: field.h:2323
enum ha_base_keytype key_type() const final
Definition: field.h:2324
Field_medium(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2312
uint precision
Definition: field.h:2154
enum_field_types type() const final
Definition: field.h:2169
Field_new_decimal * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2198
uint32 max_display_length() const final
Definition: field.h:2192
uint bin_size
Definition: field.h:2155
Item_result result_type() const final
Definition: field.h:2171
uint32 pack_length() const final
Definition: field.h:2193
void set_keep_precision(bool arg)
Definition: field.h:2205
enum ha_base_keytype key_type() const final
Definition: field.h:2170
bool zero_pack() const final
Definition: field.h:3165
Field_newdate(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg)
Definition: field.h:3142
enum ha_base_keytype key_type() const final
Definition: field.h:3153
enum_field_types type() const final
Definition: field.h:3151
Field_newdate(bool is_nullable_arg, const char *field_name_arg)
Definition: field.h:3147
Field_newdate * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3167
enum_field_types real_type() const final
Definition: field.h:3152
int cmp(const uchar *, const uchar *) const final
Definition: field.h:2580
double val_real() const final
Definition: field.h:2573
enum_field_types type() const final
Definition: field.h:2562
type_conversion_status store(const char *, size_t, const CHARSET_INFO *) final
Definition: field.h:2563
type_conversion_status reset() final
Definition: field.h:2572
String * val_str(String *, String *value2) const final
Definition: field.h:2576
my_decimal * val_decimal(my_decimal *) const final
Definition: field.h:2575
type_conversion_status store(double) final
Store double value in Field_string or Field_varstring.
Definition: field.h:2567
longlong val_int() const final
Definition: field.h:2574
type_conversion_status store(longlong, bool) final
Definition: field.h:2568
size_t make_sort_key(uchar *, size_t len) const final
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.h:2582
Field_null(uchar *ptr_arg, uint32 len_arg, uchar auto_flags_arg, const char *field_name_arg, const CHARSET_INFO *cs)
Definition: field.h:2557
type_conversion_status store_decimal(const my_decimal *) final
Decimal representation of Field_str.
Definition: field.h:2569
uint32 max_display_length() const final
Definition: field.h:2585
uint32 pack_length() const final
Definition: field.h:2583
Field_null * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2586
uint repertoire() const final
Definition: field.h:1973
uint row_pack_length() const final
Definition: field.h:1984
uint decimals() const final
Definition: field.h:1976
bool zerofill
True if the column was declared with the ZEROFILL attribute.
Definition: field.h:1965
bool eq_def(const Field *field) const final
Definition: field.cc:8632
bool get_time(MYSQL_TIME *ltime) const override
Definition: field.cc:2046
my_decimal * val_decimal(my_decimal *) const override
Return decimal value of integer field.
Definition: field.cc:2033
bool is_unsigned() const final
Whether the field is signed or not.
Definition: field.h:1970
const CHARSET_INFO * charset() const final
Definition: field.h:1974
Field_num(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg)
Numeric fields base class constructor.
Definition: field.cc:1501
type_conversion_status check_int(const CHARSET_INFO *cs, const char *str, size_t length, const char *int_end, int error)
Test if given number is a int.
Definition: field.cc:1545
Item_result result_type() const override
Definition: field.h:1971
bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) const override
Definition: field.cc:2041
uint32 pack_length_from_metadata(uint) const override
Definition: field.h:1985
type_conversion_status get_int(const CHARSET_INFO *cs, const char *from, size_t len, longlong *rnd, ulonglong unsigned_max, longlong signed_min, longlong signed_max)
Definition: field.cc:1588
enum Derivation derivation() const final
Definition: field.h:1972
const uint8 dec
Definition: field.h:1959
const bool unsigned_flag
Whether the field is signed or not.
Definition: field.h:1956
uint is_equal(const Create_field *new_field) const override
Check whether two numeric fields can be considered 'equal' for table alteration purposes.
Definition: field.cc:8648
type_conversion_status store_time(MYSQL_TIME *ltime, uint8 dec) override
Store MYSQL_TIME value with the given amount of decimal digits into a field.
Definition: field.cc:1629
type_conversion_status store_decimal(const my_decimal *) override
Storing decimal in integer fields.
Definition: field.cc:2010
void prepend_zeros(String *value) const
Definition: field.cc:1514
bool not_fixed
Definition: field.h:2072
uint32 max_display_length() const final
Definition: field.h:2093
Field_real(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2079
Truncate_result
Definition: field.h:2073
bool has_charset() const final
Definition: field.h:4447
const String empty_set_string
Definition: field.h:4454
Field_set * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:4448
enum_field_types real_type() const final
Definition: field.h:4446
type_conversion_status store(double nr) final
Store double value in Field_string or Field_varstring.
Definition: field.h:4435
Field_set(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, uint32 packlength_arg, TYPELIB *typelib_arg, const CHARSET_INFO *charset_arg)
Definition: field.h:4427
Field_set(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint32 packlength_arg, TYPELIB *typelib_arg, const CHARSET_INFO *charset_arg)
Definition: field.h:4417
bool zero_pack() const final
Definition: field.h:4443
type_conversion_status store(const char *to, size_t length, const CHARSET_INFO *charset) final
Definition: field.cc:8371
uint32 max_display_length() const final
Definition: field.h:2291
ulonglong get_max_int_value() const final
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:2305
const uchar * unpack(uchar *to, const uchar *from, uint param_data) final
Unpack a field from row data.
Definition: field.h:2300
Field_short(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2261
Field_short(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, bool unsigned_arg)
Definition: field.h:2266
enum_field_types type() const final
Definition: field.h:2274
uchar * pack(uchar *to, const uchar *from, size_t max_length) const final
Pack the field into a format suitable for storage and transfer.
Definition: field.h:2296
Field_short * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:2292
enum ha_base_keytype key_type() const final
Definition: field.h:2275
enum Item_result result_type() const final
Definition: field.h:2273
Field_short(uint32 len_arg, const char *field_name_arg, bool unsigned_arg)
Definition: field.h:2271
enum Derivation field_derivation
Definition: field.h:2000
void set_field_length(uint32 length) final
Definition: field.h:2022
Item_result numeric_context_result_type() const final
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + ...
Definition: field.h:2007
type_conversion_status store(double nr) override
Store double value in Field_string or Field_varstring.
Definition: field.cc:6186
type_conversion_status store(longlong nr, bool unsigned_val) override=0
uint is_equal(const Create_field *new_field) const override
Whether a field being created is type-compatible with an existing one.
Definition: field.cc:6221
type_conversion_status store(const char *to, size_t length, const CHARSET_INFO *cs) override=0
uint repertoire() const final
Definition: field.h:2016
type_conversion_status store_decimal(const my_decimal *) override
Decimal representation of Field_str.
Definition: field.cc:2088
uint decimals() const override
Definition: field.h:2008
void add_to_cost(CostOfItem *cost) const override
Update '*cost' with the fact that this Field is accessed.
Definition: field.cc:6242
uint32 max_display_length() const override
Definition: field.h:2031
bool binary() const override
Definition: field.h:2030
void set_charset(const CHARSET_INFO *charset_arg)
Definition: field.h:2018
Field_str(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, const CHARSET_INFO *charset)
Definition: field.cc:2051
Item_result result_type() const override
Definition: field.h:2006
void make_send_field(Send_field *field) const override
Populates a Send_field object with metadata about the column represented by this Field object.
Definition: field.cc:2063
const CHARSET_INFO * charset() const override
Definition: field.h:2017
uint32 char_length_cache
Definition: field.h:2040
bool str_needs_quotes() const final
Definition: field.h:2032
void set_derivation(enum Derivation derivation_arg) final
Definition: field.h:2027
const CHARSET_INFO * field_charset
Definition: field.h:1999
enum Derivation derivation() const final
Definition: field.h:2026
bool is_text_key_type() const final
Definition: field.h:3524
bool match_collation_to_optimize_range() const final
Definition: field.h:3471
uint row_pack_length() const final
Definition: field.h:3513
bool has_charset() const final
Definition: field.h:3516
type_conversion_status reset() final
Definition: field.h:3476
Field_string(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, const CHARSET_INFO *cs)
Definition: field.h:3459
uint pack_length_from_metadata(uint field_metadata) const final
Definition: field.h:3505
enum ha_base_keytype key_type() const final
Definition: field.h:3472
bool zero_pack() const final
Definition: field.h:3475
Field_string * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3519
Field_string(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, const CHARSET_INFO *cs)
Definition: field.h:3464
enum_field_types type() const final
Definition: field.h:3470
Abstract class for types with date and time, with or without fractional part: DATETIME,...
Definition: field.h:2882
Field_temporal_with_date_and_time(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg)
Constructor for Field_temporal_with_date_and_time.
Definition: field.h:2919
virtual void store_timestamp_internal(const my_timeval *tm)=0
Store "struct timeval" value into field.
int do_save_field_metadata(uchar *metadata_ptr) const override
Retrieve the field metadata for fields.
Definition: field.h:2884
Abstract class for types with date and time, with fractional part: DATETIME, DATETIME(N),...
Definition: field.h:2933
int cmp(const uchar *a_ptr, const uchar *b_ptr) const final
Definition: field.h:2964
uint decimals() const final
Definition: field.h:2957
size_t make_sort_key(uchar *to, size_t length) const final
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.h:2960
int do_save_field_metadata(uchar *metadata_ptr) const final
Retrieve the field metadata for fields.
Definition: field.h:2935
uint row_pack_length() const final
Definition: field.h:2967
Field_temporal_with_date_and_timef(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg)
Constructor for Field_temporal_with_date_and_timef.
Definition: field.h:2950
const CHARSET_INFO * sort_charset() const final
Definition: field.h:2958
Abstract class for types with date with optional time, with or without fractional part: DATE,...
Definition: field.h:2815
bool get_time(MYSQL_TIME *ltime) const final
Definition: field.h:2870
virtual bool get_date_internal(MYSQL_TIME *ltime) const =0
Low level function to get value into MYSQL_TIME, without checking for being valid.
virtual bool get_date_internal_at_utc(MYSQL_TIME *ltime) const
Definition: field.h:2823
Field_temporal_with_date(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 int_length_arg, uint8 dec_arg)
Constructor for Field_temporal.
Definition: field.h:2857
Item_result numeric_context_result_type() const final
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + ...
Definition: field.h:2781
virtual type_conversion_status convert_number_to_TIME(longlong nr, bool unsigned_val, int nanoseconds, MYSQL_TIME *ltime, int *warning)=0
Convert a number with fractional part with nanosecond precision into MYSQL_TIME, according to the fie...
type_conversion_status store(const char *str, size_t len, const CHARSET_INFO *cs) final
Store string into a date/time/datetime field.
Definition: field.cc:4651
enum Item_result cmp_type() const final
Definition: field.h:2784
uint repertoire() const final
Definition: field.h:2786
bool str_needs_quotes() const final
Definition: field.h:2779
virtual type_conversion_status store_internal(const MYSQL_TIME *ltime, int *error)=0
Low level routine to store a MYSQL_TIME value into a field.
bool can_be_compared_as_longlong() const final
Definition: field.h:2788
const CHARSET_INFO * charset() const final
Definition: field.h:2787
uint32 max_display_length() const final
Definition: field.h:2778
my_time_flags_t get_date_flags(const THD *thd) const
Definition: field.h:2803
bool binary() const final
Definition: field.h:2789
my_time_flags_t date_flags() const
Flags that are passed as "flag" argument to check_date(), number_to_datetime(), str_to_datetime().
Definition: field.cc:4522
static uint8 normalize_dec(uint8 dec_arg)
Adjust number of decimal digits from DECIMAL_NOT_SPECIFIED to DATETIME_MAX_DECIMALS.
Definition: field.h:2604
uint8 get_dec() const
Definition: field.h:2799
virtual my_time_flags_t date_flags(const THD *thd) const
Flags that are passed as "flag" argument to check_date(), number_to_datetime(), str_to_datetime().
Definition: field.h:2723
virtual bool convert_str_to_TIME(const char *str, size_t len, const CHARSET_INFO *cs, MYSQL_TIME *ltime, MYSQL_TIME_STATUS *status)=0
Convert a string to MYSQL_TIME, according to the field type.
virtual type_conversion_status store_internal_adjust_frac(MYSQL_TIME *ltime, int *warnings)=0
Low level routine to store a MYSQL_TIME value into a field with rounding/truncation according to the ...
Item_result result_type() const final
Definition: field.h:2777
enum Derivation derivation() const final
Definition: field.h:2785
Field_temporal(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint32 len_arg, uint8 dec_arg)
Constructor for Field_temporal.
Definition: field.h:2767
uint8 get_fractional_digits() const
Definition: field.h:2807
double val_real() const override
Definition: field.h:2795
uint8 dec
Definition: field.h:2598
Abstract class for TIME and TIME(N).
Definition: field.h:3177
type_conversion_status store_internal(const MYSQL_TIME *ltime, int *error) override=0
Low-level function to store MYSQL_TIME value.
Field_time_common(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg)
Constructor for Field_time_common.
Definition: field.h:3216
bool zero_pack() const final
Definition: field.h:3255
enum ha_base_keytype key_type() const final
Definition: field.h:3245
Field_time * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3256
enum_field_types type() const final
Definition: field.h:3244
Field_time(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg)
Definition: field.h:3238
Field_time(const char *field_name_arg)
Definition: field.h:3242
enum_field_types real_type() const final
Definition: field.h:3306
uint decimals() const final
Definition: field.h:3304
uint row_pack_length() const final
Definition: field.h:3321
Field_timef(bool is_nullable_arg, const char *field_name_arg, uint8 dec_arg)
Constructor for Field_timef.
Definition: field.h:3296
int cmp(const uchar *a_ptr, const uchar *b_ptr) const final
Definition: field.h:3330
size_t make_sort_key(uchar *to, size_t length) const final
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.h:3326
int do_save_field_metadata(uchar *metadata_ptr) const final
Retrieve the field metadata for fields.
Definition: field.h:3267
Field_timef * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3300
enum_field_types type() const final
Definition: field.h:3305
const CHARSET_INFO * sort_charset() const final
Definition: field.h:3324
bool zero_pack() const final
Definition: field.h:3323
uint pack_length_from_metadata(uint field_metadata) const final
Definition: field.h:3316
Field_timef(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, uint8 dec_arg)
Constructor for Field_timef.
Definition: field.h:3286
enum_field_types binlog_type() const final
Definition: field.h:3307
bool zero_pack() const final
Definition: field.h:3001
Field_timestamp * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3005
uchar * pack(uchar *to, const uchar *from, size_t max_length) const final
Pack the field into a format suitable for storage and transfer.
Definition: field.h:3009
enum_field_types type() const final
Definition: field.h:2992
const uchar * unpack(uchar *to, const uchar *from, uint param_data) final
Unpack a field from row data.
Definition: field.h:3012
enum ha_base_keytype key_type() const final
Definition: field.h:2993
bool zero_pack() const final
Definition: field.h:3074
uint pack_length_from_metadata(uint field_metadata) const final
Definition: field.h:3077
enum_field_types real_type() const final
Definition: field.h:3072
enum_field_types type() const final
Definition: field.h:3071
uint32 pack_length() const final
Definition: field.h:3076
enum_field_types binlog_type() const final
Definition: field.h:3073
Field_timestampf * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3066
ulonglong get_max_int_value() const final
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:2254
Field_tiny(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg, bool zero_arg, bool unsigned_arg)
Definition: field.h:2210
uint32 max_display_length() const final
Definition: field.h:2238
enum_field_types type() const override
Definition: field.h:2221
uchar * pack(uchar *to, const uchar *from, size_t max_length) const final
Pack the field into a format suitable for storage and transfer.
Definition: field.h:2243
enum Item_result result_type() const final
Definition: field.h:2220
Field_tiny * clone(MEM_ROOT *mem_root) const override
Makes a shallow copy of the Field object.
Definition: field.h:2239
const uchar * unpack(uchar *to, const uchar *from, uint param_data) final
Unpack a field from row data.
Definition: field.h:2248
enum ha_base_keytype key_type() const final
Definition: field.h:2222
uint32 pack_length() const final
Definition: field.h:2236
Field_tiny(uint32 len_arg, bool is_nullable_arg, const char *field_name_arg, bool unsigned_arg)
Definition: field.h:2215
Field that stores array of values of the same type.
Definition: field.h:4176
bool binary() const override
Definition: field.h:4219
enum_field_types m_elt_type
The array element's real type.
Definition: field.h:4180
bool is_array() const override
Whether the field is a typed array.
Definition: field.h:4216
uint decimals() const override
Definition: field.h:4218
const CHARSET_INFO * charset() const override
Return a text charset so that string functions automatically convert the field value to string and tr...
Definition: field.h:4223
enum_field_types real_type() const override
Definition: field.h:4209
uint pack_length_from_metadata(uint) const override
Definition: field.h:4341
bool match_collation_to_optimize_range() const override
Multi-valued index always works only as a pre-filter for actual condition check, and the latter alway...
Definition: field.h:4271
enum_field_types binlog_type() const override
Definition: field.h:4210
int key_cmp(const uchar *, const uchar *) const override
These methods are used by handler to prevent returning a row past the end_range during range access.
Definition: field.h:4246
uint m_elt_decimals
Element's decimals.
Definition: field.h:4182
const bool unsigned_flag
Definition: field.h:4185
enum_field_types type() const override
Definition: field.h:4206
uint32 get_length_bytes() const override
Return number of bytes the field's length takes.
Definition: field.h:4305
uint32 char_length() const override
maximum possible character length for blob.
Definition: field.h:4202
const CHARSET_INFO * m_elt_charset
Element's charset.
Definition: field.h:4184
bool is_unsigned() const final
Whether the field is signed or not.
Definition: field.h:4215
size_t make_sort_key(uchar *to, size_t max_len) const override
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.h:4310
bool match_collation_to_optimize_range() const final
Definition: field.h:3541
uint32 pack_length() const final
Definition: field.h:3545
bool is_text_key_type() const final
Definition: field.h:3590
const uchar * data_ptr() const final
Return a const pointer to the actual data in the record buffer.
Definition: field.h:3589
bool zero_pack() const final
Definition: field.h:3544
Field_varstring * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3582
bool has_charset() const final
Definition: field.h:3576
uint32 key_length() const final
Definition: field.h:3548
uint32 length_bytes
Definition: field.h:3595
enum_field_types type() const final
Definition: field.h:3540
uint32 get_length_bytes() const override
Return number of bytes the field's length takes.
Definition: field.h:3591
Limits
Definition: field.h:3107
Field_year(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, uchar auto_flags_arg, const char *field_name_arg)
Definition: field.h:3108
Field_year * clone(MEM_ROOT *mem_root) const final
Makes a shallow copy of the Field object.
Definition: field.h:3127
enum_field_types type() const final
Definition: field.h:3115
Field_year(bool is_nullable_arg, const char *field_name_arg)
Definition: field.h:3112
Field(const Field &)=default
Key_map get_covering_prefix_keys() const
Get covering prefix keys.
Definition: field.cc:10213
uchar * pack(uchar *to) const
Definition: field.h:1526
uchar * pack_int16(uchar *to, const uchar *from, size_t max_length) const
Definition: field.cc:10346
virtual void set_default()
Definition: field.cc:10227
void reset_warnings()
Definition: field.h:887
virtual int cmp_binary(const uchar *a, const uchar *b, uint32 max_length=~0L) const
Definition: field.h:1195
virtual enum_field_types real_type() const
Definition: field.h:1168
virtual type_conversion_status store(double nr)=0
virtual bool pack_diff(uchar **to, ulonglong value_options) const
Write the field for the binary log in diff format.
Definition: field.h:1575
virtual uint max_packed_col_length() const
This is a wrapper around pack_length() used by filesort() to determine how many bytes we need for pac...
Definition: field.h:1586
Key_map part_of_sortkey
Definition: field.h:693
const char * orig_table_name
Pointer to original table name, only non-NULL for a temporary table.
Definition: field.h:685
virtual const uchar * data_ptr() const
Return a const pointer to the actual data in the record buffer.
Definition: field.h:1746
bool is_virtual_gcol() const
Definition: field.h:826
const uchar * unpack_int24(uchar *to, const uchar *from) const
Definition: field.cc:10363
virtual uint32 pack_length_in_rec() const
Definition: field.h:1070
const char ** table_name
Definition: field.h:686
uint null_offset() const
Definition: field.cc:10235
const uchar * unpack_int16(uchar *to, const uchar *from) const
Definition: field.cc:10352
virtual bool compatible_field_size(uint metadata, Relay_log_info *, uint16, int *order) const
Check to see if field size is compatible with destination.
Definition: field.cc:1850
imagetype
Definition: field.h:728
@ itRAW
Definition: field.h:728
@ itMBR
Definition: field.h:728
const CHARSET_INFO * charset_for_protocol() const
Definition: field.h:1598
void reset_tmp_nullable()
Turn off temporary nullability for the field.
Definition: field.h:897
virtual int do_save_field_metadata(uchar *metadata_ptr) const
Retrieve the field metadata for fields.
Definition: field.h:1851
virtual ulonglong get_max_int_value() const
Get the upper limit of the MySQL integral and floating-point type.
Definition: field.h:1734
void set_tmp_null()
Set field to temporary value NULL.
Definition: field.cc:1219
virtual longlong val_time_temporal() const
Returns TIME value in packed longlong format.
Definition: field.h:978
virtual bool send_to_protocol(Protocol *protocol) const
Send the value of this field over the protocol using the correct Protocol::store*() function which ma...
Definition: field.cc:1811
virtual uint decimals() const
Definition: field.h:1211
virtual Field * new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, uint new_null_bit) const
Definition: field.cc:2170
uint32 field_length
Definition: field.h:741
static constexpr size_t MAX_SHORT_BLOB_WIDTH
Definition: field.h:735
virtual Item_result cast_to_int_type() const
Definition: field.h:1047
void set_null_ptr(uchar *p_null_ptr, uint p_null_bit)
Definition: field.h:1308
void copy_data(ptrdiff_t src_record_offset)
Definition: field.cc:1799
bool m_is_tmp_null
This is a flag with the following semantics:
Definition: field.h:663
static constexpr size_t MAX_LONG_BLOB_WIDTH
Definition: field.h:737
type_conversion_status store_time(MYSQL_TIME *ltime)
Store MYSQL_TYPE value into a field when the number of fractional digits is not important or is not k...
Definition: field.h:965
void operator=(Field &)=delete
virtual type_conversion_status validate_stored_val(THD *thd)
Definition: field.h:1721
static uchar dummy_null_buffer
Definition: field.h:676
virtual bool is_array() const
Whether the field is a typed array.
Definition: field.h:1801
virtual bool optimize_range(uint idx, uint part) const
Whether this field can be used for index range scans when in the given keypart of the given index.
Definition: field.cc:2138
bool has_insert_default_general_value_expression() const
Checks if the field is marked as having a general expression to generate default values.
Definition: field.h:595
Key_map key_start
Definition: field.h:689
void set_null(ptrdiff_t row_offset=0)
Set field to value NULL.
Definition: field.cc:1759
virtual type_conversion_status store_decimal(const my_decimal *d)=0
virtual bool binary() const
Definition: field.h:1163
longlong val_int(uchar *new_ptr)
Definition: field.h:1467
Value_generator * gcol_info
Definition: field.h:813
ha_storage_media field_storage_type() const
Definition: field.h:1702
int cmp(const uchar *str) const
Definition: field.h:1189
virtual bool str_needs_quotes() const
Definition: field.h:1031
static constexpr size_t MAX_VARCHAR_WIDTH
Definition: field.h:731
virtual void get_image(uchar *buff, size_t length, const CHARSET_INFO *) const
Definition: field.h:1417
static constexpr size_t MAX_TINY_BLOB_WIDTH
Definition: field.h:734
const char * field_name
Definition: field.h:686
void set_field_ptr(uchar *ptr_arg)
Definition: field.h:1764
void clear_flag(unsigned flag)
Definition: field.h:754
uchar * pack_int24(uchar *to, const uchar *from, size_t max_length) const
Definition: field.cc:10357
Value_generator * m_default_val_expr
Holds the expression to be used to generate default values.
Definition: field.h:829
const uchar * field_ptr() const
Return a const pointer to where the field is stored in the record buffer.
Definition: field.h:1754
virtual void add_to_cost(CostOfItem *cost) const
Update '*cost' with the fact that this Field is accessed.
Definition: field.cc:1244
virtual longlong val_date_temporal() const
Returns DATE/DATETIME value in packed longlong format.
Definition: field.h:987
virtual uint32 pack_length() const
Definition: field.h:1063
void set_hidden(dd::Column::enum_hidden_type hidden)
Sets the hidden type for this field.
Definition: field.h:836
LEX_CSTRING comment
Definition: field.h:687
uint16 m_field_index
Definition: field.h:749
virtual const CHARSET_INFO * charset() const
Definition: field.h:1596
void set_notnull(ptrdiff_t row_offset=0)
Set field to value NOT NULL.
Definition: field.cc:1774
virtual uint32 get_length_bytes() const
Return number of bytes the field's length takes.
Definition: field.h:1808
virtual size_t make_sort_key(uchar *buff, size_t length, size_t trunc_pos) const
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
Definition: field.h:1358
bool gcol_expr_is_equal(const Create_field *field) const
Check whether generated columns' expressions are the same.
Definition: field.cc:6216
virtual uint32 max_display_length() const =0
enum_auto_flags
Flags for Field::auto_flags / Create_field::auto_flags bitmaps.
Definition: field.h:710
@ ON_UPDATE_NOW
ON UPDATE CURRENT_TIMESTAMP.
Definition: field.h:714
@ GENERATED_FROM_EXPRESSION
DEFAULT (expression)
Definition: field.h:715
@ NONE
Definition: field.h:711
@ DEFAULT_NOW
DEFAULT CURRENT_TIMESTAMP.
Definition: field.h:713
@ NEXT_NUMBER
AUTO_INCREMENT.
Definition: field.h:712
String * val_int_as_str(String *val_buffer, bool unsigned_flag) const
Interpret field value as an integer but return the result as a string.
Definition: field.cc:1663
virtual uint32 data_length(ptrdiff_t row_offset=0) const
Definition: field.h:1087
virtual void set_image(const uchar *buff, size_t length, const CHARSET_INFO *)
Definition: field.h:1422
virtual bool has_charset() const
Definition: field.h:1602
virtual void set_derivation(enum Derivation)
Definition: field.h:1617
bool is_null_in_record(const uchar *record) const
Check if the Field has value NULL or the record specified by argument has value NULL for this Field.
Definition: field.h:1274
void reset_tmp_null()
Reset temporary NULL value for field.
Definition: field.h:902
virtual uchar * pack_with_metadata_bytes(uchar *to, const uchar *from, uint max_length) const
This function does the same thing as pack(), except for the difference that max_length does not mean ...
Definition: field.h:1548
virtual enum_field_types type() const =0
virtual bool zero_pack() const
Definition: field.h:1164
virtual void move_field_offset(ptrdiff_t ptr_diff)
Definition: field.h:1412
Key_map part_of_key
Keys that includes this field except of prefix keys.
Definition: field.h:690
virtual type_conversion_status store_packed(longlong nr)
Store a temporal value in packed longlong format into a field.
Definition: field.h:937
bool is_hidden_by_user() const
Definition: field.h:866
Field * new_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uchar *new_null_ptr, uint new_null_bit) const
Definition: field.h:1380
bool handle_old_value() const
Whether field's old valued have to be handled.
Definition: field.h:1820
TABLE * table
Pointer to TABLE object that owns this field.
Definition: field.h:681
uint16 field_index() const
Returns field index.
Definition: field.h:1838
virtual type_conversion_status store(longlong nr, bool unsigned_val)=0
virtual bool get_timestamp(my_timeval *tm, int *warnings) const
Returns a UTC component in struct timeval format.
Definition: field.cc:2113
void move_field(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg)
Definition: field.h:1406
const uchar * unpack_int32(uchar *to, const uchar *from) const
Definition: field.cc:10374
virtual void init(TABLE *table_arg)
Definition: field.cc:10237
bool is_null(ptrdiff_t row_offset=0) const
Check whether the full table's row is NULL or the Field has value NULL.
Definition: field.h:1227
virtual my_decimal * val_decimal(my_decimal *) const =0
bool has_insert_default_datetime_value_expression() const
Checks if the field is marked as having a datetime value expression to generate default values on ins...
Definition: field.h:606
void evaluate_update_default_function()
Evaluates the UPDATE default function, if one exists, and stores the result in the record buffer.
Definition: field.cc:2189
LEX_CSTRING m_engine_attribute
Definition: field.h:794
void set_tmp_nullable()
Turn on temporary nullability for the field.
Definition: field.h:892
const uchar * unpack_int64(uchar *to, const uchar *from) const
Definition: field.cc:10385
virtual void set_field_index(uint16 field_index)
Sets field index.
Definition: field.h:1829
type_conversion_status check_constraints(int mysql_errno)
Check NOT NULL constraint on the field after temporary nullability is disabled.
Definition: field.cc:1716
Key_map part_of_prefixkey
Prefix keys.
Definition: field.h:692
bool is_real_null(ptrdiff_t row_offset=0) const
Check whether the Field has value NULL (temporary or actual).
Definition: field.h:1259
bool is_tmp_nullable() const
Definition: field.h:911
String * val_str(String *str, uchar *new_ptr)
Definition: field.h:1475
uchar null_bit
Definition: field.h:758
virtual double val_real() const =0
virtual bool can_be_compared_as_longlong() const
Definition: field.h:1375
virtual longlong val_int() const =0
uchar * pack_int32(uchar *to, const uchar *from, size_t max_length) const
Definition: field.cc:10368
bool m_is_tmp_nullable
Flag: if the NOT-NULL field can be temporary NULL.
Definition: field.h:653
virtual void make_send_field(Send_field *send_field) const
Populates a Send_field object with metadata about the column represented by this Field object.
Definition: field.cc:1947
virtual size_t make_sort_key(uchar *buff, size_t length) const =0
Writes a copy of the current value in the record buffer, suitable for sorting using byte-by-byte comp...
virtual const CHARSET_INFO * sort_charset() const
Definition: field.h:1601
virtual Item_result numeric_context_result_type() const
Returns Item_result type of a field when it appears in numeric context such as: SELECT time_column + ...
Definition: field.h:1043
bool m_indexed
True if this field belongs to some index (unlike part_of_key, the index might have only a prefix).
Definition: field.h:792
virtual int cmp_binary_offset(ptrdiff_t row_offset) const
Definition: field.h:1202
virtual bool is_updatable() const
Checks whether a string field is part of write_set.
Definition: field.h:1774
virtual bool eq_def(const Field *field) const
Definition: field.cc:8483
const uchar * unpack(const uchar *from)
Definition: field.h:1530
virtual bool get_date(MYSQL_TIME *ltime, my_time_flags_t fuzzydate) const
Definition: field.cc:2100
geometry_type
Definition: field.h:718
@ GEOM_GEOMETRYCOLLECTION
Definition: field.h:726
@ GEOM_POLYGON
Definition: field.h:722
@ GEOM_MULTILINESTRING
Definition: field.h:724
@ GEOM_POINT
Definition: field.h:720
@ GEOM_MULTIPOINT
Definition: field.h:723
@ GEOM_MULTIPOLYGON
Definition: field.h:725
@ GEOM_LINESTRING
Definition: field.h:721
@ GEOM_GEOMETRY
Definition: field.h:719
virtual int cmp_max(const uchar *a, const uchar *b, uint max_len) const
Definition: field.h:1190
virtual Item_result result_type() const =0
uint32 flags
Definition: field.h:748
bool is_nullable() const
Definition: field.h:1300
bool warn_if_overflow(int op_result)
Process decimal library return codes and issue warnings for overflow and truncation.
Definition: field.cc:1645
static bool type_can_have_key_part(enum_field_types)
Check whether a field type can be partially indexed by a key.
Definition: field.cc:1482
bool set_warning(Sql_condition::enum_severity_level level, unsigned int code, int cut_increment)
Produce warning or note about data saved into field.
Definition: field.h:1640
virtual type_conversion_status store_time(MYSQL_TIME *ltime, uint8 dec_arg)
Store MYSQL_TIME value with the given amount of decimal digits into a field.
Definition: field.cc:2127
virtual type_conversion_status store(const char *to, size_t length, const CHARSET_INFO *cs)=0
virtual geometry_type get_geometry_type() const
Definition: field.h:1681
uint null_offset(const uchar *record) const
Definition: field.h:1302
virtual bool is_text_key_type() const
Definition: field.h:1212
virtual String * val_str(String *, String *) const =0
virtual uchar * pack(uchar *to, const uchar *from, size_t max_length) const
Pack the field into a format suitable for storage and transfer.
Definition: field.cc:1871
static Item_result result_merge_type(enum_field_types)
Detect Item_result by given field type of UNION merge result.
Definition: field.cc:1359
virtual bool eq(const Field *field) const
Definition: field.h:1052
Field * new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr) const
Definition: field.h:1390
bool is_tmp_null() const
Definition: field.h:919
virtual uint32 key_length() const
Definition: field.h:1166
bool is_gcol() const
Definition: field.h:825
dd::Column::enum_hidden_type m_hidden
Definition: field.h:642
void set_storage_type(ha_storage_media storage_type_arg)
Definition: field.h:1706
static enum_field_types field_type_merge(enum_field_types, enum_field_types)
Return type of which can carry value of both given types in UNION result.
Definition: field.cc:1238
uchar * m_null_ptr
Byte where the NULL bit is stored inside a record.
Definition: field.h:648
virtual uint32 max_data_length() const
Get the maximum size of the data in packed format.
Definition: field.h:1097
virtual Item_result cmp_type() const
Definition: field.h:1046
column_format_type column_format() const
Definition: field.h:1711
virtual const uchar * unpack(uchar *to, const uchar *from, uint param_data)
Unpack a field from row data.
Definition: field.cc:1902
virtual longlong val_time_temporal_at_utc() const
Definition: field.h:992
uchar auto_flags
Bitmap of flags indicating if field value is auto-generated by default and/or on update,...
Definition: field.h:768
bool is_hidden_by_system() const
Definition: field.h:856
virtual int cmp(const uchar *, const uchar *) const =0
String * val_str(String *str) const
Definition: field.h:1012
unsigned int m_warnings_pushed
Definition: field.h:809
void set_check_for_truncated_fields(enum_check_fields check_for_truncated_fields)
Remember the value of THD::check_for_truncated_fields to handle possible NOT-NULL constraint errors a...
Definition: field.h:1294
uchar * pack_int64(uchar *to, const uchar *from, size_t max_length) const
Definition: field.cc:10379
virtual longlong val_date_temporal_at_utc() const
Definition: field.h:996
const char * orig_db_name
Pointer to original database name, only non-NULL for a temporary table.
Definition: field.h:683
uchar * get_null_ptr()
Definition: field.h:679
virtual uint32 char_length() const
Definition: field.h:1677
bool is_field_for_functional_index() const
Definition: field.h:877
virtual uint pack_length_from_metadata(uint field_metadata) const
Definition: field.h:1073
LEX_CSTRING m_secondary_engine_attribute
Definition: field.h:795
virtual int key_cmp(const uchar *str, uint length) const
Definition: field.h:1208
bool is_hidden() const
Definition: field.h:845
virtual void store_timestamp(const my_timeval *)
Stores a timestamp value in timeval format in a field.
Definition: field.h:1145
enum_check_fields m_check_for_truncated_fields_saved
The value of THD::check_for_truncated_fields at the moment of setting m_is_tmp_null attribute.
Definition: field.h:669
void evaluate_insert_default_function()
Evaluates the INSERT default function and stores the result in the field.
Definition: field.cc:2181
virtual int cmp_offset(ptrdiff_t row_offset) const
Definition: field.h:1199
bool is_created_from_null_item
If true, this field was created in create_tmp_field_from_item from a NULL value.
Definition: field.h:778
uint32 all_flags() const
Definition: field.h:757
int save_field_metadata(uchar *first_byte)
Definition: field.h:1078
virtual Field * clone(MEM_ROOT *mem_root) const =0
Makes a shallow copy of the Field object.
virtual bool get_time(MYSQL_TIME *ltime) const
Definition: field.cc:2107
bool stored_in_db
Indication that the field is physically stored in tables rather than just generated on SQL queries.
Definition: field.h:819
virtual enum Derivation derivation() const
Definition: field.h:1615
uchar * ptr
Holds the position to the field in record.
Definition: field.h:639
static constexpr size_t MAX_MEDIUM_BLOB_WIDTH
Definition: field.h:736
virtual void set_field_length(uint32 length)
Definition: field.h:742
virtual int key_cmp(const uchar *a, const uchar *b) const
Definition: field.h:1205
virtual bool is_unsigned() const
Whether the field is signed or not.
Definition: field.h:824
longlong val_temporal_by_field_type() const
Returns "native" packed longlong representation of a TIME or DATE/DATETIME field depending on field t...
Definition: field.h:1004
bool has_update_default_datetime_value_expression() const
Checks if the field is marked as having a datetime value expression to generate default values on upd...
Definition: field.h:618
virtual enum_field_types binlog_type() const
Definition: field.h:1169
bool is_part_of_actual_key(THD *thd, uint cur_index, KEY *cur_index_info) const
Check whether field is part of the index taking the index extensions flag into account.
Definition: field.cc:9801
dd::Column::enum_hidden_type hidden() const
Definition: field.h:839
void dbug_print() const
Definition: field.h:1688
longlong convert_decimal2longlong(const my_decimal *val, bool unsigned_flag, bool *has_overflow)
Conversion from decimal to longlong.
Definition: field.cc:1973
uchar * field_ptr()
Return a pointer to where the field is stored in the record buffer.
Definition: field.h:1762
virtual enum ha_base_keytype key_type() const
Definition: field.h:1165
virtual uint is_equal(const Create_field *new_field) const
Whether a field being created is type-compatible with an existing one.
Definition: field.cc:1225
virtual size_t get_key_image(uchar *buff, size_t length, imagetype type) const
Definition: field.h:1453
virtual void mem_free()
Definition: field.h:1376
virtual bool match_collation_to_optimize_range() const
Definition: field.h:1614
virtual uint repertoire() const
Definition: field.h:1616
virtual void hash(ulong *nr, ulong *nr2) const
Definition: field.cc:1783
bool has_insert_default_constant_expression() const
Checks if the field is marked as having a constant expression to generate default values.
Definition: field.h:630
virtual uint row_pack_length() const
Definition: field.h:1077
virtual bool is_wrapper_field() const
If true, it's a Create_field_wrapper (a sub-class of Field used during CREATE/ALTER that we mustn't c...
Definition: field.h:786
virtual void sql_type(String &str) const =0
virtual type_conversion_status reset()
Definition: field.h:1099
void set_flag(unsigned flag)
Definition: field.h:753
enum_pushed_warnings
Definition: field.h:798
@ NO_DEFAULT_FOR_FIELD_PUSHED
Definition: field.h:800
@ NO_DEFAULT_FOR_VIEW_FIELD_PUSHED
Definition: field.h:801
@ BAD_NULL_ERROR_PUSHED
Definition: field.h:799
virtual Field * new_field(MEM_ROOT *root, TABLE *new_table) const
Definition: field.cc:2142
void set_column_format(column_format_type column_format_arg)
Definition: field.h:1715
uint offset(uchar *record) const
Definition: field.h:1588
virtual void set_key_image(const uchar *buff, size_t length)
Definition: field.h:1458
bool is_flag_set(unsigned flag) const
Definition: field.h:752
Key_map part_of_key_not_extended
All keys that include this field, but not extended by the storage engine to include primary key colum...
Definition: field.h:698
longlong val_int_offset(ptrdiff_t row_offset)
Definition: field.h:1461
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:936
Represents a JSON array container, i.e.
Definition: json_dom.h:516
Vector of logical diffs describing changes to a JSON column.
Definition: json_diff.h:141
Abstraction for accessing JSON values irrespective of whether they are (started out as) binary JSON v...
Definition: json_dom.h:1153
Definition: protocol.h:33
Definition: rpl_rli.h:203
const char * col_name
Definition: field.h:4653
ulong length
Definition: field.h:4654
uint charsetnr
Definition: field.h:4655
bool field
Definition: field.h:4662
enum_field_types type
Definition: field.h:4656
const char * db_name
Definition: field.h:4651
const char * org_table_name
Definition: field.h:4652
enum_severity_level
Enumeration value describing the severity of the condition.
Definition: sql_error.h:63
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
void takeover(String &s)
Takeover the buffer owned by another string.
Definition: sql_string.h:480
void mem_free()
Definition: sql_string.h:400
char * c_ptr_safe()
Returns a pointer to a C-style null-terminated string.
Definition: sql_string.h:288
size_t length() const
Definition: sql_string.h:241
size_t alloced_length() const
Definition: sql_string.h:242
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
This class represents abstract time zone and provides basic interface for MYSQL_TIME <-> my_time_t co...
Definition: tztime.h:49
Used for storing information associated with generated column, default values generated from expressi...
Definition: field.h:483
void set_field_stored(bool stored)
Definition: field.h:536
void set_field_type(enum_field_types fld_type)
Definition: field.h:519
uint num_non_virtual_base_cols
How many non-virtual base columns in base_columns_map.
Definition: field.h:572
bool stored_in_db
Indicates if the field is physically stored in the database.
Definition: field.h:570
bool register_base_columns(TABLE *table)
Calculate the base_columns_map and num_non_virtual_base_cols members of this generated column.
Definition: table.cc:2550
enum_field_types field_type
Real field type.
Definition: field.h:568
void backup_stmt_unsafe_flags(uint32 backup_binlog_stmt_flags)
Set the binary log flags in m_backup_binlog_stmt_flags.
Definition: field.h:525
uint non_virtual_base_columns() const
Get the number of non virtual base columns that this generated column needs.
Definition: field.h:544
Item * expr_item
Item representing the generation expression.
Definition: field.h:493
void dup_expr_str(MEM_ROOT *root, const char *src, size_t len)
Duplicates a string into expr_str.
Definition: table.cc:2574
uint32 get_stmt_unsafe_flags()
Get the binary log flags from m_backup_binlog_stmt_flags.
Definition: field.h:533
MY_BITMAP base_columns_map
Bitmap records base columns which a generated column depends on.
Definition: field.h:515
uint32 m_backup_binlog_stmt_flags
Bit field indicating the type of statement for binary logging.
Definition: field.h:510
void print_expr(THD *thd, String *out)
Writes the generation expression into a String with proper syntax.
Definition: table.cc:2580
Item * item_list
List of all items created when parsing and resolving generated expression.
Definition: field.h:513
bool get_field_stored() const
Definition: field.h:535
enum_field_types get_real_type() const
Definition: field.h:517
LEX_STRING expr_str
Text of the expression.
Definition: field.h:501
enum_hidden_type
Definition: column.h:95
@ HT_HIDDEN_SQL
The column is visible to the server, but hidden from the user.
@ HT_HIDDEN_SE
The column is completely invisible to the server.
@ HT_VISIBLE
The column is visible (a normal column)
@ HT_HIDDEN_USER
User table column marked as INVISIBLE by using the column visibility attribute.
my_decimal class limits 'decimal_t' type to what we need in MySQL.
Definition: my_decimal.h:95
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
#define L
Definition: ctype-tis620.cc:75
#define E_DEC_TRUNCATED
Definition: decimal.h:143
#define E_DEC_DIV_ZERO
Definition: decimal.h:145
#define E_DEC_BAD_NUM
Definition: decimal.h:146
#define E_DEC_OK
Definition: decimal.h:142
#define E_DEC_OOM
Definition: decimal.h:147
#define E_DEC_OVERFLOW
Definition: decimal.h:144
static constexpr int DECIMAL_NOT_SPECIFIED
Definition: dtoa.h:54
Create_field * generate_create_field(THD *thd, Item *source_item, TABLE *tmp_table)
Generate a Create_field from an Item.
Definition: field.cc:10483
bool is_temporal_real_type(enum_field_types type)
Tests if field real type is temporal, i.e.
Definition: field.h:349
Field * make_field(MEM_ROOT *mem_root_arg, TABLE_SHARE *share, uchar *ptr, size_t field_length, uchar *null_pos, uchar null_bit, enum_field_types field_type, const CHARSET_INFO *field_charset, Field::geometry_type geom_type, uchar auto_flags, TYPELIB *interval, const char *field_name, bool is_nullable, bool is_zerofill, bool is_unsigned, uint decimals, bool treat_bit_as_char, uint pack_length_override, std::optional< gis::srid_t > srid, bool is_array)
This function should only be called from legacy code.
Definition: field.cc:9349
type_conversion_status
Status when storing a value in a field or converting from one datatype to another.
Definition: field.h:202
@ TYPE_ERR_BAD_VALUE
Store/convert incompatible values, like converting "foo" to a date.
Definition: field.h:245
@ TYPE_OK
Storage/conversion went fine.
Definition: field.h:204
@ TYPE_NOTE_TIME_TRUNCATED
A minor problem when converting between temporal values, e.g.
Definition: field.h:209
@ TYPE_ERR_OOM
Out of memory.
Definition: field.h:247
@ TYPE_NOTE_TRUNCATED
Value was stored, but something was cut.
Definition: field.h:219
@ TYPE_ERR_NULL_CONSTRAINT_VIOLATION
Trying to store NULL in a NOT NULL field.
Definition: field.h:240
@ TYPE_WARN_OUT_OF_RANGE
Value outside min/max limit of datatype.
Definition: field.h:224
@ TYPE_WARN_TRUNCATED
Value was stored, but something was cut.
Definition: field.h:233
@ TYPE_WARN_INVALID_STRING
Value has invalid string data.
Definition: field.h:238
enum_check_fields
Definition: field.h:172
@ CHECK_FIELD_ERROR_FOR_NULL
Definition: field.h:175
@ CHECK_FIELD_IGNORE
Definition: field.h:173
@ CHECK_FIELD_WARN
Definition: field.h:174
void copy_integer(uchar *to, size_t to_length, const uchar *from, size_t from_length, bool is_unsigned)
Copies an integer value to a format comparable with memcmp().
Definition: field.h:452
type_conversion_status set_field_to_null_with_conversions(Field *field, bool no_conversions)
Set field to NULL or TIMESTAMP or to next auto_increment number.
Definition: field_conv.cc:154
uint32 calc_key_length(enum_field_types sql_type, uint32 length, uint32 decimals, bool is_unsigned, uint32 elements)
Calculate key length for field from its type, length and other attributes.
Definition: field.cc:9187
bool pre_validate_value_generator_expr(Item *expression, const char *name, Value_generator_source source)
Perform per item-type checks to determine if the expression is allowed for a generated column,...
Definition: field.cc:1182
#define MY_REPERTOIRE_NUMERIC
Definition: field.h:258
enum_field_types real_type_to_type(enum_field_types real_type)
Convert temporal real types as returned by field->real_type() to field type as returned by field->typ...
Definition: field.h:393
Value_generator_source
Enum to indicate source for which value generator is used.
Definition: field.h:473
@ VGS_DEFAULT_EXPRESSION
Definition: field.h:475
@ VGS_CHECK_CONSTRAINT
Definition: field.h:476
@ VGS_GENERATED_COLUMN
Definition: field.h:474
type_conversion_status decimal_err_to_type_conv_status(int dec_error)
Definition: field.h:294
enum_field_types blob_type_from_pack_length(uint pack_length)
Return the appropriate MYSQL_TYPE_X_BLOB value based on the pack_length.
Definition: field.h:416
uint get_set_pack_length(int elements)
Definition: field.h:289
bool fields_are_memcpyable(const Field *to, const Field *from)
Check if one can copy from “from” to “to” with a simple memcpy(), with pack_length() as the length.
Definition: field_conv.cc:705
#define my_charset_numeric
Definition: field.h:257
type_conversion_status set_field_to_null(Field *field)
Definition: field_conv.cc:94
uint get_enum_pack_length(int elements)
Definition: field.h:285
size_t calc_pack_length(enum_field_types type, size_t length)
Definition: field.cc:9230
type_conversion_status field_conv_slow(Field *to, const Field *from)
Copy the value in "from" (assumed to be non-NULL) to "to", doing any required conversions in the proc...
Definition: field_conv.cc:765
bool is_blob(enum_field_types sql_type)
Definition: field.h:4766
const char * get_field_name_or_expression(THD *thd, const Field *field)
Definition: field.cc:10571
#define portable_sizeof_char_ptr
Definition: field.h:118
column_format_type
Definition: field.h:190
@ COLUMN_FORMAT_TYPE_DEFAULT
Definition: field.h:191
@ COLUMN_FORMAT_TYPE_FIXED
Definition: field.h:192
@ COLUMN_FORMAT_TYPE_DYNAMIC
Definition: field.h:193
type_conversion_status time_warning_to_type_conversion_status(const int warn)
Convert warnings returned from str_to_time() and str_to_datetime() to their corresponding type_conver...
Definition: field.h:314
type_conversion_status store_internal_with_error_check(Field_new_decimal *field, int conversion_err, my_decimal *value)
Definition: field.cc:2920
enum_field_types get_blob_type_from_length(size_t length)
Definition: field.cc:9217
bool real_type_with_now_as_default(enum_field_types type)
Tests if field real type can have "DEFAULT CURRENT_TIMESTAMP", i.e.
Definition: field.h:368
bool real_type_with_now_on_update(enum_field_types type)
Tests if field real type can have "ON UPDATE CURRENT_TIMESTAMP", i.e.
Definition: field.h:381
Derivation
For use.
Definition: field.h:179
@ DERIVATION_COERCIBLE
Definition: field.h:182
@ DERIVATION_SYSCONST
Definition: field.h:183
@ DERIVATION_EXPLICIT
Definition: field.h:186
@ DERIVATION_NONE
Definition: field.h:185
@ DERIVATION_NUMERIC
Definition: field.h:181
@ DERIVATION_IMPLICIT
Definition: field.h:184
@ DERIVATION_IGNORABLE
Definition: field.h:180
This file contains basic method for field types.
bool is_temporal_type(enum_field_types type)
Tests if field type is temporal, i.e.
Definition: field_common_properties.h:115
bool is_temporal_type_with_date(enum_field_types type)
Tests if field type is temporal and has date part, i.e.
Definition: field_common_properties.h:156
This file contains the field type.
enum_field_types
Column types for MySQL Note: Keep include/mysql/components/services/bits/stored_program_bits....
Definition: field_types.h:55
@ MYSQL_TYPE_TIME2
Internal to MySQL.
Definition: field_types.h:75
@ MYSQL_TYPE_VARCHAR
Definition: field_types.h:71
@ MYSQL_TYPE_LONGLONG
Definition: field_types.h:64
@ MYSQL_TYPE_LONG_BLOB
Definition: field_types.h:85
@ MYSQL_TYPE_BLOB
Definition: field_types.h:86
@ MYSQL_TYPE_TINY
Definition: field_types.h:57
@ MYSQL_TYPE_TIME
Definition: field_types.h:67
@ MYSQL_TYPE_SET
Definition: field_types.h:82
@ MYSQL_TYPE_NEWDATE
Internal to MySQL.
Definition: field_types.h:70
@ MYSQL_TYPE_JSON
Definition: field_types.h:79
@ MYSQL_TYPE_STRING
Definition: field_types.h:88
@ MYSQL_TYPE_NULL
Definition: field_types.h:62
@ MYSQL_TYPE_ENUM
Definition: field_types.h:81
@ MYSQL_TYPE_TINY_BLOB
Definition: field_types.h:83
@ MYSQL_TYPE_LONG
Definition: field_types.h:59
@ MYSQL_TYPE_BIT
Definition: field_types.h:72
@ MYSQL_TYPE_INVALID
Definition: field_types.h:77
@ MYSQL_TYPE_GEOMETRY
Definition: field_types.h:89
@ MYSQL_TYPE_NEWDECIMAL
Definition: field_types.h:80
@ MYSQL_TYPE_DECIMAL
Definition: field_types.h:56
@ MYSQL_TYPE_TYPED_ARRAY
Used for replication only.
Definition: field_types.h:76
@ MYSQL_TYPE_DOUBLE
Definition: field_types.h:61
@ MYSQL_TYPE_MEDIUM_BLOB
Definition: field_types.h:84
@ MYSQL_TYPE_DATETIME2
Internal to MySQL.
Definition: field_types.h:74
@ MYSQL_TYPE_SHORT
Definition: field_types.h:58
@ MYSQL_TYPE_DATE
Definition: field_types.h:66
@ MYSQL_TYPE_FLOAT
Definition: field_types.h:60
@ MYSQL_TYPE_TIMESTAMP
Definition: field_types.h:63
@ MYSQL_TYPE_INT24
Definition: field_types.h:65
@ MYSQL_TYPE_DATETIME
Definition: field_types.h:68
@ MYSQL_TYPE_TIMESTAMP2
Definition: field_types.h:73
@ MYSQL_TYPE_YEAR
Definition: field_types.h:69
static const std::string dec("DECRYPTION")
#define ENUM_FLAG
field is an enum
Definition: mysql_com.h:164
#define FIELD_FLAGS_COLUMN_FORMAT
Field column format, bit 24-25.
Definition: mysql_com.h:187
#define BLOB_FLAG
Field is a blob.
Definition: mysql_com.h:158
#define SET_FLAG
field is a set
Definition: mysql_com.h:167
#define BINARY_FLAG
Field is binary
Definition: mysql_com.h:161
#define FIELD_FLAGS_STORAGE_MEDIA
Field storage media, bit 22-23.
Definition: mysql_com.h:185
static int flag
Definition: hp_test1.cc:40
static int rnd(int max_value)
Definition: hp_test2.cc:551
constexpr const LEX_CSTRING EMPTY_CSTR
Definition: lex_string.h:48
A better implementation of the UNIX ctype(3) library.
static constexpr uint32_t MY_REPERTOIRE_UNICODE30
Definition: m_ctype.h:156
MYSQL_STRINGS_EXPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:509
MYSQL_STRINGS_EXPORT CHARSET_INFO my_charset_utf8mb4_bin
Definition: ctype-utf8.cc:7822
MYSQL_STRINGS_EXPORT unsigned my_charset_repertoire(const CHARSET_INFO *cs)
Definition: ctype.cc:800
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
This file includes constants used by all storage engines.
ha_base_keytype
Definition: my_base.h:440
@ HA_KEYTYPE_VARBINARY2
Definition: my_base.h:461
@ HA_KEYTYPE_BINARY
Definition: my_base.h:443
@ HA_KEYTYPE_USHORT_INT
Definition: my_base.h:449
@ HA_KEYTYPE_ULONGLONG
Definition: my_base.h:452
@ HA_KEYTYPE_UINT24
Definition: my_base.h:454
@ HA_KEYTYPE_VARTEXT2
Definition: my_base.h:460
@ HA_KEYTYPE_FLOAT
Definition: my_base.h:446
@ HA_KEYTYPE_BIT
Definition: my_base.h:462
@ HA_KEYTYPE_ULONG_INT
Definition: my_base.h:450
@ HA_KEYTYPE_SHORT_INT
Definition: my_base.h:444
@ HA_KEYTYPE_NUM
Definition: my_base.h:448
@ HA_KEYTYPE_DOUBLE
Definition: my_base.h:447
@ HA_KEYTYPE_LONG_INT
Definition: my_base.h:445
@ HA_KEYTYPE_INT8
Definition: my_base.h:455
@ HA_KEYTYPE_INT24
Definition: my_base.h:453
@ HA_KEYTYPE_TEXT
Definition: my_base.h:442
@ HA_KEYTYPE_LONGLONG
Definition: my_base.h:451
ha_storage_media
Definition: my_base.h:116
@ HA_SM_DEFAULT
Definition: my_base.h:117
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:181
#define DBUG_FILE
Definition: my_dbug.h:194
#define DBUG_EVALUATE_IF(keyword, a1, a2)
Definition: my_dbug.h:179
#define DBUG_TRACE
Definition: my_dbug.h:146
Utility functions for converting between ulonglong and double.
static constexpr double LLONG_MAX_DOUBLE
Definition: my_double2ulonglong.h:57
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint8_t uint8
Definition: my_inttypes.h:63
unsigned char uchar
Definition: my_inttypes.h:52
long long int longlong
Definition: my_inttypes.h:55
#define MY_INT32_NUM_DECIMAL_DIGITS
Definition: my_inttypes.h:100
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
Interface for low level time utilities.
constexpr const int MYSQL_TIME_WARN_INVALID_TIMESTAMP
Definition: my_time.h:120
constexpr const int MYSQL_TIME_NOTE_TRUNCATED
Definition: my_time.h:122
constexpr const int MYSQL_TIME_WARN_TRUNCATED
Conversion warnings.
Definition: my_time.h:118
constexpr const int DATETIME_MAX_DECIMALS
Definition: my_time.h:143
constexpr const int MYSQL_TIME_WARN_ZERO_IN_DATE
Definition: my_time.h:123
constexpr const my_time_flags_t TIME_FUZZY_DATE
Allow zero day and zero month.
Definition: my_time.h:97
constexpr const int MYSQL_TIME_WARN_OUT_OF_RANGE
Definition: my_time.h:119
unsigned int my_time_flags_t
Flags to str_to_datetime and number_to_datetime.
Definition: my_time.h:94
constexpr const int MYSQL_TIME_WARN_ZERO_DATE
Definition: my_time.h:121
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:9173
Common definition between mysql server & client.
Time declarations shared between the server and client API: you should not add anything to this heade...
enum_mysql_timestamp_type
Definition: mysql_time.h:45
static int interval
Definition: mysqladmin.cc:71
void warning(const char *format,...)
static int record
Definition: mysqltest.cc:195
void copy(Shards< COUNT > &dst, const Shards< COUNT > &src) noexcept
Copy the counters, overwrite destination.
Definition: ut0counter.h:354
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: buf0block_hint.cc:30
constexpr value_type zerofill
Definition: classic_protocol_constants.h:274
constexpr value_type is_unsigned
Definition: classic_protocol_constants.h:273
Definition: commit_order_queue.h:34
enum_column_types
Definition: column.h:53
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:76
RangeReverse< Range > reverse(Range &x)
Iterate over a range in reverse.
Definition: utilities.h:132
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2882
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:61
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:42
required string type
Definition: replication_group_member_actions.proto:34
static void make_hash_key(const char *username, const char *hostname, std::string &key)
Make hash key.
Definition: sha2_password.cc:767
File containing constants that can be used throughout the server.
constexpr const int MAX_TIME_WIDTH
-838:59:59
Definition: sql_const.h:71
constexpr const int MAX_DATE_WIDTH
YYYY-MM-DD.
Definition: sql_const.h:69
constexpr const int MAX_DATETIME_WIDTH
YYYY-MM-DD HH:MM:SS.
Definition: sql_const.h:77
Our own string classes, used pervasively throughout the executor.
Truncate_result
Definition: sql_truncate.cc:139
case opt name
Definition: sslopt-case.h:29
Definition: m_ctype.h:423
unsigned mbmaxlen
Definition: m_ctype.h:447
MY_CHARSET_HANDLER * cset
Definition: m_ctype.h:455
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: mysql_lex_string.h:40
Definition: mysql_lex_string.h:35
Structure to return status from str_to_datetime(), str_to_time(), number_to_datetime(),...
Definition: my_time.h:170
Definition: mysql_time.h:82
Definition: my_bitmap.h:43
size_t(* lengthsp)(const CHARSET_INFO *, const char *ptr, size_t length)
Given a pointer and a length in bytes, returns a new length in bytes where all trailing space charact...
Definition: m_ctype.h:374
void(* fill)(const CHARSET_INFO *, char *to, size_t len, int fill)
Definition: m_ctype.h:401
This structure is shared between different table objects.
Definition: table.h:701
bool has_null_row() const
Definition: table.h:2148
bool is_nullable() const
Return whether table is nullable.
Definition: table.h:2050
A structure to store a decimal value together with its precision and number of decimals TODO: HCS-100...
Definition: protocol_local_v2.h:43
Replacement of system's struct timeval to ensure we can carry 64 bit values even on a platform which ...
Definition: my_time_t.h:45
Item_result
Type of the user defined function return slot and arguments.
Definition: udf_registration_types.h:39
@ STRING_RESULT
not valid for UDFs
Definition: udf_registration_types.h:41
@ DECIMAL_RESULT
not valid for UDFs
Definition: udf_registration_types.h:45
@ REAL_RESULT
char *
Definition: udf_registration_types.h:42
@ INT_RESULT
double
Definition: udf_registration_types.h:43