Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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.2130 06/05/10 18:27:42 ramil@stripped +3 -0
Merge mysql.com:/usr/home/ram/work/mysql-4.1
into mysql.com:/usr/home/ram/work/mysql-5.0
mysql-test/t/func_time.test
1.41 06/05/10 18:27:37 ramil@stripped +7 -0
merging
mysql-test/r/func_time.result
1.50 06/05/10 18:27:37 ramil@stripped +15 -0
merging
sql/item_timefunc.cc
1.109 06/05/10 18:24:29 ramil@stripped +0 -0
Auto merged
# 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: ramil
# Host: myoffice.izhnet.ru
# Root: /usr/home/ram/work/mysql-5.0/RESYNC
--- 1.108/sql/item_timefunc.cc 2006-05-05 02:21:56 +05:00
+++ 1.109/sql/item_timefunc.cc 2006-05-10 18:24:29 +05:00
@@ -917,9 +917,9 @@ String* Item_func_monthname::val_str(Str
{
DBUG_ASSERT(fixed == 1);
const char *month_name;
- uint month=(uint) Item_func_month::val_int();
+ uint month= (uint) val_int();
- if (!month) // This is also true for NULL
+ if (null_value || !month)
{
null_value=1;
return (String*) 0;
--- 1.49/mysql-test/r/func_time.result 2006-04-11 22:03:30 +05:00
+++ 1.50/mysql-test/r/func_time.result 2006-05-10 18:27:37 +05:00
@@ -732,6 +732,25 @@ SELECT count(*) FROM t1 WHERE d>FROM_DAY
count(*)
3
DROP TABLE t1;
+select last_day('2005-00-00');
+last_day('2005-00-00')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-00-00'
+select last_day('2005-00-01');
+last_day('2005-00-01')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-00-01'
+select last_day('2005-01-00');
+last_day('2005-01-00')
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2005-01-00'
+select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
+monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
+monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
+NULL NULL January NULL
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
id select_type table type possible_keys key key_len ref rows Extra
--- 1.40/mysql-test/t/func_time.test 2006-04-11 22:03:30 +05:00
+++ 1.41/mysql-test/t/func_time.test 2006-05-10 18:27:37 +05:00
@@ -352,6 +352,20 @@ INSERT INTO t1 VALUES (NOW());
SELECT count(*) FROM t1 WHERE d>FROM_DAYS(TO_DAYS(@TMP)) AND d<=FROM_DAYS(TO_DAYS(@TMP)+1);
DROP TABLE t1;
+#
+# Bug #10568
+#
+
+select last_day('2005-00-00');
+select last_day('2005-00-01');
+select last_day('2005-01-00');
+
+#
+# Bug #18501: monthname and NULLs
+#
+
+select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
+ monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.2130) | ramil | 10 May |