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
4f14b87d
Commit
4f14b87d
authored
Jun 24, 2008
by
Jani Tolonen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imported fix for bug#29464 from myisam table handler to maria.
parent
96e2ca52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
storage/maria/ma_ft_parser.c
storage/maria/ma_ft_parser.c
+15
-9
No files found.
storage/maria/ma_ft_parser.c
View file @
4f14b87d
...
@@ -114,7 +114,8 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
...
@@ -114,7 +114,8 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
{
{
uchar
*
doc
=*
start
;
uchar
*
doc
=*
start
;
int
ctype
;
int
ctype
;
uint
mwc
,
length
,
mbl
;
uint
mwc
,
length
;
int
mbl
;
param
->
yesno
=
(
FTB_YES
==
' '
)
?
1
:
(
param
->
quot
!=
0
);
param
->
yesno
=
(
FTB_YES
==
' '
)
?
1
:
(
param
->
quot
!=
0
);
param
->
weight_adjust
=
param
->
wasign
=
0
;
param
->
weight_adjust
=
param
->
wasign
=
0
;
...
@@ -122,7 +123,7 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
...
@@ -122,7 +123,7 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
while
(
doc
<
end
)
while
(
doc
<
end
)
{
{
for
(;
doc
<
end
;
doc
+=
(
mbl
>
0
?
mbl
:
1
))
for
(;
doc
<
end
;
doc
+=
(
mbl
>
0
?
mbl
:
(
mbl
<
0
?
-
mbl
:
1
)
))
{
{
mbl
=
cs
->
cset
->
ctype
(
cs
,
&
ctype
,
(
uchar
*
)
doc
,
(
uchar
*
)
end
);
mbl
=
cs
->
cset
->
ctype
(
cs
,
&
ctype
,
(
uchar
*
)
doc
,
(
uchar
*
)
end
);
if
(
true_word_char
(
ctype
,
*
doc
))
if
(
true_word_char
(
ctype
,
*
doc
))
...
@@ -140,7 +141,8 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
...
@@ -140,7 +141,8 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
{
{
/* param->prev=' '; */
/* param->prev=' '; */
*
start
=
doc
+
1
;
*
start
=
doc
+
1
;
if
(
*
doc
==
FTB_LQUOT
)
param
->
quot
=
(
char
*
)
*
start
;
if
(
*
doc
==
FTB_LQUOT
)
param
->
quot
=
(
char
*
)
*
start
;
param
->
type
=
(
*
doc
==
FTB_RBR
?
FT_TOKEN_RIGHT_PAREN
:
FT_TOKEN_LEFT_PAREN
);
param
->
type
=
(
*
doc
==
FTB_RBR
?
FT_TOKEN_RIGHT_PAREN
:
FT_TOKEN_LEFT_PAREN
);
goto
ret
;
goto
ret
;
}
}
...
@@ -160,7 +162,8 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
...
@@ -160,7 +162,8 @@ uchar maria_ft_get_word(CHARSET_INFO *cs, uchar **start, uchar *end,
}
}
mwc
=
length
=
0
;
mwc
=
length
=
0
;
for
(
word
->
pos
=
doc
;
doc
<
end
;
length
++
,
doc
+=
(
mbl
>
0
?
mbl
:
1
))
for
(
word
->
pos
=
doc
;
doc
<
end
;
length
++
,
doc
+=
(
mbl
>
0
?
mbl
:
(
mbl
<
0
?
-
mbl
:
1
)))
{
{
mbl
=
cs
->
cset
->
ctype
(
cs
,
&
ctype
,
(
uchar
*
)
doc
,
(
uchar
*
)
end
);
mbl
=
cs
->
cset
->
ctype
(
cs
,
&
ctype
,
(
uchar
*
)
doc
,
(
uchar
*
)
end
);
if
(
true_word_char
(
ctype
,
*
doc
))
if
(
true_word_char
(
ctype
,
*
doc
))
...
@@ -205,13 +208,13 @@ uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start,
...
@@ -205,13 +208,13 @@ uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start,
my_bool
skip_stopwords
)
my_bool
skip_stopwords
)
{
{
uchar
*
doc
=
*
start
;
uchar
*
doc
=
*
start
;
uint
mwc
,
length
,
mbl
;
uint
mwc
,
length
;
int
ctype
;
int
ctype
,
mbl
;
DBUG_ENTER
(
"maria_ft_simple_get_word"
);
DBUG_ENTER
(
"maria_ft_simple_get_word"
);
do
do
{
{
for
(;;
doc
+=
(
mbl
>
0
?
mbl
:
1
))
for
(;;
doc
+=
(
mbl
>
0
?
mbl
:
(
mbl
<
0
?
-
mbl
:
1
)
))
{
{
if
(
doc
>=
end
)
if
(
doc
>=
end
)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
@@ -221,7 +224,8 @@ uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start,
...
@@ -221,7 +224,8 @@ uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start,
}
}
mwc
=
length
=
0
;
mwc
=
length
=
0
;
for
(
word
->
pos
=
doc
;
doc
<
end
;
length
++
,
doc
+=
(
mbl
>
0
?
mbl
:
1
))
for
(
word
->
pos
=
doc
;
doc
<
end
;
length
++
,
doc
+=
(
mbl
>
0
?
mbl
:
(
mbl
<
0
?
-
mbl
:
1
)))
{
{
mbl
=
cs
->
cset
->
ctype
(
cs
,
&
ctype
,
doc
,
end
);
mbl
=
cs
->
cset
->
ctype
(
cs
,
&
ctype
,
doc
,
end
);
if
(
true_word_char
(
ctype
,
*
doc
))
if
(
true_word_char
(
ctype
,
*
doc
))
...
@@ -393,7 +397,9 @@ MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info,
...
@@ -393,7 +397,9 @@ MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info,
mysql_add_word == 0 - parser is not initialized
mysql_add_word == 0 - parser is not initialized
mysql_add_word != 0 - parser is initialized, or no
mysql_add_word != 0 - parser is initialized, or no
initialization needed. */
initialization needed. */
info
->
ftparser_param
[
ftparser_nr
].
mysql_add_word
=
(
void
*
)
1
;
info
->
ftparser_param
[
ftparser_nr
].
mysql_add_word
=
(
int
(
*
)(
struct
st_mysql_ftparser_param
*
,
char
*
,
int
,
MYSQL_FTPARSER_BOOLEAN_INFO
*
))
1
;
if
(
parser
->
init
&&
parser
->
init
(
&
info
->
ftparser_param
[
ftparser_nr
]))
if
(
parser
->
init
&&
parser
->
init
(
&
info
->
ftparser_param
[
ftparser_nr
]))
return
0
;
return
0
;
}
}
...
...
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