1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge remote-tracking branch 'upstream/10.3' into 10.4

This commit is contained in:
Vicențiu Ciorbaru
2021-09-09 09:18:12 +03:00
170 changed files with 4133 additions and 2398 deletions

View File

@ -7684,6 +7684,17 @@ 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));
/*
Followimg 2 condition always should be true (but they was added
due to an error present only in 10.3):
1) nest_level shoud be 0 or positive;
2) nest level of all SELECTs on the same level shoud be equal first
SELECT on this level (and each other).
*/
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;