26
26
#ifndef DRIZZLED_SQL_TABLE_H
27
27
#define DRIZZLED_SQL_TABLE_H
29
#include "drizzled/base.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
class TableIdentifier;
34
namespace drizzled { namespace message { class Table; } }
45
36
int mysql_rm_table_part2(Session *session, TableList *tables, bool if_exists,
46
37
bool drop_temporary);
38
void write_bin_log_drop_table(Session *session,
39
bool if_exists, const char *db_name,
40
const char *table_name);
41
bool quick_rm_table(Session& session,
42
drizzled::TableIdentifier &identifier);
47
43
void close_cached_table(Session *session, Table *table);
49
45
void wait_while_table_is_used(Session *session, Table *table,
50
46
enum ha_extra_function function);
48
bool mysql_checksum_table(Session* session, TableList* table_list,
49
HA_CHECK_OPT* check_opt);
52
50
bool mysql_check_table(Session* session, TableList* table_list,
53
51
HA_CHECK_OPT* check_opt);
54
52
bool mysql_analyze_table(Session* session, TableList* table_list,
56
54
bool mysql_optimize_table(Session* session, TableList* table_list,
57
55
HA_CHECK_OPT* check_opt);
59
void write_bin_log(Session *session, const std::string &query);
57
void write_bin_log(Session *session,
58
char const *query, size_t query_length);
61
bool is_primary_key(KeyInfo *key_info);
60
bool is_primary_key(KEY *key_info);
62
61
const char* is_primary_key_name(const char* key_name);
63
bool check_engine(Session *, const char *, message::Table *, HA_CREATE_INFO *);
62
bool check_engine(Session *, const char *, drizzled::message::Table *, HA_CREATE_INFO *);
64
63
void set_table_default_charset(HA_CREATE_INFO *create_info, const char *db);
65
} /* namespace drizzled */
65
Preparation for table creation
68
mysql_prepare_create_table()
69
session Thread object.
70
create_info Create information (like MAX_ROWS).
71
alter_info List of columns and indexes to create
72
tmp_table If a temporary table is to be created.
73
db_options INOUT Table options (like HA_OPTION_PACK_RECORD).
74
file The Cursor for the new table.
75
key_info_buffer OUT An array of KEY structs for the indexes.
76
key_count OUT The number of elements in the array.
77
select_field_count The number of fields coming from a select table.
80
Prepares the table and key structures for table creation.
83
sets create_info->varchar if the table has a varchar
89
int mysql_prepare_create_table(Session *session,
90
HA_CREATE_INFO *create_info,
91
drizzled::message::Table *create_proto,
92
AlterInfo *alter_info,
96
KEY **key_info_buffer,
98
int select_field_count);
67
100
#endif /* DRIZZLED_SQL_TABLE_H */