mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
wl1744 - fix compiler problems
ndb/include/debugger/GrepError.hpp: prexif ndb/include/kernel/LogLevel.hpp: fix correct type prototype ndb/include/kernel/signaldata/FsCloseReq.hpp: remove usage of true ndb/include/mgmapi/mgmapi.h: use Uint64 instead of long long ndb/include/mgmcommon/IPCConfig.hpp: correct type ndb/include/portlib/NdbTCP.h: fix #elif ndb/include/transporter/TransporterRegistry.hpp: correct type ndb/include/util/Parser.hpp: correct type made stuff public as vc++ couldn't handle template friends ndb/include/util/SimpleProperties.hpp: correct type ndb/src/common/debugger/EventLogger.cpp: Prefix GrepError::Code as GrepError::GE_Code ndb/src/common/debugger/GrepError.cpp: Prefix GrepError::Code as GrepError::GE_Code ndb/src/common/debugger/signaldata/FsCloseReq.cpp: removed usage of true ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp: removed usage of true ndb/src/common/logger/LogHandlerList.hpp: use ndb_global ndb/src/common/mgmcommon/ConfigRetriever.cpp: removed ConfigRetriever::get_config(file) from windows ndb/src/common/transporter/TransporterRegistry.cpp: interface is a reserved word in vc++ ndb/src/kernel/blocks/grep/Grep.hpp: Prefix GrepError::Code as GrepError::GE_Code ndb/src/kernel/vm/Configuration.cpp: Use BaseString::snprintf ndb/src/kernel/vm/Configuration.hpp: correct type ndb/src/kernel/vm/SimplePropertiesSection.cpp: correct type ndb/src/mgmapi/mgmapi_configuration.cpp: use Uin6t4 ndb/src/mgmapi/mgmapi_configuration.hpp: use Uin6t4 ndb/src/mgmsrv/ConfigInfo.cpp: Prefix ndb/src/mgmsrv/ConfigInfo.hpp: prefix ndb/src/ndbapi/Ndb.cpp: removed usued include ndb/src/ndbapi/NdbImpl.hpp: prefix ndb/src/ndbapi/ObjectMap.hpp: Better typecast
This commit is contained in:
@ -24,8 +24,8 @@
|
|||||||
*/
|
*/
|
||||||
class GrepError {
|
class GrepError {
|
||||||
public:
|
public:
|
||||||
enum Code {
|
enum GE_Code {
|
||||||
NO_ERROR = 0,
|
GE_NO_ERROR = 0,
|
||||||
SUBSCRIPTION_ID_NOMEM = 1,
|
SUBSCRIPTION_ID_NOMEM = 1,
|
||||||
SUBSCRIPTION_ID_NOT_FOUND = 2,
|
SUBSCRIPTION_ID_NOT_FOUND = 2,
|
||||||
SUBSCRIPTION_ID_NOT_UNIQUE = 3,
|
SUBSCRIPTION_ID_NOT_UNIQUE = 3,
|
||||||
@ -82,12 +82,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ErrorDescription {
|
struct ErrorDescription {
|
||||||
Code errCode;
|
GE_Code errCode;
|
||||||
const char * name;
|
const char * name;
|
||||||
};
|
};
|
||||||
static const ErrorDescription errorDescriptions[];
|
static const ErrorDescription errorDescriptions[];
|
||||||
static const Uint32 noOfErrorDescs;
|
static const Uint32 noOfErrorDescs;
|
||||||
static const char * getErrorDesc(GrepError::Code err);
|
static const char * getErrorDesc(GrepError::GE_Code err);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
return memcmp(this, &l, sizeof(* this)) == 0;
|
return memcmp(this, &l, sizeof(* this)) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogLevel& operator=(const class EventSubscribeReq & req);
|
LogLevel& operator=(const struct EventSubscribeReq & req);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
@ -75,7 +75,7 @@ inline
|
|||||||
void
|
void
|
||||||
FsCloseReq::setRemoveFileFlag(UintR & fileflag, bool removefile){
|
FsCloseReq::setRemoveFileFlag(UintR & fileflag, bool removefile){
|
||||||
// ASSERT_BOOL(removefile, "FsCloseReq::setRemoveFileFlag");
|
// ASSERT_BOOL(removefile, "FsCloseReq::setRemoveFileFlag");
|
||||||
if (removefile == true)
|
if (removefile)
|
||||||
fileflag = 1;
|
fileflag = 1;
|
||||||
else
|
else
|
||||||
fileflag = 0;
|
fileflag = 0;
|
||||||
|
@ -730,7 +730,7 @@ extern "C" {
|
|||||||
int ndb_mgm_get_int_parameter(const ndb_mgm_configuration_iterator*,
|
int ndb_mgm_get_int_parameter(const ndb_mgm_configuration_iterator*,
|
||||||
int param, unsigned * value);
|
int param, unsigned * value);
|
||||||
int ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator*,
|
int ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator*,
|
||||||
int param, unsigned long long * value);
|
int param, Uint64 * value);
|
||||||
int ndb_mgm_get_string_parameter(const ndb_mgm_configuration_iterator*,
|
int ndb_mgm_get_string_parameter(const ndb_mgm_configuration_iterator*,
|
||||||
int param, const char ** value);
|
int param, const char ** value);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
void print() const { props->print(); }
|
void print() const { props->print(); }
|
||||||
|
|
||||||
static Uint32 configureTransporters(Uint32 nodeId,
|
static Uint32 configureTransporters(Uint32 nodeId,
|
||||||
const class ndb_mgm_configuration &,
|
const struct ndb_mgm_configuration &,
|
||||||
class TransporterRegistry &);
|
class TransporterRegistry &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -40,7 +40,7 @@ typedef int socklen_t;
|
|||||||
|
|
||||||
#define InetErrno (* inet_errno())
|
#define InetErrno (* inet_errno())
|
||||||
|
|
||||||
#elif NDB_WIN32
|
#elif defined NDB_WIN32
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Include files needed
|
* Include files needed
|
||||||
|
@ -224,7 +224,7 @@ public:
|
|||||||
const char *m_interface;
|
const char *m_interface;
|
||||||
};
|
};
|
||||||
Vector<Transporter_interface> m_transporter_interface;
|
Vector<Transporter_interface> m_transporter_interface;
|
||||||
void add_transporter_interface(const char *interface, unsigned short port);
|
void add_transporter_interface(const char *interf, unsigned short port);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "NdbOut.hpp"
|
#include "NdbOut.hpp"
|
||||||
|
|
||||||
class ParserImpl;
|
class ParserImpl;
|
||||||
template<class T> class ParserRow;
|
template<class T> struct ParserRow;
|
||||||
|
|
||||||
//#define PARSER_DEBUG
|
//#define PARSER_DEBUG
|
||||||
#ifdef PARSER_DEBUG
|
#ifdef PARSER_DEBUG
|
||||||
@ -130,11 +130,11 @@ public:
|
|||||||
* The void* equivalent implementation
|
* The void* equivalent implementation
|
||||||
*/
|
*/
|
||||||
class ParserImpl {
|
class ParserImpl {
|
||||||
|
public:
|
||||||
class Dummy {};
|
class Dummy {};
|
||||||
typedef ParserRow<Dummy> DummyRow;
|
typedef ParserRow<Dummy> DummyRow;
|
||||||
typedef Parser<Dummy>::Context Context;
|
typedef Parser<Dummy>::Context Context;
|
||||||
template<class T> friend class Parser;
|
|
||||||
private:
|
|
||||||
|
|
||||||
ParserImpl(const DummyRow rows[], class InputStream & in,
|
ParserImpl(const DummyRow rows[], class InputStream & in,
|
||||||
bool b_cmd, bool b_empty, bool b_iarg);
|
bool b_cmd, bool b_empty, bool b_iarg);
|
||||||
|
@ -38,20 +38,20 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Value types
|
* Value types
|
||||||
*/
|
*/
|
||||||
enum ValueType {
|
enum ValueType {
|
||||||
Uint32Value = 0,
|
Uint32Value = 0,
|
||||||
StringValue = 1,
|
StringValue = 1,
|
||||||
BinaryValue = 2,
|
BinaryValue = 2,
|
||||||
InvalidValue = 3
|
InvalidValue = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Struct for defining mapping to be used with unpack
|
* Struct for defining mapping to be used with unpack
|
||||||
*/
|
*/
|
||||||
struct SP2StructMapping {
|
struct SP2StructMapping {
|
||||||
Uint16 Key;
|
Uint16 Key;
|
||||||
Uint32 Offset;
|
Uint32 Offset;
|
||||||
SimpleProperties::ValueType Type;
|
ValueType Type;
|
||||||
Uint32 minValue;
|
Uint32 minValue;
|
||||||
Uint32 maxValue;
|
Uint32 maxValue;
|
||||||
Uint32 Length_Offset; // Offset used for looking up length of
|
Uint32 Length_Offset; // Offset used for looking up length of
|
||||||
@ -233,7 +233,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
class SimplePropertiesSectionReader : public SimpleProperties::Reader {
|
class SimplePropertiesSectionReader : public SimpleProperties::Reader {
|
||||||
public:
|
public:
|
||||||
SimplePropertiesSectionReader(class SegmentedSectionPtr &,
|
SimplePropertiesSectionReader(struct SegmentedSectionPtr &,
|
||||||
class SectionSegmentPool &);
|
class SectionSegmentPool &);
|
||||||
|
|
||||||
virtual void reset();
|
virtual void reset();
|
||||||
@ -248,8 +248,8 @@ private:
|
|||||||
Uint32 m_pos;
|
Uint32 m_pos;
|
||||||
Uint32 m_len;
|
Uint32 m_len;
|
||||||
class SectionSegmentPool & m_pool;
|
class SectionSegmentPool & m_pool;
|
||||||
class SectionSegment * m_head;
|
struct SectionSegment * m_head;
|
||||||
class SectionSegment * m_currentSegment;
|
struct SectionSegment * m_currentSegment;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline
|
inline
|
||||||
@ -275,15 +275,15 @@ public:
|
|||||||
/**
|
/**
|
||||||
* This "unlinks" the writer from the memory
|
* This "unlinks" the writer from the memory
|
||||||
*/
|
*/
|
||||||
void getPtr(class SegmentedSectionPtr & dst);
|
void getPtr(struct SegmentedSectionPtr & dst);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Int32 m_pos;
|
Int32 m_pos;
|
||||||
Uint32 m_sz;
|
Uint32 m_sz;
|
||||||
class SectionSegmentPool & m_pool;
|
class SectionSegmentPool & m_pool;
|
||||||
class SectionSegment * m_head;
|
struct SectionSegment * m_head;
|
||||||
Uint32 m_prevPtrI; // Prev to m_currentSegment
|
Uint32 m_prevPtrI; // Prev to m_currentSegment
|
||||||
class SectionSegment * m_currentSegment;
|
struct SectionSegment * m_currentSegment;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1028,7 +1028,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
"Grep::SSCoord:Error code: %d Error message: %s"
|
"Grep::SSCoord:Error code: %d Error message: %s"
|
||||||
" (subId=%d,SubKey=%d)",
|
" (subId=%d,SubKey=%d)",
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err),
|
GrepError::getErrorDesc((GrepError::GE_Code)err),
|
||||||
subId,
|
subId,
|
||||||
subKey);
|
subKey);
|
||||||
break;
|
break;
|
||||||
@ -1045,7 +1045,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepSS_SubStartMetaRef:
|
case GrepEvent::GrepSS_SubStartMetaRef:
|
||||||
@ -1061,7 +1061,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepSS_SubStartDataRef:
|
case GrepEvent::GrepSS_SubStartDataRef:
|
||||||
@ -1076,7 +1076,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepSS_SubSyncMetaRef:
|
case GrepEvent::GrepSS_SubSyncMetaRef:
|
||||||
@ -1091,7 +1091,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepSS_SubSyncDataRef:
|
case GrepEvent::GrepSS_SubSyncDataRef:
|
||||||
@ -1108,7 +1108,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subKey,
|
subKey,
|
||||||
gci,
|
gci,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepSS_SubRemoveRef:
|
case GrepEvent::GrepSS_SubRemoveRef:
|
||||||
@ -1123,7 +1123,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err)
|
GrepError::getErrorDesc((GrepError::GE_Code)err)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1137,7 +1137,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
"Grep::PSCoord: Error code: %d Error Message: %s"
|
"Grep::PSCoord: Error code: %d Error Message: %s"
|
||||||
" (subId=%d,SubKey=%d)",
|
" (subId=%d,SubKey=%d)",
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err),
|
GrepError::getErrorDesc((GrepError::GE_Code)err),
|
||||||
subId,
|
subId,
|
||||||
subKey);
|
subKey);
|
||||||
break;
|
break;
|
||||||
@ -1154,7 +1154,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepPS_SubStartMetaRef:
|
case GrepEvent::GrepPS_SubStartMetaRef:
|
||||||
@ -1170,7 +1170,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepPS_SubStartDataRef:
|
case GrepEvent::GrepPS_SubStartDataRef:
|
||||||
@ -1185,7 +1185,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepPS_SubSyncMetaRef:
|
case GrepEvent::GrepPS_SubSyncMetaRef:
|
||||||
@ -1200,7 +1200,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepPS_SubSyncDataRef:
|
case GrepEvent::GrepPS_SubSyncDataRef:
|
||||||
@ -1217,7 +1217,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subKey,
|
subKey,
|
||||||
gci,
|
gci,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::GrepPS_SubRemoveRef:
|
case GrepEvent::GrepPS_SubRemoveRef:
|
||||||
@ -1232,7 +1232,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
subId,
|
subId,
|
||||||
subKey,
|
subKey,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GrepEvent::Rep_Disconnect:
|
case GrepEvent::Rep_Disconnect:
|
||||||
@ -1244,7 +1244,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
|
|||||||
" Error code: %d Error Message: %s",
|
" Error code: %d Error Message: %s",
|
||||||
nodeId,
|
nodeId,
|
||||||
err,
|
err,
|
||||||
GrepError::getErrorDesc((GrepError::Code)err));
|
GrepError::getErrorDesc((GrepError::GE_Code)err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const GrepError::ErrorDescription GrepError::errorDescriptions[] = {
|
const GrepError::ErrorDescription GrepError::errorDescriptions[] = {
|
||||||
{ GrepError::NO_ERROR,
|
{ GrepError::GE_NO_ERROR,
|
||||||
"No error" },
|
"No error" },
|
||||||
{ GrepError::SUBSCRIPTION_ID_NOMEM,
|
{ GrepError::SUBSCRIPTION_ID_NOMEM,
|
||||||
"Not enough resources to allocate the subscription" },
|
"Not enough resources to allocate the subscription" },
|
||||||
@ -119,7 +119,7 @@ GrepError::noOfErrorDescs = sizeof(GrepError::errorDescriptions) /
|
|||||||
* gets the corresponding error message to an err code
|
* gets the corresponding error message to an err code
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
GrepError::getErrorDesc(GrepError::Code err) {
|
GrepError::getErrorDesc(GrepError::GE_Code err) {
|
||||||
|
|
||||||
for(Uint32 i = 0; i<noOfErrorDescs; i++){
|
for(Uint32 i = 0; i<noOfErrorDescs; i++){
|
||||||
if(err == errorDescriptions[i].errCode){
|
if(err == errorDescriptions[i].errCode){
|
||||||
|
@ -31,7 +31,7 @@ printFSCLOSEREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv
|
|||||||
sig->userReference);
|
sig->userReference);
|
||||||
|
|
||||||
fprintf(output, " Flags: H\'%.8x, ", sig->fileFlag);
|
fprintf(output, " Flags: H\'%.8x, ", sig->fileFlag);
|
||||||
if (sig->getRemoveFileFlag(sig->fileFlag) == true)
|
if (sig->getRemoveFileFlag(sig->fileFlag))
|
||||||
fprintf(output, "Remove file");
|
fprintf(output, "Remove file");
|
||||||
else
|
else
|
||||||
fprintf(output, "Don't remove file");
|
fprintf(output, "Don't remove file");
|
||||||
|
@ -31,7 +31,7 @@ printFSREADWRITEREQ(FILE * output, const Uint32 * theData,
|
|||||||
fprintf(output, " UserReference: H\'%.8x", sig->userReference);
|
fprintf(output, " UserReference: H\'%.8x", sig->userReference);
|
||||||
|
|
||||||
fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag);
|
fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag);
|
||||||
if (sig->getSyncFlag(sig->operationFlag) == true)
|
if (sig->getSyncFlag(sig->operationFlag))
|
||||||
fprintf(output, "Sync,");
|
fprintf(output, "Sync,");
|
||||||
else
|
else
|
||||||
fprintf(output, "No sync,");
|
fprintf(output, "No sync,");
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#define LOGHANDLERLIST_H
|
#define LOGHANDLERLIST_H
|
||||||
|
|
||||||
class LogHandler;
|
class LogHandler;
|
||||||
|
#include <ndb_global.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a simple linked list of log handlers.
|
* Provides a simple linked list of log handlers.
|
||||||
|
@ -178,9 +178,10 @@ ConfigRetriever::getConfig(NdbMgmHandle m_handle){
|
|||||||
|
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
ndb_mgm_configuration *
|
ndb_mgm_configuration *
|
||||||
ConfigRetriever::getConfig(const char * filename){
|
ConfigRetriever::getConfig(const char * filename){
|
||||||
|
#ifndef NDB_WIN32
|
||||||
|
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
const int res = stat(filename, &sbuf);
|
const int res = stat(filename, &sbuf);
|
||||||
@ -217,8 +218,10 @@ ConfigRetriever::getConfig(const char * filename){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
delete [] buf2;
|
delete [] buf2;
|
||||||
|
|
||||||
return (ndb_mgm_configuration*)cvf.m_cfg;
|
return (ndb_mgm_configuration*)cvf.m_cfg;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1167,31 +1167,31 @@ TransporterRegistry::stop_clients()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TransporterRegistry::add_transporter_interface(const char *interface, unsigned short port)
|
TransporterRegistry::add_transporter_interface(const char *interf, unsigned short port)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("TransporterRegistry::add_transporter_interface");
|
DBUG_ENTER("TransporterRegistry::add_transporter_interface");
|
||||||
DBUG_PRINT("enter",("interface=%s, port= %d", interface, port));
|
DBUG_PRINT("enter",("interface=%s, port= %d", interf, port));
|
||||||
if (interface && strlen(interface) == 0)
|
if (interf && strlen(interf) == 0)
|
||||||
interface= 0;
|
interf= 0;
|
||||||
|
|
||||||
for (unsigned i= 0; i < m_transporter_interface.size(); i++)
|
for (unsigned i= 0; i < m_transporter_interface.size(); i++)
|
||||||
{
|
{
|
||||||
Transporter_interface &tmp= m_transporter_interface[i];
|
Transporter_interface &tmp= m_transporter_interface[i];
|
||||||
if (port != tmp.m_service_port)
|
if (port != tmp.m_service_port)
|
||||||
continue;
|
continue;
|
||||||
if (interface != 0 && tmp.m_interface != 0 &&
|
if (interf != 0 && tmp.m_interface != 0 &&
|
||||||
strcmp(interface, tmp.m_interface) == 0)
|
strcmp(interf, tmp.m_interface) == 0)
|
||||||
{
|
{
|
||||||
DBUG_VOID_RETURN; // found match, no need to insert
|
DBUG_VOID_RETURN; // found match, no need to insert
|
||||||
}
|
}
|
||||||
if (interface == 0 && tmp.m_interface == 0)
|
if (interf == 0 && tmp.m_interface == 0)
|
||||||
{
|
{
|
||||||
DBUG_VOID_RETURN; // found match, no need to insert
|
DBUG_VOID_RETURN; // found match, no need to insert
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Transporter_interface t;
|
Transporter_interface t;
|
||||||
t.m_service_port= port;
|
t.m_service_port= port;
|
||||||
t.m_interface= interface;
|
t.m_interface= interf;
|
||||||
m_transporter_interface.push_back(t);
|
m_transporter_interface.push_back(t);
|
||||||
DBUG_PRINT("exit",("interface and port added"));
|
DBUG_PRINT("exit",("interface and port added"));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
@ -1200,7 +1200,7 @@ TransporterRegistry::add_transporter_interface(const char *interface, unsigned s
|
|||||||
bool
|
bool
|
||||||
TransporterRegistry::start_service(SocketServer& socket_server)
|
TransporterRegistry::start_service(SocketServer& socket_server)
|
||||||
{
|
{
|
||||||
if (m_transporter_interface.size() > 0 && nodeIdSpecified != true)
|
if (m_transporter_interface.size() > 0 && !nodeIdSpecified)
|
||||||
{
|
{
|
||||||
ndbout_c("TransporterRegistry::startReceiving: localNodeId not specified");
|
ndbout_c("TransporterRegistry::startReceiving: localNodeId not specified");
|
||||||
return false;
|
return false;
|
||||||
|
@ -380,16 +380,16 @@ public:
|
|||||||
Uint32 subId,
|
Uint32 subId,
|
||||||
Uint32 subKey,
|
Uint32 subKey,
|
||||||
BlockReference to,
|
BlockReference to,
|
||||||
GrepError::Code err);
|
GrepError::GE_Code err);
|
||||||
|
|
||||||
|
|
||||||
void sendSubRemoveRef_SS(Signal * signal,
|
void sendSubRemoveRef_SS(Signal * signal,
|
||||||
SubCoordinator sub,
|
SubCoordinator sub,
|
||||||
GrepError::Code err);
|
GrepError::GE_Code err);
|
||||||
|
|
||||||
void sendRefToSS(Signal * signal,
|
void sendRefToSS(Signal * signal,
|
||||||
SubCoordinator sub,
|
SubCoordinator sub,
|
||||||
GrepError::Code err,
|
GrepError::GE_Code err,
|
||||||
SubscriptionData::Part part = (SubscriptionData::Part)0);
|
SubscriptionData::Part part = (SubscriptionData::Part)0);
|
||||||
|
|
||||||
void setRepRef(BlockReference rr) { m_repRef = rr; };
|
void setRepRef(BlockReference rr) { m_repRef = rr; };
|
||||||
@ -496,7 +496,7 @@ public:
|
|||||||
|
|
||||||
void sendRefToPSCoord(Signal * signal,
|
void sendRefToPSCoord(Signal * signal,
|
||||||
Subscription sub,
|
Subscription sub,
|
||||||
GrepError::Code err,
|
GrepError::GE_Code err,
|
||||||
SubscriptionData::Part part = (SubscriptionData::Part)0);
|
SubscriptionData::Part part = (SubscriptionData::Part)0);
|
||||||
|
|
||||||
//protected:
|
//protected:
|
||||||
|
@ -556,7 +556,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
|
|||||||
noOfDBNodes++; // No of NDB processes
|
noOfDBNodes++; // No of NDB processes
|
||||||
|
|
||||||
if(nodeId > MAX_NDB_NODES){
|
if(nodeId > MAX_NDB_NODES){
|
||||||
snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
|
BaseString::snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
|
||||||
MAX_NDB_NODES);
|
MAX_NDB_NODES);
|
||||||
ERROR_SET(fatal, ERR_INVALID_CONFIG, msg, buf);
|
ERROR_SET(fatal, ERR_INVALID_CONFIG, msg, buf);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <ndb_types.h>
|
#include <ndb_types.h>
|
||||||
|
|
||||||
class ConfigRetriever;
|
class ConfigRetriever;
|
||||||
class LocalConfig;
|
struct LocalConfig;
|
||||||
|
|
||||||
class Configuration {
|
class Configuration {
|
||||||
public:
|
public:
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "LongSignal.hpp"
|
#include "LongSignal.hpp"
|
||||||
|
|
||||||
SimplePropertiesSectionReader::SimplePropertiesSectionReader
|
SimplePropertiesSectionReader::SimplePropertiesSectionReader
|
||||||
(class SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
|
(struct SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
|
||||||
: m_pool(pool)
|
: m_pool(pool)
|
||||||
{
|
{
|
||||||
if(ptr.p == 0){
|
if(ptr.p == 0){
|
||||||
@ -190,7 +190,7 @@ SimplePropertiesSectionWriter::putWords(const Uint32 * src, Uint32 len){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SimplePropertiesSectionWriter::getPtr(class SegmentedSectionPtr & dst){
|
SimplePropertiesSectionWriter::getPtr(struct SegmentedSectionPtr & dst){
|
||||||
// Set last ptr and size
|
// Set last ptr and size
|
||||||
if(m_pos >= 0){
|
if(m_pos >= 0){
|
||||||
dst.p = m_head;
|
dst.p = m_head;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <ndb_types.h>
|
||||||
#include <mgmapi.h>
|
#include <mgmapi.h>
|
||||||
#include "mgmapi_configuration.hpp"
|
#include "mgmapi_configuration.hpp"
|
||||||
#include <new>
|
#include <new>
|
||||||
@ -138,7 +139,7 @@ ndb_mgm_get_int_parameter(const ndb_mgm_configuration_iterator* iter,
|
|||||||
extern "C"
|
extern "C"
|
||||||
int
|
int
|
||||||
ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator* iter,
|
ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator* iter,
|
||||||
int param, unsigned long long * value){
|
int param, Uint64 * value){
|
||||||
return iter->get(param, value);
|
return iter->get(param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ struct ndb_mgm_configuration_iterator {
|
|||||||
int find(int param, unsigned value);
|
int find(int param, unsigned value);
|
||||||
|
|
||||||
int get(int param, unsigned * value) const ;
|
int get(int param, unsigned * value) const ;
|
||||||
int get(int param, unsigned long long * value) const ;
|
int get(int param, Uint64 * value) const ;
|
||||||
int get(int param, const char ** value) const ;
|
int get(int param, const char ** value) const ;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -38,11 +38,11 @@ static const char* UNDEFINED = 0; // Default value for undefined
|
|||||||
*/
|
*/
|
||||||
class ConfigInfo {
|
class ConfigInfo {
|
||||||
public:
|
public:
|
||||||
enum Type { BOOL, INT, INT64, STRING, SECTION };
|
enum Type { CI_BOOL, CI_INT, CI_INT64, CI_STRING, CI_SECTION };
|
||||||
enum Status { USED, ///< Active
|
enum Status { CI_USED, ///< Active
|
||||||
DEPRICATED, ///< Can be, but shouldn't
|
CI_DEPRICATED, ///< Can be, but shouldn't
|
||||||
NOTIMPLEMENTED, ///< Is ignored.
|
CI_NOTIMPLEMENTED, ///< Is ignored.
|
||||||
INTERNAL ///< Not configurable by the user
|
CI_INTERNAL ///< Not configurable by the user
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +22,7 @@ Name: Ndb.cpp
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <ndb_global.h>
|
#include <ndb_global.h>
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "NdbApiSignal.hpp"
|
#include "NdbApiSignal.hpp"
|
||||||
#include "NdbImpl.hpp"
|
#include "NdbImpl.hpp"
|
||||||
|
@ -107,7 +107,7 @@ Uint32 convertEndian(Uint32 Data);
|
|||||||
enum WaitSignalType {
|
enum WaitSignalType {
|
||||||
NO_WAIT = 0,
|
NO_WAIT = 0,
|
||||||
WAIT_NODE_FAILURE = 1, // Node failure during wait
|
WAIT_NODE_FAILURE = 1, // Node failure during wait
|
||||||
WAIT_TIMEOUT = 2, // Timeout during wait
|
WST_WAIT_TIMEOUT = 2, // Timeout during wait
|
||||||
|
|
||||||
WAIT_TC_SEIZE = 3,
|
WAIT_TC_SEIZE = 3,
|
||||||
WAIT_TC_RELEASE = 4,
|
WAIT_TC_RELEASE = 4,
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
class NdbObjectIdMap //: NdbLockable
|
class NdbObjectIdMap //: NdbLockable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
STATIC_CONST( InvalidId = ~0 );
|
STATIC_CONST( InvalidId = ~(Uint32)0 );
|
||||||
NdbObjectIdMap(Uint32 initalSize = 128, Uint32 expandSize = 10);
|
NdbObjectIdMap(Uint32 initalSize = 128, Uint32 expandSize = 10);
|
||||||
~NdbObjectIdMap();
|
~NdbObjectIdMap();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user