Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d367495e
Commit
d367495e
authored
Apr 26, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Portability fixes
parent
a0b1f86f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
15 deletions
+39
-15
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+6
-3
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+1
-0
mysql-test/r/func_if.result
mysql-test/r/func_if.result
+14
-1
mysql-test/r/func_test.result
mysql-test/r/func_test.result
+0
-10
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+1
-1
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+3
-0
mysql-test/r/variables.result
mysql-test/r/variables.result
+14
-0
No files found.
myisam/ft_boolean_search.c
View file @
d367495e
...
...
@@ -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
;
...
...
mysql-test/mysql-test-run.sh
View file @
d367495e
...
...
@@ -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
...
...
mysql-test/r/func_if.result
View file @
d367495e
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;
mysql-test/r/func_test.result
View file @
d367495e
...
...
@@ -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;
mysql-test/r/innodb.result
View file @
d367495e
...
...
@@ -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,
...
...
mysql-test/r/show_check.result
View file @
d367495e
...
...
@@ -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%";
...
...
mysql-test/r/variables.result
View file @
d367495e
...
...
@@ -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'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment