Commit d2646319 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #4476 tokudb patches ported to 5.6.9-rc

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@51183 c7de825b-a66e-492c-adef-691d508d4ae1
parent cab23b42
...@@ -305,7 +305,7 @@ static bool check_all_update_expressions(List<Item> &fields, List<Item> &values, ...@@ -305,7 +305,7 @@ static bool check_all_update_expressions(List<Item> &fields, List<Item> &values,
static bool full_field_in_key(TABLE *table, Field *field) { static bool full_field_in_key(TABLE *table, Field *field) {
assert(table->s->primary_key < table->s->keys); assert(table->s->primary_key < table->s->keys);
KEY *key = &table->s->key_info[table->s->primary_key]; KEY *key = &table->s->key_info[table->s->primary_key];
for (uint i = 0; i < key->key_parts; i++) { for (uint i = 0; i < get_key_parts(key); i++) {
KEY_PART_INFO *key_part = &key->key_part[i]; KEY_PART_INFO *key_part = &key->key_part[i];
if (strcmp(field->field_name, key_part->field->field_name) == 0) { if (strcmp(field->field_name, key_part->field->field_name) == 0) {
return key_part->length == field->field_length; return key_part->length == field->field_length;
...@@ -364,7 +364,7 @@ static bool check_point_update(Item *conds, TABLE *table) { ...@@ -364,7 +364,7 @@ static bool check_point_update(Item *conds, TABLE *table) {
if (bitmap_init(&pk_fields, NULL, table->s->fields, FALSE)) // 1 -> failure if (bitmap_init(&pk_fields, NULL, table->s->fields, FALSE)) // 1 -> failure
return false; return false;
KEY *key = &table->s->key_info[table->s->primary_key]; KEY *key = &table->s->key_info[table->s->primary_key];
for (uint i = 0; i < key->key_parts; i++) for (uint i = 0; i < get_key_parts(key); i++)
bitmap_set_bit(&pk_fields, key->key_part[i].field->field_index); bitmap_set_bit(&pk_fields, key->key_part[i].field->field_index);
switch (conds->type()) { switch (conds->type()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment