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:
@ -21874,7 +21874,11 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables,
|
||||
*/
|
||||
if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item())
|
||||
{ /* Order by position */
|
||||
uint count= (uint) order_item->val_int();
|
||||
uint count;
|
||||
if (order->counter_used)
|
||||
count= order->counter; // counter was once resolved
|
||||
else
|
||||
count= (uint) order_item->val_int();
|
||||
if (!count || count > fields.elements)
|
||||
{
|
||||
my_error(ER_BAD_FIELD_ERROR, MYF(0),
|
||||
|
Reference in New Issue
Block a user