ndb: correction of "ignore error" patch

parent 65c9dcc0
...@@ -259,17 +259,16 @@ static int ndb_to_mysql_error(const NdbError *ndberr) ...@@ -259,17 +259,16 @@ static int ndb_to_mysql_error(const NdbError *ndberr)
int execute_no_commit_ignore_no_key(ha_ndbcluster *h, NdbTransaction *trans) int execute_no_commit_ignore_no_key(ha_ndbcluster *h, NdbTransaction *trans)
{ {
int res= trans->execute(NdbTransaction::NoCommit, if (trans->execute(NdbTransaction::NoCommit,
NdbOperation::AO_IgnoreError, NdbOperation::AO_IgnoreError,
h->m_force_send); h->m_force_send) == -1)
if (res == -1)
return -1; return -1;
const NdbError &err= trans->getNdbError(); const NdbError &err= trans->getNdbError();
if (err.classification != NdbError::NoError && if (err.classification != NdbError::NoError &&
err.classification != NdbError::ConstraintViolation && err.classification != NdbError::ConstraintViolation &&
err.classification != NdbError::NoDataFound) err.classification != NdbError::NoDataFound)
return res; return -1;
return 0; return 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