From cd1782d26af12312b76f2a5e297449840fbdf20f Mon Sep 17 00:00:00 2001 From: Monty Date: Tue, 18 Aug 2020 23:24:09 +0300 Subject: [PATCH] Renamed Type_all_attributes::set_maybe_null() to set_type_maybe_null() This was done to have Item::set_maybe_null() as an inline function --- plugin/type_inet/sql_type_inet.h | 2 +- sql/item.h | 5 +++++ sql/sql_class.h | 2 +- sql/sql_type.h | 2 +- sql/sql_type_geom.cc | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plugin/type_inet/sql_type_inet.h b/plugin/type_inet/sql_type_inet.h index ee89c03619e..0f110314620 100644 --- a/plugin/type_inet/sql_type_inet.h +++ b/plugin/type_inet/sql_type_inet.h @@ -736,7 +736,7 @@ public: { if (Inet6::fix_fields_maybe_null_on_conversion_to_inet6(items[i])) { - attr->set_maybe_null(true); + attr->set_type_maybe_null(true); break; } } diff --git a/sql/item.h b/sql/item.h index f6eaee64cc1..1161cb67f2a 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1158,6 +1158,11 @@ public: } const TYPELIB *get_typelib() const { return NULL; } void set_maybe_null(bool maybe_null_arg) { maybe_null= maybe_null_arg; } + /* This is used when calling Type_all_attributes::set_type_maybe_null() */ + void set_type_maybe_null(bool maybe_null_arg) override + { + set_maybe_null(maybe_null_arg); + } void set_typelib(const TYPELIB *typelib) { // Non-field Items (e.g. hybrid functions) never have ENUM/SET types yet. diff --git a/sql/sql_class.h b/sql/sql_class.h index 175ba36ae9f..a6a0d9097f9 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -7578,7 +7578,7 @@ public: m_maybe_null(false) { } - void set_maybe_null(bool maybe_null_arg) { m_maybe_null= maybe_null_arg; } + void set_type_maybe_null(bool maybe_null_arg) { m_maybe_null= maybe_null_arg; } bool get_maybe_null() const { return m_maybe_null; } decimal_digits_t decimal_precision() const diff --git a/sql/sql_type.h b/sql/sql_type.h index ab48c1f7f32..6cd462430f9 100644 --- a/sql/sql_type.h +++ b/sql/sql_type.h @@ -3306,7 +3306,7 @@ public: :Type_std_attributes(other) { } virtual ~Type_all_attributes() {} - virtual void set_maybe_null(bool maybe_null_arg)= 0; + virtual void set_type_maybe_null(bool maybe_null_arg)= 0; // Returns total number of decimal digits virtual decimal_digits_t decimal_precision() const= 0; virtual const TYPELIB *get_typelib() const= 0; diff --git a/sql/sql_type_geom.cc b/sql/sql_type_geom.cc index c9263f32bc9..cfe71c8b51e 100644 --- a/sql/sql_type_geom.cc +++ b/sql/sql_type_geom.cc @@ -501,7 +501,7 @@ bool Type_handler_geometry:: func->unsigned_flag= false; func->decimals= 0; func->max_length= (uint32) UINT_MAX32; - func->set_maybe_null(true); + func->set_type_maybe_null(true); return false; }