summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorgshchepa/uchum@gleb.loc <>2007-07-26 01:23:39 +0500
committergshchepa/uchum@gleb.loc <>2007-07-26 01:23:39 +0500
commit3595bbb34ce59f4cdd97d17d064d56dcb41d431b (patch)
treede7f58c009ad9c9bd3423692826de8ea954f9763 /sql/table.cc
parent07acfcf55700c9d52c264c3d25002c6485e4b29d (diff)
parent2c9eb1638be925b2976459a6d3c1deff0fb91fbe (diff)
downloadmariadb-git-3595bbb34ce59f4cdd97d17d064d56dcb41d431b.tar.gz
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 2c4d18ca4ff..a7ab27f0760 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1349,7 +1349,12 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
the primary key, then we can use any key to find this column
*/
if (ha_option & HA_PRIMARY_KEY_IN_READ_INDEX)
+ {
field->part_of_key= share->keys_in_use;
+ if (share->db_type == DB_TYPE_INNODB &&
+ field->part_of_sortkey.is_set(key))
+ field->part_of_sortkey= share->keys_in_use;
+ }
}
if (field->key_length() != key_part->length)
{