Commit 4885c3ff authored by unknown's avatar unknown

test case for bug #614


mysql-test/r/func_time.result:
  result's checking added
mysql-test/t/func_time.test:
  testcase added
parent a59410fd
...@@ -329,6 +329,9 @@ insert into t1 values ('2001-01-12 12:23:40'); ...@@ -329,6 +329,9 @@ insert into t1 values ('2001-01-12 12:23:40');
select ctime, hour(ctime) from t1; select ctime, hour(ctime) from t1;
ctime hour(ctime) ctime hour(ctime)
2001-01-12 12:23:40 12 2001-01-12 12:23:40 12
select ctime from t1 where extract(MONTH FROM ctime) = 1 AND extract(YEAR FROM ctime) = 2001;
ctime
2001-01-12 12:23:40
drop table t1; drop table t1;
create table t1 (id int); create table t1 (id int);
create table t2 (id int, date date); create table t2 (id int, date date);
......
...@@ -123,6 +123,8 @@ select extract(MONTH FROM "2001-02-00"); ...@@ -123,6 +123,8 @@ select extract(MONTH FROM "2001-02-00");
create table t1 (ctime varchar(20)); create table t1 (ctime varchar(20));
insert into t1 values ('2001-01-12 12:23:40'); insert into t1 values ('2001-01-12 12:23:40');
select ctime, hour(ctime) from t1; select ctime, hour(ctime) from t1;
# test bug 614 (multiple extracts in where)
select ctime from t1 where extract(MONTH FROM ctime) = 1 AND extract(YEAR FROM ctime) = 2001;
drop table t1; drop table t1;
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment