~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.h

Added pandora check for berkeley db.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#ifndef DRIZZLED_SQL_TABLE_H
27
27
#define DRIZZLED_SQL_TABLE_H
28
28
 
29
 
#include "drizzled/base.h"
30
 
 
31
 
namespace drizzled
32
 
{
33
 
 
34
29
class Session;
35
30
class TableList;
36
31
typedef struct st_ha_check_opt HA_CHECK_OPT;
37
32
class Table;
38
 
typedef struct st_ha_create_information HA_CREATE_INFO;
39
 
class AlterInfo;
40
 
class Cursor;
41
 
 
42
 
namespace message { class Table; }
43
 
class TableIdentifier;
44
 
 
 
33
 
 
34
namespace drizzled { namespace message { class Table; } }
 
35
 
 
36
bool mysql_rm_table(Session *session,TableList *tables, bool if_exists,
 
37
                    bool drop_temporary);
45
38
int mysql_rm_table_part2(Session *session, TableList *tables, bool if_exists,
46
 
                         bool drop_temporary);
 
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);
48
43
 
49
44
void wait_while_table_is_used(Session *session, Table *table,
50
45
                              enum ha_extra_function function);
51
46
 
 
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);
58
55
 
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);
60
58
 
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);
 
63
/*
 
64
  Preparation for table creation
 
65
 
 
66
  SYNOPSIS
 
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.
 
77
 
 
78
  DESCRIPTION
 
79
    Prepares the table and key structures for table creation.
 
80
 
 
81
  NOTES
 
82
    sets create_info->varchar if the table has a varchar
 
83
 
 
84
  RETURN VALUES
 
85
    false    OK
 
86
    true     error
 
87
*/
 
88
int mysql_prepare_create_table(Session *session,
 
89
                               HA_CREATE_INFO *create_info,
 
90
                               drizzled::message::Table *create_proto,
 
91
                               AlterInfo *alter_info,
 
92
                               bool tmp_table,
 
93
                               uint32_t *db_options,
 
94
                               Cursor *file,
 
95
                               KEY **key_info_buffer,
 
96
                               uint32_t *key_count,
 
97
                               int select_field_count);
66
98
 
67
99
#endif /* DRIZZLED_SQL_TABLE_H */