~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.h

  • Committer: Brian Aker
  • Date: 2009-08-04 06:21:17 UTC
  • mfrom: (1108.2.2 merge)
  • Revision ID: brian@gaz-20090804062117-fef8x6y3ydzrvab3
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
23
23
  Routines to drop, repair, optimize, analyze, and check a schema table
24
24
 
25
25
*/
26
 
#ifndef DRIZZLED_SQL_TABLE_H
27
 
#define DRIZZLED_SQL_TABLE_H
28
 
 
29
 
#include "drizzled/base.h"
30
 
 
31
 
namespace drizzled
32
 
{
 
26
#ifndef DRIZZLE_SERVER_SQL_TABLE_H
 
27
#define DRIZZLE_SERVER_SQL_TABLE_H
33
28
 
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
 
namespace identifier { class Table; }
44
 
 
45
 
int rm_table_part2(Session *session, TableList *tables, bool if_exists,
46
 
                         bool drop_temporary);
 
33
 
 
34
bool mysql_rm_table(Session *session,TableList *tables, bool if_exists,
 
35
                    bool drop_temporary);
 
36
int mysql_rm_table_part2(Session *session, TableList *tables, bool if_exists,
 
37
                         bool drop_temporary, bool log_query);
 
38
bool quick_rm_table(StorageEngine *, const char *db,
 
39
                    const char *table_name, bool is_tmp);
47
40
void close_cached_table(Session *session, Table *table);
48
41
 
49
42
void wait_while_table_is_used(Session *session, Table *table,
50
43
                              enum ha_extra_function function);
51
 
 
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);
58
 
 
59
 
void write_bin_log(Session *session, const std::string &query);
60
 
 
61
 
bool is_primary_key(KeyInfo *key_info);
 
44
bool mysql_checksum_table(Session* session, TableList* table_list,
 
45
                          HA_CHECK_OPT* check_opt);
 
46
bool mysql_check_table(Session* session, TableList* table_list,
 
47
                       HA_CHECK_OPT* check_opt);
 
48
bool mysql_analyze_table(Session* session, TableList* table_list,
 
49
                         HA_CHECK_OPT* check_opt);
 
50
bool mysql_optimize_table(Session* session, TableList* table_list,
 
51
                          HA_CHECK_OPT* check_opt);
 
52
 
 
53
void write_bin_log(Session *session, bool clear_error,
 
54
                   char const *query, size_t query_length);
 
55
 
 
56
bool is_primary_key(KEY *key_info);
62
57
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 */
66
58
 
67
 
#endif /* DRIZZLED_SQL_TABLE_H */
 
59
#endif /* DRIZZLE_SERVER_SQL_TABLE_H */