summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-07-02 17:12:50 +0200
committerunknown <serg@serg.mylan>2003-07-02 17:12:50 +0200
commit7bb4166a9aa53755b49de865cc639afa9098de7c (patch)
tree910c4a38451950cc798858f0c927ffdb95131c20 /mysql-test/t
parent49938821c26bb67de5f41fc6937401c6415bf641 (diff)
downloadmariadb-git-7bb4166a9aa53755b49de865cc639afa9098de7c.tar.gz
bug #504: in "datetime op int" comparison int wasn't converted to datetime
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/type_datetime.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index f5103958979..51b65d00243 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -36,8 +36,11 @@ drop table t1;
#
create table t1 (id int, dt datetime);
-insert into t1 values (1,"2001-08-14 00:00:00"),(2,"2001-08-15 00:00:00"),(3,"2001-08-16 00:00:00");
+insert into t1 values (1,"2001-08-14 00:00:00"),(2,"2001-08-15 00:00:00"),(3,"2001-08-16 00:00:00"),(4,"2003-09-15 01:20:30");
select * from t1 where dt='2001-08-14 00:00:00' and dt = if(id=1,'2001-08-14 00:00:00','1999-08-15');
+create index dt on t1 (dt);
+select * from t1 where dt > 20021020;
+select * from t1 ignore index (dt) where dt > 20021020;
drop table t1;
#