table.cc, sql_select.cc:

  Post-merge fix.
parent f1297540
...@@ -12313,7 +12313,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, ...@@ -12313,7 +12313,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
*/ */
if (!on_primary_key && if (!on_primary_key &&
(table->file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) && (table->file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
table->s->db_type()->db_type == DB_TYPE_INNODB && ha_legacy_type(table->s->db_type()) == DB_TYPE_INNODB &&
table->s->primary_key != MAX_KEY) table->s->primary_key != MAX_KEY)
{ {
on_primary_key= TRUE; on_primary_key= TRUE;
......
...@@ -1351,7 +1351,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, ...@@ -1351,7 +1351,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
if (ha_option & HA_PRIMARY_KEY_IN_READ_INDEX) if (ha_option & HA_PRIMARY_KEY_IN_READ_INDEX)
{ {
field->part_of_key= share->keys_in_use; field->part_of_key= share->keys_in_use;
if (share->db_type == DB_TYPE_INNODB && if (ha_legacy_type(share->db_type()) == DB_TYPE_INNODB &&
field->part_of_sortkey.is_set(key)) field->part_of_sortkey.is_set(key))
field->part_of_sortkey= share->keys_in_use; field->part_of_sortkey= share->keys_in_use;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment