[NFC] range-forify loops

This commit is contained in:
Eugene Kosov 2019-09-03 16:31:10 +03:00
parent 7bccd2910f
commit 18af13b88b

View file

@ -10287,25 +10287,21 @@ commit_cache_norebuild(
col_set drop_list;
col_set v_drop_list;
col_set::const_iterator col_it;
/* Check if the column, part of an index to be dropped is part of any
other index which is not being dropped. If it so, then set the ord_part
of the column to 0. */
collect_columns_from_dropped_indexes(ctx, drop_list, v_drop_list);
for (col_it = drop_list.begin(); col_it != drop_list.end(); ++col_it) {
if (!check_col_exists_in_indexes(ctx->new_table,
*col_it, false)) {
ctx->new_table->cols[*col_it].ord_part = 0;
for (ulint col : drop_list) {
if (!check_col_exists_in_indexes(ctx->new_table, col, false)) {
ctx->new_table->cols[col].ord_part = 0;
}
}
for (col_it = v_drop_list.begin();
col_it != v_drop_list.end(); ++col_it) {
if (!check_col_exists_in_indexes(ctx->new_table,
*col_it, true)) {
ctx->new_table->v_cols[*col_it].m_col.ord_part = 0;
for (ulint col : v_drop_list) {
if (!check_col_exists_in_indexes(ctx->new_table, col, true)) {
ctx->new_table->v_cols[col].m_col.ord_part = 0;
}
}