1
0
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:
bell@sanja.is.com.ua
2004-08-31 11:58:45 +03:00
parent 392c306969
commit 771c2998ed
7 changed files with 36 additions and 4 deletions

View File

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