mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge next-mr -> next-4284.
This commit is contained in:
@@ -6326,32 +6326,33 @@ bool get_schema_tables_result(JOIN *join,
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
|
||||
struct run_hton_fill_schema_files_args
|
||||
struct run_hton_fill_schema_table_args
|
||||
{
|
||||
TABLE_LIST *tables;
|
||||
COND *cond;
|
||||
};
|
||||
|
||||
static my_bool run_hton_fill_schema_files(THD *thd, plugin_ref plugin,
|
||||
static my_bool run_hton_fill_schema_table(THD *thd, plugin_ref plugin,
|
||||
void *arg)
|
||||
{
|
||||
struct run_hton_fill_schema_files_args *args=
|
||||
(run_hton_fill_schema_files_args *) arg;
|
||||
struct run_hton_fill_schema_table_args *args=
|
||||
(run_hton_fill_schema_table_args *) arg;
|
||||
handlerton *hton= plugin_data(plugin, handlerton *);
|
||||
if(hton->fill_files_table && hton->state == SHOW_OPTION_YES)
|
||||
hton->fill_files_table(hton, thd, args->tables, args->cond);
|
||||
if (hton->fill_is_table && hton->state == SHOW_OPTION_YES)
|
||||
hton->fill_is_table(hton, thd, args->tables, args->cond,
|
||||
get_schema_table_idx(args->tables->schema_table));
|
||||
return false;
|
||||
}
|
||||
|
||||
int fill_schema_files(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
int hton_fill_schema_table(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
{
|
||||
DBUG_ENTER("fill_schema_files");
|
||||
DBUG_ENTER("hton_fill_schema_table");
|
||||
|
||||
struct run_hton_fill_schema_files_args args;
|
||||
struct run_hton_fill_schema_table_args args;
|
||||
args.tables= tables;
|
||||
args.cond= cond;
|
||||
|
||||
plugin_foreach(thd, run_hton_fill_schema_files,
|
||||
plugin_foreach(thd, run_hton_fill_schema_table,
|
||||
MYSQL_STORAGE_ENGINE_PLUGIN, &args);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
@@ -6933,6 +6934,29 @@ ST_FIELD_INFO referential_constraints_fields_info[]=
|
||||
};
|
||||
|
||||
|
||||
ST_FIELD_INFO tablespaces_fields_info[]=
|
||||
{
|
||||
{"TABLESPACE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0,
|
||||
SKIP_OPEN_TABLE},
|
||||
{"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
|
||||
{"TABLESPACE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, MY_I_S_MAYBE_NULL,
|
||||
0, SKIP_OPEN_TABLE},
|
||||
{"LOGFILE_GROUP_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, MY_I_S_MAYBE_NULL,
|
||||
0, SKIP_OPEN_TABLE},
|
||||
{"EXTENT_SIZE", 21, MYSQL_TYPE_LONGLONG, 0,
|
||||
MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED, 0, SKIP_OPEN_TABLE},
|
||||
{"AUTOEXTEND_SIZE", 21, MYSQL_TYPE_LONGLONG, 0,
|
||||
MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED, 0, SKIP_OPEN_TABLE},
|
||||
{"MAXIMUM_SIZE", 21, MYSQL_TYPE_LONGLONG, 0,
|
||||
MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED, 0, SKIP_OPEN_TABLE},
|
||||
{"NODEGROUP_ID", 21, MYSQL_TYPE_LONGLONG, 0,
|
||||
MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED, 0, SKIP_OPEN_TABLE},
|
||||
{"TABLESPACE_COMMENT", 2048, MYSQL_TYPE_STRING, 0, MY_I_S_MAYBE_NULL, 0,
|
||||
SKIP_OPEN_TABLE},
|
||||
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Description of ST_FIELD_INFO in table.h
|
||||
|
||||
@@ -6963,7 +6987,7 @@ ST_SCHEMA_TABLE schema_tables[]=
|
||||
0, make_old_format, 0, -1, -1, 0, 0},
|
||||
#endif
|
||||
{"FILES", files_fields_info, create_schema_table,
|
||||
fill_schema_files, 0, 0, -1, -1, 0, 0},
|
||||
hton_fill_schema_table, 0, 0, -1, -1, 0, 0},
|
||||
{"GLOBAL_STATUS", variables_fields_info, create_schema_table,
|
||||
fill_status, make_old_format, 0, 0, -1, 0, 0},
|
||||
{"GLOBAL_VARIABLES", variables_fields_info, create_schema_table,
|
||||
@@ -7004,6 +7028,8 @@ ST_SCHEMA_TABLE schema_tables[]=
|
||||
{"TABLES", tables_fields_info, create_schema_table,
|
||||
get_all_tables, make_old_format, get_schema_tables_record, 1, 2, 0,
|
||||
OPTIMIZE_I_S_TABLE},
|
||||
{"TABLESPACES", tablespaces_fields_info, create_schema_table,
|
||||
hton_fill_schema_table, 0, 0, -1, -1, 0, 0},
|
||||
{"TABLE_CONSTRAINTS", table_constraints_fields_info, create_schema_table,
|
||||
get_all_tables, 0, get_schema_constraints_record, 3, 4, 0,
|
||||
OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
|
||||
|
||||
Reference in New Issue
Block a user