bk commit into 4.1 tree (joreland:1.2218) BUG#10142 -
05-03-2005
, 05:17 AM
Below is the list of changes that have just been committed into a local
4.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/in...urce-tree.html
ChangeSet
1.2218 05/05/03 12:16:31 joreland (AT) mysql (DOT) com +6 -0
bug#10142 - ndb unhandle resource shortage in unique index code
ndb/src/ndbapi/ndberror.c
1.25 05/05/03 12:16:28 joreland (AT) mysql (DOT) com +1 -1
New error code for out of index operation records
ndb/src/ndbapi/NdbIndexOperation.cpp
1.15 05/05/03 12:16:28 joreland (AT) mysql (DOT) com +1 -1
Let failed tcindxreq abort
ndb/src/kernel/error/ErrorReporter.cpp
1.9 05/05/03 12:16:28 joreland (AT) mysql (DOT) com +3 -2
Include NDB version in ndb_X_error.log
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
1.54 05/05/03 12:16:28 joreland (AT) mysql (DOT) com +39 -42
1) Set transid on starting TCINDXREQ
2) New error code for out of index operation records
3) Check accumulating index op for RNIL before dereferencing it
ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
1.9 05/05/03 12:16:28 joreland (AT) mysql (DOT) com +1 -3
remove unneccessary TcSeizedIndexOperation object
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
1.20 05/05/03 12:16:28 joreland (AT) mysql (DOT) com +2 -28
remove unneccessary TcSeizedIndexOperation object
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: joreland
# Host: eel.hemma.oreland.se
# Root: /home/jonas/src/mysql-4.1
--- 1.19/ndb/src/kernel/blocks/dbtc/Dbtc.hpp Thu Nov 18 20:54:05 2004
+++ 1.20/ndb/src/kernel/blocks/dbtc/Dbtc.hpp Tue May 3 12:16:28 2005
@@ -585,34 +585,8 @@
*/
ArrayPool<TcIndexOperation> c_theIndexOperationPool;
- /**
- * The list of index operations
- */
- ArrayList<TcIndexOperation> c_theIndexOperations;
-
UintR c_maxNumberOfIndexOperations;
- struct TcSeizedIndexOperation {
- /**
- * Next ptr (used in pool/list)
- */
- union {
- Uint32 nextPool;
- Uint32 nextList;
- };
- /**
- * Prev pointer (used in list)
- */
- Uint32 prevList;
- };
-
- /**
- * Pool of seized index operations
- */
- ArrayPool<TcSeizedIndexOperation> c_theSeizedIndexOperationPool;
-
- typedef Ptr<TcSeizedIndexOperation> TcSeizedIndexOperationPtr;
-
/************************** API CONNECT RECORD ***********************
* The API connect record contains the connection record to which the
* application connects.
@@ -650,7 +624,7 @@
struct ApiConnectRecord {
ApiConnectRecord(ArrayPool<TcFiredTriggerData> & firedTriggerPool,
- ArrayPool<TcSeizedIndexOperation> & seizedIndexOpPool):
+ ArrayPool<TcIndexOperation> & seizedIndexOpPool):
theFiredTriggers(firedTriggerPool),
isIndexOp(false),
theSeizedIndexOperations(seizedIndexOpPool)
@@ -763,7 +737,7 @@
UintR accumulatingIndexOp;
UintR executingIndexOp;
UintR tcIndxSendArray[6];
- ArrayList<TcSeizedIndexOperation> theSeizedIndexOperations;
+ ArrayList<TcIndexOperation> theSeizedIndexOperations;
};
typedef Ptr<ApiConnectRecord> ApiConnectRecordPtr;
--- 1.8/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp Wed Jan 19 09:15:31 2005
+++ 1.9/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp Tue May 3 12:16:28 2005
@@ -65,7 +65,6 @@
c_theFiredTriggerPool.setSize(c_maxNumberOfFiredTr iggers);
c_theIndexPool.setSize(c_maxNumberOfIndexes);
c_theIndexOperationPool.setSize(c_maxNumberOfIndex Operations);
- c_theSeizedIndexOperationPool.setSize(c_maxNumberO fIndexOperations);
c_theAttributeBufferPool.setSize(c_transactionBuff erSpace);
c_firedTriggerHash.setSize((c_maxNumberOfFiredTrig gers+10)/10);
}//Dbtc::initData()
@@ -85,7 +84,7 @@
for(unsigned i = 0; i<capiConnectFilesize; i++) {
p = &apiConnectRecord[i];
new (p) ApiConnectRecord(c_theFiredTriggerPool,
- c_theSeizedIndexOperationPool);
+ c_theIndexOperationPool);
}
// Init all fired triggers
DLFifoList<TcFiredTriggerData> triggers(c_theFiredTriggerPool);
@@ -177,7 +176,6 @@
c_maxNumberOfFiredTriggers(0),
c_theIndexes(c_theIndexPool),
c_maxNumberOfIndexes(0),
- c_theIndexOperations(c_theIndexOperationPool),
c_maxNumberOfIndexOperations(0),
m_commitAckMarkerHash(m_commitAckMarkerPool)
{
--- 1.53/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp Wed Apr 20 11:07:49 2005
+++ 1.54/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp Tue May 3 12:16:28 2005
@@ -11161,16 +11161,21 @@
jam();
// This is a newly started transaction, clean-up
releaseAllSeizedIndexOperations(regApiPtr);
+
+ regApiPtr->transid[0] = tcIndxReq->transId1;
+ regApiPtr->transid[1] = tcIndxReq->transId2;
}//if
- if (!seizeIndexOperation(regApiPtr, indexOpPtr)) {
+ ndbout_c("here");
+
+ if (ERROR_INSERTED(8036) || !seizeIndexOperation(regApiPtr, indexOpPtr)) {
jam();
// Failed to allocate index operation
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend();
-
+
tcIndxRef->connectPtr = tcIndxReq->senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1];
- tcIndxRef->errorCode = 4000;
+ tcIndxRef->errorCode = 288;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB);
return;
@@ -11307,15 +11312,17 @@
TcIndexOperationPtr indexOpPtr;
TcIndexOperation* indexOp;
- indexOpPtr.i = regApiPtr->accumulatingIndexOp;
- indexOp = c_theIndexOperations.getPtr(indexOpPtr.i);
- if (saveINDXKEYINFO(signal,
- indexOp,
- src,
- keyInfoLength)) {
- jam();
- // We have received all we need
- readIndexTable(signal, regApiPtr, indexOp);
+ if((indexOpPtr.i = regApiPtr->accumulatingIndexOp) != RNIL)
+ {
+ indexOp = c_theIndexOperationPool.getPtr(indexOpPtr.i);
+ if (saveINDXKEYINFO(signal,
+ indexOp,
+ src,
+ keyInfoLength)) {
+ jam();
+ // We have received all we need
+ readIndexTable(signal, regApiPtr, indexOp);
+ }
}
}
@@ -11338,15 +11345,17 @@
TcIndexOperationPtr indexOpPtr;
TcIndexOperation* indexOp;
- indexOpPtr.i = regApiPtr->accumulatingIndexOp;
- indexOp = c_theIndexOperations.getPtr(indexOpPtr.i);
- if (saveINDXATTRINFO(signal,
- indexOp,
- src,
- attrInfoLength)) {
- jam();
- // We have received all we need
- readIndexTable(signal, regApiPtr, indexOp);
+ if((indexOpPtr.i = regApiPtr->accumulatingIndexOp) != RNIL)
+ {
+ indexOp = c_theIndexOperationPool.getPtr(indexOpPtr.i);
+ if (saveINDXATTRINFO(signal,
+ indexOp,
+ src,
+ attrInfoLength)) {
+ jam();
+ // We have received all we need
+ readIndexTable(signal, regApiPtr, indexOp);
+ }
}
}
@@ -11371,7 +11380,7 @@
releaseIndexOperation(apiConnectptr.p, indexOp);
terrorCode = 4000;
abortErrorLab(signal);
- return true;
+ return false;
}
if (receivedAllINDXKEYINFO(indexOp) && receivedAllINDXATTRINFO(indexOp)) {
jam();
@@ -11404,7 +11413,7 @@
releaseIndexOperation(apiConnectptr.p, indexOp);
terrorCode = 4000;
abortErrorLab(signal);
- return true;
+ return false;
}
if (receivedAllINDXKEYINFO(indexOp) && receivedAllINDXATTRINFO(indexOp)) {
jam();
@@ -11464,7 +11473,7 @@
jamEntry();
indexOpPtr.i = tcKeyConf->apiConnectPtr;
- TcIndexOperation* indexOp = c_theIndexOperations.getPtr(indexOpPtr.i);
+ TcIndexOperation* indexOp = c_theIndexOperationPool.getPtr(indexOpPtr.i);
Uint32 confInfo = tcKeyConf->confInfo;
/**
@@ -11553,7 +11562,7 @@
jamEntry();
indexOpPtr.i = tcKeyRef->connectPtr;
- TcIndexOperation* indexOp = c_theIndexOperations.getPtr(indexOpPtr.i);
+ TcIndexOperation* indexOp = c_theIndexOperationPool.getPtr(indexOpPtr.i);
indexOpPtr.p = indexOp;
if (!indexOp) {
jam();
@@ -11654,7 +11663,7 @@
jamEntry();
TcIndexOperationPtr indexOpPtr;
indexOpPtr.i = transIdAI->connectPtr;
- TcIndexOperation* indexOp = c_theIndexOperations.getPtr(indexOpPtr.i);
+ TcIndexOperation* indexOp = c_theIndexOperationPool.getPtr(indexOpPtr.i);
indexOpPtr.p = indexOp;
if (!indexOp) {
jam();
@@ -11762,7 +11771,7 @@
jamEntry();
TcIndexOperationPtr indexOpPtr;
indexOpPtr.i = tcRollbackRep->connectPtr;
- TcIndexOperation* indexOp = c_theIndexOperations.getPtr(indexOpPtr.i);
+ TcIndexOperation* indexOp = c_theIndexOperationPool.getPtr(indexOpPtr.i);
indexOpPtr.p = indexOp;
tcRollbackRep = (TcRollbackRep *)signal->getDataPtrSend();
tcRollbackRep->connectPtr = indexOp->tcIndxReq.senderData;
@@ -12090,16 +12099,7 @@
bool Dbtc::seizeIndexOperation(ApiConnectRecord* regApiPtr,
TcIndexOperationPtr& indexOpPtr)
{
- bool seizeOk;
-
- seizeOk = c_theIndexOperations.seize(indexOpPtr);
- if (seizeOk) {
- jam();
- TcSeizedIndexOperationPtr seizedIndexOpPtr;
- seizeOk &= regApiPtr->theSeizedIndexOperations.seizeId(seizedIndexOpPtr ,
- indexOpPtr.i);
- }
- return seizeOk;
+ return regApiPtr->theSeizedIndexOperations.seize(indexOpPtr);
}
void Dbtc::releaseIndexOperation(ApiConnectRecord* regApiPtr,
@@ -12113,18 +12113,16 @@
indexOp->expectedTransIdAI = 0;
indexOp->transIdAI.release();
regApiPtr->theSeizedIndexOperations.release(indexOp->indexOpId);
- c_theIndexOperations.release(indexOp->indexOpId);
}
void Dbtc::releaseAllSeizedIndexOperations(ApiConnectRe cord* regApiPtr)
{
- TcSeizedIndexOperationPtr seizedIndexOpPtr;
+ TcIndexOperationPtr seizedIndexOpPtr;
regApiPtr->theSeizedIndexOperations.first(seizedIndexOpPtr);
while(seizedIndexOpPtr.i != RNIL) {
jam();
- TcIndexOperation* indexOp =
- c_theIndexOperations.getPtr(seizedIndexOpPtr.i);
+ TcIndexOperation* indexOp = seizedIndexOpPtr.p;
indexOp->indexOpState = IOS_NOOP;
indexOp->expectedKeyInfo = 0;
@@ -12133,7 +12131,6 @@
indexOp->attrInfo.release();
indexOp->expectedTransIdAI = 0;
indexOp->transIdAI.release();
- c_theIndexOperations.release(seizedIndexOpPtr.i);
regApiPtr->theSeizedIndexOperations.next(seizedIndexOpPtr) ;
}
regApiPtr->theSeizedIndexOperations.release();
--- 1.8/ndb/src/kernel/error/ErrorReporter.cpp Mon Nov 1 14:55:38 2004
+++ 1.9/ndb/src/kernel/error/ErrorReporter.cpp Tue May 3 12:16:28 2005
@@ -130,7 +130,7 @@
"Date/Time: %s\nType of error: %s\n"
"Message: %s\nFault ID: %d\nProblem data: %s"
"\nObject of reference: %s\nProgramName: %s\n"
- "ProcessID: %d\nTraceFile: %s\n***EOM***\n",
+ "ProcessID: %d\nTraceFile: %s\n%s\n***EOM***\n",
formatTimeStampString() ,
errorType[type],
lookupErrorMessage(faultID),
@@ -139,7 +139,8 @@
objRef,
my_progname,
processId,
- theNameOfTheTraceFile ? theNameOfTheTraceFile : "<no tracefile>");
+ theNameOfTheTraceFile ? theNameOfTheTraceFile : "<no tracefile>",
+ NDB_VERSION_STRING);
// Add trailing blanks to get a fixed lenght of the message
while (strlen(messptr) <= MESSAGE_LENGTH-3){
--- 1.14/ndb/src/ndbapi/NdbIndexOperation.cpp Wed Apr 6 08:53:08 2005
+++ 1.15/ndb/src/ndbapi/NdbIndexOperation.cpp Tue May 3 12:16:28 2005
@@ -752,5 +752,5 @@
Uint32 errorCode = tcIndxRef->errorCode;
theError.code = errorCode;
theNdbCon->setOperationErrorCodeAbort(errorCode);
- return theNdbCon->OpCompleteFailure(theNdbCon->m_abortOption);
+ return theNdbCon->OpCompleteFailure(AbortOnError);
}//NdbIndexOperation::receiveTCINDXREF()
--- 1.24/ndb/src/ndbapi/ndberror.c Wed Apr 27 07:56:36 2005
+++ 1.25/ndb/src/ndbapi/ndberror.c Tue May 3 12:16:28 2005
@@ -169,7 +169,7 @@
{ 4021, TR, "Out of Send Buffer space in NDB API" },
{ 4022, TR, "Out of Send Buffer space in NDB API" },
{ 4032, TR, "Out of Send Buffer space in NDB API" },
-
+ { 288, TR, "Out of index operations in transaction coordinator (increase MaxNoOfConcurrentIndexOperations)" },
/**
* InsufficientSpace
*/
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw |