mirror of
https://github.com/MariaDB/server.git
synced 2025-02-24 06:13:09 +01:00
[NFC] range-forify loops
This commit is contained in:
parent
7bccd2910f
commit
18af13b88b
1 changed files with 6 additions and 10 deletions
|
@ -10287,25 +10287,21 @@ commit_cache_norebuild(
|
||||||
|
|
||||||
col_set drop_list;
|
col_set drop_list;
|
||||||
col_set v_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
|
/* 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
|
other index which is not being dropped. If it so, then set the ord_part
|
||||||
of the column to 0. */
|
of the column to 0. */
|
||||||
collect_columns_from_dropped_indexes(ctx, drop_list, v_drop_list);
|
collect_columns_from_dropped_indexes(ctx, drop_list, v_drop_list);
|
||||||
|
|
||||||
for (col_it = drop_list.begin(); col_it != drop_list.end(); ++col_it) {
|
for (ulint col : drop_list) {
|
||||||
if (!check_col_exists_in_indexes(ctx->new_table,
|
if (!check_col_exists_in_indexes(ctx->new_table, col, false)) {
|
||||||
*col_it, false)) {
|
ctx->new_table->cols[col].ord_part = 0;
|
||||||
ctx->new_table->cols[*col_it].ord_part = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (col_it = v_drop_list.begin();
|
for (ulint col : v_drop_list) {
|
||||||
col_it != v_drop_list.end(); ++col_it) {
|
if (!check_col_exists_in_indexes(ctx->new_table, col, true)) {
|
||||||
if (!check_col_exists_in_indexes(ctx->new_table,
|
ctx->new_table->v_cols[col].m_col.ord_part = 0;
|
||||||
*col_it, true)) {
|
|
||||||
ctx->new_table->v_cols[*col_it].m_col.ord_part = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue