Commit cd1782d2 authored by Monty's avatar Monty Committed by Sergei Golubchik

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
parent c6bf04ab
...@@ -736,7 +736,7 @@ class Type_handler_inet6: public Type_handler ...@@ -736,7 +736,7 @@ class Type_handler_inet6: public Type_handler
{ {
if (Inet6::fix_fields_maybe_null_on_conversion_to_inet6(items[i])) if (Inet6::fix_fields_maybe_null_on_conversion_to_inet6(items[i]))
{ {
attr->set_maybe_null(true); attr->set_type_maybe_null(true);
break; break;
} }
} }
......
...@@ -1158,6 +1158,11 @@ class Item :public Value_source, ...@@ -1158,6 +1158,11 @@ class Item :public Value_source,
} }
const TYPELIB *get_typelib() const { return NULL; } const TYPELIB *get_typelib() const { return NULL; }
void set_maybe_null(bool maybe_null_arg) { maybe_null= maybe_null_arg; } 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) void set_typelib(const TYPELIB *typelib)
{ {
// Non-field Items (e.g. hybrid functions) never have ENUM/SET types yet. // Non-field Items (e.g. hybrid functions) never have ENUM/SET types yet.
......
...@@ -7578,7 +7578,7 @@ class Type_holder: public Sql_alloc, ...@@ -7578,7 +7578,7 @@ class Type_holder: public Sql_alloc,
m_maybe_null(false) 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; } bool get_maybe_null() const { return m_maybe_null; }
decimal_digits_t decimal_precision() const decimal_digits_t decimal_precision() const
......
...@@ -3306,7 +3306,7 @@ class Type_all_attributes: public Type_std_attributes ...@@ -3306,7 +3306,7 @@ class Type_all_attributes: public Type_std_attributes
:Type_std_attributes(other) :Type_std_attributes(other)
{ } { }
virtual ~Type_all_attributes() {} 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 // Returns total number of decimal digits
virtual decimal_digits_t decimal_precision() const= 0; virtual decimal_digits_t decimal_precision() const= 0;
virtual const TYPELIB *get_typelib() const= 0; virtual const TYPELIB *get_typelib() const= 0;
......
...@@ -501,7 +501,7 @@ bool Type_handler_geometry:: ...@@ -501,7 +501,7 @@ bool Type_handler_geometry::
func->unsigned_flag= false; func->unsigned_flag= false;
func->decimals= 0; func->decimals= 0;
func->max_length= (uint32) UINT_MAX32; func->max_length= (uint32) UINT_MAX32;
func->set_maybe_null(true); func->set_type_maybe_null(true);
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment