mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
System Versioning pre1.0
Merge branch '10.3' into trunk
This commit is contained in:
@ -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 */
|
||||
|
||||
@ -756,7 +756,7 @@ public:
|
||||
{
|
||||
return reinterpret_cast<st_select_lex*>(slave);
|
||||
}
|
||||
void set_with_clause(With_clause *with_cl);
|
||||
inline void set_with_clause(With_clause *with_cl);
|
||||
st_select_lex_unit* next_unit()
|
||||
{
|
||||
return reinterpret_cast<st_select_lex_unit*>(next);
|
||||
@ -882,6 +882,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
|
||||
@ -1018,6 +1029,9 @@ public:
|
||||
|
||||
/* it is for correct printing SELECT options */
|
||||
thr_lock_type lock_type;
|
||||
|
||||
table_value_constr *tvc;
|
||||
bool in_tvc;
|
||||
|
||||
/* System Versioning */
|
||||
vers_select_conds_t vers_export_outer;
|
||||
@ -1201,7 +1215,7 @@ public:
|
||||
|
||||
void set_non_agg_field_used(bool val) { m_non_agg_field_used= val; }
|
||||
void set_agg_func_used(bool val) { m_agg_func_used= val; }
|
||||
void set_with_clause(With_clause *with_clause);
|
||||
inline void set_with_clause(With_clause *with_clause);
|
||||
With_clause *get_with_clause()
|
||||
{
|
||||
return master_unit()->with_clause;
|
||||
@ -1239,7 +1253,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;
|
||||
@ -1263,7 +1277,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 ||
|
||||
|
Reference in New Issue
Block a user