summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-04 19:17:42 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-13 18:12:05 +0100
commitcff144a8ea47be2db8aace52cc282f4d2e0d7aaa (patch)
tree44be7925a4d4cd5703e8ba36c95976e7610ab60c /sql/table.cc
parentdafb507e3ed09699230e3dd52fdc68c6094ee148 (diff)
downloadmariadb-git-cff144a8ea47be2db8aace52cc282f4d2e0d7aaa.tar.gz
cleanup: handler::key_read
* rename to "keyread" (to avoid conflicts with tokudb), * change from bool to uint and store the keyread index number there * provide a bool accessor to check if keyread is enabled
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 093adf339b4..33317234c85 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -4436,7 +4436,7 @@ void TABLE::init(THD *thd, TABLE_LIST *tl)
(*f_ptr)->cond_selectivity= 1.0;
}
- DBUG_ASSERT(file->key_read == 0);
+ DBUG_ASSERT(!file->keyread_enabled());
/* mark the record[0] uninitialized */
TRASH_ALLOC(record[0], s->reclength);
@@ -6075,7 +6075,7 @@ MY_BITMAP *TABLE::prepare_for_keyread(uint index, MY_BITMAP *map)
MY_BITMAP *backup= read_set;
DBUG_ENTER("TABLE::prepare_for_keyread");
if (!no_keyread)
- file->ha_start_keyread();
+ file->ha_start_keyread(index);
mark_columns_used_by_index(index, map);
column_bitmaps_set(map);
DBUG_RETURN(backup);
@@ -7310,7 +7310,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
bool handler_pushed= 0;
DBUG_ASSERT(vfield);
- if (h->key_read)
+ if (h->keyread_enabled())
DBUG_RETURN(0);
error= 0;
@@ -7364,9 +7364,8 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
case VCOL_UPDATE_INDEXED:
case VCOL_UPDATE_INDEXED_FOR_UPDATE:
/* Read indexed fields that was not updated in VCOL_UPDATE_FOR_READ */
- update= (!vcol_info->stored_in_db && (vf->flags & PART_KEY_FLAG) &&
- bitmap_is_set(vcol_set, vf->field_index) &&
- (h->key_read && vf->part_of_key.is_set(h->active_index)));
+ update= !vcol_info->stored_in_db && (vf->flags & PART_KEY_FLAG) &&
+ bitmap_is_set(vcol_set, vf->field_index);
swap_values= 1;
break;
}