diff options
author | unknown <monty@hundin.mysql.fi> | 2002-04-26 08:56:28 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-04-26 08:56:28 +0300 |
commit | cacfcb6404da497b14fa8484f15ca3832cce8adb (patch) | |
tree | 7412d050274815c36a164eb72d690b8871014e84 | |
parent | 18e6569769a62d8d6e1e50670658aee139960181 (diff) | |
download | mariadb-git-cacfcb6404da497b14fa8484f15ca3832cce8adb.tar.gz |
Portability fixes
myisam/ft_boolean_search.c:
Portability fix
mysql-test/mysql-test-run.sh:
Added slave_net_timeout
mysql-test/r/func_if.result:
Updated results after merge from 3.23
mysql-test/r/func_test.result:
Updated results after merge from 3.23
mysql-test/r/innodb.result:
Updated results after merge from 3.23
mysql-test/r/show_check.result:
Updated results after merge from 3.23
mysql-test/r/variables.result:
Updated results after merge from 3.23
-rw-r--r-- | myisam/ft_boolean_search.c | 9 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 1 | ||||
-rw-r--r-- | mysql-test/r/func_if.result | 15 | ||||
-rw-r--r-- | mysql-test/r/func_test.result | 10 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/r/show_check.result | 3 | ||||
-rw-r--r-- | mysql-test/r/variables.result | 14 |
7 files changed, 39 insertions, 15 deletions
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index cd0d0d9d052..24b585985c0 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -264,7 +264,8 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query, ftbe->weight=1; ftbe->flags=FTB_FLAG_YES; ftbe->nos=1; - ftbe->quot=ftbe->up=0; + ftbe->quot=0; + ftbe->up=0; ftbe->ythresh=ftbe->yweaks=0; ftbe->docid[0]=ftbe->docid[1]=HA_POS_ERROR; ftb->root=ftbe; @@ -288,12 +289,14 @@ int _ftb_strstr(const byte *s0, const byte *e0, while (s0 < e0) { - while (s0 < e0 && cs->to_upper[*s0++] != cs->to_upper[*s1]) + while (s0 < e0 && cs->to_upper[(uint) (uchar) *s0++] != + cs->to_upper[(uint) (uchar) *s1]) /* no-op */; if (s0 >= e0) return 0; p=s1+1; - while (s0 < e0 && p < e1 && cs->to_upper[*s0++] == cs->to_upper[*p++]) + while (s0 < e0 && p < e1 && cs->to_upper[(uint) (uchar) *s0++] == + cs->to_upper[(uint) (uchar) *p++]) /* no-op */; if (p >= e1) return 1; diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index efebc5b5c86..7ae89c96169 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -874,6 +874,7 @@ start_slave() --report-host=127.0.0.1 --report-user=root \ --report-port=$slave_port \ --master-retry-count=5 \ + -O slave_net_timeout=10 \ $SMALL_SERVER \ $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT" CUR_MYERR=$slave_err diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result index 64ee8c67def..16fb0358d51 100644 --- a/mysql-test/r/func_if.result +++ b/mysql-test/r/func_if.result @@ -1,5 +1,10 @@ +drop table if exists t1; +select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0 ; IF(0,"ERROR","this") IF(1,"is","ERROR") IF(NULL,"ERROR","a") IF(1,2,3)|0 IF(1,2.0,3.0)+0 this is a 2 2.0 +CREATE TABLE t1 (st varchar(255) NOT NULL, u int(11) NOT NULL) TYPE=MyISAM; +INSERT INTO t1 VALUES ('a',1),('A',1),('aa',1),('AA',1),('a',1),('aaa',0),('BBB',0); +select if(1,st,st) s from t1 order by s; s a A @@ -8,6 +13,7 @@ aa AA aaa BBB +select if(u=1,st,st) s from t1 order by s; s a A @@ -16,6 +22,7 @@ aa AA aaa BBB +select if(u=1,binary st,st) s from t1 order by s; s A AA @@ -24,6 +31,7 @@ a a aa aaa +select if(u=1,st,binary st) s from t1 where st like "%a%" order by s; s A AA @@ -31,5 +39,10 @@ a a aa aaa +drop table t1; +create table t1 (num double(12,2)); +insert into t1 values (144.54); +select sum(if(num is null,0.00,num)) from t1; sum(if(num is null,0.00,num)) -nan +144.54 +drop table t1; diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 0a45f9e8b5c..deea5b8bb8b 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -28,9 +28,6 @@ select "aba" regexp concat("^","a"); select !0,NOT 0=1,!(0=0),1 AND 1,1 && 0,0 OR 1,1 || NULL, 1=1 or 1=1 and 1=0; !0 NOT 0=1 !(0=0) 1 AND 1 1 && 0 0 OR 1 1 || NULL 1=1 or 1=1 and 1=0 1 1 0 1 0 1 1 1 -select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0 ; -IF(0,"ERROR","this") IF(1,"is","ERROR") IF(NULL,"ERROR","a") IF(1,2,3)|0 IF(1,2.0,3.0)+0 -this is a 2 2.0 select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between "max" and "my" and 3=3; 2 between 1 and 3 "monty" between "max" and "my" 2=2 and "monty" between "max" and "my" and 3=3 1 1 1 @@ -52,10 +49,3 @@ select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1; select 1 and 0 or 2, 2 or 1 and 0; 1 and 0 or 2 2 or 1 and 0 1 1 -drop table if exists t1; -create table t1 (num double(12,2)); -insert into t1 values (144.54); -select sum(if(num is null,0.00,num)) from t1; -sum(if(num is null,0.00,num)) -144.54 -drop table t1; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 1c5e4165885..89a857ef098 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -170,7 +170,7 @@ show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 id A 87 NULL NULL BTREE t1 1 parent_id 1 parent_id A 43 NULL NULL BTREE -t1 1 level 1 level A 8 NULL NULL BTREE +t1 1 level 1 level A 6 NULL NULL BTREE drop table t1; CREATE TABLE t1 ( gesuchnr int(11) DEFAULT '0' NOT NULL, diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index d78f8b16170..50d910564d0 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -37,6 +37,9 @@ drop table t1; show variables like "wait_timeout%"; Variable_name Value wait_timeout 28800 +show variables like "WAIT_timeout%"; +Variable_name Value +wait_timeout 28800 show variables like "this_doesn't_exists%"; Variable_name Value show table status from test like "this_doesn't_exists%"; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index e1f21f324ce..52c2c026bd3 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -44,3 +44,17 @@ c_id c_name c_country 1 Bozo USA 4 Mr. Floppy GB drop table t1; +select @@VERSION=version(); +@@VERSION=version() +1 +select last_insert_id(345); +last_insert_id(345) +345 +select @@IDENTITY,last_insert_id(); +@@IDENTITY last_insert_id() +345 345 +select @@identity; +@@IDENTITY +345 +select @@unknown_variable; +Unknown system variable 'unknown_variable' |