diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-24 12:29:31 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-01-24 12:29:31 +0200 |
commit | d833bb65d53b9a4375fa71cc485b4719fdb0ee53 (patch) | |
tree | d1271339e1c3a660e4788a5c9913bfe54e0271f1 /sql/key.cc | |
parent | e431d90065d277e62fa4f81a1654790f58a84146 (diff) | |
parent | 76577e1e2602f3c30859a176808c433a263e1b0a (diff) | |
download | mariadb-git-d833bb65d53b9a4375fa71cc485b4719fdb0ee53.tar.gz |
Merge remote-tracking branch '5.5' into 10.0
Diffstat (limited to 'sql/key.cc')
-rw-r--r-- | sql/key.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/key.cc b/sql/key.cc index aaaea9391c6..414c3392cff 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -65,7 +65,8 @@ int find_ref_key(KEY *key, uint key_count, uchar *record, Field *field, i < (int) key_count ; i++, key_info++) { - if (key_info->key_part[0].offset == fieldpos) + if (key_info->key_part[0].offset == fieldpos && + key_info->key_part[0].field->type() != MYSQL_TYPE_BIT) { /* Found key. Calc keylength */ *key_length= *keypart= 0; return i; /* Use this key */ @@ -84,7 +85,8 @@ int find_ref_key(KEY *key, uint key_count, uchar *record, Field *field, j < key_info->user_defined_key_parts ; j++, key_part++) { - if (key_part->offset == fieldpos) + if (key_part->offset == fieldpos && + key_part->field->type() != MYSQL_TYPE_BIT) { *keypart= j; return i; /* Use this key */ |