Below is the list of changes that have just been committed into a local
5.0 repository of tsmith. When tsmith 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@stripped, 2007-08-10 15:55:13-06:00, tsmith@stripped +3 -0
Backport fix for bug 29898
mysql-test/r/cast.result@stripped, 2007-08-10 15:55:12-06:00, tsmith@stripped +11 -0
Backport fix for bug 29898
mysql-test/t/cast.test@stripped, 2007-08-10 15:55:12-06:00, tsmith@stripped +9 -0
Backport fix for bug 29898
sql/item_timefunc.cc@stripped, 2007-08-10 15:55:12-06:00, tsmith@stripped +1 -4
Backport fix for bug 29898
# 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: tsmith
# Host: ramayana.hindu.god
# Root: /home/tsmith/m/bk/mysql-5.0.44-sp
--- 1.144/sql/item_timefunc.cc 2007-05-29 14:32:57 -06:00
+++ 1.145/sql/item_timefunc.cc 2007-08-10 15:55:12 -06:00
@@ -2653,11 +2653,8 @@
{
DBUG_ASSERT(fixed == 1);
MYSQL_TIME ltime;
- if (args[0]->get_date(<ime, TIME_FUZZY_DATE))
- {
- null_value= 1;
+ if ((null_value= args[0]->get_date(<ime, TIME_FUZZY_DATE)))
return 0;
- }
return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day);
}
--- 1.51/mysql-test/r/cast.result 2007-05-11 07:12:14 -06:00
+++ 1.52/mysql-test/r/cast.result 2007-08-10 15:55:12 -06:00
@@ -403,4 +403,15 @@
select hex(cast('a' as char(2) binary));
hex(cast('a' as char(2) binary))
61
+CREATE TABLE t1 (d1 datetime);
+INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL),
+('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00');
+SELECT cast(date(d1) as signed) FROM t1;
+cast(date(d1) as signed)
+20070719
+NULL
+20070719
+NULL
+20070719
+drop table t1;
End of 5.0 tests
--- 1.36/mysql-test/t/cast.test 2007-05-23 06:43:02 -06:00
+++ 1.37/mysql-test/t/cast.test 2007-08-10 15:55:12 -06:00
@@ -237,4 +237,13 @@
select hex(cast('a' as binary(2)));
select hex(cast('a' as char(2) binary));
+#
+# Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag.
+#
+CREATE TABLE t1 (d1 datetime);
+INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL),
+ ('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00');
+SELECT cast(date(d1) as signed) FROM t1;
+drop table t1;
+
--echo End of 5.0 tests
| Thread |
|---|
| • bk commit into 5.0 tree (tsmith:1.2494) | tim | 10 Aug |