Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2449 05/10/17 17:00:42 jimw@stripped +3 -0
Fix Item_func_abs::fix_length_and_dec() to set maybe_null properly. (Bug #14009)
sql/item_func.cc
1.256 05/10/17 17:00:35 jimw@stripped +1 -0
Set maybe_null in Item_func_abs::fix_length_and_dec().
mysql-test/t/func_math.test
1.18 05/10/17 17:00:35 jimw@stripped +10 -0
Add new regression test
mysql-test/r/func_math.result
1.25 05/10/17 17:00:35 jimw@stripped +6 -0
Add new results
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-4.1-14009
--- 1.255/sql/item_func.cc 2005-10-06 21:50:32 -07:00
+++ 1.256/sql/item_func.cc 2005-10-17 17:00:35 -07:00
@@ -766,6 +766,7 @@
hybrid_type= REAL_RESULT;
if (args[0]->result_type() == INT_RESULT)
hybrid_type= INT_RESULT;
+ maybe_null= 1;
}
--- 1.24/mysql-test/r/func_math.result 2005-09-06 04:19:16 -07:00
+++ 1.25/mysql-test/r/func_math.result 2005-10-17 17:00:35 -07:00
@@ -145,3 +145,9 @@
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;
--- 1.17/mysql-test/t/func_math.test 2005-09-06 04:19:16 -07:00
+++ 1.18/mysql-test/t/func_math.test 2005-10-17 17:00:35 -07:00
@@ -86,4 +86,14 @@
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
| Thread |
|---|
| • bk commit into 4.1 tree (jimw:1.2449) BUG#14009 | Jim Winstead | 18 Oct |