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
3f1d0acb
Commit
3f1d0acb
authored
Dec 04, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make a clear distinction between max_word_length in *characters* and in *bytes*
parent
b83f2bd3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
18 deletions
+18
-18
include/ft_global.h
include/ft_global.h
+2
-2
myisam/ft_dump.c
myisam/ft_dump.c
+1
-1
myisam/ft_static.c
myisam/ft_static.c
+2
-2
myisam/ft_update.c
myisam/ft_update.c
+1
-1
myisam/mi_check.c
myisam/mi_check.c
+3
-3
myisam/mi_create.c
myisam/mi_create.c
+2
-2
myisam/myisamchk.c
myisam/myisamchk.c
+3
-3
myisam/sort.c
myisam/sort.c
+2
-2
sql/mysqld.cc
sql/mysqld.cc
+2
-2
No files found.
include/ft_global.h
View file @
3f1d0acb
...
...
@@ -26,8 +26,8 @@
extern
"C"
{
#endif
#define
FT_QUERY_MAXLEN 102
4
#define HA_FT_MAX
LEN 254
#define
HA_FT_MAXBYTELEN 25
4
#define HA_FT_MAX
CHARLEN (HA_FT_MAXBYTELEN/3)
typedef
struct
st_ft_info
FT_INFO
;
struct
_ft_vft
...
...
myisam/ft_dump.c
View file @
3f1d0acb
...
...
@@ -29,7 +29,7 @@ static my_bool verbose;
static
char
*
query
=
NULL
;
static
uint
lengths
[
256
];
#define MAX_LEN (HA_FT_MAXLEN+10)
#define MAX_LEN (HA_FT_MAX
BYTE
LEN+10)
#define HOW_OFTEN_TO_WRITE 10000
static
struct
my_option
my_long_options
[]
=
...
...
myisam/ft_static.c
View file @
3f1d0acb
...
...
@@ -19,7 +19,7 @@
#include "ftdefs.h"
ulong
ft_min_word_len
=
4
;
ulong
ft_max_word_len
=
HA_FT_MAXLEN
;
ulong
ft_max_word_len
=
HA_FT_MAX
CHAR
LEN
;
ulong
ft_query_expansion_limit
=
5
;
const
char
*
ft_boolean_syntax
=
"+ -><()~*:
\"\"
&|"
;
...
...
@@ -29,7 +29,7 @@ const HA_KEYSEG ft_keysegs[FT_SEGS]={
63
,
/* language (will be overwritten) */
0
,
0
,
0
,
/* null_bit, bit_start, bit_end */
HA_VAR_LENGTH
|
HA_PACK_KEY
,
/* flag */
HA_FT_MAX
LEN
,
/* length */
HA_FT_MAX
BYTELEN
,
/* length */
HA_FT_WLEN
,
/* start */
0
,
/* null_pos */
NULL
/* charset */
...
...
myisam/ft_update.c
View file @
3f1d0acb
...
...
@@ -279,7 +279,7 @@ int _mi_ft_del(MI_INFO *info, uint keynr, byte *keybuf, const byte *record,
uint
_ft_make_key
(
MI_INFO
*
info
,
uint
keynr
,
byte
*
keybuf
,
FT_WORD
*
wptr
,
my_off_t
filepos
)
{
byte
buf
[
HA_FT_MAXLEN
+
16
];
byte
buf
[
HA_FT_MAX
BYTE
LEN
+
16
];
DBUG_ENTER
(
"_ft_make_key"
);
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
...
...
myisam/mi_check.c
View file @
3f1d0acb
...
...
@@ -1979,7 +1979,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
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_MAXLEN
;
sort_param
.
key_length
+=
FT_MAX_WORD_LEN_FOR_SORT
-
HA_FT_MAX
BYTE
LEN
;
}
else
{
...
...
@@ -2375,7 +2375,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
total_key_length
+=
sort_param
[
i
].
key_length
;
if
(
sort_param
[
i
].
keyinfo
->
flag
&
HA_FULLTEXT
)
sort_param
[
i
].
key_length
+=
FT_MAX_WORD_LEN_FOR_SORT
-
ft_max_word_len
;
sort_param
[
i
].
key_length
+=
FT_MAX_WORD_LEN_FOR_SORT
-
HA_FT_MAXBYTELEN
;
}
sort_info
.
total_keys
=
i
;
sort_param
[
0
].
master
=
1
;
...
...
@@ -3913,7 +3913,7 @@ static my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows)
{
uint
key_maxlength
=
key
->
maxlength
;
if
(
key
->
flag
&
HA_FULLTEXT
)
key_maxlength
+=
FT_MAX_WORD_LEN_FOR_SORT
-
HA_FT_MAXLEN
;
key_maxlength
+=
FT_MAX_WORD_LEN_FOR_SORT
-
HA_FT_MAX
BYTE
LEN
;
return
(
key
->
flag
&
(
HA_BINARY_PACK_KEY
|
HA_VAR_LENGTH_KEY
|
HA_FULLTEXT
)
&&
((
ulonglong
)
rows
*
key_maxlength
>
(
ulonglong
)
myisam_max_temp_length
));
...
...
myisam/mi_create.c
View file @
3f1d0acb
...
...
@@ -289,9 +289,9 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
}
fulltext_keys
++
;
key_length
+=
HA_FT_MAXLEN
+
HA_FT_WLEN
;
key_length
+=
HA_FT_MAX
BYTE
LEN
+
HA_FT_WLEN
;
length
++
;
/* At least one length byte */
min_key_length_skipp
+=
HA_FT_MAXLEN
;
min_key_length_skipp
+=
HA_FT_MAX
BYTE
LEN
;
}
else
{
...
...
myisam/myisamchk.c
View file @
3f1d0acb
...
...
@@ -322,11 +322,11 @@ static struct my_option my_long_options[] =
{
"decode_bits"
,
OPT_DECODE_BITS
,
""
,
(
gptr
*
)
&
decode_bits
,
(
gptr
*
)
&
decode_bits
,
0
,
GET_UINT
,
REQUIRED_ARG
,
9L
,
4L
,
17L
,
0L
,
1L
,
0
},
{
"ft_min_word_len"
,
OPT_FT_MIN_WORD_LEN
,
""
,
(
gptr
*
)
&
ft_min_word_len
,
(
gptr
*
)
&
ft_min_word_len
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
4
,
1
,
HA_FT_MAXLEN
,
(
gptr
*
)
&
ft_min_word_len
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
4
,
1
,
HA_FT_MAX
CHAR
LEN
,
0
,
1
,
0
},
{
"ft_max_word_len"
,
OPT_FT_MAX_WORD_LEN
,
""
,
(
gptr
*
)
&
ft_max_word_len
,
(
gptr
*
)
&
ft_max_word_len
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
HA_FT_MAXLEN
,
10
,
HA_FT_MAXLEN
,
0
,
1
,
0
},
(
gptr
*
)
&
ft_max_word_len
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
HA_FT_MAX
CHAR
LEN
,
10
,
HA_FT_MAX
CHAR
LEN
,
0
,
1
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
};
...
...
myisam/sort.c
View file @
3f1d0acb
...
...
@@ -156,7 +156,7 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages,
while
((
maxbuffer
=
(
int
)
(
records
/
(
keys
-
1
)
+
1
))
!=
skr
);
if
((
sort_keys
=
(
uchar
**
)
my_malloc
(
keys
*
(
sort_length
+
sizeof
(
char
*
))
+
HA_FT_MAXLEN
,
MYF
(
0
))))
HA_FT_MAX
BYTE
LEN
,
MYF
(
0
))))
{
if
(
my_init_dynamic_array
(
&
buffpek
,
sizeof
(
BUFFPEK
),
maxbuffer
,
maxbuffer
/
2
))
...
...
@@ -365,7 +365,7 @@ pthread_handler_decl(thr_find_all_keys,arg)
}
if
((
sort_keys
=
(
uchar
**
)
my_malloc
(
keys
*
(
sort_length
+
sizeof
(
char
*
))
+
((
info
->
keyinfo
->
flag
&
HA_FULLTEXT
)
?
HA_FT_MAXLEN
:
0
),
MYF
(
0
))))
HA_FT_MAX
BYTE
LEN
:
0
),
MYF
(
0
))))
{
if
(
my_init_dynamic_array
(
&
info
->
buffpek
,
sizeof
(
BUFFPEK
),
maxbuffer
,
maxbuffer
/
2
))
...
...
sql/mysqld.cc
View file @
3f1d0acb
...
...
@@ -4223,11 +4223,11 @@ replicating a LOAD DATA INFILE command.",
{
"ft_min_word_len"
,
OPT_FT_MIN_WORD_LEN
,
"The minimum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable."
,
(
gptr
*
)
&
ft_min_word_len
,
(
gptr
*
)
&
ft_min_word_len
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
4
,
1
,
HA_FT_MAXLEN
,
0
,
1
,
0
},
REQUIRED_ARG
,
4
,
1
,
HA_FT_MAX
CHAR
LEN
,
0
,
1
,
0
},
{
"ft_max_word_len"
,
OPT_FT_MAX_WORD_LEN
,
"The maximum length of the word to be included in a FULLTEXT index. Note: FULLTEXT indexes must be rebuilt after changing this variable."
,
(
gptr
*
)
&
ft_max_word_len
,
(
gptr
*
)
&
ft_max_word_len
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
HA_FT_MAX
LEN
,
10
,
HA_FT_MAX
LEN
,
0
,
1
,
0
},
REQUIRED_ARG
,
HA_FT_MAX
CHARLEN
,
10
,
HA_FT_MAXCHAR
LEN
,
0
,
1
,
0
},
{
"ft_query_expansion_limit"
,
OPT_FT_QUERY_EXPANSION_LIMIT
,
"Number of best matches to use for query expansion"
,
(
gptr
*
)
&
ft_query_expansion_limit
,
(
gptr
*
)
&
ft_query_expansion_limit
,
0
,
GET_ULONG
,
...
...
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