summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 4d07c3484f4..a1a91007a0a 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -359,6 +359,14 @@ longlong Item::val_int_from_date()
}
+longlong Item::val_int_from_real()
+{
+ DBUG_ASSERT(fixed == 1);
+ bool error;
+ return double_to_longlong(val_real(), false /*unsigned_flag*/, &error);
+}
+
+
double Item::val_real_from_date()
{
DBUG_ASSERT(fixed == 1);