MySQL  8.0.19
Source Code Documentation
parse_tree_partitions.h
Go to the documentation of this file.
1 /* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
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 PARSE_TREE_PARTITIONS_INCLUDED
24 #define PARSE_TREE_PARTITIONS_INCLUDED
25 
26 #include <stddef.h>
27 #include <sys/types.h>
28 
29 #include "lex_string.h"
30 #include "my_base.h"
31 #include "my_inttypes.h"
32 #include "sql/mem_root_array.h"
33 #include "sql/parse_tree_helpers.h"
35 #include "sql/partition_element.h"
36 #include "sql/partition_info.h"
37 
38 class Item;
39 class THD;
40 template <class T>
41 class List;
42 
43 /**
44  Parse context for partitioning-specific parse tree nodes.
45 
46  For internal use in the contextualization code.
47 
48  @ingroup ptn_partitioning
49 */
51  public Parser_partition_info {
56 
57  Partition_parse_context(THD *thd_arg, partition_info *part_info_arg,
59  : Partition_parse_context(thd_arg, part_info_arg, nullptr, nullptr,
61 
62  /**
63  True for "ALTER TABLE ADD PARTITION" and "ALTER TABLE REORGANIZE PARTITION"
64  statements, otherwise false.
65  */
67 };
68 
69 /**
70  Base class for all Partition_parse_context-dependent nodes
71 
72  @ingroup ptn_partitioning
73 */
75 
76 /**
77  Base class for all partition options
78 
79  @ingroup ptn_part_options
80 */
82 
83 /**
84  Node for the @SQL{COMMENT [=] @<string@>} partition option
85 
86  @ingroup ptn_part_options
87 */
90 
91  char *comment;
92 
93  public:
95 
97  if (super::contextualize(pc)) return true;
98 
100  return false;
101  }
102 };
103 
104 /**
105  Node for the @SQL{INDEX DIRECTORY [=] @<string@>} partition option
106 
107  @ingroup ptn_part_options
108 */
111 
112  const char *index_directory;
113 
114  public:
117 
119  if (super::contextualize(pc)) return true;
120 
122  return false;
123  }
124 };
125 
126 /**
127  Node for the @SQL{DATA DIRECTORY [=] @<string@>} partition option
128 
129  @ingroup ptn_part_options
130 */
133 
134  const char *data_directory;
135 
136  public:
139 
141  if (super::contextualize(pc)) return true;
142 
144  return false;
145  }
146 };
147 
148 /**
149  Node for the @SQL{MIN_ROWS [=] @<integer@>} partition option
150 
151  @ingroup ptn_part_options
152 */
155 
157 
158  public:
160 
162  if (super::contextualize(pc)) return true;
163 
165  return false;
166  }
167 };
168 
169 /**
170  Node for the @SQL{MAX_ROWS [=] @<integer@>} partition option
171 
172  @ingroup ptn_part_options
173 */
176 
178 
179  public:
181 
183  if (super::contextualize(pc)) return true;
184 
186  return false;
187  }
188 };
189 
190 /**
191  Node for the @SQL{NODEGROUP [=] @<integer@>} partition option
192 
193  @ingroup ptn_part_options
194 */
197 
199 
200  public:
202 
204  if (super::contextualize(pc)) return true;
205 
207  return false;
208  }
209 };
210 
211 /**
212  Node for the @SQL{[STORAGE] ENGINE [=] @<identifier|string@>} partition option
213 
214  @ingroup ptn_part_options
215 */
218 
219  public:
221 
223 
225  if (super::contextualize(pc)) return true;
226 
227  return resolve_engine(pc->thd, name, false, // partition can't be temporary
228  false, &pc->curr_part_elem->engine_type);
229  }
230 };
231 
232 /**
233  Node for the @SQL{TABLESPACE [=] @<identifier@>} partition option
234 
235  @ingroup ptn_part_options
236 */
239 
240  const char *tablespace;
241 
242  public:
243  explicit PT_partition_tablespace(const char *tablespace)
244  : tablespace(tablespace) {}
245 
247  if (super::contextualize(pc)) return true;
248 
250  return false;
251  }
252 };
253 
254 /**
255  Node for the @SQL{SUBRAPTITION} clause of @SQL{CREATE/ALTER TABLE}
256 
257  @ingroup ptn_partitioning
258 */
260  const POS pos;
261  const char *name;
263 
264  public:
265  PT_subpartition(const POS &pos, const char *name,
267  : pos(pos), name(name), options(options) {}
268 
269  bool contextualize(Partition_parse_context *pc) override;
270 };
271 
272 /**
273  Base class for partition value nodes: @SQL{MAX_VALUE} values or expressions
274 
275  @ingroup ptn_partitioning
276 */
278 
279 /**
280  Node for the @SQL{MAX_VALUE} partition value in @SQL{CREATE/ALTER TABLE}
281 
282  @ingroup ptn_partitioning
283 */
286 
287  const POS pos;
288 
289  public:
290  explicit PT_part_value_item_max(const POS &pos) : pos(pos) {}
291 
292  bool contextualize(Partition_parse_context *pc) override;
293 };
294 
295 /**
296  Node for the partitioning expression in @SQL{CREATE/ALTER TABLE}
297 
298  @ingroup ptn_partitioning
299 */
302 
303  const POS pos;
305 
306  public:
308  : pos(pos), expr(expr) {}
309 
310  bool contextualize(Partition_parse_context *pc) override;
311 };
312 
313 /**
314  Base class for @SQL{VALUES} partitioning clauses
315 
316  @ingroup ptn_partitioning
317 */
319 
320 /**
321  Node for a list of partitioning values in @SQL{VALUES} clauses
322 
323  @ingroup ptn_partitioning
324 */
327 
329  const POS paren_pos;
330 
331  public:
335 
336  bool contextualize(Partition_parse_context *pc) override;
337 };
338 
339 /**
340  Node for a list of partitioning values in the @SQL{VALUES IN} clause
341 
342  @ingroup ptn_partitioning
343 */
346 
347  const POS pos;
349 
350  public:
351  explicit PT_part_values_in_item(const POS &pos,
353  : pos(pos), item(item) {}
354 
355  bool contextualize(Partition_parse_context *pc) override;
356 };
357 
358 /**
359  Node for a list of partitioning values in the @SQL{VALUES IN} clause
360 
361  @ingroup ptn_partitioning
362 */
365 
366  const POS pos;
368 
369  public:
372  : pos(pos), list(list) {}
373 
374  bool contextualize(Partition_parse_context *pc) override;
375 };
376 
377 /**
378  Node for the @SQL{PARTITION} clause of CREATE/ALTER TABLE
379 
380  @ingroup ptn_partitioning
381 */
384 
385  const POS pos;
393 
394  public:
397  const POS &values_pos,
400  const POS &sub_partitions_pos)
401  : pos(pos),
402  name(name),
403  type(type),
409 
410  bool contextualize(Partition_parse_context *pc) override;
411 };
412 
413 /**
414  Base class for all subpartitioning clause nodes
415 
416  @ingroup ptn_partitioning
417 */
419 
420 /**
421  Node for the @SQL{SUBRAPTITION BY HASH} definition clause
422 
423  @ingroup ptn_partitioning
424 */
427 
428  const bool is_linear;
429  const POS hash_pos;
432 
433  public:
436  : is_linear(is_linear),
438  hash(hash),
440 
441  bool contextualize(Partition_parse_context *pc) override;
442 };
443 
444 /**
445  Node for the @SQL{SUBRAPTITION BY KEY} definition clause
446 
447  @ingroup ptn_partitioning
448 */
451 
452  const bool is_linear;
456 
457  public:
460  : is_linear(is_linear),
464 
465  bool contextualize(Partition_parse_context *pc) override;
466 };
467 
469  protected:
471 
473  Item **item);
474 };
475 
476 /**
477  Node for the @SQL{PARTITION BY [LINEAR] KEY} type clause
478 
479  @ingroup ptn_partitioning
480 */
483 
484  const bool is_linear;
487 
488  public:
492 
493  bool contextualize(Partition_parse_context *pc) override;
494 };
495 
496 /**
497  Node for the @SQL{PARTITION BY [LINEAR] HASH} type clause
498 
499  @ingroup ptn_partitioning
500 */
503 
504  const bool is_linear;
505  const POS expr_pos;
507 
508  public:
511 
512  bool contextualize(Partition_parse_context *pc) override;
513 };
514 
515 /**
516  Node for the @SQL{PARTITION BY RANGE (@<expression@>) } type clause
517 
518  @ingroup ptn_partitioning
519 */
522 
523  const POS expr_pos;
525 
526  public:
528  : expr_pos(expr_pos), expr(expr) {}
529 
530  bool contextualize(Partition_parse_context *pc) override;
531 };
532 
533 /**
534  Node for the @SQL{PARTITION BY RANGE COLUMNS (@<ident list@>) } type clause
535 
536  @ingroup ptn_partitioning
537 */
540 
542 
543  public:
545  : columns(columns) {}
546 
547  bool contextualize(Partition_parse_context *pc) override;
548 };
549 
550 /**
551  Node for the @SQL{PARTITION BY LIST (@<expression@>) } type clause
552 
553  @ingroup ptn_partitioning
554 */
557 
558  const POS expr_pos;
560 
561  public:
563  : expr_pos(expr_pos), expr(expr) {}
564 
565  bool contextualize(Partition_parse_context *pc) override;
566 };
567 
568 /**
569  Node for the @SQL{PARTITION BY LIST COLUMNS (@<ident list@>) } type clause
570 
571  @ingroup ptn_partitioning
572 */
575 
577 
578  public:
580  : columns(columns) {}
581 
582  bool contextualize(Partition_parse_context *pc) override;
583 };
584 
585 /**
586  Node for the @SQL{PARTITION} definition clause
587 
588  @ingroup ptn_partitioning
589 */
592 
598 
599  public:
601 
602  public:
610  part_defs(part_defs) {}
611 
612  bool contextualize(Parse_context *pc) override;
613 };
614 
615 #endif /* PARSE_TREE_PARTITIONS_INCLUDED */
Partition_parse_context::is_add_or_reorganize_partition
const bool is_add_or_reorganize_partition
True for "ALTER TABLE ADD PARTITION" and "ALTER TABLE REORGANIZE PARTITION" statements,...
Definition: parse_tree_partitions.h:66
PT_partition_max_rows::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:182
PT_part_type_def_key::PT_part_type_def_key
PT_part_type_def_key(bool is_linear, enum_key_algorithm key_algo, List< char > *opt_columns)
Definition: parse_tree_partitions.h:489
Parse_context::thd
THD *const thd
Current thread handler.
Definition: parse_tree_node_base.h:100
PT_part_type_def_hash::is_linear
const bool is_linear
Definition: parse_tree_partitions.h:504
PT_partition_nodegroup::nodegroup
uint16 nodegroup
Definition: parse_tree_partitions.h:198
MYSQL_LEX_CSTRING
Definition: mysql_lex_string.h:39
Item
Definition: item.h:665
PT_part_values_in_list::PT_part_values_in_list
PT_part_values_in_list(const POS &pos, Mem_root_array< PT_part_value_item_list_paren * > *list)
Definition: parse_tree_partitions.h:370
THD
Definition: sql_class.h:764
PT_part_value_item_max::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:101
PT_sub_partition_by_hash::PT_sub_partition_by_hash
PT_sub_partition_by_hash(bool is_linear, const POS &hash_pos, Item *hash, uint opt_num_subparts)
Definition: parse_tree_partitions.h:434
Mem_root_array< PT_partition_option * >
partition_element::part_min_rows
ha_rows part_min_rows
Definition: partition_element.h:114
PT_part_value_item_list_paren::paren_pos
const POS paren_pos
Definition: parse_tree_partitions.h:329
PT_part_value_item_max::pos
const POS pos
Definition: parse_tree_partitions.h:287
PT_partition_index_directory::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:118
PT_subpartition
Node for the SUBRAPTITION clause of CREATE/ALTER TABLE
Definition: parse_tree_partitions.h:259
Parse_tree_part_node
Parse_tree_node_tmpl< Partition_parse_context > Parse_tree_part_node
Base class for all Partition_parse_context-dependent nodes.
Definition: parse_tree_partitions.h:74
my_base.h
PT_part_value_item_expr::pos
const POS pos
Definition: parse_tree_partitions.h:303
PT_part_definition::sub_partitions_pos
const POS sub_partitions_pos
Definition: parse_tree_partitions.h:392
PT_subpartition::PT_subpartition
PT_subpartition(const POS &pos, const char *name, Mem_root_array< PT_partition_option * > *options)
Definition: parse_tree_partitions.h:265
PT_part_value_item_list_paren::super
PT_part_values super
Definition: parse_tree_partitions.h:326
PT_partition_min_rows::PT_partition_min_rows
PT_partition_min_rows(ha_rows min_rows)
Definition: parse_tree_partitions.h:159
PT_sub_partition_by_hash
Node for the SUBRAPTITION BY HASH definition clause.
Definition: parse_tree_partitions.h:425
PT_partition_nodegroup::PT_partition_nodegroup
PT_partition_nodegroup(uint16 nodegroup)
Definition: parse_tree_partitions.h:201
PT_sub_partition_by_hash::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:314
PT_part_values_in_list::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:182
PT_part_type_def_range_columns::columns
List< char > *const columns
Definition: parse_tree_partitions.h:541
PT_part_value_item_expr::expr
Item * expr
Definition: parse_tree_partitions.h:304
PT_partition_tablespace::super
PT_partition_option super
Definition: parse_tree_partitions.h:238
PT_part_type_def_range_expr::PT_part_type_def_range_expr
PT_part_type_def_range_expr(const POS &expr_pos, Item *expr)
Definition: parse_tree_partitions.h:527
PT_sub_partition_by_key::PT_sub_partition_by_key
PT_sub_partition_by_key(bool is_linear, enum_key_algorithm key_algo, List< char > *field_names, const uint opt_num_subparts)
Definition: parse_tree_partitions.h:458
PT_partition_max_rows::PT_partition_max_rows
PT_partition_max_rows(ha_rows max_rows)
Definition: parse_tree_partitions.h:180
PT_part_type_def_hash::expr
Item * expr
Definition: parse_tree_partitions.h:506
PT_partition_min_rows
Node for the MIN_ROWS [=] <integer> partition option.
Definition: parse_tree_partitions.h:153
PT_part_value_item_list_paren::values
Mem_root_array< PT_part_value_item * > * values
Definition: parse_tree_partitions.h:328
PT_partition_option
Base class for all partition options.
Definition: parse_tree_partitions.h:81
PT_partition::part_type_def
PT_part_type_def *const part_type_def
Definition: parse_tree_partitions.h:593
PT_part_value_item_expr::PT_part_value_item_expr
PT_part_value_item_expr(const POS &pos, Item *expr)
Definition: parse_tree_partitions.h:307
PT_subpartition::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:49
PT_partition_comment::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:96
PT_part_type_def_list_expr::PT_part_type_def_list_expr
PT_part_type_def_list_expr(const POS &expr_pos, Item *expr)
Definition: parse_tree_partitions.h:562
pos
char * pos
Definition: do_ctype.cc:76
partition_type
partition_type
An enum and a struct to handle partitioning and subpartitioning.
Definition: partition_element.h:32
Parse_tree_node_tmpl
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:111
PT_part_value_item_expr::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:113
PT_part_type_def_key::is_linear
const bool is_linear
Definition: parse_tree_partitions.h:484
partition_element::nodegroup_id
uint16 nodegroup_id
Definition: partition_element.h:123
PT_sub_partition_by_hash::hash
Item * hash
Definition: parse_tree_partitions.h:430
PT_part_values_in_item::pos
const POS pos
Definition: parse_tree_partitions.h:347
PT_partition_index_directory::super
PT_partition_option super
Definition: parse_tree_partitions.h:110
PT_partition_engine::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:224
PT_partition_min_rows::super
PT_partition_option super
Definition: parse_tree_partitions.h:154
Parser_partition_info::part_info
partition_info *const part_info
Definition: partition_info.h:181
PT_partition_engine
Node for the [STORAGE] ENGINE [=] <identifier|string> partition option.
Definition: parse_tree_partitions.h:216
PT_partition_tablespace::tablespace
const char * tablespace
Definition: parse_tree_partitions.h:240
PT_part_definition
Node for the PARTITION clause of CREATE/ALTER TABLE.
Definition: parse_tree_partitions.h:382
PT_partition_tablespace
Node for the TABLESPACE [=] <identifier> partition option.
Definition: parse_tree_partitions.h:237
PT_partition_index_directory::PT_partition_index_directory
PT_partition_index_directory(const char *index_directory)
Definition: parse_tree_partitions.h:115
PT_sub_partition_by_key
Node for the SUBRAPTITION BY KEY definition clause.
Definition: parse_tree_partitions.h:449
partition_element::tablespace_name
const char * tablespace_name
Definition: partition_element.h:117
PT_part_type_def_list_expr::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:443
PT_partition_min_rows::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:161
PT_part_type_def_list_expr
Node for the PARTITION BY LIST (<expression>) type clause.
Definition: parse_tree_partitions.h:555
PT_part_type_def_range_expr::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:421
PT_sub_partition_by_hash::hash_pos
const POS hash_pos
Definition: parse_tree_partitions.h:429
PT_partition::part_info
partition_info part_info
Definition: parse_tree_partitions.h:600
PT_sub_partition_by_key::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:341
PT_part_type_def::set_part_field_list
bool set_part_field_list(Partition_parse_context *pc, List< char > *list)
Definition: parse_tree_partitions.cc:366
PT_part_definition::opt_sub_partitions
Mem_root_array< PT_subpartition * > * opt_sub_partitions
Definition: parse_tree_partitions.h:391
partition_element::data_file_name
const char * data_file_name
Definition: partition_element.h:119
PT_partition::contextualize
bool contextualize(Parse_context *pc) override
Definition: parse_tree_partitions.cc:464
PT_part_value_item_max
Node for the MAX_VALUE partition value in CREATE/ALTER TABLE
Definition: parse_tree_partitions.h:284
partition_element::engine_type
handlerton * engine_type
Definition: partition_element.h:121
PT_part_values_in_list::super
PT_part_values super
Definition: parse_tree_partitions.h:364
PT_partition_data_directory
Node for the DATA DIRECTORY [=] <string> partition option.
Definition: parse_tree_partitions.h:131
PT_sub_partition_by_key::is_linear
const bool is_linear
Definition: parse_tree_partitions.h:452
PT_partition::super
Parse_tree_node super
Definition: parse_tree_partitions.h:591
partition_info.h
PT_part_values
Base class for VALUES partitioning clauses.
Definition: parse_tree_partitions.h:318
PT_part_type_def_list_columns::super
PT_part_type_def super
Definition: parse_tree_partitions.h:574
PT_part_type_def::itemize_part_expr
bool itemize_part_expr(Partition_parse_context *pc, const POS &pos, Item **item)
Definition: parse_tree_partitions.cc:378
PT_partition_max_rows::max_rows
ha_rows max_rows
Definition: parse_tree_partitions.h:177
PT_part_type_def_list_columns::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:454
PT_partition_comment::super
PT_partition_option super
Definition: parse_tree_partitions.h:89
PT_partition_data_directory::PT_partition_data_directory
PT_partition_data_directory(const char *data_directory)
Definition: parse_tree_partitions.h:137
PT_part_definition::name
const LEX_STRING name
Definition: parse_tree_partitions.h:386
PT_part_type_def_range_columns
Node for the PARTITION BY RANGE COLUMNS (<ident list>) type clause.
Definition: parse_tree_partitions.h:538
PT_part_type_def_range_expr::expr_pos
const POS expr_pos
Definition: parse_tree_partitions.h:523
Parser_partition_info::curr_part_elem
partition_element *const curr_part_elem
Definition: partition_info.h:183
PT_partition::part_defs
Mem_root_array< PT_part_definition * > * part_defs
Definition: parse_tree_partitions.h:597
PT_part_definition::PT_part_definition
PT_part_definition(const POS &pos, const LEX_STRING &name, partition_type type, PT_part_values *const opt_part_values, const POS &values_pos, Mem_root_array< PT_partition_option * > *opt_part_options, Mem_root_array< PT_subpartition * > *opt_sub_partitions, const POS &sub_partitions_pos)
Definition: parse_tree_partitions.h:395
PT_sub_partition_by_hash::super
PT_sub_partition super
Definition: parse_tree_partitions.h:426
PT_partition
Node for the PARTITION definition clause.
Definition: parse_tree_partitions.h:590
PT_sub_partition
Base class for all subpartitioning clause nodes.
Definition: parse_tree_partitions.h:418
PT_part_type_def_list_expr::super
PT_part_type_def super
Definition: parse_tree_partitions.h:556
my_inttypes.h
PT_part_value_item_list_paren::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:125
PT_part_values_in_list
Node for a list of partitioning values in the VALUES IN clause.
Definition: parse_tree_partitions.h:363
PT_part_values_in_list::pos
const POS pos
Definition: parse_tree_partitions.h:366
PT_part_type_def_hash
Node for the PARTITION BY [LINEAR] HASH type clause.
Definition: parse_tree_partitions.h:501
PT_sub_partition_by_key::key_algo
enum_key_algorithm key_algo
Definition: parse_tree_partitions.h:453
PT_partition_max_rows::super
PT_partition_option super
Definition: parse_tree_partitions.h:175
PT_part_definition::super
Parse_tree_part_node super
Definition: parse_tree_partitions.h:383
lex_string.h
PT_subpartition::options
const Mem_root_array< PT_partition_option * > * options
Definition: parse_tree_partitions.h:262
PT_sub_partition_by_key::opt_num_subparts
const uint opt_num_subparts
Definition: parse_tree_partitions.h:455
PT_part_value_item
Base class for partition value nodes: MAX_VALUE values or expressions.
Definition: parse_tree_partitions.h:277
uint
unsigned int uint
Definition: uca-dump.cc:29
PT_part_type_def_range_expr::super
PT_part_type_def super
Definition: parse_tree_partitions.h:521
PT_part_type_def_list_columns::columns
List< char > *const columns
Definition: parse_tree_partitions.h:576
PT_part_value_item_expr
Node for the partitioning expression in CREATE/ALTER TABLE
Definition: parse_tree_partitions.h:300
PT_partition_engine::PT_partition_engine
PT_partition_engine(const LEX_CSTRING &name)
Definition: parse_tree_partitions.h:222
PT_partition_engine::name
const LEX_CSTRING name
Definition: parse_tree_partitions.h:220
PT_subpartition::pos
const POS pos
Definition: parse_tree_partitions.h:260
list
class udf_list * list
Partition_parse_context::Partition_parse_context
Partition_parse_context(THD *const thd, partition_info *part_info, partition_element *current_partition, partition_element *curr_part_elem, bool is_add_or_reorganize_partition)
Definition: parse_tree_partitions.cc:40
PT_part_type_def_key::opt_columns
List< char > *const opt_columns
Definition: parse_tree_partitions.h:486
PT_part_type_def
Definition: parse_tree_partitions.h:468
PT_part_value_item_list_paren
Node for a list of partitioning values in VALUES clauses.
Definition: parse_tree_partitions.h:325
PT_part_type_def_list_columns::PT_part_type_def_list_columns
PT_part_type_def_list_columns(List< char > *columns)
Definition: parse_tree_partitions.h:579
PT_partition_comment::comment
char * comment
Definition: parse_tree_partitions.h:91
PT_part_values_in_list::list
Mem_root_array< PT_part_value_item_list_paren * > * list
Definition: parse_tree_partitions.h:367
Partition_parse_context
Parse context for partitioning-specific parse tree nodes.
Definition: parse_tree_partitions.h:50
parse_tree_helpers.h
Parser_partition_info::current_partition
partition_element *const current_partition
Definition: partition_info.h:182
PT_part_type_def_range_expr::expr
Item * expr
Definition: parse_tree_partitions.h:524
PT_part_type_def_range_columns::PT_part_type_def_range_columns
PT_part_type_def_range_columns(List< char > *columns)
Definition: parse_tree_partitions.h:544
PT_part_type_def_range_expr
Node for the PARTITION BY RANGE (<expression>) type clause.
Definition: parse_tree_partitions.h:520
PT_part_type_def_list_expr::expr
Item * expr
Definition: parse_tree_partitions.h:559
PT_part_values_in_item::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:157
PT_part_type_def_range_columns::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:432
PT_partition::part_defs_pos
const POS part_defs_pos
Definition: parse_tree_partitions.h:596
PT_sub_partition_by_hash::opt_num_subparts
const uint opt_num_subparts
Definition: parse_tree_partitions.h:431
PT_part_type_def_hash::super
PT_part_type_def super
Definition: parse_tree_partitions.h:502
PT_part_type_def_key
Node for the PARTITION BY [LINEAR] KEY type clause.
Definition: parse_tree_partitions.h:481
PT_partition_min_rows::min_rows
ha_rows min_rows
Definition: parse_tree_partitions.h:156
partition_element
Definition: partition_element.h:107
PT_part_definition::values_pos
const POS values_pos
Definition: parse_tree_partitions.h:389
MYSQL_LEX_STRING
Definition: mysql_lex_string.h:34
YYLTYPE
Bison "location" class.
Definition: parse_location.h:43
PT_part_type_def_list_columns
Node for the PARTITION BY LIST COLUMNS (<ident list>) type clause.
Definition: parse_tree_partitions.h:573
PT_part_definition::type
partition_type type
Definition: parse_tree_partitions.h:387
Parse_tree_node_tmpl::contextualize
virtual bool contextualize(Context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_node_base.h:159
PT_partition_index_directory::index_directory
const char * index_directory
Definition: parse_tree_partitions.h:112
PT_partition_max_rows
Node for the MAX_ROWS [=] <integer> partition option.
Definition: parse_tree_partitions.h:174
PT_part_value_item_expr::super
PT_part_value_item super
Definition: parse_tree_partitions.h:301
PT_partition_nodegroup::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:203
Parser_partition_info
Definition: partition_info.h:179
partition_element.h
PT_partition_nodegroup::super
PT_partition_option super
Definition: parse_tree_partitions.h:196
PT_part_value_item_list_paren::PT_part_value_item_list_paren
PT_part_value_item_list_paren(Mem_root_array< PT_part_value_item * > *values, const POS &paren_pos)
Definition: parse_tree_partitions.h:332
resolve_engine
bool resolve_engine(THD *thd, const LEX_CSTRING &name, bool is_temp_table, bool strict, handlerton **ret)
Resolve engine by its name.
Definition: parse_tree_helpers.cc:379
Parse_context
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:99
PT_partition_index_directory
Node for the INDEX DIRECTORY [=] <string> partition option.
Definition: parse_tree_partitions.h:109
PT_part_type_def_hash::PT_part_type_def_hash
PT_part_type_def_hash(bool is_linear, const POS &expr_pos, Item *expr)
Definition: parse_tree_partitions.h:509
PT_partition::opt_sub_part
PT_sub_partition *const opt_sub_part
Definition: parse_tree_partitions.h:595
PT_part_values_in_item::super
PT_part_values super
Definition: parse_tree_partitions.h:345
PT_part_definition::pos
const POS pos
Definition: parse_tree_partitions.h:385
PT_part_values_in_item
Node for a list of partitioning values in the VALUES IN clause.
Definition: parse_tree_partitions.h:344
PT_part_value_item_max::super
PT_part_value_item super
Definition: parse_tree_partitions.h:285
PT_part_type_def_range_columns::super
PT_part_type_def super
Definition: parse_tree_partitions.h:539
Partition_parse_context::Partition_parse_context
Partition_parse_context(THD *thd_arg, partition_info *part_info_arg, bool is_add_or_reorganize_partition)
Definition: parse_tree_partitions.h:57
parse_tree_node_base.h
PT_part_type_def_key::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:395
PT_partition_tablespace::PT_partition_tablespace
PT_partition_tablespace(const char *tablespace)
Definition: parse_tree_partitions.h:243
PT_part_values_in_item::item
PT_part_value_item_list_paren * item
Definition: parse_tree_partitions.h:348
PT_part_definition::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:196
uint16
uint16_t uint16
Definition: my_inttypes.h:64
PT_partition::PT_partition
PT_partition(PT_part_type_def *part_type_def, uint opt_num_parts, PT_sub_partition *opt_sub_part, const POS &part_defs_pos, Mem_root_array< PT_part_definition * > *part_defs)
Definition: parse_tree_partitions.h:603
PT_partition_data_directory::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:140
PT_sub_partition_by_key::super
PT_sub_partition super
Definition: parse_tree_partitions.h:450
List
Definition: aggregate_check.h:523
partition_element::index_file_name
const char * index_file_name
Definition: partition_element.h:120
ha_rows
my_off_t ha_rows
Definition: my_base.h:1132
PT_sub_partition_by_hash::is_linear
const bool is_linear
Definition: parse_tree_partitions.h:428
PT_partition_comment
Node for the COMMENT [=] <string> partition option.
Definition: parse_tree_partitions.h:88
PT_subpartition::name
const char * name
Definition: parse_tree_partitions.h:261
PT_part_values_in_item::PT_part_values_in_item
PT_part_values_in_item(const POS &pos, PT_part_value_item_list_paren *item)
Definition: parse_tree_partitions.h:351
PT_part_type_def_list_expr::expr_pos
const POS expr_pos
Definition: parse_tree_partitions.h:558
PT_partition::opt_num_parts
const uint opt_num_parts
Definition: parse_tree_partitions.h:594
PT_part_definition::opt_part_options
Mem_root_array< PT_partition_option * > * opt_part_options
Definition: parse_tree_partitions.h:390
PT_partition_nodegroup
Node for the NODEGROUP [=] <integer> partition option.
Definition: parse_tree_partitions.h:195
partition_info
Definition: partition_info.h:208
PT_part_type_def_key::key_algo
const enum_key_algorithm key_algo
Definition: parse_tree_partitions.h:485
PT_part_type_def_hash::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.cc:409
PT_part_value_item_max::PT_part_value_item_max
PT_part_value_item_max(const POS &pos)
Definition: parse_tree_partitions.h:290
PT_part_type_def_key::super
PT_part_type_def super
Definition: parse_tree_partitions.h:482
PT_part_definition::opt_part_values
PT_part_values *const opt_part_values
Definition: parse_tree_partitions.h:388
PT_partition_data_directory::data_directory
const char * data_directory
Definition: parse_tree_partitions.h:134
mem_root_array.h
PT_partition_tablespace::contextualize
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:246
PT_partition_comment::PT_partition_comment
PT_partition_comment(char *comment)
Definition: parse_tree_partitions.h:94
partition_element::part_comment
char * part_comment
Definition: partition_element.h:118
enum_key_algorithm
enum_key_algorithm
PARTITION BY KEY ALGORITHM=N Which algorithm to use for hashing the fields.
Definition: partition_info.h:173
PT_partition_data_directory::super
PT_partition_option super
Definition: parse_tree_partitions.h:132
PT_part_type_def_hash::expr_pos
const POS expr_pos
Definition: parse_tree_partitions.h:505
PT_sub_partition_by_key::field_names
List< char > * field_names
Definition: parse_tree_partitions.h:454
partition_element::part_max_rows
ha_rows part_max_rows
Definition: partition_element.h:113
PT_partition_engine::super
PT_partition_option super
Definition: parse_tree_partitions.h:217