ndb - no bugs number

  1) Make sure not to read uninitialized data in unique index code
      harmless (atleast before dynattr)
  2) Dont update p_latest_trans_gci
      for dirty unique index lookup
  
parent b4556894
...@@ -833,6 +833,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, ...@@ -833,6 +833,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// Read Primary Key Values // Read Primary Key Values
//-------------------------------------------------------------------- //--------------------------------------------------------------------
Tuple_header *save0= req_struct->m_tuple_ptr;
if (regOperPtr->op_struct.op_type == ZDELETE &&
!regOperPtr->is_first_operation())
{
jam();
req_struct->m_tuple_ptr= (Tuple_header*)
c_undo_buffer.get_ptr(&req_struct->prevOpPtr.p->m_copy_tuple_location);
}
if (regTabPtr->need_expand()) if (regTabPtr->need_expand())
prepare_read(req_struct, regTabPtr, true); prepare_read(req_struct, regTabPtr, true);
...@@ -844,6 +853,9 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, ...@@ -844,6 +853,9 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
false); false);
ndbrequire(ret != -1); ndbrequire(ret != -1);
noPrimKey= ret; noPrimKey= ret;
req_struct->m_tuple_ptr = save0;
Uint32 numAttrsToRead; Uint32 numAttrsToRead;
if ((regOperPtr->op_struct.op_type == ZUPDATE) && if ((regOperPtr->op_struct.op_type == ZUPDATE) &&
(trigPtr->sendOnlyChangedAttributes)) { (trigPtr->sendOnlyChangedAttributes)) {
......
...@@ -1970,8 +1970,10 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf, ...@@ -1970,8 +1970,10 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf,
if (tCommitFlag == 1) { if (tCommitFlag == 1) {
theCommitStatus = Committed; theCommitStatus = Committed;
theGlobalCheckpointId = tGCI; theGlobalCheckpointId = tGCI;
assert(tGCI); if (tGCI) // Read(dirty) only transaction doesnt get GCI
{
*p_latest_trans_gci = tGCI; *p_latest_trans_gci = tGCI;
}
} else if ((tNoComp >= tNoSent) && } else if ((tNoComp >= tNoSent) &&
(theLastExecOpInList->theCommitIndicator == 1)){ (theLastExecOpInList->theCommitIndicator == 1)){
/**********************************************************************/ /**********************************************************************/
......
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