diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:19:14 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:19:14 +0200 |
commit | 32ee15d851f3099d401b28321a1ae46dd36ef8ef (patch) | |
tree | 869a399c387a132c4f7d8e4fdf2f28f3ecb1cf45 /sql/handler.h | |
parent | 60aed41222bd7d4b5e607e098f778ca7438f0416 (diff) | |
download | mariadb-git-32ee15d851f3099d401b28321a1ae46dd36ef8ef.tar.gz |
Assisted discovery
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h index 3424fa22edf..2290b8f37fd 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -634,6 +634,7 @@ enum enum_schema_tables }; struct TABLE_SHARE; +struct HA_CREATE_INFO; struct st_foreign_key_info; typedef struct st_foreign_key_info FOREIGN_KEY_INFO; typedef bool (stat_print_fn)(THD *thd, const char *type, uint type_len, @@ -1169,6 +1170,25 @@ struct handlerton int (*discover_table_existence)(handlerton *hton, const char *db, const char *table_name); + /* + This is the assisted table discovery method. Unlike the fully + automatic discovery as above, here a user is expected to issue an + explicit CREATE TABLE with the appropriate table attributes to + "assist" the discovery of a table. But this "discovering" CREATE TABLE + statement will not specify the table structure - the engine discovers + it using this method. For example, FederatedX uses it in + + CREATE TABLE t1 ENGINE=FEDERATED CONNECTION="mysql://foo/bar/t1"; + + Given a TABLE_SHARE discover_table_structure() fills it in with a correct + table structure using one of the TABLE_SHARE::init_from_* methods. + + Assisted discovery works independently from the automatic discover. + An engine is allowed to support only assisted discovery and not + support automatic one. Or vice versa. + */ + int (*discover_table_structure)(handlerton *hton, THD* thd, + TABLE_SHARE *share, HA_CREATE_INFO *info); }; |