Commit adc0c223 authored by unknown's avatar unknown

Merge mysql.com:/home/stewart/Documents/MySQL/5.0/main

into  mysql.com:/home/stewart/Documents/MySQL/5.0/cleanup


ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
parents 21620190 5b6a0064
......@@ -3871,7 +3871,7 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr)
req->userReference = reference();
req->varIndex = 0;
req->offset = tmp - c_startOfPages;
req->size = sz; // Avrunda uppot
req->size = sz; // Round up
sendSignal(NDBFS_REF, GSN_FSAPPENDREQ, signal,
FsAppendReq::SignalLength, JBA);
......
......@@ -11135,7 +11135,11 @@ void Dbdih::initCommonData()
cnoReplicas = 1;
ndb_mgm_get_int_parameter(p, CFG_DB_NO_REPLICAS, &cnoReplicas);
cnoReplicas = cnoReplicas > 4 ? 4 : cnoReplicas;
if (cnoReplicas > 4)
{
progError(__LINE__, NDBD_EXIT_INVALID_CONFIG,
"Only up to four replicas are supported. Check NoOfReplicas.");
}
cgcpDelay = 2000;
ndb_mgm_get_int_parameter(p, CFG_DB_GCP_INTERVAL, &cgcpDelay);
......@@ -11723,14 +11727,14 @@ void Dbdih::execCHECKNODEGROUPSREQ(Signal* signal)
break;
case CheckNodeGroups::GetNodeGroupMembers: {
ok = true;
Uint32 ownNodeGoup =
Uint32 ownNodeGroup =
Sysfile::getNodeGroup(sd->nodeId, SYSFILE->nodeGroups);
sd->output = ownNodeGoup;
sd->output = ownNodeGroup;
sd->mask.clear();
NodeGroupRecordPtr ngPtr;
ngPtr.i = ownNodeGoup;
ngPtr.i = ownNodeGroup;
ptrAss(ngPtr, nodeGroupRecord);
for (Uint32 j = 0; j < ngPtr.p->nodeCount; j++) {
jam();
......@@ -11738,7 +11742,7 @@ void Dbdih::execCHECKNODEGROUPSREQ(Signal* signal)
}
#if 0
for (int i = 0; i < MAX_NDB_NODES; i++) {
if (ownNodeGoup ==
if (ownNodeGroup ==
Sysfile::getNodeGroup(i, SYSFILE->nodeGroups)) {
sd->mask.set(i);
}
......
......@@ -18578,60 +18578,54 @@ void
Dblqh::execCREATE_TRIG_REQ(Signal* signal)
{
jamEntry();
NodeId myNodeId = getOwnNodeId();
BlockReference tupref = calcTupBlockRef(myNodeId);
sendSignal(tupref, GSN_CREATE_TRIG_REQ, signal, CreateTrigReq::SignalLength, JBB);
sendSignal(DBTUP_REF, GSN_CREATE_TRIG_REQ, signal,
CreateTrigReq::SignalLength, JBB);
}
void
Dblqh::execCREATE_TRIG_CONF(Signal* signal)
{
jamEntry();
NodeId myNodeId = getOwnNodeId();
BlockReference dictref = calcDictBlockRef(myNodeId);
sendSignal(dictref, GSN_CREATE_TRIG_CONF, signal, CreateTrigConf::SignalLength, JBB);
sendSignal(DBDICT_REF, GSN_CREATE_TRIG_CONF, signal,
CreateTrigConf::SignalLength, JBB);
}
void
Dblqh::execCREATE_TRIG_REF(Signal* signal)
{
jamEntry();
NodeId myNodeId = getOwnNodeId();
BlockReference dictref = calcDictBlockRef(myNodeId);
sendSignal(dictref, GSN_CREATE_TRIG_REF, signal, CreateTrigRef::SignalLength, JBB);
sendSignal(DBDICT_REF, GSN_CREATE_TRIG_REF, signal,
CreateTrigRef::SignalLength, JBB);
}
void
Dblqh::execDROP_TRIG_REQ(Signal* signal)
{
jamEntry();
NodeId myNodeId = getOwnNodeId();
BlockReference tupref = calcTupBlockRef(myNodeId);
sendSignal(tupref, GSN_DROP_TRIG_REQ, signal, DropTrigReq::SignalLength, JBB);
sendSignal(DBTUP_REF, GSN_DROP_TRIG_REQ, signal,
DropTrigReq::SignalLength, JBB);
}
void
Dblqh::execDROP_TRIG_CONF(Signal* signal)
{
jamEntry();
NodeId myNodeId = getOwnNodeId();
BlockReference dictref = calcDictBlockRef(myNodeId);
sendSignal(dictref, GSN_DROP_TRIG_CONF, signal, DropTrigConf::SignalLength, JBB);
sendSignal(DBDICT_REF, GSN_DROP_TRIG_CONF, signal,
DropTrigConf::SignalLength, JBB);
}
void
Dblqh::execDROP_TRIG_REF(Signal* signal)
{
jamEntry();
NodeId myNodeId = getOwnNodeId();
BlockReference dictref = calcDictBlockRef(myNodeId);
sendSignal(dictref, GSN_DROP_TRIG_REF, signal, DropTrigRef::SignalLength, JBB);
sendSignal(DBDICT_REF, GSN_DROP_TRIG_REF, signal,
DropTrigRef::SignalLength, JBB);
}
Uint32 Dblqh::calcPageCheckSum(LogPageRecordPtr logP){
......
......@@ -146,9 +146,9 @@ foreach(@{$tables})
elsif($type =~ /varchar/ || $type =~ /varbinary/)
{
my $fixed= 1+$size;
my @dynamic=$dbh->selectrow_array("select avg(length("
.$dbh->quote($name)
.")) from `".$table.'`');
my @dynamic=$dbh->selectrow_array("select avg(length(`"
.$name.
."`)) from `".$table.'`');
$dynamic[0]=0 if !$dynamic[0];
@realsize= ($fixed,$fixed,ceil($dynamic[0]));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment