summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-03-17 10:24:50 +0400
committerunknown <ramil@mysql.com>2005-03-17 10:24:50 +0400
commit7ceb5c6cef7c1b9bebe3869e9836035fbb177601 (patch)
tree5c075b6f58481b058b5a1b404a70cfd16466776e /sql/key.cc
parentc8e834e995712cf695ce6bef5362be54f77ad774 (diff)
downloadmariadb-git-7ceb5c6cef7c1b9bebe3869e9836035fbb177601.tar.gz
A fix (bug #8942: SUBSTRING_INDEX in UPDATE causes internal loop).
sql/key.cc: A fix (bug #8942: SUBSTRING_INDEX in UPDATE causes internal loop). For "partial" key parts (e.g. key(a(20), ...) we create different key_part->field, see sql/table.cc; so we have to use the eq() function here to compare fields.
Diffstat (limited to 'sql/key.cc')
-rw-r--r--sql/key.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/key.cc b/sql/key.cc
index 0a5937fc881..52eb108a5df 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -265,7 +265,7 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields)
f.rewind();
while ((field=(Item_field*) f++))
{
- if (key_part->field == field->field)
+ if (key_part->field->eq(field->field))
return 1;
}
}