diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index ce9f258612e..840ab12a7ce 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1080,6 +1080,28 @@ bool Item::check_type_can_return_real(const char *opname) const } +bool Item::check_type_can_return_date(const char *opname) const +{ + const Type_handler *handler= type_handler(); + if (handler->can_return_date()) + return false; + my_error(ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION, MYF(0), + handler->name().ptr(), opname); + return true; +} + + +bool Item::check_type_can_return_str_ascii(const char *opname) const +{ + const Type_handler *handler= type_handler(); + if (handler->can_return_str_ascii()) + return false; + my_error(ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION, MYF(0), + handler->name().ptr(), opname); + return true; +} + + bool Item::check_type_scalar(const char *opname) const { const Type_handler *handler= type_handler(); |