Commit a85f81af authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-22535 fixup: Define a single-caller function inline

Let us avoid any overhead in release builds, for an empty function.
parent 2d00e003
...@@ -9922,7 +9922,7 @@ bool TABLE::export_structure(THD *thd, Row_definition_list *defs) ...@@ -9922,7 +9922,7 @@ bool TABLE::export_structure(THD *thd, Row_definition_list *defs)
return false; return false;
} }
/* /**
@brief @brief
Initialize all the opt_range structures that are used to stored the Initialize all the opt_range structures that are used to stored the
estimates when the range optimizer is run. estimates when the range optimizer is run.
...@@ -9931,7 +9931,7 @@ bool TABLE::export_structure(THD *thd, Row_definition_list *defs) ...@@ -9931,7 +9931,7 @@ bool TABLE::export_structure(THD *thd, Row_definition_list *defs)
to be able to find wrong usage of data with valgrind or MSAN. to be able to find wrong usage of data with valgrind or MSAN.
*/ */
void TABLE::initialize_opt_range_structures() inline void TABLE::initialize_opt_range_structures()
{ {
TRASH_ALLOC((void*)&opt_range_keys, sizeof(opt_range_keys)); TRASH_ALLOC((void*)&opt_range_keys, sizeof(opt_range_keys));
TRASH_ALLOC(opt_range, s->keys * sizeof(*opt_range)); TRASH_ALLOC(opt_range, s->keys * sizeof(*opt_range));
......
...@@ -1637,7 +1637,8 @@ struct TABLE ...@@ -1637,7 +1637,8 @@ struct TABLE
bool is_filled_at_execution(); bool is_filled_at_execution();
bool update_const_key_parts(COND *conds); bool update_const_key_parts(COND *conds);
void initialize_opt_range_structures();
inline void initialize_opt_range_structures();
my_ptrdiff_t default_values_offset() const my_ptrdiff_t default_values_offset() const
{ return (my_ptrdiff_t) (s->default_values - record[0]); } { return (my_ptrdiff_t) (s->default_values - record[0]); }
......
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