Commit 1218a7c2 authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/dellis/mysqlab/bk/mysql-4.0

into mysql.com:/home/dellis/bkl/bug-4.1


BitKeeper/etc/logging_ok:
  auto-union
myisam/ft_nlq_search.c:
  Auto merged
parents 69a6d4da 3be01953
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ brian@private-client-ip-101.oz.net
brian@zim.(none)
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
dean@mysql.com
dellis@goetia.(none)
dlenev@brandersnatch.localdomain
dlenev@build.mysql.com
+6 −1
Original line number Diff line number Diff line
@@ -261,6 +261,10 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, byte *query,

  }

  /*
    If ndocs == 0, this will not allocate RAM for FT_INFO.doc[],
    so if ndocs == 0, FT_INFO.doc[] must not be accessed.
   */
  dlist=(FT_INFO *)my_malloc(sizeof(FT_INFO)+
			     sizeof(FT_DOC)*(aio.dtree.elements_in_tree-1),
			     MYF(0));
@@ -329,7 +333,8 @@ float ft_nlq_find_relevance(FT_INFO *handler,
    else
      a=c;
  }
  if (docs[a].dpos == docid)
  /* bounds check to avoid accessing unallocated handler->doc  */
  if (a < handler->ndocs && docs[a].dpos == docid)
    return (float) docs[a].weight;
  else
    return 0.0;