diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-11-21 11:46:36 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-11-21 11:46:36 +0400 |
commit | 2394fa67d4908f62ef14f3ca90269fb32806d193 (patch) | |
tree | f1b54751a653ab37af221f1b22a5368f5ee05ffc /sql/item_func.cc | |
parent | f8a6ee59acb082678cf601a10cbe9c1152748242 (diff) | |
download | mariadb-git-2394fa67d4908f62ef14f3ca90269fb32806d193.tar.gz |
MDEV-4859 Wrong value and data type of "SELECT MAX(time_column) + 1 FROM t1"
Fixed.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 9416d05cb2f..03cd6b5139d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -798,6 +798,8 @@ void Item_num_op::find_num_type(void) cached_result_type= DECIMAL_RESULT; result_precision(); fix_decimals(); + if ((r0 == TIME_RESULT || r1 == TIME_RESULT) && decimals == 0) + cached_result_type= INT_RESULT; } else { |