Commit 6e4a0ec0 authored by jonas@perch.ndb.mysql.com's avatar jonas@perch.ndb.mysql.com

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
parents 64c414a0 470e4daa
...@@ -647,8 +647,8 @@ void getTextMemoryUsage(QQQQ) { ...@@ -647,8 +647,8 @@ void getTextMemoryUsage(QQQQ) {
const int used = theData[3]; const int used = theData[3];
const int total = theData[4]; const int total = theData[4];
const int block = theData[5]; 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, BaseString::snprintf(m_text, m_text_len,
"%s usage %s %d%s(%d %dK pages of total %d)", "%s usage %s %d%s(%d %dK pages of total %d)",
(block==DBACC ? "Index" : (block == DBTUP ?"Data":"<unknown>")), (block==DBACC ? "Index" : (block == DBTUP ?"Data":"<unknown>")),
......
...@@ -53,6 +53,7 @@ void Dbacc::initData() ...@@ -53,6 +53,7 @@ void Dbacc::initData()
tabrec = 0; tabrec = 0;
undopage = 0; undopage = 0;
cnoOfAllocatedPages = cpagesize = 0;
// Records with constant sizes // Records with constant sizes
}//Dbacc::initData() }//Dbacc::initData()
......
...@@ -177,7 +177,7 @@ void Dbacc::execCONTINUEB(Signal* signal) ...@@ -177,7 +177,7 @@ void Dbacc::execCONTINUEB(Signal* signal)
case ZREPORT_MEMORY_USAGE:{ case ZREPORT_MEMORY_USAGE:{
jam(); jam();
static int c_currentMemUsed = 0; static int c_currentMemUsed = 0;
int now = (cnoOfAllocatedPages * 100)/cpagesize; int now = cpagesize ? (cnoOfAllocatedPages * 100)/cpagesize : 0;
const int thresholds[] = { 99, 90, 80, 0}; const int thresholds[] = { 99, 90, 80, 0};
Uint32 i = 0; Uint32 i = 0;
......
...@@ -142,6 +142,7 @@ Dbtup::Dbtup(const class Configuration & conf) ...@@ -142,6 +142,7 @@ Dbtup::Dbtup(const class Configuration & conf)
tablerec = 0; tablerec = 0;
tableDescriptor = 0; tableDescriptor = 0;
undoPage = 0; undoPage = 0;
cnoOfPage = cnoOfAllocatedPages = 0;
}//Dbtup::Dbtup() }//Dbtup::Dbtup()
Dbtup::~Dbtup() Dbtup::~Dbtup()
...@@ -526,7 +527,7 @@ void Dbtup::execCONTINUEB(Signal* signal) ...@@ -526,7 +527,7 @@ void Dbtup::execCONTINUEB(Signal* signal)
case ZREPORT_MEMORY_USAGE:{ case ZREPORT_MEMORY_USAGE:{
ljam(); ljam();
static int c_currentMemUsed = 0; static int c_currentMemUsed = 0;
int now = (cnoOfAllocatedPages * 100)/cnoOfPage; int now = cnoOfPage ? (cnoOfAllocatedPages * 100)/cnoOfPage : 0;
const int thresholds[] = { 100, 90, 80, 0 }; const int thresholds[] = { 100, 90, 80, 0 };
Uint32 i = 0; Uint32 i = 0;
......
...@@ -357,8 +357,15 @@ NdbTransaction::execute(ExecType aTypeOfExec, ...@@ -357,8 +357,15 @@ NdbTransaction::execute(ExecType aTypeOfExec,
ret = -1; ret = -1;
if(savedError.code==0) if(savedError.code==0)
savedError= theError; 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 #ifdef ndb_api_crash_on_complex_blob_abort
assert(theFirstOpInList == NULL && theLastOpInList == NULL); assert(theFirstOpInList == NULL && theLastOpInList == NULL);
#else #else
......
...@@ -1605,7 +1605,9 @@ int ha_ndbcluster::peek_indexed_rows(const byte *record) ...@@ -1605,7 +1605,9 @@ int ha_ndbcluster::peek_indexed_rows(const byte *record)
int res; int res;
DBUG_ENTER("peek_indexed_rows"); DBUG_ENTER("peek_indexed_rows");
NdbOperation::LockMode lm= NdbOperation::LM_Read; NdbOperation::LockMode lm=
(NdbOperation::LockMode)get_ndb_lock_type(m_lock.type);
first= NULL; first= NULL;
if (table->s->primary_key != MAX_KEY) if (table->s->primary_key != MAX_KEY)
{ {
......
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