summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-23 20:49:31 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-23 20:49:31 +0200
commitc93405b7153df01362f9869bac7c2e305dd06af9 (patch)
tree8043dec44994d714d28873d30d15e81ef3f040e7 /sql/key.cc
parentbe21a113da9748d06739b6522ea898257970b1c5 (diff)
parent8637931f118b53ff6fdadf6006ccdb8dedd6f732 (diff)
downloadmariadb-git-10.0-merge.tar.gz
WIP Merge 5.5 into bb-10.0-vicentiu10.0-merge
Unresolved conflicts: both modified: sql/item_cmpfunc.cc both modified: sql/item_cmpfunc.h both modified: sql/sql_partition.cc both modified: storage/tokudb/CMakeLists.txt
Diffstat (limited to 'sql/key.cc')
-rw-r--r--sql/key.cc6
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 */