summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2008-12-08 12:23:33 +0200
committerGeorgi Kodinov <kgeorge@mysql.com>2008-12-08 12:23:33 +0200
commita10c3ff2b0261e3440e1b3eaa7b33cb75a08eb5b (patch)
tree15fc0cebf18c6fe0820f0a90c463da4b4a01e739 /sql/table.cc
parent8ee27056778d5b4b1de32fb0ee83b4a04e998ea2 (diff)
parentab4d8812f46374061d314b35f1358525b279de4d (diff)
downloadmariadb-git-a10c3ff2b0261e3440e1b3eaa7b33cb75a08eb5b.tar.gz
merged bug 37742 to 5.1-bugteam
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 89714e4e47e..1de47a48513 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1416,7 +1416,9 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
*/
if (ha_option & HA_PRIMARY_KEY_IN_READ_INDEX)
{
- field->part_of_key= share->keys_in_use;
+ if (field->key_length() == key_part->length &&
+ !(field->flags & BLOB_FLAG))
+ field->part_of_key= share->keys_in_use;
if (field->part_of_sortkey.is_set(key))
field->part_of_sortkey= share->keys_in_use;
}