Commit 7955e197 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove a constant template parameter

dict_table_t::init_instant(): Remove bool replace_dropped=true.
The template parameter was unnecessarily added in
commit a044e326.
parent a8bf39cc
...@@ -165,10 +165,7 @@ static void instant_metadata_lock(dict_index_t& index, mtr_t& mtr) ...@@ -165,10 +165,7 @@ static void instant_metadata_lock(dict_index_t& index, mtr_t& mtr)
} }
/** Initialize instant->field_map. /** Initialize instant->field_map.
@tparam replace_dropped whether to point clustered index fields
to instant->dropped[]
@param[in] table table definition to copy from */ @param[in] table table definition to copy from */
template<bool replace_dropped>
inline void dict_table_t::init_instant(const dict_table_t& table) inline void dict_table_t::init_instant(const dict_table_t& table)
{ {
const dict_index_t& oindex __attribute__((unused))= *table.indexes.start; 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) ...@@ -209,12 +206,10 @@ inline void dict_table_t::init_instant(const dict_table_t& table)
ut_ad(f.col < table.instant->dropped ut_ad(f.col < table.instant->dropped
+ table.instant->n_dropped); + table.instant->n_dropped);
ut_d(n_drop++); ut_d(n_drop++);
if (replace_dropped) { size_t d = f.col - table.instant->dropped;
size_t d = f.col - table.instant->dropped; ut_ad(f.col == &table.instant->dropped[d]);
ut_ad(f.col == &table.instant->dropped[d]); ut_ad(d <= instant->n_dropped);
ut_ad(d <= instant->n_dropped); f.col = &instant->dropped[d];
f.col = &instant->dropped[d];
}
} }
ut_ad(n_drop == n_dropped()); ut_ad(n_drop == n_dropped());
ut_ad(field_map_it == &instant->field_map[index.n_fields - u]); 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, ...@@ -655,7 +650,7 @@ inline bool dict_table_t::instant_column(const dict_table_t& table,
const field_map_element_t* field_map = old_instant const field_map_element_t* field_map = old_instant
? old_instant->field_map : NULL; ? old_instant->field_map : NULL;
init_instant<true>(table); init_instant(table);
if (!metadata_changed) { if (!metadata_changed) {
metadata_changed = !field_map metadata_changed = !field_map
......
...@@ -1886,10 +1886,7 @@ struct dict_table_t { ...@@ -1886,10 +1886,7 @@ struct dict_table_t {
private: private:
/** Initialize instant->field_map. /** Initialize instant->field_map.
@tparam replace_dropped whether to point clustered index fields
to instant->dropped[]
@param[in] table table definition to copy from */ @param[in] table table definition to copy from */
template<bool replace_dropped = false>
inline void init_instant(const dict_table_t& table); inline void init_instant(const dict_table_t& table);
public: public:
/** Id of the table. */ /** Id of the table. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment