Below is the list of changes that have just been committed into a local
5.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/installing-source-tree.html
ChangeSet@stripped, 2007-11-19 13:37:53+01:00, jonas@stripped +2 -0
ndb - replace numbers with constants (dih/lqh)
MAX_REPLICAS
MAX_LOG_EXEC
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-11-19 13:37:50+01:00,
jonas@stripped +6 -5
replace numbers with constants
MAX_REPLICAS
MAX_LOG_EXEC
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-11-19 13:37:50+01:00,
jonas@stripped +7 -7
replace numbers with constants
MAX_REPLICAS
MAX_LOG_EXEC
diff -Nrup a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-11-15 12:27:33 +01:00
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-11-19 13:37:50 +01:00
@@ -10069,7 +10069,7 @@ void Dbdih::startFragment(Signal* signal
/* WE WILL NEVER START MORE THAN FOUR FRAGMENT REPLICAS WHATEVER THE */
/* DESIRED REPLICATION IS. */
/* ----------------------------------------------------------------------- */
- ndbrequire(tabPtr.p->noOfBackups < 4);
+ ndbrequire(tabPtr.p->noOfBackups < MAX_REPLICAS);
/* ----------------------------------------------------------------------- */
/* SEARCH FOR STORED REPLICAS THAT CAN BE USED TO RESTART THE SYSTEM. */
/* ----------------------------------------------------------------------- */
@@ -12488,7 +12488,8 @@ bool Dbdih::findLogNodes(CreateReplicaRe
return true;
}//if
startGci = fblStopGci + 1;
- if (logNode >= 4) { // Why??
+ if (logNode >= MAX_LOG_EXEC)
+ {
jam();
break;
}//if
@@ -12791,7 +12792,7 @@ void Dbdih::initCommonData()
cnoReplicas = 1;
ndb_mgm_get_int_parameter(p, CFG_DB_NO_REPLICAS, &cnoReplicas);
- if (cnoReplicas > 4)
+ if (cnoReplicas > MAX_REPLICAS)
{
progError(__LINE__, NDBD_EXIT_INVALID_CONFIG,
"Only up to four replicas are supported. Check NoOfReplicas.");
@@ -14195,7 +14196,7 @@ void Dbdih::sendStartFragreq(Signal* sig
Uint32 start = replicaPtr.p->logStartGci[noNodes - 1];
const Uint32 stop = replicaPtr.p->logStopGci[noNodes - 1];
- for(Uint32 i = noNodes; i < 4 && (stop - start) > 0; i++){
+ for(Uint32 i = noNodes; i < MAX_LOG_EXEC && (stop - start) > 0; i++){
replicaPtr.p->noLogNodes++;
replicaPtr.p->logStopGci[i - 1] = start;
@@ -14208,7 +14209,7 @@ void Dbdih::sendStartFragreq(Signal* sig
startFragReq->noOfLogNodes = replicaPtr.p->noLogNodes;
- for (Uint32 i = 0; i < 4 ; i++) {
+ for (Uint32 i = 0; i < MAX_LOG_EXEC ; i++) {
startFragReq->lqhLogNode[i] = replicaPtr.p->logNodeId[i];
startFragReq->startGci[i] = replicaPtr.p->logStartGci[i];
startFragReq->lastGci[i] = replicaPtr.p->logStopGci[i];
diff -Nrup a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-11-19 11:11:27 +01:00
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-11-19 13:37:50 +01:00
@@ -14252,7 +14252,7 @@ void Dblqh::execSTART_FRAGREQ(Signal* si
Uint32 noOfLogNodes = startFragReq->noOfLogNodes;
Uint32 lcpId = startFragReq->lcpId;
- ndbrequire(noOfLogNodes <= 4);
+ ndbrequire(noOfLogNodes <= MAX_LOG_EXEC);
fragptr.p->fragStatus = Fragrecord::CRASH_RECOVERING;
fragptr.p->srBlockref = startFragReq->userRef;
fragptr.p->srUserptr = startFragReq->userPtr;
@@ -14590,7 +14590,7 @@ void Dblqh::execEXEC_FRAGREQ(Signal* sig
ptrCheckGuard(tabptr, ctabrecFileSize, tablerec);
ndbrequire(getFragmentrec(signal, fragId));
- ndbrequire(fragptr.p->execSrNoReplicas < 4);
+ ndbrequire(fragptr.p->execSrNoReplicas < MAX_REPLICAS);
fragptr.p->execSrBlockref[fragptr.p->execSrNoReplicas] = execFragReq->userRef;
fragptr.p->execSrUserptr[fragptr.p->execSrNoReplicas] = execFragReq->userPtr;
fragptr.p->execSrStartGci[fragptr.p->execSrNoReplicas] =
execFragReq->startGci;
@@ -14694,7 +14694,7 @@ void Dblqh::execSrCompletedLab(Signal* s
* ALL FRAGMENTS WERE COMPLETED. THIS PHASE IS COMPLETED. IT IS NOW TIME TO
* START THE NEXT PHASE.
* ----------------------------------------------------------------------- */
- if (csrPhasesCompleted >= 4) {
+ if (csrPhasesCompleted >= MAX_LOG_EXEC) {
jam();
/* ----------------------------------------------------------------------
* THIS WAS THE LAST PHASE. WE HAVE NOW COMPLETED THE EXECUTION THE
@@ -14862,7 +14862,7 @@ void Dblqh::srGciLimits(Signal* signal)
while (fragptr.i != RNIL){
jam();
c_lcp_complete_fragments.getPtr(fragptr);
- ndbrequire(fragptr.p->execSrNoReplicas - 1 < 4);
+ ndbrequire(fragptr.p->execSrNoReplicas - 1 < MAX_REPLICAS);
for (Uint32 i = 0; i < fragptr.p->execSrNoReplicas; i++) {
jam();
if (fragptr.p->execSrStartGci[i] < logPartPtr.p->logStartGci) {
@@ -15607,7 +15607,7 @@ void Dblqh::execLogRecord(Signal* signal
readKey(signal);
readAttrinfo(signal);
initReqinfoExecSr(signal);
- arrGuard(logPartPtr.p->execSrExecuteIndex, 4);
+ arrGuard(logPartPtr.p->execSrExecuteIndex, MAX_REPLICAS);
BlockReference ref = fragptr.p->execSrBlockref[logPartPtr.p->execSrExecuteIndex];
tcConnectptr.p->nextReplica = refToNode(ref);
tcConnectptr.p->connectState = TcConnectionrec::LOG_CONNECTED;
@@ -15984,7 +15984,7 @@ void Dblqh::sendExecConf(Signal* signal)
Uint32 next = fragptr.p->nextList;
if (fragptr.p->execSrStatus != Fragrecord::IDLE) {
jam();
- ndbrequire(fragptr.p->execSrNoReplicas - 1 < 4);
+ ndbrequire(fragptr.p->execSrNoReplicas - 1 < MAX_REPLICAS);
for (Uint32 i = 0; i < fragptr.p->execSrNoReplicas; i++) {
jam();
signal->theData[0] = fragptr.p->execSrUserptr[i];
@@ -16548,7 +16548,7 @@ Uint32 Dblqh::checkIfExecLog(Signal* sig
(table_version_major(tabptr.p->schemaVersion) ==
table_version_major(tcConnectptr.p->schemaVersion))) {
if (fragptr.p->execSrStatus != Fragrecord::IDLE) {
if (fragptr.p->execSrNoReplicas > logPartPtr.p->execSrExecuteIndex) {
- ndbrequire((fragptr.p->execSrNoReplicas - 1) < 4);
+ ndbrequire((fragptr.p->execSrNoReplicas - 1) < MAX_REPLICAS);
for (Uint32 i = logPartPtr.p->execSrExecuteIndex;
i < fragptr.p->execSrNoReplicas;
i++) {
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2688) | jonas | 19 Nov |