summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-07-23 06:26:57 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-07-23 06:26:57 +0300
commitc38fa3f3acb380c5c18c982b7cdc0370b2328c76 (patch)
tree7c4ccf62fc818a1f03a1625c6a9b5aa7a3aeafcd /sql
parent240bb90ef1ed1bcde9a3420fe790a17bd4d45ee7 (diff)
downloadmariadb-git-c38fa3f3acb380c5c18c982b7cdc0370b2328c76.tar.gz
table.cc, sql_select.cc:
Limit the fix for bug 28591 to InnoDB only sql/sql_select.cc: Limit the fix for bug 28591 to InnoDB only sql/table.cc: Limit the fix for bug 28591 to InnoDB only
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc1
-rw-r--r--sql/table.cc3
2 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index d82a0fdcf41..2d9d261bb31 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -12033,6 +12033,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
*/
if (!on_primary_key &&
(table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
+ table->s->db_type == DB_TYPE_INNODB &&
table->s->primary_key != MAX_KEY)
{
on_primary_key= TRUE;
diff --git a/sql/table.cc b/sql/table.cc
index b231033d4f2..7b826bcdf2d 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -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)
{
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;
}
}