24#ifndef TEMP_TABLE_PARAM_INCLUDED
25#define TEMP_TABLE_PARAM_INCLUDED
Helper class for copy_funcs(); represents an Item to copy from table to next tmp table.
Definition: temp_table_param.h:48
Item * m_func
Definition: temp_table_param.h:61
Field * m_result_field
Definition: temp_table_param.h:62
Func_ptr(Item *item, Field *result_field)
Definition: sql_tmp_table.cc:2957
int m_func_bits
Definition: temp_table_param.h:83
bool should_copy(Copy_func_type type) const
Definition: temp_table_param.h:56
Item_field * m_result_item
Definition: temp_table_param.h:76
Item_field * result_item() const
Definition: sql_tmp_table.cc:2967
Item * func() const
Definition: temp_table_param.h:52
Field * result_field() const
Definition: temp_table_param.h:54
void set_func(Item *func)
Definition: sql_tmp_table.cc:2962
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
Object containing parameters used when creating and using temporary tables.
Definition: temp_table_param.h:95
bool force_copy_fields
Definition: temp_table_param.h:169
uint sum_func_count
Number of fields in the query that have aggregate functions.
Definition: temp_table_param.h:132
bool using_outer_summary_function
Enabled when we have at least one outer_sum_func.
Definition: temp_table_param.h:159
uint outer_sum_func_count
Number of outer_sum_funcs i.e the number of set functions that are aggregated in a query block outer ...
Definition: temp_table_param.h:152
Window * m_window
If this is the out table of a window: the said window.
Definition: temp_table_param.h:210
Func_ptr_array * items_to_copy
Definition: temp_table_param.h:100
bool m_last_operation_is_distinct
For INTERSECT and EXCEPT computation.
Definition: temp_table_param.h:207
bool allow_group_via_temp_table
Whether we allow running GROUP BY processing into a temporary table, i.e., keeping many different agg...
Definition: temp_table_param.h:145
bool force_hash_field_for_unique
Whether UNIQUE keys should always be implemented by way of a hidden hash field, never a unique index.
Definition: temp_table_param.h:191
bool m_window_frame_buffer
This tmp table is used for a window's frame buffer.
Definition: temp_table_param.h:194
KEY * keyinfo
After temporary table creation, points to an index on the table created depending on the purpose of t...
Definition: temp_table_param.h:107
Temp_table_param(MEM_ROOT *mem_root, const Temp_table_param &other)
Definition: temp_table_param.h:234
enum Temp_table_param::@181 TTP_UNION_OR_TABLE
For INTERSECT and EXCEPT computation.
CHARSET_INFO * table_charset
Definition: temp_table_param.h:160
uint group_null_parts
Definition: temp_table_param.h:134
uint func_count
Number of items in the query.
Definition: temp_table_param.h:123
uint group_length
Definition: temp_table_param.h:134
Mem_root_array< Copy_field > copy_fields
Definition: temp_table_param.h:97
bool schema_table
Definition: temp_table_param.h:161
bool needs_set_counter()
The tempoary table rows need a counter to keep track of its duplicates: needed for EXCEPT and INTERSE...
Definition: temp_table_param.h:204
Temp_table_param(MEM_ROOT *mem_root= *THR_MALLOC)
Definition: temp_table_param.h:212
uint hidden_field_count
Definition: temp_table_param.h:133
bool skip_create_table
true <=> don't actually create table handler when creating the result table.
Definition: temp_table_param.h:176
bool can_use_pk_for_unique
Whether the UNIQUE index can be promoted to PK.
Definition: temp_table_param.h:185
uint group_parts
Definition: temp_table_param.h:134
void cleanup()
Definition: temp_table_param.h:260
@ TTP_UNION_OR_TABLE
Definition: temp_table_param.h:198
@ TTP_INTERSECT
Definition: temp_table_param.h:200
@ TTP_EXCEPT
Definition: temp_table_param.h:199
bool precomputed_group_by
Definition: temp_table_param.h:168
uchar * group_buff
Definition: temp_table_param.h:99
bool bit_fields_as_long
Definition: temp_table_param.h:182
ha_rows end_write_records
LIMIT (maximum number of rows) for this temp table, or HA_POS_ERROR for no limit.
Definition: temp_table_param.h:113
Represents the (explicit) window of a SQL 2003 section 7.11 <window clause>, or the implicit (inlined...
Definition: window.h:105
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
#define HA_POS_ERROR
Definition: my_base.h:1142
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
thread_local MEM_ROOT ** THR_MALLOC
Definition: mysqld.cc:1560
required string type
Definition: replication_group_member_actions.proto:34
Copy_func_type
Definition: sql_executor.h:170
Definition: m_ctype.h:385
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Mem_root_array< Func_ptr > Func_ptr_array
Used by copy_funcs()
Definition: temp_table_param.h:87
unsigned int uint
Definition: uca9-dump.cc:75