added missing errorcode handling in NdbIndexStat causing test failure

parent 007125b3
...@@ -15,4 +15,3 @@ rpl_relayrotate : Unstable test case, bug#12429 ...@@ -15,4 +15,3 @@ rpl_relayrotate : Unstable test case, bug#12429
rpl_until : Unstable test case, bug#12429 rpl_until : Unstable test case, bug#12429
rpl_deadlock : Unstable test case, bug#12429 rpl_deadlock : Unstable test case, bug#12429
kill : Unstable test case, bug#9712 kill : Unstable test case, bug#9712
ndb_alter_table : Martin will fix
...@@ -423,11 +423,13 @@ NdbIndexStat::records_in_range(NdbDictionary::Index* index, NdbIndexScanOperatio ...@@ -423,11 +423,13 @@ NdbIndexStat::records_in_range(NdbDictionary::Index* index, NdbIndexScanOperatio
NdbTransaction* trans = op->m_transConnection; NdbTransaction* trans = op->m_transConnection;
if (op->interpret_exit_last_row() == -1 || if (op->interpret_exit_last_row() == -1 ||
op->getValue(NdbDictionary::Column::RECORDS_IN_RANGE, (char*)out) == 0) { op->getValue(NdbDictionary::Column::RECORDS_IN_RANGE, (char*)out) == 0) {
m_error = op->getNdbError();
DBUG_PRINT("error", ("op:%d", op->getNdbError().code)); DBUG_PRINT("error", ("op:%d", op->getNdbError().code));
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
if (trans->execute(NdbTransaction::NoCommit, if (trans->execute(NdbTransaction::NoCommit,
NdbTransaction::AbortOnError, forceSend) == -1) { NdbTransaction::AbortOnError, forceSend) == -1) {
m_error = trans->getNdbError();
DBUG_PRINT("error", ("trans:%d op:%d", trans->getNdbError().code, DBUG_PRINT("error", ("trans:%d op:%d", trans->getNdbError().code,
op->getNdbError().code)); op->getNdbError().code));
DBUG_RETURN(-1); DBUG_RETURN(-1);
...@@ -443,6 +445,7 @@ NdbIndexStat::records_in_range(NdbDictionary::Index* index, NdbIndexScanOperatio ...@@ -443,6 +445,7 @@ NdbIndexStat::records_in_range(NdbDictionary::Index* index, NdbIndexScanOperatio
cnt++; cnt++;
} }
if (ret == -1) { if (ret == -1) {
m_error = op->getNdbError();
DBUG_PRINT("error", ("trans:%d op:%d", trans->getNdbError().code, DBUG_PRINT("error", ("trans:%d op:%d", trans->getNdbError().code,
op->getNdbError().code)); op->getNdbError().code));
DBUG_RETURN(-1); DBUG_RETURN(-1);
......
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