mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge commit '43882e764d6867c6855b1ff057758a3f08b25c55' into 10.4
This commit is contained in:
23
sql/field.h
23
sql/field.h
@ -1805,13 +1805,6 @@ public:
|
||||
{
|
||||
return to->store(val_int(), MY_TEST(flags & UNSIGNED_FLAG));
|
||||
}
|
||||
bool memcpy_field_possible(const Field *from) const
|
||||
{
|
||||
return real_type() == from->real_type() &&
|
||||
pack_length() == from->pack_length() &&
|
||||
!((flags & UNSIGNED_FLAG) && !(from->flags & UNSIGNED_FLAG)) &&
|
||||
decimals() == from->decimals();
|
||||
}
|
||||
bool is_equal(const Column_definition &new_field) const;
|
||||
uint row_pack_length() const { return pack_length(); }
|
||||
uint32 pack_length_from_metadata(uint field_metadata) {
|
||||
@ -1995,7 +1988,10 @@ public:
|
||||
e.g. a DOUBLE(53,10) into a DOUBLE(10,10).
|
||||
But it should be OK the other way around.
|
||||
*/
|
||||
return Field_num::memcpy_field_possible(from) &&
|
||||
return real_type() == from->real_type() &&
|
||||
pack_length() == from->pack_length() &&
|
||||
is_unsigned() <= from->is_unsigned() &&
|
||||
decimals() == from->decimals() &&
|
||||
field_length >= from->field_length;
|
||||
}
|
||||
int store_decimal(const my_decimal *dec) { return store(dec->to_double()); }
|
||||
@ -2086,7 +2082,10 @@ public:
|
||||
}
|
||||
bool memcpy_field_possible(const Field *from) const
|
||||
{
|
||||
return Field_num::memcpy_field_possible(from) &&
|
||||
return real_type() == from->real_type() &&
|
||||
pack_length() == from->pack_length() &&
|
||||
is_unsigned() <= from->is_unsigned() &&
|
||||
decimals() == from->decimals() &&
|
||||
field_length == from->field_length;
|
||||
}
|
||||
int reset(void);
|
||||
@ -2161,6 +2160,12 @@ public:
|
||||
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
|
||||
unireg_check_arg, field_name_arg, 0, zero_arg, unsigned_arg)
|
||||
{}
|
||||
bool memcpy_field_possible(const Field *from) const
|
||||
{
|
||||
return real_type() == from->real_type() &&
|
||||
pack_length() == from->pack_length() &&
|
||||
is_unsigned() == from->is_unsigned();
|
||||
}
|
||||
int store_decimal(const my_decimal *);
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
bool val_bool() { return val_int() != 0; }
|
||||
|
Reference in New Issue
Block a user