mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
table.cc, sql_select.cc:
Limit the fix for bug 28591 to InnoDB only
This commit is contained in:
@ -12033,6 +12033,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
|
|||||||
*/
|
*/
|
||||||
if (!on_primary_key &&
|
if (!on_primary_key &&
|
||||||
(table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
|
(table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
|
||||||
|
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;
|
||||||
|
@ -782,7 +782,8 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
|||||||
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 (field->part_of_sortkey.is_set(key))
|
if (share->db_type == DB_TYPE_INNODB &&
|
||||||
|
field->part_of_sortkey.is_set(key))
|
||||||
field->part_of_sortkey= share->keys_in_use;
|
field->part_of_sortkey= share->keys_in_use;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user