Commit 1eb82be2 authored by unknown's avatar unknown
Browse files

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.


myisam/myisam_ftdump.c:
  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.
parent 11ba3204
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@ int main(int argc,char *argv[])

    if (count || stats)
    {
      doc_cnt++;
      if (strcmp(buf, buf2))
      {
        if (*buf2)
@@ -151,6 +150,7 @@ int main(int argc,char *argv[])
        keylen2=keylen;
        doc_cnt=0;
      }
      doc_cnt+= (subkeys >= 0 ? 1 : -subkeys);
    }
    if (dump)
    {
@@ -166,7 +166,6 @@ int main(int argc,char *argv[])

  if (count || stats)
  {
    doc_cnt++;
    if (*buf2)
    {
      uniq++;