Loading include/global.h +1 −0 Original line number Diff line number Diff line Loading @@ -349,6 +349,7 @@ typedef int pshort; /* Mixed prototypes can't take short int */ typedef double pfloat; /* Mixed prototypes can't take float */ #endif typedef int (*qsort_cmp)(const void *,const void *); typedef int (*qsort_cmp2)(void*, const void *,const void *); #ifdef HAVE_mit_thread #define qsort_t void #undef QSORT_TYPE_IS_VOID Loading include/my_tree.h +3 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ typedef struct st_tree { TREE_ELEMENT *root,null_element; TREE_ELEMENT **parents[MAX_TREE_HIGHT]; uint offset_to_key,elements_in_tree,size_of_element; qsort_cmp compare; qsort_cmp2 compare; void* cmp_arg; MEM_ROOT mem_root; my_bool with_delete; void (*free)(void *); Loading @@ -58,7 +59,7 @@ typedef struct st_tree { /* Functions on hole tree */ void init_tree(TREE *tree,uint default_alloc_size, int element_size, qsort_cmp compare, my_bool with_delete, qsort_cmp2 compare, my_bool with_delete, void (*free_element)(void*)); void delete_tree(TREE*); #define is_tree_inited(tree) ((tree)->root != 0) Loading myisam/ft_boolean_search.c +2 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,8 @@ typedef struct st_ft_superdoc { ALL_IN_ONE *aio; } FT_SUPERDOC; static int FT_SUPERDOC_cmp(FT_SUPERDOC *p1, FT_SUPERDOC *p2) static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)), FT_SUPERDOC *p1, FT_SUPERDOC *p2) { if (p1->doc.dpos < p2->doc.dpos) return -1; Loading myisam/ft_nlq_search.c +3 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ typedef struct st_ft_superdoc { double tmp_weight; } FT_SUPERDOC; static int FT_SUPERDOC_cmp(FT_SUPERDOC *p1, FT_SUPERDOC *p2) static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)), FT_SUPERDOC *p1, FT_SUPERDOC *p2) { if (p1->doc.dpos < p2->doc.dpos) return -1; Loading Loading @@ -162,7 +163,7 @@ FT_DOCLIST *ft_nlq_search(MI_INFO *info, uint keynr, byte *query, bzero(&allocated_wtree,sizeof(allocated_wtree)); init_tree(&aio.dtree,0,sizeof(FT_SUPERDOC),(qsort_cmp)&FT_SUPERDOC_cmp,0, init_tree(&aio.dtree,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp,0, NULL); if(!(wtree=ft_parse(&allocated_wtree,query,query_len))) Loading myisam/ft_parser.c +3 −2 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ typedef struct st_ft_docstat { byte *keybuf; } FT_DOCSTAT; static int FT_WORD_cmp(FT_WORD *w1, FT_WORD *w2) static int FT_WORD_cmp(void* cmp_arg __attribute__((unused)), FT_WORD *w1, FT_WORD *w2) { return _mi_compare_text(default_charset_info, (uchar*) w1->pos,w1->len, Loading Loading @@ -225,7 +226,7 @@ TREE * ft_parse(TREE *wtree, byte *doc, int doclen) if (!is_tree_inited(wtree)) { init_tree(wtree,0,sizeof(FT_WORD),(qsort_cmp)&FT_WORD_cmp,0,NULL); init_tree(wtree,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0,NULL); } while (ft_simple_get_word(&doc,end,&w)) Loading Loading
include/global.h +1 −0 Original line number Diff line number Diff line Loading @@ -349,6 +349,7 @@ typedef int pshort; /* Mixed prototypes can't take short int */ typedef double pfloat; /* Mixed prototypes can't take float */ #endif typedef int (*qsort_cmp)(const void *,const void *); typedef int (*qsort_cmp2)(void*, const void *,const void *); #ifdef HAVE_mit_thread #define qsort_t void #undef QSORT_TYPE_IS_VOID Loading
include/my_tree.h +3 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ typedef struct st_tree { TREE_ELEMENT *root,null_element; TREE_ELEMENT **parents[MAX_TREE_HIGHT]; uint offset_to_key,elements_in_tree,size_of_element; qsort_cmp compare; qsort_cmp2 compare; void* cmp_arg; MEM_ROOT mem_root; my_bool with_delete; void (*free)(void *); Loading @@ -58,7 +59,7 @@ typedef struct st_tree { /* Functions on hole tree */ void init_tree(TREE *tree,uint default_alloc_size, int element_size, qsort_cmp compare, my_bool with_delete, qsort_cmp2 compare, my_bool with_delete, void (*free_element)(void*)); void delete_tree(TREE*); #define is_tree_inited(tree) ((tree)->root != 0) Loading
myisam/ft_boolean_search.c +2 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,8 @@ typedef struct st_ft_superdoc { ALL_IN_ONE *aio; } FT_SUPERDOC; static int FT_SUPERDOC_cmp(FT_SUPERDOC *p1, FT_SUPERDOC *p2) static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)), FT_SUPERDOC *p1, FT_SUPERDOC *p2) { if (p1->doc.dpos < p2->doc.dpos) return -1; Loading
myisam/ft_nlq_search.c +3 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ typedef struct st_ft_superdoc { double tmp_weight; } FT_SUPERDOC; static int FT_SUPERDOC_cmp(FT_SUPERDOC *p1, FT_SUPERDOC *p2) static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)), FT_SUPERDOC *p1, FT_SUPERDOC *p2) { if (p1->doc.dpos < p2->doc.dpos) return -1; Loading Loading @@ -162,7 +163,7 @@ FT_DOCLIST *ft_nlq_search(MI_INFO *info, uint keynr, byte *query, bzero(&allocated_wtree,sizeof(allocated_wtree)); init_tree(&aio.dtree,0,sizeof(FT_SUPERDOC),(qsort_cmp)&FT_SUPERDOC_cmp,0, init_tree(&aio.dtree,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp,0, NULL); if(!(wtree=ft_parse(&allocated_wtree,query,query_len))) Loading
myisam/ft_parser.c +3 −2 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ typedef struct st_ft_docstat { byte *keybuf; } FT_DOCSTAT; static int FT_WORD_cmp(FT_WORD *w1, FT_WORD *w2) static int FT_WORD_cmp(void* cmp_arg __attribute__((unused)), FT_WORD *w1, FT_WORD *w2) { return _mi_compare_text(default_charset_info, (uchar*) w1->pos,w1->len, Loading Loading @@ -225,7 +226,7 @@ TREE * ft_parse(TREE *wtree, byte *doc, int doclen) if (!is_tree_inited(wtree)) { init_tree(wtree,0,sizeof(FT_WORD),(qsort_cmp)&FT_WORD_cmp,0,NULL); init_tree(wtree,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0,NULL); } while (ft_simple_get_word(&doc,end,&w)) Loading