MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sql_admin.h
1 /* Copyright (c) 2010, 2013, 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_TABLE_MAINTENANCE_H
17 #define SQL_TABLE_MAINTENANCE_H
18 
19 /* Must be able to hold ALTER TABLE t PARTITION BY ... KEY ALGORITHM = 1 ... */
20 #define SQL_ADMIN_MSG_TEXT_SIZE 128 * 1024
21 
22 bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* table_list,
23  LEX_STRING *key_cache_name);
24 bool mysql_preload_keys(THD* thd, TABLE_LIST* table_list);
25 int reassign_keycache_tables(THD* thd, KEY_CACHE *src_cache,
26  KEY_CACHE *dst_cache);
27 
32 {
33 public:
38  {}
39 
41  {}
42 
43  bool execute(THD *thd);
44 
45  virtual enum_sql_command sql_command_code() const
46  {
47  return SQLCOM_ANALYZE;
48  }
49 };
50 
51 
52 
57 {
58 public:
63  {}
64 
66  {}
67 
68  bool execute(THD *thd);
69 
70  virtual enum_sql_command sql_command_code() const
71  {
72  return SQLCOM_CHECK;
73  }
74 };
75 
76 
81 {
82 public:
87  {}
88 
90  {}
91 
92  bool execute(THD *thd);
93 
94  virtual enum_sql_command sql_command_code() const
95  {
96  return SQLCOM_OPTIMIZE;
97  }
98 };
99 
100 
101 
106 {
107 public:
112  {}
113 
115  {}
116 
117  bool execute(THD *thd);
118 
119  virtual enum_sql_command sql_command_code() const
120  {
121  return SQLCOM_REPAIR;
122  }
123 };
124 
125 #endif