From 375f08c30bd091723e11ba452f11120d8826dd60 Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Sat, 2 Nov 2002 16:10:53 +0200 Subject: [PATCH 1/3] Added test case for the last fix --- mysql-test/r/func_test.result | 4 ++++ mysql-test/t/func_test.test | 10 ++++++++++ 2 files changed, 14 insertions(+) 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 From c1fa8f6485450b8f7b1e7cb6083ce7c7f464fca7 Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Thu, 21 Nov 2002 17:55:49 +0200 Subject: [PATCH 2/3] A fix for --bind-address=hostname --- sql/mysqld.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 71b832f24f4..8d6a1a8a700 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3543,7 +3543,6 @@ static void set_options(void) #endif my_bind_addr = htonl( INADDR_ANY ); } - /* Initiates DEBUG - but no debugging here ! */ static void get_options(int argc,char **argv) @@ -3893,7 +3892,7 @@ static void get_options(int argc,char **argv) else { struct hostent *ent; - if (!optarg || !optarg[0]) + if (optarg && optarg[0]) ent=gethostbyname(optarg); else { From a7fe266e54ae842978baf1662d612f27a1e86d4e Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Thu, 21 Nov 2002 18:14:27 +0200 Subject: [PATCH 3/3] fix error in result --- mysql-test/r/func_test.result | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index da82567db4d..2f40740d4aa 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -27,7 +27,6 @@ -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