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

Function open_tmp_table

sql/sql_select.cc:23312–23334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23310
23311
23312bool 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
23337bool Virtual_tmp_table::sp_set_from_select_list(THD *thd,

Callers 5

mysql_derived_createFunction · 0.85
instantiate_tmp_tableFunction · 0.85
initMethod · 0.85

Calls 7

ha_openMethod · 0.80
set_createdMethod · 0.80
print_errorMethod · 0.45
extraMethod · 0.45
set_optimizer_costsMethod · 0.45
is_createdMethod · 0.45

Tested by

no test coverage detected