Commit d8acfecb authored by unknown's avatar unknown

bug, retry handling in "ndb schema propagation" incorrect

parent 664bab06
...@@ -1041,15 +1041,18 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share, ...@@ -1041,15 +1041,18 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share,
break; break;
} }
err: err:
if (trans->getNdbError().status == NdbError::TemporaryError) const NdbError *this_error= trans ?
&trans->getNdbError() : &ndb->getNdbError();
if (this_error->status == NdbError::TemporaryError)
{ {
if (retries--) if (retries--)
{ {
ndb->closeTransaction(trans); if (trans)
ndb->closeTransaction(trans);
continue; // retry continue; // retry
} }
} }
ndb_error= &trans->getNdbError(); ndb_error= this_error;
break; break;
} }
end: end:
...@@ -1235,15 +1238,18 @@ ndbcluster_update_slock(THD *thd, ...@@ -1235,15 +1238,18 @@ ndbcluster_update_slock(THD *thd,
break; break;
} }
err: err:
if (trans->getNdbError().status == NdbError::TemporaryError) const NdbError *this_error= trans ?
&trans->getNdbError() : &ndb->getNdbError();
if (this_error->status == NdbError::TemporaryError)
{ {
if (retries--) if (retries--)
{ {
ndb->closeTransaction(trans); if (trans)
ndb->closeTransaction(trans);
continue; // retry continue; // retry
} }
} }
ndb_error= &trans->getNdbError(); ndb_error= this_error;
break; break;
} }
end: end:
......
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