summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2002-11-20 14:22:42 +0200
committerSinisa@sinisa.nasamreza.org <>2002-11-20 14:22:42 +0200
commit4b4febdf64b54b07fc26bfced5adf47cb639a03d (patch)
tree2e654c586fc4ebe5d398b8e9929e25097c22b0f3 /mysql-test
parent541c40b0006474fd444d90955cdb8aca0db21e4f (diff)
parenta395dc8addb0b001b3c221ddb004d976c66f739e (diff)
downloadmariadb-git-4b4febdf64b54b07fc26bfced5adf47cb639a03d.tar.gz
Merge sinisa@work.mysql.com:/home/bk/mysql
into sinisa.nasamreza.org:/mnt/work/mysql
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_test.result4
-rw-r--r--mysql-test/t/func_test.test10
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result
index 586e345ea10..da82567db4d 100644
--- a/mysql-test/r/func_test.result
+++ b/mysql-test/r/func_test.result
@@ -26,6 +26,10 @@
1 1 1
-1.49 or -1.49 0.6 or 0.6
1 1
+start ctime1 ctime2
+2002-11-04 00:00:00 20021029165106 20021105164731
+start ctime1 ctime2
+2002-11-04 00:00:00 20021029165106 20021105164731
5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1
0 1
1 and 2 between 2 and 10 2 between 2 and 10 and 1
diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test
index ec44009b1a6..ccbb531e2e6 100644
--- a/mysql-test/t/func_test.test
+++ b/mysql-test/t/func_test.test
@@ -15,6 +15,16 @@ select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between
select 'b' between 'a' and 'c', 'B' between 'a' and 'c';
select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0);
select -1.49 or -1.49,0.6 or 0.6;
+drop table if exists t1,t2;
+CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM;
+INSERT INTO t1 VALUES ('2002-10-21 00:00:00');
+INSERT INTO t1 VALUES ('2002-10-28 00:00:00');
+INSERT INTO t1 VALUES ('2002-11-04 00:00:00');
+CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM;
+INSERT INTO t2 VALUES (20021029165106,20021105164731);
+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;
+drop table if exists t1,t2;
#
# Wrong usage of functions