MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sql_partition_admin.h
1 /* Copyright (c) 2010, 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 as published by
5  the Free Software Foundation; version 2 of the License.
6 
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.
11 
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 */
15 
16 #ifndef SQL_PARTITION_ADMIN_H
17 #define SQL_PARTITION_ADMIN_H
18 
19 #ifndef WITH_PARTITION_STORAGE_ENGINE
20 
26 {
27 public:
29  {}
30 
32  {}
33 
34  /* Override SQLCOM_*, since it is an ALTER command */
35  virtual enum_sql_command sql_command_code() const
36  {
37  return SQLCOM_ALTER_TABLE;
38  }
39 
40  bool execute(THD *thd);
41 };
42 
43 
46 {
47 public:
49  {}
50 
52  {}
53 };
54 
55 
58 {
59 public:
61  {}
62 
64  {}
65 };
66 
67 
70 {
71 public:
73  {}
74 
76  {}
77 };
78 
79 
82 {
83 public:
85  {}
86 
88  {}
89 };
90 
91 
94 {
95 public:
97  {}
98 
100  {}
101 };
102 
103 
106 {
107 public:
109  {}
110 
112  {}
113 };
114 
115 #else
116 
122 {
123 public:
129  {}
130 
132  {}
133 
134  bool execute(THD *thd);
135 
136 private:
137  bool exchange_partition(THD *thd, TABLE_LIST *, Alter_info *);
138 };
139 
140 
145 {
146 public:
152  {}
153 
155  {}
156 
157  bool execute(THD *thd);
158 
159  /* Override SQLCOM_ANALYZE, since it is an ALTER command */
160  virtual enum_sql_command sql_command_code() const
161  {
162  return SQLCOM_ALTER_TABLE;
163  }
164 };
165 
166 
171 {
172 public:
178  {}
179 
181  {}
182 
183  bool execute(THD *thd);
184 
185  /* Override SQLCOM_CHECK, since it is an ALTER command */
186  virtual enum_sql_command sql_command_code() const
187  {
188  return SQLCOM_ALTER_TABLE;
189  }
190 };
191 
192 
197 {
198 public:
204  {}
205 
207  {}
208 
209  bool execute(THD *thd);
210 
211  /* Override SQLCOM_OPTIMIZE, since it is an ALTER command */
212  virtual enum_sql_command sql_command_code() const
213  {
214  return SQLCOM_ALTER_TABLE;
215  }
216 };
217 
218 
223 {
224 public:
230  {}
231 
233  {}
234 
235  bool execute(THD *thd);
236 
237  /* Override SQLCOM_REPAIR, since it is an ALTER command */
238  virtual enum_sql_command sql_command_code() const
239  {
240  return SQLCOM_ALTER_TABLE;
241  }
242 };
243 
244 
249 {
250 public:
255  {}
256 
258  {}
259 
260  bool execute(THD *thd);
261 
262  /* Override SQLCOM_TRUNCATE, since it is an ALTER command */
263  virtual enum_sql_command sql_command_code() const
264  {
265  return SQLCOM_ALTER_TABLE;
266  }
267 };
268 
269 #endif /* WITH_PARTITION_STORAGE_ENGINE */
270 #endif /* SQL_PARTITION_ADMIN_H */