Below is the list of changes that have just been committed into a local
5.1 repository of tnurnberg. When tnurnberg 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.2141 06/05/16 02:32:13 tnurnberg@stripped +3 -0
Merge tnurnberg@stripped:/home/bk/mysql-5.1-new
into mysql.com:/home/mysql-5.1-18997
mysql-test/t/func_time.test
1.42 06/05/16 02:32:07 tnurnberg@stripped +8 -0
merge fixies
mysql-test/r/func_time.result
1.52 06/05/16 02:32:07 tnurnberg@stripped +1 -1
merge fixies
sql/item_timefunc.cc
1.117 06/05/16 02:24:27 tnurnberg@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: tnurnberg
# Host: salvation.intern.azundris.com
# Root: /home/mysql-5.1-18997/RESYNC
--- 1.116/sql/item_timefunc.cc 2006-05-15 23:42:48 +02:00
+++ 1.117/sql/item_timefunc.cc 2006-05-16 02:24:27 +02:00
@@ -870,9 +870,9 @@
{
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.51/mysql-test/r/func_time.result 2006-05-15 23:41:01 +02:00
+++ 1.52/mysql-test/r/func_time.result 2006-05-16 02:32:07 +02:00
@@ -732,6 +732,25 @@
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
End of 4.1 tests
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;
--- 1.41/mysql-test/t/func_time.test 2006-05-10 15:27:37 +02:00
+++ 1.42/mysql-test/t/func_time.test 2006-05-16 02:32:07 +02:00
@@ -367,7 +367,7 @@
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
+--echo End of 4.1 tests
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;
@@ -482,4 +482,23 @@
DROP TABLE t1,t2;
-# End of 5.0 tests
+--echo End of 5.0 tests
+
+#
+# Bug #18997
+#
+
+select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
+select date_sub("0199-01-01 00:00:01",INTERVAL 2 SECOND);
+select date_add("0199-12-31 23:59:59",INTERVAL 2 SECOND);
+select date_sub("0200-01-01 00:00:01",INTERVAL 2 SECOND);
+select date_sub("0200-01-01 00:00:01",INTERVAL 1 SECOND);
+select date_sub("0200-01-01 00:00:01",INTERVAL 2 SECOND);
+select date_add("2001-01-01 23:59:59",INTERVAL -2000 YEAR);
+select date_sub("50-01-01 00:00:01",INTERVAL 2 SECOND);
+select date_sub("90-01-01 00:00:01",INTERVAL 2 SECOND);
+select date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND);
+select date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND);
+
+
+--echo End of 5.1 tests
| Thread |
|---|
| • bk commit into 5.1 tree (tnurnberg:1.2141) | Tatjana A Nuernberg | 16 May |