summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_time.result4
-rw-r--r--mysql-test/t/func_time.test2
2 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index a24dc044a9a..fd7c6897574 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -20,6 +20,8 @@ dayofmonth("1997-01-02") dayofmonth(19970323)
2 23
month("1997-01-02") year("98-02-03") dayofyear("1997-12-31")
1 1998 365
+month("2001-02-00") year("2001-00-00")
+2 2001
DAYOFYEAR("1997-03-03") WEEK("1998-03-03") QUARTER(980303)
62 9 1
HOUR("1997-03-03 23:03:22") MINUTE("23:03:22") SECOND(230322)
@@ -184,6 +186,8 @@ extract(MINUTE_SECOND FROM "10:11:12")
1112
extract(SECOND FROM "1999-01-02 10:11:12")
12
+extract(MONTH FROM "2001-02-00")
+2
ctime hour(ctime)
2001-01-12 12:23:40 12
monthname(date)
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 062cbea9f84..a91844ab986 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -14,6 +14,7 @@ select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w");
select date_format("1997-01-02", concat("%M %W %D ","%Y %y %m %d %h %i %s %w"));
select dayofmonth("1997-01-02"),dayofmonth(19970323);
select month("1997-01-02"),year("98-02-03"),dayofyear("1997-12-31");
+select month("2001-02-00"),year("2001-00-00");
select DAYOFYEAR("1997-03-03"), WEEK("1998-03-03"), QUARTER(980303);
select HOUR("1997-03-03 23:03:22"), MINUTE("23:03:22"), SECOND(230322);
select week(19980101),week(19970101),week(19980101,1),week(19970101,1);
@@ -100,6 +101,7 @@ select extract(HOUR_SECOND FROM "10:11:12");
select extract(MINUTE FROM "10:11:12");
select extract(MINUTE_SECOND FROM "10:11:12");
select extract(SECOND FROM "1999-01-02 10:11:12");
+select extract(MONTH FROM "2001-02-00");
create table t1 (ctime varchar(20));
insert into t1 values ('2001-01-12 12:23:40');