summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 7619353d922..dfdeb9d4a83 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -30,7 +30,7 @@
#include "sql_window.h"
#include "sql_trigger.h"
#include "sp.h" // enum stored_procedure_type
-
+#include "sql_tvc.h"
/* YACC and LEX Definitions */
@@ -881,6 +881,17 @@ public:
those converted to jtbm nests. The list is emptied when conversion is done.
*/
List<Item_in_subselect> sj_subselects;
+ /*
+ List of IN-predicates in this st_select_lex that
+ can be transformed into IN-subselect defined with TVC.
+ */
+ List<Item_func_in> in_funcs;
+ /*
+ Number of current derived table made with TVC during the
+ transformation of IN-predicate into IN-subquery for this
+ st_select_lex.
+ */
+ uint curr_tvc_name;
/*
Needed to correctly generate 'PRIMARY' or 'SIMPLE' for select_type column
@@ -1017,6 +1028,9 @@ public:
/* it is for correct printing SELECT options */
thr_lock_type lock_type;
+
+ table_value_constr *tvc;
+ bool in_tvc;
void init_query();
void init_select();
@@ -1232,7 +1246,7 @@ public:
ORDER *find_common_window_func_partition_fields(THD *thd);
bool cond_pushdown_is_allowed() const
- { return !olap && !explicit_limit; }
+ { return !olap && !explicit_limit && !tvc; }
private:
bool m_non_agg_field_used;
@@ -1256,7 +1270,12 @@ typedef class st_select_lex SELECT_LEX;
inline bool st_select_lex_unit::is_unit_op ()
{
if (!first_select()->next_select())
- return 0;
+ {
+ if (first_select()->tvc)
+ return 1;
+ else
+ return 0;
+ }
enum sub_select_type linkage= first_select()->next_select()->linkage;
return linkage == UNION_TYPE || linkage == INTERSECT_TYPE ||