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@stripped, 2007-02-08 12:05:34+04:00, ramil@stripped +2 -0
Merge mysql.com:/home/ram/work/b25301/b25301.4.1
into mysql.com:/home/ram/work/b25301/b25301.5.0
MERGE: 1.1616.2877.48
mysql-test/r/date_formats.result@stripped, 2007-02-08 11:57:53+04:00, ramil@stripped +0 -0
Auto merged
MERGE: 1.15.1.11
sql-common/my_time.c@stripped, 2007-02-08 12:05:32+04:00, ramil@stripped +2 -3
Merging.
Reverted fix for 19370 DateTime datatype in MySQL has two bugs in it
as it's not a bug.
MERGE: 1.6.1.13
# 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: ramil.myoffice.izhnet.ru
# Root: /home/ram/work/b25301/b25301.5.0/RESYNC
--- 1.31/mysql-test/r/date_formats.result 2007-02-08 12:05:37 +04:00
+++ 1.32/mysql-test/r/date_formats.result 2007-02-08 12:05:37 +04:00
@@ -186,12 +186,12 @@ date format datetime
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12
-10:20:10 %H:%i:%s 0000-00-00 00:00:00
-10:20:10 %h:%i:%s.%f 0000-00-00 00:00:00
-10:20:10 %T 0000-00-00 00:00:00
-10:20:10AM %h:%i:%s%p 0000-00-00 00:00:00
-10:20:10AM %r 0000-00-00 00:00:00
-10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 00:00:00
+10:20:10 %H:%i:%s 0000-00-00 10:20:10
+10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10
+10:20:10 %T 0000-00-00 10:20:10
+10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10
+10:20:10AM %r 0000-00-00 10:20:10
+10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
15 September 2001 %d %M %Y 2001-09-15 00:00:00
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
@@ -208,13 +208,6 @@ Tuesday 52 2001 %W %V %X 2002-01-01 00:0
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00
15-01-20 %d-%m-%y 2020-01-15 00:00:00
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00
-Warnings:
-Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10.440000'
select date,format,DATE(str_to_date(date, format)) as date2 from t1;
date format date2
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02
@@ -255,12 +248,12 @@ date format time
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12
-10:20:10 %H:%i:%s NULL
-10:20:10 %h:%i:%s.%f NULL
-10:20:10 %T NULL
-10:20:10AM %h:%i:%s%p NULL
-10:20:10AM %r NULL
-10:20:10.44AM %h:%i:%s.%f%p NULL
+10:20:10 %H:%i:%s 10:20:10
+10:20:10 %h:%i:%s.%f 10:20:10
+10:20:10 %T 10:20:10
+10:20:10AM %h:%i:%s%p 10:20:10
+10:20:10AM %r 10:20:10
+10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58
15 September 2001 %d %M %Y 00:00:00
15 SEPTEMB 2001 %d %M %Y 00:00:00
@@ -277,13 +270,6 @@ Tuesday 52 2001 %W %V %X 00:00:00
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00
15-01-20 %d-%m-%y 00:00:00
15-2001-1 %d-%Y-%c 00:00:00
-Warnings:
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000'
select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1;
date format time2
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12
@@ -293,12 +279,12 @@ date format time2
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12
-10:20:10 %H:%i:%s NULL
-10:20:10 %h:%i:%s.%f NULL
-10:20:10 %T NULL
-10:20:10AM %h:%i:%s%p NULL
-10:20:10AM %r NULL
-10:20:10.44AM %h:%i:%s.%f%p NULL
+10:20:10 %H:%i:%s 10:20:10
+10:20:10 %h:%i:%s.%f 10:20:10
+10:20:10 %T 10:20:10
+10:20:10AM %h:%i:%s%p 10:20:10
+10:20:10AM %r 10:20:10
+10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58
15 September 2001 %d %M %Y 00:00:00
15 SEPTEMB 2001 %d %M %Y 00:00:00
@@ -315,13 +301,6 @@ Tuesday 52 2001 %W %V %X 00:00:00
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00
15-01-20 %d-%m-%y 00:00:00
15-2001-1 %d-%Y-%c 00:00:00
-Warnings:
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
-Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000'
select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d'));
concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d'))
2003-01-02 08:11:02.123456
--- 1.28/sql-common/my_time.c 2007-02-08 12:05:37 +04:00
+++ 1.29/sql-common/my_time.c 2007-02-08 12:05:37 +04:00
@@ -85,8 +85,7 @@ my_bool check_date(const MYSQL_TIME *lti
(!(flags & TIME_INVALID_DATES) &&
ltime->month && ltime->day > days_in_month[ltime->month-1] &&
(ltime->month != 2 || calc_days_in_year(ltime->year) != 366 ||
- ltime->day != 29)) ||
- (ltime->year == 0 && (ltime->month != 0 || ltime->day != 0)))
+ ltime->day != 29)))
{
*was_cut= 2;
return TRUE;
@@ -410,9 +409,7 @@ str_to_datetime(const char *str, uint le
if (number_of_fields < 3 ||
l_time->year > 9999 || l_time->month > 12 ||
l_time->day > 31 || l_time->hour > 23 ||
- l_time->minute > 59 || l_time->second > 59 ||
- (l_time->year == 0 && l_time->month == 0 && l_time->day == 0 &&
- (l_time->hour != 0 || l_time->minute != 0 || l_time->second != 0)))
+ l_time->minute > 59 || l_time->second > 59)
{
/* Only give warning for a zero date if there is some garbage after */
if (!not_zero_date) /* If zero date */
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.2406) | ramil | 8 Feb |