Commit c2e4ef09 authored by unknown's avatar unknown

- corrected bug causing hang in getTable when using blob tables

- make sure cluster/schema table is always created first


sql/ha_ndbcluster_binlog.cc:
  make sure cluster/schema table is always created first
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  corrected bug causing hang in getTable when using blob tables
parent a4962ed0
...@@ -765,25 +765,28 @@ static int ndbcluster_create_schema_table(THD *thd) ...@@ -765,25 +765,28 @@ static int ndbcluster_create_schema_table(THD *thd)
void ndbcluster_setup_binlog_table_shares(THD *thd) void ndbcluster_setup_binlog_table_shares(THD *thd)
{ {
int done_find_all_files= 0; int done_find_all_files= 0;
if (!apply_status_share && if (!schema_share &&
ndbcluster_check_apply_status_share() == 0) ndbcluster_check_schema_share() == 0)
{ {
if (!done_find_all_files) if (!done_find_all_files)
{ {
ndbcluster_find_all_files(thd); ndbcluster_find_all_files(thd);
done_find_all_files= 1; done_find_all_files= 1;
} }
ndbcluster_create_apply_status_table(thd); ndbcluster_create_schema_table(thd);
// always make sure we create the 'schema' first
if (!schema_share)
return;
} }
if (!schema_share && if (!apply_status_share &&
ndbcluster_check_schema_share() == 0) ndbcluster_check_apply_status_share() == 0)
{ {
if (!done_find_all_files) if (!done_find_all_files)
{ {
ndbcluster_find_all_files(thd); ndbcluster_find_all_files(thd);
done_find_all_files= 1; done_find_all_files= 1;
} }
ndbcluster_create_schema_table(thd); ndbcluster_create_apply_status_table(thd);
} }
} }
......
...@@ -1303,7 +1303,7 @@ NdbDictionaryImpl::fetchGlobalTableImpl(const BaseString& internalTableName) ...@@ -1303,7 +1303,7 @@ NdbDictionaryImpl::fetchGlobalTableImpl(const BaseString& internalTableName)
int ret = getBlobTables(*impl); int ret = getBlobTables(*impl);
if (ret != 0) { if (ret != 0) {
delete impl; delete impl;
return 0; impl = 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment