23
23
Routines to drop, repair, optimize, analyze, and check a schema table
26
#ifndef DRIZZLED_SQL_TABLE_H
27
#define DRIZZLED_SQL_TABLE_H
29
#include <drizzled/base.h>
26
#ifndef DRIZZLE_SERVER_SQL_TABLE_H
27
#define DRIZZLE_SERVER_SQL_TABLE_H
36
31
typedef struct st_ha_check_opt HA_CHECK_OPT;
38
typedef struct st_ha_create_information HA_CREATE_INFO;
42
namespace message { class Table; }
43
namespace identifier { class Table; }
45
int rm_table_part2(Session *session, TableList *tables, bool if_exists,
34
namespace drizzled { namespace message { class Table; } }
36
bool mysql_rm_table(Session *session,TableList *tables, bool if_exists,
38
int mysql_rm_table_part2(Session *session, TableList *tables, bool if_exists,
39
bool drop_temporary, bool log_query);
40
bool quick_rm_table(StorageEngine *, const char *db,
41
const char *table_name, bool is_tmp);
47
42
void close_cached_table(Session *session, Table *table);
49
44
void wait_while_table_is_used(Session *session, Table *table,
50
45
enum ha_extra_function function);
52
bool check_table(Session* session, TableList* table_list,
53
HA_CHECK_OPT* check_opt);
54
bool analyze_table(Session* session, TableList* table_list,
55
HA_CHECK_OPT* check_opt);
56
bool optimize_table(Session* session, TableList* table_list,
57
HA_CHECK_OPT* check_opt);
59
void write_bin_log(Session *session, const std::string &query);
61
bool is_primary_key(KeyInfo *key_info);
47
bool mysql_alter_table(Session *session, char *new_db, char *new_name,
48
HA_CREATE_INFO *create_info,
49
drizzled::message::Table *create_proto,
50
TableList *table_list,
51
Alter_info *alter_info,
52
uint32_t order_num, order_st *order, bool ignore);
53
bool mysql_checksum_table(Session* session, TableList* table_list,
54
HA_CHECK_OPT* check_opt);
55
bool mysql_check_table(Session* session, TableList* table_list,
56
HA_CHECK_OPT* check_opt);
57
bool mysql_analyze_table(Session* session, TableList* table_list,
58
HA_CHECK_OPT* check_opt);
59
bool mysql_optimize_table(Session* session, TableList* table_list,
60
HA_CHECK_OPT* check_opt);
62
void write_bin_log(Session *session, bool clear_error,
63
char const *query, size_t query_length);
65
bool is_primary_key(KEY *key_info);
62
66
const char* is_primary_key_name(const char* key_name);
63
bool check_engine(Session *, const char *, message::Table *, HA_CREATE_INFO *);
64
void set_table_default_charset(HA_CREATE_INFO *create_info, const char *db);
65
} /* namespace drizzled */
67
#endif /* DRIZZLED_SQL_TABLE_H */
68
#endif /* DRIZZLE_SERVER_SQL_TABLE_H */