1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge branch '10.0' into 10.1

This commit is contained in:
Sergei Golubchik
2017-08-08 10:18:43 +02:00
313 changed files with 36802 additions and 2097 deletions

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2010, 2014, SkySQL Ab.
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
Copyright (c) 2010, 2017, Corporation
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -484,6 +484,19 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
Item *item_tmp;
while ((item_tmp= it++))
{
/*
If the outer query has a GROUP BY clause, an outer reference to this
query block may have been wrapped in a Item_outer_ref, which has not
been fixed yet. An Item_type_holder must be created based on a fixed
Item, so use the inner Item instead.
*/
DBUG_ASSERT(item_tmp->fixed ||
(item_tmp->type() == Item::REF_ITEM &&
((Item_ref *)(item_tmp))->ref_type() ==
Item_ref::OUTER_REF));
if (!item_tmp->fixed)
item_tmp= item_tmp->real_item();
/* Error's in 'new' will be detected after loop */
types.push_back(new (thd_arg->mem_root)
Item_type_holder(thd_arg, item_tmp));
@ -1240,4 +1253,3 @@ void st_select_lex_unit::set_unique_exclude()
}
}
}