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; } }
36
bool mysql_rm_table(Session *session,TableList *tables, bool if_exists,
45
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(Session& session, 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);
47
bool mysql_checksum_table(Session* session, TableList* table_list,
48
HA_CHECK_OPT* check_opt);
52
49
bool mysql_check_table(Session* session, TableList* table_list,
53
50
HA_CHECK_OPT* check_opt);
54
51
bool mysql_analyze_table(Session* session, TableList* table_list,
56
53
bool mysql_optimize_table(Session* session, TableList* table_list,
57
54
HA_CHECK_OPT* check_opt);
59
void write_bin_log(Session *session, const std::string &query);
56
void write_bin_log(Session *session,
57
char const *query, size_t query_length);
61
bool is_primary_key(KeyInfo *key_info);
59
bool is_primary_key(KEY *key_info);
62
60
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 */
61
bool check_engine(Session *, const char *, HA_CREATE_INFO *);
62
void set_table_default_charset(HA_CREATE_INFO *create_info, char *db);
64
Preparation for table creation
67
mysql_prepare_create_table()
68
session Thread object.
69
create_info Create information (like MAX_ROWS).
70
alter_info List of columns and indexes to create
71
tmp_table If a temporary table is to be created.
72
db_options INOUT Table options (like HA_OPTION_PACK_RECORD).
73
file The Cursor for the new table.
74
key_info_buffer OUT An array of KEY structs for the indexes.
75
key_count OUT The number of elements in the array.
76
select_field_count The number of fields coming from a select table.
79
Prepares the table and key structures for table creation.
82
sets create_info->varchar if the table has a varchar
88
int mysql_prepare_create_table(Session *session,
89
HA_CREATE_INFO *create_info,
90
drizzled::message::Table *create_proto,
91
AlterInfo *alter_info,
95
KEY **key_info_buffer,
97
int select_field_count);
67
99
#endif /* DRIZZLED_SQL_TABLE_H */