mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
merge with mysql-5.1.63
This commit is contained in:
commit
0a8c9b98f6
102 changed files with 2499 additions and 319 deletions
|
|
@ -177,6 +177,7 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
|
|||
|
||||
(*ref)= substitution;
|
||||
substitution->name= name;
|
||||
substitution->name_length= name_length;
|
||||
if (have_to_be_excluded)
|
||||
engine->exclude();
|
||||
substitution= 0;
|
||||
|
|
@ -1045,7 +1046,13 @@ Item_in_subselect::single_value_transformer(JOIN *join,
|
|||
print_where(item, "rewrite with MIN/MAX", QT_ORDINARY););
|
||||
if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY)
|
||||
{
|
||||
DBUG_ASSERT(select_lex->non_agg_field_used());
|
||||
/*
|
||||
If the argument is a field, we assume that fix_fields() has
|
||||
tagged the select_lex with non_agg_field_used.
|
||||
We reverse that decision after this rewrite with MIN/MAX.
|
||||
*/
|
||||
if (item->get_arg(0)->type() == Item::FIELD_ITEM)
|
||||
DBUG_ASSERT(select_lex->non_agg_field_used());
|
||||
select_lex->set_non_agg_field_used(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue