Commit 9f8d2e5b authored by unknown's avatar unknown
Browse files

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
  


storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp:
  Make sure not to read uninitialized data in unique index code
    harmless (atleast before dynattr)
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Dont update p_latest_trans_gci
    for dirty unique index lookup
parent d7cc8d40
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -833,6 +833,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
//--------------------------------------------------------------------
// 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()) 
    prepare_read(req_struct, regTabPtr, true);
  
@@ -844,6 +853,9 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
			   false);
  ndbrequire(ret != -1);
  noPrimKey= ret;
  
  req_struct->m_tuple_ptr = save0;
  
  Uint32 numAttrsToRead;
  if ((regOperPtr->op_struct.op_type == ZUPDATE) &&
      (trigPtr->sendOnlyChangedAttributes)) {
+4 −2
Original line number Diff line number Diff line
@@ -1970,8 +1970,10 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf,
    if (tCommitFlag == 1) {
      theCommitStatus = Committed;
      theGlobalCheckpointId = tGCI;
      assert(tGCI);
      if (tGCI) // Read(dirty) only transaction doesnt get GCI
      {
	*p_latest_trans_gci = tGCI;
      }
    } else if ((tNoComp >= tNoSent) &&
               (theLastExecOpInList->theCommitIndicator == 1)){
      /**********************************************************************/