summaryrefslogtreecommitdiff
path: root/storage/innobase/row/row0log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/row/row0log.cc')
-rw-r--r--storage/innobase/row/row0log.cc33
1 files changed, 15 insertions, 18 deletions
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index cb902776e26..9b5c9873604 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -1695,13 +1695,10 @@ row_log_table_apply_insert_low(
return(error);
}
- do {
- n_index++;
-
- if (!(index = dict_table_get_next_index(index))) {
- break;
- }
+ ut_ad(dict_index_is_clust(index));
+ for (n_index += index->type != DICT_CLUSTERED;
+ (index = dict_table_get_next_index(index)); n_index++) {
if (index->type & DICT_FTS) {
continue;
}
@@ -1712,12 +1709,13 @@ row_log_table_apply_insert_low(
index, offsets_heap, heap, entry,
thr_get_trx(thr)->id, thr, false);
- /* Report correct index name for duplicate key error. */
- if (error == DB_DUPLICATE_KEY) {
- thr_get_trx(thr)->error_key_num = n_index;
+ if (error != DB_SUCCESS) {
+ if (error == DB_DUPLICATE_KEY) {
+ thr_get_trx(thr)->error_key_num = n_index;
+ }
+ break;
}
-
- } while (error == DB_SUCCESS);
+ }
return(error);
}
@@ -2297,17 +2295,16 @@ func_exit_committed:
dtuple_big_rec_free(big_rec);
}
- while ((index = dict_table_get_next_index(index)) != NULL) {
- if (error != DB_SUCCESS) {
- break;
- }
-
- n_index++;
-
+ for (n_index += index->type != DICT_CLUSTERED;
+ (index = dict_table_get_next_index(index)); n_index++) {
if (index->type & DICT_FTS) {
continue;
}
+ if (error != DB_SUCCESS) {
+ break;
+ }
+
if (!row_upd_changes_ord_field_binary(
index, update, thr, old_row, NULL)) {
continue;