|
The relevant pieces of the code in the original type handler patch:
@@ -512,6 +514,11 @@ class Item_func_hybrid_field_type :publi
|
cached_field_type(MYSQL_TYPE_DOUBLE)
|
{}
|
enum_field_types field_type() const { return cached_field_type; }
|
+ Item_result cast_to_int_type() const
|
+ {
|
+ const Type_handler *handler= Type_handlers.handler(field_type());
|
+ return handler ? handler->cast_to_int_type() : cmp_type();
|
+ }
|
@@ -1071,9 +1080,15 @@ class Item_func_min_max :public Item_fun
|
+ Item_result cast_to_int_type() const
|
+ {
|
+ const Type_handler *handler= Type_handlers.handler(field_type());
|
+ return handler ? handler->cast_to_int_type() : Item_func::cmp_type();
|
+ }
|
};
|
|