| 15491 | */ |
| 15492 | |
| 15493 | static |
| 15494 | void 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 | /** |
no test coverage detected