diff options
author | unknown <magnus@neptunus.(none)> | 2004-09-13 14:46:38 +0200 |
---|---|---|
committer | unknown <magnus@neptunus.(none)> | 2004-09-13 14:46:38 +0200 |
commit | 5a464356788b10a7cd5a5412ed12d1b88d32b479 (patch) | |
tree | 8eed62b1151616d8bdb119967ec4713ddc6852b9 /sql/handler.h | |
parent | c7e7b7b7030b4735452098600f16479aa02a1daa (diff) | |
download | mariadb-git-5a464356788b10a7cd5a5412ed12d1b88d32b479.tar.gz |
WL1424 Multiple MySQL Servers: SHOW TABLES etc. should detect new and delete old tables.
include/my_base.h:
Added new bit to table create options
Removed old error code HA_ERR_OLD_METADAT and reused it for HA_ERR_NO_SUCH_TABLE.
mysql-test/r/ndb_autodiscover.result:
Updated test cases
mysql-test/t/ndb_autodiscover.test:
Updated test cases
mysql-test/t/ndb_autodiscover2.test:
Updated test cases
sql/discover.cc:
Moved function create_table_from_handler to handler.cc
sql/ha_ndbcluster.cc:
Improved discover functionality
Added .ndb file
Changed error code mappings for a table that does not exist in engine
Check for ndb object in THD
Updated ndbcluster_discover, ndbcluster_list_tables and ndbcluster_can_discover
sql/ha_ndbcluster.h:
Improved discover
sql/handler.cc:
Added new error message mapping.
Moved function ha_create_table_from_engine to handler level
Added new functions ha_can_discover, ha_list_tables and ha_table_exists
sql/handler.h:
Added new error message mapping.
Moved function ha_create_table_from_engine to handler level
Added new functions ha_can_discover, ha_list_tables and ha_table_exists
sql/mysql_priv.h:
Removed create_table_from_handler, moved to handler.h
sql/sql_base.cc:
Renamed function create_table_from_handler
sql/sql_show.cc:
Added new function mysql_discover_files and mysql_list_files.
Modified mysql_find_files to discover new and delete "old" files/tables.
sql/sql_table.cc:
Renamed create_table_from_handler
Call ha_create_table_from_engine, in order to discover the the frm file before it can be dropped.
sql/table.cc:
Added mapping of the error code HA_ERR_NO_SUCH_TABLE
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h index e3a3b25e1cb..2e99151d257 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -532,6 +532,8 @@ void ha_close_connection(THD* thd); enum db_type ha_checktype(enum db_type database_type); int ha_create_table(const char *name, HA_CREATE_INFO *create_info, bool update_create_info); +int ha_create_table_from_engine(THD* thd, const char *db, const char *name, + bool create_if_found); int ha_delete_table(enum db_type db_type, const char *path); void ha_drop_database(char* path); int ha_init_key_cache(const char *name, KEY_CACHE *key_cache); @@ -553,5 +555,9 @@ bool ha_flush_logs(void); int ha_enable_transaction(THD *thd, bool on); int ha_change_key_cache(KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache); -int ha_discover(const char* dbname, const char* name, +int ha_discover(THD* thd, const char* dbname, const char* name, const void** frmblob, uint* frmlen); +int ha_list_tables(THD* thd, HASH *tables, const char* db); +int ha_table_exists(THD* thd, const char* db, const char* name); +int ha_can_discover(THD* thd, const char* name); + |