diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-21 17:25:51 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-21 17:25:51 +0200 |
commit | 9d7c0882fa4aa36cd5f6a435645b14330f213fa2 (patch) | |
tree | a97160897b6d8d1375b53bbaeb7b1a788c83333c /storage/innobase/row/row0log.cc | |
parent | 1cf28964f50443518d8b665b226c1666274840e6 (diff) | |
parent | 0202e47274eac1ca3a8be98b7089b1ca3bffe8d8 (diff) | |
download | mariadb-git-9d7c0882fa4aa36cd5f6a435645b14330f213fa2.tar.gz |
Merge 10.0 into 10.1
Diffstat (limited to 'storage/innobase/row/row0log.cc')
-rw-r--r-- | storage/innobase/row/row0log.cc | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 9107ad6236c..49627a65014 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1573,13 +1573,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; } @@ -1589,12 +1586,13 @@ row_log_table_apply_insert_low( flags, BTR_MODIFY_TREE, index, offsets_heap, heap, entry, trx_id, thr); - /* 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); } @@ -2173,17 +2171,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; |