| 24319 | */ |
| 24320 | |
| 24321 | bool 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 | /** |
no test coverage detected