summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2006-10-31 17:31:56 -0800
committerigor@rurik.mysql.com <>2006-10-31 17:31:56 -0800
commit2a7acba7e10197ec4a651ae828ff51c0a2ff4747 (patch)
treeb8cf0e80a37eba77a6cccf9e41a8871266533675 /sql/item_subselect.h
parent17eb0b353e5a112e1d0005b71190c1e3278e0583 (diff)
downloadmariadb-git-2a7acba7e10197ec4a651ae828ff51c0a2ff4747.tar.gz
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation of which requires filesort. Allocation of memory for the sort buffer at each evaluation of a subquery may take a significant amount of time if the buffer is rather big. With the fix we allocate the buffer at the first evaluation of the subquery and reuse it at each subsequent evaluation.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 45df4f3880d..1a8111069e6 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -114,6 +114,7 @@ public:
single select and union subqueries only.
*/
bool is_evaluated() const;
+ bool is_uncacheable() const;
/*
Used by max/min subquery to initialize value presence registration
@@ -428,3 +429,9 @@ inline bool Item_subselect::is_evaluated() const
return engine->is_executed();
}
+inline bool Item_subselect::is_uncacheable() const
+{
+ return engine->uncacheable();
+}
+
+