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
This commit is contained in:
jonas@perch.ndb.mysql.com 2006-11-21 14:23:42 +01:00
parent b455689440
commit 32f4f8908e
2 changed files with 16 additions and 2 deletions

View file

@ -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)) {

View file

@ -1970,8 +1970,10 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf,
if (tCommitFlag == 1) {
theCommitStatus = Committed;
theGlobalCheckpointId = tGCI;
assert(tGCI);
*p_latest_trans_gci = tGCI;
if (tGCI) // Read(dirty) only transaction doesnt get GCI
{
*p_latest_trans_gci = tGCI;
}
} else if ((tNoComp >= tNoSent) &&
(theLastExecOpInList->theCommitIndicator == 1)){
/**********************************************************************/