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

Function create_tmp_field

sql/sql_select.cc:21903–21923  ·  view source on GitHub ↗

Create field for temporary table. @param table Temporary table @param item Item to create a field for @param type Type of item (normally item->type) @param copy_func If set and item is a function, store copy of item in this array @param from_field if field will be created using other field as example, pointer

Source from the content-addressed store, hash-verified

21901 either direct or referenced by an Item_ref.
21902*/
21903Field *create_tmp_field(TABLE *table, Item *item,
21904 Item ***copy_func, Field **from_field,
21905 Field **default_field,
21906 bool group, bool modify_item,
21907 bool table_cant_handle_bit_fields,
21908 bool make_copy_field)
21909{
21910 Tmp_field_src src;
21911 Tmp_field_param prm(group, modify_item, table_cant_handle_bit_fields,
21912 make_copy_field);
21913 Field *result= item->create_tmp_field_ex(table->in_use->mem_root,
21914 table, &src, &prm);
21915 if (is_json_type(item) && make_json_valid_expr(table, result))
21916 result= NULL;
21917
21918 *from_field= src.field();
21919 *default_field= src.default_field();
21920 if (src.item_result_field())
21921 *((*copy_func)++)= src.item_result_field();
21922 return result;
21923}
21924
21925/*
21926 Set up column usage bitmaps for a temporary table

Callers 3

create_tmp_fieldMethod · 0.85
create_tmp_field_exMethod · 0.85
add_fieldsMethod · 0.85

Calls 6

is_json_typeFunction · 0.85
make_json_valid_exprFunction · 0.85
default_fieldMethod · 0.80
item_result_fieldMethod · 0.80
create_tmp_field_exMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected