MySQL  8.0.21
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,
58  bool is_add_or_reorganize_partition)
59  : Partition_parse_context(thd_arg, part_info_arg, nullptr, nullptr,
60  is_add_or_reorganize_partition) {}
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:
94  explicit PT_partition_comment(char *comment) : comment(comment) {}
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:
115  explicit PT_partition_index_directory(const char *index_directory)
116  : index_directory(index_directory) {}
117 
119  if (super::contextualize(pc)) return true;
120 
121  pc->curr_part_elem->index_file_name = index_directory;
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:
137  explicit PT_partition_data_directory(const char *data_directory)
138  : data_directory(data_directory) {}
139 
141  if (super::contextualize(pc)) return true;
142 
143  pc->curr_part_elem->data_file_name = data_directory;
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:
159  explicit PT_partition_min_rows(ha_rows min_rows) : min_rows(min_rows) {}
160 
162  if (super::contextualize(pc)) return true;
163 
164  pc->curr_part_elem->part_min_rows = min_rows;
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:
180  explicit PT_partition_max_rows(ha_rows max_rows) : max_rows(max_rows) {}
181 
183  if (super::contextualize(pc)) return true;
184 
185  pc->curr_part_elem->part_max_rows = max_rows;
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:
201  explicit PT_partition_nodegroup(uint16 nodegroup) : nodegroup(nodegroup) {}
202 
204  if (super::contextualize(pc)) return true;
205 
206  pc->curr_part_elem->nodegroup_id = nodegroup;
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 
222  explicit PT_partition_engine(const LEX_CSTRING &name) : name(name) {}
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 
249  pc->curr_part_elem->tablespace_name = tablespace;
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:
307  explicit PT_part_value_item_expr(const POS &pos, Item *expr)
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:
333  Mem_root_array<PT_part_value_item *> *values, const POS &paren_pos)
334  : values(values), paren_pos(paren_pos) {}
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:
395  PT_part_definition(const POS &pos, const LEX_STRING &name,
396  partition_type type, PT_part_values *const opt_part_values,
397  const POS &values_pos,
398  Mem_root_array<PT_partition_option *> *opt_part_options,
399  Mem_root_array<PT_subpartition *> *opt_sub_partitions,
400  const POS &sub_partitions_pos)
401  : pos(pos),
402  name(name),
403  type(type),
404  opt_part_values(opt_part_values),
405  values_pos(values_pos),
406  opt_part_options(opt_part_options),
407  opt_sub_partitions(opt_sub_partitions),
408  sub_partitions_pos(sub_partitions_pos) {}
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:
434  PT_sub_partition_by_hash(bool is_linear, const POS &hash_pos, Item *hash,
435  uint opt_num_subparts)
436  : is_linear(is_linear),
437  hash_pos(hash_pos),
438  hash(hash),
439  opt_num_subparts(opt_num_subparts) {}
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:
458  PT_sub_partition_by_key(bool is_linear, enum_key_algorithm key_algo,
459  List<char> *field_names, const uint opt_num_subparts)
460  : is_linear(is_linear),
461  key_algo(key_algo),
462  field_names(field_names),
463  opt_num_subparts(opt_num_subparts) {}
464 
465  bool contextualize(Partition_parse_context *pc) override;
466 };
467 
469  protected:
470  bool set_part_field_list(Partition_parse_context *pc, List<char> *list);
471 
472  bool itemize_part_expr(Partition_parse_context *pc, const POS &pos,
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:
489  PT_part_type_def_key(bool is_linear, enum_key_algorithm key_algo,
490  List<char> *opt_columns)
491  : is_linear(is_linear), key_algo(key_algo), opt_columns(opt_columns) {}
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:
509  PT_part_type_def_hash(bool is_linear, const POS &expr_pos, Item *expr)
510  : is_linear(is_linear), expr_pos(expr_pos), expr(expr) {}
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:
527  PT_part_type_def_range_expr(const POS &expr_pos, Item *expr)
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:
562  PT_part_type_def_list_expr(const POS &expr_pos, Item *expr)
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:
603  PT_partition(PT_part_type_def *part_type_def, uint opt_num_parts,
604  PT_sub_partition *opt_sub_part, const POS &part_defs_pos,
606  : part_type_def(part_type_def),
607  opt_num_parts(opt_num_parts),
608  opt_sub_part(opt_sub_part),
609  part_defs_pos(part_defs_pos),
610  part_defs(part_defs) {}
611 
612  bool contextualize(Parse_context *pc) override;
613 };
614 
615 #endif /* PARSE_TREE_PARTITIONS_INCLUDED */
PT_partition_option super
Definition: parse_tree_partitions.h:89
PT_part_type_def_list_columns(List< char > *columns)
Definition: parse_tree_partitions.h:579
Definition: partition_info.h:208
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:161
PT_partition_option super
Definition: parse_tree_partitions.h:196
Parse_tree_node super
Definition: parse_tree_partitions.h:591
const char * index_directory
Definition: parse_tree_partitions.h:112
const POS expr_pos
Definition: parse_tree_partitions.h:558
Node for the DATA DIRECTORY [=] <string> partition option.
Definition: parse_tree_partitions.h:131
const POS pos
Definition: parse_tree_partitions.h:287
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_partition_option super
Definition: parse_tree_partitions.h:154
partition_element *const curr_part_elem
Definition: partition_info.h:183
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
List< char > *const columns
Definition: parse_tree_partitions.h:576
Mem_root_array< PT_subpartition * > * opt_sub_partitions
Definition: parse_tree_partitions.h:391
Definition: mysql_lex_string.h:34
PT_partition_option super
Definition: parse_tree_partitions.h:110
handlerton * engine_type
Definition: partition_element.h:121
PT_sub_partition super
Definition: parse_tree_partitions.h:426
const bool is_linear
Definition: parse_tree_partitions.h:428
Node for the TABLESPACE [=] <identifier> partition option.
Definition: parse_tree_partitions.h:237
List< char > * field_names
Definition: parse_tree_partitions.h:454
Node for a list of partitioning values in VALUES clauses.
Definition: parse_tree_partitions.h:325
Parse context for partitioning-specific parse tree nodes.
Definition: parse_tree_partitions.h:50
Some integer typedefs for easier portability.
Node for the PARTITION BY LIST COLUMNS (<ident list>) type clause.
Definition: parse_tree_partitions.h:573
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:224
PT_partition_min_rows(ha_rows min_rows)
Definition: parse_tree_partitions.h:159
partition_type type
Definition: parse_tree_partitions.h:387
Node for the [STORAGE] ENGINE [=] <identifier|string> partition option.
Definition: parse_tree_partitions.h:216
enum_key_algorithm
PARTITION BY KEY ALGORITHM=N Which algorithm to use for hashing the fields.
Definition: partition_info.h:173
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:118
PT_partition_comment(char *comment)
Definition: parse_tree_partitions.h:94
Node for the PARTITION BY LIST (<expression>) type clause.
Definition: parse_tree_partitions.h:555
Base class for all partition options.
Definition: parse_tree_partitions.h:81
Definition: mysql_lex_string.h:39
Definition: partition_element.h:107
uint16 nodegroup
Definition: parse_tree_partitions.h:198
Definition: parse_tree_partitions.h:468
List< char > *const columns
Definition: parse_tree_partitions.h:541
class udf_list * list
const char * tablespace_name
Definition: partition_element.h:117
Item * expr
Definition: parse_tree_partitions.h:559
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 super
Definition: parse_tree_partitions.h:285
Node for the PARTITION BY [LINEAR] KEY type clause.
Definition: parse_tree_partitions.h:481
PT_partition_option super
Definition: parse_tree_partitions.h:132
Base class for all subpartitioning clause nodes.
Definition: parse_tree_partitions.h:418
PT_part_value_item_expr(const POS &pos, Item *expr)
Definition: parse_tree_partitions.h:307
const char * index_file_name
Definition: partition_element.h:120
Node for the PARTITION definition clause.
Definition: parse_tree_partitions.h:590
List< char > *const opt_columns
Definition: parse_tree_partitions.h:486
const uint opt_num_subparts
Definition: parse_tree_partitions.h:431
const POS pos
Definition: parse_tree_partitions.h:347
PT_sub_partition *const opt_sub_part
Definition: parse_tree_partitions.h:595
PT_part_values super
Definition: parse_tree_partitions.h:364
char * comment
Definition: parse_tree_partitions.h:91
Item * expr
Definition: parse_tree_partitions.h:524
Node for the INDEX DIRECTORY [=] <string> partition option.
Definition: parse_tree_partitions.h:109
PT_part_type_def super
Definition: parse_tree_partitions.h:556
partition_type
An enum and a struct to handle partitioning and subpartitioning.
Definition: partition_element.h:32
const bool is_linear
Definition: parse_tree_partitions.h:452
Base class for partition value nodes: MAX_VALUE values or expressions.
Definition: parse_tree_partitions.h:277
const POS part_defs_pos
Definition: parse_tree_partitions.h:596
const uint opt_num_parts
Definition: parse_tree_partitions.h:594
PT_part_value_item super
Definition: parse_tree_partitions.h:301
char * part_comment
Definition: partition_element.h:118
This file includes constants used by all storage engines.
uint16 nodegroup_id
Definition: partition_element.h:123
partition_info part_info
Definition: parse_tree_partitions.h:600
PT_part_values *const opt_part_values
Definition: parse_tree_partitions.h:388
enum_key_algorithm key_algo
Definition: parse_tree_partitions.h:453
Node for the PARTITION BY [LINEAR] HASH type clause.
Definition: parse_tree_partitions.h:501
PT_part_type_def super
Definition: parse_tree_partitions.h:482
const LEX_STRING name
Definition: parse_tree_partitions.h:386
char * pos
Definition: do_ctype.cc:76
PT_part_type_def super
Definition: parse_tree_partitions.h:502
Bison "location" class.
Definition: parse_location.h:43
const uint opt_num_subparts
Definition: parse_tree_partitions.h:455
Node for a list of partitioning values in the VALUES IN clause.
Definition: parse_tree_partitions.h:363
PT_part_type_def_key(bool is_linear, enum_key_algorithm key_algo, List< char > *opt_columns)
Definition: parse_tree_partitions.h:489
Definition: aggregate_check.h:523
PT_part_type_def *const part_type_def
Definition: parse_tree_partitions.h:593
const POS paren_pos
Definition: parse_tree_partitions.h:329
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
ha_rows max_rows
Definition: parse_tree_partitions.h:177
Parse_tree_part_node super
Definition: parse_tree_partitions.h:383
PT_part_values super
Definition: parse_tree_partitions.h:326
const POS pos
Definition: parse_tree_partitions.h:366
Node for the SUBRAPTITION BY KEY definition clause.
Definition: parse_tree_partitions.h:449
PT_part_type_def_range_columns(List< char > *columns)
Definition: parse_tree_partitions.h:544
PT_part_value_item_list_paren(Mem_root_array< PT_part_value_item *> *values, const POS &paren_pos)
Definition: parse_tree_partitions.h:332
PT_part_values_in_item(const POS &pos, PT_part_value_item_list_paren *item)
Definition: parse_tree_partitions.h:351
uint16_t uint16
Definition: my_inttypes.h:64
Definition: item.h:741
unsigned int uint
Definition: uca-dump.cc:29
Item * expr
Definition: parse_tree_partitions.h:506
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:111
THD *const thd
Current thread handler.
Definition: parse_tree_node_base.h:100
partition_info *const part_info
Definition: partition_info.h:181
Item * hash
Definition: parse_tree_partitions.h:430
ha_rows part_max_rows
Definition: partition_element.h:113
const POS expr_pos
Definition: parse_tree_partitions.h:505
PT_partition_index_directory(const char *index_directory)
Definition: parse_tree_partitions.h:115
partition_element *const current_partition
Definition: partition_info.h:182
PT_sub_partition_by_hash(bool is_linear, const POS &hash_pos, Item *hash, uint opt_num_subparts)
Definition: parse_tree_partitions.h:434
PT_part_value_item_list_paren * item
Definition: parse_tree_partitions.h:348
Node for the MIN_ROWS [=] <integer> partition option.
Definition: parse_tree_partitions.h:153
Node for the PARTITION BY RANGE (<expression>) type clause.
Definition: parse_tree_partitions.h:520
ha_rows part_min_rows
Definition: partition_element.h:114
PT_partition_engine(const LEX_CSTRING &name)
Definition: parse_tree_partitions.h:222
const POS pos
Definition: parse_tree_partitions.h:303
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:389
const POS values_pos
Definition: parse_tree_partitions.h:389
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:99
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
const char * data_directory
Definition: parse_tree_partitions.h:134
Definition: partition_info.h:179
PT_partition_option super
Definition: parse_tree_partitions.h:238
const char * data_file_name
Definition: partition_element.h:119
const Mem_root_array< PT_partition_option * > * options
Definition: parse_tree_partitions.h:262
Node for the SUBRAPTITION BY HASH definition clause.
Definition: parse_tree_partitions.h:425
PT_partition_option super
Definition: parse_tree_partitions.h:175
PT_part_type_def_hash(bool is_linear, const POS &expr_pos, Item *expr)
Definition: parse_tree_partitions.h:509
PT_partition_data_directory(const char *data_directory)
Definition: parse_tree_partitions.h:137
Mem_root_array< PT_partition_option * > * opt_part_options
Definition: parse_tree_partitions.h:390
Node for the NODEGROUP [=] <integer> partition option.
Definition: parse_tree_partitions.h:195
Mem_root_array< PT_part_value_item * > * values
Definition: parse_tree_partitions.h:328
Partition_parse_context(THD *thd_arg, partition_info *part_info_arg, bool is_add_or_reorganize_partition)
Definition: parse_tree_partitions.h:57
const char * name
Definition: parse_tree_partitions.h:261
PT_part_values super
Definition: parse_tree_partitions.h:345
PT_partition_max_rows(ha_rows max_rows)
Definition: parse_tree_partitions.h:180
PT_partition_tablespace(const char *tablespace)
Definition: parse_tree_partitions.h:243
const POS sub_partitions_pos
Definition: parse_tree_partitions.h:392
Node for a list of partitioning values in the VALUES IN clause.
Definition: parse_tree_partitions.h:344
Node for the MAX_ROWS [=] <integer> partition option.
Definition: parse_tree_partitions.h:174
Item * expr
Definition: parse_tree_partitions.h:304
const bool is_linear
Definition: parse_tree_partitions.h:484
const POS expr_pos
Definition: parse_tree_partitions.h:523
Node for the COMMENT [=] <string> partition option.
Definition: parse_tree_partitions.h:88
PT_part_values_in_list(const POS &pos, Mem_root_array< PT_part_value_item_list_paren *> *list)
Definition: parse_tree_partitions.h:370
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:140
PT_part_type_def super
Definition: parse_tree_partitions.h:574
Node for the partitioning expression in CREATE/ALTER TABLE
Definition: parse_tree_partitions.h:300
Node for the PARTITION clause of CREATE/ALTER TABLE.
Definition: parse_tree_partitions.h:382
PT_part_type_def super
Definition: parse_tree_partitions.h:521
PT_part_value_item_max(const POS &pos)
Definition: parse_tree_partitions.h:290
ha_rows min_rows
Definition: parse_tree_partitions.h:156
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:96
const POS pos
Definition: parse_tree_partitions.h:260
const POS hash_pos
Definition: parse_tree_partitions.h:429
Node for the SUBRAPTITION clause of CREATE/ALTER TABLE
Definition: parse_tree_partitions.h:259
const POS pos
Definition: parse_tree_partitions.h:385
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:182
PT_part_type_def_range_expr(const POS &expr_pos, Item *expr)
Definition: parse_tree_partitions.h:527
Mem_root_array< PT_part_definition * > * part_defs
Definition: parse_tree_partitions.h:597
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:246
Node for the MAX_VALUE partition value in CREATE/ALTER TABLE
Definition: parse_tree_partitions.h:284
const bool is_linear
Definition: parse_tree_partitions.h:504
Mem_root_array< PT_part_value_item_list_paren * > * list
Definition: parse_tree_partitions.h:367
bool contextualize(Partition_parse_context *pc) override
Definition: parse_tree_partitions.h:203
PT_sub_partition super
Definition: parse_tree_partitions.h:450
Base class for VALUES partitioning clauses.
Definition: parse_tree_partitions.h:318
const LEX_CSTRING name
Definition: parse_tree_partitions.h:220
Node for the PARTITION BY RANGE COLUMNS (<ident list>) type clause.
Definition: parse_tree_partitions.h:538
PT_part_type_def_list_expr(const POS &expr_pos, Item *expr)
Definition: parse_tree_partitions.h:562
PT_partition_option super
Definition: parse_tree_partitions.h:217
const bool is_add_or_reorganize_partition
True for "ALTER TABLE ADD PARTITION" and "ALTER TABLE REORGANIZE PARTITION" statements, otherwise false.
Definition: parse_tree_partitions.h:66
const char * tablespace
Definition: parse_tree_partitions.h:240
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:381
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_off_t ha_rows
Definition: my_base.h:1135
const enum_key_algorithm key_algo
Definition: parse_tree_partitions.h:485
#define comment
Definition: lexyy.cc:959
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:799
Dialog Client Authentication nullptr
Definition: dialog.cc:353
PT_part_type_def super
Definition: parse_tree_partitions.h:539
PT_partition_nodegroup(uint16 nodegroup)
Definition: parse_tree_partitions.h:201