Loading mysql-test/r/func_math.result +6 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,12 @@ insert into t1 values (1); select rand(i) from t1; ERROR HY000: Incorrect arguments to RAND drop table t1; create table t1 (a varchar(90), ts datetime not null, index (a)) engine=innodb default charset=utf8; insert into t1 values ('http://www.foo.com/', now()); select a from t1 where a='http://www.foo.com/' order by abs(timediff(ts, 0)); a http://www.foo.com/ drop table t1; set sql_mode='traditional'; select ln(-1); ln(-1) Loading mysql-test/r/type_newdecimal.result +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `round(15.4,-1)` decimal(3,0) unsigned NOT NULL default '0', `truncate(-5678.123451,-3)` decimal(4,0) NOT NULL default '0', `abs(-1.1)` decimal(2,1) NOT NULL default '0.0', `abs(-1.1)` decimal(2,1) default NULL, `-(-1.1)` decimal(2,1) NOT NULL default '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; Loading mysql-test/t/func_math.test +10 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,16 @@ insert into t1 values (1); select rand(i) from t1; drop table t1; # # Bug #14009: use of abs() on null value causes problems with filesort # # InnoDB is required to reproduce the fault, but it is okay if we default to # MyISAM when testing. create table t1 (a varchar(90), ts datetime not null, index (a)) engine=innodb default charset=utf8; insert into t1 values ('http://www.foo.com/', now()); select a from t1 where a='http://www.foo.com/' order by abs(timediff(ts, 0)); drop table t1; # End of 4.1 tests # Loading sql/item_func.cc +1 −0 Original line number Diff line number Diff line Loading @@ -636,6 +636,7 @@ void Item_func_num1::fix_num_length_and_dec() { decimals= args[0]->decimals; max_length= args[0]->max_length; maybe_null= 1; } Loading Loading
mysql-test/r/func_math.result +6 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,12 @@ insert into t1 values (1); select rand(i) from t1; ERROR HY000: Incorrect arguments to RAND drop table t1; create table t1 (a varchar(90), ts datetime not null, index (a)) engine=innodb default charset=utf8; insert into t1 values ('http://www.foo.com/', now()); select a from t1 where a='http://www.foo.com/' order by abs(timediff(ts, 0)); a http://www.foo.com/ drop table t1; set sql_mode='traditional'; select ln(-1); ln(-1) Loading
mysql-test/r/type_newdecimal.result +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `round(15.4,-1)` decimal(3,0) unsigned NOT NULL default '0', `truncate(-5678.123451,-3)` decimal(4,0) NOT NULL default '0', `abs(-1.1)` decimal(2,1) NOT NULL default '0.0', `abs(-1.1)` decimal(2,1) default NULL, `-(-1.1)` decimal(2,1) NOT NULL default '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; Loading
mysql-test/t/func_math.test +10 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,16 @@ insert into t1 values (1); select rand(i) from t1; drop table t1; # # Bug #14009: use of abs() on null value causes problems with filesort # # InnoDB is required to reproduce the fault, but it is okay if we default to # MyISAM when testing. create table t1 (a varchar(90), ts datetime not null, index (a)) engine=innodb default charset=utf8; insert into t1 values ('http://www.foo.com/', now()); select a from t1 where a='http://www.foo.com/' order by abs(timediff(ts, 0)); drop table t1; # End of 4.1 tests # Loading
sql/item_func.cc +1 −0 Original line number Diff line number Diff line Loading @@ -636,6 +636,7 @@ void Item_func_num1::fix_num_length_and_dec() { decimals= args[0]->decimals; max_length= args[0]->max_length; maybe_null= 1; } Loading