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

Method create_result_table

sql/sql_union.cc:340–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338*/
339
340bool
341select_unit::create_result_table(THD *thd_arg, List<Item> *column_types,
342 bool is_union_distinct, ulonglong options,
343 const LEX_CSTRING *alias,
344 bool bit_fields_as_long, bool create_table,
345 bool keep_row_order,
346 uint hidden)
347{
348 DBUG_ASSERT(table == 0);
349 tmp_table_param.init();
350 tmp_table_param.field_count= column_types->elements;
351 tmp_table_param.func_count= tmp_table_param.field_count;
352 tmp_table_param.bit_fields_as_long= bit_fields_as_long;
353 tmp_table_param.hidden_field_count= hidden;
354
355 if (! (table= create_tmp_table(thd_arg, &tmp_table_param, *column_types,
356 (ORDER*) 0, is_union_distinct, 1,
357 options, HA_POS_ERROR, alias,
358 !create_table, keep_row_order)))
359 return TRUE;
360
361 table->keys_in_use_for_query.clear_all();
362
363 if (create_table)
364 {
365 table->file->extra(HA_EXTRA_WRITE_CACHE);
366 table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
367 }
368 return FALSE;
369}
370
371bool
372select_union_recursive::create_result_table(THD *thd_arg,

Callers 3

initMethod · 0.80
mysql_derived_prepareFunction · 0.80
prepareMethod · 0.80

Calls 4

create_tmp_tableFunction · 0.85
clear_allMethod · 0.80
initMethod · 0.45
extraMethod · 0.45

Tested by

no test coverage detected