Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.2201 06/06/30 02:03:09 evgen@stripped +7 -0
Merge
mysql-test/t/func_time.test
1.47 06/06/30 02:03:08 evgen@stripped +0 -0
SCCS merged
mysql-test/r/func_time.result
1.58 06/06/30 02:03:08 evgen@stripped +0 -0
SCCS merged
sql/sql_parse.cc
1.557 06/06/30 02:02:15 evgen@stripped +0 -0
Auto merged
sql/item_timefunc.cc
1.115 06/06/30 02:02:15 evgen@stripped +0 -0
Auto merged
mysql-test/t/func_sapdb.test
1.11 06/06/30 02:02:15 evgen@stripped +0 -0
Auto merged
mysql-test/r/symlink.result
1.24 06/06/30 02:02:15 evgen@stripped +0 -0
Auto merged
mysql-test/r/func_sapdb.result
1.16 06/06/30 02:02:15 evgen@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: evgen
# Host: moonbone.local
# Root: /work/merge-5.0/RESYNC
--- 1.114/sql/item_timefunc.cc 2006-06-17 02:52:46 +04:00
+++ 1.115/sql/item_timefunc.cc 2006-06-30 02:02:15 +04:00
@@ -27,6 +27,7 @@
/* TODO: Move month and days to language files */
+/* Day number for Dec 31st, 9999 */
#define MAX_DAY_NUMBER 3652424L
static const char *month_names[]=
@@ -408,7 +409,7 @@
if (yearday > 0)
{
uint days= calc_daynr(l_time->year,1,1) + yearday - 1;
- if (days <= 0 || days >= MAX_DAY_NUMBER)
+ if (days <= 0 || days > MAX_DAY_NUMBER)
goto err;
get_date_from_daynr(days,&l_time->year,&l_time->month,&l_time->day);
}
@@ -454,7 +455,7 @@
(weekday - 1);
}
- if (days <= 0 || days >= MAX_DAY_NUMBER)
+ if (days <= 0 || days > MAX_DAY_NUMBER)
goto err;
get_date_from_daynr(days,&l_time->year,&l_time->month,&l_time->day);
}
@@ -2035,7 +2036,7 @@
ltime->hour= (uint) (sec/3600);
daynr= calc_daynr(ltime->year,ltime->month,1) + days;
/* Day number from year 0 to 9999-12-31 */
- if ((ulonglong) daynr >= MAX_DAY_NUMBER)
+ if ((ulonglong) daynr > MAX_DAY_NUMBER)
goto invalid_date;
get_date_from_daynr((long) daynr, <ime->year, <ime->month,
<ime->day);
@@ -2046,7 +2047,7 @@
period= (calc_daynr(ltime->year,ltime->month,ltime->day) +
sign * (long) interval.day);
/* Daynumber from year 0 to 9999-12-31 */
- if ((ulong) period >= MAX_DAY_NUMBER)
+ if ((ulong) period > MAX_DAY_NUMBER)
goto invalid_date;
get_date_from_daynr((long) period,<ime->year,<ime->month,<ime->day);
break;
@@ -2570,7 +2571,7 @@
days= calc_daynr(yearnr,1,1) + daynr - 1;
/* Day number from year 0 to 9999-12-31 */
- if (days >= 0 && days < MAX_DAY_NUMBER)
+ if (days >= 0 && days <= MAX_DAY_NUMBER)
{
null_value=0;
get_date_from_daynr(days,&l_time.year,&l_time.month,&l_time.day);
--- 1.556/sql/sql_parse.cc 2006-06-28 13:23:24 +04:00
+++ 1.557/sql/sql_parse.cc 2006-06-30 02:02:15 +04:00
@@ -3057,6 +3057,12 @@
}
}
/* Don't yet allow changing of symlinks with ALTER TABLE */
+ if (lex->create_info.data_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "DATA DIRECTORY option ignored");
+ if (lex->create_info.index_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "INDEX DIRECTORY option ignored");
lex->create_info.data_file_name=lex->create_info.index_file_name=0;
/* ALTER TABLE ends previous transaction */
if (end_active_trans(thd))
--- 1.15/mysql-test/r/func_sapdb.result 2005-11-01 19:47:51 +03:00
+++ 1.16/mysql-test/r/func_sapdb.result 2006-06-30 02:02:15 +04:00
@@ -81,6 +81,12 @@
select makedate(1997,0);
makedate(1997,0)
NULL
+select makedate(9999,365);
+makedate(9999,365)
+9999-12-31
+select makedate(9999,366);
+makedate(9999,366)
+NULL
select addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002");
addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002")
1998-01-02 01:01:01.000001
--- 1.10/mysql-test/t/func_sapdb.test 2005-07-28 17:12:33 +04:00
+++ 1.11/mysql-test/t/func_sapdb.test 2006-06-30 02:02:15 +04:00
@@ -43,6 +43,8 @@
select makedate(1997,1);
select makedate(1997,0);
+select makedate(9999,365);
+select makedate(9999,366);
#Time functions
--- 1.57/mysql-test/r/func_time.result 2006-06-27 21:28:24 +04:00
+++ 1.58/mysql-test/r/func_time.result 2006-06-30 02:03:08 +04:00
@@ -361,6 +361,12 @@
select extract(MONTH FROM "2001-02-00");
extract(MONTH FROM "2001-02-00")
2
+SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
+9999-12-31 00:00:00
+SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE)
+9999-12-31 00:00:00
SELECT EXTRACT(QUARTER FROM '2004-01-15') AS quarter;
quarter
1
--- 1.46/mysql-test/t/func_time.test 2006-06-22 22:23:16 +04:00
+++ 1.47/mysql-test/t/func_time.test 2006-06-30 02:03:08 +04:00
@@ -143,6 +143,12 @@
select extract(MONTH FROM "2001-02-00");
#
+# MySQL Bugs: #12356: DATE_SUB or DATE_ADD incorrectly returns null
+#
+SELECT DATE_SUB(str_to_date('9999-12-31 00:01:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+SELECT DATE_ADD(str_to_date('9999-12-30 23:59:00','%Y-%m-%d %H:%i:%s'), INTERVAL 1 MINUTE);
+
+#
# test EXTRACT QUARTER (Bug #18100)
#
--- 1.23/mysql-test/r/symlink.result 2006-05-04 22:21:17 +04:00
+++ 1.24/mysql-test/r/symlink.result 2006-06-30 02:02:15 +04:00
@@ -74,18 +74,24 @@
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
drop database mysqltest;
create table t1 (a int not null) engine=myisam;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 add b int;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 0 INDEX DIRECTORY option ignored
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
| Thread |
|---|
| • bk commit into 5.0 tree (evgen:1.2201) | eugene | 30 Jun |