mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
ORDER clause printing fixed (BUG#5156)
This commit is contained in:
@ -1470,7 +1470,14 @@ void st_select_lex::print_order(String *str, ORDER *order)
|
||||
{
|
||||
for (; order; order= order->next)
|
||||
{
|
||||
(*order->item)->print(str);
|
||||
if (order->counter_used)
|
||||
{
|
||||
char buffer[20];
|
||||
my_snprintf(buffer, 20, "%u", order->counter);
|
||||
str->append(buffer);
|
||||
}
|
||||
else
|
||||
(*order->item)->print(str);
|
||||
if (!order->asc)
|
||||
str->append(" desc", 5);
|
||||
if (order->next)
|
||||
|
Reference in New Issue
Block a user