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

Function set_join_cache_denial

sql/sql_select.cc:15493–15530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15491*/
15492
15493static
15494void set_join_cache_denial(JOIN_TAB *join_tab)
15495{
15496 if (join_tab->cache)
15497 {
15498 /*
15499 If there is a previous cache linked to this cache through the
15500 next_cache pointer: remove the link.
15501 */
15502 if (join_tab->cache->prev_cache)
15503 join_tab->cache->prev_cache->next_cache= 0;
15504 /*
15505 Same for the next_cache
15506 */
15507 if (join_tab->cache->next_cache)
15508 join_tab->cache->next_cache->prev_cache= 0;
15509
15510 join_tab->cache->free();
15511 join_tab->cache= 0;
15512 }
15513 if (join_tab->use_join_cache)
15514 {
15515 join_tab->use_join_cache= FALSE;
15516 join_tab->used_join_cache_level= 0;
15517 /*
15518 It could be only sub_select(). It could not be sub_seject_sjm because we
15519 don't do join buffering for the first table in sjm nest.
15520 */
15521 join_tab[-1].next_select= sub_select;
15522 join_tab[-1].cached_pfs_batch_update= join_tab[-1].pfs_batch_update();
15523 if (join_tab->type == JT_REF && join_tab->is_ref_for_hash_join())
15524 {
15525 join_tab->type= JT_ALL;
15526 join_tab->ref.key_parts= 0;
15527 }
15528 join_tab->join->return_tab= join_tab;
15529 }
15530}
15531
15532
15533/**

Callers 1

revise_cache_usageFunction · 0.85

Calls 3

pfs_batch_updateMethod · 0.80
is_ref_for_hash_joinMethod · 0.80
freeMethod · 0.45

Tested by

no test coverage detected