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
709a4a9f
Commit
709a4a9f
authored
Apr 29, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postreview fixes
parent
e35880e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+13
-16
No files found.
myisam/ft_boolean_search.c
View file @
709a4a9f
...
...
@@ -204,7 +204,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
{
int
r
;
uint
off
;
int
subkeys
;
int
subkeys
=
1
;
my_bool
can_go_down
;
MI_INFO
*
info
=
ftb
->
info
;
...
...
@@ -279,22 +279,19 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
/* matching key found */
memcpy
(
ftbw
->
word
+
ftbw
->
off
,
info
->
lastkey
,
info
->
lastkey_length
);
if
(
!
ftbw
->
off
&&
(
init_search
||
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)))
/* going down ? */
if
(
subkeys
<
0
)
{
/* going down ? */
if
(
subkeys
<
0
)
{
/*
yep, going down, to the second-level tree
TODO here: subkey-based optimization
*/
ftbw
->
off
=
off
;
ftbw
->
key_root
=
info
->
lastpos
;
ftbw
->
keyinfo
=&
info
->
s
->
ft2_keyinfo
;
r
=
_mi_search_first
(
info
,
ftbw
->
keyinfo
,
ftbw
->
key_root
);
DBUG_ASSERT
(
r
==
0
);
/* found something */
memcpy
(
ftbw
->
word
+
off
,
info
->
lastkey
,
info
->
lastkey_length
);
}
/*
yep, going down, to the second-level tree
TODO here: subkey-based optimization
*/
ftbw
->
off
=
off
;
ftbw
->
key_root
=
info
->
lastpos
;
ftbw
->
keyinfo
=&
info
->
s
->
ft2_keyinfo
;
r
=
_mi_search_first
(
info
,
ftbw
->
keyinfo
,
ftbw
->
key_root
);
DBUG_ASSERT
(
r
==
0
);
/* found something */
memcpy
(
ftbw
->
word
+
off
,
info
->
lastkey
,
info
->
lastkey_length
);
}
ftbw
->
docid
[
0
]
=
info
->
lastpos
;
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