summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-06-24 14:58:17 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-06-29 11:04:55 +0400
commit0865e3deab7be2bd49128906fe4f495460ebcbca (patch)
treeecf723a1e31cb76e86722faa3b7e401086f72373 /sql/sql_yacc.yy
parentad9b3263d3c5e4784008cc748ae1af8494da3f05 (diff)
downloadmariadb-git-0865e3deab7be2bd49128906fe4f495460ebcbca.tar.gz
MDEV-7792 - SQL Parsing Error - UNION AND ORDER BY WITH JOIN
ORDER BY against union may confuse name resolution context, causing valid SQL statements to fail. The purpose of context change was presumably intended for the duration of gathering field list for ORDER BY. However it isn't actually required (name resolution context is never accessed by the latter). See also alternative solution (in MySQL 5.7): 92145b95.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 373503ad94d..1d31df4d000 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -11336,7 +11336,6 @@ order_clause:
*/
DBUG_ASSERT(sel->master_unit()->fake_select_lex);
lex->current_select= sel->master_unit()->fake_select_lex;
- lex->push_context(&lex->current_select->context, thd->mem_root);
}
}
order_list