Commit 14ec452b authored by jonas@perch.ndb.mysql.com's avatar jonas@perch.ndb.mysql.com

Merge perch.ndb.mysql.com:/home/jonas/src/51-ndb

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
parents 6a582297 6c9727bf
...@@ -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);
} }
} }
......
...@@ -312,15 +312,16 @@ inline ...@@ -312,15 +312,16 @@ inline
void void
DLFifoListImpl<P,T,U>::release() DLFifoListImpl<P,T,U>::release()
{ {
Ptr<T> p; Ptr<T> ptr;
while(head.firstItem != RNIL) Uint32 curr = head.firstItem;
while(curr != RNIL)
{ {
p.i = head.firstItem; thePool.getPtr(ptr, curr);
p.p = thePool.getPtr(head.firstItem); curr = ptr.p->U::nextList;
T * t = p.p; thePool.release(ptr);
head.firstItem = t->U::nextList;
release(p);
} }
head.firstItem = RNIL;
head.lastItem = RNIL;
} }
template <typename P, typename T, typename U> template <typename P, typename T, typename U>
......
...@@ -332,12 +332,14 @@ void ...@@ -332,12 +332,14 @@ void
DLListImpl<P,T,U>::release() DLListImpl<P,T,U>::release()
{ {
Ptr<T> ptr; Ptr<T> ptr;
while((ptr.i = head.firstItem) != RNIL) Uint32 curr = head.firstItem;
while(curr != RNIL)
{ {
thePool.getPtr(ptr); thePool.getPtr(ptr, curr);
head.firstItem = ptr.p->U::nextList; curr = ptr.p->U::nextList;
thePool.release(ptr); thePool.release(ptr);
} }
head.firstItem = RNIL;
} }
template <typename P, typename T, typename U> template <typename P, typename T, typename U>
......
...@@ -302,12 +302,14 @@ void ...@@ -302,12 +302,14 @@ void
SLListImpl<P, T, U>::release() SLListImpl<P, T, U>::release()
{ {
Ptr<T> ptr; Ptr<T> ptr;
while((ptr.i = head.firstItem) != RNIL) Uint32 curr = head.firstItem;
while(curr != RNIL)
{ {
thePool.getPtr(ptr); thePool.getPtr(ptr, curr);
head.firstItem = ptr.p->U::nextList; curr = ptr.p->U::nextList;
thePool.release(ptr); thePool.release(ptr);
} }
head.firstItem = RNIL;
} }
template <typename P, typename T, typename U> template <typename P, typename T, typename U>
......
...@@ -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