1
/* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
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 */
16
#ifndef SQL_TABLE_MAINTENANCE_H
17
#define SQL_TABLE_MAINTENANCE_H
19
/* Must be able to hold ALTER TABLE t PARTITION BY ... KEY ALGORITHM = 1 ... */
20
#define SQL_ADMIN_MSG_TEXT_SIZE 128 * 1024
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);
29
Sql_cmd_analyze_table represents the ANALYZE TABLE statement.
31
class Sql_cmd_analyze_table : public Sql_cmd
35
Constructor, used to represent a ANALYZE TABLE statement.
37
Sql_cmd_analyze_table()
40
~Sql_cmd_analyze_table()
43
bool execute(THD *thd);
45
virtual enum_sql_command sql_command_code() const
47
return SQLCOM_ANALYZE;
54
Sql_cmd_check_table represents the CHECK TABLE statement.
56
class Sql_cmd_check_table : public Sql_cmd
60
Constructor, used to represent a CHECK TABLE statement.
65
~Sql_cmd_check_table()
68
bool execute(THD *thd);
70
virtual enum_sql_command sql_command_code() const
78
Sql_cmd_optimize_table represents the OPTIMIZE TABLE statement.
80
class Sql_cmd_optimize_table : public Sql_cmd
84
Constructor, used to represent a OPTIMIZE TABLE statement.
86
Sql_cmd_optimize_table()
89
~Sql_cmd_optimize_table()
92
bool execute(THD *thd);
94
virtual enum_sql_command sql_command_code() const
96
return SQLCOM_OPTIMIZE;
103
Sql_cmd_repair_table represents the REPAIR TABLE statement.
105
class Sql_cmd_repair_table : public Sql_cmd
109
Constructor, used to represent a REPAIR TABLE statement.
111
Sql_cmd_repair_table()
114
~Sql_cmd_repair_table()
117
bool execute(THD *thd);
119
virtual enum_sql_command sql_command_code() const
121
return SQLCOM_REPAIR;