Skip to content

Commit 7955e19

Browse files
committed
Cleanup: Remove a constant template parameter
dict_table_t::init_instant(): Remove bool replace_dropped=true. The template parameter was unnecessarily added in commit a044e32.
1 parent a8bf39c commit 7955e19

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

storage/innobase/handler/handler0alter.cc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,7 @@ static void instant_metadata_lock(dict_index_t& index, mtr_t& mtr)
165165
}
166166

167167
/** Initialize instant->field_map.
168-
@tparam replace_dropped whether to point clustered index fields
169-
to instant->dropped[]
170168
@param[in] table table definition to copy from */
171-
template<bool replace_dropped>
172169
inline void dict_table_t::init_instant(const dict_table_t& table)
173170
{
174171
const dict_index_t& oindex __attribute__((unused))= *table.indexes.start;
@@ -209,12 +206,10 @@ inline void dict_table_t::init_instant(const dict_table_t& table)
209206
ut_ad(f.col < table.instant->dropped
210207
+ table.instant->n_dropped);
211208
ut_d(n_drop++);
212-
if (replace_dropped) {
213-
size_t d = f.col - table.instant->dropped;
214-
ut_ad(f.col == &table.instant->dropped[d]);
215-
ut_ad(d <= instant->n_dropped);
216-
f.col = &instant->dropped[d];
217-
}
209+
size_t d = f.col - table.instant->dropped;
210+
ut_ad(f.col == &table.instant->dropped[d]);
211+
ut_ad(d <= instant->n_dropped);
212+
f.col = &instant->dropped[d];
218213
}
219214
ut_ad(n_drop == n_dropped());
220215
ut_ad(field_map_it == &instant->field_map[index.n_fields - u]);
@@ -655,7 +650,7 @@ inline bool dict_table_t::instant_column(const dict_table_t& table,
655650
const field_map_element_t* field_map = old_instant
656651
? old_instant->field_map : NULL;
657652

658-
init_instant<true>(table);
653+
init_instant(table);
659654

660655
if (!metadata_changed) {
661656
metadata_changed = !field_map

storage/innobase/include/dict0mem.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,10 +1886,7 @@ struct dict_table_t {
18861886

18871887
private:
18881888
/** Initialize instant->field_map.
1889-
@tparam replace_dropped whether to point clustered index fields
1890-
to instant->dropped[]
18911889
@param[in] table table definition to copy from */
1892-
template<bool replace_dropped = false>
18931890
inline void init_instant(const dict_table_t& table);
18941891
public:
18951892
/** Id of the table. */

0 commit comments

Comments
 (0)