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

Function instantiate_tmp_table

sql/sql_select.cc:24321–24346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24319*/
24320
24321bool instantiate_tmp_table(TABLE *table, KEY *keyinfo,
24322 TMP_ENGINE_COLUMNDEF *start_recinfo,
24323 TMP_ENGINE_COLUMNDEF **recinfo,
24324 ulonglong options)
24325{
24326 DBUG_ASSERT(table->s->keys == 0 || table->key_info == keyinfo);
24327 DBUG_ASSERT(table->s->keys <= 1);
24328 if (table->s->db_type() == TMP_ENGINE_HTON)
24329 {
24330 /*
24331 If it is not heap (in-memory) table then convert index to unique
24332 constrain.
24333 */
24334 MEM_CHECK_DEFINED(table->record[0], table->s->reclength);
24335 if (create_internal_tmp_table(table, keyinfo, start_recinfo, recinfo,
24336 options))
24337 return TRUE;
24338 // Make empty record so random data is not written to disk
24339 empty_record(table);
24340 table->status= STATUS_NO_RECORD;
24341 }
24342 if (open_tmp_table(table))
24343 return TRUE;
24344
24345 return FALSE;
24346}
24347
24348
24349/**

Callers 5

finalizeMethod · 0.85
prepare_tmp_tableMethod · 0.85
exec_recursiveMethod · 0.85

Calls 3

open_tmp_tableFunction · 0.85
db_typeMethod · 0.80

Tested by

no test coverage detected