diff options
author | Sinisa@sinisa.nasamreza.org <> | 2002-10-30 22:08:34 +0200 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2002-10-30 22:08:34 +0200 |
commit | fbe9577516f65e632b60661952fddd780297c73b (patch) | |
tree | e5ab876b5dbfb7f401661c317fef9de2275c0349 /mysql-test/t/func_test.test | |
parent | 245218284495701846f49d986bc91997b97563d6 (diff) | |
download | mariadb-git-fbe9577516f65e632b60661952fddd780297c73b.tar.gz |
A fix for bug when comparing a datetime column with timestamp
values with BETWEEN clause
Diffstat (limited to 'mysql-test/t/func_test.test')
-rw-r--r-- | mysql-test/t/func_test.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index f5ad2e21c73..1486e5bcca8 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -17,6 +17,16 @@ select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2, select -1.49 or -1.49,0.6 or 0.6; select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; +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 |