| 23310 | |
| 23311 | |
| 23312 | bool open_tmp_table(TABLE *table) |
| 23313 | { |
| 23314 | int error; |
| 23315 | if (unlikely((error= table->file->ha_open(table, table->s->path.str, O_RDWR, |
| 23316 | HA_OPEN_TMP_TABLE | |
| 23317 | HA_OPEN_INTERNAL_TABLE | |
| 23318 | HA_OPEN_SIZE_TRACKING)))) |
| 23319 | { |
| 23320 | table->file->print_error(error, MYF(0)); /* purecov: inspected */ |
| 23321 | table->db_stat= 0; |
| 23322 | return 1; |
| 23323 | } |
| 23324 | table->db_stat= HA_OPEN_KEYFILE; |
| 23325 | (void) table->file->extra(HA_EXTRA_QUICK); /* Faster */ |
| 23326 | table->file->set_optimizer_costs(table->in_use); |
| 23327 | if (!table->is_created()) |
| 23328 | { |
| 23329 | table->set_created(); |
| 23330 | table->in_use->inc_status_created_tmp_tables(); |
| 23331 | } |
| 23332 | |
| 23333 | return 0; |
| 23334 | } |
| 23335 | |
| 23336 | |
| 23337 | bool Virtual_tmp_table::sp_set_from_select_list(THD *thd, |
no test coverage detected