From 5a464356788b10a7cd5a5412ed12d1b88d32b479 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Sep 2004 14:46:38 +0200 Subject: 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 --- sql/ha_ndbcluster.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sql/ha_ndbcluster.h') diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index c49a6078e7a..7372540ebe6 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -208,6 +208,8 @@ class ha_ndbcluster: public handler int ndb_err(NdbConnection*); bool uses_blob_value(bool all_fields); + int write_ndb_file(); + private: int check_ndb_connection(); @@ -248,8 +250,11 @@ int ndbcluster_rollback(THD *thd, void* ndb_transaction); void ndbcluster_close_connection(THD *thd); -int ndbcluster_discover(const char* dbname, const char* name, +int ndbcluster_discover(THD* thd, const char* dbname, const char* name, const void** frmblob, uint* frmlen); +int ndbcluster_can_discover(THD *thd, const char *name); +int ndbcluster_list_tables(THD* thd, HASH* tables, const char* db); +int ndbcluster_table_exists(THD* thd, const char *db, const char *name); int ndbcluster_drop_database(const char* path); void ndbcluster_print_error(int error, const NdbOperation *error_op); -- cgit v1.2.1