diff options
author | unknown <monty@hundin.mysql.fi> | 2002-11-05 22:45:42 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-11-05 22:45:42 +0200 |
commit | 841fa6f694a5d998b94a6cd4508fe7d26e8407f3 (patch) | |
tree | 35c29682f33da14c65ad84bda65e02a747878d55 /mysql-test/r/func_time.result | |
parent | 54ebb4175bc98d1ba2ca0e72abd83150d722ce8a (diff) | |
download | mariadb-git-841fa6f694a5d998b94a6cd4508fe7d26e8407f3.tar.gz |
Removed wrong patch to fix DATE BETWEEN TIMESTAMP1 AND TIMESTAMP2
Some simple optimizations
Docs/manual.texi:
Updted how binary log works
mysql-test/mysql-test-run.sh:
Added usage of --port to mysqltest
mysql-test/r/func_test.result:
Moved test of datetime comparison to func_time
mysql-test/r/func_time.result:
New test
mysql-test/t/func_test.test:
Moved test of datetime comparison to func_time
mysql-test/t/func_time.test:
Test of DATE BETWEEN TIMESTAMPS
sql/field.h:
Removed wrong patch
sql/item_cmpfunc.cc:
Removed wrong patch
(Need to be fixed by taking into account all arguments to between)
sql/lock.cc:
Removed call to current_thd
sql/set_var.cc:
Don't show 'socket' variable if sockets are not used
sql/sql_base.cc:
Simple optimisation
Diffstat (limited to 'mysql-test/r/func_time.result')
-rw-r--r-- | mysql-test/r/func_time.result | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 5433194c719..671b56ef005 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); from_days(to_days("960101")) to_days(960201)-to_days("19960101") to_days(date_add(curdate(), interval 1 day))-to_days(curdate()) weekday("1997-11-29") 1996-01-01 31 1 5 @@ -372,3 +372,18 @@ select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) extract(MONTH FROM t) extract(MONTH FROM c) 0 0 0 0 0 drop table t1; +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"); +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +start ctime1 ctime2 +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 +select * from t1, t3 where t1.start between t3.ctime1 and t3.ctime2; +start ctime1 ctime2 +2002-11-04 00:00:00 2002-10-29 16:51:06 2002-11-05 16:47:31 +drop table t1,t2,t3; |