Skip to content

Commit

Permalink
Merge 10.2 into bb-10.2-ext
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jan 15, 2018
2 parents abbce9e + 3fdd390 commit e2e7400
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions storage/innobase/btr/btr0cur.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2015, 2017, MariaDB Corporation.
Copyright (c) 2015, 2018, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
Expand Down Expand Up @@ -3692,34 +3692,38 @@ btr_cur_update_in_place(
|| row_get_rec_trx_id(rec, index, offsets));

#ifdef BTR_CUR_HASH_ADAPT
if (block->index) {
/* TO DO: Can we skip this if none of the fields
index->search_info->curr_n_fields
are being updated? */

/* The function row_upd_changes_ord_field_binary works only
if the update vector was built for a clustered index, we must
NOT call it if index is secondary */

if (!dict_index_is_clust(index)
|| row_upd_changes_ord_field_binary(index, update, thr,
NULL, NULL)) {

/* Remove possible hash index pointer to this record */
btr_search_update_hash_on_delete(cursor);
{
rw_lock_t* ahi_latch = block->index
? btr_get_search_latch(block->index) : NULL;
if (ahi_latch) {
/* TO DO: Can we skip this if none of the fields
index->search_info->curr_n_fields
are being updated? */

/* The function row_upd_changes_ord_field_binary
does not work on a secondary index. */

if (!dict_index_is_clust(index)
|| row_upd_changes_ord_field_binary(
index, update, thr, NULL, NULL)) {

/* Remove possible hash index pointer
to this record */
btr_search_update_hash_on_delete(cursor);
}
}

btr_search_x_lock(index);
}
rw_lock_x_lock(ahi_latch);

assert_block_ahi_valid(block);
assert_block_ahi_valid(block);
#endif /* BTR_CUR_HASH_ADAPT */

row_upd_rec_in_place(rec, index, offsets, update, page_zip);
row_upd_rec_in_place(rec, index, offsets, update, page_zip);

#ifdef BTR_CUR_HASH_ADAPT
if (block->index) {
btr_search_x_unlock(index);
if (ahi_latch) {
rw_lock_x_unlock(ahi_latch);
}
}
#endif /* BTR_CUR_HASH_ADAPT */

Expand Down

0 comments on commit e2e7400

Please sign in to comment.