Below is the list of changes that have just been committed into a local
4.1 repository of jani. When jani 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.2477 06/05/04 19:31:10 jani@stripped +3 -0
Fix for Bug#11326.
sql/item_timefunc.cc
1.99 06/05/04 19:31:06 jani@stripped +2 -1
Fix for Bug#11326.
mysql-test/t/date_formats.test
1.16 06/05/04 19:31:06 jani@stripped +11 -0
Added test cases for Bug#11326
mysql-test/r/date_formats.result
1.19 06/05/04 19:31:06 jani@stripped +18 -0
Added test cases for Bug#11326
# 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: jani
# Host: ua141d10.elisa.omakaista.fi
# Root: /home/my/bk/mysql-4.1
--- 1.98/sql/item_timefunc.cc 2006-04-13 08:55:41 +03:00
+++ 1.99/sql/item_timefunc.cc 2006-05-04 19:31:06 +03:00
@@ -620,7 +620,8 @@
case 'r':
length= my_sprintf(intbuff,
(intbuff,
- (l_time->hour < 12) ? "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM",
+ ((l_time->hour % 24) < 12) ?
+ "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM",
(l_time->hour+11)%12+1,
l_time->minute,
l_time->second));
--- 1.18/mysql-test/r/date_formats.result 2006-01-16 16:44:52 +02:00
+++ 1.19/mysql-test/r/date_formats.result 2006-05-04 19:31:06 +03:00
@@ -473,3 +473,21 @@
select str_to_date( 1, IF(1=1,NULL,NULL) );
str_to_date( 1, IF(1=1,NULL,NULL) )
NULL
+SELECT TIME_FORMAT("24:00:00", '%r');
+TIME_FORMAT("24:00:00", '%r')
+12:00:00 AM
+SELECT TIME_FORMAT("00:00:00", '%r');
+TIME_FORMAT("00:00:00", '%r')
+12:00:00 AM
+SELECT TIME_FORMAT("12:00:00", '%r');
+TIME_FORMAT("12:00:00", '%r')
+12:00:00 PM
+SELECT TIME_FORMAT("15:00:00", '%r');
+TIME_FORMAT("15:00:00", '%r')
+03:00:00 PM
+SELECT TIME_FORMAT("01:00:00", '%r');
+TIME_FORMAT("01:00:00", '%r')
+01:00:00 AM
+SELECT TIME_FORMAT("25:00:00", '%r');
+TIME_FORMAT("25:00:00", '%r')
+01:00:00 AM
--- 1.15/mysql-test/t/date_formats.test 2006-01-16 16:39:11 +02:00
+++ 1.16/mysql-test/t/date_formats.test 2006-05-04 19:31:06 +03:00
@@ -276,3 +276,14 @@
select str_to_date( NULL, 1 );
select str_to_date( 1, IF(1=1,NULL,NULL) );
# End of 4.1 tests
+
+#
+# Bug#11326
+#
+
+SELECT TIME_FORMAT("24:00:00", '%r');
+SELECT TIME_FORMAT("00:00:00", '%r');
+SELECT TIME_FORMAT("12:00:00", '%r');
+SELECT TIME_FORMAT("15:00:00", '%r');
+SELECT TIME_FORMAT("01:00:00", '%r');
+SELECT TIME_FORMAT("25:00:00", '%r');
| Thread |
|---|
| • bk commit into 4.1 tree (jani:1.2477) BUG#11326 | jani | 4 May |