summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authortomas@whalegate.ndb.mysql.com <>2007-08-28 15:47:12 +0200
committertomas@whalegate.ndb.mysql.com <>2007-08-28 15:47:12 +0200
commit5ea9174c504fa9f4bb187deb295e8e4769c944c1 (patch)
treefeea666dd7a68b9550deba983908d77c95aedc5c /sql/ha_ndbcluster.cc
parentc2a2267ba1005f813b314ac0b1d1e41c838c1316 (diff)
parentd7d0d68b78a970490f2f8abd4386329a2afeae4b (diff)
downloadmariadb-git-5ea9174c504fa9f4bb187deb295e8e4769c944c1.tar.gz
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index a6dddc536ce..d46d162bd3f 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -6983,9 +6983,26 @@ int ndbcluster_find_files(handlerton *hton, THD *thd,
while ((file_name=it++))
{
bool file_on_disk= FALSE;
- DBUG_PRINT("info", ("%s", file_name->str));
+ DBUG_PRINT("info", ("%s", file_name->str));
if (hash_search(&ndb_tables, (uchar*) file_name->str, file_name->length))
{
+ build_table_filename(name, sizeof(name), db, file_name->str, reg_ext, 0);
+ if (my_access(name, F_OK))
+ {
+ pthread_mutex_lock(&LOCK_open);
+ DBUG_PRINT("info", ("Table %s listed and need discovery",
+ file_name->str));
+ if (ndb_create_table_from_engine(thd, db, file_name->str))
+ {
+ pthread_mutex_unlock(&LOCK_open);
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TABLE_EXISTS_ERROR,
+ "Discover of table %s.%s failed",
+ db, file_name->str);
+ continue;
+ }
+ pthread_mutex_unlock(&LOCK_open);
+ }
DBUG_PRINT("info", ("%s existed in NDB _and_ on disk ", file_name->str));
file_on_disk= TRUE;
}