1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
* Contains function declarations that deal with the SHOW commands. These
24
* will eventually go away, but for now we split these definitions out into
25
* their own header file for easier maintenance
27
#ifndef DRIZZLED_SHOW_H
28
#define DRIZZLED_SHOW_H
32
#include "drizzled/sql_list.h"
33
#include "drizzled/lex_string.h"
34
#include "drizzled/sql_parse.h"
35
#include "drizzled/plugin.h"
37
/* Forward declarations */
41
struct st_ha_create_information;
42
typedef st_ha_create_information HA_CREATE_INFO;
48
class InfoSchemaTable;
53
typedef class Item COND;
55
class NormalisedDatabaseName;
58
typedef struct system_status_var STATUS_VAR;
60
extern STATUS_VAR global_status_var;
62
typedef struct st_lookup_field_values
64
LEX_STRING db_value, table_value;
65
bool wild_db_value, wild_table_value;
66
} LOOKUP_FIELD_VALUES;
68
bool calc_lookup_values_from_cond(Session *session, COND *cond, TableList *table,
69
LOOKUP_FIELD_VALUES *lookup_field_vals,
70
drizzled::plugin::InfoSchemaTable *schema_table);
71
bool get_lookup_field_values(Session *session, COND *cond, TableList *tables,
72
LOOKUP_FIELD_VALUES *lookup_field_values,
73
drizzled::plugin::InfoSchemaTable *schema_table);
74
int make_db_list(Session *session, std::vector<LEX_STRING*> &files,
75
LOOKUP_FIELD_VALUES *lookup_field_vals, bool *with_i_schema);
76
SHOW_VAR *getFrontOfStatusVars();
78
int store_create_info(TableList *table_list, String *packet, bool is_if_not_exists);
80
int get_quote_char_for_identifier();
81
int wild_case_compare(const CHARSET_INFO * const cs,
82
const char *str,const char *wildstr);
84
bool make_schema_select(Session *session, Select_Lex *sel,
85
const std::string& schema_table_name);
87
bool mysqld_show_open_tables(Session *session,const char *wild);
88
bool mysqld_show_logs(Session *session);
89
void mysqld_list_fields(Session *session,TableList *table, const char *wild);
90
int mysqld_dump_create_info(Session *session, TableList *table_list, int fd);
91
bool drizzled_show_create(Session *session, TableList *table_list, bool is_if_not_exists);
92
bool mysqld_show_create_db(Session *session, const NormalisedDatabaseName &database_name, bool if_not_exists);
94
int mysqld_show_status(Session *session);
95
int mysqld_show_variables(Session *session,const char *wild);
96
bool mysqld_show_storage_engines(Session *session);
97
bool mysqld_show_column_types(Session *session);
98
void mysqld_list_processes(Session *session,const char *user, bool verbose);
99
void calc_sum_of_all_status(STATUS_VAR *to);
101
int add_status_vars(SHOW_VAR *list);
102
void remove_status_vars(SHOW_VAR *list);
103
void init_status_vars();
104
void free_status_vars();
105
void reset_status_vars();
107
#endif /* DRIZZLED_SHOW_H */