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

Fix bug #14816 test_if_order_by_key() expected only Item_fields.

test_if_order_by_key() expected only Item_fields to be in order->item, thus
failing to find available index on view's field, which results in reported
error.

Now test_if_order_by_key() calls order->item->real_item() to get field for
choosing index.


sql/sql_select.cc:
  Fix bug #14816 test_if_order_by_key() expected only Item_fields.
  Make test_if_order_by_key() use real_item() to get field.
mysql-test/r/view.result:
  Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
mysql-test/t/view.test:
  Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
This commit is contained in:
unknown
2005-11-14 22:10:34 +03:00
parent bfef85a188
commit 0a9badeca4
3 changed files with 19 additions and 1 deletions

View File

@ -10988,7 +10988,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
for (; order ; order=order->next, const_key_parts>>=1)
{
Field *field=((Item_field*) (*order->item))->field;
Field *field=((Item_field*) (*order->item)->real_item())->field;
int flag;
/*