Fix compile error in macOS caused by MDEV-20477

This commit is contained in:
Sachin 2019-09-13 16:07:26 +05:30
parent 386f9d14bd
commit 2eeac53715
3 changed files with 20 additions and 20 deletions

View File

@ -3500,7 +3500,7 @@ Binlog_type_info Field_new_decimal::binlog_type_info() const
{
DBUG_ASSERT(Field_new_decimal::type() == binlog_type());
return Binlog_type_info(Field_new_decimal::type(), precision +
(decimals() << 8), 2, binlog_signess());
(decimals() << 8), 2, binlog_signedness());
}
@ -4672,7 +4672,7 @@ Binlog_type_info Field_float::binlog_type_info() const
{
DBUG_ASSERT(Field_float::type() == binlog_type());
return Binlog_type_info(Field_float::type(), pack_length(), 1,
binlog_signess());
binlog_signedness());
}
@ -4984,7 +4984,7 @@ Binlog_type_info Field_double::binlog_type_info() const
{
DBUG_ASSERT(Field_double::type() == binlog_type());
return Binlog_type_info(Field_double::type(), pack_length(), 1,
binlog_signess());
binlog_signedness());
}

View File

@ -637,11 +637,11 @@ public:
class Binlog_type_info
{
public:
enum binlog_signess_t
enum binlog_sign_t
{
SIGNED,
UNSIGNED,
SIGNESS_NOT_RELEVANT // for non-numeric types
SIGN_SIGNED,
SIGN_UNSIGNED,
SIGN_NOT_APPLICABLE // for non-numeric types
};
uchar m_type_code; // according to Field::binlog_type()
/**
@ -649,7 +649,7 @@ public:
*/
uint16 m_metadata;
uint8 m_metadata_size;
binlog_signess_t m_signess;
binlog_sign_t m_signedness;
CHARSET_INFO *m_cs; // NULL if not relevant
TYPELIB *m_enum_typelib; // NULL if not relevant
TYPELIB *m_set_typelib; // NULL if not relevant
@ -660,7 +660,7 @@ public:
:m_type_code(type_code),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_signess(SIGNESS_NOT_RELEVANT),
m_signedness(SIGN_NOT_APPLICABLE),
m_cs(NULL),
m_enum_typelib(NULL),
m_set_typelib(NULL),
@ -668,11 +668,11 @@ public:
{};
Binlog_type_info(uchar type_code, uint16 metadata,
uint8 metadata_size,
binlog_signess_t signess)
binlog_sign_t signedness)
:m_type_code(type_code),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_signess(signess),
m_signedness(signedness),
m_cs(NULL),
m_enum_typelib(NULL),
m_set_typelib(NULL),
@ -684,7 +684,7 @@ public:
:m_type_code(type_code),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_signess(SIGNESS_NOT_RELEVANT),
m_signedness(SIGN_NOT_APPLICABLE),
m_cs(cs),
m_enum_typelib(NULL),
m_set_typelib(NULL),
@ -697,7 +697,7 @@ public:
:m_type_code(type_code),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_signess(SIGNESS_NOT_RELEVANT),
m_signedness(SIGN_NOT_APPLICABLE),
m_cs(cs),
m_enum_typelib(t_enum),
m_set_typelib(t_set),
@ -709,7 +709,7 @@ public:
:m_type_code(type_code),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_signess(SIGNESS_NOT_RELEVANT),
m_signedness(SIGN_NOT_APPLICABLE),
m_cs(cs),
m_enum_typelib(NULL),
m_set_typelib(NULL),
@ -1900,10 +1900,10 @@ protected:
void prepend_zeros(String *value) const;
Item *get_equal_zerofill_const_item(THD *thd, const Context &ctx,
Item *const_item);
Binlog_type_info::binlog_signess_t binlog_signess() const
Binlog_type_info::binlog_sign_t binlog_signedness() const
{
return (flags & UNSIGNED_FLAG) ? Binlog_type_info::UNSIGNED :
Binlog_type_info::SIGNED;
return (flags & UNSIGNED_FLAG) ? Binlog_type_info::SIGN_UNSIGNED :
Binlog_type_info::SIGN_SIGNED;
}
public:
const uint8 dec;
@ -1963,7 +1963,7 @@ public:
Binlog_type_info binlog_type_info() const override
{
DBUG_ASSERT(Field_num::type() == binlog_type());
return Binlog_type_info(Field_num::type(), 0, 0, binlog_signess());
return Binlog_type_info(Field_num::type(), 0, 0, binlog_signedness());
}
};

View File

@ -6447,9 +6447,9 @@ bool Table_map_log_event::init_signedness_field()
for (unsigned int i= 0 ; i < m_table->s->fields ; ++i)
{
info= binlog_type_info_array + i;
if (info->m_signess != Binlog_type_info::SIGNESS_NOT_RELEVANT)
if (info->m_signedness != Binlog_type_info::SIGN_NOT_APPLICABLE)
{
if (info->m_signess == Binlog_type_info::UNSIGNED)
if (info->m_signedness == Binlog_type_info::SIGN_UNSIGNED)
flag|= mask;
mask >>= 1;