diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc index c62ca8029d3..9f8e3df05f5 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1113,10 +1113,21 @@ bool Item::check_type_can_return_time(const char *opname) const } -bool Item::check_type_can_return_str_ascii(const char *opname) const +bool Item::check_type_can_return_str(const char *opname) const { const Type_handler *handler= type_handler(); - if (handler->can_return_str_ascii()) + if (handler->can_return_str()) + 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_text(const char *opname) const +{ + const Type_handler *handler= type_handler(); + if (handler->can_return_text()) return false; my_error(ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION, MYF(0), handler->name().ptr(), opname); |