1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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.
This commit is contained in:
Oleksandr Byelkin
2016-03-16 19:49:17 +01:00
parent b25373beb5
commit 4fdac6c07e
5 changed files with 66 additions and 23 deletions

View File

@ -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);