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

Add dict_table_t::not_redundant()

parent 92f6c234
...@@ -150,6 +150,9 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old, ...@@ -150,6 +150,9 @@ inline void dict_table_t::prepare_instant(const dict_table_t& old,
DBUG_ASSERT(n_dropped() == 0); DBUG_ASSERT(n_dropped() == 0);
DBUG_ASSERT(old.n_cols == old.n_def); DBUG_ASSERT(old.n_cols == old.n_def);
DBUG_ASSERT(n_cols == n_def); DBUG_ASSERT(n_cols == n_def);
DBUG_ASSERT(old.not_redundant() == not_redundant());
DBUG_ASSERT(old.supports_instant());
DBUG_ASSERT(supports_instant());
const dict_index_t& oindex = *old.indexes.start; const dict_index_t& oindex = *old.indexes.start;
dict_index_t& index = *indexes.start; dict_index_t& index = *indexes.start;
......
...@@ -904,15 +904,8 @@ dict_index_get_min_size( ...@@ -904,15 +904,8 @@ dict_index_get_min_size(
/*====================*/ /*====================*/
const dict_index_t* index) /*!< in: index */ const dict_index_t* index) /*!< in: index */
MY_ATTRIBUTE((nonnull, warn_unused_result)); MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Check whether the table uses the compact page format. #define dict_table_is_comp(table) (table)->not_redundant()
@return TRUE if table uses the compact page format */
UNIV_INLINE
bool
dict_table_is_comp(
/*===============*/
const dict_table_t* table) /*!< in: table */
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Determine if a table uses atomic BLOBs (no locally stored prefix). /** Determine if a table uses atomic BLOBs (no locally stored prefix).
@param[in] table InnoDB table @param[in] table InnoDB table
......
...@@ -532,19 +532,6 @@ dict_table_get_sys_col_no( ...@@ -532,19 +532,6 @@ dict_table_get_sys_col_no(
return unsigned(table->n_cols) + (sys - DATA_N_SYS_COLS); return unsigned(table->n_cols) + (sys - DATA_N_SYS_COLS);
} }
/********************************************************************//**
Check whether the table uses the compact page format.
@return TRUE if table uses the compact page format */
UNIV_INLINE
bool
dict_table_is_comp(
/*===============*/
const dict_table_t* table) /*!< in: table */
{
ut_ad(table);
return (table->flags & DICT_TF_COMPACT) != 0;
}
/************************************************************************ /************************************************************************
Check if the table has an FTS index. */ Check if the table has an FTS index. */
UNIV_INLINE UNIV_INLINE
......
...@@ -1558,6 +1558,9 @@ struct dict_table_t { ...@@ -1558,6 +1558,9 @@ struct dict_table_t {
return flags2 & DICT_TF2_TEMPORARY; return flags2 & DICT_TF2_TEMPORARY;
} }
/** @return whether the table is not in ROW_FORMAT=REDUNDANT */
bool not_redundant() const { return flags & DICT_TF_COMPACT; }
/** @return whether this table is readable /** @return whether this table is readable
@retval true normally @retval true normally
@retval false if this is a single-table tablespace @retval false if this is a single-table tablespace
......
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