mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Irix64 mipspro ndb compile fixes
BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
parent
6e18271f1c
commit
01aceaaa15
49 changed files with 303 additions and 208 deletions
|
@ -6,7 +6,7 @@ if [ ! -f "sql/mysqld.cc" ]; then
|
|||
fi
|
||||
|
||||
cflags="-64 -mips4"
|
||||
|
||||
config_args=
|
||||
if [ "$#" != 0 ]; then
|
||||
case "$1" in
|
||||
--help)
|
||||
|
@ -25,8 +25,7 @@ if [ "$#" != 0 ]; then
|
|||
cflags=""
|
||||
;;
|
||||
*)
|
||||
echo "$0: invalid option '$1'; use --help to show usage"
|
||||
exit 1
|
||||
config_args="$config_args $1"; shift
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
@ -79,6 +78,7 @@ cxxflags="$cxxflags -LANG:libc_in_namespace_std=OFF"
|
|||
CC=cc CXX=CC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \
|
||||
./configure --prefix=/usr/local/mysql --disable-shared \
|
||||
--with-extra-charsets=complex --enable-thread-safe-client \
|
||||
--without-extra-tools --disable-dependency-tracking
|
||||
--without-extra-tools --disable-dependency-tracking \
|
||||
$config_args
|
||||
|
||||
make
|
||||
|
|
|
@ -126,6 +126,7 @@ mysql@home.(none)
|
|||
mysqldev@build.mysql2.com
|
||||
mysqldev@melody.local
|
||||
mysqldev@mysql.com
|
||||
mysqldev@o2k.irixworld.net
|
||||
ndbdev@ndbmaster.mysql.com
|
||||
nick@mysql.com
|
||||
nick@nick.leippe.com
|
||||
|
|
|
@ -108,7 +108,8 @@ public:
|
|||
NodeState(StartLevel);
|
||||
NodeState(StartLevel, bool systemShutdown);
|
||||
NodeState(StartLevel, Uint32 startPhase, StartType);
|
||||
|
||||
void init();
|
||||
|
||||
/**
|
||||
* Current start level
|
||||
*/
|
||||
|
@ -177,6 +178,12 @@ public:
|
|||
|
||||
inline
|
||||
NodeState::NodeState(){
|
||||
init();
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
NodeState::init(){
|
||||
startLevel = SL_CMVMI;
|
||||
nodeGroup = 0xFFFFFFFF;
|
||||
dynamicId = 0xFFFFFFFF;
|
||||
|
@ -186,7 +193,7 @@ NodeState::NodeState(){
|
|||
|
||||
inline
|
||||
NodeState::NodeState(StartLevel sl){
|
||||
NodeState::NodeState();
|
||||
init();
|
||||
startLevel = sl;
|
||||
singleUserMode = 0;
|
||||
singleUserApi = 0xFFFFFFFF;
|
||||
|
@ -194,7 +201,7 @@ NodeState::NodeState(StartLevel sl){
|
|||
|
||||
inline
|
||||
NodeState::NodeState(StartLevel sl, Uint32 sp, StartType typeOfStart){
|
||||
NodeState::NodeState();
|
||||
init();
|
||||
startLevel = sl;
|
||||
starting.startPhase = sp;
|
||||
starting.restartType = typeOfStart;
|
||||
|
@ -204,7 +211,7 @@ NodeState::NodeState(StartLevel sl, Uint32 sp, StartType typeOfStart){
|
|||
|
||||
inline
|
||||
NodeState::NodeState(StartLevel sl, bool sys){
|
||||
NodeState::NodeState();
|
||||
init();
|
||||
startLevel = sl;
|
||||
stopping.systemShutdown = sys;
|
||||
singleUserMode = 0;
|
||||
|
|
|
@ -324,7 +324,7 @@ public:
|
|||
/**
|
||||
* Get size of element
|
||||
*/
|
||||
int Column::getSize() const;
|
||||
int getSize() const;
|
||||
|
||||
/**
|
||||
* Set distribution key
|
||||
|
|
|
@ -29,10 +29,11 @@ static const char * localBlockNames[NO_OF_BLOCKS];
|
|||
static
|
||||
int
|
||||
initSignalNames(const char * dst[], const GsnName src[], unsigned short len){
|
||||
for(int i = 0; i<=MAX_GSN; i++)
|
||||
int i;
|
||||
for(i = 0; i<=MAX_GSN; i++)
|
||||
dst[i] = 0;
|
||||
|
||||
for(int i = 0; i<len; i++){
|
||||
for(i = 0; i<len; i++){
|
||||
unsigned short gsn = src[i].gsn;
|
||||
const char * name = src[i].name;
|
||||
|
||||
|
@ -54,10 +55,11 @@ int
|
|||
initSignalPrinters(SignalDataPrintFunction dst[],
|
||||
const NameFunctionPair src[],
|
||||
unsigned short len){
|
||||
for(int i = 0; i<=MAX_GSN; i++)
|
||||
int i;
|
||||
for(i = 0; i<=MAX_GSN; i++)
|
||||
dst[i] = 0;
|
||||
|
||||
for(int i = 0; i<len; i++){
|
||||
for(i = 0; i<len; i++){
|
||||
unsigned short gsn = src[i].gsn;
|
||||
SignalDataPrintFunction fun = src[i].function;
|
||||
|
||||
|
@ -79,10 +81,11 @@ int
|
|||
initBlockNames(const char * dst[],
|
||||
const BlockName src[],
|
||||
unsigned len){
|
||||
for(int i = 0; i<NO_OF_BLOCKS; i++)
|
||||
int i;
|
||||
for(i = 0; i<NO_OF_BLOCKS; i++)
|
||||
dst[i] = 0;
|
||||
|
||||
for(unsigned i = 0; i<len; i++){
|
||||
for(i = 0; i<len; i++){
|
||||
const int index = src[i].number - MIN_BLOCK_NO;
|
||||
if(index < 0 && index >= NO_OF_BLOCKS || dst[index] != 0){
|
||||
fprintf(stderr,
|
||||
|
|
|
@ -1303,14 +1303,15 @@ bool
|
|||
EventLogger::matchEventCategory(const char * str,
|
||||
LogLevel::EventCategory * cat,
|
||||
bool exactMatch){
|
||||
unsigned i;
|
||||
if(cat == 0 || str == 0)
|
||||
return false;
|
||||
|
||||
char * tmp = strdup(str);
|
||||
for(size_t i = 0; i<strlen(tmp); i++)
|
||||
for(i = 0; i<strlen(tmp); i++)
|
||||
tmp[i] = toupper(tmp[i]);
|
||||
|
||||
for(Uint32 i = 0; i<noOfEventCategoryNames; i++){
|
||||
for(i = 0; i<noOfEventCategoryNames; i++){
|
||||
if(strcmp(tmp, eventCategoryNames[i].name) == 0){
|
||||
* cat = eventCategoryNames[i].category;
|
||||
free(tmp);
|
||||
|
|
|
@ -25,7 +25,8 @@ printSTART_LCP_REQ(FILE * output, const Uint32 * theData,
|
|||
|
||||
const StartLcpReq * const sig = (StartLcpReq *) theData;
|
||||
|
||||
char buf1[sig->participatingDIH.TextLength+1], buf2[sig->participatingLQH.TextLength+1];
|
||||
char buf1[8*_NDB_NODE_BITMASK_SIZE+1];
|
||||
char buf2[8*_NDB_NODE_BITMASK_SIZE+1];
|
||||
fprintf(output,
|
||||
" Sender: %d LcpId: %d\n"
|
||||
" ParticipatingDIH = %s\n"
|
||||
|
|
|
@ -350,3 +350,4 @@ Logger::log(LoggerLevel logLevel, const char* pMsg, va_list ap) const
|
|||
// PRIVATE
|
||||
//
|
||||
|
||||
template class Vector<LogHandler*>;
|
||||
|
|
|
@ -2200,13 +2200,14 @@ const int ConfigInfo::m_NoOfParams = sizeof(m_ParamInfo) / sizeof(ParamInfo);
|
|||
inline void require(bool v) { if(!v) abort();}
|
||||
|
||||
ConfigInfo::ConfigInfo() {
|
||||
int i;
|
||||
Properties *section;
|
||||
const Properties *oldpinfo;
|
||||
|
||||
m_info.setCaseInsensitiveNames(true);
|
||||
m_systemDefaults.setCaseInsensitiveNames(true);
|
||||
|
||||
for (int i=0; i<m_NoOfParams; i++) {
|
||||
for (i=0; i<m_NoOfParams; i++) {
|
||||
const ParamInfo & param = m_ParamInfo[i];
|
||||
|
||||
// Create new section if it did not exist
|
||||
|
@ -2261,7 +2262,7 @@ ConfigInfo::ConfigInfo() {
|
|||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<m_NoOfParams; i++) {
|
||||
for (i=0; i<m_NoOfParams; i++) {
|
||||
if(m_ParamInfo[i]._section == NULL){
|
||||
ndbout << "Check that each entry has a section failed." << endl;
|
||||
ndbout << "Parameter \"" << m_ParamInfo[i]._fname << endl;
|
||||
|
@ -3029,13 +3030,14 @@ transform(InitConfigFileParser::Context & ctx,
|
|||
|
||||
bool
|
||||
fixDepricated(InitConfigFileParser::Context & ctx, const char * data){
|
||||
const char * name;
|
||||
/**
|
||||
* Transform old values to new values
|
||||
* Transform new values to old values (backward compatible)
|
||||
*/
|
||||
Properties tmp;
|
||||
Properties::Iterator it(ctx.m_currentSection);
|
||||
for (const char* name = it.first(); name != NULL; name = it.next()) {
|
||||
for (name = it.first(); name != NULL; name = it.next()) {
|
||||
const DepricationTransform * p = &f_deprication[0];
|
||||
while(p->m_section != 0){
|
||||
if(strcmp(p->m_section, ctx.fname) == 0){
|
||||
|
@ -3056,7 +3058,7 @@ fixDepricated(InitConfigFileParser::Context & ctx, const char * data){
|
|||
}
|
||||
|
||||
Properties::Iterator it2(&tmp);
|
||||
for (const char* name = it2.first(); name != NULL; name = it2.next()) {
|
||||
for (name = it2.first(); name != NULL; name = it2.next()) {
|
||||
PropertiesType type;
|
||||
require(tmp.getTypeOf(name, &type));
|
||||
switch(type){
|
||||
|
@ -3162,11 +3164,12 @@ addNodeConnections(Vector<ConfigInfo::ConfigRuleSection>§ions,
|
|||
struct InitConfigFileParser::Context &ctx,
|
||||
const char * ruleData)
|
||||
{
|
||||
Uint32 i;
|
||||
Properties * props= ctx.m_config;
|
||||
Properties p_connections;
|
||||
Properties p_connections2;
|
||||
|
||||
for (Uint32 i = 0;; i++){
|
||||
for (i = 0;; i++){
|
||||
const Properties * tmp;
|
||||
Uint32 nodeId1, nodeId2;
|
||||
|
||||
|
@ -3187,8 +3190,8 @@ addNodeConnections(Vector<ConfigInfo::ConfigRuleSection>§ions,
|
|||
Properties p_db_nodes;
|
||||
Properties p_api_mgm_nodes;
|
||||
|
||||
Uint32 i_db= 0, i_api_mgm= 0;
|
||||
for (Uint32 i= 0, n= 0; n < nNodes; i++){
|
||||
Uint32 i_db= 0, i_api_mgm= 0, n;
|
||||
for (i= 0, n= 0; n < nNodes; i++){
|
||||
const Properties * tmp;
|
||||
if(!props->get("Node", i, &tmp)) continue;
|
||||
n++;
|
||||
|
@ -3205,7 +3208,7 @@ addNodeConnections(Vector<ConfigInfo::ConfigRuleSection>§ions,
|
|||
|
||||
Uint32 nodeId1, nodeId2, dummy;
|
||||
|
||||
for (Uint32 i= 0; p_db_nodes.get("", i, &nodeId1); i++){
|
||||
for (i= 0; p_db_nodes.get("", i, &nodeId1); i++){
|
||||
for (Uint32 j= i+1;; j++){
|
||||
if(!p_db_nodes.get("", j, &nodeId2)) break;
|
||||
if(!p_connections2.get("", nodeId1+nodeId2<<16, &dummy)) {
|
||||
|
@ -3222,7 +3225,7 @@ addNodeConnections(Vector<ConfigInfo::ConfigRuleSection>§ions,
|
|||
}
|
||||
}
|
||||
|
||||
for (Uint32 i= 0; p_api_mgm_nodes.get("", i, &nodeId1); i++){
|
||||
for (i= 0; p_api_mgm_nodes.get("", i, &nodeId1); i++){
|
||||
if(!p_connections.get("", nodeId1, &dummy)) {
|
||||
for (Uint32 j= 0;; j++){
|
||||
if(!p_db_nodes.get("", j, &nodeId2)) break;
|
||||
|
@ -3241,3 +3244,5 @@ addNodeConnections(Vector<ConfigInfo::ConfigRuleSection>§ions,
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
template class Vector<ConfigInfo::ConfigRuleSection>;
|
||||
|
|
|
@ -391,6 +391,7 @@ Packer::pack(Uint32 * insertPtr,
|
|||
const SignalHeader * header,
|
||||
const Uint32 * theData,
|
||||
const LinearSectionPtr ptr[3]) const {
|
||||
Uint32 i;
|
||||
|
||||
Uint32 dataLen32 = header->theLength;
|
||||
Uint32 no_segs = header->m_noOfSections;
|
||||
|
@ -400,7 +401,7 @@ Packer::pack(Uint32 * insertPtr,
|
|||
checksumUsed + signalIdUsed + (sizeof(Protocol6)/4);
|
||||
|
||||
|
||||
for(Uint32 i = 0; i<no_segs; i++){
|
||||
for(i = 0; i<no_segs; i++){
|
||||
len32 += ptr[i].sz;
|
||||
}
|
||||
|
||||
|
@ -429,12 +430,12 @@ Packer::pack(Uint32 * insertPtr,
|
|||
memcpy(tmpInserPtr, theData, 4 * dataLen32);
|
||||
|
||||
tmpInserPtr += dataLen32;
|
||||
for(Uint32 i = 0; i<no_segs; i++){
|
||||
for(i = 0; i<no_segs; i++){
|
||||
tmpInserPtr[i] = ptr[i].sz;
|
||||
}
|
||||
|
||||
tmpInserPtr += no_segs;
|
||||
for(Uint32 i = 0; i<no_segs; i++){
|
||||
for(i = 0; i<no_segs; i++){
|
||||
import(tmpInserPtr, ptr[i]);
|
||||
}
|
||||
|
||||
|
@ -450,6 +451,7 @@ Packer::pack(Uint32 * insertPtr,
|
|||
const Uint32 * theData,
|
||||
class SectionSegmentPool & thePool,
|
||||
const SegmentedSectionPtr ptr[3]) const {
|
||||
Uint32 i;
|
||||
|
||||
Uint32 dataLen32 = header->theLength;
|
||||
Uint32 no_segs = header->m_noOfSections;
|
||||
|
@ -458,7 +460,7 @@ Packer::pack(Uint32 * insertPtr,
|
|||
dataLen32 + no_segs +
|
||||
checksumUsed + signalIdUsed + (sizeof(Protocol6)/4);
|
||||
|
||||
for(Uint32 i = 0; i<no_segs; i++){
|
||||
for(i = 0; i<no_segs; i++){
|
||||
len32 += ptr[i].sz;
|
||||
}
|
||||
|
||||
|
@ -487,12 +489,12 @@ Packer::pack(Uint32 * insertPtr,
|
|||
memcpy(tmpInserPtr, theData, 4 * dataLen32);
|
||||
|
||||
tmpInserPtr += dataLen32;
|
||||
for(Uint32 i = 0; i<no_segs; i++){
|
||||
for(i = 0; i<no_segs; i++){
|
||||
tmpInserPtr[i] = ptr[i].sz;
|
||||
}
|
||||
|
||||
tmpInserPtr += no_segs;
|
||||
for(Uint32 i = 0; i<no_segs; i++){
|
||||
for(i = 0; i<no_segs; i++){
|
||||
copy(tmpInserPtr, thePool, ptr[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -834,7 +834,7 @@ TransporterRegistry::performReceive(){
|
|||
static int x = 0;
|
||||
void
|
||||
TransporterRegistry::performSend(){
|
||||
|
||||
int i;
|
||||
sendCounter = 1;
|
||||
|
||||
#ifdef NDB_OSE_TRANSPORTER
|
||||
|
@ -858,7 +858,7 @@ TransporterRegistry::performSend(){
|
|||
FD_ZERO(&writeset);
|
||||
|
||||
// Prepare for sending and receiving
|
||||
for (int i = 0; i < nTCPTransporters; i++) {
|
||||
for (i = 0; i < nTCPTransporters; i++) {
|
||||
TCP_Transporter * t = theTCPTransporters[i];
|
||||
|
||||
// If the transporter is connected
|
||||
|
@ -883,7 +883,7 @@ TransporterRegistry::performSend(){
|
|||
if (tmp == 0) {
|
||||
return;
|
||||
}//if
|
||||
for (int i = 0; i < nTCPTransporters; i++) {
|
||||
for (i = 0; i < nTCPTransporters; i++) {
|
||||
TCP_Transporter *t = theTCPTransporters[i];
|
||||
const NodeId nodeId = t->getRemoteNodeId();
|
||||
const int socket = t->getSocket();
|
||||
|
@ -896,7 +896,7 @@ TransporterRegistry::performSend(){
|
|||
}
|
||||
#endif
|
||||
#ifdef NDB_TCP_TRANSPORTER
|
||||
for (int i = x; i < nTCPTransporters; i++) {
|
||||
for (i = x; i < nTCPTransporters; i++) {
|
||||
TCP_Transporter *t = theTCPTransporters[i];
|
||||
if (t &&
|
||||
(t->hasDataToSend()) &&
|
||||
|
@ -905,7 +905,7 @@ TransporterRegistry::performSend(){
|
|||
t->doSend();
|
||||
}//if
|
||||
}//for
|
||||
for (int i = 0; i < x && i < nTCPTransporters; i++) {
|
||||
for (i = 0; i < x && i < nTCPTransporters; i++) {
|
||||
TCP_Transporter *t = theTCPTransporters[i];
|
||||
if (t &&
|
||||
(t->hasDataToSend()) &&
|
||||
|
@ -921,7 +921,7 @@ TransporterRegistry::performSend(){
|
|||
#ifdef NDB_SCI_TRANSPORTER
|
||||
//scroll through the SCI transporters,
|
||||
// get each transporter, check if connected, send data
|
||||
for (int i=0; i<nSCITransporters; i++) {
|
||||
for (i=0; i<nSCITransporters; i++) {
|
||||
SCI_Transporter *t = theSCITransporters[i];
|
||||
const NodeId nodeId = t->getRemoteNodeId();
|
||||
|
||||
|
|
|
@ -412,3 +412,6 @@ int main()
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
template class Vector<char *>;
|
||||
template class Vector<BaseString>;
|
||||
|
|
|
@ -578,11 +578,11 @@ ConfigValues::getPackedSize() const {
|
|||
|
||||
Uint32
|
||||
ConfigValues::pack(void * _dst, Uint32 _len) const {
|
||||
|
||||
Uint32 i;
|
||||
char * dst = (char*)_dst;
|
||||
memcpy(dst, Magic, sizeof(Magic)); dst += sizeof(Magic);
|
||||
|
||||
for(Uint32 i = 0; i < 2 * m_size; i += 2){
|
||||
for(i = 0; i < 2 * m_size; i += 2){
|
||||
Uint32 key = m_values[i];
|
||||
Uint32 val = m_values[i+1];
|
||||
if(key != CFV_KEY_FREE){
|
||||
|
@ -621,7 +621,7 @@ ConfigValues::pack(void * _dst, Uint32 _len) const {
|
|||
const Uint32 * sum = (Uint32*)_dst;
|
||||
const Uint32 len = ((Uint32*)dst) - sum;
|
||||
Uint32 chk = 0;
|
||||
for(Uint32 i = 0; i<len; i++){
|
||||
for(i = 0; i<len; i++){
|
||||
chk ^= htonl(sum[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -347,3 +347,4 @@ ParserImpl::checkMandatory(Context* ctx, const Properties* props){
|
|||
return true;
|
||||
}
|
||||
|
||||
template class Vector<const ParserRow<ParserImpl::Dummy>*>;
|
||||
|
|
|
@ -169,6 +169,7 @@ put(PropertiesImpl * impl, const char * name, T value, bool replace){
|
|||
return tmp->put(new PropertyImpl(short_name, value));
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Properties::put(const char * name, Uint32 value, bool replace){
|
||||
return ::put(impl, name, value, replace);
|
||||
|
@ -1120,3 +1121,8 @@ bool
|
|||
Properties::getCaseInsensitiveNames() const {
|
||||
return impl->m_insensitive;
|
||||
}
|
||||
|
||||
template bool put(PropertiesImpl *, const char *, Uint32, bool);
|
||||
template bool put(PropertiesImpl *, const char *, Uint64, bool);
|
||||
template bool put(PropertiesImpl *, const char *, const char *, bool);
|
||||
template bool put(PropertiesImpl *, const char *, const Properties*, bool);
|
||||
|
|
|
@ -36,10 +36,11 @@ SocketServer::SocketServer(int maxSessions) :
|
|||
}
|
||||
|
||||
SocketServer::~SocketServer() {
|
||||
for(unsigned i = 0; i<m_sessions.size(); i++){
|
||||
unsigned i;
|
||||
for(i = 0; i<m_sessions.size(); i++){
|
||||
delete m_sessions[i].m_session;
|
||||
}
|
||||
for(unsigned i = 0; i<m_services.size(); i++){
|
||||
for(i = 0; i<m_services.size(); i++){
|
||||
delete m_services[i].m_service;
|
||||
}
|
||||
}
|
||||
|
@ -265,10 +266,11 @@ SocketServer::checkSessions(){
|
|||
|
||||
void
|
||||
SocketServer::stopSessions(bool wait){
|
||||
for(int i = m_sessions.size() - 1; i>=0; i--)
|
||||
int i;
|
||||
for(i = m_sessions.size() - 1; i>=0; i--)
|
||||
m_sessions[i].m_session->m_stop = true;
|
||||
|
||||
for(int i = m_services.size() - 1; i>=0; i--)
|
||||
for(i = m_services.size() - 1; i>=0; i--)
|
||||
m_services[i].m_service->stopSessions();
|
||||
|
||||
if(wait){
|
||||
|
|
|
@ -3332,7 +3332,8 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
|
|||
req->transId1 = 0;
|
||||
req->transId2 = (BACKUP << 20) + (getOwnNodeId() << 8);
|
||||
|
||||
for(unsigned int i = 0; i<parallelism; i++) {
|
||||
Uint32 i;
|
||||
for(i = 0; i<parallelism; i++) {
|
||||
jam();
|
||||
req->clientOpPtr[i] = filePtr.i;
|
||||
}//for
|
||||
|
@ -3350,7 +3351,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
|
|||
signal->theData[7] = 0;
|
||||
|
||||
Uint32 dataPos = 8;
|
||||
for(Uint32 i = 0; i<table.noOfAttributes; i++) {
|
||||
for(i = 0; i<table.noOfAttributes; i++) {
|
||||
jam();
|
||||
AttributePtr attr;
|
||||
table.attributes.getPtr(attr, i);
|
||||
|
|
|
@ -34,6 +34,7 @@ Uint64 Twiddle64(Uint64 in); // Byte shift 64-bit data
|
|||
|
||||
bool
|
||||
BackupFile::Twiddle(const AttributeDesc* attr_desc, AttributeData* attr_data, Uint32 arraySize){
|
||||
Uint32 i;
|
||||
|
||||
if(m_hostByteOrder)
|
||||
return true;
|
||||
|
@ -47,17 +48,17 @@ BackupFile::Twiddle(const AttributeDesc* attr_desc, AttributeData* attr_data, Ui
|
|||
|
||||
return true;
|
||||
case 16:
|
||||
for(unsigned i = 0; i<arraySize; i++){
|
||||
for(i = 0; i<arraySize; i++){
|
||||
attr_data->u_int16_value[i] = Twiddle16(attr_data->u_int16_value[i]);
|
||||
}
|
||||
return true;
|
||||
case 32:
|
||||
for(unsigned i = 0; i<arraySize; i++){
|
||||
for(i = 0; i<arraySize; i++){
|
||||
attr_data->u_int32_value[i] = Twiddle32(attr_data->u_int32_value[i]);
|
||||
}
|
||||
return true;
|
||||
case 64:
|
||||
for(unsigned i = 0; i<arraySize; i++){
|
||||
for(i = 0; i<arraySize; i++){
|
||||
attr_data->u_int64_value[i] = Twiddle64(attr_data->u_int64_value[i]);
|
||||
}
|
||||
return true;
|
||||
|
@ -333,8 +334,8 @@ RestoreDataIterator::getNextTuple(int & res)
|
|||
|
||||
Uint32 *buf_ptr = (Uint32*)_buf_ptr, *ptr = buf_ptr;
|
||||
ptr += m_currentTable->m_nullBitmaskSize;
|
||||
|
||||
for(Uint32 i= 0; i < m_currentTable->m_fixedKeys.size(); i++){
|
||||
Uint32 i;
|
||||
for(i= 0; i < m_currentTable->m_fixedKeys.size(); i++){
|
||||
assert(ptr < buf_ptr + dataLength);
|
||||
|
||||
const Uint32 attrId = m_currentTable->m_fixedKeys[i]->attrId;
|
||||
|
@ -355,7 +356,7 @@ RestoreDataIterator::getNextTuple(int & res)
|
|||
ptr += sz;
|
||||
}
|
||||
|
||||
for(Uint32 i = 0; i < m_currentTable->m_fixedAttribs.size(); i++){
|
||||
for(i = 0; i < m_currentTable->m_fixedAttribs.size(); i++){
|
||||
assert(ptr < buf_ptr + dataLength);
|
||||
|
||||
const Uint32 attrId = m_currentTable->m_fixedAttribs[i]->attrId;
|
||||
|
@ -377,7 +378,7 @@ RestoreDataIterator::getNextTuple(int & res)
|
|||
ptr += sz;
|
||||
}
|
||||
|
||||
for(Uint32 i = 0; i < m_currentTable->m_variableAttribs.size(); i++){
|
||||
for(i = 0; i < m_currentTable->m_variableAttribs.size(); i++){
|
||||
const Uint32 attrId = m_currentTable->m_variableAttribs[i]->attrId;
|
||||
|
||||
AttributeData * attr_data = m_tuple.getData(attrId);
|
||||
|
|
|
@ -301,9 +301,10 @@ public:
|
|||
}
|
||||
~LogEntry()
|
||||
{
|
||||
for(Uint32 i= 0; i< m_values.size(); i++)
|
||||
Uint32 i;
|
||||
for(i= 0; i< m_values.size(); i++)
|
||||
delete m_values[i];
|
||||
for(Uint32 i= 0; i< m_values_e.size(); i++)
|
||||
for(i= 0; i< m_values_e.size(); i++)
|
||||
delete m_values_e[i];
|
||||
}
|
||||
Uint32 size() const { return m_values.size(); }
|
||||
|
|
|
@ -250,8 +250,8 @@ main(int argc, const char** argv)
|
|||
return -1;
|
||||
}
|
||||
|
||||
|
||||
for(Uint32 i= 0; i < g_consumers.size(); i++)
|
||||
Uint32 i;
|
||||
for(i= 0; i < g_consumers.size(); i++)
|
||||
{
|
||||
if (!g_consumers[i]->init())
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ main(int argc, const char** argv)
|
|||
|
||||
}
|
||||
|
||||
for(Uint32 i = 0; i<metaData.getNoOfTables(); i++)
|
||||
for(i = 0; i<metaData.getNoOfTables(); i++)
|
||||
{
|
||||
if (checkSysTable(metaData[i]->getTableName()))
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ main(int argc, const char** argv)
|
|||
return -1;
|
||||
}
|
||||
logIter.validateFooter(); //not implemented
|
||||
for (Uint32 i= 0; i < g_consumers.size(); i++)
|
||||
for (i= 0; i < g_consumers.size(); i++)
|
||||
g_consumers[i]->endOfLogEntrys();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1100,14 +1100,15 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
|
|||
}
|
||||
|
||||
if (dumpState->args[0] == DumpStateOrd::CmvmiTestLongSigWithDelay) {
|
||||
unsigned i;
|
||||
Uint32 loopCount = dumpState->args[1];
|
||||
const unsigned len0 = 11;
|
||||
const unsigned len1 = 123;
|
||||
Uint32 sec0[len0];
|
||||
Uint32 sec1[len1];
|
||||
for (unsigned i = 0; i < len0; i++)
|
||||
for (i = 0; i < len0; i++)
|
||||
sec0[i] = i;
|
||||
for (unsigned i = 0; i < len1; i++)
|
||||
for (i = 0; i < len1; i++)
|
||||
sec1[i] = 16 * i;
|
||||
Uint32* sig = signal->getDataPtrSend();
|
||||
sig[0] = reference();
|
||||
|
@ -1160,6 +1161,7 @@ static LinearSectionPtr g_test[3];
|
|||
|
||||
void
|
||||
Cmvmi::execTESTSIG(Signal* signal){
|
||||
Uint32 i;
|
||||
/**
|
||||
* Test of SafeCounter
|
||||
*/
|
||||
|
@ -1184,14 +1186,14 @@ Cmvmi::execTESTSIG(Signal* signal){
|
|||
getOwnNodeId(),
|
||||
true);
|
||||
ndbout_c("-- Fixed section --");
|
||||
for(Uint32 i = 0; i<signal->length(); i++){
|
||||
for(i = 0; i<signal->length(); i++){
|
||||
fprintf(stdout, "H'0x%.8x ", signal->theData[i]);
|
||||
if(((i + 1) % 6) == 0)
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
fprintf(stdout, "\n");
|
||||
|
||||
for(Uint32 i = 0; i<signal->header.m_noOfSections; i++){
|
||||
for(i = 0; i<signal->header.m_noOfSections; i++){
|
||||
SegmentedSectionPtr ptr;
|
||||
ndbout_c("-- Section %d --", i);
|
||||
signal->getSection(ptr, i);
|
||||
|
@ -1204,7 +1206,7 @@ Cmvmi::execTESTSIG(Signal* signal){
|
|||
/**
|
||||
* Validate length:s
|
||||
*/
|
||||
for(Uint32 i = 0; i<signal->header.m_noOfSections; i++){
|
||||
for(i = 0; i<signal->header.m_noOfSections; i++){
|
||||
SegmentedSectionPtr ptr;
|
||||
signal->getSection(ptr, i);
|
||||
ndbrequire(ptr.p != 0);
|
||||
|
@ -1249,7 +1251,7 @@ Cmvmi::execTESTSIG(Signal* signal){
|
|||
case 4:{
|
||||
LinearSectionPtr ptr[3];
|
||||
const Uint32 secs = signal->getNoOfSections();
|
||||
for(Uint32 i = 0; i<secs; i++){
|
||||
for(i = 0; i<secs; i++){
|
||||
SegmentedSectionPtr sptr;
|
||||
signal->getSection(sptr, i);
|
||||
ptr[i].sz = sptr.sz;
|
||||
|
@ -1298,7 +1300,7 @@ Cmvmi::execTESTSIG(Signal* signal){
|
|||
case 8:{
|
||||
LinearSectionPtr ptr[3];
|
||||
const Uint32 secs = signal->getNoOfSections();
|
||||
for(Uint32 i = 0; i<secs; i++){
|
||||
for(i = 0; i<secs; i++){
|
||||
SegmentedSectionPtr sptr;
|
||||
signal->getSection(sptr, i);
|
||||
ptr[i].sz = sptr.sz;
|
||||
|
@ -1332,7 +1334,7 @@ Cmvmi::execTESTSIG(Signal* signal){
|
|||
sendNextLinearFragment(signal, fragSend);
|
||||
}
|
||||
|
||||
for(Uint32 i = 0; i<secs; i++){
|
||||
for(i = 0; i<secs; i++){
|
||||
delete[] ptr[i].p;
|
||||
}
|
||||
break;
|
||||
|
@ -1364,7 +1366,7 @@ Cmvmi::execTESTSIG(Signal* signal){
|
|||
|
||||
const Uint32 secs = signal->getNoOfSections();
|
||||
memset(g_test, 0, sizeof(g_test));
|
||||
for(Uint32 i = 0; i<secs; i++){
|
||||
for(i = 0; i<secs; i++){
|
||||
SegmentedSectionPtr sptr;
|
||||
signal->getSection(sptr, i);
|
||||
g_test[i].sz = sptr.sz;
|
||||
|
@ -1408,7 +1410,7 @@ Cmvmi::execTESTSIG(Signal* signal){
|
|||
case 14:{
|
||||
Uint32 count = signal->theData[8];
|
||||
signal->theData[10] = count * rg.m_nodes.count();
|
||||
for(Uint32 i = 0; i<count; i++){
|
||||
for(i = 0; i<count; i++){
|
||||
sendSignal(rg, GSN_TESTSIG, signal, signal->length(), JBB);
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -9199,8 +9199,8 @@ void Dbacc::initFragGeneral(FragmentrecPtr regFragPtr)
|
|||
for (Uint32 i = 0; i < ZWRITEPAGESIZE; i++) {
|
||||
regFragPtr.p->datapages[i] = RNIL;
|
||||
}//for
|
||||
for (Uint32 i = 0; i < 4; i++) {
|
||||
regFragPtr.p->longKeyPageArray[i] = RNIL;
|
||||
for (Uint32 j = 0; j < 4; j++) {
|
||||
regFragPtr.p->longKeyPageArray[j] = RNIL;
|
||||
}//for
|
||||
}//Dbacc::initFragGeneral()
|
||||
|
||||
|
|
|
@ -5734,6 +5734,7 @@ void
|
|||
Dbdict::execLIST_TABLES_REQ(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
Uint32 i;
|
||||
ListTablesReq * req = (ListTablesReq*)signal->getDataPtr();
|
||||
Uint32 senderRef = req->senderRef;
|
||||
Uint32 senderData = req->senderData;
|
||||
|
@ -5747,7 +5748,7 @@ Dbdict::execLIST_TABLES_REQ(Signal* signal)
|
|||
conf->senderData = senderData;
|
||||
conf->counter = 0;
|
||||
Uint32 pos = 0;
|
||||
for (Uint32 i = 0; i < c_tableRecordPool.getSize(); i++) {
|
||||
for (i = 0; i < c_tableRecordPool.getSize(); i++) {
|
||||
TableRecordPtr tablePtr;
|
||||
c_tableRecordPool.getPtr(tablePtr, i);
|
||||
// filter
|
||||
|
@ -5827,12 +5828,12 @@ Dbdict::execLIST_TABLES_REQ(Signal* signal)
|
|||
conf->counter++;
|
||||
pos = 0;
|
||||
}
|
||||
Uint32 i = 0;
|
||||
while (i < size) {
|
||||
Uint32 k = 0;
|
||||
while (k < size) {
|
||||
char* p = (char*)&conf->tableData[pos];
|
||||
for (Uint32 j = 0; j < 4; j++) {
|
||||
if (i < size)
|
||||
*p++ = tablePtr.p->tableName[i++];
|
||||
if (k < size)
|
||||
*p++ = tablePtr.p->tableName[k++];
|
||||
else
|
||||
*p++ = 0;
|
||||
}
|
||||
|
@ -5846,7 +5847,7 @@ Dbdict::execLIST_TABLES_REQ(Signal* signal)
|
|||
}
|
||||
}
|
||||
// XXX merge with above somehow
|
||||
for (Uint32 i = 0; i < c_triggerRecordPool.getSize(); i++) {
|
||||
for (i = 0; i < c_triggerRecordPool.getSize(); i++) {
|
||||
if (reqListIndexes)
|
||||
break;
|
||||
TriggerRecordPtr triggerPtr;
|
||||
|
@ -5890,12 +5891,12 @@ Dbdict::execLIST_TABLES_REQ(Signal* signal)
|
|||
conf->counter++;
|
||||
pos = 0;
|
||||
}
|
||||
Uint32 i = 0;
|
||||
while (i < size) {
|
||||
Uint32 k = 0;
|
||||
while (k < size) {
|
||||
char* p = (char*)&conf->tableData[pos];
|
||||
for (Uint32 j = 0; j < 4; j++) {
|
||||
if (i < size)
|
||||
*p++ = triggerPtr.p->triggerName[i++];
|
||||
if (k < size)
|
||||
*p++ = triggerPtr.p->triggerName[k++];
|
||||
else
|
||||
*p++ = 0;
|
||||
}
|
||||
|
@ -6132,6 +6133,7 @@ Dbdict::createIndex_slavePrepare(Signal* signal, OpCreateIndexPtr opPtr)
|
|||
void
|
||||
Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
|
||||
{
|
||||
Uint32 k;
|
||||
jam();
|
||||
const CreateIndxReq* const req = &opPtr.p->m_request;
|
||||
// signal data writer
|
||||
|
@ -6201,7 +6203,7 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
|
|||
}
|
||||
// hash index attributes must currently be in table order
|
||||
Uint32 prevAttrId = RNIL;
|
||||
for (Uint32 k = 0; k < opPtr.p->m_attrList.sz; k++) {
|
||||
for (k = 0; k < opPtr.p->m_attrList.sz; k++) {
|
||||
jam();
|
||||
bool found = false;
|
||||
for (Uint32 tAttr = tablePtr.p->firstAttribute; tAttr != RNIL; ) {
|
||||
|
@ -6261,7 +6263,7 @@ Dbdict::createIndex_toCreateTable(Signal* signal, OpCreateIndexPtr opPtr)
|
|||
// write index key attributes
|
||||
AttributeRecordPtr aRecPtr;
|
||||
c_attributeRecordPool.getPtr(aRecPtr, tablePtr.p->firstAttribute);
|
||||
for (Uint32 k = 0; k < opPtr.p->m_attrList.sz; k++) {
|
||||
for (k = 0; k < opPtr.p->m_attrList.sz; k++) {
|
||||
jam();
|
||||
for (Uint32 tAttr = tablePtr.p->firstAttribute; tAttr != RNIL; ) {
|
||||
AttributeRecord* aRec = c_attributeRecordPool.getPtr(tAttr);
|
||||
|
|
|
@ -50,17 +50,18 @@ void Dbdih::initData()
|
|||
nodeRecord = (NodeRecord*)
|
||||
allocRecord("NodeRecord", sizeof(NodeRecord), MAX_NDB_NODES);
|
||||
|
||||
for(Uint32 i = 0; i<MAX_NDB_NODES; i++){
|
||||
Uint32 i;
|
||||
for(i = 0; i<MAX_NDB_NODES; i++){
|
||||
new (&nodeRecord[i]) NodeRecord();
|
||||
}
|
||||
|
||||
takeOverRecord = (TakeOverRecord*)allocRecord("TakeOverRecord",
|
||||
sizeof(TakeOverRecord),
|
||||
MAX_NDB_NODES);
|
||||
for(Uint32 i = 0; i<MAX_NDB_NODES; i++)
|
||||
for(i = 0; i<MAX_NDB_NODES; i++)
|
||||
new (&takeOverRecord[i]) TakeOverRecord();
|
||||
|
||||
for(Uint32 i = 0; i<MAX_NDB_NODES; i++)
|
||||
for(i = 0; i<MAX_NDB_NODES; i++)
|
||||
new (&takeOverRecord[i]) TakeOverRecord();
|
||||
|
||||
waitGCPProxyPool.setSize(ZPROXY_FILE_SIZE);
|
||||
|
|
|
@ -1534,11 +1534,12 @@ void Dbdih::execSTART_MECONF(Signal* signal)
|
|||
StartMeConf * const startMe = (StartMeConf *)&signal->theData[0];
|
||||
Uint32 nodeId = startMe->startingNodeId;
|
||||
const Uint32 startWord = startMe->startWord;
|
||||
Uint32 i;
|
||||
|
||||
CRASH_INSERTION(7130);
|
||||
ndbrequire(nodeId == cownNodeId);
|
||||
arrGuard(startWord + StartMeConf::DATA_SIZE, sizeof(cdata)/4);
|
||||
for(Uint32 i = 0; i < StartMeConf::DATA_SIZE; i++)
|
||||
for(i = 0; i < StartMeConf::DATA_SIZE; i++)
|
||||
cdata[startWord+i] = startMe->data[i];
|
||||
|
||||
if(startWord + StartMeConf::DATA_SIZE < Sysfile::SYSFILE_SIZE32){
|
||||
|
@ -1556,12 +1557,12 @@ void Dbdih::execSTART_MECONF(Signal* signal)
|
|||
* But dont copy lastCompletedGCI:s
|
||||
*/
|
||||
Uint32 tempGCP[MAX_NDB_NODES];
|
||||
for(Uint32 i = 0; i < MAX_NDB_NODES; i++)
|
||||
for(i = 0; i < MAX_NDB_NODES; i++)
|
||||
tempGCP[i] = SYSFILE->lastCompletedGCI[i];
|
||||
|
||||
for(Uint32 i = 0; i < Sysfile::SYSFILE_SIZE32; i++)
|
||||
for(i = 0; i < Sysfile::SYSFILE_SIZE32; i++)
|
||||
sysfileData[i] = cdata[i];
|
||||
for(Uint32 i = 0; i < MAX_NDB_NODES; i++)
|
||||
for(i = 0; i < MAX_NDB_NODES; i++)
|
||||
SYSFILE->lastCompletedGCI[i] = tempGCP[i];
|
||||
|
||||
setNodeActiveStatus();
|
||||
|
@ -3599,6 +3600,7 @@ void Dbdih::writeInitGcpLab(Signal* signal, FileRecordPtr filePtr)
|
|||
/*---------------------------------------------------------------------------*/
|
||||
void Dbdih::execNODE_FAILREP(Signal* signal)
|
||||
{
|
||||
Uint32 i;
|
||||
Uint32 failedNodes[MAX_NDB_NODES];
|
||||
jamEntry();
|
||||
NodeFailRep * const nodeFail = (NodeFailRep *)&signal->theData[0];
|
||||
|
@ -3611,7 +3613,7 @@ void Dbdih::execNODE_FAILREP(Signal* signal)
|
|||
// The first step is to convert from a bit mask to an array of failed nodes.
|
||||
/*-------------------------------------------------------------------------*/
|
||||
Uint32 index = 0;
|
||||
for (Uint32 i = 1; i < MAX_NDB_NODES; i++) {
|
||||
for (i = 1; i < MAX_NDB_NODES; i++) {
|
||||
jam();
|
||||
if(NodeBitmask::get(nodeFail->theNodes, i)){
|
||||
jam();
|
||||
|
@ -3629,7 +3631,7 @@ void Dbdih::execNODE_FAILREP(Signal* signal)
|
|||
// We also set certain state variables ensuring that the node no longer is
|
||||
// used in transactions and also mark that we received this signal.
|
||||
/*-------------------------------------------------------------------------*/
|
||||
for (Uint32 i = 0; i < noOfFailedNodes; i++) {
|
||||
for (i = 0; i < noOfFailedNodes; i++) {
|
||||
jam();
|
||||
NodeRecordPtr TNodePtr;
|
||||
TNodePtr.i = failedNodes[i];
|
||||
|
@ -3671,7 +3673,7 @@ void Dbdih::execNODE_FAILREP(Signal* signal)
|
|||
|
||||
const bool masterTakeOver = (oldMasterId != newMasterId);
|
||||
|
||||
for(Uint32 i = 0; i < noOfFailedNodes; i++) {
|
||||
for(i = 0; i < noOfFailedNodes; i++) {
|
||||
NodeRecordPtr failedNodePtr;
|
||||
failedNodePtr.i = failedNodes[i];
|
||||
ptrCheckGuard(failedNodePtr, MAX_NDB_NODES, nodeRecord);
|
||||
|
@ -6882,8 +6884,9 @@ void Dbdih::releaseFragments(TabRecordPtr tabPtr)
|
|||
|
||||
void Dbdih::initialiseFragstore()
|
||||
{
|
||||
Uint32 i;
|
||||
FragmentstorePtr fragPtr;
|
||||
for (Uint32 i = 0; i < cfragstoreFileSize; i++) {
|
||||
for (i = 0; i < cfragstoreFileSize; i++) {
|
||||
fragPtr.i = i;
|
||||
ptrCheckGuard(fragPtr, cfragstoreFileSize, fragmentstore);
|
||||
initFragstore(fragPtr);
|
||||
|
@ -6892,7 +6895,7 @@ void Dbdih::initialiseFragstore()
|
|||
fragPtr.i = 0;
|
||||
cfirstfragstore = RNIL;
|
||||
cremainingfrags = 0;
|
||||
for (Uint32 i = 0; i < noOfChunks; i++) {
|
||||
for (i = 0; i < noOfChunks; i++) {
|
||||
ptrCheckGuard(fragPtr, cfragstoreFileSize, fragmentstore);
|
||||
fragPtr.p->nextFragmentChunk = cfirstfragstore;
|
||||
cfirstfragstore = fragPtr.i;
|
||||
|
@ -10231,11 +10234,12 @@ void Dbdih::allocStoredReplica(FragmentstorePtr fragPtr,
|
|||
ReplicaRecordPtr& newReplicaPtr,
|
||||
Uint32 nodeId)
|
||||
{
|
||||
Uint32 i;
|
||||
ReplicaRecordPtr arrReplicaPtr;
|
||||
ReplicaRecordPtr arrPrevReplicaPtr;
|
||||
|
||||
seizeReplicaRec(newReplicaPtr);
|
||||
for (Uint32 i = 0; i < MAX_LCP_STORED; i++) {
|
||||
for (i = 0; i < MAX_LCP_STORED; i++) {
|
||||
newReplicaPtr.p->maxGciCompleted[i] = 0;
|
||||
newReplicaPtr.p->maxGciStarted[i] = 0;
|
||||
newReplicaPtr.p->lcpId[i] = 0;
|
||||
|
@ -10243,7 +10247,7 @@ void Dbdih::allocStoredReplica(FragmentstorePtr fragPtr,
|
|||
}//for
|
||||
newReplicaPtr.p->noCrashedReplicas = 0;
|
||||
newReplicaPtr.p->initialGci = currentgcp;
|
||||
for (Uint32 i = 0; i < 8; i++) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
newReplicaPtr.p->replicaLastGci[i] = (Uint32)-1;
|
||||
newReplicaPtr.p->createGci[i] = 0;
|
||||
}//for
|
||||
|
@ -10354,7 +10358,8 @@ void Dbdih::checkEscalation()
|
|||
{
|
||||
Uint32 TnodeGroup[MAX_NDB_NODES];
|
||||
NodeRecordPtr nodePtr;
|
||||
for (Uint32 i = 0; i < MAX_NDB_NODES; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < MAX_NDB_NODES; i++) {
|
||||
TnodeGroup[i] = ZFALSE;
|
||||
}//for
|
||||
for (nodePtr.i = 1; nodePtr.i < MAX_NDB_NODES; nodePtr.i++) {
|
||||
|
@ -10366,7 +10371,7 @@ void Dbdih::checkEscalation()
|
|||
TnodeGroup[nodePtr.p->nodeGroup] = ZTRUE;
|
||||
}
|
||||
}
|
||||
for (Uint32 i = 0; i < cnoOfNodeGroups; i++) {
|
||||
for (i = 0; i < cnoOfNodeGroups; i++) {
|
||||
jam();
|
||||
if (TnodeGroup[i] == ZFALSE) {
|
||||
jam();
|
||||
|
@ -10929,7 +10934,8 @@ void Dbdih::initNodeState(NodeRecordPtr nodePtr)
|
|||
/*************************************************************************/
|
||||
void Dbdih::initRestartInfo()
|
||||
{
|
||||
for (int i = 0; i < MAX_NDB_NODES; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < MAX_NDB_NODES; i++) {
|
||||
SYSFILE->lastCompletedGCI[i] = 0;
|
||||
}//for
|
||||
NodeRecordPtr nodePtr;
|
||||
|
@ -10950,10 +10956,10 @@ void Dbdih::initRestartInfo()
|
|||
SYSFILE->oldestRestorableGCI = 1;
|
||||
SYSFILE->newestRestorableGCI = 1;
|
||||
SYSFILE->systemRestartBits = 0;
|
||||
for (Uint32 i = 0; i < NodeBitmask::Size; i++) {
|
||||
for (i = 0; i < NodeBitmask::Size; i++) {
|
||||
SYSFILE->lcpActive[0] = 0;
|
||||
}//for
|
||||
for (Uint32 i = 0; i < Sysfile::TAKE_OVER_SIZE; i++) {
|
||||
for (i = 0; i < Sysfile::TAKE_OVER_SIZE; i++) {
|
||||
SYSFILE->takeOver[i] = 0;
|
||||
}//for
|
||||
Sysfile::setInitialStartOngoing(SYSFILE->systemRestartBits);
|
||||
|
@ -11032,10 +11038,11 @@ void Dbdih::initTable(TabRecordPtr tabPtr)
|
|||
tabPtr.p->tabFile[1] = RNIL;
|
||||
tabPtr.p->m_dropTab.tabUserRef = 0;
|
||||
tabPtr.p->m_dropTab.tabUserPtr = RNIL;
|
||||
for (Uint32 i = 0; i < MAX_NDB_NODES; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < MAX_NDB_NODES; i++) {
|
||||
tabPtr.p->startFid[i] = RNIL;
|
||||
}//for
|
||||
for (Uint32 i = 0; i < 8; i++) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
tabPtr.p->pageRef[i] = RNIL;
|
||||
}//for
|
||||
tabPtr.p->tableType = DictTabInfo::UndefTableType;
|
||||
|
@ -11367,6 +11374,7 @@ void Dbdih::makeNodeGroups(Uint32 nodeArray[])
|
|||
Uint32 tmngNodeGroup;
|
||||
Uint32 tmngReplica;
|
||||
Uint32 tmngLimit;
|
||||
Uint32 i;
|
||||
|
||||
/**-----------------------------------------------------------------------
|
||||
* ASSIGN ALL ACTIVE NODES INTO NODE GROUPS. HOT SPARE NODES ARE ASSIGNED
|
||||
|
@ -11376,7 +11384,7 @@ void Dbdih::makeNodeGroups(Uint32 nodeArray[])
|
|||
tmngReplica = 0;
|
||||
tmngLimit = csystemnodes - cnoHotSpare;
|
||||
ndbrequire(tmngLimit < MAX_NDB_NODES);
|
||||
for (Uint32 i = 0; i < tmngLimit; i++) {
|
||||
for (i = 0; i < tmngLimit; i++) {
|
||||
NodeGroupRecordPtr NGPtr;
|
||||
jam();
|
||||
tmngNode = nodeArray[i];
|
||||
|
@ -11396,14 +11404,14 @@ void Dbdih::makeNodeGroups(Uint32 nodeArray[])
|
|||
}//for
|
||||
cnoOfNodeGroups = tmngNodeGroup;
|
||||
ndbrequire(csystemnodes < MAX_NDB_NODES);
|
||||
for (Uint32 i = tmngLimit + 1; i < csystemnodes; i++) {
|
||||
for (i = tmngLimit + 1; i < csystemnodes; i++) {
|
||||
jam();
|
||||
tmngNode = nodeArray[i];
|
||||
mngNodeptr.i = tmngNode;
|
||||
ptrCheckGuard(mngNodeptr, MAX_NDB_NODES, nodeRecord);
|
||||
mngNodeptr.p->nodeGroup = ZNIL;
|
||||
}//for
|
||||
for(int i = 0; i < MAX_NDB_NODES; i++){
|
||||
for(i = 0; i < MAX_NDB_NODES; i++){
|
||||
jam();
|
||||
Sysfile::setNodeGroup(i, SYSFILE->nodeGroups, NO_NODE_GROUP_ID);
|
||||
}//for
|
||||
|
@ -11690,12 +11698,13 @@ Uint32 Dbdih::readPageWord(RWFragment* rf)
|
|||
|
||||
void Dbdih::readReplica(RWFragment* rf, ReplicaRecordPtr readReplicaPtr)
|
||||
{
|
||||
Uint32 i;
|
||||
readReplicaPtr.p->procNode = readPageWord(rf);
|
||||
readReplicaPtr.p->initialGci = readPageWord(rf);
|
||||
readReplicaPtr.p->noCrashedReplicas = readPageWord(rf);
|
||||
readReplicaPtr.p->nextLcp = readPageWord(rf);
|
||||
|
||||
for (Uint32 i = 0; i < MAX_LCP_STORED; i++) {
|
||||
for (i = 0; i < MAX_LCP_STORED; i++) {
|
||||
readReplicaPtr.p->maxGciCompleted[i] = readPageWord(rf);
|
||||
readReplicaPtr.p->maxGciStarted[i] = readPageWord(rf);
|
||||
readReplicaPtr.p->lcpId[i] = readPageWord(rf);
|
||||
|
@ -11703,13 +11712,13 @@ void Dbdih::readReplica(RWFragment* rf, ReplicaRecordPtr readReplicaPtr)
|
|||
}//for
|
||||
const Uint32 noCrashedReplicas = readReplicaPtr.p->noCrashedReplicas;
|
||||
ndbrequire(noCrashedReplicas < 8);
|
||||
for (Uint32 i = 0; i < noCrashedReplicas; i++) {
|
||||
for (i = 0; i < noCrashedReplicas; i++) {
|
||||
readReplicaPtr.p->createGci[i] = readPageWord(rf);
|
||||
readReplicaPtr.p->replicaLastGci[i] = readPageWord(rf);
|
||||
ndbrequire(readReplicaPtr.p->createGci[i] != 0xF1F1F1F1);
|
||||
ndbrequire(readReplicaPtr.p->replicaLastGci[i] != 0xF1F1F1F1);
|
||||
}//for
|
||||
for(Uint32 i = noCrashedReplicas; i<8; i++){
|
||||
for(i = noCrashedReplicas; i<8; i++){
|
||||
readReplicaPtr.p->createGci[i] = readPageWord(rf);
|
||||
readReplicaPtr.p->replicaLastGci[i] = readPageWord(rf);
|
||||
// They are not initialized...
|
||||
|
@ -11732,7 +11741,7 @@ void Dbdih::readReplica(RWFragment* rf, ReplicaRecordPtr readReplicaPtr)
|
|||
/* WE ALSO HAVE TO INVALIDATE ANY LOCAL CHECKPOINTS THAT HAVE BEEN */
|
||||
/* INVALIDATED BY MOVING BACK THE RESTART GCI. */
|
||||
/* ---------------------------------------------------------------------- */
|
||||
for (Uint32 i = 0; i < MAX_LCP_STORED; i++) {
|
||||
for (i = 0; i < MAX_LCP_STORED; i++) {
|
||||
jam();
|
||||
if ((readReplicaPtr.p->lcpStatus[i] == ZVALID) &&
|
||||
(readReplicaPtr.p->maxGciStarted[i] > SYSFILE->newestRestorableGCI)) {
|
||||
|
@ -11764,6 +11773,7 @@ void Dbdih::readReplica(RWFragment* rf, ReplicaRecordPtr readReplicaPtr)
|
|||
|
||||
void Dbdih::readReplicas(RWFragment* rf, FragmentstorePtr fragPtr)
|
||||
{
|
||||
Uint32 i;
|
||||
ReplicaRecordPtr newReplicaPtr;
|
||||
Uint32 noStoredReplicas = fragPtr.p->noStoredReplicas;
|
||||
Uint32 noOldStoredReplicas = fragPtr.p->noOldStoredReplicas;
|
||||
|
@ -11775,7 +11785,7 @@ void Dbdih::readReplicas(RWFragment* rf, FragmentstorePtr fragPtr)
|
|||
fragPtr.p->noOldStoredReplicas = 0;
|
||||
Uint32 replicaIndex = 0;
|
||||
ndbrequire(noStoredReplicas + noOldStoredReplicas <= MAX_REPLICAS);
|
||||
for (Uint32 i = 0; i < noStoredReplicas; i++) {
|
||||
for (i = 0; i < noStoredReplicas; i++) {
|
||||
seizeReplicaRec(newReplicaPtr);
|
||||
readReplica(rf, newReplicaPtr);
|
||||
if (checkNodeAlive(newReplicaPtr.p->procNode)) {
|
||||
|
@ -11790,7 +11800,7 @@ void Dbdih::readReplicas(RWFragment* rf, FragmentstorePtr fragPtr)
|
|||
}//if
|
||||
}//for
|
||||
fragPtr.p->fragReplicas = noStoredReplicas;
|
||||
for (Uint32 i = 0; i < noOldStoredReplicas; i++) {
|
||||
for (i = 0; i < noOldStoredReplicas; i++) {
|
||||
jam();
|
||||
seizeReplicaRec(newReplicaPtr);
|
||||
readReplica(rf, newReplicaPtr);
|
||||
|
@ -12640,11 +12650,11 @@ void Dbdih::setNodeRestartInfoBits()
|
|||
NodeRecordPtr nodePtr;
|
||||
Uint32 tsnrNodeGroup;
|
||||
Uint32 tsnrNodeActiveStatus;
|
||||
|
||||
for(int i = 1; i < MAX_NDB_NODES; i++){
|
||||
Uint32 i;
|
||||
for(i = 1; i < MAX_NDB_NODES; i++){
|
||||
Sysfile::setNodeStatus(i, SYSFILE->nodeStatus, Sysfile::NS_Active);
|
||||
}//for
|
||||
for(Uint32 i = 1; i < Sysfile::NODE_GROUPS_SIZE; i++){
|
||||
for(i = 1; i < Sysfile::NODE_GROUPS_SIZE; i++){
|
||||
SYSFILE->nodeGroups[i] = 0;
|
||||
}//for
|
||||
NdbNodeBitmask::clear(SYSFILE->lcpActive);
|
||||
|
@ -12786,13 +12796,14 @@ void Dbdih::writeReplicas(RWFragment* wf, Uint32 replicaStartIndex)
|
|||
writePageWord(wf, wfReplicaPtr.p->initialGci);
|
||||
writePageWord(wf, wfReplicaPtr.p->noCrashedReplicas);
|
||||
writePageWord(wf, wfReplicaPtr.p->nextLcp);
|
||||
for (Uint32 i = 0; i < MAX_LCP_STORED; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < MAX_LCP_STORED; i++) {
|
||||
writePageWord(wf, wfReplicaPtr.p->maxGciCompleted[i]);
|
||||
writePageWord(wf, wfReplicaPtr.p->maxGciStarted[i]);
|
||||
writePageWord(wf, wfReplicaPtr.p->lcpId[i]);
|
||||
writePageWord(wf, wfReplicaPtr.p->lcpStatus[i]);
|
||||
}//if
|
||||
for (Uint32 i = 0; i < 8; i++) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
writePageWord(wf, wfReplicaPtr.p->createGci[i]);
|
||||
writePageWord(wf, wfReplicaPtr.p->replicaLastGci[i]);
|
||||
}//if
|
||||
|
@ -13003,7 +13014,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
|
|||
}
|
||||
|
||||
if(signal->theData[0] == 7012){
|
||||
char buf[c_lcpState.m_participatingDIH.TextLength+1];
|
||||
char buf[8*_NDB_NODE_BITMASK_SIZE+1];
|
||||
infoEvent("ParticipatingDIH = %s", c_lcpState.m_participatingDIH.getText(buf));
|
||||
infoEvent("ParticipatingLQH = %s", c_lcpState.m_participatingLQH.getText(buf));
|
||||
infoEvent("m_LCP_COMPLETE_REP_Counter_DIH = %s",
|
||||
|
@ -13020,8 +13031,8 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
|
|||
jam();
|
||||
ptrAss(nodePtr, nodeRecord);
|
||||
if(nodePtr.p->nodeStatus == NodeRecord::ALIVE){
|
||||
|
||||
for(Uint32 i = 0; i<nodePtr.p->noOfStartedChkpt; i++){
|
||||
Uint32 i;
|
||||
for(i = 0; i<nodePtr.p->noOfStartedChkpt; i++){
|
||||
infoEvent("Node %d: started: table=%d fragment=%d replica=%d",
|
||||
nodePtr.i,
|
||||
nodePtr.p->startedChkpt[i].tableId,
|
||||
|
@ -13029,7 +13040,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
|
|||
nodePtr.p->startedChkpt[i].replicaPtr);
|
||||
}
|
||||
|
||||
for(Uint32 i = 0; i<nodePtr.p->noOfQueuedChkpt; i++){
|
||||
for(i = 0; i<nodePtr.p->noOfQueuedChkpt; i++){
|
||||
infoEvent("Node %d: queued: table=%d fragment=%d replica=%d",
|
||||
nodePtr.i,
|
||||
nodePtr.p->queuedChkpt[i].tableId,
|
||||
|
|
|
@ -6307,12 +6307,13 @@ void Dblqh::execNODE_FAILREP(Signal* signal)
|
|||
UintR TfoundNodes = 0;
|
||||
UintR TnoOfNodes;
|
||||
UintR Tdata[MAX_NDB_NODES];
|
||||
Uint32 i;
|
||||
|
||||
NodeFailRep * const nodeFail = (NodeFailRep *)&signal->theData[0];
|
||||
|
||||
TnoOfNodes = nodeFail->noOfNodes;
|
||||
UintR index = 0;
|
||||
for (Uint32 i = 1; i < MAX_NDB_NODES; i++) {
|
||||
for (i = 1; i < MAX_NDB_NODES; i++) {
|
||||
jam();
|
||||
if(NodeBitmask::get(nodeFail->theNodes, i)){
|
||||
jam();
|
||||
|
@ -6326,7 +6327,7 @@ void Dblqh::execNODE_FAILREP(Signal* signal)
|
|||
|
||||
ndbrequire(index == TnoOfNodes);
|
||||
ndbrequire(cnoOfNodes - 1 < MAX_NDB_NODES);
|
||||
for (Uint32 i = 0; i < TnoOfNodes; i++) {
|
||||
for (i = 0; i < TnoOfNodes; i++) {
|
||||
const Uint32 nodeId = Tdata[i];
|
||||
lcpPtr.p->m_EMPTY_LCP_REQ.clear(nodeId);
|
||||
|
||||
|
@ -6524,7 +6525,7 @@ Dblqh::scanMarkers(Signal* signal,
|
|||
}
|
||||
|
||||
const Uint32 RT_BREAK = 256;
|
||||
for(Uint32 i = 0; i<RT_BREAK || iter.bucket == startBucket; i++){
|
||||
for(i = 0; i<RT_BREAK || iter.bucket == startBucket; i++){
|
||||
jam();
|
||||
|
||||
if(iter.curr.i == RNIL){
|
||||
|
@ -13085,11 +13086,12 @@ void Dblqh::execSR_FRAGIDCONF(Signal* signal)
|
|||
Uint32 noLocFrag = srFragidConf->noLocFrag;
|
||||
ndbrequire(noLocFrag == 2);
|
||||
Uint32 fragid[2];
|
||||
for (Uint32 i = 0; i < noLocFrag; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < noLocFrag; i++) {
|
||||
fragid[i] = srFragidConf->fragId[i];
|
||||
}//for
|
||||
|
||||
for (Uint32 i = 0; i < noLocFrag; i++) {
|
||||
for (i = 0; i < noLocFrag; i++) {
|
||||
jam();
|
||||
Uint32 fragId = fragid[i];
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -16040,17 +16042,18 @@ void Dblqh::initialisePageRef(Signal* signal)
|
|||
void Dblqh::initialiseRecordsLab(Signal* signal, Uint32 data,
|
||||
Uint32 retRef, Uint32 retData)
|
||||
{
|
||||
Uint32 i;
|
||||
switch (data) {
|
||||
case 0:
|
||||
jam();
|
||||
for (Uint32 i = 0; i < MAX_NDB_NODES; i++) {
|
||||
for (i = 0; i < MAX_NDB_NODES; i++) {
|
||||
cnodeSrState[i] = ZSTART_SR;
|
||||
cnodeExecSrState[i] = ZSTART_SR;
|
||||
}//for
|
||||
for (Uint32 i = 0; i < 1024; i++) {
|
||||
for (i = 0; i < 1024; i++) {
|
||||
ctransidHash[i] = RNIL;
|
||||
}//for
|
||||
for (Uint32 i = 0; i < 4; i++) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
cactiveCopy[i] = RNIL;
|
||||
}//for
|
||||
cnoActiveCopy = 0;
|
||||
|
@ -18004,7 +18007,7 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal)
|
|||
infoEvent(" lcpQueued=%d reportEmpty=%d",
|
||||
TlcpPtr.p->lcpQueued,
|
||||
TlcpPtr.p->reportEmpty);
|
||||
char buf[TlcpPtr.p->m_EMPTY_LCP_REQ.TextLength+1];
|
||||
char buf[8*_NDB_NODE_BITMASK_SIZE+1];
|
||||
infoEvent(" m_EMPTY_LCP_REQ=%d",
|
||||
TlcpPtr.p->m_EMPTY_LCP_REQ.getText(buf));
|
||||
|
||||
|
|
|
@ -6725,7 +6725,8 @@ void Dbtc::execNODE_FAILREP(Signal* signal)
|
|||
|
||||
tcNodeFailptr.i = 0;
|
||||
ptrAss(tcNodeFailptr, tcFailRecord);
|
||||
for (Uint32 tindex = 0; tindex < tnoOfNodes; tindex++) {
|
||||
Uint32 tindex;
|
||||
for (tindex = 0; tindex < tnoOfNodes; tindex++) {
|
||||
jam();
|
||||
hostptr.i = cdata[tindex];
|
||||
ptrCheckGuard(hostptr, chostFilesize, hostRecord);
|
||||
|
@ -6842,8 +6843,7 @@ void Dbtc::execNODE_FAILREP(Signal* signal)
|
|||
}//if
|
||||
}//for
|
||||
}//if
|
||||
|
||||
for (Uint32 tindex = 0; tindex < tnoOfNodes; tindex++) {
|
||||
for (tindex = 0; tindex < tnoOfNodes; tindex++) {
|
||||
jam();
|
||||
hostptr.i = cdata[tindex];
|
||||
ptrCheckGuard(hostptr, chostFilesize, hostRecord);
|
||||
|
|
|
@ -238,11 +238,12 @@ void Dbtup::execMEMCHECKREQ(Signal* signal)
|
|||
|
||||
ljamEntry();
|
||||
BlockReference blockref = signal->theData[0];
|
||||
for (Uint32 i = 0; i < 25; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < 25; i++) {
|
||||
ljam();
|
||||
data[i] = 0;
|
||||
}//for
|
||||
for (Uint32 i = 0; i < 16; i++) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
regPagePtr.i = cfreepageList[i];
|
||||
ljam();
|
||||
while (regPagePtr.i != RNIL) {
|
||||
|
|
|
@ -494,16 +494,17 @@ void Dbtup::readExecUndoLogLab(Signal* signal, DiskBufferSegmentInfoPtr dbsiPtr,
|
|||
Uint32 dataPages[16];
|
||||
ndbrequire(dbsiPtr.p->pdxFilePage > 0);
|
||||
ndbrequire(dbsiPtr.p->pdxFilePage <= ZUB_SEGMENT_SIZE);
|
||||
for (Uint32 i = 0; i < dbsiPtr.p->pdxFilePage; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < dbsiPtr.p->pdxFilePage; i++) {
|
||||
ljam();
|
||||
dataPages[i] = dbsiPtr.p->pdxDataPage[i + ZUB_SEGMENT_SIZE];
|
||||
}//for
|
||||
for (Uint32 i = 0; i < ZUB_SEGMENT_SIZE; i++) {
|
||||
for (i = 0; i < ZUB_SEGMENT_SIZE; i++) {
|
||||
ljam();
|
||||
dataPages[i + dbsiPtr.p->pdxFilePage] = dbsiPtr.p->pdxDataPage[i];
|
||||
}//for
|
||||
Uint32 limitLoop = ZUB_SEGMENT_SIZE + dbsiPtr.p->pdxFilePage;
|
||||
for (Uint32 i = 0; i < limitLoop; i++) {
|
||||
for (i = 0; i < limitLoop; i++) {
|
||||
ljam();
|
||||
dbsiPtr.p->pdxDataPage[i] = dataPages[i];
|
||||
}//for
|
||||
|
@ -977,7 +978,8 @@ void Dbtup::allocRestartUndoBufferSegment(Signal* signal, DiskBufferSegmentInfoP
|
|||
seizeDiskBufferSegmentRecord(dbsiPtr);
|
||||
dbsiPtr.p->pdxBuffertype = UNDO_RESTART_PAGES;
|
||||
dbsiPtr.p->pdxUndoBufferSet[0] = undoPagePtr.i;
|
||||
for (Uint32 i = 0; i < ZUB_SEGMENT_SIZE; i++) {
|
||||
Uint32 i;
|
||||
for (i = 0; i < ZUB_SEGMENT_SIZE; i++) {
|
||||
dbsiPtr.p->pdxDataPage[i] = undoPagePtr.i + i;
|
||||
}//for
|
||||
|
||||
|
@ -994,7 +996,7 @@ void Dbtup::allocRestartUndoBufferSegment(Signal* signal, DiskBufferSegmentInfoP
|
|||
undoPagePtr.p->undoPageWord[ZPAGE_NEXT_POS] = RNIL;
|
||||
dbsiPtr.p->pdxUndoBufferSet[1] = undoPagePtr.i;
|
||||
// lliPtr.p->lliUndoPage = undoPagePtr.i;
|
||||
for (Uint32 i = ZUB_SEGMENT_SIZE; i < (2 * ZUB_SEGMENT_SIZE); i++) {
|
||||
for (i = ZUB_SEGMENT_SIZE; i < (2 * ZUB_SEGMENT_SIZE); i++) {
|
||||
dbsiPtr.p->pdxDataPage[i] = undoPagePtr.i + (i - ZUB_SEGMENT_SIZE);
|
||||
}//for
|
||||
return;
|
||||
|
|
|
@ -405,14 +405,15 @@ Dbtux::freeDescEnt(IndexPtr indexPtr)
|
|||
index2.m_descPage == pagePtr.i &&
|
||||
index2.m_descOff == off + size);
|
||||
// move the entry (overlapping copy if size < size2)
|
||||
for (unsigned i = 0; i < size2; i++) {
|
||||
unsigned i;
|
||||
for (i = 0; i < size2; i++) {
|
||||
jam();
|
||||
data[off + i] = data[off + size + i];
|
||||
}
|
||||
off += size2;
|
||||
// adjust page offset in index and all fragments
|
||||
index2.m_descOff -= size;
|
||||
for (unsigned i = 0; i < index2.m_numFrags; i++) {
|
||||
for (i = 0; i < index2.m_numFrags; i++) {
|
||||
jam();
|
||||
Frag& frag2 = *c_fragPool.getPtr(index2.m_fragPtrI[i]);
|
||||
frag2.m_descOff -= size;
|
||||
|
|
|
@ -283,7 +283,8 @@ Dbtux::treeRemove(Signal* signal, Frag& frag, TreePos treePos)
|
|||
nodePopDown(signal, node, pos, ent);
|
||||
ndbrequire(node.getChilds() <= 1);
|
||||
// handle half-leaf
|
||||
for (unsigned i = 0; i <= 1; i++) {
|
||||
unsigned i;
|
||||
for (i = 0; i <= 1; i++) {
|
||||
jam();
|
||||
TupLoc childLoc = node.getLink(i);
|
||||
if (childLoc != NullTupLoc) {
|
||||
|
@ -297,7 +298,7 @@ Dbtux::treeRemove(Signal* signal, Frag& frag, TreePos treePos)
|
|||
// get parent if any
|
||||
TupLoc parentLoc = node.getLink(2);
|
||||
NodeHandle parentNode(frag);
|
||||
unsigned i = node.getSide();
|
||||
i = node.getSide();
|
||||
// move all that fits into parent
|
||||
if (parentLoc != NullTupLoc) {
|
||||
jam();
|
||||
|
|
|
@ -73,7 +73,7 @@ Grep::getNodeGroupMembers(Signal* signal) {
|
|||
c_noNodesInGroup++;
|
||||
}
|
||||
}
|
||||
ndbrequire(c_noNodesInGroup >= 0); // at least 1 node in the nodegroup
|
||||
ndbrequire(c_noNodesInGroup > 0); // at least 1 node in the nodegroup
|
||||
|
||||
#ifdef NODEFAIL_DEBUG
|
||||
for (Uint32 i = 0; i < c_noNodesInGroup; i++) {
|
||||
|
@ -253,7 +253,8 @@ Grep::execREAD_NODESCONF(Signal* signal)
|
|||
/******************************
|
||||
* Check which REP nodes exist
|
||||
******************************/
|
||||
for (Uint32 i = 1; i < MAX_NODES; i++)
|
||||
Uint32 i;
|
||||
for (i = 1; i < MAX_NODES; i++)
|
||||
{
|
||||
jam();
|
||||
#if 0
|
||||
|
@ -279,7 +280,7 @@ Grep::execREAD_NODESCONF(Signal* signal)
|
|||
m_aliveNodes.clear();
|
||||
|
||||
Uint32 count = 0;
|
||||
for(Uint32 i = 0; i<MAX_NDB_NODES; i++)
|
||||
for(i = 0; i<MAX_NDB_NODES; i++)
|
||||
{
|
||||
if (NodeBitmask::get(conf->allNodes, i))
|
||||
{
|
||||
|
|
|
@ -2138,7 +2138,8 @@ void Qmgr::execPREP_FAILREQ(Signal* signal)
|
|||
Uint16 TfailureNr = prepFail->failNo;
|
||||
cnoPrepFailedNodes = prepFail->noOfNodes;
|
||||
UintR arrayIndex = 0;
|
||||
for (Uint32 Tindex = 0; Tindex < MAX_NDB_NODES; Tindex++) {
|
||||
Uint32 Tindex;
|
||||
for (Tindex = 0; Tindex < MAX_NDB_NODES; Tindex++) {
|
||||
if (NodeBitmask::get(prepFail->theNodes, Tindex)){
|
||||
cprepFailedNodes[arrayIndex] = Tindex;
|
||||
arrayIndex++;
|
||||
|
@ -2166,7 +2167,7 @@ void Qmgr::execPREP_FAILREQ(Signal* signal)
|
|||
|
||||
guard0 = cnoPrepFailedNodes - 1;
|
||||
arrGuard(guard0, MAX_NDB_NODES);
|
||||
for (Uint32 Tindex = 0; Tindex <= guard0; Tindex++) {
|
||||
for (Tindex = 0; Tindex <= guard0; Tindex++) {
|
||||
jam();
|
||||
failReport(signal,
|
||||
cprepFailedNodes[Tindex],
|
||||
|
|
|
@ -3972,3 +3972,6 @@ Suma::execSUMA_HANDOVER_CONF(Signal* signal) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
template void append(DataBuffer<11>&,SegmentedSectionPtr,SectionSegmentPool&);
|
||||
|
||||
|
|
|
@ -965,3 +965,5 @@ void Trix::checkParallelism(Signal* signal, SubscriptionRecord* subRec)
|
|||
}
|
||||
|
||||
BLOCK_FUNCTIONS(Trix);
|
||||
|
||||
template void append(DataBuffer<15>&,SegmentedSectionPtr,SectionSegmentPool&);
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
Uint32 data[sz];
|
||||
NdbOut& print(NdbOut& out){
|
||||
out << "[DataBuffer<" << sz << ">::Segment this="
|
||||
<< hex << (Uint32)this << dec << " nextPool= "
|
||||
<< this << dec << " nextPool= "
|
||||
<< nextPool << " ]";
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -1005,7 +1005,8 @@ SimulatedBlock::assembleFragments(Signal * signal){
|
|||
/**
|
||||
* FragInfo == 2 or 3
|
||||
*/
|
||||
for(Uint32 i = 0; i<secs; i++){
|
||||
Uint32 i;
|
||||
for(i = 0; i<secs; i++){
|
||||
Uint32 sectionNo = secNos[i];
|
||||
ndbassert(sectionNo < 3);
|
||||
Uint32 sectionPtrI = signal->m_sectionPtr[i].i;
|
||||
|
@ -1027,7 +1028,6 @@ SimulatedBlock::assembleFragments(Signal * signal){
|
|||
/**
|
||||
* fragInfo = 3
|
||||
*/
|
||||
Uint32 i;
|
||||
for(i = 0; i<3; i++){
|
||||
Uint32 ptrI = fragPtr.p->m_sectionPtrI[i];
|
||||
if(ptrI != RNIL){
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
0, \
|
||||
0, 0 }
|
||||
|
||||
class ParserDummy : SocketServer::Session
|
||||
class ParserDummy : private SocketServer::Session
|
||||
{
|
||||
public:
|
||||
ParserDummy(NDB_SOCKET_TYPE sock);
|
||||
|
@ -491,11 +491,12 @@ extern "C"
|
|||
const char *
|
||||
ndb_mgm_get_node_status_string(enum ndb_mgm_node_status status)
|
||||
{
|
||||
for(int i = 0; i<no_of_status_values; i++)
|
||||
int i;
|
||||
for(i = 0; i<no_of_status_values; i++)
|
||||
if(status_values[i].value == status)
|
||||
return status_values[i].str;
|
||||
|
||||
for(int i = 0; i<no_of_status_values; i++)
|
||||
for(i = 0; i<no_of_status_values; i++)
|
||||
if(status_values[i].value == NDB_MGM_NODE_STATUS_UNKNOWN)
|
||||
return status_values[i].str;
|
||||
|
||||
|
@ -1559,3 +1560,5 @@ ndb_mgm_rep_command(NdbMgmHandle handle, unsigned int request,
|
|||
delete reply;
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class Vector<const ParserRow<ParserDummy>*>;
|
||||
|
|
|
@ -378,7 +378,8 @@ void CommandInterpreter::executeHelp(char* parameters) {
|
|||
(void)parameters; // Don't want compiler warning
|
||||
|
||||
if (emptyString(parameters)) {
|
||||
for (int i = 0; i<noOfHelpTexts; i++) {
|
||||
unsigned i;
|
||||
for (i = 0; i<noOfHelpTexts; i++) {
|
||||
ndbout << helpTexts[i] << endl;
|
||||
}
|
||||
|
||||
|
@ -388,7 +389,7 @@ void CommandInterpreter::executeHelp(char* parameters) {
|
|||
<< endl;
|
||||
|
||||
ndbout << "<category> = ";
|
||||
for(Uint32 i = 0; i<EventLogger::noOfEventCategoryNames; i++){
|
||||
for(i = 0; i<EventLogger::noOfEventCategoryNames; i++){
|
||||
ndbout << EventLogger::eventCategoryNames[i].name;
|
||||
if (i < EventLogger::noOfEventCategoryNames - 1) {
|
||||
ndbout << " | ";
|
||||
|
@ -1195,11 +1196,12 @@ CommandInterpreter::jonas(int processId, const char* parameters, bool all) {
|
|||
|
||||
data[0] = 12;
|
||||
data[1] = 13;
|
||||
|
||||
for(Uint32 i = 0; i<70; i++)
|
||||
|
||||
unsigned i;
|
||||
for(i = 0; i<70; i++)
|
||||
sec0[i] = i;
|
||||
|
||||
for(Uint32 i = 0; i<123; i++)
|
||||
for(i = 0; i<123; i++)
|
||||
sec1[i] = 70+i;
|
||||
|
||||
signal.set(0, CMVMI, GSN_TESTSIG, 3);
|
||||
|
|
|
@ -985,13 +985,13 @@ MgmtSrvr::version(int * stopCount, bool abort,
|
|||
|
||||
m_versionRec.callback = callback;
|
||||
m_versionRec.inUse = true ;
|
||||
|
||||
for(Uint32 i = 0; i<MAX_NODES; i++) {
|
||||
Uint32 i;
|
||||
for(i = 0; i<MAX_NODES; i++) {
|
||||
if (getNodeType(i) == NDB_MGM_NODE_TYPE_MGM) {
|
||||
m_versionRec.callback(i, NDB_VERSION, this,0);
|
||||
}
|
||||
}
|
||||
for(Uint32 i = 0; i<MAX_NODES; i++) {
|
||||
for(i = 0; i<MAX_NODES; i++) {
|
||||
if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB) {
|
||||
node =
|
||||
TransporterFacade::instance()->theClusterMgr->getNodeInfo(i);
|
||||
|
@ -1003,7 +1003,7 @@ MgmtSrvr::version(int * stopCount, bool abort,
|
|||
|
||||
}
|
||||
}
|
||||
for(Uint32 i = 0; i<MAX_NODES; i++) {
|
||||
for(i = 0; i<MAX_NODES; i++) {
|
||||
if (getNodeType(i) == NDB_MGM_NODE_TYPE_API) {
|
||||
return sendVersionReq(i);
|
||||
}
|
||||
|
@ -1463,7 +1463,8 @@ MgmtSrvr::setEventReportingLevelImpl(int processId,
|
|||
const SetLogLevelOrd & ll,
|
||||
bool isResend)
|
||||
{
|
||||
for(Uint32 i = 0; i<ll.noOfEntries; i++){
|
||||
Uint32 i;
|
||||
for(i = 0; i<ll.noOfEntries; i++){
|
||||
// Save log level for the cluster log
|
||||
if (!isResend) {
|
||||
NodeLogLevel* n = NULL;
|
||||
|
@ -1494,7 +1495,7 @@ MgmtSrvr::setEventReportingLevelImpl(int processId,
|
|||
|
||||
EventSubscribeReq * dst =
|
||||
CAST_PTR(EventSubscribeReq, signal->getDataPtrSend());
|
||||
for(Uint32 i = 0; i<ll.noOfEntries; i++){
|
||||
for(i = 0; i<ll.noOfEntries; i++){
|
||||
dst->theCategories[i] = ll.theCategories[i];
|
||||
dst->theLevels[i] = ll.theLevels[i];
|
||||
}
|
||||
|
@ -1523,7 +1524,8 @@ int
|
|||
MgmtSrvr::setNodeLogLevel(int processId, const SetLogLevelOrd & ll,
|
||||
bool isResend)
|
||||
{
|
||||
for(Uint32 i = 0; i<ll.noOfEntries; i++){
|
||||
Uint32 i;
|
||||
for(i = 0; i<ll.noOfEntries; i++){
|
||||
// Save log level for the cluster log
|
||||
if (!isResend) {
|
||||
NodeLogLevel* n = NULL;
|
||||
|
@ -1554,7 +1556,7 @@ MgmtSrvr::setNodeLogLevel(int processId, const SetLogLevelOrd & ll,
|
|||
|
||||
SetLogLevelOrd * dst = CAST_PTR(SetLogLevelOrd, signal->getDataPtrSend());
|
||||
|
||||
for(Uint32 i = 0; i<ll.noOfEntries; i++){
|
||||
for(i = 0; i<ll.noOfEntries; i++){
|
||||
dst->theCategories[i] = ll.theCategories[i];
|
||||
dst->theLevels[i] = ll.theLevels[i];
|
||||
}
|
||||
|
|
|
@ -1119,7 +1119,8 @@ void
|
|||
MgmStatService::println_statistics(const BaseString &line){
|
||||
MutexVector<NDB_SOCKET_TYPE> copy(m_sockets.size());
|
||||
m_sockets.lock();
|
||||
for(int i = m_sockets.size() - 1; i >= 0; i--){
|
||||
int i;
|
||||
for(i = m_sockets.size() - 1; i >= 0; i--){
|
||||
if(println_socket(m_sockets[i], MAX_WRITE_TIMEOUT, line.c_str()) == -1){
|
||||
copy.push_back(m_sockets[i]);
|
||||
m_sockets.erase(i, false);
|
||||
|
@ -1127,7 +1128,7 @@ MgmStatService::println_statistics(const BaseString &line){
|
|||
}
|
||||
m_sockets.unlock();
|
||||
|
||||
for(int i = copy.size() - 1; i >= 0; i--){
|
||||
for(i = copy.size() - 1; i >= 0; i--){
|
||||
NDB_CLOSE_SOCKET(copy[i]);
|
||||
copy.erase(i);
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ GlobalDictCache::put(const char * name, NdbTableImpl * tab)
|
|||
void
|
||||
GlobalDictCache::drop(NdbTableImpl * tab)
|
||||
{
|
||||
unsigned i;
|
||||
const Uint32 len = strlen(tab->m_internalName.c_str());
|
||||
Vector<TableVersion> * vers =
|
||||
m_tableHash.getData(tab->m_internalName.c_str(), len);
|
||||
|
@ -173,7 +174,7 @@ GlobalDictCache::drop(NdbTableImpl * tab)
|
|||
abort();
|
||||
}
|
||||
|
||||
for(unsigned i = 0; i < sz; i++){
|
||||
for(i = 0; i < sz; i++){
|
||||
TableVersion & ver = (* vers)[i];
|
||||
if(ver.m_impl == tab){
|
||||
if(ver.m_refCount == 0 || ver.m_status == RETREIVING ||
|
||||
|
@ -193,7 +194,7 @@ GlobalDictCache::drop(NdbTableImpl * tab)
|
|||
}
|
||||
}
|
||||
|
||||
for(unsigned i = 0; i<sz; i++){
|
||||
for(i = 0; i<sz; i++){
|
||||
TableVersion & ver = (* vers)[i];
|
||||
ndbout_c("%d: version: %d refCount: %d status: %d impl: %p",
|
||||
i, ver.m_version, ver.m_refCount, ver.m_status, ver.m_impl);
|
||||
|
@ -204,6 +205,7 @@ GlobalDictCache::drop(NdbTableImpl * tab)
|
|||
|
||||
void
|
||||
GlobalDictCache::release(NdbTableImpl * tab){
|
||||
unsigned i;
|
||||
const Uint32 len = strlen(tab->m_internalName.c_str());
|
||||
Vector<TableVersion> * vers =
|
||||
m_tableHash.getData(tab->m_internalName.c_str(), len);
|
||||
|
@ -220,7 +222,7 @@ GlobalDictCache::release(NdbTableImpl * tab){
|
|||
abort();
|
||||
}
|
||||
|
||||
for(unsigned i = 0; i < sz; i++){
|
||||
for(i = 0; i < sz; i++){
|
||||
TableVersion & ver = (* vers)[i];
|
||||
if(ver.m_impl == tab){
|
||||
if(ver.m_refCount == 0 || ver.m_status == RETREIVING ||
|
||||
|
@ -235,7 +237,7 @@ GlobalDictCache::release(NdbTableImpl * tab){
|
|||
}
|
||||
}
|
||||
|
||||
for(unsigned i = 0; i<sz; i++){
|
||||
for(i = 0; i<sz; i++){
|
||||
TableVersion & ver = (* vers)[i];
|
||||
ndbout_c("%d: version: %d refCount: %d status: %d impl: %p",
|
||||
i, ver.m_version, ver.m_refCount, ver.m_status, ver.m_impl);
|
||||
|
@ -244,3 +246,4 @@ GlobalDictCache::release(NdbTableImpl * tab){
|
|||
abort();
|
||||
}
|
||||
|
||||
template class Vector<GlobalDictCache::TableVersion>;
|
||||
|
|
|
@ -973,13 +973,13 @@ Ndb::StartTransactionNodeSelectionData::init(Uint32 noOfNodes,
|
|||
*/
|
||||
{
|
||||
fragment2PrimaryNodeMap = new Uint32[noOfFragments];
|
||||
|
||||
for(Uint32 i = 0; i<noOfNodes; i++){
|
||||
Uint32 i;
|
||||
for(i = 0; i<noOfNodes; i++){
|
||||
fragment2PrimaryNodeMap[i] = nodeIds[i];
|
||||
}
|
||||
|
||||
// Sort them (bubble sort)
|
||||
for(Uint32 i = 0; i<noOfNodes-1; i++)
|
||||
for(i = 0; i<noOfNodes-1; i++)
|
||||
for(Uint32 j = i+1; j<noOfNodes; j++)
|
||||
if(fragment2PrimaryNodeMap[i] > fragment2PrimaryNodeMap[j]){
|
||||
Uint32 tmp = fragment2PrimaryNodeMap[i];
|
||||
|
@ -987,7 +987,7 @@ Ndb::StartTransactionNodeSelectionData::init(Uint32 noOfNodes,
|
|||
fragment2PrimaryNodeMap[j] = tmp;
|
||||
}
|
||||
|
||||
for(Uint32 i = 0; i<noOfNodes; i++){
|
||||
for(i = 0; i<noOfNodes; i++){
|
||||
fragment2PrimaryNodeMap[i+noOfNodes] = fragment2PrimaryNodeMap[i];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -387,7 +387,8 @@ void
|
|||
NdbTableImpl::buildColumnHash(){
|
||||
const Uint32 size = m_columns.size();
|
||||
|
||||
for(size_t i = 31; i >= 0; i--){
|
||||
size_t i;
|
||||
for(i = 31; i >= 0; i--){
|
||||
if(((1 << i) & size) != 0){
|
||||
m_columnHashMask = (1 << (i + 1)) - 1;
|
||||
break;
|
||||
|
@ -396,7 +397,7 @@ NdbTableImpl::buildColumnHash(){
|
|||
|
||||
Vector<Uint32> hashValues;
|
||||
Vector<Vector<Uint32> > chains; chains.fill(size, hashValues);
|
||||
for(size_t i = 0; i<size; i++){
|
||||
for(i = 0; i<size; i++){
|
||||
Uint32 hv = Hash(m_columns[i]->getName()) & 0xFFFE;
|
||||
Uint32 bucket = hv & m_columnHashMask;
|
||||
bucket = (bucket < size ? bucket : bucket - size);
|
||||
|
@ -410,7 +411,7 @@ NdbTableImpl::buildColumnHash(){
|
|||
m_columnHash.fill((unsigned)size-1, tmp); // Default no chaining
|
||||
|
||||
Uint32 pos = 0; // In overflow vector
|
||||
for(size_t i = 0; i<size; i++){
|
||||
for(i = 0; i<size; i++){
|
||||
Uint32 sz = chains[i].size();
|
||||
if(sz == 1){
|
||||
Uint32 col = chains[i][0];
|
||||
|
@ -1315,6 +1316,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
|
|||
NdbTableImpl & impl,
|
||||
bool alter)
|
||||
{
|
||||
unsigned i;
|
||||
if((unsigned)impl.getNoOfPrimaryKeys() > NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY){
|
||||
m_error.code = 4317;
|
||||
return -1;
|
||||
|
@ -1340,7 +1342,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
|
|||
|
||||
bool haveAutoIncrement = false;
|
||||
Uint64 autoIncrementValue;
|
||||
for(unsigned i = 0; i<sz; i++){
|
||||
for(i = 0; i<sz; i++){
|
||||
const NdbColumnImpl * col = impl.m_columns[i];
|
||||
if(col == 0)
|
||||
continue;
|
||||
|
@ -1384,7 +1386,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
|
|||
abort();
|
||||
}
|
||||
|
||||
for(unsigned i = 0; i<sz; i++){
|
||||
for(i = 0; i<sz; i++){
|
||||
const NdbColumnImpl * col = impl.m_columns[i];
|
||||
if(col == 0)
|
||||
continue;
|
||||
|
@ -1788,7 +1790,7 @@ NdbDictInterface::createIndex(Ndb & ndb,
|
|||
{
|
||||
//validate();
|
||||
//aggregate();
|
||||
|
||||
unsigned i;
|
||||
UtilBufferWriter w(m_buffer);
|
||||
const size_t len = strlen(impl.m_externalName.c_str()) + 1;
|
||||
if(len > MAX_TAB_NAME_SIZE) {
|
||||
|
@ -1828,7 +1830,7 @@ NdbDictInterface::createIndex(Ndb & ndb,
|
|||
req->setOnline(true);
|
||||
AttributeList attributeList;
|
||||
attributeList.sz = impl.m_columns.size();
|
||||
for(unsigned i = 0; i<attributeList.sz; i++){
|
||||
for(i = 0; i<attributeList.sz; i++){
|
||||
const NdbColumnImpl* col =
|
||||
table.getColumn(impl.m_columns[i]->m_name.c_str());
|
||||
if(col == 0){
|
||||
|
@ -1853,7 +1855,7 @@ NdbDictInterface::createIndex(Ndb & ndb,
|
|||
}
|
||||
if (it == DictTabInfo::UniqueHashIndex) {
|
||||
// Sort index attributes according to primary table (using insertion sort)
|
||||
for(unsigned i = 1; i < attributeList.sz; i++) {
|
||||
for(i = 1; i < attributeList.sz; i++) {
|
||||
unsigned int temp = attributeList.id[i];
|
||||
unsigned int j = i;
|
||||
while((j > 0) && (attributeList.id[j - 1] > temp)) {
|
||||
|
@ -1863,7 +1865,7 @@ NdbDictInterface::createIndex(Ndb & ndb,
|
|||
attributeList.id[j] = temp;
|
||||
}
|
||||
// Check for illegal duplicate attributes
|
||||
for(unsigned i = 0; i<attributeList.sz; i++) {
|
||||
for(i = 0; i<attributeList.sz; i++) {
|
||||
if ((i != (attributeList.sz - 1)) &&
|
||||
(attributeList.id[i] == attributeList.id[i+1])) {
|
||||
m_error.code = 4258;
|
||||
|
@ -2043,6 +2045,7 @@ NdbDictInterface::execDROP_INDX_REF(NdbApiSignal * signal,
|
|||
int
|
||||
NdbDictionaryImpl::createEvent(NdbEventImpl & evnt)
|
||||
{
|
||||
int i;
|
||||
NdbTableImpl* tab = getTable(evnt.getTable());
|
||||
|
||||
if(tab == 0){
|
||||
|
@ -2065,7 +2068,7 @@ NdbDictionaryImpl::createEvent(NdbEventImpl & evnt)
|
|||
|
||||
int attributeList_sz = evnt.m_attrIds.size();
|
||||
|
||||
for (int i = 0; i < attributeList_sz; i++) {
|
||||
for (i = 0; i < attributeList_sz; i++) {
|
||||
NdbColumnImpl *col_impl = table.getColumn(evnt.m_attrIds[i]);
|
||||
if (col_impl) {
|
||||
evnt.m_facade->addColumn(*(col_impl->m_facade));
|
||||
|
@ -2086,7 +2089,7 @@ NdbDictionaryImpl::createEvent(NdbEventImpl & evnt)
|
|||
int pk_count = 0;
|
||||
evnt.m_attrListBitmask.clear();
|
||||
|
||||
for(int i = 0; i<attributeList_sz; i++){
|
||||
for(i = 0; i<attributeList_sz; i++){
|
||||
const NdbColumnImpl* col =
|
||||
table.getColumn(evnt.m_columns[i]->m_name.c_str());
|
||||
if(col == 0){
|
||||
|
@ -2104,7 +2107,7 @@ NdbDictionaryImpl::createEvent(NdbEventImpl & evnt)
|
|||
}
|
||||
|
||||
// Sort index attributes according to primary table (using insertion sort)
|
||||
for(int i = 1; i < attributeList_sz; i++) {
|
||||
for(i = 1; i < attributeList_sz; i++) {
|
||||
NdbColumnImpl* temp = evnt.m_columns[i];
|
||||
unsigned int j = i;
|
||||
while((j > 0) && (evnt.m_columns[j - 1]->m_attrId > temp->m_attrId)) {
|
||||
|
@ -2114,7 +2117,7 @@ NdbDictionaryImpl::createEvent(NdbEventImpl & evnt)
|
|||
evnt.m_columns[j] = temp;
|
||||
}
|
||||
// Check for illegal duplicate attributes
|
||||
for(int i = 1; i<attributeList_sz; i++) {
|
||||
for(i = 1; i<attributeList_sz; i++) {
|
||||
if (evnt.m_columns[i-1]->m_attrId == evnt.m_columns[i]->m_attrId) {
|
||||
m_error.code = 4258;
|
||||
return -1;
|
||||
|
@ -2810,3 +2813,6 @@ NdbDictInterface::execLIST_TABLES_CONF(NdbApiSignal* signal,
|
|||
m_waiter.signal(NO_WAIT);
|
||||
}
|
||||
}
|
||||
|
||||
template class Vector<Uint32>;
|
||||
template class Vector<Vector<Uint32> >;
|
||||
|
|
|
@ -93,11 +93,12 @@ NdbEventOperationImpl::NdbEventOperationImpl(NdbEventOperation &N,
|
|||
|
||||
NdbEventOperationImpl::~NdbEventOperationImpl()
|
||||
{
|
||||
int i;
|
||||
if (sdata) NdbMem_Free(sdata);
|
||||
for (int i=0 ; i<3; i++) {
|
||||
for (i=0 ; i<3; i++) {
|
||||
if (ptr[i].p) NdbMem_Free(ptr[i].p);
|
||||
}
|
||||
for (int i=0 ; i<2; i++) {
|
||||
for (i=0 ; i<2; i++) {
|
||||
NdbRecAttr *p = theFirstRecAttrs[i];
|
||||
while (p) {
|
||||
NdbRecAttr *p_next = p->next();
|
||||
|
@ -1233,8 +1234,9 @@ NdbGlobalEventBuffer::real_wait(NdbGlobalEventBufferHandle *h,
|
|||
int aMillisecondNumber)
|
||||
{
|
||||
// check if there are anything in any of the buffers
|
||||
int i;
|
||||
int n = 0;
|
||||
for (int i = 0; i < h->m_nids; i++)
|
||||
for (i = 0; i < h->m_nids; i++)
|
||||
n += hasData(h->m_bufferIds[i]);
|
||||
if (n) return n;
|
||||
|
||||
|
@ -1243,7 +1245,9 @@ NdbGlobalEventBuffer::real_wait(NdbGlobalEventBufferHandle *h,
|
|||
return -1;
|
||||
|
||||
n = 0;
|
||||
for (int i = 0; i < h->m_nids; i++)
|
||||
for (i = 0; i < h->m_nids; i++)
|
||||
n += hasData(h->m_bufferIds[i]);
|
||||
return n;
|
||||
}
|
||||
|
||||
template class Vector<NdbGlobalEventBufferHandle*>;
|
||||
|
|
|
@ -165,13 +165,14 @@ NdbLinHash<C>::createHashTable() {
|
|||
max = SEGMENTSIZE - 1;
|
||||
slack = SEGMENTSIZE * MAXLOADFCTR;
|
||||
directory[0] = new Segment_t();
|
||||
|
||||
int i;
|
||||
|
||||
/* The first segment cleared before used */
|
||||
for(int i = 0; i < SEGMENTSIZE; i++ )
|
||||
for(i = 0; i < SEGMENTSIZE; i++ )
|
||||
directory[0]->elements[i] = 0;
|
||||
|
||||
/* clear the rest of the directory */
|
||||
for( int i = 1; i < DIRECTORYSIZE; i++)
|
||||
for(i = 1; i < DIRECTORYSIZE; i++)
|
||||
directory[i] = 0;
|
||||
}
|
||||
|
||||
|
@ -203,7 +204,8 @@ NdbLinHash<C>::insertKey( const char* str, Uint32 len, Uint32 lkey1, C* data )
|
|||
* chain=chainp will copy the contents of HASH_T into chain
|
||||
*/
|
||||
NdbElement_t<C> * oldChain = 0;
|
||||
for(NdbElement_t<C> * chain = *chainp; chain != 0; chain = chain->next){
|
||||
NdbElement_t<C> * chain;
|
||||
for(chain = *chainp; chain != 0; chain = chain->next){
|
||||
if(chain->len == len && !memcmp(chain->str, str, len))
|
||||
return -1; /* Element already exists */
|
||||
else
|
||||
|
@ -211,7 +213,7 @@ NdbLinHash<C>::insertKey( const char* str, Uint32 len, Uint32 lkey1, C* data )
|
|||
}
|
||||
|
||||
/* New entry */
|
||||
NdbElement_t<C> * chain = new NdbElement_t<C>();
|
||||
chain = new NdbElement_t<C>();
|
||||
chain->len = len;
|
||||
chain->hash = hash;
|
||||
chain->localkey1 = lkey1;
|
||||
|
|
|
@ -137,6 +137,7 @@ int
|
|||
NdbOperation::openScan(Uint32 aParallelism,
|
||||
bool lockMode, bool lockHoldMode, bool readCommitted)
|
||||
{
|
||||
Uint32 i;
|
||||
aParallelism = checkParallelism(aParallelism);
|
||||
if(aParallelism == 0){
|
||||
return 0;
|
||||
|
@ -178,7 +179,7 @@ NdbOperation::openScan(Uint32 aParallelism,
|
|||
return -1;
|
||||
}
|
||||
|
||||
for (Uint32 i = 0; i < aParallelism; i ++) {
|
||||
for (i = 0; i < aParallelism; i ++) {
|
||||
tScanRec = theNdb->getNdbScanRec();
|
||||
if (tScanRec == NULL) {
|
||||
setErrorCodeAbort(4000);
|
||||
|
@ -213,7 +214,7 @@ NdbOperation::openScan(Uint32 aParallelism,
|
|||
scanTabReq->transId1 = (Uint32) transId;
|
||||
scanTabReq->transId2 = (Uint32) (transId >> 32);
|
||||
|
||||
for (Uint32 i = 0; i < 16 && i < aParallelism ; i++) {
|
||||
for (i = 0; i < 16 && i < aParallelism ; i++) {
|
||||
scanTabReq->apiOperationPtr[i] = theScanReceiversArray[i]->ptr2int();
|
||||
}//for
|
||||
|
||||
|
@ -241,7 +242,7 @@ NdbOperation::openScan(Uint32 aParallelism,
|
|||
tSignal = theFirstSCAN_TABINFO_Send;
|
||||
while (tSignal != NULL) {
|
||||
tSignal->setData(theNdbCon->theTCConPtr, 1);
|
||||
for (int i = 0; i < 16 ; i++) {
|
||||
for (i = 0; i < 16 ; i++) {
|
||||
tSignal->setData(theScanReceiversArray[i + tParallelism]->ptr2int(), i + 2);
|
||||
}//for
|
||||
tSignal = tSignal->next();
|
||||
|
|
|
@ -111,12 +111,13 @@ Ndb::Ndb( const char* aDataBase , const char* aSchema) :
|
|||
|
||||
theCurrentConnectCounter = 1;
|
||||
theCurrentConnectIndex = 0;
|
||||
for (int i = 0; i < MAX_NDB_NODES ; i++) {
|
||||
int i;
|
||||
for (i = 0; i < MAX_NDB_NODES ; i++) {
|
||||
theConnectionArray[i] = NULL;
|
||||
the_release_ind[i] = 0;
|
||||
theDBnodes[i] = 0;
|
||||
}//forg
|
||||
for (int i = 0; i < 2048 ; i++) {
|
||||
for (i = 0; i < 2048 ; i++) {
|
||||
theFirstTupleId[i] = 0;
|
||||
theLastTupleId[i] = 0;
|
||||
}//for
|
||||
|
|
|
@ -992,3 +992,6 @@ TransporterFacade::ThreadData::close(int number){
|
|||
m_statusFunction[number] = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class Vector<NodeStatusFunction>;
|
||||
template class Vector<TransporterFacade::ThreadData::Object_Execute>;
|
||||
|
|
Loading…
Reference in a new issue