1
/* Copyright (C) 2006 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
17
* An enum and a struct to handle partitioning and subpartitioning.
26
enum partition_state {
29
PART_TO_BE_DROPPED= 2,
31
PART_TO_BE_REORGED= 4,
32
PART_REORGED_DROPPED= 5,
39
This struct is used to contain the value of an element
40
in the VALUES IN struct. It needs to keep knowledge of
41
whether it is a signed/unsigned value and whether it is
45
typedef struct p_elem_val
52
struct st_ddl_log_memory_entry;
54
class partition_element :public Sql_alloc {
56
List<partition_element> subpartitions;
57
List<part_elem_value> list_val_list;
58
ha_rows part_max_rows;
59
ha_rows part_min_rows;
62
char *tablespace_name;
63
struct st_ddl_log_memory_entry *log_entry;
66
char* index_file_name;
67
handlerton *engine_type;
68
enum partition_state part_state;
71
bool signed_flag;/* Indicate whether this partition uses signed constants */
72
bool max_value; /* Indicate whether this partition uses MAXVALUE */
75
: part_max_rows(0), part_min_rows(0), range_value(0),
76
partition_name(NULL), tablespace_name(NULL),
77
log_entry(NULL), part_comment(NULL),
78
data_file_name(NULL), index_file_name(NULL),
79
engine_type(NULL), part_state(PART_NORMAL),
80
nodegroup_id(UNDEF_NODEGROUP), has_null_value(FALSE),
81
signed_flag(FALSE), max_value(FALSE)
84
partition_element(partition_element *part_elem)
85
: part_max_rows(part_elem->part_max_rows),
86
part_min_rows(part_elem->part_min_rows),
87
range_value(0), partition_name(NULL),
88
tablespace_name(part_elem->tablespace_name),
89
part_comment(part_elem->part_comment),
90
data_file_name(part_elem->data_file_name),
91
index_file_name(part_elem->index_file_name),
92
engine_type(part_elem->engine_type),
93
part_state(part_elem->part_state),
94
nodegroup_id(part_elem->nodegroup_id),
98
~partition_element() {}