mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Portability fixes
This commit is contained in:
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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%";
|
||||
|
@ -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'
|
||||
|
Reference in New Issue
Block a user