summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-11-24 14:57:14 +0100
committerunknown <tomas@poseidon.ndb.mysql.com>2005-11-24 14:57:14 +0100
commit705965362d3b1ec4f1142aaaa9cf022fc7b7c647 (patch)
tree39e1b98704acce5851f399670cd00effa72ce1c7 /storage
parentc9865bf9169bf596399bff1076b4006af862c93e (diff)
downloadmariadb-git-705965362d3b1ec4f1142aaaa9cf022fc7b7c647.tar.gz
added missing errorcode handling in NdbIndexStat causing test failure
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/ndbapi/NdbIndexStat.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/ndb/src/ndbapi/NdbIndexStat.cpp b/storage/ndb/src/ndbapi/NdbIndexStat.cpp
index 2d470249561..8740b80a81d 100644
--- a/storage/ndb/src/ndbapi/NdbIndexStat.cpp
+++ b/storage/ndb/src/ndbapi/NdbIndexStat.cpp
@@ -423,11 +423,13 @@ NdbIndexStat::records_in_range(NdbDictionary::Index* index, NdbIndexScanOperatio
NdbTransaction* trans = op->m_transConnection;
if (op->interpret_exit_last_row() == -1 ||
op->getValue(NdbDictionary::Column::RECORDS_IN_RANGE, (char*)out) == 0) {
+ m_error = op->getNdbError();
DBUG_PRINT("error", ("op:%d", op->getNdbError().code));
DBUG_RETURN(-1);
}
if (trans->execute(NdbTransaction::NoCommit,
NdbTransaction::AbortOnError, forceSend) == -1) {
+ m_error = trans->getNdbError();
DBUG_PRINT("error", ("trans:%d op:%d", trans->getNdbError().code,
op->getNdbError().code));
DBUG_RETURN(-1);
@@ -443,6 +445,7 @@ NdbIndexStat::records_in_range(NdbDictionary::Index* index, NdbIndexScanOperatio
cnt++;
}
if (ret == -1) {
+ m_error = op->getNdbError();
DBUG_PRINT("error", ("trans:%d op:%d", trans->getNdbError().code,
op->getNdbError().code));
DBUG_RETURN(-1);