summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2011-06-21 15:50:07 +0300
committerunknown <timour@askmonty.org>2011-06-21 15:50:07 +0300
commita02682abcc53199e0110ec9f24f2063fa21bd6b5 (patch)
treee7b69db65008324eceb278eccaeff7ca09d9a064 /sql/item_subselect.h
parent0cf912c23f5c5bec885e0a35e2511b5b83327433 (diff)
downloadmariadb-git-a02682abcc53199e0110ec9f24f2063fa21bd6b5.tar.gz
MWL#89
- Added regression test with queries over the WORLD database. - Discovered and fixed several bugs in the related cost calculation functionality both in the semijoin and non-semijon subquery code. - Added DBUG printing of the cost variables used to decide between IN-EXISTS and MATERIALIZATION.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 8358cebf07d..82030bffa91 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -52,6 +52,17 @@ protected:
bool inside_first_fix_fields;
bool done_first_fix_fields;
+ Item *expr_cache;
+ /*
+ Set to TRUE if at optimization or execution time we determine that this
+ item's value is a constant. We need this member because it is not possible
+ to substitute 'this' with a constant item.
+ */
+ bool forced_const;
+#ifndef DBUG_OFF
+ /* Count the number of times this subquery predicate has been executed. */
+ uint exec_counter;
+#endif
public:
/*
Used inside Item_subselect::fix_fields() according to this scenario:
@@ -66,19 +77,13 @@ public:
substitution= NULL;
< Item_subselect::fix_fields
*/
+ /* TODO make this protected member again. */
Item *substitution;
- /* unit of subquery */
- st_select_lex_unit *unit;
- Item *expr_cache;
/* engine that perform execution of subselect (single select or union) */
+ /* TODO make this protected member again. */
subselect_engine *engine;
- /*
- Set to TRUE if at optimization or execution time we determine that this
- item's value is a constant. We need this member because it is not possible
- to substitute 'this' with a constant item.
- */
- bool forced_const;
-
+ /* unit of subquery */
+ st_select_lex_unit *unit;
/* A reference from inside subquery predicate to somewhere outside of it */
class Ref_to_outside : public Sql_alloc
{