diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-03-16 19:49:17 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-03-18 19:22:13 +0100 |
commit | 4fdac6c07e1b896cbf6060d61b47669a48a1ebc9 (patch) | |
tree | 7026f13b8872fed211e43f9767937eba868ff836 /sql/sql_union.cc | |
parent | b25373beb52af6de43a70a0883918a0d2fd60c53 (diff) | |
download | mariadb-git-4fdac6c07e1b896cbf6060d61b47669a48a1ebc9.tar.gz |
MDEV-9701: CREATE VIEW with GROUP BY or ORDER BY and constant produces invalid definition
Fixed printing integer constant in the ORDER clause (MySQL solution)
Removed workaround for double resolving counter in the ORDER.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index c8350838ee8..8145cec5f25 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -1161,11 +1161,22 @@ List<Item> *st_select_lex_unit::get_unit_column_types() return &sl->item_list; } + +static void cleanup_order(ORDER *order) +{ + for (; order; order= order->next) + order->counter_used= 0; +} + + bool st_select_lex::cleanup() { bool error= FALSE; DBUG_ENTER("st_select_lex::cleanup()"); + cleanup_order(order_list.first); + cleanup_order(group_list.first); + if (join) { DBUG_ASSERT((st_select_lex*)join->select_lex == this); |