summaryrefslogtreecommitdiff
path: root/ndb/src/kernel/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/kernel/blocks')
-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
3 files changed, 4 insertions, 2 deletions
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;