diff options
author | monty@mashka.mysql.fi <> | 2002-11-22 13:52:40 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-11-22 13:52:40 +0200 |
commit | 48e94ed0ca368132b594f0b9dfc9110499f2d747 (patch) | |
tree | cfe2b106b642564ec7b3b5f8e2c52b74c3853f6f /mysql-test/t/func_time.test | |
parent | b6446addf71b223a3c842ccccfacf0949fe97a40 (diff) | |
download | mariadb-git-48e94ed0ca368132b594f0b9dfc9110499f2d747.tar.gz |
Moved test to correct file
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r-- | mysql-test/t/func_time.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index ffb0f8bbf1e..e267339d64c 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -150,3 +150,21 @@ select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) f select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t1; select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1; drop table t1; + + +# +# Test problem with TIMESTAMP and BETWEEN +# + +CREATE TABLE t1 ( start datetime default NULL); +INSERT INTO t1 VALUES ('2002-10-21 00:00:00'),('2002-10-28 00:00:00'),('2002-11-04 00:00:00'); +CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL); +INSERT INTO t2 VALUES (20021029165106,20021105164731); +CREATE TABLE t3 (ctime1 char(19) NOT NULL, ctime2 char(19) NOT NULL); +INSERT INTO t3 VALUES ("2002-10-29 16:51:06","2002-11-05 16:47:31"); + +# The following statement should be fixed to return a row in 4.1 +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +select * from t1, t3 where t1.start between t3.ctime1 and t3.ctime2; +drop table t1,t2,t3; |