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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1998dd78
Commit
1998dd78
authored
May 27, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport bug#2708 fix from 4.1
parent
c939f42f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
17 deletions
+32
-17
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+1
-1
myisam/ft_parser.c
myisam/ft_parser.c
+24
-16
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+3
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+4
-0
No files found.
myisam/ft_boolean_search.c
View file @
1998dd78
...
@@ -360,7 +360,7 @@ err:
...
@@ -360,7 +360,7 @@ err:
}
}
/* returns 1 if str0 ~= /\
<str1\>
/ */
/* returns 1 if str0 ~= /\
bstr1\b
/ */
static
int
_ftb_strstr
(
const
byte
*
s0
,
const
byte
*
e0
,
static
int
_ftb_strstr
(
const
byte
*
s0
,
const
byte
*
e0
,
const
byte
*
s1
,
const
byte
*
e1
,
const
byte
*
s1
,
const
byte
*
e1
,
CHARSET_INFO
*
cs
)
CHARSET_INFO
*
cs
)
...
...
myisam/ft_parser.c
View file @
1998dd78
...
@@ -124,27 +124,30 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param)
...
@@ -124,27 +124,30 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param)
for
(;
doc
<
end
;
doc
++
)
for
(;
doc
<
end
;
doc
++
)
{
{
if
(
true_word_char
(
*
doc
))
break
;
if
(
true_word_char
(
*
doc
))
break
;
if
(
*
doc
==
FTB_RQUOT
&&
param
->
quot
)
{
if
(
*
doc
==
FTB_RQUOT
&&
param
->
quot
)
{
param
->
quot
=
doc
;
param
->
quot
=
doc
;
*
start
=
doc
+
1
;
*
start
=
doc
+
1
;
return
3
;
/* FTB_RBR */
return
3
;
/* FTB_RBR */
}
}
if
((
*
doc
==
FTB_LBR
||
*
doc
==
FTB_RBR
||
*
doc
==
FTB_LQUOT
)
if
(
!
param
->
quot
)
&&
!
param
->
quot
)
{
/* param->prev=' '; */
*
start
=
doc
+
1
;
if
(
*
doc
==
FTB_LQUOT
)
param
->
quot
=*
start
;
return
(
*
doc
==
FTB_RBR
)
+
2
;
}
if
(
param
->
prev
==
' '
&&
!
param
->
quot
)
{
{
if
(
*
doc
==
FTB_YES
)
{
param
->
yesno
=+
1
;
continue
;
}
else
if
(
*
doc
==
FTB_LBR
||
*
doc
==
FTB_RBR
||
*
doc
==
FTB_LQUOT
)
if
(
*
doc
==
FTB_EGAL
)
{
param
->
yesno
=
0
;
continue
;
}
else
{
if
(
*
doc
==
FTB_NO
)
{
param
->
yesno
=-
1
;
continue
;
}
else
/* param->prev=' '; */
if
(
*
doc
==
FTB_INC
)
{
param
->
plusminus
++
;
continue
;
}
else
*
start
=
doc
+
1
;
if
(
*
doc
==
FTB_DEC
)
{
param
->
plusminus
--
;
continue
;
}
else
if
(
*
doc
==
FTB_LQUOT
)
param
->
quot
=*
start
;
if
(
*
doc
==
FTB_NEG
)
{
param
->
pmsign
=!
param
->
pmsign
;
continue
;
}
return
(
*
doc
==
FTB_RBR
)
+
2
;
}
if
(
param
->
prev
==
' '
)
{
if
(
*
doc
==
FTB_YES
)
{
param
->
yesno
=+
1
;
continue
;
}
else
if
(
*
doc
==
FTB_EGAL
)
{
param
->
yesno
=
0
;
continue
;
}
else
if
(
*
doc
==
FTB_NO
)
{
param
->
yesno
=-
1
;
continue
;
}
else
if
(
*
doc
==
FTB_INC
)
{
param
->
plusminus
++
;
continue
;
}
else
if
(
*
doc
==
FTB_DEC
)
{
param
->
plusminus
--
;
continue
;
}
else
if
(
*
doc
==
FTB_NEG
)
{
param
->
pmsign
=!
param
->
pmsign
;
continue
;
}
}
}
}
param
->
prev
=*
doc
;
param
->
prev
=*
doc
;
param
->
yesno
=
(
FTB_YES
==
' '
)
?
1
:
(
param
->
quot
!=
0
);
param
->
yesno
=
(
FTB_YES
==
' '
)
?
1
:
(
param
->
quot
!=
0
);
...
@@ -170,6 +173,11 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param)
...
@@ -170,6 +173,11 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param)
return
1
;
return
1
;
}
}
}
}
if
(
param
->
quot
)
{
param
->
quot
=*
start
=
doc
;
return
3
;
/* FTB_RBR */
}
return
0
;
return
0
;
}
}
...
...
mysql-test/r/fulltext.result
View file @
1998dd78
...
@@ -122,6 +122,9 @@ select * from t1 where MATCH a,b AGAINST ('+(support collections) +foobar*' IN B
...
@@ -122,6 +122,9 @@ select * from t1 where MATCH a,b AGAINST ('+(support collections) +foobar*' IN B
a b
a b
select * from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE);
select * from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE);
a b
a b
select * from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE);
a b
Full-text search in MySQL implements vector space model
select * from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE);
select * from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE);
a b
a b
Full-text search in MySQL implements vector space model
Full-text search in MySQL implements vector space model
...
...
mysql-test/t/fulltext.test
View file @
1998dd78
...
@@ -57,6 +57,10 @@ select * from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE);
...
@@ -57,6 +57,10 @@ select * from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'+(support collections) +foobar*'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'+(support collections) +foobar*'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'+(+(support collections)) +foobar*'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'+(+(support collections)) +foobar*'
IN
BOOLEAN
MODE
);
# bug#2708, bug#3870 crash
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'"space model'
IN
BOOLEAN
MODE
);
# boolean w/o index:
# boolean w/o index:
select
*
from
t1
where
MATCH
a
AGAINST
(
"search"
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
AGAINST
(
"search"
IN
BOOLEAN
MODE
);
...
...
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