Details
Description
If put such assert which shoud be true several tests in the test suite which use INTERSECT will fail:
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
|
index 2b06cf27d9b..93ed007300a 100644
|
--- a/sql/sql_base.cc
|
+++ b/sql/sql_base.cc
|
@@ -7503,6 +7503,10 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array,
|
|
thd->column_usage= column_usage;
|
DBUG_PRINT("info", ("thd->column_usage: %d", thd->column_usage));
|
+ DBUG_ASSERT(thd->lex->current_select->nest_level >= 0);
|
+ DBUG_ASSERT(thd->lex->current_select->master_unit()->first_select()
|
+ ->nest_level ==
|
+ thd->lex->current_select->nest_level);
|
if (allow_sum_func)
|
thd->lex->allow_sum_func.set_bit(thd->lex->current_select->nest_level);
|
thd->where= THD::DEFAULT_WHERE;
|