summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@mc05.(none)>2004-05-26 14:34:41 +0200
committerunknown <tomas@mc05.(none)>2004-05-26 14:34:41 +0200
commit4cfa10deafcad9c85eb05d0c00d1b422c4c66fdb (patch)
tree5014419c4be7839f0b7c481edfd36b20dccce21e
parent5eea01a76465f35492046bac95e0b73557f0473d (diff)
parentb33991e69f104fd7ec643237c009c1c7a4793bef (diff)
downloadmariadb-git-4cfa10deafcad9c85eb05d0c00d1b422c4c66fdb.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mc05.(none):/space2/tomas/mysql-4.1-ndb-test configure.in: Auto merged ndb/src/kernel/ndb-main/Main.cpp: Auto merged ndb/src/ndbapi/Ndb.cpp: Auto merged ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged
-rw-r--r--BitKeeper/etc/logging_ok3
-rw-r--r--configure.in8
-rw-r--r--ndb/Makefile10
-rwxr-xr-xndb/config/GuessConfig.sh1
-rw-r--r--ndb/include/kernel/signaldata/CreateEvnt.hpp2
-rw-r--r--ndb/include/kernel/trigger_definitions.h1
-rw-r--r--ndb/include/portlib/PortDefs.h2
-rw-r--r--ndb/include/util/Bitmask.hpp15
-rw-r--r--ndb/src/client/odbc/codegen/SimpleParser.cpp1
-rw-r--r--ndb/src/client/odbc/common/Ctx.cpp1
-rw-r--r--ndb/src/client/odbc/common/DataField.cpp1
-rw-r--r--ndb/src/client/odbc/common/OdbcData.cpp1
-rw-r--r--ndb/src/client/odbc/common/common.hpp6
-rw-r--r--ndb/src/client/odbc/driver/driver.cpp2
-rw-r--r--ndb/src/client/odbc/handles/HandleRoot.cpp1
-rw-r--r--ndb/src/client/odbc/handles/PoolNdb.cpp1
-rw-r--r--ndb/src/client/odbc/handles/PoolNdb.hpp2
-rw-r--r--ndb/src/common/portlib/unix/NdbDaemon.c6
-rw-r--r--ndb/src/common/portlib/unix/NdbThread.c7
-rw-r--r--ndb/src/common/util/md5_hash.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp18
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.hpp32
-rw-r--r--ndb/src/kernel/blocks/dbtux/Dbtux.hpp34
-rw-r--r--ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp10
-rw-r--r--ndb/src/kernel/blocks/trix/Trix.hpp17
-rw-r--r--ndb/src/kernel/ndb-main/Main.cpp6
-rw-r--r--ndb/src/mgmclient/CommandInterpreter.cpp28
-rw-r--r--ndb/src/ndbapi/DictCache.hpp3
-rw-r--r--ndb/src/ndbapi/Ndb.cpp4
-rw-r--r--ndb/src/ndbapi/NdbDictionary.cpp2
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.cpp4
-rw-r--r--ndb/src/rep/SignalQueue.hpp2
-rw-r--r--ndb/src/rep/adapters/ExtNDB.cpp9
-rw-r--r--ndb/src/rep/adapters/ExtNDB.hpp10
-rw-r--r--ndb/src/rep/transfer/TransPS.cpp5
-rw-r--r--ndb/src/rep/transfer/TransPS.hpp8
-rw-r--r--ndb/src/rep/transfer/TransSS.cpp5
-rw-r--r--ndb/src/rep/transfer/TransSS.hpp6
-rw-r--r--ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp20
-rw-r--r--ndb/test/odbc/driver/testOdbcDriver.cpp2
-rw-r--r--ndb/tools/ndbsql/ndbsql.cpp1
41 files changed, 202 insertions, 97 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index ab36663aab3..6322839820f 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -106,6 +106,7 @@ monty@tik.
monty@tik.mysql.fi
monty@tramp.mysql.fi
monty@work.mysql.com
+mronstrom@mysql.com
msvensson@build.mysql.com
mwagner@cash.mwagner.org
mwagner@evoq.mwagner.org
@@ -113,6 +114,7 @@ mwagner@work.mysql.com
mydev@mysql.com
mysql@home.(none)
mysqldev@build.mysql2.com
+mysqldev@mysql.com
ndbdev@ndbmaster.mysql.com
nick@mysql.com
nick@nick.leippe.com
@@ -123,6 +125,7 @@ paul@ice.local
paul@ice.snake.net
paul@kite-hub.kitebird.com
paul@teton.kitebird.com
+pekka@mysql.com
pem@mysql.com
peter@linux.local
peter@mysql.com
diff --git a/configure.in b/configure.in
index 2017a6172fc..b29297ecdbb 100644
--- a/configure.in
+++ b/configure.in
@@ -2754,6 +2754,14 @@ EOF
if test X"$have_ndbcluster" = Xyes
then
+ if test X"$mysql_cv_compress" != Xyes
+ then
+ echo
+ echo "MySQL Cluster table handler ndbcluster requires compress/uncompress."
+ echo "Commonly available in libzlib.a. Please install and rerun configure."
+ echo
+ exit 1
+ fi
sql_server_dirs="$sql_server_dirs ndb"
echo "CONFIGURING FOR NDB CLUSTER"
case $with_debug in
diff --git a/ndb/Makefile b/ndb/Makefile
index 475914f6120..8788eae885d 100644
--- a/ndb/Makefile
+++ b/ndb/Makefile
@@ -7,11 +7,11 @@ replace-targets := all clean
NDB_RELEASE := $(shell ../scripts/mysql_config --version)
all:
- $(MAKE) -C src
- $(MAKE) -C test/src
- $(MAKE) -C tools
- $(MAKE) -C test/ndbapi/flexBench
- $(MAKE) -C test/tools/waiter
+ $(MAKE) -j 1 -C src
+ $(MAKE) -j 1 -C test/src
+ $(MAKE) -j 1 -C tools
+ $(MAKE) -j 1 -C test/ndbapi/flexBench
+ $(MAKE) -j 1 -C test/tools/waiter
include $(NDB_TOP)/Epilogue.mk
diff --git a/ndb/config/GuessConfig.sh b/ndb/config/GuessConfig.sh
index 3caeeaae6d0..8c7886401ba 100755
--- a/ndb/config/GuessConfig.sh
+++ b/ndb/config/GuessConfig.sh
@@ -105,6 +105,7 @@ parse_arguments "$@"
echo "NDB_COMPILER := $NDB_COMPILER"
echo "NDB_VERSION := $NDB_VERSION"
echo "NDB_SCI := $NDB_SCI"
+ echo "NDB_SHM := $NDB_SHM"
echo "NDB_ODBC := $NDB_ODBC"
echo "TERMCAP_LIB := $TERMCAP_LIB"
echo "PACKAGE := $PACKAGE"
diff --git a/ndb/include/kernel/signaldata/CreateEvnt.hpp b/ndb/include/kernel/signaldata/CreateEvnt.hpp
index 7398fb6d8cc..65a07c122a2 100644
--- a/ndb/include/kernel/signaldata/CreateEvnt.hpp
+++ b/ndb/include/kernel/signaldata/CreateEvnt.hpp
@@ -250,7 +250,7 @@ struct CreateEvntReq {
return tmp;
}
void setAttrListBitmask(const AttributeMask & val) {
- m_attrListBitmask = val;
+ AttributeMask::assign(m_attrListBitmask.data, val);
}
Uint32 getEventType() const {
return m_eventType;
diff --git a/ndb/include/kernel/trigger_definitions.h b/ndb/include/kernel/trigger_definitions.h
index a5e7fb1953c..439d65c6c30 100644
--- a/ndb/include/kernel/trigger_definitions.h
+++ b/ndb/include/kernel/trigger_definitions.h
@@ -17,6 +17,7 @@
#ifndef NDB_TRIGGER_DEFINITIONS_H
#define NDB_TRIGGER_DEFINITIONS_H
+#include <ndb_global.h>
#include "ndb_limits.h"
#ifndef MIN
diff --git a/ndb/include/portlib/PortDefs.h b/ndb/include/portlib/PortDefs.h
index 6cd5be0149f..5e24e08ec61 100644
--- a/ndb/include/portlib/PortDefs.h
+++ b/ndb/include/portlib/PortDefs.h
@@ -49,7 +49,7 @@ int getopt(int, char **, char *opts);
#endif // NDB_WIN32
#ifdef NDB_ALPHA
-#ifdef NDB_GCC
+#ifdef NDB_GCC // only for NDB_ALPHA
extern int gnuShouldNotUseRPCC();
#define RPCC() gnuShouldNotUseRPCC();
#else
diff --git a/ndb/include/util/Bitmask.hpp b/ndb/include/util/Bitmask.hpp
index ed981743512..00255d3a86b 100644
--- a/ndb/include/util/Bitmask.hpp
+++ b/ndb/include/util/Bitmask.hpp
@@ -331,11 +331,12 @@ public:
*/
struct Data {
Uint32 data[size];
-
+#if 0
Data & operator=(const Bitmask<size> & src) {
src.assign(size, data);
return *this;
}
+#endif
};
private:
@@ -348,12 +349,13 @@ public:
/**
* assign - Set all bits in <em>dst</em> to corresponding in <em>src/<em>
*/
- void assign(const Bitmask<size>::Data & src);
+ void assign(const typename Bitmask<size>::Data & src);
/**
* assign - Set all bits in <em>dst</em> to corresponding in <em>src/<em>
*/
static void assign(Uint32 dst[], const Uint32 src[]);
+ static void assign(Uint32 dst[], const Bitmask<size> & src);
void assign(const Bitmask<size> & src);
/**
@@ -480,7 +482,14 @@ Bitmask<size>::assign(Uint32 dst[], const Uint32 src[])
template <unsigned size>
inline void
-Bitmask<size>::assign(const Bitmask<size>::Data & src)
+Bitmask<size>::assign(Uint32 dst[], const Bitmask<size> & src)
+{
+ BitmaskImpl::assign(size, dst, src.rep.data);
+}
+
+template <unsigned size>
+inline void
+Bitmask<size>::assign(const typename Bitmask<size>::Data & src)
{
assign(rep.data, src.data);
}
diff --git a/ndb/src/client/odbc/codegen/SimpleParser.cpp b/ndb/src/client/odbc/codegen/SimpleParser.cpp
index 62162172bc8..a2418f49e37 100644
--- a/ndb/src/client/odbc/codegen/SimpleParser.cpp
+++ b/ndb/src/client/odbc/codegen/SimpleParser.cpp
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <common/common.hpp>
#include <NdbMutex.h>
#include <common/StmtArea.hpp>
#include <FlexLexer.h>
diff --git a/ndb/src/client/odbc/common/Ctx.cpp b/ndb/src/client/odbc/common/Ctx.cpp
index 44689657788..d6faa5cba77 100644
--- a/ndb/src/client/odbc/common/Ctx.cpp
+++ b/ndb/src/client/odbc/common/Ctx.cpp
@@ -14,7 +14,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <ndb_global.h>
#include <NdbApi.hpp>
#include <common/common.hpp>
#include "DiagArea.hpp"
diff --git a/ndb/src/client/odbc/common/DataField.cpp b/ndb/src/client/odbc/common/DataField.cpp
index dfd4137ffd9..11aae7d893b 100644
--- a/ndb/src/client/odbc/common/DataField.cpp
+++ b/ndb/src/client/odbc/common/DataField.cpp
@@ -14,7 +14,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <ndb_global.h>
#include "DataField.hpp"
#ifndef INT_MAX
diff --git a/ndb/src/client/odbc/common/OdbcData.cpp b/ndb/src/client/odbc/common/OdbcData.cpp
index 2e1bd768aec..32400e07c7a 100644
--- a/ndb/src/client/odbc/common/OdbcData.cpp
+++ b/ndb/src/client/odbc/common/OdbcData.cpp
@@ -14,7 +14,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <ndb_global.h>
#include "OdbcData.hpp"
OdbcData::OdbcData() :
diff --git a/ndb/src/client/odbc/common/common.hpp b/ndb/src/client/odbc/common/common.hpp
index e90950df9c5..d2f243b6437 100644
--- a/ndb/src/client/odbc/common/common.hpp
+++ b/ndb/src/client/odbc/common/common.hpp
@@ -17,9 +17,13 @@
#ifndef ODBC_COMMON_common_hpp
#define ODBC_COMMON_common_hpp
+#define stpcpy stpcpy
+#include <ndb_global.h>
+#undef swap
+
// misc defs
-#ifdef NDB_GCC
+#ifdef NDB_GCC // only for odbc
#define PRINTFLIKE(i,j) __attribute__ ((format (printf, i, j)))
#else
#define PRINTFLIKE(i,j)
diff --git a/ndb/src/client/odbc/driver/driver.cpp b/ndb/src/client/odbc/driver/driver.cpp
index dabfd5f855b..f992fa70878 100644
--- a/ndb/src/client/odbc/driver/driver.cpp
+++ b/ndb/src/client/odbc/driver/driver.cpp
@@ -14,8 +14,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbMutex.h>
#include "driver.hpp"
+#include <NdbMutex.h>
#undef NDB_ODBC_SIG_DFL
#ifdef NDB_ODBC_SIG_DFL
diff --git a/ndb/src/client/odbc/handles/HandleRoot.cpp b/ndb/src/client/odbc/handles/HandleRoot.cpp
index d901cb5cb7f..13560d55028 100644
--- a/ndb/src/client/odbc/handles/HandleRoot.cpp
+++ b/ndb/src/client/odbc/handles/HandleRoot.cpp
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <common/common.hpp>
#include <NdbMutex.h>
#include <common/DiagArea.hpp>
#include "HandleRoot.hpp"
diff --git a/ndb/src/client/odbc/handles/PoolNdb.cpp b/ndb/src/client/odbc/handles/PoolNdb.cpp
index c487ca2b976..45d3c67ec77 100644
--- a/ndb/src/client/odbc/handles/PoolNdb.cpp
+++ b/ndb/src/client/odbc/handles/PoolNdb.cpp
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <common/common.hpp>
#include <NdbMutex.h>
#include <NdbApi.hpp>
#include "PoolNdb.hpp"
diff --git a/ndb/src/client/odbc/handles/PoolNdb.hpp b/ndb/src/client/odbc/handles/PoolNdb.hpp
index bea7e72a59f..35eac055c30 100644
--- a/ndb/src/client/odbc/handles/PoolNdb.hpp
+++ b/ndb/src/client/odbc/handles/PoolNdb.hpp
@@ -17,8 +17,8 @@
#ifndef ODBC_HANDLES_PoolNdb_hpp
#define ODBC_HANDLES_PoolNdb_hpp
-#include <list>
#include <common/common.hpp>
+#include <list>
class Ndb;
diff --git a/ndb/src/common/portlib/unix/NdbDaemon.c b/ndb/src/common/portlib/unix/NdbDaemon.c
index 186331a4dab..d8d33595156 100644
--- a/ndb/src/common/portlib/unix/NdbDaemon.c
+++ b/ndb/src/common/portlib/unix/NdbDaemon.c
@@ -18,9 +18,9 @@
#include "NdbDaemon.h"
#define NdbDaemon_ErrorSize 500
-long NdbDaemon_DaemonPid;
-int NdbDaemon_ErrorCode;
-char NdbDaemon_ErrorText[NdbDaemon_ErrorSize];
+long NdbDaemon_DaemonPid = 0;
+int NdbDaemon_ErrorCode = 0;
+char NdbDaemon_ErrorText[NdbDaemon_ErrorSize] = "";
int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
diff --git a/ndb/src/common/portlib/unix/NdbThread.c b/ndb/src/common/portlib/unix/NdbThread.c
index a5c42f79be8..d78941454d4 100644
--- a/ndb/src/common/portlib/unix/NdbThread.c
+++ b/ndb/src/common/portlib/unix/NdbThread.c
@@ -21,6 +21,7 @@
#define MAX_THREAD_NAME 16
+//#define USE_PTHREAD_EXTRAS
struct NdbThread
{
@@ -52,12 +53,10 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
pthread_attr_init(&thread_attr);
pthread_attr_setstacksize(&thread_attr, thread_stack_size);
-#if defined NDB_SOLARIS
-#if !defined NDB_SOLARIS6
+#ifdef USE_PTHREAD_EXTRAS
/* Guard stack overflow with a 2k databuffer */
pthread_attr_setguardsize(&thread_attr, 2048);
#endif
-#endif
pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE);
result = pthread_create(&tmpThread->thread,
@@ -104,7 +103,7 @@ void NdbThread_Exit(int status)
int NdbThread_SetConcurrencyLevel(int level)
{
-#ifndef NDB_SOLARIS6
+#ifdef USE_PTHREAD_EXTRAS
return pthread_setconcurrency(level);
#else
return 0;
diff --git a/ndb/src/common/util/md5_hash.cpp b/ndb/src/common/util/md5_hash.cpp
index 5e28edcf8fa..068843183ac 100644
--- a/ndb/src/common/util/md5_hash.cpp
+++ b/ndb/src/common/util/md5_hash.cpp
@@ -48,7 +48,7 @@ void byteReverse(unsigned char *buf, unsigned longs);
*/
void byteReverse(unsigned char *buf, unsigned longs)
{
- uint32 t;
+ Uint32 t;
do {
t = (Uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
((unsigned) buf[1] << 8 | buf[0]);
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 790c29737e9..8cf15b6bef2 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -14,6 +14,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <ndb_global.h>
+
#define DBDICT_C
#include "Dbdict.hpp"
@@ -5703,7 +5705,7 @@ void Dbdict::sendGET_TABINFOREF(Signal* signal,
}//sendGET_TABINFOREF()
Uint32 convertEndian(Uint32 in) {
-#ifdef _BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
Uint32 ut = 0;
ut += ((in >> 24) & 255);
ut += (((in >> 16) & 255) << 8);
@@ -7760,8 +7762,9 @@ Dbdict::createEventComplete_RT_USER_GET(Signal* signal,
#endif
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- evntRecPtr.p->m_reqTracker.init<CreateEvntRef>
- (c_counterMgr, rg, GSN_CREATE_EVNT_REF, evntRecPtr.i);
+ RequestTracker & p = evntRecPtr.p->m_reqTracker;
+ p.init<CreateEvntRef>(c_counterMgr, rg, GSN_CREATE_EVNT_REF, evntRecPtr.i);
+
sendSignal(rg, GSN_CREATE_EVNT_REQ, signal, CreateEvntReq::SignalLength, JBB);
}
@@ -8109,7 +8112,8 @@ void Dbdict::execSUB_START_REQ(Signal* signal)
subbPtr.p->m_senderRef = origSenderRef; // not sure if API sets correctly
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- subbPtr.p->m_reqTracker.init<SubStartRef>(c_counterMgr, rg, GSN_SUB_START_REF, subbPtr.i);
+ RequestTracker & p = subbPtr.p->m_reqTracker;
+ p.init<SubStartRef>(c_counterMgr, rg, GSN_SUB_START_REF, subbPtr.i);
SubStartReq* req = (SubStartReq*) signal->getDataPtrSend();
@@ -8322,7 +8326,8 @@ void Dbdict::execSUB_STOP_REQ(Signal* signal)
#endif
subbPtr.p->m_senderRef = origSenderRef; // not sure if API sets correctly
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- subbPtr.p->m_reqTracker.init<SubStopRef>(c_counterMgr, rg, GSN_SUB_STOP_REF, subbPtr.i);
+ RequestTracker & p = subbPtr.p->m_reqTracker;
+ p.init<SubStopRef>(c_counterMgr, rg, GSN_SUB_STOP_REF, subbPtr.i);
SubStopReq* req = (SubStopReq*) signal->getDataPtrSend();
@@ -8609,7 +8614,8 @@ Dbdict::dropEventUTIL_EXECUTE_READ(Signal* signal,
parseReadEventSys(signal, evntRecPtr.p->m_eventRec);
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- evntRecPtr.p->m_reqTracker.init<SubRemoveRef>(c_counterMgr, rg, GSN_SUB_REMOVE_REF,
+ RequestTracker & p = evntRecPtr.p->m_reqTracker;
+ p.init<SubRemoveRef>(c_counterMgr, rg, GSN_SUB_REMOVE_REF,
evntRecPtr.i);
SubRemoveReq* req = (SubRemoveReq*) signal->getDataPtrSend();
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
index 02e2d4496bf..44086b19efd 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
@@ -102,6 +102,22 @@
#endif
/**
+ * Systable NDB$EVENTS_0
+ */
+
+#define EVENT_SYSTEM_TABLE_NAME "sys/def/NDB$EVENTS_0"
+#define EVENT_SYSTEM_TABLE_LENGTH 6
+
+struct sysTab_NDBEVENTS_0 {
+ char NAME[MAX_TAB_NAME_SIZE];
+ Uint32 EVENT_TYPE;
+ char TABLE_NAME[MAX_TAB_NAME_SIZE];
+ Uint32 ATTRIBUTE_MASK[MAXNROFATTRIBUTESINWORDS];
+ Uint32 SUBID;
+ Uint32 SUBKEY;
+};
+
+/**
* DICT - This blocks handles all metadata
*/
class Dbdict: public SimulatedBlock {
@@ -1227,22 +1243,6 @@ private:
};
typedef Ptr<OpSubEvent> OpSubEventPtr;
- /**
- * Systable NDB$EVENTS_0
- */
-
-#define EVENT_SYSTEM_TABLE_NAME "sys/def/NDB$EVENTS_0"
-#define EVENT_SYSTEM_TABLE_LENGTH 6
-
- struct sysTab_NDBEVENTS_0 {
- char NAME[MAX_TAB_NAME_SIZE];
- Uint32 EVENT_TYPE;
- char TABLE_NAME[MAX_TAB_NAME_SIZE];
- Uint32 ATTRIBUTE_MASK[MAXNROFATTRIBUTESINWORDS];
- Uint32 SUBID;
- Uint32 SUBKEY;
- };
-
static const Uint32 sysTab_NDBEVENTS_0_szs[];
/**
diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
index 4737c8422c4..b73af5b0d76 100644
--- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
@@ -103,7 +103,9 @@ private:
static const unsigned MaxNodeHandles = 128; // enough for 1 operation
#endif
static const unsigned MaxAttrDataSize = 2048;
+public:
static const unsigned DescPageSize = 256;
+private:
static const unsigned MaxTreeNodeSize = MAX_TTREE_NODE_SIZE;
static const unsigned ScanBoundSegmentSize = 7;
static const unsigned MaxAccLockOps = MAX_PARALLEL_OP_PER_SCAN;
@@ -126,10 +128,13 @@ private:
Data& operator+=(size_t n);
AttributeHeader& ah() const;
};
+ friend class Data;
/*
* Pointer to constant Uint32 data.
*/
+ struct ConstData;
+ friend struct ConstData;
struct ConstData {
private:
const Uint32* m_data;
@@ -173,6 +178,8 @@ private:
* of "original" tuple and tuple version. Uses 2 words to get correct
* aligment (one byte is wasted currently).
*/
+ struct TreeEnt;
+ friend struct TreeEnt;
struct TreeEnt {
TupAddr m_tupAddr; // address of original tuple
Uint16 m_tupVersion; // version
@@ -202,6 +209,8 @@ private:
* a node is about to be removed. If occupancy is 1, only max entry
* is present but both min and max prefixes are set.
*/
+ struct TreeNode;
+ friend struct TreeNode;
struct TreeNode {
TupAddr m_link[3]; // link to 0-left child 1-right child 2-parent
Uint8 m_side; // we are 0-left child 1-right child 2-root
@@ -228,6 +237,8 @@ private:
* Tree header. There is one in each fragment. Contains tree
* parameters and address of root node.
*/
+ struct TreeHead;
+ friend struct TreeHead;
struct TreeHead {
Uint8 m_nodeSize; // words in tree node
Uint8 m_prefSize; // words in min/max prefix each
@@ -248,6 +259,8 @@ private:
* also represented by position 0 of next node. Includes direction
* and copy of entry used by scan.
*/
+ struct TreePos;
+ friend struct TreePos;
struct TreePos {
TupAddr m_addr; // logical node address
TupLoc m_loc; // physical address
@@ -264,6 +277,8 @@ private:
* Descriptor page. The "hot" metadata for an index is stored as
* a contiguous array of words on some page.
*/
+ struct DescPage;
+ friend struct DescPage;
struct DescPage {
Uint32 m_nextPage;
Uint32 m_numFree; // number of free words
@@ -301,6 +316,8 @@ private:
* Complete metadata for one index. The array of attributes has
* variable size.
*/
+ struct DescEnt;
+ friend struct DescEnt;
struct DescEnt {
DescHead m_descHead;
DescAttr m_descAttr[1]; // variable size data
@@ -329,6 +346,8 @@ private:
* be for an entry we were moved away from. In any case nothing
* happens with current entry before lock wait flag is cleared.
*/
+ struct ScanOp;
+ friend struct ScanOp;
struct ScanOp {
enum {
Undef = 0,
@@ -382,6 +401,8 @@ private:
* Ordered index. Top level data structure. The primary table (table
* being indexed) lives in TUP.
*/
+ struct Index;
+ friend struct Index;
struct Index {
enum State {
NotDefined = 0,
@@ -412,6 +433,8 @@ private:
* duplicate fragments known to LQH/ACC/TUP. Includes tree header.
* There are no maintenance operation records yet.
*/
+ struct Frag;
+ friend struct Frag;
struct Frag {
Uint32 m_tableId; // copy from index level
Uint32 m_indexId;
@@ -458,6 +481,8 @@ private:
* different implementations of index memory access. The cache is
* committed and released at the end of the operation.
*/
+ struct NodeHandle;
+ friend struct NodeHandle;
struct NodeHandle {
enum Flags {
// bits 0,1 mark need for left,right prefix
@@ -508,7 +533,6 @@ private:
};
typedef Ptr<NodeHandle> NodeHandlePtr;
ArrayPool<NodeHandle> c_nodeHandlePool;
- friend class NodeHandle;
// parameters for methods
@@ -528,6 +552,8 @@ private:
/*
* Read index key attributes.
*/
+ struct ReadPar;
+ friend struct ReadPar;
struct ReadPar {
TreeEnt m_ent; // tuple to read
unsigned m_first; // first index attribute
@@ -551,6 +577,8 @@ private:
/*
* Tree search for entry.
*/
+ struct SearchPar;
+ friend struct SearchPar;
struct SearchPar {
ConstData m_data; // input index key values
TreeEnt m_ent; // input tuple and version
@@ -560,6 +588,8 @@ private:
/*
* Attribute data comparison.
*/
+ struct CmpPar;
+ friend struct CmpPar;
struct CmpPar {
ConstData m_data1; // full search key
ConstData m_data2; // full or prefix data
@@ -572,6 +602,8 @@ private:
/*
* Scan bound comparison.
*/
+ struct BoundPar;
+ friend struct BoundPar;
struct BoundPar {
ConstData m_data1; // full bound data
ConstData m_data2; // full or prefix data
diff --git a/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp b/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
index f73c1ec5ee7..7ba7d0d25c6 100644
--- a/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
@@ -17,7 +17,8 @@
/**
* O_DIRECT
*/
-#ifdef NDB_LINUX
+#if 0
+//#ifdef NDB_LINUX
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
@@ -34,12 +35,14 @@
#include <NdbThread.h>
#include <signaldata/FsOpenReq.hpp>
-#ifdef NDB_LINUX
+#if 0
+#ifdef HAVE_PREAD
// This is for pread and pwrite
#ifndef __USE_UNIX98
#define __USE_UNIX98
#endif
#endif
+#endif
#if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE
#else
@@ -343,12 +346,11 @@ void AsyncFile::openReq(Request* request)
}
#if 0
-#if NDB_LINUX
+ //#if NDB_LINUX
if(Global_useO_DIRECT){
new_flags |= O_DIRECT;
}
#endif
-#endif
switch(flags & 0x3){
case FsOpenReq::OM_READONLY:
diff --git a/ndb/src/kernel/blocks/trix/Trix.hpp b/ndb/src/kernel/blocks/trix/Trix.hpp
index 05563559b77..f096e135094 100644
--- a/ndb/src/kernel/blocks/trix/Trix.hpp
+++ b/ndb/src/kernel/blocks/trix/Trix.hpp
@@ -39,6 +39,15 @@ public:
Trix(const class Configuration & conf);
virtual ~Trix();
+public:
+ // Subscription data, when communicating with SUMA
+
+ enum RequestType {
+ TABLE_REORG = 0,
+ INDEX_BUILD = 1
+ };
+ typedef DataBuffer<11> AttrOrderBuffer;
+
private:
// Private attributes
@@ -87,14 +96,6 @@ private:
Uint16 c_noNodesFailed;
Uint16 c_noActiveNodes;
- // Subscription data, when communicating with SUMA
- enum RequestType {
- TABLE_REORG = 0,
- INDEX_BUILD = 1
- };
-
- typedef DataBuffer<11> AttrOrderBuffer;
-
AttrOrderBuffer::DataBufferPool c_theAttrOrderBufferPool;
struct SubscriptionRecord {
diff --git a/ndb/src/kernel/ndb-main/Main.cpp b/ndb/src/kernel/ndb-main/Main.cpp
index 46eb41b0ec6..2ac32ada4ec 100644
--- a/ndb/src/kernel/ndb-main/Main.cpp
+++ b/ndb/src/kernel/ndb-main/Main.cpp
@@ -33,7 +33,7 @@
#include <EventLogger.hpp>
#include <NodeState.hpp>
-#if defined NDB_SOLARIS
+#if defined NDB_SOLARIS // ok
#include <sys/processor.h> // For system informatio
#endif
@@ -199,7 +199,7 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
}
RegCloseKey(hKey);
}
-#elif defined NDB_SOLARIS
+#elif defined NDB_SOLARIS // ok
// Search for at max 16 processors among the first 256 processor ids
processor_info_t pinfo; memset(&pinfo, 0, sizeof(pinfo));
int pid = 0;
@@ -213,7 +213,7 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
if(logLevel.getLogLevel(LogLevel::llStartUp) > 0){
g_eventLogger.info("NDB Cluster -- DB node %d", globalData.ownId);
g_eventLogger.info("%s --", NDB_VERSION_STRING);
-#ifdef NDB_SOLARIS
+#ifdef NDB_SOLARIS // ok
g_eventLogger.info("NDB is running on a machine with %d processor(s) at %d MHz",
processor, speed);
#endif
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp
index fba5fda32dd..cf9d885847a 100644
--- a/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -30,10 +30,6 @@
#include "MgmtErrorReporter.hpp"
#include "CpcClient.hpp"
-#ifdef NDB_SOLARIS // XXX fix me
-static char* strsep(char** x, const char* y) { return 0; }
-#endif
-
/*****************************************************************************
* HELP
@@ -1865,17 +1861,36 @@ CommandInterpreter::executeRep(char* parameters)
* CPC
*****************************************************************************/
+#if 0
+
+#if 0
+//#ifdef NDB_SOLARIS // XXX fix me
+static char* strsep(char** x, const char* y) { return 0; }
+#endif
+
+// Note this code has not been verified
+#if 0
+static char * my_strsep(char **stringp, const char *delim)
+{
+ char *tmp= *stringp;
+ if (tmp == 0)
+ return 0;
+ *stringp = strtok(tmp, delim);
+ return tmp;
+}
+#endif
+
void
CommandInterpreter::executeCpc(char *parameters)
{
char *host_str = NULL, *port_str = NULL, *end;
long port = 1234; /* XXX */
- while((host_str = strsep(&parameters, " \t:")) != NULL &&
+ while((host_str = my_strsep(&parameters, " \t:")) != NULL &&
host_str[0] == '\0');
if(parameters && parameters[0] != '\0') {
- while((port_str = strsep(&parameters, " \t:")) != NULL &&
+ while((port_str = my_strsep(&parameters, " \t:")) != NULL &&
port_str[0] == '\0');
errno = 0;
@@ -1944,6 +1959,7 @@ CommandInterpreter::executeCpc(char *parameters)
<< endl;
return;
}
+#endif
#if 0
static
diff --git a/ndb/src/ndbapi/DictCache.hpp b/ndb/src/ndbapi/DictCache.hpp
index e59793bbc09..098acc9006a 100644
--- a/ndb/src/ndbapi/DictCache.hpp
+++ b/ndb/src/ndbapi/DictCache.hpp
@@ -56,13 +56,14 @@ public:
NdbTableImpl* put(const char * name, NdbTableImpl *);
void drop(NdbTableImpl *);
void release(NdbTableImpl *);
-private:
+public:
enum Status {
OK = 0,
DROPPED = 1,
RETREIVING = 2
};
+private:
struct TableVersion {
Uint32 m_version;
Uint32 m_refCount;
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp
index 0304db67a39..fe21b4e02a4 100644
--- a/ndb/src/ndbapi/Ndb.cpp
+++ b/ndb/src/ndbapi/Ndb.cpp
@@ -825,7 +825,7 @@ Ndb::opTupleIdOnNdb(Uint32 aTableId, Uint64 opValue, Uint32 op)
tOperation->interpretedUpdateTuple();
tOperation->equal("SYSKEY_0", aTableId );
{
-#ifdef NDB_SOLARIS
+#ifdef WORDS_BIGENDIAN
Uint64 cacheSize64 = opValue; // XXX interpreter bug on Uint32
tOperation->incValue("NEXTID", cacheSize64);
#else
@@ -991,7 +991,7 @@ Ndb::StartTransactionNodeSelectionData::release(){
Uint32
convertEndian(Uint32 Data)
{
-#ifdef _BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
Uint32 t1, t2, t3, t4;
t4 = (Data >> 24) & 255;
t3 = (Data >> 16) & 255;
diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp
index b068ea6460f..89ed801bec5 100644
--- a/ndb/src/ndbapi/NdbDictionary.cpp
+++ b/ndb/src/ndbapi/NdbDictionary.cpp
@@ -234,7 +234,7 @@ NdbDictionary::Table::~Table(){
}
NdbDictionary::Table&
-NdbDictionary::Table::operator=(const NdbDictionary::Table::Table& table)
+NdbDictionary::Table::operator=(const NdbDictionary::Table& table)
{
m_impl.assign(table.m_impl);
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index 1a7147c5b21..3b31fa70e35 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -55,8 +55,8 @@ NdbColumnImpl::NdbColumnImpl(NdbDictionary::Column & f)
init();
}
-NdbColumnImpl::NdbColumnImpl&
-NdbColumnImpl::operator=(const NdbColumnImpl::NdbColumnImpl& col)
+NdbColumnImpl&
+NdbColumnImpl::operator=(const NdbColumnImpl& col)
{
m_attrId = col.m_attrId;
m_name = col.m_name;
diff --git a/ndb/src/rep/SignalQueue.hpp b/ndb/src/rep/SignalQueue.hpp
index 5ebc78a3a37..697bca85893 100644
--- a/ndb/src/rep/SignalQueue.hpp
+++ b/ndb/src/rep/SignalQueue.hpp
@@ -53,7 +53,7 @@ public:
template<class T> bool waitFor(Vector<T> &t,
T *&handler,
NdbApiSignal *&signal,
- Uint32 timeout = DEFAULT_TIMEOUT);
+ Uint32 timeout);
/**
* size()
diff --git a/ndb/src/rep/adapters/ExtNDB.cpp b/ndb/src/rep/adapters/ExtNDB.cpp
index eb541cdced9..036406828be 100644
--- a/ndb/src/rep/adapters/ExtNDB.cpp
+++ b/ndb/src/rep/adapters/ExtNDB.cpp
@@ -186,8 +186,8 @@ public:
};
};
-void *
-ExtNDB::signalExecThread_C(void *r)
+extern "C"
+void *signalExecThread_C(void *r)
{
ExtNDB *grepps = (ExtNDB*)r;
@@ -198,6 +198,7 @@ ExtNDB::signalExecThread_C(void *r)
return 0;
}
+
void
ExtNDB::signalExecThreadRun()
{
@@ -233,10 +234,12 @@ ExtNDB::signalExecThreadRun()
sl.push_back(SigMatch(GSN_GREP_SUB_START_REF, &ExtNDB::sendSignalRep));
sl.push_back(SigMatch(GSN_GREP_SUB_CREATE_REF, &ExtNDB::sendSignalRep));
+
while(1) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
- if(m_signalRecvQueue.waitFor(sl, handler, signal)) {
+
+ if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT)) {
#if 0
RLOG(("Removed signal from queue (GSN: %d, QSize: %d)",
signal->readSignalNumber(), m_signalRecvQueue.size()));
diff --git a/ndb/src/rep/adapters/ExtNDB.hpp b/ndb/src/rep/adapters/ExtNDB.hpp
index bcbf51393aa..228c980fd06 100644
--- a/ndb/src/rep/adapters/ExtNDB.hpp
+++ b/ndb/src/rep/adapters/ExtNDB.hpp
@@ -34,6 +34,10 @@
#include <rep/storage/GCIContainerPS.hpp>
#include "ExtAPI.hpp"
+extern "C" {
+static void * signalExecThread_C(void *);
+}
+
/**
* @class ExtNDB
* @brief Class responsible for connection to primary system GREP
@@ -58,15 +62,15 @@ public:
void signalErrorHandler(NdbApiSignal * s, Uint32 nodeId);
private:
+ friend void * signalExecThread_C(void *);
+ void signalExecThreadRun();
+
static void execSignal(void* signalSender, NdbApiSignal* signal,
class LinearSectionPtr ptr[3]);
static void execNodeStatus(void* signalSender, NodeId,
bool alive, bool nfCompleted);
- void signalExecThreadRun();
- static void * signalExecThread_C(void *);
-
void sendSignalRep(NdbApiSignal *);
void sendDisconnectRep(Uint32 nodeId);
diff --git a/ndb/src/rep/transfer/TransPS.cpp b/ndb/src/rep/transfer/TransPS.cpp
index 1f65e95850d..d43555a0ce5 100644
--- a/ndb/src/rep/transfer/TransPS.cpp
+++ b/ndb/src/rep/transfer/TransPS.cpp
@@ -153,8 +153,9 @@ public:
};
};
+extern "C"
void *
-TransPS::signalExecThread_C(void *r)
+signalExecThread_C(void *r)
{
TransPS *repps = (TransPS*)r;
@@ -196,7 +197,7 @@ TransPS::signalExecThreadRun()
while(1) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
- if(m_signalRecvQueue.waitFor(sl, handler, signal)) {
+ if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT)) {
#if 0
ndbout_c("TransPS: Removed signal from queue (GSN: %d, QSize: %d)",
signal->readSignalNumber(), m_signalRecvQueue.size());
diff --git a/ndb/src/rep/transfer/TransPS.hpp b/ndb/src/rep/transfer/TransPS.hpp
index b47f1acfca2..0464b9e47c0 100644
--- a/ndb/src/rep/transfer/TransPS.hpp
+++ b/ndb/src/rep/transfer/TransPS.hpp
@@ -35,6 +35,10 @@
#include <rep/rep_version.hpp>
+extern "C" {
+static void * signalExecThread_C(void *);
+}
+
/**
* @class TransPS
* @brief Responsible for REP-REP interface in Primary System role
@@ -62,8 +66,10 @@ private:
/**
* SignalQueue executor thread
*/
+
+ friend void * signalExecThread_C(void *);
+
void signalExecThreadRun();
- static void * signalExecThread_C(void *);
static void execSignal(void* signalSender, NdbApiSignal* signal,
class LinearSectionPtr ptr[3]);
diff --git a/ndb/src/rep/transfer/TransSS.cpp b/ndb/src/rep/transfer/TransSS.cpp
index 83f4b570330..719271df238 100644
--- a/ndb/src/rep/transfer/TransSS.cpp
+++ b/ndb/src/rep/transfer/TransSS.cpp
@@ -165,8 +165,9 @@ public:
};
};
+extern "C"
void *
-TransSS::signalExecThread_C(void *r)
+signalExecThread_C(void *r)
{
TransSS *transss = (TransSS*)r;
@@ -243,7 +244,7 @@ TransSS::signalExecThreadRun()
while(1) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
- if(m_signalRecvQueue.waitFor(sl, handler, signal))
+ if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT))
{
#if 0
ndbout_c("TransSS: Removed signal from queue (GSN: %d, QSize: %d)",
diff --git a/ndb/src/rep/transfer/TransSS.hpp b/ndb/src/rep/transfer/TransSS.hpp
index 6f2089e46ac..3340038c8d1 100644
--- a/ndb/src/rep/transfer/TransSS.hpp
+++ b/ndb/src/rep/transfer/TransSS.hpp
@@ -34,6 +34,10 @@
#include <rep/state/RepState.hpp>
+extern "C" {
+static void * signalExecThread_C(void *);
+}
+
/**
* @class TransSS
* @brief Responsible for REP-REP interface in Standby System role
@@ -57,8 +61,8 @@ private:
/***************************************************************************
* Private Methods
***************************************************************************/
+ friend void * signalExecThread_C(void *);
void signalExecThreadRun(); ///< SignalQueue executor thread
- static void * signalExecThread_C(void *);
static void execSignal(void* executorObj, NdbApiSignal* signal,
class LinearSectionPtr ptr[3]);
diff --git a/ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp b/ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp
index 18fd98bdbb3..3b5baf954e0 100644
--- a/ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp
+++ b/ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp
@@ -214,8 +214,8 @@ TESTCASE("ScanLessThan",
"Read all records in table TX with attrX less "\
"than a value and store the resultset in TX_RES."\
"Then compare records in TX_RES with records in TX."){
- TABLE("T1");
- TABLE("T2");
+ // TABLE("T1");
+ // TABLE("T2");
INITIALIZER(runLoadTable);
INITIALIZER(runCreateResultTable);
STEP(runScanLessThan);
@@ -227,8 +227,8 @@ TESTCASE("ScanEqual",
"Read all records in table TX with attrX equal "\
"to a value and store the resultset in TX_RES."\
"Then compare records in TX_RES with records in TX."){
- TABLE("T1");
- TABLE("T2");
+ // TABLE("T1");
+ // TABLE("T2");
INITIALIZER(runLoadTable);
INITIALIZER(runCreateResultTable);
STEP(runScanEqual);
@@ -239,8 +239,8 @@ TESTCASE("ScanEqual",
TESTCASE("ScanEqualLoop",
"Scan all records in TX equal to a value."\
"Do this loop number of times"){
- TABLE("T1");
- TABLE("T2");
+ // TABLE("T1");
+ // TABLE("T2");
INITIALIZER(runLoadTable);
INITIALIZER(runCreateResultTable);
STEP(runScanEqualLoop);
@@ -251,8 +251,8 @@ TESTCASE("ScanEqualVerifyLoop",
"Scan all records in TX equal to a value."\
"Verify record in TX_RES table"\
"Do this loop number of times"){
- TABLE("T1");
- TABLE("T2");
+ // TABLE("T1");
+ // TABLE("T2");
INITIALIZER(runLoadTable);
INITIALIZER(runCreateResultTable);
STEP(runScanEqualVerifyLoop);
@@ -262,8 +262,8 @@ TESTCASE("ScanEqualVerifyLoop",
TESTCASE("ScanLessThanLoop",
"Scan all records in TX less than a value."\
"Do this loop number of times"){
- TABLE("T1");
- TABLE("T2");
+ // TABLE("T1");
+ // TABLE("T2");
INITIALIZER(runLoadTable);
INITIALIZER(runCreateResultTable);
STEP(runScanLessThanLoop);
diff --git a/ndb/test/odbc/driver/testOdbcDriver.cpp b/ndb/test/odbc/driver/testOdbcDriver.cpp
index b856b6a21f2..d3b3802ebe1 100644
--- a/ndb/test/odbc/driver/testOdbcDriver.cpp
+++ b/ndb/test/odbc/driver/testOdbcDriver.cpp
@@ -37,6 +37,7 @@
*/
#include <ndb_global.h>
+#undef test
#include <ndb_version.h>
#include <kernel/ndb_limits.h>
#include <Bitmask.hpp>
@@ -1281,6 +1282,7 @@ struct Fld {
return test.verify(m_double, m_ind, fld.m_double, fld.m_ind);
}
assert(false);
+ return false;
}
// debug
void print() const {
diff --git a/ndb/tools/ndbsql/ndbsql.cpp b/ndb/tools/ndbsql/ndbsql.cpp
index ce73a972f47..33a3e39776a 100644
--- a/ndb/tools/ndbsql/ndbsql.cpp
+++ b/ndb/tools/ndbsql/ndbsql.cpp
@@ -138,6 +138,7 @@ bool emptyString(const char* s) {
* to obtain the row count.
*/
#define MAXCOLS 100
+#undef max
#define max(a,b) ((a)>(b)?(a):(b))
#define MAX_MESSAGE 500