summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 3af415fe5c2..3031e90c9b2 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1265,7 +1265,7 @@ err:
bool Item::get_seconds(ulonglong *sec, ulong *sec_part)
{
- if (result_type() == INT_RESULT)
+ if (decimals == 0)
{ // optimize for an important special case
longlong val= val_int();
bool neg= val < 0 && !unsigned_flag;