summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-02-08 19:06:25 +0400
committerAlexander Barkov <bar@mariadb.org>2018-02-08 19:06:25 +0400
commit3cad31f2a758f797ef0acac5625d0e007ecbce93 (patch)
tree73c054636c4858b2a51eddf7eaa653746d67524e /sql/key.cc
parent560b9895d413bdfedda0a0ca871a635858990c05 (diff)
parent5c057b3fef3aa92cfadbd63043799b430132a494 (diff)
downloadmariadb-git-3cad31f2a758f797ef0acac5625d0e007ecbce93.tar.gz
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
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 14d29e8b125..6369faff9d0 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -63,7 +63,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 */
@@ -82,7 +83,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 */