summaryrefslogtreecommitdiff
path: root/include/queues.h
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-11-21 11:51:19 +0300
committerunknown <sergefp@mysql.com>2004-11-21 11:51:19 +0300
commitfebda72f628cbd3c9ca638f0022ef1c765d41c2c (patch)
tree4405a89b7616b6761af8778b22aaa0801ee5bcad /include/queues.h
parent6763a1da76a07c3962492acae491c341714f8b82 (diff)
downloadmariadb-git-febda72f628cbd3c9ca638f0022ef1c765d41c2c.tar.gz
Fix for BUG#4177:
* Make index merge quick selects code allow perform several scans. * Delay additional handler objects creation till row retrieval is started. include/queues.h: Added trivial queue_remove_all macro mysql-test/r/index_merge.result: Testcase for BUG#4177 mysql-test/t/index_merge.test: Testcase for BUG#4177 sql/opt_range.cc: Fix for BUG#4177: * For any quick select, row retrieval can be performed several times. Now all index_merge quick selects code handles such cases properly. * In QUICK_INDEX_MERGE_SELECT we use one handler object for all merged scans, and it was possible that in destructor several cleanup functions were called * Additionally - Removed redundant QUICK_INDEX_MERGE_SELECT members. - Now QUICK_ROR_*_SELECTs create additional handler objects only when row retrieval is started So if join optimizer chooses other access method, we don't create/delete handlers.
Diffstat (limited to 'include/queues.h')
-rw-r--r--include/queues.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/queues.h b/include/queues.h
index ac15b09719b..02ab768198e 100644
--- a/include/queues.h
+++ b/include/queues.h
@@ -53,6 +53,7 @@ int resize_queue(QUEUE *queue, uint max_elements);
void delete_queue(QUEUE *queue);
void queue_insert(QUEUE *queue,byte *element);
byte *queue_remove(QUEUE *queue,uint idx);
+#define queue_remove_all(queue) { (queue)->elements= 0; }
void _downheap(QUEUE *queue,uint idx);
void queue_fix(QUEUE *queue);
#define is_queue_inited(queue) ((queue)->root != 0)