diff options
author | Mats Kindahl <mats@sun.com> | 2010-03-31 16:05:33 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2010-03-31 16:05:33 +0200 |
commit | 23d8586dbfdfdf02fa2f801b9dad91db53025a64 (patch) | |
tree | 19f32879e77ada23d733f35173a25f410d655ebe /sql/sql_show.h | |
parent | d7dd2fc92f042596c2e72a96934bb207270e7419 (diff) | |
download | mariadb-git-23d8586dbfdfdf02fa2f801b9dad91db53025a64.tar.gz |
WL#5030: Split and remove mysql_priv.h
This patch:
- Moves all definitions from the mysql_priv.h file into
header files for the component where the variable is
defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
Diffstat (limited to 'sql/sql_show.h')
-rw-r--r-- | sql/sql_show.h | 97 |
1 files changed, 96 insertions, 1 deletions
diff --git a/sql/sql_show.h b/sql/sql_show.h index fa067a46033..d1323ede8c1 100644 --- a/sql/sql_show.h +++ b/sql/sql_show.h @@ -16,12 +16,24 @@ #ifndef SQL_SHOW_H #define SQL_SHOW_H +#include "sql_list.h" /* List */ +#include "handler.h" /* enum_schema_tables */ +#include "table.h" /* enum_schema_table_state */ + /* Forward declarations */ +class JOIN; class String; class THD; +class sp_name; +struct TABLE_LIST; struct st_ha_create_information; +typedef class st_select_lex SELECT_LEX; typedef st_ha_create_information HA_CREATE_INFO; -struct TABLE_LIST; +struct LEX; +typedef struct st_mysql_show_var SHOW_VAR; +typedef struct st_schema_table ST_SCHEMA_TABLE; +struct TABLE; +typedef struct system_status_var STATUS_VAR; enum find_files_result { FIND_FILES_OK, @@ -29,6 +41,46 @@ enum find_files_result { FIND_FILES_DIR }; +/* Used by handlers to store things in schema tables */ +#define IS_FILES_FILE_ID 0 +#define IS_FILES_FILE_NAME 1 +#define IS_FILES_FILE_TYPE 2 +#define IS_FILES_TABLESPACE_NAME 3 +#define IS_FILES_TABLE_CATALOG 4 +#define IS_FILES_TABLE_SCHEMA 5 +#define IS_FILES_TABLE_NAME 6 +#define IS_FILES_LOGFILE_GROUP_NAME 7 +#define IS_FILES_LOGFILE_GROUP_NUMBER 8 +#define IS_FILES_ENGINE 9 +#define IS_FILES_FULLTEXT_KEYS 10 +#define IS_FILES_DELETED_ROWS 11 +#define IS_FILES_UPDATE_COUNT 12 +#define IS_FILES_FREE_EXTENTS 13 +#define IS_FILES_TOTAL_EXTENTS 14 +#define IS_FILES_EXTENT_SIZE 15 +#define IS_FILES_INITIAL_SIZE 16 +#define IS_FILES_MAXIMUM_SIZE 17 +#define IS_FILES_AUTOEXTEND_SIZE 18 +#define IS_FILES_CREATION_TIME 19 +#define IS_FILES_LAST_UPDATE_TIME 20 +#define IS_FILES_LAST_ACCESS_TIME 21 +#define IS_FILES_RECOVER_TIME 22 +#define IS_FILES_TRANSACTION_COUNTER 23 +#define IS_FILES_VERSION 24 +#define IS_FILES_ROW_FORMAT 25 +#define IS_FILES_TABLE_ROWS 26 +#define IS_FILES_AVG_ROW_LENGTH 27 +#define IS_FILES_DATA_LENGTH 28 +#define IS_FILES_MAX_DATA_LENGTH 29 +#define IS_FILES_INDEX_LENGTH 30 +#define IS_FILES_DATA_FREE 31 +#define IS_FILES_CREATE_TIME 32 +#define IS_FILES_UPDATE_TIME 33 +#define IS_FILES_CHECK_TIME 34 +#define IS_FILES_CHECKSUM 35 +#define IS_FILES_STATUS 36 +#define IS_FILES_EXTRA 37 + find_files_result find_files(THD *thd, List<LEX_STRING> *files, const char *db, const char *path, const char *wild, bool dir); @@ -38,4 +90,47 @@ int view_store_create_info(THD *thd, TABLE_LIST *table, String *buff); int copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table); +void append_identifier(THD *thd, String *packet, const char *name, + uint length); +void mysqld_list_fields(THD *thd,TABLE_LIST *table, const char *wild); +int mysqld_dump_create_info(THD *thd, TABLE_LIST *table_list, int fd); +bool mysqld_show_create(THD *thd, TABLE_LIST *table_list); +bool mysqld_show_create_db(THD *thd, char *dbname, HA_CREATE_INFO *create); + +void mysqld_list_processes(THD *thd,const char *user,bool verbose); +int mysqld_show_status(THD *thd); +int mysqld_show_variables(THD *thd,const char *wild); +bool mysqld_show_storage_engines(THD *thd); +bool mysqld_show_authors(THD *thd); +bool mysqld_show_contributors(THD *thd); +bool mysqld_show_privileges(THD *thd); +bool mysqld_show_column_types(THD *thd); +char *make_backup_log_name(char *buff, const char *name, const char* log_ext); +void calc_sum_of_all_status(STATUS_VAR *to); +void append_definer(THD *thd, String *buffer, const LEX_STRING *definer_user, + const LEX_STRING *definer_host); +int add_status_vars(SHOW_VAR *list); +void remove_status_vars(SHOW_VAR *list); +void init_status_vars(); +void free_status_vars(); +void reset_status_vars(); +bool show_create_trigger(THD *thd, const sp_name *trg_name); +void view_store_options(THD *thd, TABLE_LIST *table, String *buff); + +void init_fill_schema_files_row(TABLE* table); +bool schema_table_store_record(THD *thd, TABLE *table); +void initialize_information_schema_acl(); + +ST_SCHEMA_TABLE *find_schema_table(THD *thd, const char* table_name); +ST_SCHEMA_TABLE *get_schema_table(enum enum_schema_tables schema_table_idx); +int make_schema_select(THD *thd, SELECT_LEX *sel, + enum enum_schema_tables schema_table_idx); +int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list); +bool get_schema_tables_result(JOIN *join, + enum enum_schema_table_state executed_place); +enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table); + +/* These functions were under INNODB_COMPATIBILITY_HOOKS */ +int get_quote_char_for_identifier(THD *thd, const char *name, uint length); + #endif /* SQL_SHOW_H */ |