Commit d367495e authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Portability fixes

parent a0b1f86f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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
+14 −1
Original line number Diff line number Diff line
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;
+0 −10
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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,
Loading