You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by an...@apache.org on 2017/09/07 01:55:00 UTC
[06/30] incubator-trafodion git commit: TRAFODION-2731 CodeCleanup:
Remove obsolete, legacy and unused code
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_interval.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_interval.h b/core/sql/exp/exp_interval.h
index 420f48b..4096b3f 100644
--- a/core/sql/exp/exp_interval.h
+++ b/core/sql/exp/exp_interval.h
@@ -43,25 +43,21 @@
#include "exp_attrs.h"
#include "dfs2rec.h"
-class SQLEXP_LIB_FUNC ExpInterval : public SimpleType {
+class ExpInterval : public SimpleType {
public:
-NA_EIDPROC
static short getIntervalStartField(Lng32 fsDatatype,
rec_datetime_field &startField);
-NA_EIDPROC
static short getIntervalEndField(Lng32 fsDatatype,
rec_datetime_field &endField);
-NA_EIDPROC
static Lng32 getStorageSize(rec_datetime_field startField,
UInt32 leadingPrecision,
rec_datetime_field endField,
UInt32 fractionPrecision = 0);
-NA_EIDPROC
static Lng32 getDisplaySize(Lng32 fsDatatype,
short leadingPrecision,
short fractionPrecision);
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_like.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_like.h b/core/sql/exp/exp_like.h
index 2c4f902..bd5a69d 100644
--- a/core/sql/exp/exp_like.h
+++ b/core/sql/exp/exp_like.h
@@ -44,13 +44,12 @@
#include "csconvert.h"
#include "NLSConversion.h"
-class SQLEXP_LIB_FUNC LikePatternString : public NABasicObject
+class LikePatternString : public NABasicObject
{
public:
//
// Constructor.
//
-NA_EIDPROC
LikePatternString
( const char* pattern
, UInt16 patternLen
@@ -75,14 +74,12 @@ NA_EIDPROC
, underscoreChar_len_(underscoreChar_len)
{}
-NA_EIDPROC
~LikePatternString() {}
//
// Accessor functions.
//
CharInfo::CharSet getPatternCharSet() const { return patternCS_ ; }
-NA_EIDPROC
UInt16 getLength() const { return patternLen_; }
private:
const char* pattern_;
@@ -100,14 +97,13 @@ private:
};
-class SQLEXP_LIB_FUNC LikePatternStringIterator
+class LikePatternStringIterator
{
public:
//
// Construct an iterator that points to the first character in the given
// pattern.
//
-NA_EIDPROC
LikePatternStringIterator
( const LikePatternString& pattern
)
@@ -116,7 +112,6 @@ NA_EIDPROC
{
determineCharType();
}
-NA_EIDPROC
~LikePatternStringIterator() {}
//
// Determine the current character's classification.
@@ -128,7 +123,6 @@ NA_EIDPROC
, PERCENT
, CharType_ERROR
};
-NA_EIDPROC
void determineCharType()
{
if (currentChar_ >= pattern_.endOfPattern_)
@@ -165,16 +159,13 @@ NA_EIDPROC
//
// Accessor functions.
//
-NA_EIDPROC
operator CharType() const { return charType_; }
-NA_EIDPROC
const char* getCurrentChar()
{
return currentChar_;
}
-NA_EIDPROC
Int16 getChar(char* ch) const
{
Int16 chrLen = pattern_.bytesPerChar_;
@@ -198,13 +189,11 @@ NA_EIDPROC
return( chrLen );
}
-NA_EIDPROC
UInt16 getBytesPerChar() const { return pattern_.bytesPerChar_; }
//
// Return TRUE if the current character is equal to the given character.
//
-NA_EIDPROC
NABoolean thisCharIsEqualTo(const char* ch, const UInt16 ch_len) const
{
if ( currentChar_ + ch_len > pattern_.endOfPattern_ )
@@ -218,7 +207,6 @@ NA_EIDPROC
// Advance to the next character in the pattern.
//
-NA_EIDPROC
void operator += (Int32 numBytesToAdd)
{
currentChar_ += numBytesToAdd;
@@ -310,13 +298,12 @@ LikePatternString "%%ABC__%%%DEF%" is represented as:
******************************************************************************/
-class SQLEXP_LIB_FUNC LikePatternClause : public NABasicObject
+class LikePatternClause : public NABasicObject
{
public:
//
// Constructor.
//
-NA_EIDPROC
LikePatternClause
( LikePatternStringIterator::CharType charType
, char* patternBuf
@@ -330,30 +317,22 @@ NA_EIDPROC
, encodedPattern_(NULL)
{}
-NA_EIDPROC
~LikePatternClause() {}
//
// Accessor functions.
//
-NA_EIDPROC
LikePatternStringIterator::CharType getType() const { return charType_; }
-NA_EIDPROC
char* getPattern() const { return pattern_; }
-NA_EIDPROC
UInt16 getLength() const { return length_; }
-NA_EIDPROC
void setLength(UInt16 length)
{ length_ = length; }
-NA_EIDPROC
LikePatternClause* getNextClause() const { return nextClause_; }
-NA_EIDPROC
LikePatternClause* getPreviousClause() const { return previousClause_; }
//
// Set the clause's character classification. It indicates the type of
// character that will be stored in the clause.
//
-NA_EIDPROC
void setType(LikePatternStringIterator::CharType charType)
{
charType_ = charType;
@@ -361,7 +340,6 @@ NA_EIDPROC
//
// Append the given character to the clause.
//
-NA_EIDPROC
void append(const LikePatternStringIterator& i)
{
length_ += i.getChar(getPattern() + getLength());
@@ -369,7 +347,6 @@ NA_EIDPROC
//
// Append the given clause to the current clause.
//
-NA_EIDPROC
void append(LikePatternClause* clause)
{
nextClause_ = clause;
@@ -378,22 +355,17 @@ NA_EIDPROC
//
// Return TRUE if the clause matches the given text.
//
-NA_EIDPROC
NABoolean matches(const char* text);
-NA_EIDPROC
CharInfo::Collation getCollation() const
{ return co_; }
-NA_EIDPROC
void setCollation(CharInfo::Collation collation)
{ co_ = collation; }
-NA_EIDPROC
unsigned char* getEncodedPattern()
{ return encodedPattern_; }
-NA_EIDPROC
void setEncodedPattern(unsigned char* encodedPattern)
{ encodedPattern_ = encodedPattern; }
@@ -415,13 +387,12 @@ private:
};
-class SQLEXP_LIB_FUNC LikePatternHeader : public LikePatternClause
+class LikePatternHeader : public LikePatternClause
{
public:
//
// Constructor.
//
-NA_EIDPROC
LikePatternHeader
( LikePatternStringIterator::CharType charType
, char* patternBuf
@@ -440,7 +411,6 @@ NA_EIDPROC
//
// Destructor.
//
-NA_EIDPROC
~LikePatternHeader()
{
// If we have allocated space for encodedHeader, deallocate it.
@@ -459,21 +429,15 @@ NA_EIDPROC
//
// Accessor functions.
//
-NA_EIDPROC
LikePatternClause* getLastClause() const { return lastClause_; }
-NA_EIDPROC
UInt16 getLength() const { return length_; }
-NA_EIDPROC
UInt16 getClauseLength() const
{ return ((LikePatternClause *)this)->getLength(); }
-NA_EIDPROC
LikePatternHeader* getNextHeader() const { return nextHeader_; }
-NA_EIDPROC
CollHeap* getExHeap() const { return exHeap_; }
//
// Append the given character to the header.
//
-NA_EIDPROC
void append(const LikePatternStringIterator& i)
{
if (i != getLastClause()->getType()) {
@@ -487,7 +451,6 @@ NA_EIDPROC
//
// Append a new clause to the header.
//
-NA_EIDPROC
void addNewClause(LikePatternStringIterator::CharType charType)
{
length_ += getLastClause()->getLength();
@@ -500,7 +463,6 @@ NA_EIDPROC
// Terminate the clause chain with a NULL pointer and compute the header
// length.
//
-NA_EIDPROC
void endClauses()
{
length_ += getLastClause()->getLength();
@@ -508,32 +470,25 @@ NA_EIDPROC
//
// Append the given header to the current header.
//
-NA_EIDPROC
void append(LikePatternHeader* header) { nextHeader_ = header; }
//
// Return TRUE if the header matches the beginning of the given text.
//
-NA_EIDPROC
NABoolean matches(const char* text,
Int32 &headerMatchLen,
CharInfo::CharSet cs = CharInfo::ISO88591);
-NA_EIDPROC
NABoolean matchesR(const char* text, const char* &endText,
CharInfo::CharSet cs = CharInfo::ISO88591);
-NA_EIDPROC
ExeErrorCode error() const { return error_; }
-NA_EIDPROC
void setError(ExeErrorCode exeErrorCode)
{ error_ = exeErrorCode; }
-NA_EIDPROC
unsigned char* getEncodedHeader()
{ return encodedHeader_; }
-NA_EIDPROC
void setEncodedHeader(unsigned char *encodedHeader)
{ encodedHeader_ = encodedHeader; }
@@ -551,13 +506,12 @@ private:
};
-class SQLEXP_LIB_FUNC LikePattern : public LikePatternHeader
+class LikePattern : public LikePatternHeader
{
public:
//
// Constructor.
//
-NA_EIDPROC
LikePattern
( const LikePatternString& pattern
, CollHeap* exHeap
@@ -567,17 +521,14 @@ NA_EIDPROC
//
// Destructor.
//
-NA_EIDPROC
~LikePattern();
//
// Return TRUE if the pattern is invalid.
//
-NA_EIDPROC
ExeErrorCode error() const { return error_; }
//
// Return TRUE if the pattern matches the given text string.
//
-NA_EIDPROC
NABoolean matches(const char* text, UInt16 textLen,
CharInfo::CharSet cs = CharInfo::ISO88591);
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_math_func.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_math_func.cpp b/core/sql/exp/exp_math_func.cpp
index b4c9778..3ef09ca 100644
--- a/core/sql/exp/exp_math_func.cpp
+++ b/core/sql/exp/exp_math_func.cpp
@@ -76,14 +76,12 @@
#define HUGE_VAL_REAL64 1.15792089237316192E+77
#define HUGE_VAL_INT64 0777777777777777777777
-NA_EIDPROC
ex_expr::exp_return_type convInt64ToDec(char *target,
Lng32 targetLen,
Int64 source,
CollHeap *heap,
ComDiagsArea** diagsArea);
-NA_EIDPROC
ex_expr::exp_return_type convDoubleToBigNum(char *target,
Lng32 targetLen,
Lng32 targetType,
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_math_func.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_math_func.h b/core/sql/exp/exp_math_func.h
index e83da65..ccf300b 100644
--- a/core/sql/exp/exp_math_func.h
+++ b/core/sql/exp/exp_math_func.h
@@ -44,49 +44,45 @@
#pragma warning ( disable : 4251 )
-class SQLEXP_LIB_FUNC ex_function_abs : public ex_function_clause {
+class ex_function_abs : public ex_function_clause {
public:
-NA_EIDPROC
ex_function_abs(OperatorTypeEnum oper_type,
Attributes ** attr, Space * space)
: ex_function_clause(oper_type, 2, attr, space)
{};
-NA_EIDPROC
ex_function_abs()
{
};
-NA_EIDPROC
ex_expr::exp_return_type eval(char *op_data[],
CollHeap*,
ComDiagsArea** diagsArea = 0);
// Display
//
- NA_EIDPROC virtual void displayContents(Space * space, const char * displayStr,
+ virtual void displayContents(Space * space, const char * displayStr,
Int32 clauseNum, char * constsArea);
// ---------------------------------------------------------------------
// Redefinition of methods inherited from NAVersionedObject.
// ---------------------------------------------------------------------
- NA_EIDPROC virtual unsigned char getClassVersionID()
+ virtual unsigned char getClassVersionID()
{
return 1;
}
- NA_EIDPROC virtual void populateImageVersionIDArray()
+ virtual void populateImageVersionIDArray()
{
setImageVersionID(2,getClassVersionID());
ex_function_clause::populateImageVersionIDArray();
}
- NA_EIDPROC virtual short getClassSize() { return (short)sizeof(*this); }
+ virtual short getClassSize() { return (short)sizeof(*this); }
// ---------------------------------------------------------------------
};
-class SQLEXP_LIB_FUNC ExFunctionBitOper : public ex_function_clause {
+class ExFunctionBitOper : public ex_function_clause {
public:
-NA_EIDPROC
ExFunctionBitOper(OperatorTypeEnum oper_type, short numOperands,
Attributes ** attr, Space * space)
: ex_function_clause(oper_type, numOperands, attr, space)
@@ -94,44 +90,41 @@ NA_EIDPROC
setType(ex_clause::MATH_FUNCTION_TYPE);
};
- NA_EIDPROC
ExFunctionBitOper()
{
};
- NA_EIDPROC ex_expr::exp_return_type pCodeGenerate(Space *space, UInt32 f);
+ ex_expr::exp_return_type pCodeGenerate(Space *space, UInt32 f);
-NA_EIDPROC
ex_expr::exp_return_type eval(char *op_data[],
CollHeap*,
ComDiagsArea** diagsArea = 0);
// Display
//
- NA_EIDPROC virtual void displayContents(Space * space, const char * displayStr,
+ virtual void displayContents(Space * space, const char * displayStr,
Int32 clauseNum, char * constsArea);
// ---------------------------------------------------------------------
// Redefinition of methods inherited from NAVersionedObject.
// ---------------------------------------------------------------------
- NA_EIDPROC virtual unsigned char getClassVersionID()
+ virtual unsigned char getClassVersionID()
{
return 1;
}
- NA_EIDPROC virtual void populateImageVersionIDArray()
+ virtual void populateImageVersionIDArray()
{
setImageVersionID(2,getClassVersionID());
ex_function_clause::populateImageVersionIDArray();
}
- NA_EIDPROC virtual short getClassSize() { return (short)sizeof(*this); }
+ virtual short getClassSize() { return (short)sizeof(*this); }
// ---------------------------------------------------------------------
};
-class SQLEXP_LIB_FUNC ExFunctionMath : public ex_function_clause {
+class ExFunctionMath : public ex_function_clause {
public:
-NA_EIDPROC
ExFunctionMath(OperatorTypeEnum oper_type, short numOperands,
Attributes ** attr, Space * space)
: ex_function_clause(oper_type, numOperands, attr, space)
@@ -139,43 +132,40 @@ NA_EIDPROC
setType(ex_clause::MATH_FUNCTION_TYPE);
};
-NA_EIDPROC
ExFunctionMath()
: ex_function_clause()
{
};
-NA_EIDPROC
ex_expr::exp_return_type eval(char *op_data[],
CollHeap*,
ComDiagsArea** diagsArea = 0);
-NA_EIDPROC
ex_expr::exp_return_type evalUnsupportedOperations(char *op_data[],
CollHeap *heap,
ComDiagsArea** diagsArea);
// Display
//
- NA_EIDPROC virtual void displayContents(Space * space, const char * displayStr,
+ virtual void displayContents(Space * space, const char * displayStr,
Int32 clauseNum, char * constsArea);
// ---------------------------------------------------------------------
// Redefinition of methods inherited from NAVersionedObject.
// ---------------------------------------------------------------------
- NA_EIDPROC virtual unsigned char getClassVersionID()
+ virtual unsigned char getClassVersionID()
{
return 1;
}
- NA_EIDPROC virtual void populateImageVersionIDArray()
+ virtual void populateImageVersionIDArray()
{
setImageVersionID(2,getClassVersionID());
ex_function_clause::populateImageVersionIDArray();
}
- NA_EIDPROC virtual short getClassSize() { return (short)sizeof(*this); }
+ virtual short getClassSize() { return (short)sizeof(*this); }
// ---------------------------------------------------------------------
};
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_space.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_space.cpp b/core/sql/exp/exp_space.cpp
index 75ac872..a50915e 100644
--- a/core/sql/exp/exp_space.cpp
+++ b/core/sql/exp/exp_space.cpp
@@ -36,9 +36,7 @@
#include <limits.h>
-#ifndef __EID
#include <stdlib.h>
-#endif
#include "NAAssert.h"
#include "exp_space.h"
@@ -62,9 +60,6 @@ Space::~Space()
Block * currBlock = firstBlock_;
switch (type_)
{
- case DP2_SPACE:
- break;
-
case EXECUTOR_SPACE:
{
// later change it to deallocate from executor segment. TBD.
@@ -72,10 +67,7 @@ Space::~Space()
{
Block * nextBlock = currBlock->getNext();
-#ifndef __EID
free(currBlock);
-
-#endif
currBlock = nextBlock;
}
}
@@ -87,10 +79,7 @@ Space::~Space()
{
Block * nextBlock = currBlock->getNext();
-#ifndef __EID
free(currBlock);
-
-#endif
currBlock = nextBlock;
}
}
@@ -105,10 +94,6 @@ Lng32 Space::defaultBlockSize(SpaceType type)
// use default size
switch (type)
{
- case DP2_SPACE:
- block_size = DP2_BLOCK_MAX_SIZE;
- break;
-
case EXECUTOR_SPACE:
block_size = EXECUTOR_BLOCK_MAX_SIZE;
break;
@@ -141,35 +126,11 @@ Block * Space::allocateBlock(SpaceType type, Lng32 in_block_size)
switch (type)
{
- case DP2_SPACE:
- {
-#ifdef __EID
- short rc;
- Lng32 memaddr;
-
- rc = DP2_EXECUTOR_ADD_MEMORY (block_size,
- &memaddr);
-
- block_ptr = (char *)memaddr + sizeof(SSCB_Buffer_Struct);
- data_ptr
- = (char *)(memaddr + sizeof(SSCB_Buffer_Struct) +
- ((((sizeof(Block)-1)/8)+1)*8));
- data_size
- = block_size - (sizeof(SSCB_Buffer_Struct) +
- ((((sizeof(Block)-1)/8)+1)*8));
-#else
- block_ptr = NULL;
-#endif
- }
- break;
-
case EXECUTOR_SPACE:
{
// allocate space from executor extended segment. TBD.
// For now, get it from system space.
-#ifndef __EID
block_ptr = (char *)malloc(block_size);
-#endif
data_ptr = block_ptr + ((((sizeof(Block)-1)/8)+1)*8);
data_size = block_size - ((((sizeof(Block)-1)/8)+1)*8);
}
@@ -178,9 +139,7 @@ Block * Space::allocateBlock(SpaceType type, Lng32 in_block_size)
case SYSTEM_SPACE:
{
// allocate space from system heap.
-#ifndef __EID
block_ptr = (char *)malloc(block_size);
-#endif
data_ptr = block_ptr + ((((sizeof(Block)-1)/8)+1)*8);
data_size = block_size - ((((sizeof(Block)-1)/8)+1)*8);
@@ -273,18 +232,10 @@ char *Space::allocateAndCopyToAlignedSpace(const char* dp,
assert(dlen <= USHRT_MAX); // NT_PORT ( bd 10/30/96 ) added missing semicolon
*(short *)rp = dlen;
break;
-#ifdef NA_64BIT
- // dg64 - Use correct MAX
case sizeof(Int32):
assert(dlen <= UINT_MAX); // NT_PORT ( bd 10/30/96 ) added missing semicolon
*(Int32 *)rp = dlen;
break;
-#else
- case sizeof(Lng32):
- assert(dlen <= ULONG_MAX); // NT_PORT ( bd 10/30/96 ) added missing semicolon
- *(Lng32 *)rp = dlen;
- break;
-#endif
default:
assert(0==1);
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_stdh.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_stdh.h b/core/sql/exp/exp_stdh.h
index fc331f0..2c317cb 100644
--- a/core/sql/exp/exp_stdh.h
+++ b/core/sql/exp/exp_stdh.h
@@ -40,11 +40,11 @@
#include "SqlExpDllDefines.h"
#include "Platform.h"
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
-#endif // NA_DEBUG_C_RUNTIME
+#endif // _DEBUG
#include "ComPackDefs.h"
#include "dfs2rec.h"
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_tuple_desc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_tuple_desc.cpp b/core/sql/exp/exp_tuple_desc.cpp
index c529551..e60c7ee 100644
--- a/core/sql/exp/exp_tuple_desc.cpp
+++ b/core/sql/exp/exp_tuple_desc.cpp
@@ -147,7 +147,6 @@ ExpTupleDesc::~ExpTupleDesc()
// columns. The added columns follow the original fixed columns and are NOT
// ordered on their byte boundary, but put in the list in the order they
// were added.
-NA_EIDPROC
static Int16 orderFixedFieldsByAlignment( Attributes ** attrs,
NAList<UInt32> * fixedFields)
{
@@ -243,7 +242,7 @@ Int16 ExpTupleDesc::computeOffsets(Attributes * attr,
}
// This code is the same for fixed fields and GuOutput fields.
-NA_EIDPROC static
+static
void computeOffsetOfFixedField(Attributes ** attrs,
UInt32 fieldIdx,
UInt32 bitmapOffset,
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_tuple_desc.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_tuple_desc.h b/core/sql/exp/exp_tuple_desc.h
index aa4838c..b9a75a5 100644
--- a/core/sql/exp/exp_tuple_desc.h
+++ b/core/sql/exp/exp_tuple_desc.h
@@ -69,7 +69,7 @@ typedef NAVersionedObjectPtrArrayTempl<AttributesPtr> AttributesPtrPtr;
// Size of each VOA array entry for SQLMX_FORMAT.
// The SQLMX_ALIGNED_FORMAT has its own constant in ExpAlignedFormat.h
static const UInt32 ExpVoaSize = sizeof(Int32);
-static const UInt32 ExpOffsetMax = UINT_MAX; // NA_64BIT
+static const UInt32 ExpOffsetMax = UINT_MAX;
////////////////////////////////////////////////////////////////////
@@ -77,7 +77,7 @@ static const UInt32 ExpOffsetMax = UINT_MAX; // NA_64BIT
// class ExpTupleDesc
//
////////////////////////////////////////////////////////////////////
-class SQLEXP_LIB_FUNC ExpTupleDesc : public NAVersionedObject
+class ExpTupleDesc : public NAVersionedObject
{
public:
//
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/ComDiags.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/ComDiags.cpp b/core/sql/export/ComDiags.cpp
index 48b7814..41dab6f 100644
--- a/core/sql/export/ComDiags.cpp
+++ b/core/sql/export/ComDiags.cpp
@@ -45,19 +45,17 @@
#include "Int64.h"
#include "ExpError.h"
-#ifndef __EID
#include "seabed/ms.h"
#include <stdlib.h>
#include <unistd.h>
extern void releaseRTSSemaphore(); // Functions implemented in SqlStats.cpp
#include "logmxevent.h"
-#endif
#include <byteswap.h>
#include "ComRtUtils.h"
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
#include <time.h>
#include <sys/time.h>
#include "PortProcessCalls.h"
@@ -67,7 +65,7 @@ extern void releaseRTSSemaphore(); // Functions implemented in SqlStats.cpp
// This is a "helper" function that factors out a bunch of code
// from the packedLength() routines.
-NA_EIDPROC static
+static
inline void advanceSize(IpcMessageObjSize &size, const char * const buffPtr)
{
const Int32 lenSize = sizeof( Lng32);
@@ -77,7 +75,7 @@ inline void advanceSize(IpcMessageObjSize &size, const char * const buffPtr)
}
//UR2
-NA_EIDPROC static
+static
inline void advanceSize(IpcMessageObjSize &size, const NAWchar * const buffPtr)
{
const Int32 lenSize = sizeof( Lng32);
@@ -88,7 +86,6 @@ inline void advanceSize(IpcMessageObjSize &size, const NAWchar * const buffPtr)
-// NA_EIDPROC
// static NABoolean isValidIsoMappingCharSet(CharInfo::CharSet cs)
// {
// if (cs == CharInfo::ISO88591 ||
@@ -99,16 +96,12 @@ inline void advanceSize(IpcMessageObjSize &size, const NAWchar * const buffPtr)
// return FALSE;
// }
-NA_EIDPROC
static NABoolean isSingleByteCharSet(CharInfo::CharSet cs)
{
if (cs == CharInfo::ISO88591) return TRUE;
if (cs == CharInfo::UTF8) return TRUE; // is variable-length/width multi-byte char-set but treat it as a C/C++ string
if (cs == CharInfo::SJIS) return TRUE; // is variable-length/width multi-byte char-set but treat it as a C/C++ string
if (cs == CharInfo::UNICODE) return FALSE;
-#if defined(NA_NO_C_RUNTIME) || defined(__EID)
- return TRUE; // in exe and DP2, everything else is a single-byte cs
-#else
// a "mini-cache" to avoid proc call, for performance.
static THREAD_P CharInfo::CharSet cachedCS = CharInfo::UnknownCharSet;
@@ -119,7 +112,6 @@ static NABoolean isSingleByteCharSet(CharInfo::CharSet cs)
cachedSByte = (CharInfo::maxBytesPerChar(cs) == 1);
}
return cachedSByte;
-#endif
}
@@ -171,11 +163,7 @@ ComCondition::ComCondition (CollHeap* heapPtr) :
// Make sure the size of ComCondition remains constant
// If you hit this after change or add new member, adjust the fillers_ size
Int32 classSize = sizeof(ComCondition);
-#ifdef NA_64BIT
assert(classSize == 376);
-#else
- assert(classSize == 264);
-#endif
}
ComCondition::ComCondition () :
@@ -221,11 +209,7 @@ ComCondition::ComCondition () :
// Make sure the size of ComCondition remains constant
// If you hit this after change or add new member, adjust the fillers_ size
Int32 classSize = sizeof(ComCondition);
-#ifdef NA_64BIT
assert(classSize == 376);
-#else
- assert(classSize == 264);
-#endif
}
// The destructor must free all of the char buffers which
@@ -1350,15 +1334,10 @@ void ComCondition::setConditionNumber(ComDiagBigInt newCondition)
conditionNumber_ = newCondition;
}
-#ifndef __EID
-#endif // no __EID
-
void ComCondition::setSQLCODE (Lng32 newSQLCODE)
{
theSQLCODE_ = newSQLCODE;
-#ifndef __EID
-
if ( ! (theSQLCODE_ < 0) ) return; // if not an error return
Lng32 theError = (theSQLCODE_ < 0) ? -theSQLCODE_ : theSQLCODE_;
@@ -1377,7 +1356,7 @@ void ComCondition::setSQLCODE (Lng32 newSQLCODE)
while ( loopError ) // To exit loop in gdb do: set var loopError=0
{
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
// In the debug build, notify the user we are looping by
// printing to stdout every 60 seconds
if (loopCount % 20 == 0)
@@ -1464,9 +1443,6 @@ void ComCondition::setSQLCODE (Lng32 newSQLCODE)
genLinuxCorefile( (char *)
"Generating core-file to capture internal error scenario.");
}
-// LCOV_EXCL_STOP
-
-#endif // no __EID
}
void ComCondition::setRowNumber( Lng32 newRowNumber)
@@ -1478,8 +1454,6 @@ void ComCondition::setNskCode( Lng32 newNskCode)
{
nskCode_ = newNskCode;
-#ifndef __EID
- // LCOV_EXCL_START
char *reqErrorStr = NULL;
Lng32 reqError = 0;
@@ -1521,8 +1495,6 @@ void ComCondition::setNskCode( Lng32 newNskCode)
abort(); // dump core
}
}
- // LCOV_EXCL_STOP
-#endif // no __EID
}
// Getting and Setting the Optional Parameters
@@ -1661,12 +1633,7 @@ ComDiagsArea::ComDiagsArea (CollHeap* ptr): IpcMessageObj(IPC_SQL_DIAG_AREA,0),
// Make sure the size of ComDiagsArea remains constant
// If you hit this after change or add new member, adjust the fillers_ size
Int32 classSize = sizeof(ComDiagsArea);
-#ifdef NA_64BIT
- // dg64 - size changed
assert(classSize == 328);
-#else
- assert(classSize == 240);
-#endif
}
ComDiagsArea::ComDiagsArea () : IpcMessageObj(IPC_SQL_DIAG_AREA,0),
@@ -1691,13 +1658,8 @@ ComDiagsArea::ComDiagsArea () : IpcMessageObj(IPC_SQL_DIAG_AREA,0),
Int32 classSize = sizeof(ComDiagsArea);
-#ifndef NA_64BIT
- assert(classSize == 240);
-#else
// if (classSize != 320) printf("classSize=%d @ %d\n", classSize, __LINE__);
- // dg64 - size changed
assert(classSize == 328);
-#endif
}
@@ -2081,7 +2043,7 @@ IpcMessageObjSize ComDiagsArea::packObjIntoMessage(char* buffer,
short num = (short) errors_.entries();
short numToPack = num;
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
// In the debug build we allow the UDR server to generate a corrupt
// packed object. This allows us to test error handling in the
// executor. The MXUDR_DEBUG_BUILD variable is always set by the
@@ -2180,7 +2142,7 @@ IpcMessageObjSize ComDiagsArea::packObjIntoMessage32(char* buffer,
short num = (short) errors_.entries();
short numToPack = num;
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
// In the debug build we allow the UDR server to generate a corrupt
// packed object. This allows us to test error handling in the
// executor. The MXUDR_DEBUG_BUILD variable is always set by the
@@ -3168,7 +3130,6 @@ void ComDiagsArea::mergeAfter(const ComDiagsArea& source)
//
// assert( theSQLFunction_ == source.theSQLFunction_);
-#ifndef __EID
// if lengthLimit of source is greater than that of target
// then the target lengthLimit is assigned that of the source.
// Note that NO_LIMIT_ON_ERROR_CONDITIONS
@@ -3180,9 +3141,7 @@ void ComDiagsArea::mergeAfter(const ComDiagsArea& source)
(source.lengthLimit_ > lengthLimit_)) {
lengthLimit_ = source.lengthLimit_ ;
}
-#endif
- // VO, Feb 2004:
// changed to preserve insertion order of the conditions
for (Int32 index = (((nfMark != -1) ? (nfMark+1):1)); index <= source.getNumber(); index++)
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/ComDiags.h
----------------------------------------------------------------------
diff --git a/core/sql/export/ComDiags.h b/core/sql/export/ComDiags.h
index 0ce3c44..13aa97a 100644
--- a/core/sql/export/ComDiags.h
+++ b/core/sql/export/ComDiags.h
@@ -47,9 +47,6 @@
#ifdef min
#undef min
#endif
- #ifdef ERROR
- #undef ERROR
- #endif
#include "BaseTypes.h"
#include "Collections.h"
#include "IpcMessageObj.h"
@@ -58,7 +55,6 @@
#include "NAWinNT.h"
#include "DgBaseType.h"
-#include "SqlExportDllDefines.h"
#include "SqlCliDllDefines.h"
class ComCondition;
@@ -102,7 +98,7 @@ const Int32 ComDiags_TrigActionExceptionSQLCODE = 11028;
typedef Lng32 ComDiagBigInt;
// NOTE:
-// The following group of NA_EIDPROC global functions can be found in
+// The following group of global functions can be found in
// sqlmsg/ComDiagsMsg.cpp.
// We need to be able to map a SQLCODE value to a SQLSTATE value.
@@ -116,16 +112,12 @@ typedef Lng32 ComDiagBigInt;
// class and subclass simply by examining substrings of the returned
// SQLSTATE value.
-NA_EIDPROC
NABoolean ComSQLSTATE(Lng32 theSQLCODE, char *theSQLSTATE);
-NA_EIDPROC
void ComEMSSeverity(Lng32 theSQLCODE, char *theEMSSeverity);
-NA_EIDPROC
void ComEMSEventTarget(Lng32 theSQLCODE, char *theEMSEventTarget, NABoolean forceDialout=FALSE);
-NA_EIDPROC
void ComEMSExperienceLevel(Lng32 theSQLCODE, char *theEMSExperienceLevel);
// Closely tied to the SQLSTATE value itself is the class origin
@@ -134,12 +126,9 @@ void ComEMSExperienceLevel(Lng32 theSQLCODE, char *theEMSExperienceLevel);
// associated with the mapping from SQLCODE to SQLSTATE and the
// functions provide the origin information:
-NA_EIDPROC
const char * ComClassOrigin(Lng32 theSQLCODE);
-NA_EIDPROC
const char * ComSubClassOrigin(Lng32 theSQLCODE);
-NA_EIDPROC
void emitError( Lng32, char *, Lng32, ... );
@@ -224,8 +213,6 @@ public:
MORE_WARNINGS = 2
};
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
ComCondition();
// If you want to dynamically allocate a ComCondition, you can't
@@ -233,12 +220,8 @@ NA_EIDPROC
// to free this object. This is so that we can allow the option of
// this class' user supplying a CollHeap to manage storage.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
static ComCondition *allocate (CollHeap* = NULL);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void deAllocate ();
// The destructor is not declared virtual in order
@@ -253,14 +236,10 @@ NA_EIDPROC
//
// The destructor **does not free** the heap referenced by collHeapPtr_.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
~ComCondition ();
// Here is an assignment operator.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
ComCondition &operator= (const ComCondition&);
// The clear() member function frees all storage used by this class,
@@ -268,8 +247,6 @@ NA_EIDPROC
// other members are "reset" to what they would be just after
// construction.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void clear ();
// We must guarantee of the ComCondition class:
@@ -283,25 +260,15 @@ NA_EIDPROC
// The following three methods are only exported through tdm_sqlcli.dll
// but not tdm_sqlexport.dll due to indirect dependencies on C-run time.
//
-SQLCLI_LIB_FUNC
-NA_EIDPROC
const NAWchar * getMessageText (NABoolean prefixAdded = TRUE);
-SQLCLI_LIB_FUNC
-NA_EIDPROC
const NAWchar * const getMessageText (NABoolean prefixAdded,
CharInfo::CharSet isoMapCS);
-SQLCLI_LIB_FUNC
-NA_EIDPROC
ComDiagBigInt getMessageLength ();
-SQLCLI_LIB_FUNC
-NA_EIDPROC
ComDiagBigInt getMessageOctetLength ();
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
NABoolean isLocked () const;
// We need to provide set and met methods for the data elements
@@ -313,8 +280,6 @@ NA_EIDPROC
// ANSI requires that the returned type be CHARACTER_VARYING(L) where
// L is not less then 128. For our purposes, a const char* will do.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
ComDiagBigInt getConditionNumber () const;
//
@@ -322,89 +287,48 @@ NA_EIDPROC
// but not tdm_sqlexport.dll due to indirect dependencies on C-run time.
//
-SQLCLI_LIB_FUNC
-NA_EIDPROC
void getSQLSTATE (char *theSQLSTATE) const;
-SQLCLI_LIB_FUNC
-NA_EIDPROC
const char * getClassOrigin () const;
-SQLCLI_LIB_FUNC
-NA_EIDPROC
const char * getSubClassOrigin () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getServerName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getConnectionName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getConstraintCatalog () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getConstraintSchema () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getConstraintName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getTriggerCatalog () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getTriggerSchema () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getTriggerName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getCatalogName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getSchemaName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getTableName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getColumnName () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getSqlID () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
Lng32 getRowNumber () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
Lng32 getNskCode () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
+
Lng32 getSQLCODE () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
Lng32 getEMSEventVisits () const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void incrEMSEventVisits ();
@@ -423,80 +347,44 @@ NA_EIDPROC
// the SQLCODE. You *are* allowed to set the SQLCODE.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setConditionNumber (ComDiagBigInt);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setSQLCODE (Lng32);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setServerName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setConnectionName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setConstraintCatalog (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setConstraintSchema (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setConstraintName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setTriggerCatalog (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setTriggerSchema (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setTriggerName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setCatalogName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setSchemaName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setTableName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setCustomSQLState (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const char * getCustomSQLState ()
{
return customSQLState_;
}
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setColumnName (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setSqlID (const char *const);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setRowNumber ( Lng32);
// Next, we declare a set of get and set functions which
@@ -506,13 +394,11 @@ NA_EIDPROC
// is 0...NumOptionalParms-1.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
+
void setNskCode ( Lng32);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
+
NABoolean hasOptionalString (Lng32) const;
// Next, we declare a set of get and set functions which
@@ -520,42 +406,29 @@ NA_EIDPROC
// parameters. It is an assertion failure to call one of these
// get or set functions with the index out of range. The range
// is 0...NumOptionalParms-1.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
+
const char * getOptionalString (Lng32) const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
const NAWchar * getOptionalWString (Lng32) const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
Lng32 getOptionalInteger (Lng32) const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setOptionalString (Lng32, const char* const,
CharInfo::CharSet = CharInfo::ISO88591
);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setOptionalWString (
Lng32, const NAWchar* const
);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
CharInfo::CharSet getOptionalStringCharSet(Lng32) const;
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void setOptionalInteger (Lng32,
Lng32);
@@ -564,51 +437,33 @@ NA_EIDPROC
// class in order to support IPC.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
IpcMessageObjSize packedLength ();
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
IpcMessageObjSize packedLength32 ();
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage (IpcMessageBufferPtr buffer);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage32 (IpcMessageBufferPtr buffer);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage (IpcMessageBufferPtr buffer,
NABoolean swapBytes);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage32 (IpcMessageBufferPtr buffer,
NABoolean swapBytes);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void unpackObj (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void unpackObj32 (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
NABoolean checkObj (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
@@ -619,20 +474,12 @@ protected:
// In support of allocation, creation, and destruction:
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
ComCondition (CollHeap *);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
inline static void *operator new (size_t,CollHeap* = NULL);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
inline static void operator delete (void*);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void destroyMe ();
// For the heap management there is a private data member which is
@@ -695,26 +542,16 @@ private:
// the proper heap to do so.
//
// Apparently we do need to overload this for WINNT.
-SQLEXPORT_LIB_FUNC NA_EIDPROC void assignStringMember(char *& memberBuff, const char *const src);
+void assignStringMember(char *& memberBuff, const char *const src);
// UR2
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
void assignStringMember(NAWchar *& memberBuff, const NAWchar *const src);
// can't touch these:
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
Int32 operator== (const ComCondition&);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC
ComCondition (const ComCondition&);
-
- //#if defined (NA_NSK) && ((SQLEXPORT_LIB)||(SQLEXPORT_LIB_CLIENT))
- //#pragma SRLExportClassMembers ZEXPTSRL *
- //#endif
};
///////////////////////////////////////////////////////////////
@@ -731,7 +568,6 @@ void *ComCondition::operator new(size_t theSize, CollHeap* heapPtr)
return (ComCondition*) ::new char[theSize]; // note: vector
}
-NA_EIDPROC
inline
void ComCondition::operator delete(void *ptr)
{
@@ -894,7 +730,7 @@ NABoolean ComCondition::isLocked () const
// -----------------------------------------------------------------------
#pragma warning( disable : 4251 )
-class SQLEXPORT_LIB_FUNC ComDiagsArea : public IpcMessageObj {
+class ComDiagsArea : public IpcMessageObj {
public:
// For the ``SQL function'' setting and getting operations, we declare
// an enumeration which represents a SQL function. This is entirely
@@ -969,7 +805,6 @@ public:
INVALID_MARK_VALUE = -1
};
-NA_EIDPROC
ComDiagsArea ();
// The destructor is not declared virtual since we
@@ -982,7 +817,6 @@ NA_EIDPROC
//
// The destructor **does not free** the heap referenced by collHeapPtr_.
-NA_EIDPROC
~ComDiagsArea ();
// If you want to dynamically allocate a ComDiagsArea, you can't
@@ -990,11 +824,8 @@ NA_EIDPROC
// to free this object. This is so that we can allow the option of
// this class' user supplying a CollHeap to manage storage.
-NA_EIDPROC
static ComDiagsArea *allocate (CollHeap*);
-NA_EIDPROC
static ComDiagsArea *allocate ();
-NA_EIDPROC
void deAllocate ();
// Copy a ComDiagsArea object. The copy is constructed in the same
@@ -1002,7 +833,6 @@ NA_EIDPROC
// performed, meaning that not only is the top-level object copied,
// but also all nested objects and attributes (except for the embedded
// CollHeap). The reference count of the copy is initialized to one.
-NA_EIDPROC
ComDiagsArea* copy();
@@ -1010,41 +840,26 @@ NA_EIDPROC
// of a ComDiagsArea that is defined in ANSI table 21, in subclause
// 18.1. See also, ``Creating Errors Korrectly.''
-NA_EIDPROC
Lng32 getNumber () const;
-NA_EIDPROC
Lng32 getNumber (DgSqlCode::ErrorOrWarning) const;
-NA_EIDPROC
NABoolean areMore () const;
-NA_EIDPROC
NABoolean canAcceptMoreErrors () const;
-NA_EIDPROC
Int64 getRowCount () const;
-NA_EIDPROC
void setRowCount (Int64);
-NA_EIDPROC
void addRowCount (Int64);
-NA_EIDPROC
ComDiagBigInt getAvgStreamWaitTime () const;
-NA_EIDPROC
void setAvgStreamWaitTime (ComDiagBigInt);
-NA_EIDPROC
double getCost () const;
-NA_EIDPROC
void setCost (double);
-NA_EIDPROC
Lng32 getLengthLimit () const;
-NA_EIDPROC
void setLengthLimit (Lng32);
// This method will set the sqlID attribute of every error condition
// and warning in the diags area that isn't already set.
-NA_EIDPROC
void setAllSqlID (char *);
// This method will set the RowNumber attribute of every error condition
// in the diags area when it called.
-NA_EIDPROC
void setAllRowNumber (Lng32, DgSqlCode::ErrorOrWarning errorOrWarn = DgSqlCode::ERROR_);
// This method will check the RowNumber attribute of every error condition
@@ -1052,29 +867,24 @@ NA_EIDPROC
// In other words it returns the value of the first rowset index that has raised an error
// that is greater than or equal to indexValue.
// If none is found, INVALID_ROWNUMBER will be returned.
-NA_EIDPROC
Lng32 getNextRowNumber (Lng32 indexValue) const;
// this method returns TRUE is rowsetRowCountArray_ is not NULL.
-NA_EIDPROC
NABoolean hasValidRowsetRowCountArray () const;
// this method returns the number of entries in the rowsetRowCountArray_.
// should not exceed run-time size of input rowset. Currently we do not
// support rowset sizes that do not fit into a long datatype.
-NA_EIDPROC
Lng32 numEntriesInRowsetRowCountArray () const;
// this method inserts "value" into the specified index of the rowsetRowCountArray_
// It also handles allocation of the array if this is the first element being inserted
// into the array.
-NA_EIDPROC
void insertIntoRowsetRowCountArray (Lng32 index, Int64 value,
Lng32 arraySize, CollHeap* heapPtr) ;
// this method returns the value in the specified index of rowsetRowCountArray_.
// returns -1 if the index specified is unused.
-NA_EIDPROC
Int64 getValueFromRowsetRowCountArray (Lng32 index) const;
@@ -1083,11 +893,8 @@ NA_EIDPROC
// type. You can also get a char* which is the name of the
// function.
-NA_EIDPROC
void setFunction (FunctionEnum);
-NA_EIDPROC
const char * getFunctionName () const;
-NA_EIDPROC
FunctionEnum getFunction () const;
// To help make it easier to get ComConditions and their data into
@@ -1113,41 +920,33 @@ NA_EIDPROC
// you have not ``accepted'' or ``discarded'' the current new
// ComCondition object.
-NA_EIDPROC
ComCondition * makeNewCondition ();
// mainSQLCODE() returns 0, if there are no ComConditions in
// this ComDiagsArea, and it returns the SQLCODE of the highest
// priority ComCondition otherwise.
-NA_EIDPROC
Lng32 mainSQLCODE () const;
// Returnes the SQLSTATE value of the last SIGNAL statement.
// Assumes the SIGNAL condition is the highest priority error.
-NA_EIDPROC
+
const char *getSignalSQLSTATE () const;
// Removes all ComConditions from this object. One is on their own
// if they mark,clear,acceptNewCondition,rewind.
-NA_EIDPROC
void clear ();
-NA_EIDPROC
void clearConditionsOnly ();
-NA_EIDPROC
void clearErrorConditionsOnly ();
// the next 3 methods are called to set a warning, an EOD indication(100),
// or an error. Useful while debugging to find out when/where an
// error/warning/EOD is being set.
-NA_EIDPROC
void insertNewWarning();
-NA_EIDPROC
void insertNewEODWarning();
-NA_EIDPROC
void insertNewError();
// acceptNewCondition -- inserts the new ComCondition object into the
@@ -1164,7 +963,6 @@ NA_EIDPROC
// An assertion failure will occur if this function is called at a
// time when there is current new condition.
-NA_EIDPROC
void acceptNewCondition ();
@@ -1175,7 +973,6 @@ NA_EIDPROC
// This method destroys that ComCondition object and makes the
// ComDiagsArea ready to create a new ComCondition object.
-NA_EIDPROC
void discardNewCondition ();
// In order to access an element of the sequence of ComCondition
@@ -1183,7 +980,6 @@ NA_EIDPROC
// is in the range 1...getNumber(). Passing an invalid
// index will result in an assertion failure.
-NA_EIDPROC
ComCondition &operator[] (Lng32) const;
@@ -1191,12 +987,9 @@ NA_EIDPROC
// operator, but this method only accesses ComCondition objects in the
// specified list (error or warning).
// index ranges from 1..getNumber(DgSqlCode::WARNING_ or ERROR_)
-NA_EIDPROC
ComCondition* getWarningEntry (Lng32);
-NA_EIDPROC
ComCondition* getErrorEntry (Lng32);
-NA_EIDPROC
ComCondition* findCondition (Lng32 sqlCode, Lng32 *entryNumber=NULL); // return NULL if not found
@@ -1219,7 +1012,6 @@ NA_EIDPROC
//
// Also see global function NegateAllErrors(), elsewhere in this file.
-NA_EIDPROC
void negateCondition (CollIndex);
void negateAllErrors ()
@@ -1238,7 +1030,6 @@ void negateAllWarnings ()
// one. An assertion failure occurs if there exists a new-condition
// (being built by the user) in this ComDiagsArea upon a "mergeAfter."
-NA_EIDPROC
void mergeAfter (const ComDiagsArea&);
// These functions allow you to:
@@ -1251,9 +1042,7 @@ NA_EIDPROC
// The other data members, such as the basic info, of this ComDiagsArea
// remains unaffected by a rewind operation.
-NA_EIDPROC
Lng32 mark () const;
-NA_EIDPROC
void rewind (Lng32 markValue, NABoolean decId=FALSE);
// The rewindAndMerge() method works very much like rewinding.
@@ -1262,7 +1051,6 @@ NA_EIDPROC
// a result of the rewind. If the given object is the same as *this,
// then a simple rewind takes place.
-NA_EIDPROC
void rewindAndMergeIfDifferent (Lng32,ComDiagsArea*);
// The removeFinalCondition100() method is a special purpose method,
@@ -1270,7 +1058,6 @@ NA_EIDPROC
// SQLCODE 100, is added to the context diags area always (?) but
// should not be returned to CLI client after a SELECT INTO or an I/U/D.
-NA_EIDPROC
void removeFinalCondition100();
// The removeLastErrorCondition() method is a special purpose method,
@@ -1278,64 +1065,53 @@ NA_EIDPROC
// If the number of errors raised exceeds this limit then the last condition is removed
// to make space for error -30031.
-NA_EIDPROC
void removeLastErrorCondition();
-NA_EIDPROC
void removeLastNonFatalCondition();
-NA_EIDPROC
Lng32 markDupNFConditions();
// the deleteWarning and deleteError methods delete a warning/error from
// the warnings_/errors_ list.
// entryNumber is the index to the warnings_/errors_ list
// entryNumber should range from 1 to getNumber(DgSqlCode::WARNING_ or
// ERROR_)
-NA_EIDPROC
void deleteWarning(Lng32 entryNumber);
-NA_EIDPROC
void deleteError(Lng32 entryNumber);
// similar to deleteError except that the Error entry is not
// destroyed (i.e. deallocated) and a pointer to it returned.
// The error entry is removes from the errors_ list.
-NA_EIDPROC
ComCondition * removeError(Lng32 entryNumber);
// returns TRUE, if any ComCondition in the diagsArea contains
// error SQLCode.
// returns FALSE, otherwise.
-NA_EIDPROC
NABoolean contains(Lng32 SQLCode) const;
// check if a particular error/warning occurred for a particular file.
// returns TRUE, if diagsArea contains the fileName for error SQLCode.
// returns FALSE, otherwise.
-NA_EIDPROC
NABoolean containsForFile(Lng32 SQLCode, const char * fileName);
// returns TRUE, if any ComCondition in the diagsArea contains
// warning SQLCode. Returns FALSE, otherwise.
-NA_EIDPROC
NABoolean containsWarning(Lng32 SQLCode) const;
// Check if warnings_ contains SQLCODE within the range [begin, warnings_.entries()).
// Note beg is 0-based.
-NA_EIDPROC
+
NABoolean containsWarning(CollIndex begin, Lng32 SQLCode) const;
// returns TRUE, if any ComCondition in the diagsArea contains
// error SQLCode. Returns FALSE, otherwise.
-NA_EIDPROC
+
NABoolean containsError(Lng32 SQLCode) const;
//returnIndex returns the index number of a given SQLCODE in this diagsarea
//If the given SQLCODE is not found in the diagsarea then NULL_COLL_INDEX is returned.
-NA_EIDPROC
CollIndex returnIndex(Lng32 SQLCODE) const;
// Decrement reference count. Object is deallocated, in the heap in
// which it resides, when reference count drops to zero.
-NA_EIDPROC
IpcMessageRefCount decrRefCount();
// There are three methods each that must be overridden
@@ -1345,67 +1121,48 @@ NA_EIDPROC
// An assertion failure occurs upon packing or unpacking a ComDiagsArea
// whose newCondition_ member is not NULL.
-NA_EIDPROC
IpcMessageObjSize packedLength ();
-NA_EIDPROC
IpcMessageObjSize packedLength32 ();
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage (IpcMessageBufferPtr buffer);
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage (IpcMessageBufferPtr buffer,
NABoolean swapBytes);
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage32 (IpcMessageBufferPtr buffer);
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage32 (IpcMessageBufferPtr buffer,
NABoolean swapBytes);
-NA_EIDPROC
void unpackObj (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer);
-NA_EIDPROC
void unpackObj32 (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer);
-NA_EIDPROC
NABoolean checkObj (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer) const;
-NA_EIDPROC
NABoolean getRollbackTransaction() const;
-NA_EIDPROC
void setRollbackTransaction(short value);
-NA_EIDPROC
NABoolean getNoRollbackTransaction() const;
-NA_EIDPROC
void setNoRollbackTransaction(NABoolean value);
-NA_EIDPROC
NABoolean getNonFatalErrorSeen() const;
-NA_EIDPROC
void setNonFatalErrorSeen(NABoolean value);
-NA_EIDPROC
NABoolean containsRowCountFromEID() const;
-NA_EIDPROC
void setContainsRowCountFromEID(NABoolean value);
-NA_EIDPROC
NABoolean getNonFatalErrorIndexToBeSet() const;
-NA_EIDPROC
void setNonFatalErrorIndexToBeSet(NABoolean value);
private:
@@ -1422,9 +1179,7 @@ private:
class DiagsCondition : public ComCondition {
public:
-NA_EIDPROC
Lng32 getDiagsId () const;
-NA_EIDPROC
void setDiagsId (Lng32);
// We want a DiagsCondition object to behave pretty much
@@ -1432,61 +1187,46 @@ NA_EIDPROC
// comparison, and assignment operators will all be declared following the
// pattern of the ComCondition class:
-NA_EIDPROC
DiagsCondition ();
-NA_EIDPROC
~DiagsCondition ();
-NA_EIDPROC
static DiagsCondition *allocate (CollHeap* = NULL);
-NA_EIDPROC
void deAllocate ();
// Copy a DiagsCondition object. The copy is constructed in the same
// heap in which the object being copied resides. A deep copy is
// performed, meaning that not only is the top-level object copied,
// but all attributes as well (except for the CollHeap).
-NA_EIDPROC
DiagsCondition* copy();
// There are three methods each that must be overridden
// in order to provide for packing and unpacking of this
// class in order to support IPC.
-NA_EIDPROC
IpcMessageObjSize packedLength ();
-NA_EIDPROC
IpcMessageObjSize packedLength32 ();
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage(IpcMessageBufferPtr buffer);
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage(IpcMessageBufferPtr buffer,
NABoolean swapBytes);
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage32(IpcMessageBufferPtr buffer);
-NA_EIDPROC
IpcMessageObjSize packObjIntoMessage32(IpcMessageBufferPtr buffer,
NABoolean swapBytes);
-NA_EIDPROC
void unpackObj (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer);
-NA_EIDPROC
void unpackObj32 (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer);
-NA_EIDPROC
NABoolean checkObj (IpcMessageObjType objType,
IpcMessageObjVersion objVersion,
NABoolean sameEndianness,
IpcMessageObjSize objSize,
IpcConstMessageBufferPtr buffer) const;
-NA_EIDPROC
DiagsCondition &operator= (const DiagsCondition&);
private:
@@ -1494,24 +1234,18 @@ NA_EIDPROC
// In support of allocation, creation, and destruction:
-NA_EIDPROC
DiagsCondition (CollHeap *);
-NA_EIDPROC
inline static void *operator new (size_t,CollHeap* = NULL);
// delete inherited from ComCondition
-NA_EIDPROC
void destroyMe ();
// Added to allow NCHAR error messages.
class DgWString0 : public DgBase
{
public:
-NA_EIDPROC
DgWString0 (const NAWchar* const x) : theWCharStr_(x) {};
-NA_EIDPROC
const NAWchar* getWCharStr () const {return theWCharStr_; };
-NA_EIDPROC
DGTYPE getTypeName () const { return DGWSTRING0; };
private:
const NAWchar* const theWCharStr_;
@@ -1521,11 +1255,8 @@ private:
class DgWString1 : public DgBase
{
public:
-NA_EIDPROC
DgWString1 (const NAWchar* const x) : theWCharStr_(x) {};
-NA_EIDPROC
const NAWchar* getWCharStr () const {return theWCharStr_; };
-NA_EIDPROC
DGTYPE getTypeName () const { return DGWSTRING1; };
private:
const NAWchar* const theWCharStr_;
@@ -1535,11 +1266,8 @@ private:
class DgWString2 : public DgBase
{
public:
-NA_EIDPROC
DgWString2 (const NAWchar* const x) : theWCharStr_(x) {};
-NA_EIDPROC
const NAWchar* getWCharStr () const {return theWCharStr_; };
-NA_EIDPROC
DGTYPE getTypeName () const { return DGWSTRING2; };
private:
const NAWchar* const theWCharStr_;
@@ -1549,11 +1277,8 @@ private:
class DgWString3 : public DgBase
{
public:
-NA_EIDPROC
DgWString3 (const NAWchar* const x) : theWCharStr_(x) {};
-NA_EIDPROC
const NAWchar* getWCharStr () const {return theWCharStr_; };
-NA_EIDPROC
DGTYPE getTypeName () const { return DGWSTRING3; };
private:
const NAWchar* const theWCharStr_;
@@ -1563,11 +1288,8 @@ private:
class DgWString4 : public DgBase
{
public:
-NA_EIDPROC
DgWString4 (const NAWchar* const x) : theWCharStr_(x) {};
-NA_EIDPROC
const NAWchar* getWCharStr () const {return theWCharStr_; };
-NA_EIDPROC
DGTYPE getTypeName() const { return DGWSTRING4; };
private:
const NAWchar* const theWCharStr_;
@@ -1575,16 +1297,8 @@ private:
// can't touch these:
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
Int32 operator== (const DiagsCondition&);
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
DiagsCondition (const DiagsCondition&);
};
@@ -1592,32 +1306,15 @@ public:
// In support of allocation, creation, and destruction:
-NA_EIDPROC
ComDiagsArea (CollHeap *);
private:
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
inline static void *operator new (size_t,CollHeap*);
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
inline static void *operator new (size_t);
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
inline static void operator delete (void*);
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
void destroyMe ();
// This function is called when accepting, merging, and setLengthLimit
@@ -1628,30 +1325,14 @@ NA_EIDPROC
// In that case, those ComConditions with the lowest priority go first
// (warnings before errors, reverse chronologically).
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
void enforceLengthLimit ();
// can't touch these:
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
ComDiagsArea &operator= (const ComDiagsArea&);
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
Int32 operator== (const ComDiagsArea&);
-#if defined (SQLEXPORT_LIB)
-#pragma SRLExports
-#endif
-NA_EIDPROC
ComDiagsArea (const ComDiagsArea&);
@@ -1773,7 +1454,6 @@ NA_EIDPROC
// ##This is a global inline func only because I am too lazy to make it a
// ##public ComDiagsArea::negateAllErrors() method, with the following
// ##(or equivalent) in the .cpp file, and recompile and rebuild everything.
-NA_EIDPROC
inline
void NegateAllErrors (ComDiagsArea *a)
{
@@ -1801,7 +1481,6 @@ void *ComDiagsArea::operator new(size_t theSize, CollHeap* heapPtr)
}
-NA_EIDPROC
inline
void ComDiagsArea::operator delete(void *ptr)
{
@@ -1980,7 +1659,7 @@ inline
// area
// -----------------------------------------------------------------------
-class SQLEXPORT_LIB_FUNC ComDiagsTranslator
+class ComDiagsTranslator
{
public:
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/ComMemoryDiags.h
----------------------------------------------------------------------
diff --git a/core/sql/export/ComMemoryDiags.h b/core/sql/export/ComMemoryDiags.h
index ac2ea06..ef8b59b 100644
--- a/core/sql/export/ComMemoryDiags.h
+++ b/core/sql/export/ComMemoryDiags.h
@@ -37,8 +37,6 @@
*
**************************************************************************** */
-#include "SqlExportDllDefines.h"
-
// -----------------------------------------------------------------------
// The following classes are defined in this file.
// -----------------------------------------------------------------------
@@ -75,7 +73,7 @@ class ostream ; // forward decl
// The static data member is initialized in ComMemoryDiags.cpp.
//
-class SQLEXPORT_LIB_FUNC ComMemoryDiags {
+class ComMemoryDiags {
public:
static ostream *& DumpMemoryInfo() { return dumpMemoryInfo_ ; }
private:
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/ExportDll.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/ExportDll.cpp b/core/sql/export/ExportDll.cpp
index 3b98ed3..e9673fb 100644
--- a/core/sql/export/ExportDll.cpp
+++ b/core/sql/export/ExportDll.cpp
@@ -42,7 +42,6 @@
//
#include "Platform.h"
-#include "SqlExportDllDefines.h"
#include <setjmp.h>
-THREAD_P SQLEXPORT_LIB_FUNC jmp_buf ExportJmpBuf;
+THREAD_P jmp_buf ExportJmpBuf;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/HeapID.h
----------------------------------------------------------------------
diff --git a/core/sql/export/HeapID.h b/core/sql/export/HeapID.h
index b7dcc56..146235f 100644
--- a/core/sql/export/HeapID.h
+++ b/core/sql/export/HeapID.h
@@ -39,14 +39,6 @@
#define HEAPID__H
#include "Platform.h"
-// -----------------------------------------------------------------------
-// Force heaplog off if __EID code.
-// -----------------------------------------------------------------------
-#ifndef __NOIMPORT_HEAPL
- #ifdef __EID
- #define __NOIMPORT_HEAPL
- #endif
-#endif
// -----------------------------------------------------------------------
// NA_DEBUG_HEAPLOG indicates this is a debug build on NT and
@@ -62,31 +54,25 @@
// -----------------------------------------------------------------------
#ifdef NA_DEBUG_HEAPLOG
// -----------------------------------------------------------------------
-#include "SqlExportDllDefines.h"
-class SQLEXPORT_LIB_FUNC HeapID
+class HeapID
{
public:
-NA_EIDPROC
HeapID();
-NA_EIDPROC
~HeapID();
// -----------------------------------------------------------------------
#else
// -----------------------------------------------------------------------
-#include "SqlExportDllDefines.h"
-class SQLEXPORT_LIB_FUNC HeapID
+class HeapID
{
public:
-NA_EIDPROC
HeapID() : heapNum(-1) {}
-NA_EIDPROC
~HeapID() {}
#endif
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/HeapLog.h
----------------------------------------------------------------------
diff --git a/core/sql/export/HeapLog.h b/core/sql/export/HeapLog.h
index ee74a2f..d79fb68 100644
--- a/core/sql/export/HeapLog.h
+++ b/core/sql/export/HeapLog.h
@@ -40,7 +40,6 @@
#include <stddef.h>
#include "HeapID.h"
#include "NABoolean.h"
-#include "SqlExportDllDefines.h"
// -----------------------------------------------------------------------
// Expand to empty if this is a release build or heaplog is not importable.
@@ -138,7 +137,7 @@ typedef enum HeapControlEnum
// -----------------------------------------------------------------------
class HeapLog;
-class SQLEXPORT_LIB_FUNC HeapLogRoot {
+class HeapLogRoot {
public:
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/IpcMessageObj.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/IpcMessageObj.cpp b/core/sql/export/IpcMessageObj.cpp
index 7d69571..4ae4ce3 100644
--- a/core/sql/export/IpcMessageObj.cpp
+++ b/core/sql/export/IpcMessageObj.cpp
@@ -74,12 +74,7 @@ IpcMessageObj::IpcMessageObj(IpcBufferedMsgStream* msgStream)
swapFourBytes(s_.objType_);
swapFourBytes(s_.objVersion_);
swapFourBytes(s_.objLength_);
-#ifdef NA_64BIT
- // dg64 - TODO?
assert(0); // didn't implement
-#else
- swapFourBytes((ULng32 &) s_.next_);
-#endif
s_.refCount_ = 1; // an object comes with an initial refcount of 1
s_.endianness_ = IpcMyEndianness;
}
@@ -112,7 +107,6 @@ IpcMessageObj::~IpcMessageObj()
}
}
-#ifndef __EID // not needed in DP2 yet, Larry Schumacher
///////////////////////////////////////////////////////////////////////////////
// used to allocate a packed send object.
void* IpcMessageObj::operator new(size_t size,
@@ -124,7 +118,6 @@ void* IpcMessageObj::operator new(size_t size,
alignSizeForNextObj(appendStart);
return (msgStream.sendMsgObj(appendStart + appendDataLen));
}
-#endif
IpcMessageObjSize IpcMessageObj::packObjIntoMessage(
IpcMessageBufferPtr buffer)
@@ -292,15 +285,9 @@ IpcMessageObjSize IpcMessageObj::packBaseClassIntoMessage(
IpcMessageObjSize copyLen = sizeof(IpcMessageObj);
char *savedVPtr = getMyVPtr();
-#ifdef NA_64BIT
assert(copyLen == 48 AND
sizeof(s_) == 40 AND
(char *) this == ((char *) &s_ - sizeof(char *)));
-#else
- assert(copyLen == 32 AND
- sizeof(s_) == 28 AND
- (char *) this == ((char *) &s_ - sizeof(char *)));
-#endif
// wipe out the virtual function pointer before moving data
// (makes sure that the copied object doesn't have a stray pointer in it)
@@ -821,12 +808,7 @@ NABoolean checkCharStarInBuffer (
/* IN */ IpcConstMessageBufferPtr lastByte )
{
NABoolean result = TRUE;
-#ifdef NA_64BIT
- // dg64 - should be 4 bytes
Int32 dataLength = 0;
-#else
- Lng32 dataLength = 0;
-#endif
if (!checkAndUnpackBuffer(buffer, sizeof(dataLength),
(char *) &dataLength, lastByte))
{
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/IpcMessageObj.h
----------------------------------------------------------------------
diff --git a/core/sql/export/IpcMessageObj.h b/core/sql/export/IpcMessageObj.h
index c672f55..ffc0790 100644
--- a/core/sql/export/IpcMessageObj.h
+++ b/core/sql/export/IpcMessageObj.h
@@ -39,7 +39,6 @@
#define IPCMESSAGEOBJ_H
#include "Platform.h"
-#include "SqlExportDllDefines.h"
#include "str.h"
@@ -74,7 +73,7 @@ class IpcMessageBuffer;
// the message. A virtual method can also be used to determine the
// length of the message when it gets packed into the message.
// -----------------------------------------------------------------------
-class SQLEXPORT_LIB_FUNC IpcMessageObj
+class IpcMessageObj
{
friend class IpcMessageStream;
friend class IpcBufferedMsgStream;
@@ -102,8 +101,6 @@ public:
// destructor
virtual ~IpcMessageObj();
-#ifndef __EID // not needed in DP2 yet, Larry Schumacher
-
// used to allocate a packed send object. Operator "new" gets
// packedObj from class IpcBufferedMsgStream, then sets "this =
// packedObj" for constructor. "AppendDataLen" allows raw data
@@ -117,8 +114,6 @@ public:
IpcBufferedMsgStream& msgStream,
IpcMessageObjSize appendDataLen = 0);
-#endif // !__EID
-
// used to perform copyless receive. User must get packedObj from
// IpcBufferedMsgStream::receiveMsgObj(). "new" sets "this = packedObj"
// for constructor so object can be mapped inplace.
@@ -467,19 +462,16 @@ private:
// has sufficient space for an item of a given size.
// -----------------------------------------------------------------------
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC IpcMessageObjSize packCharStarIntoBuffer(IpcMessageBufferPtr &buffer,
+IpcMessageObjSize packCharStarIntoBuffer(IpcMessageBufferPtr &buffer,
char* strPtr,
NABoolean swapBytes = FALSE);
// UR2
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC IpcMessageObjSize packCharStarIntoBuffer(IpcMessageBufferPtr &buffer,
+IpcMessageObjSize packCharStarIntoBuffer(IpcMessageBufferPtr &buffer,
NAWchar* strPtr,
NABoolean swapBytes = FALSE);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC inline IpcMessageObjSize packStrIntoBuffer(char* &buffer,
+inline IpcMessageObjSize packStrIntoBuffer(char* &buffer,
char* targetObj,
ULng32 objSize)
{
@@ -488,12 +480,10 @@ NA_EIDPROC inline IpcMessageObjSize packStrIntoBuffer(char* &buffer,
return objSize;
}
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC void unpackBuffer(const char* &buffer,
+void unpackBuffer(const char* &buffer,
char* &strPtr, CollHeap* collHeapPtr);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC inline void unpackStrFromBuffer(const char* &buffer,
+inline void unpackStrFromBuffer(const char* &buffer,
char* targetObj,
ULng32 objSize)
{
@@ -501,24 +491,20 @@ NA_EIDPROC inline void unpackStrFromBuffer(const char* &buffer,
buffer += objSize;
}
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC void skipCharStarInBuffer(const char* &buffer);
+void skipCharStarInBuffer(const char* &buffer);
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC NABoolean checkBuffer (
+NABoolean checkBuffer (
/* INOUT */ IpcConstMessageBufferPtr &buffer,
/* IN */ ULng32 dataLength,
/* IN */ IpcConstMessageBufferPtr lastByte );
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC NABoolean checkAndUnpackBuffer (
+NABoolean checkAndUnpackBuffer (
/* INOUT */ IpcConstMessageBufferPtr &buffer,
/* IN */ ULng32 dataLength,
/* OUT */ char *dataPtr,
/* IN */ IpcConstMessageBufferPtr lastByte );
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC NABoolean checkCharStarInBuffer (
+NABoolean checkCharStarInBuffer (
/* INOUT */ IpcConstMessageBufferPtr &buffer,
/* IN */ NABoolean sameEndianness,
/* IN */ IpcConstMessageBufferPtr lastByte );
@@ -532,11 +518,10 @@ NA_EIDPROC NABoolean checkCharStarInBuffer (
// before returning FALSE. Current the epilogue's only purpose is as a
// debugging aid. By setting a breakpoint on the epilogue you can
// quickly track down the cause of a checkObj() failure.
-SQLEXPORT_LIB_FUNC
-NA_EIDPROC void ipcIntegrityCheckEpilogue(NABoolean status);
+void ipcIntegrityCheckEpilogue(NABoolean status);
template <class ScalarType>
-NA_EIDPROC inline IpcMessageObjSize packIntoBuffer(char* &buffer,
+inline IpcMessageObjSize packIntoBuffer(char* &buffer,
ScalarType scalarVariable)
{
// * (ScalarType *) buffer = scalarVariable;
@@ -546,7 +531,7 @@ NA_EIDPROC inline IpcMessageObjSize packIntoBuffer(char* &buffer,
}
template <class ScalarType>
-NA_EIDPROC inline IpcMessageObjSize packIntoBuffer(char* &buffer,
+inline IpcMessageObjSize packIntoBuffer(char* &buffer,
ScalarType scalarVariable,
NABoolean swapBytes)
{
@@ -572,7 +557,7 @@ NA_EIDPROC inline IpcMessageObjSize packIntoBuffer(char* &buffer,
}
template <class ScalarType>
-NA_EIDPROC inline void unpackBuffer(const char* &buffer,
+inline void unpackBuffer(const char* &buffer,
ScalarType& scalarVariable)
{
// scalarVariable = * (ScalarType *) buffer;
@@ -582,36 +567,7 @@ NA_EIDPROC inline void unpackBuffer(const char* &buffer,
buffer += sizeof(ScalarType);
}
-#ifdef NA_64BIT
-// may need swapEightBytes(long &b8)
-// and swapEightBytes(unsigned long &b8)
-#else
-NA_EIDPROC inline void swapFourBytes(Long &b4)
-{
- char *c4 = (char *) (&b4);
- char x;
-
- x = c4[0]; c4[0] = c4[3]; c4[3] = x;
- x = c4[1]; c4[1] = c4[2]; c4[2] = x;
-}
-
-NA_EIDPROC inline void swapFourBytes(ULong &b4)
-{
- char *c4 = (char *) (&b4);
- char x;
-
- x = c4[0]; c4[0] = c4[3]; c4[3] = x;
- x = c4[1]; c4[1] = c4[2]; c4[2] = x;
-}
-
-#endif
-
-#ifdef NA_64BIT
-// dg64 - match signature
-NA_EIDPROC inline void swapFourBytes(UInt32 &b4)
-#else
-NA_EIDPROC inline void swapFourBytes(ULng32 &b4)
-#endif
+inline void swapFourBytes(UInt32 &b4)
{
char *c4 = (char *) (&b4);
char x;
@@ -620,12 +576,7 @@ NA_EIDPROC inline void swapFourBytes(ULng32 &b4)
x = c4[1]; c4[1] = c4[2]; c4[2] = x;
}
-#ifdef NA_64BIT
-// dg64 - match signature
-NA_EIDPROC inline void swapFourBytes(Int32 &b4)
-#else
-NA_EIDPROC inline void swapFourBytes(Lng32 &b4)
-#endif
+inline void swapFourBytes(Int32 &b4)
{
char *c4 = (char *) (&b4);
char x;
@@ -634,7 +585,7 @@ NA_EIDPROC inline void swapFourBytes(Lng32 &b4)
x = c4[1]; c4[1] = c4[2]; c4[2] = x;
}
-NA_EIDPROC inline void swapTwoBytes(unsigned short &b2)
+inline void swapTwoBytes(unsigned short &b2)
{
char *c2 = (char *) (&b2);
char x;
@@ -642,7 +593,7 @@ NA_EIDPROC inline void swapTwoBytes(unsigned short &b2)
x = c2[0]; c2[0] = c2[1]; c2[1] = x;
}
-NA_EIDPROC inline void swapTwoBytes(short &b2)
+inline void swapTwoBytes(short &b2)
{
char *c2 = (char *) (&b2);
char x;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/NAAbort.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/NAAbort.cpp b/core/sql/export/NAAbort.cpp
index 166a640..9ed3055 100644
--- a/core/sql/export/NAAbort.cpp
+++ b/core/sql/export/NAAbort.cpp
@@ -116,21 +116,14 @@ int NAAssertMutexLock()
#include "Platform.h"
-
-
-#if (defined(__TANDEM) || defined(NA_LINUX)) && !defined(__EID)
extern short getRTSSemaphore(); // Functions implemented in SqlStats.cpp
extern void releaseRTSSemaphore();
-#endif
#include "BaseTypes.h" // for declaration of NAAbort()
#include "NAAssert.h" // for declaration of NAAssert()
#include "NAError.h" // for ARKCMP_EXCEPTION_EPILOGUE()
#include <setjmp.h>
-#include "SqlExportDllDefines.h"
-
-
#include <iostream>
#include "ExceptionCallBack.h"
@@ -182,7 +175,7 @@ void registerAbortCallBack(AbortCallBack *pACB)
pAbortCallBack = pACB;
}
-extern THREAD_P SQLEXPORT_LIB_FUNC jmp_buf* ExportJmpBufPtr;
+extern THREAD_P jmp_buf* ExportJmpBufPtr;
#include "logmxevent.h"
@@ -232,7 +225,6 @@ void assert_botch_no_abend( const char *f, Int32 l, const char * m)
#pragma warn(770) // warning elimination
void assert_botch_abend( const char *f, Int32 l, const char * m, const char *c)
{
-#ifndef __EID
NAAssertMutexLock(); // Assure "termination synchronization"
int pid = (int) getpid();
@@ -293,7 +285,4 @@ void assert_botch_abend( const char *f, Int32 l, const char * m, const char *c)
else
#endif
abort();
-#else
- assert_botch_in_eid(f, l, m);
-#endif
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/NABasicObject.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/NABasicObject.cpp b/core/sql/export/NABasicObject.cpp
index 9629561..d04e70f 100644
--- a/core/sql/export/NABasicObject.cpp
+++ b/core/sql/export/NABasicObject.cpp
@@ -37,7 +37,6 @@
#include "Platform.h"
-#ifndef __EID
#ifdef NA_STD_NAMESPACE
#include <iosfwd>
using namespace std;
@@ -45,7 +44,6 @@ using namespace std;
#include <iostream>
#endif
#include <stdlib.h>
-#endif
#include "ComASSERT.h"
#include "NAMemory.h"
@@ -63,22 +61,18 @@ using namespace std;
// Stack or statically allocated objects will just have random garbage in
// this field but as long as noone tries to "delete" them (as noone should)
// that will not matter (except to the Purify tool which may report UMR errors).
-NA_EIDPROC
NABasicObject::NABasicObject() {}
// Note that this just ignores the passed object, which is correct:
// we do *not* want to copy its heap pointer!
-NA_EIDPROC
NABasicObject::NABasicObject(const NABasicObject&) {}
// Note that this just ignores the passed object, which is correct:
// we do *not* want to copy its heap pointer!
// Otherwise, a default operator= on a NABasicObject-derived class would
// overwrite the heap pointer, a very bad thing.
-NA_EIDPROC
NABasicObject& NABasicObject::operator=(const NABasicObject&) { return *this; }
-NA_EIDPROC
void* NABasicObject::operator new(size_t t, CollHeap* h, NABoolean failureIsFatal)
{
if (t < sizeof(NABasicObject))
@@ -120,7 +114,6 @@ void* NABasicObject::operator new(size_t t, CollHeap* h, NABoolean failureIsFata
return p;
}
-NA_EIDPROC
void* NABasicObject::operator new(size_t t, void* loc, NAMemory* h)
{
if (loc != NULL)
@@ -130,7 +123,6 @@ void* NABasicObject::operator new(size_t t, void* loc, NAMemory* h)
}
return 0;
}
-NA_EIDPROC
void NABasicObject::operator delete(void* p)
{
if (p) // "delete NULL;" is legal in C++, obviously a no-op
@@ -141,13 +133,11 @@ void NABasicObject::operator delete(void* p)
if (h == invalidHeapPtr())
{
#ifndef NDEBUG
- #ifndef __EID
cerr << "**WARNING: " << __FILE__ << ": "
<< "Ignoring attempt to delete pointer twice "
<< "(possible memory leak at " << p << "; need to run Purify)"
<< endl;
#endif
- #endif
return;
}
@@ -163,7 +153,6 @@ void NABasicObject::operator delete(void* p)
}
-NA_EIDPROC
void NABasicObject::operator delete(void* p, NAMemory*h, NABoolean f)
{
if (p)
@@ -175,13 +164,11 @@ void NABasicObject::operator delete(void* p, NAMemory*h, NABoolean f)
}
}
-NA_EIDPROC
void NABasicObject::operator delete(void* p, void*, NAMemory*)
{
// This shouldn't do anything.
}
-NA_EIDPROC
void* NABasicObject::operator new[](size_t t, CollHeap* h, NABoolean failureIsFatal)
{
if (t < sizeof(NABasicObject))
@@ -225,7 +212,6 @@ void* NABasicObject::operator new[](size_t t, CollHeap* h, NABoolean failureIsFa
return p;
}
-NA_EIDPROC
void NABasicObject::operator delete[](void* p)
{
#if 0
@@ -238,13 +224,11 @@ void NABasicObject::operator delete[](void* p)
if (h == invalidHeapPtr())
{
#ifndef NDEBUG
- #ifndef __EID
cerr << "**WARNING: " << __FILE__ << ": "
<< "Ignoring attempt to delete pointer twice "
<< "(possible memory leak at " << p << "; need to run Purify)"
<< endl;
#endif
- #endif
return;
}
@@ -263,7 +247,6 @@ void NABasicObject::operator delete[](void* p)
}
// This function will be called if the constructor throws an exception.
-NA_EIDPROC
void NABasicObject::operator delete[](void* p, NAMemory* h, NABoolean)
{
if ( p ) {
@@ -274,13 +257,12 @@ void NABasicObject::operator delete[](void* p, NAMemory* h, NABoolean)
}
}
-//NA_EIDPROC
+//
//void* operator new[](size_t, NAMemory* h, NABoolean failureIsFatal)
//{
//return NABasicObject::operator new(t, h, failureIsFatal);
//}
-//NA_EIDPROC
//void* NABasicObject::operator delete[](void* p /* , another arg; see C++ ARM*/)
//{
// We need to call multiple destructors here, one for each object in
@@ -301,8 +283,6 @@ void NABasicObject::operator delete[](void* p, NAMemory* h, NABoolean)
// This finds latent bugs.)
#if !defined(NDEBUG)
-#ifndef __EID
- NA_EIDPROC
Int32 NABasicObject::checkInvalidObject(const void* const referencingObject)
{
if (this && maybeInvalidObject())
@@ -328,8 +308,6 @@ void NABasicObject::operator delete[](void* p, NAMemory* h, NABoolean)
return 0;
}
#endif
-#endif
-
// -----------------------------------------------------------------------
// overloaded new operator for CollHeap*
@@ -346,7 +324,6 @@ void NABasicObject::operator delete[](void* p, NAMemory* h, NABoolean)
// The compiler does not support exception yet. Should be done when
// the compiler supports exception.
//
-NA_EIDPROC
void* operator new (size_t t, CollHeap* h)
{
@@ -365,7 +342,6 @@ void* operator new (size_t t, CollHeap* h)
}
-NA_EIDPROC
void* operator new[] (size_t t, CollHeap* h)
{
//return ( (h) ? h->allocateMemory(t) : (::new char[t] ) );
@@ -385,7 +361,6 @@ void* operator new[] (size_t t, CollHeap* h)
}
-NA_EIDPROC
void* operator new[] (size_t t, CollHeap* h, NABoolean failureIsFatal)
{
if (NOT_CHECK_NAHEAP(h))
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/NABasicObject.h
----------------------------------------------------------------------
diff --git a/core/sql/export/NABasicObject.h b/core/sql/export/NABasicObject.h
index 01acb1c..d20c192 100644
--- a/core/sql/export/NABasicObject.h
+++ b/core/sql/export/NABasicObject.h
@@ -41,10 +41,6 @@
#include "Platform.h"
#include "NAStdlib.h"
-//#ifndef NA_NO_C_RUNTIME
-//#include <stdio.h>
-//#endif
-#include "SqlExportDllDefines.h"
#include "NABoolean.h"
#ifndef NULL
@@ -149,16 +145,12 @@ typedef NAMemory CollHeap ;
// memory management for classes derived from it.
// -----------------------------------------------------------------------
-class SQLEXPORT_LIB_FUNC NABasicObject
+class NABasicObject
{
// NT_PORT ( bd 12/10/96 )
protected:
-#ifndef PRIV_SRL
-NA_EIDPROC virtual ~NABasicObject() {};
-#else
-NA_EIDPROC ~NABasicObject() {};
-#endif // PRIV_SRL
+ virtual ~NABasicObject() {};
public:
@@ -172,25 +164,25 @@ public:
// do "delete h_;"! Likewise, the assignment operator here does not
// overwrite the h_ pointer.
- NA_EIDPROC NABasicObject();
- NA_EIDPROC NABasicObject(const NABasicObject&);
- NA_EIDPROC NABasicObject& operator=(const NABasicObject&);
+ NABasicObject();
+ NABasicObject(const NABasicObject&);
+ NABasicObject& operator=(const NABasicObject&);
- NA_EIDPROC void* operator new[](size_t t, NAMemory* h = 0, NABoolean failureIsFatal = TRUE);
+ void* operator new[](size_t t, NAMemory* h = 0, NABoolean failureIsFatal = TRUE);
void operator delete[](void*);
void operator delete[](void*, NAMemory*, NABoolean);
// In the future, when the compiler supports the operator new[] and
// operator [] delete, they should be added here for array allocation.
- // NA_EIDPROC void* operator new[](size_t, NAMemory* h = 0, NABoolean failureIsFatal = TRUE);
+ // void* operator new[](size_t, NAMemory* h = 0, NABoolean failureIsFatal = TRUE);
// void operator delete[](void*, etc... -- see .C file comments...)
- NA_EIDPROC void* operator new(size_t t, NAMemory* h = 0, NABoolean failureIsFatal = TRUE );
- NA_EIDPROC void* operator new(size_t t, void* loc, NAMemory* h = 0);
+ void* operator new(size_t t, NAMemory* h = 0, NABoolean failureIsFatal = TRUE );
+ void* operator new(size_t t, void* loc, NAMemory* h = 0);
- NA_EIDPROC void operator delete(void*);
- NA_EIDPROC void operator delete(void*, NAMemory*, NABoolean);
- NA_EIDPROC void operator delete(void*, void*, NAMemory*);
+ void operator delete(void*);
+ void operator delete(void*, NAMemory*, NABoolean);
+ void operator delete(void*, void*, NAMemory*);
// The CollHeap* returned is where this object is allocated from;
// if this object is allocated through new, it will be some CollHeap* or 0.
@@ -200,7 +192,7 @@ public:
// CollHeap* as further memory allocation, it is the user's
// responsibility to make sure the object is not from stack.
- NA_EIDPROC NAMemory* collHeap() { return h_; }
+ NAMemory* collHeap() { return h_; }
// The delete operator sets the object-being-deleted's heap pointer to the
// invalid value below. Thus dangling pointers to this object can *sometimes*
@@ -223,16 +215,16 @@ public:
// to be out-of-bounds for a heap. (0x0 already has a meaning: that no heap
// is to be used, just the global new/delete.)
- NA_EIDPROC static CollHeap* invalidHeapPtr() { return (CollHeap*)0x1; }
- NA_EIDPROC static CollHeap* systemHeapPtr() { return (CollHeap*)0x0; }
- NA_EIDPROC Int32 maybeInvalidObject() { return h_ == invalidHeapPtr();}
+ static CollHeap* invalidHeapPtr() { return (CollHeap*)0x1; }
+ static CollHeap* systemHeapPtr() { return (CollHeap*)0x0; }
+ Int32 maybeInvalidObject() { return h_ == invalidHeapPtr();}
// For smart-pointer callers, some defensive programming for Debug build.
// For some reason, this method won't link into the NSK mxcmp static object.
#if !defined(NDEBUG)
- NA_EIDPROC Int32 checkInvalidObject(const void* const referencingObject=NULL);
+ Int32 checkInvalidObject(const void* const referencingObject=NULL);
#else
- NA_EIDPROC Int32 checkInvalidObject(const void* const = NULL)
+ Int32 checkInvalidObject(const void* const = NULL)
{ return 0/*not invalid*/; }
#endif
@@ -243,10 +235,6 @@ private:
CollHeap* h_;
-#ifdef PRIV_SRL
- void * dummyvtbl_; //solve offset problems for priv srls
-#endif //PRIV_SRL
-
};
// -----------------------------------------------------------------------
@@ -255,12 +243,10 @@ private:
// other than system area, use the overloaded new.
// -----------------------------------------------------------------------
-SQLEXPORT_LIB_FUNC
void * operator new(size_t size, CollHeap* h);
-SQLEXPORT_LIB_FUNC
void * operator new[](size_t size, CollHeap* h);
-SQLEXPORT_LIB_FUNC
+
void * operator new[](size_t size, CollHeap* h, NABoolean failureIsFatal);
// The following operator delete functions will be called to free memory if
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/export/NAInternalError.h
----------------------------------------------------------------------
diff --git a/core/sql/export/NAInternalError.h b/core/sql/export/NAInternalError.h
index a120b14..5fdf0ca 100644
--- a/core/sql/export/NAInternalError.h
+++ b/core/sql/export/NAInternalError.h
@@ -34,11 +34,9 @@
*
*****************************************************************************
*/
-#include "SqlExportDllDefines.h"
-
class ExceptionCallBack;
-class SQLEXPORT_LIB_FUNC NAInternalError {
+class NAInternalError {
private:
static ExceptionCallBack *pExceptionCallBack_;
public: