diff options
author | V Narayanan <v.narayanan@sun.com> | 2009-12-03 16:16:49 +0530 |
---|---|---|
committer | V Narayanan <v.narayanan@sun.com> | 2009-12-03 16:16:49 +0530 |
commit | e86daf9bf299b552d68cb27771b3492ee7a1c9bf (patch) | |
tree | 43b91d9b4090a4d9f8ee0ee9367838242f68881a /sql/handler.h | |
parent | 40ec012c905be0262ba5c36bbccfa0db0105e31f (diff) | |
download | mariadb-git-e86daf9bf299b552d68cb27771b3492ee7a1c9bf.tar.gz |
WL#4448 Generalize the handlerton::fill_files_table call with handlerton::fill_is_table
The attached patch adds a method
handlerton::fill_is_table that can be used
instead of having to create specific
handlerton::fill_*_table methods.
sql/ha_ndbcluster.cc:
WL#4448 Generalize the handlerton::fill_files_table call with handlerton::fill_is_table
Implemented the method ndbcluster_fill_is_table
that uses the supplied table id to switch to the
appropriate fill_*_table method.
sql/handler.h:
WL#4448 Generalize the handlerton::fill_files_table call with handlerton::fill_is_table
Moved the enum_schema_table enumeration
from table.h to here.
contains the declaration for the new method
fill_is_tables.
sql/sql_show.cc:
WL#4448 Generalize the handlerton::fill_files_table call with handlerton::fill_is_table
calls the fill_is_table method instead of the
fill_files_table method.
sql/table.h:
WL#4448 Generalize the handlerton::fill_files_table call with handlerton::fill_is_table
removed the earlier definition of enum_schema_tables.
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/sql/handler.h b/sql/handler.h index 05a9e13653c..957729a7bf0 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -515,6 +515,46 @@ class st_alter_tablespace : public Sql_alloc /* The handler for a table type. Will be included in the TABLE structure */ struct TABLE; + +/* + Make sure that the order of schema_tables and enum_schema_tables are the same. +*/ +enum enum_schema_tables +{ + SCH_CHARSETS= 0, + SCH_COLLATIONS, + SCH_COLLATION_CHARACTER_SET_APPLICABILITY, + SCH_COLUMNS, + SCH_COLUMN_PRIVILEGES, + SCH_ENGINES, + SCH_EVENTS, + SCH_FILES, + SCH_GLOBAL_STATUS, + SCH_GLOBAL_VARIABLES, + SCH_KEY_COLUMN_USAGE, + SCH_OPEN_TABLES, + SCH_PARTITIONS, + SCH_PLUGINS, + SCH_PROCESSLIST, + SCH_PROFILES, + SCH_REFERENTIAL_CONSTRAINTS, + SCH_PROCEDURES, + SCH_SCHEMATA, + SCH_SCHEMA_PRIVILEGES, + SCH_SESSION_STATUS, + SCH_SESSION_VARIABLES, + SCH_STATISTICS, + SCH_STATUS, + SCH_TABLES, + SCH_TABLE_CONSTRAINTS, + SCH_TABLE_NAMES, + SCH_TABLE_PRIVILEGES, + SCH_TRIGGERS, + SCH_USER_PRIVILEGES, + SCH_VARIABLES, + SCH_VIEWS +}; + struct TABLE_SHARE; struct st_foreign_key_info; typedef struct st_foreign_key_info FOREIGN_KEY_INFO; @@ -679,9 +719,9 @@ struct handlerton uint (*partition_flags)(); uint (*alter_table_flags)(uint flags); int (*alter_tablespace)(handlerton *hton, THD *thd, st_alter_tablespace *ts_info); - int (*fill_files_table)(handlerton *hton, THD *thd, - TABLE_LIST *tables, - class Item *cond); + int (*fill_is_table)(handlerton *hton, THD *thd, TABLE_LIST *tables, + class Item *cond, + enum enum_schema_tables); uint32 flags; /* global handler flags */ /* Those handlerton functions below are properly initialized at handler |