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
83d20ca3
Commit
83d20ca3
authored
Feb 23, 2016
by
Arun Kuruvila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No commit message
No commit message
parent
b3e9211e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
storage/myisam/ft_boolean_search.c
storage/myisam/ft_boolean_search.c
+6
-3
No files found.
storage/myisam/ft_boolean_search.c
View file @
83d20ca3
/* Copyright (c) 2001, 201
1
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2001, 201
6
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -199,7 +199,8 @@ static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param,
ftbw
=
(
FTB_WORD
*
)
alloc_root
(
&
ftb_param
->
ftb
->
mem_root
,
sizeof
(
FTB_WORD
)
+
(
info
->
trunc
?
MI_MAX_KEY_BUFF
:
word_len
*
ftb_param
->
ftb
->
charset
->
mbmaxlen
+
(
word_len
+
1
)
*
ftb_param
->
ftb
->
charset
->
mbmaxlen
+
HA_FT_WLEN
+
ftb_param
->
ftb
->
info
->
s
->
rec_reflength
));
ftbw
->
len
=
word_len
+
1
;
...
...
@@ -362,6 +363,8 @@ static int _ft2_search_no_lock(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
MI_INFO
*
info
=
ftb
->
info
;
uint
UNINIT_VAR
(
off
),
extra
=
HA_FT_WLEN
+
info
->
s
->
rec_reflength
;
uchar
*
lastkey_buf
=
ftbw
->
word
+
ftbw
->
off
;
uint
max_word_length
=
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)
?
MI_MAX_KEY_BUFF
:
((
ftbw
->
len
)
*
ftb
->
charset
->
mbmaxlen
)
+
extra
;
if
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)
lastkey_buf
+=
ftbw
->
len
;
...
...
@@ -421,7 +424,7 @@ static int _ft2_search_no_lock(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
(
my_bool
)
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
),
0
);
}
if
(
r
)
/* not found */
if
(
r
||
info
->
lastkey_length
>
max_word_length
)
/* not found */
{
if
(
!
ftbw
->
off
||
!
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
))
{
...
...
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