diff options
author | unknown <jimw@mysql.com> | 2005-10-17 17:00:42 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-10-17 17:00:42 -0700 |
commit | 47b044f41114cbbfd216030269f7a0380a502050 (patch) | |
tree | 404c928098c8c53ae1ac5024713ab552fbdaeec9 /mysql-test/t/func_math.test | |
parent | 3867a5db376cf225403116c26eaa8c73e4c9b359 (diff) | |
download | mariadb-git-47b044f41114cbbfd216030269f7a0380a502050.tar.gz |
Fix Item_func_abs::fix_length_and_dec() to set maybe_null properly. (Bug #14009)
mysql-test/r/func_math.result:
Add new results
mysql-test/t/func_math.test:
Add new regression test
sql/item_func.cc:
Set maybe_null in Item_func_abs::fix_length_and_dec().
Diffstat (limited to 'mysql-test/t/func_math.test')
-rw-r--r-- | mysql-test/t/func_math.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index c75454a96d4..a8f62e38e86 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -86,4 +86,14 @@ 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 |