diff options
author | unknown <serg@serg.mysql.com> | 2001-11-06 16:17:31 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2001-11-06 16:17:31 +0100 |
commit | 9e29bb4e012b9f27a6716d03bb67358cbab0459f (patch) | |
tree | 88269f9b0f218945be5522352a0d0c855ac2fcc1 /mysys/queues.c | |
parent | 36a4cc178fc574dd9996c620eca609fe456d8c58 (diff) | |
download | mariadb-git-9e29bb4e012b9f27a6716d03bb67358cbab0459f.tar.gz |
ft boolean search by table scan; queue_fix()
include/queues.h:
queue_fix() introduced
myisam/ft_boolean_search.c:
ft boolean search by table scan
myisam/ft_parser.c:
ft boolean search by table scan
myisam/ft_update.c:
ft boolean search by table scan
myisam/ftdefs.h:
ft boolean search by table scan
mysql-test/r/fulltext_cache.result:
ft boolean search by table scan
mysql-test/t/fulltext_cache.test:
ft boolean search by table scan
mysys/queues.c:
queue_fix() introduced
Diffstat (limited to 'mysys/queues.c')
-rw-r--r-- | mysys/queues.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mysys/queues.c b/mysys/queues.c index 1c7a1a4a618..3deee86c23a 100644 --- a/mysys/queues.c +++ b/mysys/queues.c @@ -124,7 +124,6 @@ byte *queue_remove(register QUEUE *queue, uint idx) } } - /* Fix when element on top has been replaced */ #ifndef queue_replaced @@ -166,3 +165,19 @@ void _downheap(register QUEUE *queue, uint idx) } queue->root[idx]=element; } + + +static int queue_fix_cmp(QUEUE *queue, void *a, void *b) +{ + return queue->compare(queue->first_cmp_arg, + a+queue->offset_to_key, + b+queue->offset_to_key); +} + + /* Fix heap when every element was changed */ +void queue_fix(QUEUE *queue) +{ + qsort2(queue->root+1,queue->elements, sizeof(void *), + (qsort2_cmp)queue_fix_cmp, queue); +} + |