summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0upd.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/row/row0upd.c')
-rw-r--r--storage/xtradb/row/row0upd.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/storage/xtradb/row/row0upd.c b/storage/xtradb/row/row0upd.c
index 2c7f3056329..5e8099691c5 100644
--- a/storage/xtradb/row/row0upd.c
+++ b/storage/xtradb/row/row0upd.c
@@ -1603,7 +1603,8 @@ row_upd_sec_index_entry(
mode |= BTR_DELETE_MARK;
}
- search_result = row_search_index_entry(index, entry, mode,
+ search_result = row_search_index_entry(index, entry,
+ trx->fake_changes ? BTR_SEARCH_LEAF : mode,
&pcur, &mtr);
btr_cur = btr_pcur_get_btr_cur(&pcur);
@@ -1850,9 +1851,11 @@ row_upd_clust_rec_by_insert(
the previous invocation of this function. Mark the
off-page columns in the entry inherited. */
+ if (!(trx->fake_changes)) {
change_ownership = row_upd_clust_rec_by_insert_inherit(
NULL, NULL, entry, node->update);
ut_a(change_ownership);
+ }
/* fall through */
case UPD_NODE_INSERT_CLUSTERED:
/* A lock wait occurred in row_ins_index_entry() in
@@ -1882,7 +1885,7 @@ err_exit:
delete-marked old record, mark them disowned by the
old record and owned by the new entry. */
- if (rec_offs_any_extern(offsets)) {
+ if (rec_offs_any_extern(offsets) && !(trx->fake_changes)) {
change_ownership = row_upd_clust_rec_by_insert_inherit(
rec, offsets, entry, node->update);
@@ -2012,7 +2015,8 @@ row_upd_clust_rec(
the same transaction do not modify the record in the meantime.
Therefore we can assert that the restoration of the cursor succeeds. */
- ut_a(btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr));
+ ut_a(btr_pcur_restore_position(thr_get_trx(thr)->fake_changes ? BTR_SEARCH_LEAF : BTR_MODIFY_TREE,
+ pcur, mtr));
ut_ad(!rec_get_deleted_flag(btr_pcur_get_rec(pcur),
dict_table_is_comp(index->table)));
@@ -2022,7 +2026,8 @@ row_upd_clust_rec(
node->cmpl_info, thr, mtr);
mtr_commit(mtr);
- if (err == DB_SUCCESS && big_rec) {
+ /* skip store extern for fake_changes */
+ if (err == DB_SUCCESS && big_rec && !(thr_get_trx(thr)->fake_changes)) {
ulint offsets_[REC_OFFS_NORMAL_SIZE];
rec_t* rec;
rec_offs_init(offsets_);
@@ -2146,7 +2151,8 @@ row_upd_clust_step(
ut_a(pcur->rel_pos == BTR_PCUR_ON);
- success = btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr);
+ success = btr_pcur_restore_position(thr_get_trx(thr)->fake_changes ? BTR_SEARCH_LEAF : BTR_MODIFY_LEAF,
+ pcur, mtr);
if (!success) {
err = DB_RECORD_NOT_FOUND;
@@ -2323,6 +2329,13 @@ row_upd(
while (node->index != NULL) {
+ /* Skip corrupted index */
+ dict_table_skip_corrupt_index(node->index);
+
+ if (!node->index) {
+ break;
+ }
+
log_free_check();
err = row_upd_sec_step(node, thr);