summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_math.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-02-07 21:07:28 +0400
committerAlexander Barkov <bar@mariadb.org>2017-02-07 21:07:28 +0400
commit3f83801d8266fa465d296dbe528a5ea132945a84 (patch)
tree28bb83b3d1eb4cd0839fa2861923aba20a2d3d99 /mysql-test/r/func_math.result
parentd333e3ad9c877ce7540bd1cdaf78094fa0f273c4 (diff)
downloadmariadb-git-3f83801d8266fa465d296dbe528a5ea132945a84.tar.gz
MDEV-12001 Split Item_func_round::fix_length_and_dec to virtual methods in Type_handler
This patch makes the following changes (according to the task description): - Adds Type_handler::Item_func_round_fix_length_and_dec(). - Splits the code from Item_func_round::fix_length_and_dec() into new Item_func_round methods fix_arg_int(), fix_arg_decimal(), fix_arg_double(). - Calls the new Item_func_round methods from the relevant implementations of Type_handler_xxx::Item_func_round_fix_length_and_dec(). - Adds a new error message ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION - Makes ROUND() return the new error for GEOMETRY Additionally: - Inherits Item_func_round directly from Item_func_numhybrid as it uses nothing from Item_func_num1. - Fixes "MDEV-12000 ROUND(expr,const_expr_returning_NULL) creates DOUBLE(0,0)". Now if args[1] returns NULL, the data type is set to DOUBLE with NOT_FIXED_DEC decimals instead of 0 decimals.
Diffstat (limited to 'mysql-test/r/func_math.result')
-rw-r--r--mysql-test/r/func_math.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index f02776d4448..f26d1e4096c 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -817,3 +817,21 @@ select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678');
CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678')
NULL 0 3259397556 2501908538 763378421 939184570
+#
+# Start of 10.3 tests
+#
+#
+# MDEV-12000 ROUND(expr,const_expr_returning_NULL) creates DOUBLE(0,0)
+#
+CREATE OR REPLACE TABLE t1 AS SELECT
+ROUND(10,NULL) AS c1,
+ROUND(10.1,NULL) AS c2,
+ROUND(10e0,NULL) AS c3;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` double DEFAULT NULL,
+ `c2` double DEFAULT NULL,
+ `c3` double DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;