diff options
author | unknown <eric@mysql.com> | 2005-09-30 16:26:48 -0700 |
---|---|---|
committer | unknown <eric@mysql.com> | 2005-09-30 16:26:48 -0700 |
commit | 967c4e63d3943914e45f68975da99e997dfcefdf (patch) | |
tree | c1894e3d927782633ebebf8b571ef7b84d2689fe /sql/handler.h | |
parent | 3cb5e1fb5d228c3ce9ca0d3988c1912dd3dbd12c (diff) | |
download | mariadb-git-967c4e63d3943914e45f68975da99e997dfcefdf.tar.gz |
Move handler specific options into handlerton flag check
BUG#13108
mysql-test/r/federated.result:
added test results for federated alter table
mysql-test/t/federated.test:
added test for federated alter table
sql/examples/ha_example.cc:
supports table re-creation
sql/examples/ha_tina.cc:
supports table re-creation
sql/ha_blackhole.cc:
supports table re-creation
sql/ha_federated.cc:
added flag for not supporting alter
sql/ha_heap.cc:
supports table recreation
sql/ha_myisam.cc:
supports table recreation
sql/ha_myisammrg.cc:
supports table re-creation
sql/handler.cc:
implemented flag check function
sql/handler.h:
added additional handlerton flags
created a function to test flags
replace ha_supports_generate macro with call to flag check
sql/sql_delete.cc:
replaced ha_supports_generate with handlerton flag check
sql/sql_table.cc:
added check for handlerton check for alter support
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sql/handler.h b/sql/handler.h index 50f697bc980..9d955d1be58 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -377,8 +377,10 @@ struct show_table_alias_st { }; /* Possible flags of a handlerton */ -#define HTON_NO_FLAGS 0 -#define HTON_CLOSE_CURSORS_AT_COMMIT 1 +#define HTON_NO_FLAGS 0 +#define HTON_CLOSE_CURSORS_AT_COMMIT (1 << 0) +#define HTON_ALTER_NOT_SUPPORTED (1 << 1) +#define HTON_CAN_RECREATE (1 << 2) typedef struct st_thd_trans { @@ -848,18 +850,13 @@ extern ulong total_ha, total_ha_2pc; #define ha_commit(thd) (ha_commit_trans((thd), TRUE)) #define ha_rollback(thd) (ha_rollback_trans((thd), TRUE)) -#define ha_supports_generate(T) (T != DB_TYPE_INNODB && \ - T != DB_TYPE_BERKELEY_DB && \ - T != DB_TYPE_ARCHIVE_DB && \ - T != DB_TYPE_FEDERATED_DB && \ - T != DB_TYPE_NDBCLUSTER) - /* lookups */ enum db_type ha_resolve_by_name(const char *name, uint namelen); const char *ha_get_storage_engine(enum db_type db_type); handler *get_new_handler(TABLE *table, enum db_type db_type); enum db_type ha_checktype(THD *thd, enum db_type database_type, bool no_substitute, bool report_error); +bool ha_check_storage_engine_flag(enum db_type db_type, uint32 flag); /* basic stuff */ int ha_init(void); |