static inline bool derived_table_optimization_done(TABLE_LIST *table)
{
  return table->derived &&
      (table->derived->is_excluded() ||
       table->is_materialized_derived());
}
static inline bool derived_table_optimization_done(TABLE_LIST *table)
{
  return table->derived &&
      (table->derived->is_excluded() ||
       table->is_materialized_derived());
}