diff options
author | unknown <msvensson@neptunus.(none)> | 2005-03-10 10:46:19 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-03-10 10:46:19 +0100 |
commit | 87636012c7a84ad90d38ff7b28d68ebea67a5098 (patch) | |
tree | e0181de97d2149ad200aac694f22a4e5b3fec752 /ndb | |
parent | 8c2067654bfdca62ddc4e76299b59e9c7dbb3963 (diff) | |
download | mariadb-git-87636012c7a84ad90d38ff7b28d68ebea67a5098.tar.gz |
Fix uninitialised variable in Dbacc
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Found use of uninitialised variable when increasing m_commit_count.
Moved initialisation of rootfragrecptr to before increase of m_commit_count, and removed the two initializations further down, since they are now unneccessary.
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/kernel/blocks/dbacc/DbaccMain.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index dd68599f4f6..a16c0da369b 100644 --- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -2449,14 +2449,14 @@ void Dbacc::execACC_COMMITREQ(Signal* signal) operationRecPtr.p->transactionstate = IDLE; operationRecPtr.p->operation = ZUNDEFINED_OP; if(Toperation != ZREAD){ + rootfragrecptr.i = fragrecptr.p->myroot; + ptrCheckGuard(rootfragrecptr, crootfragmentsize, rootfragmentrec); rootfragrecptr.p->m_commit_count++; if (Toperation != ZINSERT) { if (Toperation != ZDELETE) { return; } else { jam(); - rootfragrecptr.i = fragrecptr.p->myroot; - ptrCheckGuard(rootfragrecptr, crootfragmentsize, rootfragmentrec); rootfragrecptr.p->noOfElements--; fragrecptr.p->slack += operationRecPtr.p->insertDeleteLen; if (fragrecptr.p->slack > fragrecptr.p->slackCheck) { @@ -2476,8 +2476,6 @@ void Dbacc::execACC_COMMITREQ(Signal* signal) }//if } else { jam(); /* EXPAND PROCESS HANDLING */ - rootfragrecptr.i = fragrecptr.p->myroot; - ptrCheckGuard(rootfragrecptr, crootfragmentsize, rootfragmentrec); rootfragrecptr.p->noOfElements++; fragrecptr.p->slack -= operationRecPtr.p->insertDeleteLen; if (fragrecptr.p->slack >= (1u << 31)) { |