summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-10-19 09:38:37 +0200
committerunknown <jonas@perch.ndb.mysql.com>2006-10-19 09:38:37 +0200
commit6134c072588b28dca5fa8766b9dc434fb78452d6 (patch)
tree6955e753550152b5ebaa987e3b1c258e9134838d /ndb
parent46152464aa27954659a028d625f82acc601b7bbe (diff)
parentd262020f44988305f45519b21d3568fad0eb6b9a (diff)
downloadmariadb-git-6134c072588b28dca5fa8766b9dc434fb78452d6.tar.gz
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb ndb/src/ndbapi/NdbTransaction.cpp: Auto merged sql/ha_ndbcluster.cc: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/common/debugger/EventLogger.cpp4
-rw-r--r--ndb/src/kernel/blocks/dbacc/DbaccInit.cpp1
-rw-r--r--ndb/src/kernel/blocks/dbacc/DbaccMain.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupGen.cpp3
-rw-r--r--ndb/src/ndbapi/NdbTransaction.cpp9
5 files changed, 14 insertions, 5 deletions
diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp
index e1a477b8ea4..c6f02a7807a 100644
--- a/ndb/src/common/debugger/EventLogger.cpp
+++ b/ndb/src/common/debugger/EventLogger.cpp
@@ -647,8 +647,8 @@ void getTextMemoryUsage(QQQQ) {
const int used = theData[3];
const int total = theData[4];
const int block = theData[5];
- const int percent = (used*100)/total;
-
+ const int percent = total ? (used*100)/total : 0;
+
BaseString::snprintf(m_text, m_text_len,
"%s usage %s %d%s(%d %dK pages of total %d)",
(block==DBACC ? "Index" : (block == DBTUP ?"Data":"<unknown>")),
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp b/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
index 59a622b60e6..e560d924e5a 100644
--- a/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
+++ b/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
@@ -53,6 +53,7 @@ void Dbacc::initData()
tabrec = 0;
undopage = 0;
+ cnoOfAllocatedPages = cpagesize = 0;
// Records with constant sizes
}//Dbacc::initData()
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
index 261a0acfa81..2652da97aea 100644
--- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
@@ -177,7 +177,7 @@ void Dbacc::execCONTINUEB(Signal* signal)
case ZREPORT_MEMORY_USAGE:{
jam();
static int c_currentMemUsed = 0;
- int now = (cnoOfAllocatedPages * 100)/cpagesize;
+ int now = cpagesize ? (cnoOfAllocatedPages * 100)/cpagesize : 0;
const int thresholds[] = { 99, 90, 80, 0};
Uint32 i = 0;
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
index 66e98bd2805..6b1056fdeac 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
@@ -142,6 +142,7 @@ Dbtup::Dbtup(const class Configuration & conf)
tablerec = 0;
tableDescriptor = 0;
undoPage = 0;
+ cnoOfPage = cnoOfAllocatedPages = 0;
}//Dbtup::Dbtup()
Dbtup::~Dbtup()
@@ -526,7 +527,7 @@ void Dbtup::execCONTINUEB(Signal* signal)
case ZREPORT_MEMORY_USAGE:{
ljam();
static int c_currentMemUsed = 0;
- int now = (cnoOfAllocatedPages * 100)/cnoOfPage;
+ int now = cnoOfPage ? (cnoOfAllocatedPages * 100)/cnoOfPage : 0;
const int thresholds[] = { 100, 90, 80, 0 };
Uint32 i = 0;
diff --git a/ndb/src/ndbapi/NdbTransaction.cpp b/ndb/src/ndbapi/NdbTransaction.cpp
index 6e6e0cf101c..364931118a1 100644
--- a/ndb/src/ndbapi/NdbTransaction.cpp
+++ b/ndb/src/ndbapi/NdbTransaction.cpp
@@ -357,8 +357,15 @@ NdbTransaction::execute(ExecType aTypeOfExec,
ret = -1;
if(savedError.code==0)
savedError= theError;
+
+ /**
+ * If AO_IgnoreError, error codes arent always set on individual
+ * operations, making postExecute impossible
+ */
+ if (abortOption == AO_IgnoreError)
+ DBUG_RETURN(-1);
}
-
+
#ifdef ndb_api_crash_on_complex_blob_abort
assert(theFirstOpInList == NULL && theLastOpInList == NULL);
#else