summaryrefslogtreecommitdiff
path: root/sql/sql_type.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-07-27 17:17:24 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-07-27 17:17:24 +0300
commit098c0f2634a35e24e9eb0f06d3fba69d0d097657 (patch)
tree8e6b460d1c8812d29444bf1bd7449e5871105215 /sql/sql_type.cc
parent5bf4dee36943cb4cc95d10863d469192de854800 (diff)
parente5c4f4e590d7782ef938b436f84ae11b68e0af08 (diff)
downloadmariadb-git-098c0f2634a35e24e9eb0f06d3fba69d0d097657.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_type.cc')
-rw-r--r--sql/sql_type.cc5
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;