BUG#21459 - myisam_ftdump gives bad counts for common words

This problem affects myisam_ftdump tool only.

For fulltext index positive subkeys means word weight, negative subkeys
means number of documents in level 2 fulltext index.

Fixed that document counter was not properly updated for keys having
level 2 fulltext index.

No test case for this bug.
parent 7419f502
...@@ -126,7 +126,6 @@ int main(int argc,char *argv[]) ...@@ -126,7 +126,6 @@ int main(int argc,char *argv[])
if (count || stats) if (count || stats)
{ {
doc_cnt++;
if (strcmp(buf, buf2)) if (strcmp(buf, buf2))
{ {
if (*buf2) if (*buf2)
...@@ -151,6 +150,7 @@ int main(int argc,char *argv[]) ...@@ -151,6 +150,7 @@ int main(int argc,char *argv[])
keylen2=keylen; keylen2=keylen;
doc_cnt=0; doc_cnt=0;
} }
doc_cnt+= (subkeys >= 0 ? 1 : -subkeys);
} }
if (dump) if (dump)
{ {
...@@ -166,7 +166,6 @@ int main(int argc,char *argv[]) ...@@ -166,7 +166,6 @@ int main(int argc,char *argv[])
if (count || stats) if (count || stats)
{ {
doc_cnt++;
if (*buf2) if (*buf2)
{ {
uniq++; uniq++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment