MCPcopy Create free account
hub / github.com/MariaDB/server / is_split_materialized_allowed

Function is_split_materialized_allowed

sql/opt_split.cc:337–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335 */
336
337static bool is_split_materialized_allowed(THD *thd,
338 const TABLE_LIST *derived,
339 hint_state *hint)
340{
341 if (!derived)
342 {
343 *hint= hint_state::DISABLED; // there is no derived table to hint on
344 return false;
345 }
346
347 *hint= hint_table_state(thd,
348 derived,
349 SPLIT_MATERIALIZED_HINT_ENUM);
350
351 const bool opt_flag= optimizer_flag(thd, OPTIMIZER_SWITCH_SPLIT_MATERIALIZED);
352 const bool allow_split= (*hint == hint_state::ENABLED ||
353 (*hint == hint_state::NOT_PRESENT && opt_flag));
354
355 return allow_split;
356}
357
358
359/* This structure is auxiliary and used only in the function that follows it */

Callers 1

Calls 2

hint_table_stateFunction · 0.85
optimizer_flagFunction · 0.85

Tested by

no test coverage detected