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
0279cd50
Commit
0279cd50
authored
Mar 09, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
myisam/myisam_ftdump.c
recalculate stats/gws for the last word in the index too remove unused code
parent
eb0fc8ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
99 deletions
+89
-99
myisam/myisam_ftdump.c
myisam/myisam_ftdump.c
+89
-99
No files found.
myisam/myisam_ftdump.c
View file @
0279cd50
...
...
@@ -44,10 +44,6 @@ static struct my_option my_long_options[] =
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"length"
,
'l'
,
"Report length distribution."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#ifdef DISABLED
{
"execute"
,
'e'
,
"Execute given query."
,
(
gptr
*
)
&
query
,
(
gptr
*
)
&
query
,
0
,
GET_STR_ALLOC
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"help"
,
'h'
,
"Display help and exit."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"help"
,
'?'
,
"Synonym for -h."
,
...
...
@@ -108,31 +104,6 @@ int main(int argc,char *argv[])
mi_lock_database
(
info
,
F_EXTRA_LCK
);
if
(
query
)
{
#if 0
FT_DOCLIST *result;
int i;
ft_init_stopwords(ft_precompiled_stopwords);
result=ft_nlq_init_search(info,inx,query,strlen(query),1);
if(!result)
goto err;
if (verbose)
printf("%d rows matched\n",result->ndocs);
for(i=0 ; i<result->ndocs ; i++)
printf("%9lx %20.7f\n",(ulong)result->doc[i].dpos,result->doc[i].weight);
ft_nlq_close_search(result);
#else
printf
(
"-e option is disabled
\n
"
);
#endif
}
else
{
info
->
lastpos
=
HA_OFFSET_ERROR
;
info
->
update
|=
HA_STATE_PREV_FOUND
;
...
...
@@ -193,6 +164,29 @@ int main(int argc,char *argv[])
}
mi_lock_database
(
info
,
F_UNLCK
);
if
(
count
||
stats
)
{
doc_cnt
++
;
if
(
*
buf2
)
{
uniq
++
;
avg_gws
+=
gws
=
GWS_IN_USE
;
if
(
count
)
printf
(
"%9u %20.7f %s
\n
"
,
doc_cnt
,
gws
,
buf2
);
if
(
maxlen
<
keylen2
)
{
maxlen
=
keylen2
;
strmov
(
buf_maxlen
,
buf2
);
}
if
(
max_doc_cnt
<
doc_cnt
)
{
max_doc_cnt
=
doc_cnt
;
strmov
(
buf_min_gws
,
buf2
);
min_gws
=
gws
;
}
}
}
if
(
stats
)
{
count
=
0
;
...
...
@@ -222,7 +216,6 @@ int main(int argc,char *argv[])
100
.
0
*
count
/
total
);
}
}
}
err:
if
(
error
&&
error
!=
HA_ERR_END_OF_FILE
)
...
...
@@ -254,9 +247,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
lstats
=
1
;
complain
(
query
!=
0
);
break
;
case
'e'
:
complain
(
dump
||
count
||
stats
);
break
;
case
'?'
:
case
'h'
:
usage
();
...
...
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