mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.0' into bb-10.1-merge
Conflicts: .bzrignore VERSION cmake/plugin.cmake debian/dist/Debian/control debian/dist/Ubuntu/control mysql-test/r/join_outer.result mysql-test/r/join_outer_jcl6.result mysql-test/r/null.result mysql-test/r/old-mode.result mysql-test/r/union.result mysql-test/t/join_outer.test mysql-test/t/null.test mysql-test/t/old-mode.test mysql-test/t/union.test packaging/rpm-oel/mysql.spec.in scripts/mysql_config.sh sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/item_cmpfunc.h sql/lock.cc sql/sql_select.cc sql/sql_show.cc sql/sql_update.cc sql/sql_yacc.yy storage/innobase/buf/buf0flu.cc storage/innobase/fil/fil0fil.cc storage/innobase/include/srv0srv.h storage/innobase/lock/lock0lock.cc storage/tokudb/CMakeLists.txt storage/xtradb/buf/buf0flu.cc storage/xtradb/fil/fil0fil.cc storage/xtradb/include/srv0srv.h storage/xtradb/lock/lock0lock.cc support-files/mysql.spec.sh
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
UNION's were introduced by Monty and Sinisa <sinisa@mysql.com>
|
||||
*/
|
||||
|
||||
|
||||
#include <my_global.h>
|
||||
#include "sql_priv.h"
|
||||
#include "unireg.h"
|
||||
#include "sql_union.h"
|
||||
@ -433,18 +433,6 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
|
||||
can_skip_order_by= is_union_select && !(sl->braces && sl->explicit_limit);
|
||||
|
||||
/*
|
||||
Remove all references from the select_lex_units to the subqueries that
|
||||
are inside the ORDER BY clause.
|
||||
*/
|
||||
if (can_skip_order_by)
|
||||
{
|
||||
for (ORDER *ord= (ORDER *)sl->order_list.first; ord; ord= ord->next)
|
||||
{
|
||||
(*ord->item)->walk(&Item::eliminate_subselect_processor, FALSE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
saved_error= join->prepare(&sl->ref_pointer_array,
|
||||
sl->table_list.first,
|
||||
sl->with_wild,
|
||||
@ -467,6 +455,18 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
|
||||
if (saved_error || (saved_error= thd_arg->is_fatal_error))
|
||||
goto err;
|
||||
/*
|
||||
Remove all references from the select_lex_units to the subqueries that
|
||||
are inside the ORDER BY clause.
|
||||
*/
|
||||
if (can_skip_order_by)
|
||||
{
|
||||
for (ORDER *ord= (ORDER *)sl->order_list.first; ord; ord= ord->next)
|
||||
{
|
||||
(*ord->item)->walk(&Item::eliminate_subselect_processor, FALSE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Use items list of underlaid select for derived tables to preserve
|
||||
information about fields lengths and exact types
|
||||
|
Reference in New Issue
Block a user