Commit 68d074d0 authored by unknown's avatar unknown
Browse files

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

into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb

parents f8a071d3 f58baa6a
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1398,18 +1398,19 @@ id val
1	test1
2	test2
INSERT INTO t1 VALUES (2,'test2') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (3,'test3') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (2,'test3') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (3,'test4') ON DUPLICATE KEY UPDATE val=VALUES(val);
SELECT * FROM t1;
id	val
1	test1
2	test2
3	test3
2	test3
3	test4
SELECT * FROM t2;
id	val
1	test1
2	test2
3	test2
4	test3
3	test3
4	test4
DROP TRIGGER trg27006_a_insert;
DROP TRIGGER trg27006_a_update;
drop table t1,t2;
+3 −3
Original line number Diff line number Diff line
@@ -1700,8 +1700,7 @@ DROP PROCEDURE bug22580_proc_1;
DROP PROCEDURE bug22580_proc_2;

#
# Bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE KEY
#            UPDATE if the row wasn't actually changed.
# Bug#27006: AFTER UPDATE triggers not fired with INSERT ... ON DUPLICATE
#
--disable_warnings
DROP TRIGGER IF EXISTS trg27006_a_update;
@@ -1730,7 +1729,8 @@ INSERT INTO t1(val) VALUES ('test1'),('test2');
SELECT * FROM t1;
SELECT * FROM t2;
INSERT INTO t1 VALUES (2,'test2') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (3,'test3') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (2,'test3') ON DUPLICATE KEY UPDATE val=VALUES(val);
INSERT INTO t1 VALUES (3,'test4') ON DUPLICATE KEY UPDATE val=VALUES(val);
SELECT * FROM t1;
SELECT * FROM t2;
DROP TRIGGER trg27006_a_insert;
+13 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ Next DBACC 3002
Next DBTUP 4014
Next DBLQH 5043
Next DBDICT 6007
Next DBDIH 7181
Next DBDIH 7183
Next DBTC 8039
Next CMVMI 9000
Next BACKUP 10022
@@ -489,3 +489,15 @@ Dbdict:
6003 Crash in participant @ CreateTabReq::Prepare
6004 Crash in participant @ CreateTabReq::Commit
6005 Crash in participant @ CreateTabReq::CreateDrop

TUP:
----

4025: Fail all inserts with out of memory
4026: Fail one insert with oom
4027: Fail inserts randomly with oom
4028: Fail one random insert with oom

NDBCNTR:

1000: Crash insertion on SystemError::CopyFragRef
+29 −3
Original line number Diff line number Diff line
@@ -4811,6 +4811,15 @@ void Dbdih::execMASTER_GCPREQ(Signal* signal)
  } else {
    ndbrequire(failedNodePtr.p->nodeStatus == NodeRecord::DYING);
  }//if

  if (ERROR_INSERTED(7181))
  {
    ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
    CLEAR_ERROR_INSERT_VALUE;
    signal->theData[1] = coldgcp;
    execGCP_TCFINISHED(signal);
  }
  
  MasterGCPConf::State gcpState;
  switch (cgcpParticipantState) {
  case GCP_PARTICIPANT_READY:
@@ -4877,6 +4886,14 @@ void Dbdih::execMASTER_GCPREQ(Signal* signal)
    masterGCPConf->lcpActive[i] = SYSFILE->lcpActive[i];
  sendSignal(newMasterBlockref, GSN_MASTER_GCPCONF, signal, 
             MasterGCPConf::SignalLength, JBB);

  if (ERROR_INSERTED(7182))
  {
    ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
    CLEAR_ERROR_INSERT_VALUE;
    signal->theData[1] = coldgcp;
    execGCP_TCFINISHED(signal);
  }
}//Dbdih::execMASTER_GCPREQ()

void Dbdih::execMASTER_GCPCONF(Signal* signal) 
@@ -7549,10 +7566,10 @@ void Dbdih::execGCP_NODEFINISH(Signal* signal)
  } else if (cmasterState == MASTER_TAKE_OVER_GCP) {
    jam();
    //-------------------------------------------------------------
    // We are currently taking over as master. We will delay the
    // signal until we have completed the take over gcp handling.
    // We are currently taking over as master. Ignore
    // signal in this case since we will discover it in reception of 
    // MASTER_GCPCONF.
    //-------------------------------------------------------------
    sendSignalWithDelay(reference(), GSN_GCP_NODEFINISH, signal, 20, 3);
    return;
  } else {
    ndbrequire(cmasterState == MASTER_ACTIVE);
@@ -7699,6 +7716,15 @@ void Dbdih::execGCP_TCFINISHED(Signal* signal)
  Uint32 gci = signal->theData[1];
  ndbrequire(gci == coldgcp);

  if (ERROR_INSERTED(7181) || ERROR_INSERTED(7182))
  {
    ndbout_c("killing %d", refToNode(cmasterdihref));
    signal->theData[0] = 9999;
    sendSignal(numberToRef(CMVMI, refToNode(cmasterdihref)),
	       GSN_NDB_TAMPER, signal, 1, JBB);
    return;
  }

  cgcpParticipantState = GCP_PARTICIPANT_TC_FINISHED;
  signal->theData[0] = cownNodeId;
  signal->theData[1] = coldgcp;
+16 −3
Original line number Diff line number Diff line
@@ -9634,6 +9634,15 @@ void Dblqh::copyCompletedLab(Signal* signal)
    closeCopyLab(signal);
    return;
  }//if
  if (scanptr.p->scanState == ScanRecord::WAIT_LQHKEY_COPY &&
      scanptr.p->scanErrorCounter)
  {
    jam();
    closeCopyLab(signal);
    return;
  }
  
  if (scanptr.p->scanState == ScanRecord::WAIT_LQHKEY_COPY) {
    jam();
/*---------------------------------------------------------------------------*/
@@ -9710,13 +9719,16 @@ void Dblqh::continueCopyAfterBlockedLab(Signal* signal)
void Dblqh::copyLqhKeyRefLab(Signal* signal) 
{
  ndbrequire(tcConnectptr.p->transid[1] == signal->theData[4]);
  tcConnectptr.p->copyCountWords -= signal->theData[3];
  Uint32 copyWords = signal->theData[3];
  scanptr.i = tcConnectptr.p->tcScanRec;
  c_scanRecordPool.getPtr(scanptr);
  scanptr.p->scanErrorCounter++;
  tcConnectptr.p->errorCode = terrorCode;
  closeCopyLab(signal);
  return;
  
  LqhKeyConf* conf = (LqhKeyConf*)signal->getDataPtrSend();
  conf->transId1 = copyWords;
  conf->transId2 = tcConnectptr.p->transid[1];
  copyCompletedLab(signal);
}//Dblqh::copyLqhKeyRefLab()
void Dblqh::closeCopyLab(Signal* signal) 
@@ -9727,6 +9739,7 @@ void Dblqh::closeCopyLab(Signal* signal)
// Wait until all of those have arrived until we start the
// close process.
/*---------------------------------------------------------------------------*/
    scanptr.p->scanState = ScanRecord::WAIT_LQHKEY_COPY;
    jam();
    return;
  }//if
Loading