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