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
c250645c
Commit
c250645c
authored
May 30, 2006
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't try to "estimate" a number of words that a plugin parser can produce
parent
b214937f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
storage/myisam/mi_check.c
storage/myisam/mi_check.c
+27
-3
No files found.
storage/myisam/mi_check.c
View file @
c250645c
...
...
@@ -2180,12 +2180,36 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
{
uint
ft_max_word_len_for_sort
=
FT_MAX_WORD_LEN_FOR_SORT
*
sort_param
.
keyinfo
->
seg
->
charset
->
mbmaxlen
;
sort_info
.
max_records
=
(
ha_rows
)
(
sort_info
.
filelength
/
ft_min_word_len
+
1
);
sort_param
.
key_length
+=
ft_max_word_len_for_sort
-
HA_FT_MAXBYTELEN
;
/*
fulltext indexes may have much more entries than the
number of rows in the table. We estimate the number here.
Note, built-in parser is always nr. 0 - see ftparser_call_initializer()
*/
if
(
sort_param
.
keyinfo
->
ftparser_nr
==
0
)
{
/*
for built-in parser the number of generated index entries
cannot be larger than the size of the data file divided
by the minimal word's length
*/
sort_info
.
max_records
=
(
ha_rows
)
(
sort_info
.
filelength
/
ft_min_word_len
+
1
);
}
else
{
/*
for external plugin parser we cannot tell anything at all :(
so, we'll use all the sort memory and start from ~10 buffpeks.
(see _create_index_by_sort)
*/
sort_info
.
max_records
=
10
*
param
->
sort_buffer_length
/
sort_param
.
key_length
;
}
sort_param
.
key_read
=
sort_ft_key_read
;
sort_param
.
key_write
=
sort_ft_key_write
;
sort_param
.
key_length
+=
ft_max_word_len_for_sort
-
HA_FT_MAXBYTELEN
;
}
else
{
...
...
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