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