MySQL 8.0.32
Source Code Documentation
materialize_path_parameters.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef MATERIALIZE_PATH_PARAMETERS_H
24#define MATERIALIZE_PATH_PARAMETERS_H 1
25
26// Split out into its own file to reduce the amount of dependencies on
27// access_path.h.
28
29#include "sql/mem_root_array.h"
30#include "sql/sql_class.h"
31
32struct AccessPath;
33struct TABLE;
34class JOIN;
38
40 // Corresponds to MaterializeIterator::QueryBlock; see it for documentation.
41 struct QueryBlock {
49 /// The block no is the first to be materialized with DISTINCT: for EXCEPT
50 /// set operation in a materialization for EXCEPT.
52 /// The index of this block number
54 /// The number of materialized blocks, i.e. set operands
56 };
59
60 /// Handle to table to materialize into.
62
63 /// If materializing a CTE, points to it (see m_cte), otherwise nullptr.
65
66 /// The query expression we are materializing.
68
69 /**
70 @see JOIN. If we are materializing across JOINs, e.g. derived tables,
71 ref_slice should be left at -1.
72 */
74
75 /**
76 True if rematerializing on every Init() call (e.g., because we
77 have a dependency on a value from outside the query block).
78 */
80
81 /**
82 Used for when pushing LIMIT down to MaterializeIterator; this is
83 more efficient than having a LimitOffsetIterator above the
84 MaterializeIterator, since we can stop materializing when there are
85 enough rows. (This is especially important for recursive CTEs.)
86 Note that we cannot have a LimitOffsetIterator _below_ the
87 MaterializeIterator, as that would count wrong if we have deduplication,
88 and would not work at all for recursive CTEs.
89 Set to HA_POS_ERROR for no limit.
90 */
92
93 /**
94 True if this is the top level iterator for a
95 materialized derived table transformed from a scalar subquery which needs
96 run-time cardinality check.
97 */
99};
100
101#endif // !defined(MATERIALIZE_PATH_PARAMETERS_H)
After parsing, a Common Table Expression is accessed through a Table_ref.
Definition: table.h:4291
Definition: sql_optimizer.h:125
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:425
This class represents a query expression (one query block or several query blocks combined with UNION...
Definition: sql_lex.h:623
Object containing parameters used when creating and using temporary tables.
Definition: temp_table_param.h:94
my_off_t ha_rows
Definition: my_base.h:1139
Access paths are a query planning structure that correspond 1:1 to iterators, in that an access path ...
Definition: access_path.h:189
Definition: materialize_path_parameters.h:41
uint m_operand_idx
The index of this block number.
Definition: materialize_path_parameters.h:53
uint m_total_operands
The number of materialized blocks, i.e. set operands.
Definition: materialize_path_parameters.h:55
int select_number
Definition: materialize_path_parameters.h:43
bool copy_items
Definition: materialize_path_parameters.h:46
Temp_table_param * temp_table_param
Definition: materialize_path_parameters.h:47
uint m_first_distinct
The block no is the first to be materialized with DISTINCT: for EXCEPT set operation in a materializa...
Definition: materialize_path_parameters.h:51
bool is_recursive_reference
Definition: materialize_path_parameters.h:48
AccessPath * subquery_path
Definition: materialize_path_parameters.h:42
bool disable_deduplication_by_hash_field
Definition: materialize_path_parameters.h:45
JOIN * join
Definition: materialize_path_parameters.h:44
Definition: materialize_path_parameters.h:39
bool rematerialize
True if rematerializing on every Init() call (e.g., because we have a dependency on a value from outs...
Definition: materialize_path_parameters.h:79
Common_table_expr * cte
If materializing a CTE, points to it (see m_cte), otherwise nullptr.
Definition: materialize_path_parameters.h:64
bool reject_multiple_rows
True if this is the top level iterator for a materialized derived table transformed from a scalar sub...
Definition: materialize_path_parameters.h:98
ha_rows limit_rows
Used for when pushing LIMIT down to MaterializeIterator; this is more efficient than having a LimitOf...
Definition: materialize_path_parameters.h:91
Mem_root_array< QueryBlock > query_blocks
Definition: materialize_path_parameters.h:57
TABLE * table
Handle to table to materialize into.
Definition: materialize_path_parameters.h:61
int ref_slice
Definition: materialize_path_parameters.h:73
Query_expression * unit
The query expression we are materializing.
Definition: materialize_path_parameters.h:67
Mem_root_array< const AccessPath * > * invalidators
Definition: materialize_path_parameters.h:58
Definition: table.h:1395
unsigned int uint
Definition: uca-dump.cc:29