summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <magnus@neptunus.(none)>2004-09-21 12:13:58 +0200
committerunknown <magnus@neptunus.(none)>2004-09-21 12:13:58 +0200
commitdd07a90d612278057217b50076e9100177570613 (patch)
tree800e2e50047d8deacfc968120c67c71a51cd8d95 /sql/handler.cc
parent4d18add04cbd93f90e4d59feaa03e76b7e629549 (diff)
downloadmariadb-git-dd07a90d612278057217b50076e9100177570613.tar.gz
Changed WL#1424 to use the function ha_find_files. This is a simpler implementation and all handler specific code is hidden in the appropriate handler.
mysql-test/r/ndb_autodiscover.result: Update test result, number of rows is 1 mysql-test/t/ndb_autodiscover.test: Dont run the test where table is dropped in NDb with ndb_drop_table sql/ha_ndbcluster.cc: Implement function ndbcluster_find_files which will discover new tables and delete old tables sql/ha_ndbcluster.h: Implement function ndbcluster_find_files Remove function ndbcluster_list_tables and ndbcluster_can_discover sql/handler.cc: Add ha_find_files called from mysql_find_files Remove ha_can_discover and ha_list_tables sql/handler.h: Add ha_find_files called from mysql_find_files Remove ha_can_discover and ha_list_tables sql/sql_show.cc: Revert to original version of sql_show.cc Only changes to this version is that ha_find_files is called from mysql_find_files in order to give the handlers a possibility to find new files in engine
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc37
1 files changed, 12 insertions, 25 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index adecf135347..dc2f213640a 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1464,39 +1464,26 @@ int ha_discover(THD* thd, const char* db, const char* name,
/*
- Ask handler if it would support discover of a file
- with this name
-
- RETURN
- 0 Does not recognise file
- 1 File can be discovered
+ Call this function in order to give the handler the possiblity
+ to ask engine if there are any new tables that should be written to disk
+ or any dropped tables that need to be removed from disk
*/
-int ha_can_discover(THD* thd, const char* name)
+int
+ha_find_files(THD *thd,const char *db,const char *path,
+ const char *wild, bool dir)
{
- int error= 0; // Can't discover this file name
- DBUG_ENTER("ha_can_discover");
- DBUG_PRINT("enter", ("name: %s", name));
-#ifdef HAVE_NDBCLUSTER_DB
- if (have_ndbcluster == SHOW_OPTION_YES)
- error= ndbcluster_can_discover(thd, name);
-#endif
- DBUG_RETURN(error);
-}
-
-/*
- Get a list of tables that exists in handler(s)
- */
-int ha_list_tables(THD* thd, HASH *tables, const char* db)
-{
int error= 0;
- DBUG_ENTER("ha_list_tables");
- DBUG_PRINT("enter", ("db: %s", db));
+ DBUG_ENTER("ha_find_files");
+ DBUG_PRINT("enter", ("db: %s, path: %s, wild: %s, dir: %d",
+ db, path, wild, dir));
#ifdef HAVE_NDBCLUSTER_DB
if (have_ndbcluster == SHOW_OPTION_YES)
- error= ndbcluster_list_tables(thd, tables, db);
+ error= ndbcluster_find_files(thd, db, path, wild, dir);
#endif
DBUG_RETURN(error);
+
+
}
/*