summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_math.test
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-10-17 17:00:42 -0700
committerunknown <jimw@mysql.com>2005-10-17 17:00:42 -0700
commit47b044f41114cbbfd216030269f7a0380a502050 (patch)
tree404c928098c8c53ae1ac5024713ab552fbdaeec9 /mysql-test/t/func_math.test
parent3867a5db376cf225403116c26eaa8c73e4c9b359 (diff)
downloadmariadb-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.test10
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