1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Corrected the function compare_order_elements() to make it

platform independent.
This commit is contained in:
Igor Babaev
2017-08-19 20:59:24 -07:00
parent d7b45e01b4
commit a1e444e1cc
2 changed files with 4 additions and 3 deletions

View File

@ -405,7 +405,8 @@ int compare_order_elements(ORDER *ord1, ORDER *ord2)
Item *item2= (*ord2->item)->real_item();
DBUG_ASSERT(item1->type() == Item::FIELD_ITEM &&
item2->type() == Item::FIELD_ITEM);
int cmp= ((Item_field *) item1)->field - ((Item_field *) item2)->field;
int cmp= ((Item_field *) item1)->field->field_index -
((Item_field *) item2)->field->field_index;
if (cmp == 0)
{
if (ord1->direction == ord2->direction)