diff options
Diffstat (limited to 'sql/sql_type.cc')
-rw-r--r-- | sql/sql_type.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_type.cc b/sql/sql_type.cc index 1473d82ff75..15ccb4e1d98 100644 --- a/sql/sql_type.cc +++ b/sql/sql_type.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2015, 2021, MariaDB + Copyright (c) 2015, 2022, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1957,6 +1957,9 @@ Type_collection_std::aggregate_for_comparison(const Type_handler *ha, return ha; } } + if ((a == INT_RESULT && b == STRING_RESULT) || + (b == INT_RESULT && a == STRING_RESULT)) + return &type_handler_newdecimal; if ((a == INT_RESULT || a == DECIMAL_RESULT) && (b == INT_RESULT || b == DECIMAL_RESULT)) return &type_handler_newdecimal; |