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.1941 05/06/01 17:09:46 ramil@stripped +3 -0
A fix (bug #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument).
sql/item_timefunc.cc
1.83 05/06/01 17:09:38 ramil@stripped +1 -1
A fix (bug #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument).
Return error for partial dates as well.
mysql-test/t/func_time.test
1.32 05/06/01 17:09:38 ramil@stripped +8 -0
A fix (bug #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument).
mysql-test/r/func_time.result
1.39 05/06/01 17:09:38 ramil@stripped +15 -0
A fix (bug #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument).
# 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: gw.mysql.r18.ru
# Root: /usr/home/ram/work/5.0.b10568
--- 1.82/sql/item_timefunc.cc 2005-05-26 22:54:25 +05:00
+++ 1.83/sql/item_timefunc.cc 2005-06-01 17:09:38 +05:00
@@ -3015,7 +3015,7 @@
bool Item_func_last_day::get_date(TIME *ltime, uint fuzzy_date)
{
- if (get_arg0_date(ltime,fuzzy_date))
+ if (get_arg0_date(ltime, fuzzy_date & ~TIME_FUZZY_DATE))
return 1;
uint month_idx= ltime->month-1;
ltime->day= days_in_month[month_idx];
--- 1.38/mysql-test/r/func_time.result 2005-04-04 18:43:19 +05:00
+++ 1.39/mysql-test/r/func_time.result 2005-06-01 17:09:38 +05:00
@@ -688,3 +688,18 @@
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select timestamp_diff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestamp_diff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
+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'
--- 1.31/mysql-test/t/func_time.test 2005-01-04 15:46:42 +04:00
+++ 1.32/mysql-test/t/func_time.test 2005-06-01 17:09:38 +05:00
@@ -336,3 +336,11 @@
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;
+
+#
+# Bug #10568
+#
+
+select last_day('2005-00-00');
+select last_day('2005-00-01');
+select last_day('2005-01-00');
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.1941) BUG#10568 | ramil | 1 Jun |