| 5141 | */ |
| 5142 | |
| 5143 | int |
| 5144 | JOIN::destroy() |
| 5145 | { |
| 5146 | DBUG_ENTER("JOIN::destroy"); |
| 5147 | |
| 5148 | DBUG_PRINT("info", ("select %p (%u) <> JOIN %p", |
| 5149 | select_lex, select_lex->select_number, this)); |
| 5150 | select_lex->join= 0; |
| 5151 | |
| 5152 | cond_equal= 0; |
| 5153 | having_equal= 0; |
| 5154 | |
| 5155 | cleanup(1); |
| 5156 | |
| 5157 | if (join_tab) |
| 5158 | { |
| 5159 | for (JOIN_TAB *tab= first_linear_tab(this, WITH_BUSH_ROOTS, |
| 5160 | WITH_CONST_TABLES); |
| 5161 | tab; tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS)) |
| 5162 | { |
| 5163 | if (tab->aggr) |
| 5164 | { |
| 5165 | free_tmp_table(thd, tab->table); |
| 5166 | delete tab->tmp_table_param; |
| 5167 | tab->tmp_table_param= NULL; |
| 5168 | tab->aggr= NULL; |
| 5169 | } |
| 5170 | tab->table= NULL; |
| 5171 | } |
| 5172 | } |
| 5173 | |
| 5174 | /* Cleanup items referencing temporary table columns */ |
| 5175 | cleanup_item_list(tmp_all_fields1); |
| 5176 | cleanup_item_list(tmp_all_fields3); |
| 5177 | destroy_sj_tmp_tables(this); |
| 5178 | delete_dynamic(&keyuse); |
| 5179 | if (save_qep) |
| 5180 | delete(save_qep); |
| 5181 | if (ext_keyuses_for_splitting) |
| 5182 | delete(ext_keyuses_for_splitting); |
| 5183 | delete procedure; |
| 5184 | DBUG_RETURN(error); |
| 5185 | } |
| 5186 | |
| 5187 | |
| 5188 | void JOIN::cleanup_item_list(List<Item> &items) const |
nothing calls this directly
no test coverage detected