summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--configure.in3
-rw-r--r--ndb/Makefile.am10
-rwxr-xr-xndb/config/make-win-dsw.sh42
-rwxr-xr-xndb/config/win-includes8
-rw-r--r--ndb/config/win-lib.am100
-rwxr-xr-xndb/config/win-libraries56
-rwxr-xr-xndb/config/win-name7
-rw-r--r--ndb/config/win-prg.am98
-rwxr-xr-xndb/config/win-sources8
-rw-r--r--ndb/docs/Makefile.am2
-rw-r--r--ndb/include/Makefile.am2
-rw-r--r--ndb/include/debugger/GrepError.hpp8
-rw-r--r--ndb/include/kernel/LogLevel.hpp2
-rw-r--r--ndb/include/kernel/signaldata/FsCloseReq.hpp2
-rw-r--r--ndb/include/kernel/signaldata/RepImpl.hpp12
-rw-r--r--ndb/include/kernel/signaldata/UtilLock.hpp24
-rw-r--r--ndb/include/logger/SysLogHandler.hpp4
-rw-r--r--ndb/include/mgmapi/mgmapi.h3
-rw-r--r--ndb/include/mgmcommon/IPCConfig.hpp2
-rw-r--r--ndb/include/ndb_global.h.in (renamed from ndb/include/ndb_global.h)62
-rw-r--r--ndb/include/ndb_types.h6
-rw-r--r--ndb/include/ndb_version.h.in (renamed from ndb/include/ndb_version.h)15
-rw-r--r--ndb/include/ndbapi/NdbConnection.hpp2
-rw-r--r--ndb/include/ndbapi/NdbDictionary.hpp2
-rw-r--r--ndb/include/ndbapi/ndb_cluster_connection.hpp2
-rw-r--r--ndb/include/portlib/NdbTCP.h2
-rw-r--r--ndb/include/portlib/PortDefs.h43
-rw-r--r--ndb/include/transporter/TransporterRegistry.hpp2
-rw-r--r--ndb/include/util/Parser.hpp6
-rw-r--r--ndb/include/util/SimpleProperties.hpp20
-rw-r--r--ndb/include/util/SocketServer.hpp2
-rw-r--r--ndb/src/Makefile.am15
-rw-r--r--ndb/src/common/Makefile.am2
-rw-r--r--ndb/src/common/debugger/EventLogger.cpp30
-rw-r--r--ndb/src/common/debugger/GrepError.cpp4
-rw-r--r--ndb/src/common/debugger/Makefile.am14
-rw-r--r--ndb/src/common/debugger/signaldata/FsCloseReq.cpp2
-rw-r--r--ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp2
-rw-r--r--ndb/src/common/debugger/signaldata/Makefile.am13
-rw-r--r--ndb/src/common/logger/FileLogHandler.cpp4
-rw-r--r--ndb/src/common/logger/LogHandlerList.hpp1
-rw-r--r--ndb/src/common/logger/Logger.cpp10
-rw-r--r--ndb/src/common/logger/Makefile.am18
-rw-r--r--ndb/src/common/mgmcommon/ConfigRetriever.cpp7
-rw-r--r--ndb/src/common/mgmcommon/Makefile.am14
-rw-r--r--ndb/src/common/portlib/Makefile.am24
-rw-r--r--ndb/src/common/portlib/NdbConfig.c23
-rw-r--r--ndb/src/common/portlib/win32/NdbCondition.c178
-rw-r--r--ndb/src/common/portlib/win32/NdbDaemon.c44
-rw-r--r--ndb/src/common/portlib/win32/NdbEnv.c31
-rw-r--r--ndb/src/common/portlib/win32/NdbHost.c52
-rw-r--r--ndb/src/common/portlib/win32/NdbMem.c283
-rw-r--r--ndb/src/common/portlib/win32/NdbMutex.c73
-rw-r--r--ndb/src/common/portlib/win32/NdbSleep.c32
-rw-r--r--ndb/src/common/portlib/win32/NdbTCP.c39
-rw-r--r--ndb/src/common/portlib/win32/NdbThread.c114
-rw-r--r--ndb/src/common/portlib/win32/NdbTick.c64
-rw-r--r--ndb/src/common/transporter/Makefile.am14
-rw-r--r--ndb/src/common/transporter/Transporter.cpp2
-rw-r--r--ndb/src/common/transporter/TransporterRegistry.cpp19
-rw-r--r--ndb/src/common/util/File.cpp8
-rw-r--r--ndb/src/common/util/Makefile.am14
-rw-r--r--ndb/src/common/util/Properties.cpp2
-rw-r--r--ndb/src/common/util/SocketClient.cpp20
-rw-r--r--ndb/src/common/util/basestring_vsnprintf.c34
-rw-r--r--ndb/src/common/util/version.c5
-rw-r--r--ndb/src/cw/Makefile.am3
-rw-r--r--ndb/src/cw/cpcd/Makefile.am2
-rw-r--r--ndb/src/kernel/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/Makefile.am2
-rw-r--r--ndb/src/kernel/blocks/backup/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp2
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbacc/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp6
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.hpp2
-rw-r--r--ndb/src/kernel/blocks/dbdict/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbdih/Dbdih.hpp2
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihMain.cpp4
-rw-r--r--ndb/src/kernel/blocks/dbdih/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dblqh/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcMain.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtc/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbtup/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbtux/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbutil/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/grep/Grep.cpp36
-rw-r--r--ndb/src/kernel/blocks/grep/Grep.hpp8
-rw-r--r--ndb/src/kernel/blocks/grep/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp2
-rw-r--r--ndb/src/kernel/blocks/qmgr/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/suma/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/trix/Makefile.am14
-rw-r--r--ndb/src/kernel/error/Makefile.am14
-rw-r--r--ndb/src/kernel/main.cpp20
-rw-r--r--ndb/src/kernel/vm/Callback.hpp7
-rw-r--r--ndb/src/kernel/vm/Configuration.cpp18
-rw-r--r--ndb/src/kernel/vm/Emulator.cpp4
-rw-r--r--ndb/src/kernel/vm/Makefile.am14
-rw-r--r--ndb/src/kernel/vm/Mutex.cpp53
-rw-r--r--ndb/src/kernel/vm/Mutex.hpp102
-rw-r--r--ndb/src/kernel/vm/SectionReader.cpp2
-rw-r--r--ndb/src/kernel/vm/SectionReader.hpp2
-rw-r--r--ndb/src/kernel/vm/SimplePropertiesSection.cpp4
-rw-r--r--ndb/src/kernel/vm/SimulatedBlock.cpp2
-rw-r--r--ndb/src/kernel/vm/SimulatedBlock.hpp71
-rw-r--r--ndb/src/mgmapi/Makefile.am14
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp2
-rw-r--r--ndb/src/mgmapi/mgmapi_configuration.cpp3
-rw-r--r--ndb/src/mgmapi/mgmapi_configuration.hpp2
-rw-r--r--ndb/src/mgmclient/Makefile.am26
-rw-r--r--ndb/src/mgmsrv/CommandInterpreter.cpp9
-rw-r--r--ndb/src/mgmsrv/Config.cpp16
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.cpp697
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.hpp10
-rw-r--r--ndb/src/mgmsrv/InitConfigFileParser.cpp19
-rw-r--r--ndb/src/mgmsrv/Makefile.am18
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp9
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.hpp2
-rw-r--r--ndb/src/mgmsrv/Services.cpp12
-rw-r--r--ndb/src/mgmsrv/Services.hpp2
-rw-r--r--ndb/src/mgmsrv/SignalQueue.hpp12
-rw-r--r--ndb/src/mgmsrv/main.cpp4
-rw-r--r--ndb/src/ndbapi/Makefile.am14
-rw-r--r--ndb/src/ndbapi/Ndb.cpp2
-rw-r--r--ndb/src/ndbapi/NdbBlob.cpp6
-rw-r--r--ndb/src/ndbapi/NdbConnection.cpp4
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.hpp2
-rw-r--r--ndb/src/ndbapi/NdbImpl.hpp4
-rw-r--r--ndb/src/ndbapi/NdbOperationExec.cpp6
-rw-r--r--ndb/src/ndbapi/ObjectMap.hpp2
-rw-r--r--ndb/src/ndbapi/ndberror.c9
-rw-r--r--ndb/test/Makefile.am2
-rw-r--r--ndb/test/include/NdbSchemaOp.hpp2
-rw-r--r--ndb/test/ndbapi/Makefile.am61
-rw-r--r--ndb/test/ndbapi/bank/Makefile.am2
-rw-r--r--ndb/test/ndbapi/testOperations.cpp2
-rw-r--r--ndb/test/run-test/Makefile.am2
-rw-r--r--ndb/test/src/CpcClient.cpp3
-rw-r--r--ndb/test/src/Makefile.am14
-rw-r--r--ndb/test/src/NdbRestarts.cpp2
-rw-r--r--ndb/test/src/getarg.c3
-rw-r--r--ndb/test/tools/Makefile.am2
-rw-r--r--ndb/tools/Makefile.am106
-rw-r--r--scripts/make_win_src_distribution.sh9
-rw-r--r--sql/ha_ndbcluster.cc2
149 files changed, 2715 insertions, 794 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index fbded8f67d3..61590de940d 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -2,6 +2,7 @@ Administrador@light.
Administrator@co3064164-a.
Administrator@co3064164-a.rochd1.qld.optushome.com.au
Administrator@fred.
+Administrator@w2k.
Greg@greg-laptop.
Miguel@light.local
Sinisa@sinisa.nasamreza.org
diff --git a/configure.in b/configure.in
index 7a334dee7c1..748f86bdbb7 100644
--- a/configure.in
+++ b/configure.in
@@ -748,7 +748,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
- sys/ioctl.h malloc.h sys/malloc.h linux/config.h)
+ sys/ioctl.h malloc.h sys/malloc.h linux/config.h sys/resource.h sys/param.h)
#--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS
@@ -2724,6 +2724,7 @@ AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
ndb/test/ndbapi/bank/Makefile dnl
ndb/test/tools/Makefile dnl
ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
+ ndb/include/ndb_version.h ndb/include/ndb_global.h dnl
)
fi
diff --git a/ndb/Makefile.am b/ndb/Makefile.am
index 82f424fcfb4..32c821383e6 100644
--- a/ndb/Makefile.am
+++ b/ndb/Makefile.am
@@ -17,3 +17,13 @@ dist-hook:
done; \
fi; \
done
+
+windoze:
+ for i in `find . -name 'Makefile.am'`; do make -C `dirname $$i` windoze-dsp; done
+
+windoze-dsp:
+
+all-windoze-dsp: windoze
+ find . -name '*.dsp' | grep -v SCCS | xargs unix2dos
+ $(top_srcdir)/ndb/config/make-win-dsw.sh | unix2dos > ndb.dsw
+ tar cvfz ndb-win-dsp.tar.gz ndb.dsw `find . -name '*.dsp' | grep -v SCCS`
diff --git a/ndb/config/make-win-dsw.sh b/ndb/config/make-win-dsw.sh
new file mode 100755
index 00000000000..b0613620f8a
--- /dev/null
+++ b/ndb/config/make-win-dsw.sh
@@ -0,0 +1,42 @@
+
+cat <<EOF
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+EOF
+
+for i in `find . -name '*.dsp' | grep -v SCCS`
+do
+ name=`basename $i | sed 's/\.dsp//'`
+ cat<<EOF
+
+Project: "$name"="`echo $i | sed 's/\//\\\/g'`" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+EOF
+done
+
+cat<<EOF
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
+EOF
diff --git a/ndb/config/win-includes b/ndb/config/win-includes
new file mode 100755
index 00000000000..fa5984fd25e
--- /dev/null
+++ b/ndb/config/win-includes
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+dst=$1
+shift
+
+out=`echo $* | sed 's/-I\([^ ]*\)/\/I "\1"/g'`
+sed -e "s!@includes@!$out!g" $dst > /tmp/$dst.$$
+mv /tmp/$dst.$$ $dst
diff --git a/ndb/config/win-lib.am b/ndb/config/win-lib.am
new file mode 100644
index 00000000000..05ac1ec8a40
--- /dev/null
+++ b/ndb/config/win-lib.am
@@ -0,0 +1,100 @@
+# Microsoft Developer Studio Project File - Name="@name@" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=@name@ - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "@name@.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "@name@.mak" CFG="@name@ - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "@name@ - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "@name@ - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=xicl6.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "@name@ - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /O2 /D "WIN32" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /FD /c
+# ADD BASE CPP @includes@
+# ADD CPP @includes@
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=xilink6.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:".\lib_release\@name@.lib"
+@release_libs@
+
+!ELSEIF "$(CFG)" == "@name@ - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "debug"
+# PROP Intermediate_Dir "debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /D "WIN32" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /FD /c
+# ADD BASE CPP @includes@
+# ADD CPP @includes@
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=xilink6.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:".\lib_debug\@name@.lib"
+@debug_libs@
+
+!ENDIF
+
+# Begin Target
+
+# Name "@name@ - Win32 Release"
+# Name "@name@ - Win32 Debug"
+
+# Begin Group "Source Files"
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+
+@sources@
+
+# End Group
+
+# End Target
+# End Project
diff --git a/ndb/config/win-libraries b/ndb/config/win-libraries
new file mode 100755
index 00000000000..c7a6fb696ee
--- /dev/null
+++ b/ndb/config/win-libraries
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+dst=$1
+shift
+
+type=$1
+shift
+
+add_lib(){
+ echo `dirname $2`/$1/`basename $2 | sed "s/\.[l]*a/$3.lib/g"`
+}
+
+out_rel=
+out_deb=
+out_tls_rel=
+out_tls_deb=
+for i in $*
+do
+# mysql VC++ project files have for some unknown reason
+# choosen NOT to put libdbug.lib in $(topdir)./dbug but rather in $(topdir)
+# the same goes for mysys and strings
+ lib=$i
+ case $i in
+ *libdbug.a | *libmysys.a | *libmystrings.a)
+ lib=`echo $i | sed s'!dbug\/lib!!' | sed 's!mysys\/lib!!' | sed 's!strings\/libmy!!'`
+ echo "Changing from $i to $lib"
+ ;;
+ esac
+
+ if [ `echo $i | grep -c gcc` -eq 0 ]
+ then
+ out_rel="${out_rel} `add_lib lib_release $lib`"
+ out_deb="${out_deb} `add_lib lib_debug $lib`"
+ out_tls_rel="${out_tls_rel} `add_lib lib_release $lib _tls`"
+ out_tls_deb="${out_tls_deb} `add_lib lib_debug $lib _tls`"
+ fi
+done
+
+fix(){
+ echo "# ADD BASE ${type}32 $*\n# ADD ${type}32 $*\n"
+}
+
+if [ "$out_rel" ]
+then
+ out_rel=`fix $out_rel`
+ out_deb=`fix $out_deb`
+ out_tls_rel=`fix $out_tls_rel`
+ out_tls_deb=`fix $out_tls_deb`
+fi
+
+sed -e "s!@release_libs@!$out_rel!g" \
+ -e "s!@debug_libs@!$out_deb!g" \
+ -e "s!@tls_release_libs@!$out_tls_rel!g" \
+ -e "s!@tls_debug_libs@!$out_tls_deb!g" \
+ $dst > !tmp!$dst.$$
+mv !tmp!$dst.$$ $dst
diff --git a/ndb/config/win-name b/ndb/config/win-name
new file mode 100755
index 00000000000..036f2b9cc2e
--- /dev/null
+++ b/ndb/config/win-name
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+dst=$1
+shift
+
+sed -e "s/@name@/`echo $1 | sed 's/\.[l]*a//g'`/g" $dst > /tmp/$dst.$$
+mv /tmp/$dst.$$ $dst
diff --git a/ndb/config/win-prg.am b/ndb/config/win-prg.am
new file mode 100644
index 00000000000..10a8cfbca02
--- /dev/null
+++ b/ndb/config/win-prg.am
@@ -0,0 +1,98 @@
+# Microsoft Developer Studio Project File - Name="mysqld" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=@name@ - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "@name@.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "@name@.mak" CFG="@name@ - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "@name@ - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "@name@ - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=xicl6.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "@name@ - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "release"
+# PROP Intermediate_Dir "release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDB_WIN32" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /O2 /D "NDB_WIN32" /I "../zlib" /I "../include" /I "../regex" /D "NDEBUG" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /c
+# ADD BASE CPP @includes@
+# ADD CPP @includes@
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=xilink6.exe
+@release_libs@
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"release/@name@-opt.exe"
+# SUBTRACT LINK32 /debug
+
+!ELSEIF "$(CFG)" == "@name@ - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "debug"
+# PROP Intermediate_Dir "debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "NDB_WIN32" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /D "NDB_WIN32" /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /c
+# ADD BASE CPP @includes@
+# ADD CPP @includes@
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=xilink6.exe
+@debug_libs@
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"debug/@name@.exe" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "@name@ - Win32 Release"
+# Name "@name@ - Win32 Debug"
+
+@sources@
+
+# End Target
+# End Project
diff --git a/ndb/config/win-sources b/ndb/config/win-sources
new file mode 100755
index 00000000000..a383bb0e613
--- /dev/null
+++ b/ndb/config/win-sources
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+dst=$1
+shift
+
+out=`echo $* | sed 's!\([^ ]*\)!# Begin Source File\\\nSOURCE=\1\\\n# End Source File\\\n!g'`
+sed -e "s!@sources@!$out!g" $dst > /tmp/$dst.$$
+mv /tmp/$dst.$$ $dst
diff --git a/ndb/docs/Makefile.am b/ndb/docs/Makefile.am
index 554b2fb256e..c7e344b3dee 100644
--- a/ndb/docs/Makefile.am
+++ b/ndb/docs/Makefile.am
@@ -100,3 +100,5 @@ odbcdoc: DUMMY
testdoc: DUMMY
mkdir -p $(OUTDIR)
cd $(top_srcdir)/ndb ; $(DOXYGEN) $(DOXYDIR)/Doxyfile.test
+
+windoze-dsp:
diff --git a/ndb/include/Makefile.am b/ndb/include/Makefile.am
index fc7bd143e69..f729d422dd9 100644
--- a/ndb/include/Makefile.am
+++ b/ndb/include/Makefile.am
@@ -41,3 +41,5 @@ portlib transporter util
dist-hook:
-rm -rf `find $(distdir) -type d -name SCCS`
+
+windoze-dsp:
diff --git a/ndb/include/debugger/GrepError.hpp b/ndb/include/debugger/GrepError.hpp
index ab6a7b272a5..beedbd95c80 100644
--- a/ndb/include/debugger/GrepError.hpp
+++ b/ndb/include/debugger/GrepError.hpp
@@ -24,8 +24,8 @@
*/
class GrepError {
public:
- enum Code {
- NO_ERROR = 0,
+ enum GE_Code {
+ GE_NO_ERROR = 0,
SUBSCRIPTION_ID_NOMEM = 1,
SUBSCRIPTION_ID_NOT_FOUND = 2,
SUBSCRIPTION_ID_NOT_UNIQUE = 3,
@@ -82,12 +82,12 @@ public:
};
struct ErrorDescription {
- Code errCode;
+ GE_Code errCode;
const char * name;
};
static const ErrorDescription errorDescriptions[];
static const Uint32 noOfErrorDescs;
- static const char * getErrorDesc(GrepError::Code err);
+ static const char * getErrorDesc(GrepError::GE_Code err);
};
diff --git a/ndb/include/kernel/LogLevel.hpp b/ndb/include/kernel/LogLevel.hpp
index 467f0604edd..5981ca4701a 100644
--- a/ndb/include/kernel/LogLevel.hpp
+++ b/ndb/include/kernel/LogLevel.hpp
@@ -89,7 +89,7 @@ public:
return memcmp(this, &l, sizeof(* this)) == 0;
}
- LogLevel& operator=(const class EventSubscribeReq & req);
+ LogLevel& operator=(const struct EventSubscribeReq & req);
private:
/**
diff --git a/ndb/include/kernel/signaldata/FsCloseReq.hpp b/ndb/include/kernel/signaldata/FsCloseReq.hpp
index c42afa143e6..10d094fb30b 100644
--- a/ndb/include/kernel/signaldata/FsCloseReq.hpp
+++ b/ndb/include/kernel/signaldata/FsCloseReq.hpp
@@ -75,7 +75,7 @@ inline
void
FsCloseReq::setRemoveFileFlag(UintR & fileflag, bool removefile){
// ASSERT_BOOL(removefile, "FsCloseReq::setRemoveFileFlag");
- if (removefile == true)
+ if (removefile)
fileflag = 1;
else
fileflag = 0;
diff --git a/ndb/include/kernel/signaldata/RepImpl.hpp b/ndb/include/kernel/signaldata/RepImpl.hpp
index affffe46f9c..0de1389a4a9 100644
--- a/ndb/include/kernel/signaldata/RepImpl.hpp
+++ b/ndb/include/kernel/signaldata/RepImpl.hpp
@@ -93,7 +93,7 @@ public:
Uint32 subscriptionId;
Uint32 subscriptionKey;
Uint32 senderNodeId;
- GrepError::Code err;
+ GrepError::GE_Code err;
};
class RepGetGciReq
@@ -151,7 +151,7 @@ public:
Uint32 lastPSGCI;
Uint32 firstSSGCI;
Uint32 lastSSGCI;
- GrepError::Code err;
+ GrepError::GE_Code err;
};
class RepGetGciBufferReq {
@@ -213,7 +213,7 @@ public:
Uint32 lastSSGCI;
Uint32 currentGCIBuffer;
Uint32 nodeGrp;
- GrepError::Code err;
+ GrepError::GE_Code err;
};
class RepInsertGciBufferReq
@@ -252,7 +252,7 @@ public:
Uint32 nodeGrp;
Uint32 tableId;
Uint32 force;
- GrepError::Code err;
+ GrepError::GE_Code err;
};
class RepInsertGciBufferConf
@@ -310,7 +310,7 @@ public:
Uint32 lastGCI;
Uint32 currentGCI;
Uint32 nodeGrp;
- GrepError::Code err;
+ GrepError::GE_Code err;
};
class RepClearPSGciBufferConf
@@ -367,7 +367,7 @@ public:
Uint32 lastGCI;
Uint32 currentGCI;
Uint32 nodeGrp;
- GrepError::Code err;
+ GrepError::GE_Code err;
};
class RepClearSSGciBufferConf
diff --git a/ndb/include/kernel/signaldata/UtilLock.hpp b/ndb/include/kernel/signaldata/UtilLock.hpp
index 1cac467daa0..318024fd706 100644
--- a/ndb/include/kernel/signaldata/UtilLock.hpp
+++ b/ndb/include/kernel/signaldata/UtilLock.hpp
@@ -39,7 +39,7 @@ public:
enum RequestInfo {
TryLock = 1
};
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -63,7 +63,7 @@ class UtilLockConf {
public:
STATIC_CONST( SignalLength = 4 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -95,7 +95,7 @@ public:
LockAlreadyHeld = 4
};
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -119,7 +119,7 @@ class UtilUnlockReq {
public:
STATIC_CONST( SignalLength = 4 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -143,7 +143,7 @@ class UtilUnlockConf {
public:
STATIC_CONST( SignalLength = 3 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -171,7 +171,7 @@ public:
NoSuchLock = 1,
NotLockOwner = 2
};
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -200,7 +200,7 @@ public:
STATIC_CONST( SignalLength = 4 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -229,7 +229,7 @@ public:
STATIC_CONST( SignalLength = 4 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -251,7 +251,7 @@ class UtilCreateLockConf {
public:
STATIC_CONST( SignalLength = 3 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -275,7 +275,7 @@ class UtilDestroyLockReq {
public:
STATIC_CONST( SignalLength = 4 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -303,7 +303,7 @@ public:
STATIC_CONST( SignalLength = 4 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
@@ -325,7 +325,7 @@ class UtilDestroyLockConf {
public:
STATIC_CONST( SignalLength = 3 );
-private:
+public:
Uint32 senderData;
Uint32 senderRef;
Uint32 lockId;
diff --git a/ndb/include/logger/SysLogHandler.hpp b/ndb/include/logger/SysLogHandler.hpp
index 4f13308d61b..0dfc1cb2d43 100644
--- a/ndb/include/logger/SysLogHandler.hpp
+++ b/ndb/include/logger/SysLogHandler.hpp
@@ -18,7 +18,9 @@
#define SYSLOGHANDLER_H
#include "LogHandler.hpp"
+#ifndef NDB_WIN32
#include <syslog.h>
+#endif
/**
* Logs messages to syslog. The default identity is 'NDB'.
@@ -62,7 +64,7 @@ public:
* @param pIdentity a syslog identity.
* @param facility syslog facility, defaults to LOG_USER
*/
- SysLogHandler(const char* pIdentity, int facility = LOG_USER);
+ SysLogHandler(const char* pIdentity, int facility);
/**
* Destructor.
diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h
index dc4f745adb2..230a866ea11 100644
--- a/ndb/include/mgmapi/mgmapi.h
+++ b/ndb/include/mgmapi/mgmapi.h
@@ -49,6 +49,7 @@
* @{
*/
+#include <ndb_types.h>
#include "mgmapi_config_parameters.h"
#ifdef __cplusplus
@@ -743,7 +744,7 @@ extern "C" {
int ndb_mgm_get_int_parameter(const ndb_mgm_configuration_iterator*,
int param, unsigned * value);
int ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator*,
- int param, unsigned long long * value);
+ int param, Uint64 * value);
int ndb_mgm_get_string_parameter(const ndb_mgm_configuration_iterator*,
int param, const char ** value);
int ndb_mgm_purge_stale_sessions(NdbMgmHandle handle, char **);
diff --git a/ndb/include/mgmcommon/IPCConfig.hpp b/ndb/include/mgmcommon/IPCConfig.hpp
index ebe65b53b59..1e23cdf9807 100644
--- a/ndb/include/mgmcommon/IPCConfig.hpp
+++ b/ndb/include/mgmcommon/IPCConfig.hpp
@@ -59,7 +59,7 @@ public:
void print() const { props->print(); }
static Uint32 configureTransporters(Uint32 nodeId,
- const class ndb_mgm_configuration &,
+ const struct ndb_mgm_configuration &,
class TransporterRegistry &);
private:
diff --git a/ndb/include/ndb_global.h b/ndb/include/ndb_global.h.in
index bdd4e503cc5..aefb319730c 100644
--- a/ndb/include/ndb_global.h
+++ b/ndb/include/ndb_global.h.in
@@ -2,34 +2,51 @@
#ifndef NDBGLOBAL_H
#define NDBGLOBAL_H
-#include <my_global.h>
+#include <ndb_types.h>
-/** signal & SIG_PIPE */
-#include <my_alarm.h>
+#define NDB_PORT "@ndb_port@"
+#define NDB_TCP_BASE_PORT "@ndb_port_base@"
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
#define NDB_WIN32
+#include <winsock2.h>
+#define PATH_MAX 256
+#define DIR_SEPARATOR "\\"
+#define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster"
+#define HAVE_STRCASECMP
+#define strcasecmp _strcmpi
+#pragma warning(disable: 4503 4786)
#else
#undef NDB_WIN32
+#define DIR_SEPARATOR "/"
#endif
+#include <my_global.h>
+#include <my_alarm.h>
+
#ifdef _AIX
#undef _H_STRINGS
#endif
#include <m_string.h>
#include <m_ctype.h>
-#include <ndb_types.h>
#include <ctype.h>
+
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
+
#ifdef TIME_WITH_SYS_TIME
#include <time.h>
#endif
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
+
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+
#ifdef HAVE_SYS_STAT_H
#if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE)
#undef _INCLUDE_AES_SOURCE
@@ -39,31 +56,31 @@
#include <sys/stat.h>
#endif
#endif
+
+#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
+#endif
+
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
+
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
-#ifdef NDB_WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-#define DIR_SEPARATOR "\\"
-#define PATH_MAX 256
-
-#pragma warning(disable: 4503 4786)
-#else
-
-#define DIR_SEPARATOR "/"
+#ifndef HAVE_STRDUP
+extern char * strdup(const char *s);
+#endif
+#ifndef HAVE_STRCASECMP
+extern int strcasecmp(const char *s1, const char *s2);
+extern int strncasecmp(const char *s1, const char *s2, size_t n);
#endif
static const char table_name_separator = '/';
-#if defined(_AIX) || defined(NDB_VC98)
+#if defined(_AIX) || defined(WIN32) || defined(NDB_VC98)
#define STATIC_CONST(x) enum { x }
#else
#define STATIC_CONST(x) static const Uint32 x
@@ -84,13 +101,8 @@ extern int ndb_init(void);
extern void ndb_end(int);
#define NDB_INIT(prog_name) {my_progname=(prog_name); ndb_init();}
-#ifndef HAVE_STRDUP
-extern char * strdup(const char *s);
-#endif
-
-#ifndef HAVE_STRCASECMP
-extern int strcasecmp(const char *s1, const char *s2);
-extern int strncasecmp(const char *s1, const char *s2, size_t n);
+#ifdef __cplusplus
+}
#endif
#ifdef SCO
@@ -101,8 +113,4 @@ extern int strncasecmp(const char *s1, const char *s2, size_t n);
#endif /* SCO */
-#ifdef __cplusplus
-}
-#endif
-
#endif
diff --git a/ndb/include/ndb_types.h b/ndb/include/ndb_types.h
index 64b3f517934..0d603cc2ab3 100644
--- a/ndb/include/ndb_types.h
+++ b/ndb/include/ndb_types.h
@@ -40,15 +40,21 @@ typedef __SIZE_TYPE__ UintPtr;
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
+#if defined(WIN32) || defined(NDB_WIN32)
+typedef Uint32 UintPtr;
+#else
typedef uintptr_t UintPtr;
#endif
+#endif
#if defined(WIN32) || defined(NDB_WIN32)
typedef unsigned __int64 Uint64;
typedef signed __int64 Int64;
+typedef UintPtr ssize_t;
#else
typedef unsigned long long Uint64;
typedef signed long long Int64;
#endif
+
#endif
diff --git a/ndb/include/ndb_version.h b/ndb/include/ndb_version.h.in
index 56362020ebf..d7f43eae40a 100644
--- a/ndb/include/ndb_version.h
+++ b/ndb/include/ndb_version.h.in
@@ -20,14 +20,25 @@
#include <ndb_global.h>
#include <version.h>
+/* NDB build version */
+#define NDB_VERSION_BUILD @NDB_VERSION_BUILD@
+
+/* NDB major version */
+#define NDB_VERSION_MAJOR @NDB_VERSION_MAJOR@
+
+/* NDB minor version */
+#define NDB_VERSION_MINOR @NDB_VERSION_MINOR@
+
+/* NDB status version */
+#define NDB_VERSION_STATUS "@NDB_VERSION_STATUS@"
+
+
#define MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8) | ((C) << 0))
#define NDB_VERSION_D MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR, NDB_VERSION_BUILD)
#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS))
-#define NDB_VERSION_TAG_STRING "$Name: $"
-
#define NDB_VERSION ndbGetOwnVersion()
/**
diff --git a/ndb/include/ndbapi/NdbConnection.hpp b/ndb/include/ndbapi/NdbConnection.hpp
index 1c04599c404..7f67ba9d68a 100644
--- a/ndb/include/ndbapi/NdbConnection.hpp
+++ b/ndb/include/ndbapi/NdbConnection.hpp
@@ -50,7 +50,7 @@ enum AbortOption {
TryCommit = 0, ///< <i>Missing explanation</i>
#endif
AbortOnError = 0, ///< Abort transaction on failed operation
- IgnoreError = 2 ///< Transaction continues on failed operation
+ AO_IgnoreError = 2 ///< Transaction continues on failed operation
};
typedef AbortOption CommitType;
diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp
index 069019a1d4c..c1312c9b3af 100644
--- a/ndb/include/ndbapi/NdbDictionary.hpp
+++ b/ndb/include/ndbapi/NdbDictionary.hpp
@@ -703,7 +703,7 @@ public:
/**
* Get a specific column in the index
*/
- const NdbDictionary::Column * getColumn(unsigned no) const ;
+ const Column * getColumn(unsigned no) const ;
/**
* Get a specific column name in the index
diff --git a/ndb/include/ndbapi/ndb_cluster_connection.hpp b/ndb/include/ndbapi/ndb_cluster_connection.hpp
index 6fa25caf5d0..db1cd0b119e 100644
--- a/ndb/include/ndbapi/ndb_cluster_connection.hpp
+++ b/ndb/include/ndbapi/ndb_cluster_connection.hpp
@@ -20,7 +20,7 @@
class TransporterFacade;
class ConfigRetriever;
-class NdbThread;
+struct NdbThread;
extern "C" {
void* run_ndb_cluster_connection_connect_thread(void*);
diff --git a/ndb/include/portlib/NdbTCP.h b/ndb/include/portlib/NdbTCP.h
index 4dc8435eef1..8138a2ef354 100644
--- a/ndb/include/portlib/NdbTCP.h
+++ b/ndb/include/portlib/NdbTCP.h
@@ -40,7 +40,7 @@ typedef int socklen_t;
#define InetErrno (* inet_errno())
-#elif NDB_WIN32
+#elif defined NDB_WIN32
/**
* Include files needed
diff --git a/ndb/include/portlib/PortDefs.h b/ndb/include/portlib/PortDefs.h
index b61bb627e65..a115c60cfe1 100644
--- a/ndb/include/portlib/PortDefs.h
+++ b/ndb/include/portlib/PortDefs.h
@@ -22,55 +22,12 @@
$Id: PortDefs.h,v 1.5 2003/10/07 07:59:59 mikael Exp $
*/
-#ifdef NDB_WIN32
-#include <time.h>
-
-
-struct tms
-{
- time_t tms_utime; /* user time */
- time_t tms_stime; /* system time */
- time_t tms_cutime; /* user time of children */
- time_t tms_cstime; /* system time of children */
-};
-
-struct timespec
-{
- long tv_sec; /* Seconds */
- long tv_nsec; /* Nanoseconds */
-};
-
-#define strcasecmp(a,b) _strcmpi(a,b)
-
-/* Exports a WIN32 getopt function */
-extern int optind;
-extern char *optarg;
-int getopt(int, char **, char *opts);
-#endif /* NDB_WIN32 */
#ifdef NDB_ALPHA
#ifdef NDB_GCC /* only for NDB_ALPHA */
extern int gnuShouldNotUseRPCC();
#define RPCC() gnuShouldNotUseRPCC();
#else
-#ifdef NDB_WIN32
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
- u_int64 __asm(char *, ...);
- double __dasm(char *, ...);
- float __fasm(char *, ...);
- void _AcquireSpinLock(long *);
- void _ReleaseSpinLock(long *);
- int __ADD_ATOMIC_LONG2(void *, int);
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-#pragma intrinsic (__asm, __dasm, __fasm)
-#pragma intrinsic(_ReleaseSpinLock, _AcquireSpinLock)
-#pragma intrinsic(__ADD_ATOMIC_LONG2)
-#endif /* NDB_WIN32 */
-
#define RPCC() ((int)__asm(" rpcc v0;"))
#define MB() __asm(" mb;");
#define WMB() __asm(" wmb;");
diff --git a/ndb/include/transporter/TransporterRegistry.hpp b/ndb/include/transporter/TransporterRegistry.hpp
index 4946222d23e..96da7eef2cb 100644
--- a/ndb/include/transporter/TransporterRegistry.hpp
+++ b/ndb/include/transporter/TransporterRegistry.hpp
@@ -225,7 +225,7 @@ public:
const char *m_interface;
};
Vector<Transporter_interface> m_transporter_interface;
- void add_transporter_interface(const char *interface, unsigned short port);
+ void add_transporter_interface(const char *interf, unsigned short port);
protected:
private:
diff --git a/ndb/include/util/Parser.hpp b/ndb/include/util/Parser.hpp
index 65cf24db633..c117498e1ba 100644
--- a/ndb/include/util/Parser.hpp
+++ b/ndb/include/util/Parser.hpp
@@ -23,7 +23,7 @@
#include "NdbOut.hpp"
class ParserImpl;
-template<class T> class ParserRow;
+template<class T> struct ParserRow;
//#define PARSER_DEBUG
#ifdef PARSER_DEBUG
@@ -130,11 +130,11 @@ public:
* The void* equivalent implementation
*/
class ParserImpl {
+public:
class Dummy {};
typedef ParserRow<Dummy> DummyRow;
typedef Parser<Dummy>::Context Context;
- template<class T> friend class Parser;
-private:
+
ParserImpl(const DummyRow rows[], class InputStream & in,
bool b_cmd, bool b_empty, bool b_iarg);
diff --git a/ndb/include/util/SimpleProperties.hpp b/ndb/include/util/SimpleProperties.hpp
index d5ebb16bb09..356f3406f38 100644
--- a/ndb/include/util/SimpleProperties.hpp
+++ b/ndb/include/util/SimpleProperties.hpp
@@ -38,20 +38,20 @@ public:
/**
* Value types
*/
- enum ValueType {
+ enum ValueType {
Uint32Value = 0,
StringValue = 1,
BinaryValue = 2,
InvalidValue = 3
- };
-
+ };
+
/**
* Struct for defining mapping to be used with unpack
*/
struct SP2StructMapping {
Uint16 Key;
Uint32 Offset;
- SimpleProperties::ValueType Type;
+ ValueType Type;
Uint32 minValue;
Uint32 maxValue;
Uint32 Length_Offset; // Offset used for looking up length of
@@ -233,7 +233,7 @@ private:
*/
class SimplePropertiesSectionReader : public SimpleProperties::Reader {
public:
- SimplePropertiesSectionReader(class SegmentedSectionPtr &,
+ SimplePropertiesSectionReader(struct SegmentedSectionPtr &,
class SectionSegmentPool &);
virtual void reset();
@@ -248,8 +248,8 @@ private:
Uint32 m_pos;
Uint32 m_len;
class SectionSegmentPool & m_pool;
- class SectionSegment * m_head;
- class SectionSegment * m_currentSegment;
+ struct SectionSegment * m_head;
+ struct SectionSegment * m_currentSegment;
};
inline
@@ -275,15 +275,15 @@ public:
/**
* This "unlinks" the writer from the memory
*/
- void getPtr(class SegmentedSectionPtr & dst);
+ void getPtr(struct SegmentedSectionPtr & dst);
private:
Int32 m_pos;
Uint32 m_sz;
class SectionSegmentPool & m_pool;
- class SectionSegment * m_head;
+ struct SectionSegment * m_head;
Uint32 m_prevPtrI; // Prev to m_currentSegment
- class SectionSegment * m_currentSegment;
+ struct SectionSegment * m_currentSegment;
};
#endif
diff --git a/ndb/include/util/SocketServer.hpp b/ndb/include/util/SocketServer.hpp
index 2fad991e5f8..9d8af204391 100644
--- a/ndb/include/util/SocketServer.hpp
+++ b/ndb/include/util/SocketServer.hpp
@@ -98,7 +98,7 @@ public:
*/
void stopSessions(bool wait = false);
- void foreachSession(void (*f)(SocketServer::Session*, void*), void *data);
+ void foreachSession(void (*f)(Session*, void*), void *data);
private:
struct SessionInstance {
diff --git a/ndb/src/Makefile.am b/ndb/src/Makefile.am
index 36a4c3f247f..eb1cf1c6543 100644
--- a/ndb/src/Makefile.am
+++ b/ndb/src/Makefile.am
@@ -16,3 +16,18 @@ libndbclient_la_LIBADD = \
common/logger/liblogger.la \
common/portlib/libportlib.la \
common/util/libgeneral.la
+
+windoze-dsp: libndbclient.dsp
+
+libndbclient.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(ndblib_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ dummy.cpp
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(libndbclient_la_LIBADD)
+ @touch dummy.cpp
diff --git a/ndb/src/common/Makefile.am b/ndb/src/common/Makefile.am
index 8733205eca2..0059f3fb210 100644
--- a/ndb/src/common/Makefile.am
+++ b/ndb/src/common/Makefile.am
@@ -11,3 +11,5 @@ libcommon_la_LIBADD = \
portlib/libportlib.la \
logger/liblogger.la \
util/libgeneral.la
+
+windoze-dsp:
diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp
index 59be0affcb4..a9ca2433a33 100644
--- a/ndb/src/common/debugger/EventLogger.cpp
+++ b/ndb/src/common/debugger/EventLogger.cpp
@@ -1033,7 +1033,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
"Grep::SSCoord:Error code: %d Error message: %s"
" (subId=%d,SubKey=%d)",
err,
- GrepError::getErrorDesc((GrepError::Code)err),
+ GrepError::getErrorDesc((GrepError::GE_Code)err),
subId,
subKey);
break;
@@ -1050,7 +1050,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepSS_SubStartMetaRef:
@@ -1066,7 +1066,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepSS_SubStartDataRef:
@@ -1081,7 +1081,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepSS_SubSyncMetaRef:
@@ -1096,7 +1096,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepSS_SubSyncDataRef:
@@ -1113,7 +1113,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subKey,
gci,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepSS_SubRemoveRef:
@@ -1128,7 +1128,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err)
+ GrepError::getErrorDesc((GrepError::GE_Code)err)
);
break;
}
@@ -1142,7 +1142,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
"Grep::PSCoord: Error code: %d Error Message: %s"
" (subId=%d,SubKey=%d)",
err,
- GrepError::getErrorDesc((GrepError::Code)err),
+ GrepError::getErrorDesc((GrepError::GE_Code)err),
subId,
subKey);
break;
@@ -1159,7 +1159,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepPS_SubStartMetaRef:
@@ -1175,7 +1175,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepPS_SubStartDataRef:
@@ -1190,7 +1190,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepPS_SubSyncMetaRef:
@@ -1205,7 +1205,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepPS_SubSyncDataRef:
@@ -1222,7 +1222,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subKey,
gci,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::GrepPS_SubRemoveRef:
@@ -1237,7 +1237,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId,
subKey,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
case GrepEvent::Rep_Disconnect:
@@ -1249,7 +1249,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
" Error code: %d Error Message: %s",
nodeId,
err,
- GrepError::getErrorDesc((GrepError::Code)err));
+ GrepError::getErrorDesc((GrepError::GE_Code)err));
break;
}
diff --git a/ndb/src/common/debugger/GrepError.cpp b/ndb/src/common/debugger/GrepError.cpp
index ec0c26a5855..20aeaa6dd77 100644
--- a/ndb/src/common/debugger/GrepError.cpp
+++ b/ndb/src/common/debugger/GrepError.cpp
@@ -21,7 +21,7 @@
*/
const GrepError::ErrorDescription GrepError::errorDescriptions[] = {
- { GrepError::NO_ERROR,
+ { GrepError::GE_NO_ERROR,
"No error" },
{ GrepError::SUBSCRIPTION_ID_NOMEM,
"Not enough resources to allocate the subscription" },
@@ -119,7 +119,7 @@ GrepError::noOfErrorDescs = sizeof(GrepError::errorDescriptions) /
* gets the corresponding error message to an err code
*/
const char *
-GrepError::getErrorDesc(GrepError::Code err) {
+GrepError::getErrorDesc(GrepError::GE_Code err) {
for(Uint32 i = 0; i<noOfErrorDescs; i++){
if(err == errorDescriptions[i].errCode){
diff --git a/ndb/src/common/debugger/Makefile.am b/ndb/src/common/debugger/Makefile.am
index d0fb30717cd..e25a11c9bee 100644
--- a/ndb/src/common/debugger/Makefile.am
+++ b/ndb/src/common/debugger/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libtrace.dsp
+
+libtrace.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libtrace_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/common/debugger/signaldata/FsCloseReq.cpp b/ndb/src/common/debugger/signaldata/FsCloseReq.cpp
index 143250b7db1..df9f3cc9fbc 100644
--- a/ndb/src/common/debugger/signaldata/FsCloseReq.cpp
+++ b/ndb/src/common/debugger/signaldata/FsCloseReq.cpp
@@ -31,7 +31,7 @@ printFSCLOSEREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv
sig->userReference);
fprintf(output, " Flags: H\'%.8x, ", sig->fileFlag);
- if (sig->getRemoveFileFlag(sig->fileFlag) == true)
+ if (sig->getRemoveFileFlag(sig->fileFlag))
fprintf(output, "Remove file");
else
fprintf(output, "Don't remove file");
diff --git a/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp b/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp
index 9b32fab87ba..a9f240d3cb4 100644
--- a/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp
+++ b/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp
@@ -31,7 +31,7 @@ printFSREADWRITEREQ(FILE * output, const Uint32 * theData,
fprintf(output, " UserReference: H\'%.8x", sig->userReference);
fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag);
- if (sig->getSyncFlag(sig->operationFlag) == true)
+ if (sig->getSyncFlag(sig->operationFlag))
fprintf(output, "Sync,");
else
fprintf(output, "No sync,");
diff --git a/ndb/src/common/debugger/signaldata/Makefile.am b/ndb/src/common/debugger/signaldata/Makefile.am
index c855c5f8a18..9146d552568 100644
--- a/ndb/src/common/debugger/signaldata/Makefile.am
+++ b/ndb/src/common/debugger/signaldata/Makefile.am
@@ -32,3 +32,16 @@ include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+windoze-dsp: libsignaldataprint.dsp
+
+libsignaldataprint.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libsignaldataprint_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/common/logger/FileLogHandler.cpp b/ndb/src/common/logger/FileLogHandler.cpp
index 29172ff93ad..98b2848feba 100644
--- a/ndb/src/common/logger/FileLogHandler.cpp
+++ b/ndb/src/common/logger/FileLogHandler.cpp
@@ -206,9 +206,9 @@ FileLogHandler::setMaxSize(const BaseString &size) {
long val = strtol(size.c_str(), &end, 0); /* XXX */
if(size.c_str() == end)
return false;
- if(strncasecmp("M", end, 1) == 0)
+ if(end[0] == 'M')
val *= 1024*1024;
- if(strncasecmp("k", end, 1) == 0)
+ if(end[0] == 'k')
val *= 1024;
m_maxFileSize = val;
diff --git a/ndb/src/common/logger/LogHandlerList.hpp b/ndb/src/common/logger/LogHandlerList.hpp
index 7c001a28a76..21344023560 100644
--- a/ndb/src/common/logger/LogHandlerList.hpp
+++ b/ndb/src/common/logger/LogHandlerList.hpp
@@ -18,6 +18,7 @@
#define LOGHANDLERLIST_H
class LogHandler;
+#include <ndb_global.h>
/**
* Provides a simple linked list of log handlers.
diff --git a/ndb/src/common/logger/Logger.cpp b/ndb/src/common/logger/Logger.cpp
index f6f70fbeff7..3b686b24151 100644
--- a/ndb/src/common/logger/Logger.cpp
+++ b/ndb/src/common/logger/Logger.cpp
@@ -186,13 +186,17 @@ Logger::addHandler(const BaseString &logstring) {
LogHandler *handler = NULL;
- if(type == "SYSLOG") {
+#ifndef NDB_WIN32
+ if(type == "SYSLOG")
+ {
handler = new SysLogHandler();
- } else if(type == "FILE")
+ } else
+#endif
+ if(type == "FILE")
handler = new FileLogHandler();
else if(type == "CONSOLE")
handler = new ConsoleLogHandler();
-
+
if(handler == NULL)
DBUG_RETURN(false);
if(!handler->parseParams(params))
diff --git a/ndb/src/common/logger/Makefile.am b/ndb/src/common/logger/Makefile.am
index 0a48214c37c..0af21f9fbde 100644
--- a/ndb/src/common/logger/Makefile.am
+++ b/ndb/src/common/logger/Makefile.am
@@ -1,11 +1,25 @@
noinst_LTLIBRARIES = liblogger.la
-liblogger_la_SOURCES = Logger.cpp LogHandlerList.cpp LogHandler.cpp \
- ConsoleLogHandler.cpp FileLogHandler.cpp SysLogHandler.cpp
+SOURCE_WIN = Logger.cpp LogHandlerList.cpp LogHandler.cpp \
+ ConsoleLogHandler.cpp FileLogHandler.cpp
+liblogger_la_SOURCES = $(SOURCE_WIN) SysLogHandler.cpp
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+windoze-dsp: liblogger.dsp
+
+liblogger.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(SOURCE_WIN)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
index 744412870f5..db00cc1510f 100644
--- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp
+++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
@@ -141,9 +141,10 @@ ConfigRetriever::getConfig(NdbMgmHandle m_handle){
return conf;
}
-
+
ndb_mgm_configuration *
ConfigRetriever::getConfig(const char * filename){
+#ifndef NDB_WIN32
struct stat sbuf;
const int res = stat(filename, &sbuf);
@@ -180,8 +181,10 @@ ConfigRetriever::getConfig(const char * filename){
return 0;
}
delete [] buf2;
-
return (ndb_mgm_configuration*)cvf.m_cfg;
+#else
+ return 0;
+#endif
}
void
diff --git a/ndb/src/common/mgmcommon/Makefile.am b/ndb/src/common/mgmcommon/Makefile.am
index a0aca3e68f1..104bf0b29f2 100644
--- a/ndb/src/common/mgmcommon/Makefile.am
+++ b/ndb/src/common/mgmcommon/Makefile.am
@@ -12,3 +12,17 @@ include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libmgmsrvcommon.dsp
+
+libmgmsrvcommon.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libmgmsrvcommon_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/common/portlib/Makefile.am b/ndb/src/common/portlib/Makefile.am
index 73125ad918d..99138a7414e 100644
--- a/ndb/src/common/portlib/Makefile.am
+++ b/ndb/src/common/portlib/Makefile.am
@@ -17,3 +17,27 @@ PortLibTest_SOURCES = NdbPortLibTest.cpp
munmaptest_SOURCES = munmaptest.cpp
# Don't update the files from bitkeeper
+WIN_src = win32/NdbCondition.c \
+ win32/NdbDaemon.c \
+ win32/NdbEnv.c \
+ win32/NdbHost.c \
+ win32/NdbMem.c \
+ win32/NdbMutex.c \
+ win32/NdbSleep.c \
+ win32/NdbTCP.c \
+ win32/NdbThread.c \
+ win32/NdbTick.c
+
+windoze-dsp: libportlib.dsp
+
+libportlib.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(WIN_src)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/common/portlib/NdbConfig.c b/ndb/src/common/portlib/NdbConfig.c
index 8adc4c20dff..b275143646f 100644
--- a/ndb/src/common/portlib/NdbConfig.c
+++ b/ndb/src/common/portlib/NdbConfig.c
@@ -18,6 +18,7 @@
#include <NdbConfig.h>
#include <NdbEnv.h>
#include <NdbMem.h>
+#include <basestring_vsnprintf.h>
static const char *datadir_path= 0;
@@ -48,7 +49,7 @@ NdbConfig_AllocHomePath(int _len)
const char *path= NdbConfig_get_path(&path_len);
int len= _len+path_len;
char *buf= NdbMem_Allocate(len);
- snprintf(buf, len, "%s%s", path, DIR_SEPARATOR);
+ basestring_snprintf(buf, len, "%s%s", path, DIR_SEPARATOR);
return buf;
}
@@ -67,7 +68,7 @@ NdbConfig_NdbCfgName(int with_ndb_home){
len= strlen(buf);
} else
buf= NdbMem_Allocate(128);
- snprintf(buf+len, 128, "Ndb.cfg");
+ basestring_snprintf(buf+len, 128, "Ndb.cfg");
return buf;
}
@@ -77,9 +78,9 @@ char *get_prefix_buf(int len, int node_id)
char tmp_buf[sizeof("ndb_pid#############")+1];
char *buf;
if (node_id > 0)
- snprintf(tmp_buf, sizeof(tmp_buf), "ndb_%u", node_id);
+ basestring_snprintf(tmp_buf, sizeof(tmp_buf), "ndb_%u", node_id);
else
- snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u", getpid());
+ basestring_snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u", getpid());
tmp_buf[sizeof(tmp_buf)-1]= 0;
buf= NdbConfig_AllocHomePath(len+strlen(tmp_buf));
@@ -91,7 +92,7 @@ char*
NdbConfig_ErrorFileName(int node_id){
char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf);
- snprintf(buf+len, 128, "_error.log");
+ basestring_snprintf(buf+len, 128, "_error.log");
return buf;
}
@@ -99,7 +100,7 @@ char*
NdbConfig_ClusterLogFileName(int node_id){
char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf);
- snprintf(buf+len, 128, "_cluster.log");
+ basestring_snprintf(buf+len, 128, "_cluster.log");
return buf;
}
@@ -107,7 +108,7 @@ char*
NdbConfig_SignalLogFileName(int node_id){
char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf);
- snprintf(buf+len, 128, "_signal.log");
+ basestring_snprintf(buf+len, 128, "_signal.log");
return buf;
}
@@ -115,7 +116,7 @@ char*
NdbConfig_TraceFileName(int node_id, int file_no){
char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf);
- snprintf(buf+len, 128, "_trace.log.%u", file_no);
+ basestring_snprintf(buf+len, 128, "_trace.log.%u", file_no);
return buf;
}
@@ -123,7 +124,7 @@ char*
NdbConfig_NextTraceFileName(int node_id){
char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf);
- snprintf(buf+len, 128, "_trace.log.next");
+ basestring_snprintf(buf+len, 128, "_trace.log.next");
return buf;
}
@@ -131,7 +132,7 @@ char*
NdbConfig_PidFileName(int node_id){
char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf);
- snprintf(buf+len, 128, ".pid");
+ basestring_snprintf(buf+len, 128, ".pid");
return buf;
}
@@ -139,6 +140,6 @@ char*
NdbConfig_StdoutFileName(int node_id){
char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf);
- snprintf(buf+len, 128, "_out.log");
+ basestring_snprintf(buf+len, 128, "_out.log");
return buf;
}
diff --git a/ndb/src/common/portlib/win32/NdbCondition.c b/ndb/src/common/portlib/win32/NdbCondition.c
new file mode 100644
index 00000000000..4046db1d60a
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbCondition.c
@@ -0,0 +1,178 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbCondition.h"
+#include <NdbMutex.h>
+
+struct NdbCondition
+{
+ long nWaiters;
+ NdbMutex* pNdbMutexWaitersLock;
+ HANDLE hSemaphore;
+ HANDLE hEventWaitersDone;
+ int bWasBroadcast;
+};
+
+
+struct NdbCondition*
+NdbCondition_Create(void)
+{
+ int result = 0;
+ struct NdbCondition* pNdbCondition = (struct NdbCondition*)malloc(sizeof(struct NdbCondition));
+ if(!pNdbCondition)
+ return 0;
+
+ pNdbCondition->nWaiters = 0;
+ pNdbCondition->bWasBroadcast = 0;
+ if(!(pNdbCondition->hSemaphore = CreateSemaphore(0, 0, MAXLONG, 0)))
+ result = -1;
+ else if(!(pNdbCondition->pNdbMutexWaitersLock = NdbMutex_Create()))
+ result = -1;
+ else if(!(pNdbCondition->hEventWaitersDone = CreateEvent(0, 0, 0, 0)))
+ result = -1;
+
+ assert(!result);
+ return pNdbCondition;
+}
+
+
+int
+NdbCondition_Wait(struct NdbCondition* p_cond,
+ NdbMutex* p_mutex)
+{
+ int result;
+ int bLastWaiter;
+ if(!p_cond || !p_mutex)
+ return 1;
+
+ NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+ p_cond->nWaiters++;
+ NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+ if(NdbMutex_Unlock(p_mutex))
+ return -1;
+ result = WaitForSingleObject (p_cond->hSemaphore, INFINITE);
+
+ NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+ p_cond->nWaiters--;
+ bLastWaiter = (p_cond->bWasBroadcast && p_cond->nWaiters==0);
+ NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+ if(result==WAIT_OBJECT_0 && bLastWaiter)
+ SetEvent(p_cond->hEventWaitersDone);
+
+ NdbMutex_Lock(p_mutex);
+ return result;
+}
+
+
+int
+NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
+ NdbMutex* p_mutex,
+ int msecs)
+{
+ int result;
+ int bLastWaiter;
+ if (!p_cond || !p_mutex)
+ return 1;
+
+ NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+ p_cond->nWaiters++;
+ NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+ if(msecs<0)
+ msecs = 0;
+
+ if(NdbMutex_Unlock(p_mutex))
+ return -1;
+ result = WaitForSingleObject(p_cond->hSemaphore, msecs);
+
+ NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+ p_cond->nWaiters--;
+ bLastWaiter = (p_cond->bWasBroadcast && p_cond->nWaiters==0);
+ NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+ if(result!=WAIT_OBJECT_0)
+ result = -1;
+
+ if(bLastWaiter)
+ SetEvent(p_cond->hEventWaitersDone);
+
+ NdbMutex_Lock(p_mutex);
+ return result;
+}
+
+
+int
+NdbCondition_Signal(struct NdbCondition* p_cond)
+{
+ int bHaveWaiters;
+ if(!p_cond)
+ return 1;
+
+ NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+ bHaveWaiters = (p_cond->nWaiters > 0);
+ NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+ if(bHaveWaiters)
+ return (ReleaseSemaphore(p_cond->hSemaphore, 1, 0) ? 0 : -1);
+ else
+ return 0;
+}
+
+
+int NdbCondition_Broadcast(struct NdbCondition* p_cond)
+{
+ int bHaveWaiters;
+ int result = 0;
+ if(!p_cond)
+ return 1;
+
+ NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+ bHaveWaiters = 0;
+ if(p_cond->nWaiters > 0)
+ {
+ p_cond->bWasBroadcast = !0;
+ bHaveWaiters = 1;
+ }
+ NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+ if(bHaveWaiters)
+ {
+ if(!ReleaseSemaphore(p_cond->hSemaphore, p_cond->nWaiters, 0))
+ result = -1;
+ else if(WaitForSingleObject (p_cond->hEventWaitersDone, INFINITE) != WAIT_OBJECT_0)
+ result = -1;
+ p_cond->bWasBroadcast = 0;
+ }
+ return result;
+}
+
+
+int NdbCondition_Destroy(struct NdbCondition* p_cond)
+{
+ int result;
+ if(!p_cond)
+ return 1;
+
+ CloseHandle(p_cond->hEventWaitersDone);
+ NdbMutex_Destroy(p_cond->pNdbMutexWaitersLock);
+ result = (CloseHandle(p_cond->hSemaphore) ? 0 : -1);
+
+ free(p_cond);
+ return 0;
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbDaemon.c b/ndb/src/common/portlib/win32/NdbDaemon.c
new file mode 100644
index 00000000000..b96d4c20260
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbDaemon.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include "NdbDaemon.h"
+
+#define NdbDaemon_ErrorSize 500
+long NdbDaemon_DaemonPid;
+int NdbDaemon_ErrorCode;
+char NdbDaemon_ErrorText[NdbDaemon_ErrorSize];
+
+int
+NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
+{
+ // XXX do something
+ return 0;
+}
+
+#ifdef NDB_DAEMON_TEST
+
+int
+main()
+{
+ if (NdbDaemon_Make("test.pid", "test.log", 0) == -1) {
+ fprintf(stderr, "NdbDaemon_Make: %s\n", NdbDaemon_ErrorText);
+ return 1;
+ }
+ sleep(10);
+ return 0;
+}
+
+#endif
diff --git a/ndb/src/common/portlib/win32/NdbEnv.c b/ndb/src/common/portlib/win32/NdbEnv.c
new file mode 100644
index 00000000000..f42e685fe15
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbEnv.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbEnv.h"
+
+const char* NdbEnv_GetEnv(const char* name, char * buf, int buflen)
+{
+ char* p = NULL;
+ p = getenv(name);
+
+ if (p != NULL && buf != NULL){
+ strncpy(buf, p, buflen);
+ buf[buflen-1] = 0;
+ }
+ return p;
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbHost.c b/ndb/src/common/portlib/win32/NdbHost.c
new file mode 100644
index 00000000000..7df96c45991
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbHost.c
@@ -0,0 +1,52 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbHost.h"
+
+
+int NdbHost_GetHostName(char* buf)
+{
+ /* We must initialize TCP/IP if we want to call gethostname */
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int err;
+
+ wVersionRequested = MAKEWORD( 2, 0 );
+ err = WSAStartup( wVersionRequested, &wsaData );
+ if ( err != 0 ) {
+ /**
+ * Tell the user that we couldn't find a usable
+ * WinSock DLL.
+ */
+ return -1;
+ }
+
+ /* Get host name */
+ if(gethostname(buf, MAXHOSTNAMELEN))
+ {
+ return -1;
+ }
+ return 0;
+}
+
+
+int NdbHost_GetProcessId(void)
+{
+ return _getpid();
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbMem.c b/ndb/src/common/portlib/win32/NdbMem.c
new file mode 100644
index 00000000000..313ca9dff66
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbMem.c
@@ -0,0 +1,283 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbMem.h"
+
+#if 0
+struct AWEINFO
+{
+ SIZE_T dwSizeInBytesRequested;
+ ULONG_PTR nNumberOfPagesRequested;
+ ULONG_PTR nNumberOfPagesActual;
+ ULONG_PTR nNumberOfPagesFreed;
+ ULONG_PTR* pnPhysicalMemoryPageArray;
+ void* pRegionReserved;
+};
+
+const size_t cNdbMem_nMaxAWEinfo = 256;
+size_t gNdbMem_nAWEinfo = 0;
+
+struct AWEINFO* gNdbMem_pAWEinfo = 0;
+
+
+void ShowLastError(const char* szContext, const char* szFunction)
+{
+ DWORD dwError = GetLastError();
+ LPVOID lpMsgBuf;
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ dwError,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+ (LPTSTR)&lpMsgBuf,
+ 0,
+ NULL
+ );
+ printf("%s : %s failed : %lu : %s\n", szContext, szFunction, dwError, (char*)lpMsgBuf);
+ LocalFree(lpMsgBuf);
+}
+
+
+
+void NdbMem_Create()
+{
+ // Address Windowing Extensions
+ struct PRIVINFO
+ {
+ DWORD Count;
+ LUID_AND_ATTRIBUTES Privilege[1];
+ } Info;
+
+ HANDLE hProcess = GetCurrentProcess();
+ HANDLE hToken;
+ if(!OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES, &hToken))
+ {
+ ShowLastError("NdbMem_Create", "OpenProcessToken");
+ }
+
+ Info.Count = 1;
+ Info.Privilege[0].Attributes = SE_PRIVILEGE_ENABLED;
+ if(!LookupPrivilegeValue(0, SE_LOCK_MEMORY_NAME, &(Info.Privilege[0].Luid)))
+ {
+ ShowLastError("NdbMem_Create", "LookupPrivilegeValue");
+ }
+
+ if(!AdjustTokenPrivileges(hToken, FALSE, (PTOKEN_PRIVILEGES)&Info, 0, 0, 0))
+ {
+ ShowLastError("NdbMem_Create", "AdjustTokenPrivileges");
+ }
+
+ if(!CloseHandle(hToken))
+ {
+ ShowLastError("NdbMem_Create", "CloseHandle");
+ }
+
+ return;
+}
+
+void NdbMem_Destroy()
+{
+ /* Do nothing */
+ return;
+}
+
+void* NdbMem_Allocate(size_t size)
+{
+ // Address Windowing Extensions
+ struct AWEINFO* pAWEinfo;
+ HANDLE hProcess;
+ SYSTEM_INFO sysinfo;
+
+ if(!gNdbMem_pAWEinfo)
+ {
+ gNdbMem_pAWEinfo = VirtualAlloc(0,
+ sizeof(struct AWEINFO)*cNdbMem_nMaxAWEinfo,
+ MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
+ }
+
+ assert(gNdbMem_nAWEinfo < cNdbMem_nMaxAWEinfo);
+ pAWEinfo = gNdbMem_pAWEinfo+gNdbMem_nAWEinfo++;
+
+ hProcess = GetCurrentProcess();
+ GetSystemInfo(&sysinfo);
+ pAWEinfo->nNumberOfPagesRequested = (size+sysinfo.dwPageSize-1)/sysinfo.dwPageSize;
+ pAWEinfo->pnPhysicalMemoryPageArray = VirtualAlloc(0,
+ sizeof(ULONG_PTR)*pAWEinfo->nNumberOfPagesRequested,
+ MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
+ pAWEinfo->nNumberOfPagesActual = pAWEinfo->nNumberOfPagesRequested;
+ if(!AllocateUserPhysicalPages(hProcess, &(pAWEinfo->nNumberOfPagesActual), pAWEinfo->pnPhysicalMemoryPageArray))
+ {
+ ShowLastError("NdbMem_Allocate", "AllocateUserPhysicalPages");
+ return 0;
+ }
+ if(pAWEinfo->nNumberOfPagesRequested != pAWEinfo->nNumberOfPagesActual)
+ {
+ ShowLastError("NdbMem_Allocate", "nNumberOfPagesRequested != nNumberOfPagesActual");
+ return 0;
+ }
+
+ pAWEinfo->dwSizeInBytesRequested = size;
+ pAWEinfo->pRegionReserved = VirtualAlloc(0, pAWEinfo->dwSizeInBytesRequested, MEM_RESERVE | MEM_PHYSICAL, PAGE_READWRITE);
+ if(!pAWEinfo->pRegionReserved)
+ {
+ ShowLastError("NdbMem_Allocate", "VirtualAlloc");
+ return 0;
+ }
+
+ if(!MapUserPhysicalPages(pAWEinfo->pRegionReserved, pAWEinfo->nNumberOfPagesActual, pAWEinfo->pnPhysicalMemoryPageArray))
+ {
+ ShowLastError("NdbMem_Allocate", "MapUserPhysicalPages");
+ return 0;
+ }
+
+ /*
+ printf("allocate AWE memory: %lu bytes, %lu pages, address %lx\n",
+ pAWEinfo->dwSizeInBytesRequested,
+ pAWEinfo->nNumberOfPagesActual,
+ pAWEinfo->pRegionReserved);
+ */
+ return pAWEinfo->pRegionReserved;
+}
+
+
+void* NdbMem_AllocateAlign(size_t size, size_t alignment)
+{
+ /*
+ return (void*)memalign(alignment, size);
+ TEMP fix
+ */
+ return NdbMem_Allocate(size);
+}
+
+
+void NdbMem_Free(void* ptr)
+{
+ // VirtualFree(ptr, 0, MEM_DECOMMIT|MEM_RELEASE);
+
+ // Address Windowing Extensions
+ struct AWEINFO* pAWEinfo = 0;
+ size_t i;
+ HANDLE hProcess;
+
+ for(i=0; i<gNdbMem_nAWEinfo; ++i)
+ {
+ if(ptr==gNdbMem_pAWEinfo[i].pRegionReserved)
+ {
+ pAWEinfo = gNdbMem_pAWEinfo+i;
+ }
+ }
+ if(!pAWEinfo)
+ {
+ ShowLastError("NdbMem_Free", "ptr is not AWE memory");
+ }
+
+ hProcess = GetCurrentProcess();
+ if(!MapUserPhysicalPages(ptr, pAWEinfo->nNumberOfPagesActual, 0))
+ {
+ ShowLastError("NdbMem_Free", "MapUserPhysicalPages");
+ }
+
+ if(!VirtualFree(ptr, 0, MEM_RELEASE))
+ {
+ ShowLastError("NdbMem_Free", "VirtualFree");
+ }
+
+ pAWEinfo->nNumberOfPagesFreed = pAWEinfo->nNumberOfPagesActual;
+ if(!FreeUserPhysicalPages(hProcess, &(pAWEinfo->nNumberOfPagesFreed), pAWEinfo->pnPhysicalMemoryPageArray))
+ {
+ ShowLastError("NdbMem_Free", "FreeUserPhysicalPages");
+ }
+
+ VirtualFree(pAWEinfo->pnPhysicalMemoryPageArray, 0, MEM_DECOMMIT|MEM_RELEASE);
+}
+
+
+int NdbMem_MemLockAll()
+{
+ /*
+ HANDLE hProcess = GetCurrentProcess();
+ SIZE_T nMinimumWorkingSetSize;
+ SIZE_T nMaximumWorkingSetSize;
+ GetProcessWorkingSetSize(hProcess, &nMinimumWorkingSetSize, &nMaximumWorkingSetSize);
+ ndbout << "nMinimumWorkingSetSize=" << nMinimumWorkingSetSize << ", nMaximumWorkingSetSize=" << nMaximumWorkingSetSize << endl;
+
+ SetProcessWorkingSetSize(hProcess, 50000000, 100000000);
+
+ GetProcessWorkingSetSize(hProcess, &nMinimumWorkingSetSize, &nMaximumWorkingSetSize);
+ ndbout << "nMinimumWorkingSetSize=" << nMinimumWorkingSetSize << ", nMaximumWorkingSetSize=" << nMaximumWorkingSetSize << endl;
+ */
+ return -1;
+}
+
+int NdbMem_MemUnlockAll()
+{
+ //VirtualUnlock();
+ return -1;
+}
+
+#endif
+
+void NdbMem_Create()
+{
+ /* Do nothing */
+ return;
+}
+
+void NdbMem_Destroy()
+{
+ /* Do nothing */
+ return;
+}
+
+
+void* NdbMem_Allocate(size_t size)
+{
+ void* mem_allocated;
+ assert(size > 0);
+ mem_allocated= (void*)malloc(size);
+ return mem_allocated;
+}
+
+void* NdbMem_AllocateAlign(size_t size, size_t alignment)
+{
+ (void)alignment; /* remove warning for unused parameter */
+ /*
+ return (void*)memalign(alignment, size);
+ TEMP fix
+ */
+ return (void*)malloc(size);
+}
+
+
+void NdbMem_Free(void* ptr)
+{
+ free(ptr);
+}
+
+
+int NdbMem_MemLockAll()
+{
+ return 0;
+}
+
+int NdbMem_MemUnlockAll()
+{
+ return 0;
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbMutex.c b/ndb/src/common/portlib/win32/NdbMutex.c
new file mode 100644
index 00000000000..e6d1f081e9a
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbMutex.c
@@ -0,0 +1,73 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbMutex.h"
+
+NdbMutex* NdbMutex_Create(void)
+{
+ NdbMutex* pNdbMutex = (NdbMutex*)malloc(sizeof(NdbMutex));
+ if(!pNdbMutex)
+ return 0;
+
+ InitializeCriticalSection(pNdbMutex);
+ return pNdbMutex;
+}
+
+
+int NdbMutex_Destroy(NdbMutex* p_mutex)
+{
+ if(!p_mutex)
+ return -1;
+
+ DeleteCriticalSection(p_mutex);
+ free(p_mutex);
+ return 0;
+}
+
+
+int NdbMutex_Lock(NdbMutex* p_mutex)
+{
+ if(!p_mutex)
+ return -1;
+
+ EnterCriticalSection (p_mutex);
+ return 0;
+}
+
+
+int NdbMutex_Unlock(NdbMutex* p_mutex)
+{
+ if(!p_mutex)
+ return -1;
+
+ LeaveCriticalSection(p_mutex);
+ return 0;
+}
+
+
+int NdbMutex_Trylock(NdbMutex* p_mutex)
+{
+ int result = -1;
+ if(p_mutex)
+ {
+ result = NdbMutex_Lock(p_mutex);
+ //(TryEnterCriticalSection(p_mutex) ? 0 : -1);
+ }
+ return result;
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbSleep.c b/ndb/src/common/portlib/win32/NdbSleep.c
new file mode 100644
index 00000000000..8f5bdc49acd
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbSleep.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbSleep.h"
+
+int
+NdbSleep_MilliSleep(int milliseconds)
+{
+ Sleep(milliseconds);
+ return 0;
+}
+
+int
+NdbSleep_SecSleep(int seconds)
+{
+ return NdbSleep_MilliSleep(seconds*1000);
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbTCP.c b/ndb/src/common/portlib/win32/NdbTCP.c
new file mode 100644
index 00000000000..b936cd2db6c
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbTCP.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbTCP.h"
+
+int
+Ndb_getInAddr(struct in_addr * dst, const char *address)
+{
+ struct hostent * hostPtr;
+
+ /* Try it as aaa.bbb.ccc.ddd. */
+ dst->s_addr = inet_addr(address);
+ if (dst->s_addr != -1) {
+ return 0;
+ }
+
+ hostPtr = gethostbyname(address);
+ if (hostPtr != NULL) {
+ dst->s_addr = ((struct in_addr *) *hostPtr->h_addr_list)->s_addr;
+ return 0;
+ }
+
+ return -1;
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbThread.c b/ndb/src/common/portlib/win32/NdbThread.c
new file mode 100644
index 00000000000..98db0d5c287
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbThread.c
@@ -0,0 +1,114 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbThread.h"
+#include <process.h>
+
+#define MAX_THREAD_NAME 16
+
+typedef unsigned (WINAPI* NDB_WIN32_THREAD_FUNC)(void*);
+
+
+struct NdbThread
+{
+ HANDLE hThread;
+ unsigned nThreadId;
+ char thread_name[MAX_THREAD_NAME];
+};
+
+
+struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
+ NDB_THREAD_ARG *p_thread_arg,
+ const NDB_THREAD_STACKSIZE thread_stack_size,
+ const char* p_thread_name,
+ NDB_THREAD_PRIO thread_prio)
+{
+ struct NdbThread* tmpThread;
+ unsigned initflag;
+ int nPriority = 0;
+
+ if(!p_thread_func)
+ return 0;
+
+ tmpThread = (struct NdbThread*)malloc(sizeof(struct NdbThread));
+ if(!tmpThread)
+ return 0;
+
+ strncpy((char*)&tmpThread->thread_name, p_thread_name, MAX_THREAD_NAME);
+
+ switch(thread_prio)
+ {
+ case NDB_THREAD_PRIO_HIGHEST: nPriority=THREAD_PRIORITY_HIGHEST; break;
+ case NDB_THREAD_PRIO_HIGH: nPriority=THREAD_PRIORITY_ABOVE_NORMAL; break;
+ case NDB_THREAD_PRIO_MEAN: nPriority=THREAD_PRIORITY_NORMAL; break;
+ case NDB_THREAD_PRIO_LOW: nPriority=THREAD_PRIORITY_BELOW_NORMAL; break;
+ case NDB_THREAD_PRIO_LOWEST: nPriority=THREAD_PRIORITY_LOWEST; break;
+ }
+ initflag = (nPriority ? CREATE_SUSPENDED : 0);
+
+ tmpThread->hThread = (HANDLE)_beginthreadex(0, thread_stack_size,
+ (NDB_WIN32_THREAD_FUNC)p_thread_func, p_thread_arg,
+ initflag, &tmpThread->nThreadId);
+
+ if(nPriority && tmpThread->hThread)
+ {
+ SetThreadPriority(tmpThread->hThread, nPriority);
+ ResumeThread (tmpThread->hThread);
+ }
+
+ assert(tmpThread->hThread);
+ return tmpThread;
+}
+
+
+void NdbThread_Destroy(struct NdbThread** p_thread)
+{
+ CloseHandle((*p_thread)->hThread);
+ (*p_thread)->hThread = 0;
+ free(*p_thread);
+ *p_thread = 0;
+}
+
+
+int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
+{
+ void *local_status = 0;
+ if (status == 0)
+ status = &local_status;
+
+ if(WaitForSingleObject(p_wait_thread->hThread, INFINITE) == WAIT_OBJECT_0
+ && GetExitCodeThread(p_wait_thread->hThread, (LPDWORD)status))
+ {
+ CloseHandle(p_wait_thread->hThread);
+ p_wait_thread->hThread = 0;
+ return 0;
+ }
+ return -1;
+}
+
+
+void NdbThread_Exit(int status)
+{
+ _endthreadex((DWORD) status);
+}
+
+
+int NdbThread_SetConcurrencyLevel(int level)
+{
+ return 0;
+}
+
diff --git a/ndb/src/common/portlib/win32/NdbTick.c b/ndb/src/common/portlib/win32/NdbTick.c
new file mode 100644
index 00000000000..4430cbf419b
--- /dev/null
+++ b/ndb/src/common/portlib/win32/NdbTick.c
@@ -0,0 +1,64 @@
+/* Copyright (C) 2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ 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 "NdbTick.h"
+//#include <windows.h>
+
+/*
+#define FILETIME_PER_MICROSEC 10
+#define FILETIME_PER_MILLISEC 10000
+#define FILETIME_PER_SEC 10000000
+
+
+NDB_TICKS NdbTick_CurrentMillisecond(void)
+{
+ ULONGLONG ullTime;
+ GetSystemTimeAsFileTime((LPFILETIME)&ullTime);
+ return (ullTime / FILETIME_PER_MILLISEC);
+}
+
+int
+NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros)
+{
+ ULONGLONG ullTime;
+ GetSystemTimeAsFileTime((LPFILETIME)&ullTime);
+ *secs = (ullTime / FILETIME_PER_SEC);
+ *micros = (Uint32)((ullTime % FILETIME_PER_SEC) / FILETIME_PER_MICROSEC);
+ return 0;
+}
+*/
+
+
+NDB_TICKS NdbTick_CurrentMillisecond(void)
+{
+ LARGE_INTEGER liCount, liFreq;
+ QueryPerformanceCounter(&liCount);
+ QueryPerformanceFrequency(&liFreq);
+ return (liCount.QuadPart*1000) / liFreq.QuadPart;
+}
+
+int
+NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros)
+{
+ LARGE_INTEGER liCount, liFreq;
+ QueryPerformanceCounter(&liCount);
+ QueryPerformanceFrequency(&liFreq);
+ *secs = liCount.QuadPart / liFreq.QuadPart;
+ liCount.QuadPart -= *secs * liFreq.QuadPart;
+ *micros = (liCount.QuadPart*1000000) / liFreq.QuadPart;
+ return 0;
+}
diff --git a/ndb/src/common/transporter/Makefile.am b/ndb/src/common/transporter/Makefile.am
index 9d91a210d46..d76b1b6048b 100644
--- a/ndb/src/common/transporter/Makefile.am
+++ b/ndb/src/common/transporter/Makefile.am
@@ -20,3 +20,17 @@ include $(top_srcdir)/ndb/config/type_util.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libtransporter.dsp
+
+libtransporter.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libtransporter_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/common/transporter/Transporter.cpp b/ndb/src/common/transporter/Transporter.cpp
index e68bc86718e..ee25d97feef 100644
--- a/ndb/src/common/transporter/Transporter.cpp
+++ b/ndb/src/common/transporter/Transporter.cpp
@@ -95,7 +95,7 @@ Transporter::connect_client() {
return true;
NDB_SOCKET_TYPE sockfd = m_socket_client->connect();
- if (sockfd < 0)
+ if (sockfd == NDB_INVALID_SOCKET)
return false;
// send info about own id
diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp
index 77e72a4fa2c..be51e9223ba 100644
--- a/ndb/src/common/transporter/TransporterRegistry.cpp
+++ b/ndb/src/common/transporter/TransporterRegistry.cpp
@@ -1180,32 +1180,31 @@ TransporterRegistry::stop_clients()
}
void
-TransporterRegistry::add_transporter_interface(const char *interface,
- unsigned short port)
+TransporterRegistry::add_transporter_interface(const char *interf, unsigned short port)
{
DBUG_ENTER("TransporterRegistry::add_transporter_interface");
- DBUG_PRINT("enter",("interface=%s, port= %d", interface, port));
- if (interface && strlen(interface) == 0)
- interface= 0;
+ DBUG_PRINT("enter",("interface=%s, port= %d", interf, port));
+ if (interf && strlen(interf) == 0)
+ interf= 0;
for (unsigned i= 0; i < m_transporter_interface.size(); i++)
{
Transporter_interface &tmp= m_transporter_interface[i];
if (port != tmp.m_service_port)
continue;
- if (interface != 0 && tmp.m_interface != 0 &&
- strcmp(interface, tmp.m_interface) == 0)
+ if (interf != 0 && tmp.m_interface != 0 &&
+ strcmp(interf, tmp.m_interface) == 0)
{
DBUG_VOID_RETURN; // found match, no need to insert
}
- if (interface == 0 && tmp.m_interface == 0)
+ if (interf == 0 && tmp.m_interface == 0)
{
DBUG_VOID_RETURN; // found match, no need to insert
}
}
Transporter_interface t;
t.m_service_port= port;
- t.m_interface= interface;
+ t.m_interface= interf;
m_transporter_interface.push_back(t);
DBUG_PRINT("exit",("interface and port added"));
DBUG_VOID_RETURN;
@@ -1214,7 +1213,7 @@ TransporterRegistry::add_transporter_interface(const char *interface,
bool
TransporterRegistry::start_service(SocketServer& socket_server)
{
- if (m_transporter_interface.size() > 0 && nodeIdSpecified != true)
+ if (m_transporter_interface.size() > 0 && !nodeIdSpecified)
{
ndbout_c("TransporterRegistry::startReceiving: localNodeId not specified");
return false;
diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp
index f3faa8c4f7f..937b8c0fa59 100644
--- a/ndb/src/common/util/File.cpp
+++ b/ndb/src/common/util/File.cpp
@@ -19,6 +19,7 @@
#include <File.hpp>
#include <NdbOut.hpp>
+#include <my_dir.h>
//
// PUBLIC
@@ -28,9 +29,12 @@ bool
File_class::exists(const char* aFileName)
{
bool rc = true;
-
+#ifdef USE_MY_STAT_STRUCT
+ struct my_stat stmp;
+#else
struct stat stmp;
- if (::stat(aFileName, &stmp) != 0)
+#endif
+ if (my_stat(aFileName, &stmp, MYF(0)) != 0)
{
rc = false;
}
diff --git a/ndb/src/common/util/Makefile.am b/ndb/src/common/util/Makefile.am
index 1f62ca0d9d5..2719d14ee92 100644
--- a/ndb/src/common/util/Makefile.am
+++ b/ndb/src/common/util/Makefile.am
@@ -33,3 +33,17 @@ include $(top_srcdir)/ndb/config/type_util.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libgeneral.dsp
+
+libgeneral.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libgeneral_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/common/util/Properties.cpp b/ndb/src/common/util/Properties.cpp
index 4443fd45bba..0edcda0e726 100644
--- a/ndb/src/common/util/Properties.cpp
+++ b/ndb/src/common/util/Properties.cpp
@@ -881,7 +881,7 @@ PropertiesImpl::unpack(const Uint32 * buf, Uint32 &bufLen, Properties * top,
case PropertiesType_Properties:
assert(0);
}
- if(res3 != true){
+ if(!res3){
return false;
}
_items--;
diff --git a/ndb/src/common/util/SocketClient.cpp b/ndb/src/common/util/SocketClient.cpp
index 50e60956b94..38df1417eb8 100644
--- a/ndb/src/common/util/SocketClient.cpp
+++ b/ndb/src/common/util/SocketClient.cpp
@@ -26,14 +26,14 @@ SocketClient::SocketClient(const char *server_name, unsigned short port, SocketA
m_auth= sa;
m_port= port;
m_server_name= strdup(server_name);
- m_sockfd= -1;
+ m_sockfd= NDB_INVALID_SOCKET;
}
SocketClient::~SocketClient()
{
if (m_server_name)
free(m_server_name);
- if (m_sockfd >= 0)
+ if (m_sockfd != NDB_INVALID_SOCKET)
NDB_CLOSE_SOCKET(m_sockfd);
if (m_auth)
delete m_auth;
@@ -42,7 +42,7 @@ SocketClient::~SocketClient()
bool
SocketClient::init()
{
- if (m_sockfd >= 0)
+ if (m_sockfd != NDB_INVALID_SOCKET)
NDB_CLOSE_SOCKET(m_sockfd);
memset(&m_servaddr, 0, sizeof(m_servaddr));
@@ -63,32 +63,32 @@ SocketClient::init()
NDB_SOCKET_TYPE
SocketClient::connect()
{
- if (m_sockfd < 0)
+ if (m_sockfd == NDB_INVALID_SOCKET)
{
if (!init()) {
#ifdef VM_TRACE
ndbout << "SocketClient::connect() failed " << m_server_name << " " << m_port << endl;
#endif
- return -1;
+ return NDB_INVALID_SOCKET;
}
}
const int r = ::connect(m_sockfd, (struct sockaddr*) &m_servaddr, sizeof(m_servaddr));
if (r == -1) {
NDB_CLOSE_SOCKET(m_sockfd);
- m_sockfd= -1;
- return -1;
+ m_sockfd= NDB_INVALID_SOCKET;
+ return NDB_INVALID_SOCKET;
}
if (m_auth) {
if (!m_auth->client_authenticate(m_sockfd))
{
NDB_CLOSE_SOCKET(m_sockfd);
- m_sockfd= -1;
- return -1;
+ m_sockfd= NDB_INVALID_SOCKET;
+ return NDB_INVALID_SOCKET;
}
}
NDB_SOCKET_TYPE sockfd= m_sockfd;
- m_sockfd= -1;
+ m_sockfd= NDB_INVALID_SOCKET;
return sockfd;
}
diff --git a/ndb/src/common/util/basestring_vsnprintf.c b/ndb/src/common/util/basestring_vsnprintf.c
index 8a58ca0fe5c..58203e33bd1 100644
--- a/ndb/src/common/util/basestring_vsnprintf.c
+++ b/ndb/src/common/util/basestring_vsnprintf.c
@@ -20,10 +20,12 @@
#include <basestring_vsnprintf.h>
#include <my_config.h>
+#ifdef _WINDOWS
+#define SNPRINTF_RETURN_TRUNC
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#endif
-/*
- #define SNPRINTF_RETURN_TRUNC
-*/
int
basestring_snprintf(char *str, size_t size, const char *format, ...)
{
@@ -35,16 +37,6 @@ basestring_snprintf(char *str, size_t size, const char *format, ...)
return(ret);
}
-#ifdef HAVE_SNPRINTF
- #define BASESTRING_VSNPRINTF_FUNC(a,b,c,d) vsnprintf(a,b,c,d)
-#else
- #define SNPRINTF_RETURN_TRUNC
- /* #define BASESTRING_VSNPRINTF_FUNC(a,b,c,d) my_vsnprintf(a,b,c,d)
- * we would like to use my_vsnprintf but it does not have enough features
- * Let's hope vsnprintf works anyways
- */
- #define BASESTRING_VSNPRINTF_FUNC(a,b,c,d) vsnprintf(a,b,c,d)
-#endif
#ifdef SNPRINTF_RETURN_TRUNC
static char basestring_vsnprintf_buf[16*1024];
#endif
@@ -54,22 +46,22 @@ basestring_vsnprintf(char *str, size_t size, const char *format, va_list ap)
if (size == 0)
{
#ifdef SNPRINTF_RETURN_TRUNC
- return BASESTRING_VSNPRINTF_FUNC(basestring_vsnprintf_buf,
- sizeof(basestring_vsnprintf_buf),
- format, ap);
+ return vsnprintf(basestring_vsnprintf_buf,
+ sizeof(basestring_vsnprintf_buf),
+ format, ap);
#else
char buf[1];
- return BASESTRING_VSNPRINTF_FUNC(buf, 1, format, ap);
+ return vsnprintf(buf, 1, format, ap);
#endif
}
{
- int ret= BASESTRING_VSNPRINTF_FUNC(str, size, format, ap);
+ int ret= vsnprintf(str, size, format, ap);
#ifdef SNPRINTF_RETURN_TRUNC
if (ret == size-1 || ret == -1)
{
- ret= BASESTRING_VSNPRINTF_FUNC(basestring_vsnprintf_buf,
- sizeof(basestring_vsnprintf_buf),
- format, ap);
+ ret= vsnprintf(basestring_vsnprintf_buf,
+ sizeof(basestring_vsnprintf_buf),
+ format, ap);
}
#endif
return ret;
diff --git a/ndb/src/common/util/version.c b/ndb/src/common/util/version.c
index 7a537297861..2a274be0662 100644
--- a/ndb/src/common/util/version.c
+++ b/ndb/src/common/util/version.c
@@ -17,6 +17,7 @@
#include <ndb_global.h>
#include <ndb_version.h>
#include <version.h>
+#include <basestring_vsnprintf.h>
Uint32 getMajor(Uint32 version) {
return (version >> 16) & 0xFF;
@@ -38,14 +39,14 @@ Uint32 makeVersion(Uint32 major, Uint32 minor, Uint32 build) {
const char * getVersionString(Uint32 version, const char * status) {
char buff[100];
if (status && status[0] != 0)
- snprintf(buff, sizeof(buff),
+ basestring_snprintf(buff, sizeof(buff),
"Version %d.%d.%d (%s)",
getMajor(version),
getMinor(version),
getBuild(version),
status);
else
- snprintf(buff, sizeof(buff),
+ basestring_snprintf(buff, sizeof(buff),
"Version %d.%d.%d",
getMajor(version),
getMinor(version),
diff --git a/ndb/src/cw/Makefile.am b/ndb/src/cw/Makefile.am
index b530922a3a7..7348fc9eab6 100644
--- a/ndb/src/cw/Makefile.am
+++ b/ndb/src/cw/Makefile.am
@@ -1 +1,4 @@
SUBDIRS = cpcd
+
+windoze-dsp:
+
diff --git a/ndb/src/cw/cpcd/Makefile.am b/ndb/src/cw/cpcd/Makefile.am
index 6af44a359fc..75f557b2af7 100644
--- a/ndb/src/cw/cpcd/Makefile.am
+++ b/ndb/src/cw/cpcd/Makefile.am
@@ -16,3 +16,5 @@ ndb_cpcd_LDFLAGS = @ndb_bin_am_ldflags@
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp:
diff --git a/ndb/src/kernel/Makefile.am b/ndb/src/kernel/Makefile.am
index 493ab4f9982..55d3c5a578f 100644
--- a/ndb/src/kernel/Makefile.am
+++ b/ndb/src/kernel/Makefile.am
@@ -59,3 +59,17 @@ LDADD += \
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: ndbd.dsp
+
+ndbd.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(ndbbin_PROGRAMS)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndbd_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
diff --git a/ndb/src/kernel/blocks/Makefile.am b/ndb/src/kernel/blocks/Makefile.am
index 0b2bc3b8c88..7ee90e6239f 100644
--- a/ndb/src/kernel/blocks/Makefile.am
+++ b/ndb/src/kernel/blocks/Makefile.am
@@ -15,3 +15,5 @@ SUBDIRS = \
suma \
grep \
dbtux
+
+windoze-dsp:
diff --git a/ndb/src/kernel/blocks/backup/Makefile.am b/ndb/src/kernel/blocks/backup/Makefile.am
index e669febdc0d..c8f44f31292 100644
--- a/ndb/src/kernel/blocks/backup/Makefile.am
+++ b/ndb/src/kernel/blocks/backup/Makefile.am
@@ -8,3 +8,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libbackup.dsp
+
+libbackup.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libbackup_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
index 234d832655c..c4127ba9283 100644
--- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
@@ -150,6 +150,7 @@ void Cmvmi::execNDB_TAMPER(Signal* signal)
ndbrequire(false);
}
+#ifndef NDB_WIN32
if(ERROR_INSERTED(9996)){
simulate_error_during_shutdown= SIGSEGV;
ndbrequire(false);
@@ -159,6 +160,7 @@ void Cmvmi::execNDB_TAMPER(Signal* signal)
simulate_error_during_shutdown= SIGSEGV;
kill(getpid(), SIGABRT);
}
+#endif
}//execNDB_TAMPER()
void Cmvmi::execSET_LOGLEVELORD(Signal* signal)
diff --git a/ndb/src/kernel/blocks/cmvmi/Makefile.am b/ndb/src/kernel/blocks/cmvmi/Makefile.am
index fdd43932682..dc2e12746fd 100644
--- a/ndb/src/kernel/blocks/cmvmi/Makefile.am
+++ b/ndb/src/kernel/blocks/cmvmi/Makefile.am
@@ -8,3 +8,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libcmvmi.dsp
+
+libcmvmi.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libcmvmi_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbacc/Makefile.am b/ndb/src/kernel/blocks/dbacc/Makefile.am
index eeca061dead..ca1b1efac37 100644
--- a/ndb/src/kernel/blocks/dbacc/Makefile.am
+++ b/ndb/src/kernel/blocks/dbacc/Makefile.am
@@ -10,3 +10,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbacc.dsp
+
+libdbacc.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbacc_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 85c17cc703b..458d567ccf8 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -527,7 +527,7 @@ Dbdict::writeTableFile(Signal* signal, Uint32 tableId,
Uint32 sz = tabInfoPtr.sz + ZPAGE_HEADER_SIZE;
c_writeTableRecord.noOfPages = DIV(sz, ZSIZE_OF_PAGES_IN_WORDS);
- c_writeTableRecord.tableWriteState = WriteTableRecord::CALLBACK;
+ c_writeTableRecord.tableWriteState = WriteTableRecord::TWR_CALLBACK;
c_writeTableRecord.m_callback = * callback;
c_writeTableRecord.pageId = 0;
@@ -646,7 +646,7 @@ void Dbdict::closeWriteTableConf(Signal* signal,
case WriteTableRecord::WRITE_RESTART_FROM_OWN :
ndbrequire(false);
break;
- case WriteTableRecord::CALLBACK:
+ case WriteTableRecord::TWR_CALLBACK:
jam();
execute(signal, c_writeTableRecord.m_callback, 0);
return;
@@ -2380,7 +2380,7 @@ Dbdict::restartCreateTab_readTableConf(Signal* signal,
ndbrequire(c_writeTableRecord.tableWriteState == WriteTableRecord::IDLE);
c_writeTableRecord.noOfPages = c_readTableRecord.noOfPages;
c_writeTableRecord.pageId = c_readTableRecord.pageId;
- c_writeTableRecord.tableWriteState = WriteTableRecord::CALLBACK;
+ c_writeTableRecord.tableWriteState = WriteTableRecord::TWR_CALLBACK;
c_writeTableRecord.m_callback.m_callbackData = callbackData;
c_writeTableRecord.m_callback.m_callbackFunction =
safe_cast(&Dbdict::restartCreateTab_writeTableConf);
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
index 95ac51eb17b..622da5d45fd 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
@@ -641,7 +641,7 @@ private:
WRITE_ADD_TABLE_SLAVE = 2,
WRITE_RESTART_FROM_MASTER = 3,
WRITE_RESTART_FROM_OWN = 4,
- CALLBACK = 5
+ TWR_CALLBACK = 5
};
TableWriteState tableWriteState;
Callback m_callback;
diff --git a/ndb/src/kernel/blocks/dbdict/Makefile.am b/ndb/src/kernel/blocks/dbdict/Makefile.am
index dc4c4fe4734..9a0d68f8148 100644
--- a/ndb/src/kernel/blocks/dbdict/Makefile.am
+++ b/ndb/src/kernel/blocks/dbdict/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbdict.dsp
+
+libdbdict.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbdict_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
index 0a2d50cb876..ee67bf47d7b 100644
--- a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+++ b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
@@ -1468,7 +1468,7 @@ private:
Uint32 c_blockCommitNo;
bool getBlockCommit() const {
- return c_blockCommit == true || cgckptflag == true;
+ return c_blockCommit || cgckptflag;
}
/**
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index c84908848f2..de08449730f 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -12941,7 +12941,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
Uint32 nodeOrder[MAX_REPLICAS];
const Uint32 noOfReplicas = extractNodeInfo(fragPtr.p, nodeOrder);
char buf[100];
- snprintf(buf, sizeof(buf), " Table %d Fragment %d - ", tabPtr.i, j);
+ BaseString::snprintf(buf, sizeof(buf), " Table %d Fragment %d - ", tabPtr.i, j);
for(Uint32 k = 0; k < noOfReplicas; k++){
char tmp[100];
BaseString::snprintf(tmp, sizeof(tmp), "%d ", nodeOrder[k]);
@@ -13152,7 +13152,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
getFragstore(tabPtr.p, fid, fragPtr);
char buf[100], buf2[100];
- snprintf(buf, sizeof(buf), " Fragment %d: noLcpReplicas==%d ",
+ BaseString::snprintf(buf, sizeof(buf), " Fragment %d: noLcpReplicas==%d ",
fid, fragPtr.p->noLcpReplicas);
Uint32 num=0;
diff --git a/ndb/src/kernel/blocks/dbdih/Makefile.am b/ndb/src/kernel/blocks/dbdih/Makefile.am
index 2ee8017ec13..d6ad380b806 100644
--- a/ndb/src/kernel/blocks/dbdih/Makefile.am
+++ b/ndb/src/kernel/blocks/dbdih/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbdih.dsp
+
+libdbdih.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbdih_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dblqh/Makefile.am b/ndb/src/kernel/blocks/dblqh/Makefile.am
index 3a58dba742e..854860b269c 100644
--- a/ndb/src/kernel/blocks/dblqh/Makefile.am
+++ b/ndb/src/kernel/blocks/dblqh/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdblqh.dsp
+
+libdblqh.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdblqh_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 0c8babcb56b..06bdaede8ef 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -6498,7 +6498,7 @@ void Dbtc::sendAbortedAfterTimeout(Signal* signal, int Tcheck)
*------------------------------------------------------------------*/
char buf[96]; buf[0] = 0;
char buf2[96];
- snprintf(buf, sizeof(buf), "TC %d: %d ops:",
+ BaseString::snprintf(buf, sizeof(buf), "TC %d: %d ops:",
__LINE__, apiConnectptr.i);
for(Uint32 i = 0; i<TloopCount; i++){
BaseString::snprintf(buf2, sizeof(buf2), "%s %d", buf, tmp[i]);
diff --git a/ndb/src/kernel/blocks/dbtc/Makefile.am b/ndb/src/kernel/blocks/dbtc/Makefile.am
index 4aa514c0aba..98ee2639bac 100644
--- a/ndb/src/kernel/blocks/dbtc/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtc/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbtc.dsp
+
+libdbtc.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbtc_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbtup/Makefile.am b/ndb/src/kernel/blocks/dbtup/Makefile.am
index 7e94a01d43b..e51410e6be3 100644
--- a/ndb/src/kernel/blocks/dbtup/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtup/Makefile.am
@@ -25,3 +25,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbtup.dsp
+
+libdbtup.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbtup_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbtux/Makefile.am b/ndb/src/kernel/blocks/dbtux/Makefile.am
index 7d012924522..b5951e8ed37 100644
--- a/ndb/src/kernel/blocks/dbtux/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtux/Makefile.am
@@ -18,3 +18,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbtux.dsp
+
+libdbtux.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbtux_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbutil/Makefile.am b/ndb/src/kernel/blocks/dbutil/Makefile.am
index 763875d578f..925356c2f76 100644
--- a/ndb/src/kernel/blocks/dbutil/Makefile.am
+++ b/ndb/src/kernel/blocks/dbutil/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbutil.dsp
+
+libdbutil.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbutil_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/grep/Grep.cpp b/ndb/src/kernel/blocks/grep/Grep.cpp
index 0e41182348f..e89361dab06 100644
--- a/ndb/src/kernel/blocks/grep/Grep.cpp
+++ b/ndb/src/kernel/blocks/grep/Grep.cpp
@@ -603,7 +603,7 @@ Grep::PSCoord::execCREATE_SUBID_CONF(Signal* signal)
GrepEvent::GrepPS_CreateSubIdConf,
subId,
subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
}
void
@@ -612,7 +612,7 @@ Grep::PSCoord::execCREATE_SUBID_REF(Signal* signal) {
CreateSubscriptionIdRef const * ref =
(CreateSubscriptionIdRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err;
+ GrepError::GE_Code err;
Uint32 sendersBlockRef = signal->getSendersBlockRef();
if(sendersBlockRef == SUMA_REF)
@@ -624,7 +624,7 @@ Grep::PSCoord::execCREATE_SUBID_REF(Signal* signal) {
ndbrequire(false); /* Added since errorcode err unhandled
* TODO: fix correct errorcode
*/
- err= GrepError::NO_ERROR; // remove compiler warning
+ err= GrepError::GE_NO_ERROR; // remove compiler warning
}
SubCoordinatorPtr subPtr;
@@ -824,7 +824,7 @@ Grep::PSPart::execSUB_CREATE_REF(Signal* signal)
jamEntry();
SubCreateRef * const ref = (SubCreateRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subData);
sendRefToPSCoord(signal, *subPtr.p, err /*error*/);
@@ -867,7 +867,7 @@ Grep::PSCoord::execGREP_CREATE_CONF(Signal* signal)
GrepEvent::GrepPS_SubCreateConf,
subId,
subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
c_subCoordinatorPool.release(subPtr);
@@ -889,7 +889,7 @@ Grep::PSCoord::execGREP_CREATE_REF(Signal* signal)
SubCoordinatorPtr subPtr;
c_runningSubscriptions.getPtr(subPtr, subData);
- sendRefToSS(signal, *subPtr.p, (GrepError::Code)err /*error*/);
+ sendRefToSS(signal, *subPtr.p, (GrepError::GE_Code)err /*error*/);
}
@@ -1046,7 +1046,7 @@ Grep::PSPart::execSUB_START_REF(Signal* signal)
{
SubStartRef * const ref = (SubStartRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subData);
@@ -1102,7 +1102,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal)
EventReport::GrepSubscriptionInfo,
GrepEvent::GrepPS_SubStartMetaConf,
subId, subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
c_subCoordinatorPool.release(subPtr);
break;
@@ -1118,7 +1118,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal)
EventReport::GrepSubscriptionInfo,
GrepEvent::GrepPS_SubStartDataConf,
subId, subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
c_subCoordinatorPool.release(subPtr);
@@ -1145,7 +1145,7 @@ Grep::PSCoord::execGREP_START_REF(Signal* signal)
jamEntry();
GrepStartRef * const ref = (GrepStartRef *)signal->getDataPtr();
Uint32 subData = ref->senderData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
SubCoordinatorPtr subPtr;
@@ -1301,7 +1301,7 @@ Grep::PSPart::execSUB_REMOVE_REF(Signal* signal)
jamEntry();
SubRemoveRef * const ref = (SubRemoveRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- /* GrepError::Code err = (GrepError::Code)ref->err;*/
+ /* GrepError::GE_Code err = (GrepError::GE_Code)ref->err;*/
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subData);
@@ -1342,7 +1342,7 @@ Grep::PSCoord::execGREP_REMOVE_CONF(Signal* signal)
EventReport::GrepSubscriptionInfo,
GrepEvent::GrepPS_SubRemoveConf,
subId, subKey,
- GrepError::NO_ERROR);
+ GrepError::GE_NO_ERROR);
GrepSubRemoveConf * grepConf = (GrepSubRemoveConf *) conf;
grepConf->subscriptionId = subId;
@@ -1375,7 +1375,7 @@ Grep::PSCoord::execGREP_REMOVE_REF(Signal* signal)
subPtr.p = c_runningSubscriptions.getPtr(subPtr.i);
if(subData == subPtr.i)
{
- sendRefToSS(signal, *subPtr.p, (GrepError::Code)err /*error*/);
+ sendRefToSS(signal, *subPtr.p, (GrepError::GE_Code)err /*error*/);
c_runningSubscriptions.release(subPtr);
return;
}
@@ -1633,7 +1633,7 @@ Grep::PSPart::execSUB_SYNC_REF(Signal* signal) {
jamEntry();
SubSyncRef * const ref = (SubSyncRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
SubscriptionPtr subPtr;
@@ -1677,7 +1677,7 @@ Grep::PSCoord::execGREP_SYNC_CONF(Signal* signal)
/* @todo Johan: Add firstGCI here. /Lars */
m_grep->sendEventRep(signal, EventReport::GrepSubscriptionInfo,
event, subId, subKey,
- (Uint32)GrepError::NO_ERROR,
+ (Uint32)GrepError::GE_NO_ERROR,
lastGCI);
/*************************
@@ -1707,7 +1707,7 @@ Grep::PSCoord::execGREP_SYNC_REF(Signal* signal) {
GrepSyncRef * const ref = (GrepSyncRef *)signal->getDataPtr();
Uint32 subData = ref->senderData;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubCoordinatorPtr subPtr;
c_runningSubscriptions.getPtr(subPtr, subData);
sendRefToSS(signal, *subPtr.p, err /*error*/, part);
@@ -1718,7 +1718,7 @@ Grep::PSCoord::execGREP_SYNC_REF(Signal* signal) {
void
Grep::PSCoord::sendRefToSS(Signal * signal,
SubCoordinator sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part) {
/**
@@ -1843,7 +1843,7 @@ Grep::PSCoord::sendRefToSS(Signal * signal,
void
Grep::PSPart::sendRefToPSCoord(Signal * signal,
Subscription sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part) {
jam();
diff --git a/ndb/src/kernel/blocks/grep/Grep.hpp b/ndb/src/kernel/blocks/grep/Grep.hpp
index eeabac36966..7d3dd916ecc 100644
--- a/ndb/src/kernel/blocks/grep/Grep.hpp
+++ b/ndb/src/kernel/blocks/grep/Grep.hpp
@@ -380,16 +380,16 @@ public:
Uint32 subId,
Uint32 subKey,
BlockReference to,
- GrepError::Code err);
+ GrepError::GE_Code err);
void sendSubRemoveRef_SS(Signal * signal,
SubCoordinator sub,
- GrepError::Code err);
+ GrepError::GE_Code err);
void sendRefToSS(Signal * signal,
SubCoordinator sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part = (SubscriptionData::Part)0);
void setRepRef(BlockReference rr) { m_repRef = rr; };
@@ -496,7 +496,7 @@ public:
void sendRefToPSCoord(Signal * signal,
Subscription sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part = (SubscriptionData::Part)0);
//protected:
diff --git a/ndb/src/kernel/blocks/grep/Makefile.am b/ndb/src/kernel/blocks/grep/Makefile.am
index 31081c7b6a0..6d2b422784b 100644
--- a/ndb/src/kernel/blocks/grep/Makefile.am
+++ b/ndb/src/kernel/blocks/grep/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libgrep.dsp
+
+libgrep.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libgrep_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/ndbcntr/Makefile.am b/ndb/src/kernel/blocks/ndbcntr/Makefile.am
index 9230b55b374..3f24675b2b3 100644
--- a/ndb/src/kernel/blocks/ndbcntr/Makefile.am
+++ b/ndb/src/kernel/blocks/ndbcntr/Makefile.am
@@ -10,3 +10,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libndbcntr.dsp
+
+libndbcntr.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libndbcntr_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/ndbfs/Makefile.am b/ndb/src/kernel/blocks/ndbfs/Makefile.am
index c2b663c5042..a22386f8612 100644
--- a/ndb/src/kernel/blocks/ndbfs/Makefile.am
+++ b/ndb/src/kernel/blocks/ndbfs/Makefile.am
@@ -11,3 +11,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libndbfs.dsp
+
+libndbfs.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libndbfs_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
index 56e3d3abbed..21b0a2cb54f 100644
--- a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
@@ -730,7 +730,7 @@ Ndbfs::scanIPC(Signal* signal)
jam();
report(request, signal);
theRequestPool->put(request);
- return &request;
+ return true;
}
return false;
}
diff --git a/ndb/src/kernel/blocks/qmgr/Makefile.am b/ndb/src/kernel/blocks/qmgr/Makefile.am
index 52cadb3bd3d..278af2a7865 100644
--- a/ndb/src/kernel/blocks/qmgr/Makefile.am
+++ b/ndb/src/kernel/blocks/qmgr/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libqmgr.dsp
+
+libqmgr.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libqmgr_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/suma/Makefile.am b/ndb/src/kernel/blocks/suma/Makefile.am
index 4dacb22af51..5a74dbb74eb 100644
--- a/ndb/src/kernel/blocks/suma/Makefile.am
+++ b/ndb/src/kernel/blocks/suma/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libsuma.dsp
+
+libsuma.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libsuma_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/trix/Makefile.am b/ndb/src/kernel/blocks/trix/Makefile.am
index 803da815cf0..343063a6283 100644
--- a/ndb/src/kernel/blocks/trix/Makefile.am
+++ b/ndb/src/kernel/blocks/trix/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libtrix.dsp
+
+libtrix.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libtrix_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/error/Makefile.am b/ndb/src/kernel/error/Makefile.am
index 4514d2d105c..54f3de2d76d 100644
--- a/ndb/src/kernel/error/Makefile.am
+++ b/ndb/src/kernel/error/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: liberror.dsp
+
+liberror.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(liberror_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/main.cpp b/ndb/src/kernel/main.cpp
index f34e16318cd..44fe1725c9e 100644
--- a/ndb/src/kernel/main.cpp
+++ b/ndb/src/kernel/main.cpp
@@ -69,11 +69,13 @@ int main(int argc, char** argv)
}
{ // Do configuration
- signal(SIGPIPE, SIG_IGN);
+#ifndef NDB_WIN32
+ signal(SIGPIPE, SIG_IGN);
+#endif
theConfig->fetch_configuration();
}
-
- chdir(NdbConfig_get_path(0));
+
+ my_setwd(NdbConfig_get_path(0), MYF(0));
if (theConfig->getDaemonMode()) {
// Become a daemon
@@ -87,6 +89,7 @@ int main(int argc, char** argv)
}
}
+#ifndef NDB_WIN32
for(pid_t child = fork(); child != 0; child = fork()){
/**
* Parent
@@ -137,6 +140,9 @@ int main(int argc, char** argv)
}
g_eventLogger.info("Angel pid: %d ndb pid: %d", getppid(), getpid());
+#else
+ g_eventLogger.info("Ndb started");
+#endif
theConfig->setupConfiguration();
systemInfo(* theConfig, * theConfig->m_logLevel);
@@ -268,7 +274,7 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
void
catchsigs(bool ignore){
-#if ! defined NDB_SOFTOSE && !defined NDB_OSE
+#if !defined NDB_WIN32 && !defined NDB_SOFTOSE && !defined NDB_OSE
static const int signals_shutdown[] = {
#ifdef SIGBREAK
@@ -310,7 +316,6 @@ catchsigs(bool ignore){
SIGTRAP
#endif
};
-#endif
static const int signals_ignore[] = {
SIGPIPE
@@ -323,6 +328,7 @@ catchsigs(bool ignore){
handler_register(signals_error[i], handler_error, ignore);
for(i = 0; i < sizeof(signals_ignore)/sizeof(signals_ignore[0]); i++)
handler_register(signals_ignore[i], SIG_IGN, ignore);
+#endif
}
extern "C"
@@ -341,8 +347,10 @@ handler_error(int signum){
if (thread_id != 0 && thread_id == my_thread_id())
{
// Shutdown thread received signal
- signal(signum, SIG_DFL);
+#ifndef NDB_WIN32
+ signal(signum, SIG_DFL);
kill(getpid(), signum);
+#endif
while(true)
NdbSleep_MilliSleep(10);
}
diff --git a/ndb/src/kernel/vm/Callback.hpp b/ndb/src/kernel/vm/Callback.hpp
index bf1ae5968d3..6a619ba7859 100644
--- a/ndb/src/kernel/vm/Callback.hpp
+++ b/ndb/src/kernel/vm/Callback.hpp
@@ -20,12 +20,5 @@
/**
* Block callbacks
*/
-typedef void (SimulatedBlock::* CallbackFunction)(class Signal*,
- Uint32 callbackData,
- Uint32 returnCode);
-struct Callback {
- CallbackFunction m_callbackFunction;
- Uint32 m_callbackData;
-};
#endif
diff --git a/ndb/src/kernel/vm/Configuration.cpp b/ndb/src/kernel/vm/Configuration.cpp
index 931b4da5a17..7c31490959b 100644
--- a/ndb/src/kernel/vm/Configuration.cpp
+++ b/ndb/src/kernel/vm/Configuration.cpp
@@ -281,19 +281,19 @@ static char * get_and_validate_path(ndb_mgm_configuration_iterator &iter,
memset(buf2, 0,sizeof(buf2));
#ifdef NDB_WIN32
char* szFilePart;
- if(!GetFullPathName(path, sizeof(buf2), buf2, &szFilePart)
- || (::GetFileAttributes(alloc_path)&FILE_ATTRIBUTE_READONLY))
+ if(!GetFullPathName(path, sizeof(buf2), buf2, &szFilePart) ||
+ (GetFileAttributes(buf2) & FILE_ATTRIBUTE_READONLY))
#else
- if((::realpath(path, buf2) == NULL)||
+ if((::realpath(path, buf2) == NULL)||
(::access(buf2, W_OK) != 0))
#endif
- {
- ERROR_SET(fatal, AFS_ERROR_INVALIDPATH, path, " Filename::init()");
- }
-
+ {
+ ERROR_SET(fatal, AFS_ERROR_INVALIDPATH, path, " Filename::init()");
+ }
+
if (strcmp(&buf2[strlen(buf2) - 1], DIR_SEPARATOR))
strcat(buf2, DIR_SEPARATOR);
-
+
return strdup(buf2);
}
@@ -561,7 +561,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
noOfDBNodes++; // No of NDB processes
if(nodeId > MAX_NDB_NODES){
- snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
+ BaseString::snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
MAX_NDB_NODES);
ERROR_SET(fatal, ERR_INVALID_CONFIG, msg, buf);
}
diff --git a/ndb/src/kernel/vm/Emulator.cpp b/ndb/src/kernel/vm/Emulator.cpp
index a5897cd4064..adf3c438945 100644
--- a/ndb/src/kernel/vm/Emulator.cpp
+++ b/ndb/src/kernel/vm/Emulator.cpp
@@ -179,12 +179,14 @@ NdbShutdown(NdbShutdownType type,
exit(-1);
#endif
}
-
+
+#ifndef NDB_WIN32
if (simulate_error_during_shutdown) {
kill(getpid(), simulate_error_during_shutdown);
while(true)
NdbSleep_MilliSleep(10);
}
+#endif
globalEmulatorData.theWatchDog->doStop();
diff --git a/ndb/src/kernel/vm/Makefile.am b/ndb/src/kernel/vm/Makefile.am
index 4e9dbe36c78..0dce9285ae3 100644
--- a/ndb/src/kernel/vm/Makefile.am
+++ b/ndb/src/kernel/vm/Makefile.am
@@ -27,3 +27,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libkernel.dsp
+
+libkernel.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libkernel_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/vm/Mutex.cpp b/ndb/src/kernel/vm/Mutex.cpp
index 1dbc6e7ec4a..aab9e74312b 100644
--- a/ndb/src/kernel/vm/Mutex.cpp
+++ b/ndb/src/kernel/vm/Mutex.cpp
@@ -19,48 +19,51 @@
#include "Mutex.hpp"
#include <signaldata/UtilLock.hpp>
-MutexManager::MutexManager(class SimulatedBlock & block)
+SimulatedBlock::MutexManager::MutexManager(class SimulatedBlock & block)
: m_block(block),
m_activeMutexes(m_mutexPool) {
}
bool
-MutexManager::setSize(Uint32 maxNoOfActiveMutexes){
+SimulatedBlock::MutexManager::setSize(Uint32 maxNoOfActiveMutexes){
return m_mutexPool.setSize(maxNoOfActiveMutexes);
}
Uint32
-MutexManager::getSize() const {
+SimulatedBlock::MutexManager::getSize() const {
return m_mutexPool.getSize();
}
bool
-MutexManager::seize(ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::seize(ActiveMutexPtr& ptr){
return m_activeMutexes.seize(ptr);
}
void
-MutexManager::release(Uint32 activeMutexPtrI){
+SimulatedBlock::MutexManager::release(Uint32 activeMutexPtrI){
m_activeMutexes.release(activeMutexPtrI);
}
void
-MutexManager::getPtr(ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::getPtr(ActiveMutexPtr& ptr){
m_activeMutexes.getPtr(ptr);
}
BlockReference
-MutexManager::reference() const {
+SimulatedBlock::MutexManager::reference() const {
return m_block.reference();
}
void
-MutexManager::progError(int line, int err_code, const char* extra) {
+SimulatedBlock::MutexManager::progError(int line,
+ int err_code,
+ const char* extra)
+{
m_block.progError(line, err_code, extra);
}
void
-MutexManager::create(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::create(Signal* signal, ActiveMutexPtr& ptr){
UtilCreateLockReq * req = (UtilCreateLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -78,7 +81,7 @@ MutexManager::create(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_CREATE_LOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_CREATE_LOCK_REF(Signal* signal){
UtilCreateLockRef * ref = (UtilCreateLockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
@@ -91,7 +94,7 @@ MutexManager::execUTIL_CREATE_LOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_CREATE_LOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_CREATE_LOCK_CONF(Signal* signal){
UtilCreateLockConf * conf = (UtilCreateLockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
@@ -105,7 +108,7 @@ MutexManager::execUTIL_CREATE_LOCK_CONF(Signal* signal){
void
-MutexManager::destroy(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::destroy(Signal* signal, ActiveMutexPtr& ptr){
UtilDestroyLockReq * req = (UtilDestroyLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -123,7 +126,7 @@ MutexManager::destroy(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_DESTORY_LOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_DESTORY_LOCK_REF(Signal* signal){
UtilDestroyLockRef * ref = (UtilDestroyLockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, ref->senderData);
@@ -135,7 +138,7 @@ MutexManager::execUTIL_DESTORY_LOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_DESTORY_LOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_DESTORY_LOCK_CONF(Signal* signal){
UtilDestroyLockConf * conf = (UtilDestroyLockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, conf->senderData);
@@ -148,7 +151,7 @@ MutexManager::execUTIL_DESTORY_LOCK_CONF(Signal* signal){
void
-MutexManager::lock(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::lock(Signal* signal, ActiveMutexPtr& ptr){
UtilLockReq * req = (UtilLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -166,7 +169,7 @@ MutexManager::lock(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::trylock(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::trylock(Signal* signal, ActiveMutexPtr& ptr){
UtilLockReq * req = (UtilLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -184,7 +187,7 @@ MutexManager::trylock(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_LOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_LOCK_REF(Signal* signal){
UtilLockRef * ref = (UtilLockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, ref->senderData);
@@ -196,7 +199,7 @@ MutexManager::execUTIL_LOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_LOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_LOCK_CONF(Signal* signal){
UtilLockConf * conf = (UtilLockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, conf->senderData);
@@ -210,7 +213,7 @@ MutexManager::execUTIL_LOCK_CONF(Signal* signal){
}
void
-MutexManager::unlock(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::unlock(Signal* signal, ActiveMutexPtr& ptr){
UtilUnlockReq * req = (UtilUnlockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
req->senderRef = m_block.reference();
@@ -227,7 +230,7 @@ MutexManager::unlock(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_UNLOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_UNLOCK_REF(Signal* signal){
UtilUnlockRef * ref = (UtilUnlockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, ref->senderData);
@@ -239,7 +242,7 @@ MutexManager::execUTIL_UNLOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_UNLOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_UNLOCK_CONF(Signal* signal){
UtilUnlockConf * conf = (UtilUnlockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, conf->senderData);
@@ -251,8 +254,9 @@ MutexManager::execUTIL_UNLOCK_CONF(Signal* signal){
}
void
-Mutex::release(MutexManager& mgr, Uint32 activePtrI, Uint32 mutexId){
- MutexManager::ActiveMutexPtr ptr;
+Mutex::release(SimulatedBlock::MutexManager& mgr,
+ Uint32 activePtrI, Uint32 mutexId){
+ SimulatedBlock::MutexManager::ActiveMutexPtr ptr;
ptr.i = activePtrI;
mgr.getPtr(ptr);
if(ptr.p->m_gsn == 0 && ptr.p->m_mutexId == mutexId){
@@ -272,7 +276,8 @@ Mutex::unlock(){
if(!m_ptr.isNull()){
m_mgr.getPtr(m_ptr);
if(m_ptr.p->m_mutexId == m_mutexId){
- Callback c = { &SimulatedBlock::ignoreMutexUnlockCallback, m_ptr.i };
+ SimulatedBlock::Callback c =
+ { &SimulatedBlock::ignoreMutexUnlockCallback, m_ptr.i };
m_ptr.p->m_callback = c;
m_mgr.unlock(m_signal, m_ptr);
m_ptr.setNull(); // Remove reference
diff --git a/ndb/src/kernel/vm/Mutex.hpp b/ndb/src/kernel/vm/Mutex.hpp
index 40e3fb56b4f..7a16046188c 100644
--- a/ndb/src/kernel/vm/Mutex.hpp
+++ b/ndb/src/kernel/vm/Mutex.hpp
@@ -22,63 +22,6 @@
class Mutex;
-class MutexManager {
- friend class Mutex;
- friend class SimulatedBlock;
- friend class DbUtil;
-public:
- MutexManager(class SimulatedBlock &);
-
- bool setSize(Uint32 maxNoOfActiveMutexes);
- Uint32 getSize() const ; // Get maxNoOfActiveMutexes
-
-private:
- /**
- * core interface
- */
- struct ActiveMutex {
- Uint32 m_gsn; // state
- Uint32 m_mutexId;
- Uint32 m_mutexKey;
- Callback m_callback;
- union {
- Uint32 nextPool;
- Uint32 nextList;
- };
- Uint32 prevList;
- };
- typedef Ptr<ActiveMutex> ActiveMutexPtr;
-
- bool seize(ActiveMutexPtr& ptr);
- void release(Uint32 activeMutexPtrI);
-
- void getPtr(ActiveMutexPtr& ptr);
-
- void create(Signal*, ActiveMutexPtr&);
- void destroy(Signal*, ActiveMutexPtr&);
- void lock(Signal*, ActiveMutexPtr&);
- void trylock(Signal*, ActiveMutexPtr&);
- void unlock(Signal*, ActiveMutexPtr&);
-
-private:
- void execUTIL_CREATE_LOCK_REF(Signal* signal);
- void execUTIL_CREATE_LOCK_CONF(Signal* signal);
- void execUTIL_DESTORY_LOCK_REF(Signal* signal);
- void execUTIL_DESTORY_LOCK_CONF(Signal* signal);
- void execUTIL_LOCK_REF(Signal* signal);
- void execUTIL_LOCK_CONF(Signal* signal);
- void execUTIL_UNLOCK_REF(Signal* signal);
- void execUTIL_UNLOCK_CONF(Signal* signal);
-
- SimulatedBlock & m_block;
- ArrayPool<ActiveMutex> m_mutexPool;
- DLList<ActiveMutex> m_activeMutexes;
-
- BlockReference reference() const;
- void progError(int line, int err_code, const char* extra = 0);
-};
-
-
/**
* MutexHandle - A "reference" to a mutex
* - Should be used together with Mutex
@@ -89,7 +32,7 @@ public:
MutexHandle(Uint32 id);
bool isNull() const;
- void release(MutexManager & mgr);
+ void release(SimulatedBlock::MutexManager & mgr);
private:
const Uint32 m_mutexId;
@@ -106,7 +49,7 @@ public:
MutexHandle2();
bool isNull() const;
- void release(MutexManager & mgr);
+ void release(SimulatedBlock::MutexManager & mgr);
private:
Uint32 m_activeMutexPtrI;
@@ -117,33 +60,34 @@ private:
*/
class Mutex {
public:
- Mutex(Signal*, MutexManager & mgr, MutexHandle &);
+ Mutex(Signal*, SimulatedBlock::MutexManager & mgr, MutexHandle &);
template<Uint32 MutexId>
- Mutex(Signal*, MutexManager & mgr, MutexHandle2<MutexId> &);
+ Mutex(Signal*, SimulatedBlock::MutexManager & mgr, MutexHandle2<MutexId> &);
~Mutex();
void release();
bool isNull() const ;
- bool lock(Callback & callback);
- bool trylock(Callback & callback);
- void unlock(Callback & callback);
+ bool lock(SimulatedBlock::Callback & callback);
+ bool trylock(SimulatedBlock::Callback & callback);
+ void unlock(SimulatedBlock::Callback & callback);
void unlock(); // Ignore callback
- bool create(Callback & callback);
- bool destroy(Callback & callback);
+ bool create(SimulatedBlock::Callback & callback);
+ bool destroy(SimulatedBlock::Callback & callback);
private:
Signal* m_signal;
- MutexManager & m_mgr;
+ SimulatedBlock::MutexManager & m_mgr;
const Uint32 m_mutexId;
Uint32 & m_srcPtrI;
- MutexManager::ActiveMutexPtr m_ptr;
+ SimulatedBlock::MutexManager::ActiveMutexPtr m_ptr;
public:
- static void release(MutexManager&, Uint32 activePtrI, Uint32 mutexId);
+ static void release(SimulatedBlock::MutexManager&,
+ Uint32 activePtrI, Uint32 mutexId);
};
inline
@@ -159,7 +103,7 @@ MutexHandle::isNull() const {
inline
void
-MutexHandle::release(MutexManager & mgr){
+MutexHandle::release(SimulatedBlock::MutexManager & mgr){
if(!isNull()){
Mutex::release(mgr, m_activeMutexPtrI, m_mutexId);
m_activeMutexPtrI = RNIL;
@@ -183,7 +127,7 @@ MutexHandle2<MutexId>::isNull() const {
template<Uint32 MutexId>
inline
void
-MutexHandle2<MutexId>::release(MutexManager & mgr){
+MutexHandle2<MutexId>::release(SimulatedBlock::MutexManager & mgr){
if(!isNull()){
Mutex::release(mgr, m_activeMutexPtrI, MutexId);
m_activeMutexPtrI = RNIL;
@@ -192,7 +136,8 @@ MutexHandle2<MutexId>::release(MutexManager & mgr){
inline
-Mutex::Mutex(Signal* signal, MutexManager & mgr, MutexHandle & mh)
+Mutex::Mutex(Signal* signal, SimulatedBlock::MutexManager & mgr,
+ MutexHandle & mh)
: m_signal(signal),
m_mgr(mgr),
m_mutexId(mh.m_mutexId),
@@ -204,7 +149,8 @@ Mutex::Mutex(Signal* signal, MutexManager & mgr, MutexHandle & mh)
template<Uint32 MutexId>
inline
-Mutex::Mutex(Signal* signal, MutexManager & mgr, MutexHandle2<MutexId> & mh)
+Mutex::Mutex(Signal* signal, SimulatedBlock::MutexManager & mgr,
+ MutexHandle2<MutexId> & mh)
: m_signal(signal),
m_mgr(mgr),
m_mutexId(MutexId),
@@ -236,7 +182,7 @@ Mutex::isNull() const {
inline
bool
-Mutex::lock(Callback & callback){
+Mutex::lock(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
@@ -253,7 +199,7 @@ Mutex::lock(Callback & callback){
inline
bool
-Mutex::trylock(Callback & callback){
+Mutex::trylock(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
@@ -270,7 +216,7 @@ Mutex::trylock(Callback & callback){
inline
void
-Mutex::unlock(Callback & callback){
+Mutex::unlock(SimulatedBlock::Callback & callback){
if(!m_ptr.isNull()){
m_mgr.getPtr(m_ptr);
if(m_ptr.p->m_mutexId == m_mutexId){
@@ -285,7 +231,7 @@ Mutex::unlock(Callback & callback){
inline
bool
-Mutex::create(Callback & callback){
+Mutex::create(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
@@ -302,7 +248,7 @@ Mutex::create(Callback & callback){
inline
bool
-Mutex::destroy(Callback & callback){
+Mutex::destroy(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
diff --git a/ndb/src/kernel/vm/SectionReader.cpp b/ndb/src/kernel/vm/SectionReader.cpp
index 9e1cbc855e6..dd474a49e50 100644
--- a/ndb/src/kernel/vm/SectionReader.cpp
+++ b/ndb/src/kernel/vm/SectionReader.cpp
@@ -26,7 +26,7 @@
#endif
SectionReader::SectionReader
-(class SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
+(struct SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
: m_pool(pool)
{
if(ptr.p == 0){
diff --git a/ndb/src/kernel/vm/SectionReader.hpp b/ndb/src/kernel/vm/SectionReader.hpp
index 17eade24a66..b51006b6128 100644
--- a/ndb/src/kernel/vm/SectionReader.hpp
+++ b/ndb/src/kernel/vm/SectionReader.hpp
@@ -21,7 +21,7 @@
class SectionReader {
public:
- SectionReader(class SegmentedSectionPtr &,
+ SectionReader(struct SegmentedSectionPtr &,
class SectionSegmentPool &);
void reset();
diff --git a/ndb/src/kernel/vm/SimplePropertiesSection.cpp b/ndb/src/kernel/vm/SimplePropertiesSection.cpp
index d442ff2e698..070563be36b 100644
--- a/ndb/src/kernel/vm/SimplePropertiesSection.cpp
+++ b/ndb/src/kernel/vm/SimplePropertiesSection.cpp
@@ -19,7 +19,7 @@
#include "LongSignal.hpp"
SimplePropertiesSectionReader::SimplePropertiesSectionReader
-(class SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
+(struct SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
: m_pool(pool)
{
if(ptr.p == 0){
@@ -190,7 +190,7 @@ SimplePropertiesSectionWriter::putWords(const Uint32 * src, Uint32 len){
}
void
-SimplePropertiesSectionWriter::getPtr(class SegmentedSectionPtr & dst){
+SimplePropertiesSectionWriter::getPtr(struct SegmentedSectionPtr & dst){
// Set last ptr and size
if(m_pos >= 0){
dst.p = m_head;
diff --git a/ndb/src/kernel/vm/SimulatedBlock.cpp b/ndb/src/kernel/vm/SimulatedBlock.cpp
index e6b97771d36..94fd5769406 100644
--- a/ndb/src/kernel/vm/SimulatedBlock.cpp
+++ b/ndb/src/kernel/vm/SimulatedBlock.cpp
@@ -1598,7 +1598,7 @@ SimulatedBlock::sendFragmentedSignal(NodeReceiverGroup rg,
}
}
-Callback SimulatedBlock::TheEmptyCallback = {0, 0};
+SimulatedBlock::Callback SimulatedBlock::TheEmptyCallback = {0, 0};
void
SimulatedBlock::sendFragmentedSignal(BlockReference ref,
diff --git a/ndb/src/kernel/vm/SimulatedBlock.hpp b/ndb/src/kernel/vm/SimulatedBlock.hpp
index 7972cb39746..cff19734368 100644
--- a/ndb/src/kernel/vm/SimulatedBlock.hpp
+++ b/ndb/src/kernel/vm/SimulatedBlock.hpp
@@ -41,7 +41,6 @@
#include "ArrayPool.hpp"
#include "DLHashTable.hpp"
#include "Callback.hpp"
-#include "Mutex.hpp"
#include "SafeCounter.hpp"
#include "MetaData.hpp"
@@ -77,7 +76,6 @@ typedef struct NewVar
} NewVARIABLE; /* 128 bits */
class SimulatedBlock {
- friend class MutexManager;
friend class SafeCounter;
friend class SafeCounterManager;
friend struct UpgradeStartup;
@@ -104,6 +102,14 @@ public:
*
*/
inline void executeFunction(GlobalSignalNumber gsn, Signal* signal);
+public:
+ typedef void (SimulatedBlock::* CallbackFunction)(class Signal*,
+ Uint32 callbackData,
+ Uint32 returnCode);
+ struct Callback {
+ CallbackFunction m_callbackFunction;
+ Uint32 m_callbackData;
+ };
protected:
static Callback TheEmptyCallback;
void execute(Signal* signal, Callback & c, Uint32 returnCode);
@@ -405,7 +411,64 @@ private:
DLList<FragmentSendInfo> c_linearFragmentSendList;
DLList<FragmentSendInfo> c_segmentedFragmentSendList;
-public:
+public:
+ class MutexManager {
+ friend class Mutex;
+ friend class SimulatedBlock;
+ friend class DbUtil;
+ public:
+ MutexManager(class SimulatedBlock &);
+
+ bool setSize(Uint32 maxNoOfActiveMutexes);
+ Uint32 getSize() const ; // Get maxNoOfActiveMutexes
+
+ private:
+ /**
+ * core interface
+ */
+ struct ActiveMutex {
+ Uint32 m_gsn; // state
+ Uint32 m_mutexId;
+ Uint32 m_mutexKey;
+ Callback m_callback;
+ union {
+ Uint32 nextPool;
+ Uint32 nextList;
+ };
+ Uint32 prevList;
+ };
+ typedef Ptr<ActiveMutex> ActiveMutexPtr;
+
+ bool seize(ActiveMutexPtr& ptr);
+ void release(Uint32 activeMutexPtrI);
+
+ void getPtr(ActiveMutexPtr& ptr);
+
+ void create(Signal*, ActiveMutexPtr&);
+ void destroy(Signal*, ActiveMutexPtr&);
+ void lock(Signal*, ActiveMutexPtr&);
+ void trylock(Signal*, ActiveMutexPtr&);
+ void unlock(Signal*, ActiveMutexPtr&);
+
+ private:
+ void execUTIL_CREATE_LOCK_REF(Signal* signal);
+ void execUTIL_CREATE_LOCK_CONF(Signal* signal);
+ void execUTIL_DESTORY_LOCK_REF(Signal* signal);
+ void execUTIL_DESTORY_LOCK_CONF(Signal* signal);
+ void execUTIL_LOCK_REF(Signal* signal);
+ void execUTIL_LOCK_CONF(Signal* signal);
+ void execUTIL_UNLOCK_REF(Signal* signal);
+ void execUTIL_UNLOCK_CONF(Signal* signal);
+
+ SimulatedBlock & m_block;
+ ArrayPool<ActiveMutex> m_mutexPool;
+ DLList<ActiveMutex> m_activeMutexes;
+
+ BlockReference reference() const;
+ void progError(int line, int err_code, const char* extra = 0);
+ };
+
+ friend class MutexManager;
MutexManager c_mutexMgr;
void ignoreMutexUnlockCallback(Signal* signal, Uint32 ptrI, Uint32 retVal);
@@ -688,5 +751,7 @@ BLOCK::addRecSignal(GlobalSignalNumber gsn, ExecSignalLocal f, bool force){ \
addRecSignalImpl(gsn, (ExecFunction)f, force);\
}
+#include "Mutex.hpp"
+
#endif
diff --git a/ndb/src/mgmapi/Makefile.am b/ndb/src/mgmapi/Makefile.am
index d64216b56c0..2f2fb407e46 100644
--- a/ndb/src/mgmapi/Makefile.am
+++ b/ndb/src/mgmapi/Makefile.am
@@ -14,3 +14,17 @@ include $(top_srcdir)/ndb/config/type_util.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libmgmapi.dsp
+
+libmgmapi.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libmgmapi_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index e22ceffe773..6794ffcd8dc 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -1117,7 +1117,7 @@ ndb_mgm_listen_event(NdbMgmHandle handle, int filter[])
int port= ndb_mgm_get_connected_port(handle);
SocketClient s(hostname, port);
const NDB_SOCKET_TYPE sockfd = s.connect();
- if (sockfd < 0) {
+ if (sockfd == NDB_INVALID_SOCKET) {
setError(handle, NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET, __LINE__,
"Unable to connect to");
return -1;
diff --git a/ndb/src/mgmapi/mgmapi_configuration.cpp b/ndb/src/mgmapi/mgmapi_configuration.cpp
index ae7fe2c294c..7bac2d10b92 100644
--- a/ndb/src/mgmapi/mgmapi_configuration.cpp
+++ b/ndb/src/mgmapi/mgmapi_configuration.cpp
@@ -1,3 +1,4 @@
+#include <ndb_types.h>
#include <mgmapi.h>
#include "mgmapi_configuration.hpp"
#include <new>
@@ -138,7 +139,7 @@ ndb_mgm_get_int_parameter(const ndb_mgm_configuration_iterator* iter,
extern "C"
int
ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator* iter,
- int param, unsigned long long * value){
+ int param, Uint64 * value){
return iter->get(param, value);
}
diff --git a/ndb/src/mgmapi/mgmapi_configuration.hpp b/ndb/src/mgmapi/mgmapi_configuration.hpp
index c7feffd3a4e..9e94b3311bf 100644
--- a/ndb/src/mgmapi/mgmapi_configuration.hpp
+++ b/ndb/src/mgmapi/mgmapi_configuration.hpp
@@ -21,7 +21,7 @@ struct ndb_mgm_configuration_iterator {
int find(int param, unsigned value);
int get(int param, unsigned * value) const ;
- int get(int param, unsigned long long * value) const ;
+ int get(int param, Uint64 * value) const ;
int get(int param, const char ** value) const ;
//
diff --git a/ndb/src/mgmclient/Makefile.am b/ndb/src/mgmclient/Makefile.am
index b8f9f82e501..c63e8d1bff8 100644
--- a/ndb/src/mgmclient/Makefile.am
+++ b/ndb/src/mgmclient/Makefile.am
@@ -30,3 +30,29 @@ ndb_mgm_LDFLAGS = @ndb_bin_am_ldflags@
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: ndb_mgm.dsp libndbmgmclient.dsp
+
+ndb_mgm.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(ndbtools_PROGRAMS)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_mgm_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+libndbmgmclient.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libndbmgmclient_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB
diff --git a/ndb/src/mgmsrv/CommandInterpreter.cpp b/ndb/src/mgmsrv/CommandInterpreter.cpp
index 02bf24f1d9c..0ce24cc81d2 100644
--- a/ndb/src/mgmsrv/CommandInterpreter.cpp
+++ b/ndb/src/mgmsrv/CommandInterpreter.cpp
@@ -28,7 +28,7 @@
#include "ConfigInfo.hpp"
#include <version.h>
-
+#include <m_string.h>
static const char* helpTexts[] = {
"HELP Print help text",
@@ -497,7 +497,7 @@ void CommandInterpreter::executeClusterLog(char* parameters) {
noArgs = true;
}
while (item != NULL) {
- snprintf(name, 12, item);
+ BaseString::snprintf(name, 12, item);
if (strcmp(item, "ALL") == 0) {
severity = 7;
@@ -747,9 +747,10 @@ CommandInterpreter::executeDumpState(int processId, const char* parameters,
char * tmpString = strdup(parameters);
char * tmpPtr = 0;
char * item = strtok_r(tmpString, " ", &tmpPtr);
+ int error;
while(item != NULL){
- if (0x0 <= strtoll(item, NULL, 0) && strtoll(item, NULL, 0) <= 0xffffffff) {
- pars[no] = strtoll(item, NULL, 0);
+ if (0x0 <= my_strtoll10(item, NULL, &error) && my_strtoll10(item, NULL, &error) <= 0xffffffff) {
+ pars[no] = my_strtoll10(item, NULL, &error);
} else {
ndbout << "Illegal value in argument to signal." << endl
<< "(Value must be between 0 and 0xffffffff.)"
diff --git a/ndb/src/mgmsrv/Config.cpp b/ndb/src/mgmsrv/Config.cpp
index f9c6a23f909..5ff9cbe04ad 100644
--- a/ndb/src/mgmsrv/Config.cpp
+++ b/ndb/src/mgmsrv/Config.cpp
@@ -53,27 +53,27 @@ Config::printAllNameValuePairs(NdbOut &out,
if(!section->contains(n))
continue;
- if (m_info.getStatus(section, n) == ConfigInfo::INTERNAL)
+ if (m_info.getStatus(section, n) == ConfigInfo::CI_INTERNAL)
continue;
- if (m_info.getStatus(section, n) == ConfigInfo::DEPRICATED)
+ if (m_info.getStatus(section, n) == ConfigInfo::CI_DEPRICATED)
continue;
- if (m_info.getStatus(section, n) == ConfigInfo::NOTIMPLEMENTED)
+ if (m_info.getStatus(section, n) == ConfigInfo::CI_NOTIMPLEMENTED)
continue;
out << n << ": ";
switch (m_info.getType(section, n)) {
- case ConfigInfo::INT:
+ case ConfigInfo::CI_INT:
MGM_REQUIRE(prop->get(n, &int_value));
out << int_value;
break;
- case ConfigInfo::INT64:
+ case ConfigInfo::CI_INT64:
MGM_REQUIRE(prop->get(n, &int_64));
out << int_64;
break;
- case ConfigInfo::BOOL:
+ case ConfigInfo::CI_BOOL:
MGM_REQUIRE(prop->get(n, &int_value));
if (int_value) {
out << "Y";
@@ -81,11 +81,11 @@ Config::printAllNameValuePairs(NdbOut &out,
out << "N";
}
break;
- case ConfigInfo::STRING:
+ case ConfigInfo::CI_STRING:
MGM_REQUIRE(prop->get(n, &str_value));
out << str_value;
break;
- case ConfigInfo::SECTION:
+ case ConfigInfo::CI_SECTION:
out << "SECTION";
break;
}
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp
index 7417bef5619..ab2e34f6d3a 100644
--- a/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -21,6 +21,7 @@
#include <mgmapi_config_parameters.h>
#include <ndb_limits.h>
#include "InitConfigFileParser.hpp"
+#include <m_string.h>
#define MAX_LINE_LENGTH 255
#define KEY_INTERNAL 0
@@ -260,9 +261,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"COMPUTER",
"COMPUTER",
"Computer section",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
0,
0, 0 },
@@ -271,9 +272,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Id",
"COMPUTER",
"Name of computer",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -282,9 +283,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName",
"COMPUTER",
"Hostname of computer (e.g. mysql.com)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -293,9 +294,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ByteOrder",
"COMPUTER",
0,
- ConfigInfo::DEPRICATED,
+ ConfigInfo::CI_DEPRICATED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0,
0 },
@@ -308,9 +309,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SYSTEM",
"SYSTEM",
"System section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)CFG_SECTION_SYSTEM,
0, 0 },
@@ -319,9 +320,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Name",
"SYSTEM",
"Name of system (NDB Cluster)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -330,9 +331,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ReplicationRole",
"SYSTEM",
"Role in Global Replication (None, Primary, or Standby)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -341,9 +342,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PrimaryMGMNode",
"SYSTEM",
"Node id of Primary "MGM_TOKEN_PRINT" node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -353,9 +354,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ConfigGenerationNumber",
"SYSTEM",
"Configuration generation number",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -368,9 +369,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
DB_TOKEN,
DB_TOKEN,
"Node section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)NODE_TYPE_DB,
0, 0
},
@@ -380,9 +381,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName",
DB_TOKEN,
"Name of computer for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -391,9 +392,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"System",
DB_TOKEN,
"Name of system for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -402,9 +403,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Id",
DB_TOKEN,
"Number identifying the database node ("DB_TOKEN_PRINT")",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
@@ -414,9 +415,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ServerPort",
DB_TOKEN,
"Port used to setup transporter",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
UNDEFINED,
"1",
STR_VALUE(MAX_INT_RNIL) },
@@ -426,9 +427,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NoOfReplicas",
DB_TOKEN,
"Number of copies of all data in the database (1-4)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"1",
"4" },
@@ -438,9 +439,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfAttributes",
DB_TOKEN,
"Total number of attributes stored in database. I.e. sum over all tables",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1000",
"32",
STR_VALUE(MAX_INT_RNIL) },
@@ -450,9 +451,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfTables",
DB_TOKEN,
"Total number of tables stored in the database",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"128",
"8",
STR_VALUE(MAX_INT_RNIL) },
@@ -462,9 +463,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfOrderedIndexes",
DB_TOKEN,
"Total number of ordered indexes that can be defined in the system",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"128",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -474,9 +475,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfUniqueHashIndexes",
DB_TOKEN,
"Total number of unique hash indexes that can be defined in the system",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"64",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -486,9 +487,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfIndexes",
DB_TOKEN,
"Total number of indexes that can be defined in the system",
- ConfigInfo::DEPRICATED,
+ ConfigInfo::CI_DEPRICATED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"128",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -498,9 +499,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfConcurrentIndexOperations",
DB_TOKEN,
"Total number of index operations that can execute simultaneously on one "DB_TOKEN_PRINT" node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"8K",
"0",
STR_VALUE(MAX_INT_RNIL)
@@ -511,9 +512,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfTriggers",
DB_TOKEN,
"Total number of triggers that can be defined in the system",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"768",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -523,9 +524,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfFiredTriggers",
DB_TOKEN,
"Total number of triggers that can fire simultaneously in one "DB_TOKEN_PRINT" node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"4000",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -535,9 +536,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ExecuteOnComputer",
DB_TOKEN,
"String referencing an earlier defined COMPUTER",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -546,9 +547,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfSavedMessages",
DB_TOKEN,
"Max number of error messages in error log and max number of trace files",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"25",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -558,9 +559,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LockPagesInMainMemory",
DB_TOKEN,
"If set to yes, then NDB Cluster data will not be swapped out to disk",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"false",
"false",
"true" },
@@ -570,9 +571,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"TimeBetweenWatchDogCheck",
DB_TOKEN,
"Time between execution checks inside a database node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"6000",
"70",
STR_VALUE(MAX_INT_RNIL) },
@@ -582,9 +583,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"StopOnError",
DB_TOKEN,
"If set to N, "DB_TOKEN_PRINT" automatically restarts/recovers in case of node failure",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"true",
"false",
"true" },
@@ -594,9 +595,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"RestartOnErrorInsert",
DB_TOKEN,
"See src/kernel/vm/Emulator.hpp NdbRestartType for details",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"2",
"0",
"4" },
@@ -606,9 +607,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfConcurrentOperations",
DB_TOKEN,
"Max number of operation records in transaction coordinator",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"32k",
"32",
STR_VALUE(MAX_INT_RNIL) },
@@ -618,9 +619,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfLocalOperations",
DB_TOKEN,
"Max number of operation records defined in the local storage node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
UNDEFINED,
"32",
STR_VALUE(MAX_INT_RNIL) },
@@ -630,9 +631,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfLocalScans",
DB_TOKEN,
"Max number of fragment scans in parallel in the local storage node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
UNDEFINED,
"32",
STR_VALUE(MAX_INT_RNIL) },
@@ -642,9 +643,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BatchSizePerLocalScan",
DB_TOKEN,
"Used to calculate the number of lock records for scan with hold lock",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
STR_VALUE(DEF_BATCH_SIZE),
"1",
STR_VALUE(MAX_PARALLEL_OP_PER_SCAN) },
@@ -654,9 +655,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfConcurrentTransactions",
DB_TOKEN,
"Max number of transaction executing concurrently on the "DB_TOKEN_PRINT" node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"4096",
"32",
STR_VALUE(MAX_INT_RNIL) },
@@ -666,9 +667,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfConcurrentScans",
DB_TOKEN,
"Max number of scans executing concurrently on the "DB_TOKEN_PRINT" node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"256",
"2",
"500" },
@@ -678,9 +679,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"TransactionBufferMemory",
DB_TOKEN,
"Dynamic buffer space (in bytes) for key and attribute data allocated for each "DB_TOKEN_PRINT" node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1M",
"1K",
STR_VALUE(MAX_INT_RNIL) },
@@ -690,9 +691,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"IndexMemory",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for storing indexes",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT64,
+ ConfigInfo::CI_INT64,
"18M",
"1M",
"1024G" },
@@ -702,9 +703,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"DataMemory",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for storing data",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT64,
+ ConfigInfo::CI_INT64,
"80M",
"1M",
"1024G" },
@@ -714,9 +715,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"UndoIndexBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for writing UNDO logs for index part",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"2M",
"1M",
STR_VALUE(MAX_INT_RNIL)},
@@ -726,9 +727,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"UndoDataBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for writing UNDO logs for data part",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"16M",
"1M",
STR_VALUE(MAX_INT_RNIL)},
@@ -738,9 +739,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"RedoBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for writing REDO logs",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"8M",
"1M",
STR_VALUE(MAX_INT_RNIL)},
@@ -750,9 +751,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LongMessageBuffer",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for internal long messages",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1M",
"512k",
STR_VALUE(MAX_INT_RNIL)},
@@ -762,9 +763,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"StartPartialTimeout",
DB_TOKEN,
"Time to wait before trying to start wo/ all nodes. 0=Wait forever",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"30000",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -774,9 +775,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"StartPartitionedTimeout",
DB_TOKEN,
"Time to wait before trying to start partitioned. 0=Wait forever",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"60000",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -786,9 +787,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"StartFailureTimeout",
DB_TOKEN,
"Time to wait before terminating. 0=Wait forever",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -798,9 +799,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HeartbeatIntervalDbDb",
DB_TOKEN,
"Time between "DB_TOKEN_PRINT"-"DB_TOKEN_PRINT" heartbeats. "DB_TOKEN_PRINT" considered dead after 3 missed HBs",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1500",
"10",
STR_VALUE(MAX_INT_RNIL) },
@@ -810,9 +811,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HeartbeatIntervalDbApi",
DB_TOKEN,
"Time between "API_TOKEN_PRINT"-"DB_TOKEN_PRINT" heartbeats. "API_TOKEN_PRINT" connection closed after 3 missed HBs",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1500",
"100",
STR_VALUE(MAX_INT_RNIL) },
@@ -822,9 +823,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"TimeBetweenLocalCheckpoints",
DB_TOKEN,
"Time between taking snapshots of the database (expressed in 2log of bytes)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"20",
"0",
"31" },
@@ -834,9 +835,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"TimeBetweenGlobalCheckpoints",
DB_TOKEN,
"Time between doing group commit of transactions to disk",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"2000",
"10",
"32000" },
@@ -846,9 +847,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NoOfFragmentLogFiles",
DB_TOKEN,
"No of 16 Mbyte Redo log files in each of 4 file sets belonging to "DB_TOKEN_PRINT" node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"8",
"1",
STR_VALUE(MAX_INT_RNIL) },
@@ -858,9 +859,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfOpenFiles",
DB_TOKEN,
"Max number of files open per "DB_TOKEN_PRINT" node.(One thread is created per file)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"40",
"20",
"256" },
@@ -871,9 +872,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"TimeBetweenInactiveTransactionAbortCheck",
DB_TOKEN,
"Time between inactive transaction checks",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1000",
"1000",
STR_VALUE(MAX_INT_RNIL) },
@@ -887,9 +888,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"to execute or send another part (query, statement) of the transaction.\n"
"If the application takes too long time, the transaction gets aborted.\n"
"Timeout set to 0 means that we don't timeout at all on application wait.",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
STR_VALUE(MAX_INT_RNIL),
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -902,9 +903,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"This is the time the transaction coordinator waits for each database node\n"
"of the transaction to execute a request. If the database node takes too\n"
"long time, the transaction gets aborted.",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1200",
"50",
STR_VALUE(MAX_INT_RNIL) },
@@ -914,9 +915,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NoOfDiskPagesToDiskDuringRestartTUP",
DB_TOKEN,
"?",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"40",
"1",
STR_VALUE(MAX_INT_RNIL) },
@@ -926,9 +927,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NoOfDiskPagesToDiskAfterRestartTUP",
DB_TOKEN,
"?",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"40",
"1",
STR_VALUE(MAX_INT_RNIL) },
@@ -938,9 +939,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NoOfDiskPagesToDiskDuringRestartACC",
DB_TOKEN,
"?",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"20",
"1",
STR_VALUE(MAX_INT_RNIL) },
@@ -950,9 +951,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NoOfDiskPagesToDiskAfterRestartACC",
DB_TOKEN,
"?",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"20",
"1",
STR_VALUE(MAX_INT_RNIL) },
@@ -963,9 +964,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Diskless",
DB_TOKEN,
"Run wo/ disk",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"false",
"false",
"true"},
@@ -975,9 +976,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Discless",
DB_TOKEN,
"Diskless",
- ConfigInfo::DEPRICATED,
+ ConfigInfo::CI_DEPRICATED,
true,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"false",
"false",
"true"},
@@ -989,9 +990,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ArbitrationTimeout",
DB_TOKEN,
"Max time (milliseconds) database partion waits for arbitration signal",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"3000",
"10",
STR_VALUE(MAX_INT_RNIL) },
@@ -1001,9 +1002,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"DataDir",
DB_TOKEN,
"Data directory for this node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MYSQLCLUSTERDIR,
0, 0 },
@@ -1012,9 +1013,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"FileSystemPath",
DB_TOKEN,
"Path to directory where the "DB_TOKEN_PRINT" node stores its data (directory must exist)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1023,9 +1024,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelStartup",
DB_TOKEN,
"Node startup info printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1",
"0",
"15" },
@@ -1035,9 +1036,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelShutdown",
DB_TOKEN,
"Node shutdown info printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"15" },
@@ -1047,9 +1048,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelStatistic",
DB_TOKEN,
"Transaction, operation, transporter info printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"15" },
@@ -1059,9 +1060,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelCheckpoint",
DB_TOKEN,
"Local and Global checkpoint info printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"15" },
@@ -1071,9 +1072,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelNodeRestart",
DB_TOKEN,
"Node restart, node failure info printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"15" },
@@ -1083,9 +1084,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelConnection",
DB_TOKEN,
"Node connect/disconnect info printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"15" },
@@ -1095,9 +1096,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelError",
DB_TOKEN,
"Transporter, heartbeat errors printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"15" },
@@ -1107,9 +1108,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogLevelInfo",
DB_TOKEN,
"Heartbeat and log info printed on stdout",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"15" },
@@ -1122,9 +1123,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ParallelBackups",
DB_TOKEN,
"Maximum number of parallel backups",
- ConfigInfo::NOTIMPLEMENTED,
+ ConfigInfo::CI_NOTIMPLEMENTED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1",
"1",
"1" },
@@ -1134,9 +1135,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BackupDataDir",
DB_TOKEN,
"Path to where to store backups",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1145,9 +1146,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BackupMemory",
DB_TOKEN,
"Total memory allocated for backups per node (in bytes)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"4M", // sum of BackupDataBufferSize and BackupLogBufferSize
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1157,9 +1158,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BackupDataBufferSize",
DB_TOKEN,
"Default size of databuffer for a backup (in bytes)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"2M", // remember to change BackupMemory
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1169,9 +1170,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BackupLogBufferSize",
DB_TOKEN,
"Default size of logbuffer for a backup (in bytes)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"2M", // remember to change BackupMemory
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1181,9 +1182,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BackupWriteSize",
DB_TOKEN,
"Default size of filesystem writes made by backup (in bytes)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"32K",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1196,9 +1197,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"REP",
"REP",
"Node section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)NODE_TYPE_REP,
0, 0
},
@@ -1208,9 +1209,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName",
"REP",
"Name of computer for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1219,9 +1220,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"System",
"REP",
"Name of system for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1230,9 +1231,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Id",
"REP",
"Number identifying replication node (REP)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
@@ -1242,9 +1243,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ExecuteOnComputer",
"REP",
"String referencing an earlier defined COMPUTER",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -1253,9 +1254,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HeartbeatIntervalRepRep",
"REP",
"Time between REP-REP heartbeats. Connection closed after 3 missed HBs",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
true,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"3000",
"100",
STR_VALUE(MAX_INT_RNIL) },
@@ -1268,9 +1269,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
API_TOKEN,
API_TOKEN,
"Node section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)NODE_TYPE_API,
0, 0
},
@@ -1280,9 +1281,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName",
API_TOKEN,
"Name of computer for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1291,9 +1292,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"System",
API_TOKEN,
"Name of system for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1302,9 +1303,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Id",
API_TOKEN,
"Number identifying application node ("API_TOKEN_PRINT")",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
@@ -1314,9 +1315,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ExecuteOnComputer",
API_TOKEN,
"String referencing an earlier defined COMPUTER",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1325,9 +1326,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ArbitrationRank",
API_TOKEN,
"If 0, then "API_TOKEN_PRINT" is not arbitrator. Kernel selects arbitrators in order 1, 2",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
"2" },
@@ -1337,9 +1338,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ArbitrationDelay",
API_TOKEN,
"When asked to arbitrate, arbitrator waits this long before voting (msec)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1349,9 +1350,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxScanBatchSize",
"API",
"The maximum collective batch size for one scan",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
STR_VALUE(MAX_SCAN_BATCH_SIZE),
"32k",
"16M" },
@@ -1361,9 +1362,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BatchByteSize",
"API",
"The default batch size in bytes",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
STR_VALUE(SCAN_BATCH_SIZE),
"1k",
"1M" },
@@ -1373,9 +1374,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"BatchSize",
"API",
"The default batch size in number of records",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
STR_VALUE(DEF_BATCH_SIZE),
"1",
STR_VALUE(MAX_PARALLEL_OP_PER_SCAN) },
@@ -1388,9 +1389,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
MGM_TOKEN,
MGM_TOKEN,
"Node section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)NODE_TYPE_MGM,
0, 0
},
@@ -1400,9 +1401,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName",
MGM_TOKEN,
"Name of computer for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1411,9 +1412,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"DataDir",
MGM_TOKEN,
"Data directory for this node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MYSQLCLUSTERDIR,
0, 0 },
@@ -1422,9 +1423,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"System",
MGM_TOKEN,
"Name of system for this node",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1433,9 +1434,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Id",
MGM_TOKEN,
"Number identifying the management server node ("MGM_TOKEN_PRINT")",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"1",
STR_VALUE(MAX_NODES) },
@@ -1445,9 +1446,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"LogDestination",
MGM_TOKEN,
"String describing where logmessages are sent",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
0,
0, 0 },
@@ -1456,9 +1457,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ExecuteOnComputer",
MGM_TOKEN,
"String referencing an earlier defined COMPUTER",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
0,
0, 0 },
@@ -1467,9 +1468,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"MaxNoOfSavedEvents",
MGM_TOKEN,
"",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"100",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1479,9 +1480,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PortNumber",
MGM_TOKEN,
"Port number to give commands to/fetch configurations from management server",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
NDB_PORT,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1491,9 +1492,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PortNumberStats",
MGM_TOKEN,
"Port number used to get statistical information from a management server",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
UNDEFINED,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1503,9 +1504,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ArbitrationRank",
MGM_TOKEN,
"If 0, then "MGM_TOKEN_PRINT" is not arbitrator. Kernel selects arbitrators in order 1, 2",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1",
"0",
"2" },
@@ -1515,9 +1516,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ArbitrationDelay",
MGM_TOKEN,
"",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1530,9 +1531,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"TCP",
"TCP",
"Connection section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)CONNECTION_TYPE_TCP,
0, 0
},
@@ -1542,9 +1543,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName1",
"TCP",
"Name/IP of computer on one side of the connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1553,9 +1554,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName2",
"TCP",
"Name/IP of computer on one side of the connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1564,9 +1565,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1",
"TCP",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -1575,9 +1576,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2",
"TCP",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -1586,9 +1587,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SendSignalId",
"TCP",
"Sends id in each signal. Used in trace files.",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"true",
"false",
"true" },
@@ -1599,9 +1600,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Checksum",
"TCP",
"If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"false",
"false",
"true" },
@@ -1611,9 +1612,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PortNumber",
"TCP",
"Port used for this transporter",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1623,9 +1624,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SendBufferMemory",
"TCP",
"Bytes of buffer for signals sent from this node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"256K",
"16K",
STR_VALUE(MAX_INT_RNIL) },
@@ -1635,9 +1636,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ReceiveBufferMemory",
"TCP",
"Bytes of buffer for signals received by this node",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"64K",
"16K",
STR_VALUE(MAX_INT_RNIL) },
@@ -1647,9 +1648,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Proxy",
"TCP",
"",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1658,9 +1659,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1_System",
"TCP",
"System for node 1 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1669,9 +1670,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2_System",
"TCP",
"System for node 2 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1684,9 +1685,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SHM",
"SHM",
"Connection section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)CONNECTION_TYPE_SHM,
0, 0 },
@@ -1695,9 +1696,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName1",
"SHM",
"Name/IP of computer on one side of the connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1706,9 +1707,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName2",
"SHM",
"Name/IP of computer on one side of the connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1717,9 +1718,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PortNumber",
"SHM",
"Port used for this transporter",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1729,9 +1730,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1",
"SHM",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -1740,9 +1741,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2",
"SHM",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
0, 0 },
@@ -1751,9 +1752,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SendSignalId",
"SHM",
"Sends id in each signal. Used in trace files.",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"false",
"false",
"true" },
@@ -1764,9 +1765,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Checksum",
"SHM",
"If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"true",
"false",
"true" },
@@ -1776,9 +1777,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ShmKey",
"SHM",
"A shared memory key",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1788,9 +1789,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ShmSize",
"SHM",
"Size of shared memory segment",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1M",
"4K",
STR_VALUE(MAX_INT_RNIL) },
@@ -1800,9 +1801,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1_System",
"SHM",
"System for node 1 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1811,9 +1812,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2_System",
"SHM",
"System for node 2 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1825,9 +1826,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SCI",
"SCI",
"Connection section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)CONNECTION_TYPE_SCI,
0, 0
},
@@ -1837,9 +1838,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1",
"SCI",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1849,9 +1850,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2",
"SCI",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1861,9 +1862,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName1",
"SCI",
"Name/IP of computer on one side of the connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1872,9 +1873,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName2",
"SCI",
"Name/IP of computer on one side of the connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -1883,9 +1884,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PortNumber",
"SCI",
"Port used for this transporter",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1895,9 +1896,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Host1SciId0",
"SCI",
"SCI-node id for adapter 0 on Host1 (a computer can have two adapters)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1907,9 +1908,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Host1SciId1",
"SCI",
"SCI-node id for adapter 1 on Host1 (a computer can have two adapters)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1919,9 +1920,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Host2SciId0",
"SCI",
"SCI-node id for adapter 0 on Host2 (a computer can have two adapters)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1931,9 +1932,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Host2SciId1",
"SCI",
"SCI-node id for adapter 1 on Host2 (a computer can have two adapters)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -1943,9 +1944,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SendSignalId",
"SCI",
"Sends id in each signal. Used in trace files.",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"true",
"false",
"true" },
@@ -1955,9 +1956,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Checksum",
"SCI",
"If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"false",
"false",
"true" },
@@ -1967,9 +1968,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SendLimit",
"SCI",
"Transporter send buffer contents are sent when this no of bytes is buffered",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"8K",
"128",
"32K" },
@@ -1979,9 +1980,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SharedBufferSize",
"SCI",
"Size of shared memory segment",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1M",
"64K",
STR_VALUE(MAX_INT_RNIL) },
@@ -1991,9 +1992,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1_System",
"SCI",
"System for node 1 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -2002,9 +2003,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2_System",
"SCI",
"System for node 2 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -2016,9 +2017,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"OSE",
"OSE",
"Connection section",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::SECTION,
+ ConfigInfo::CI_SECTION,
(const char *)CONNECTION_TYPE_OSE,
0, 0
},
@@ -2028,9 +2029,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName1",
"OSE",
"Name of computer on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -2039,9 +2040,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"HostName2",
"OSE",
"Name of computer on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -2050,9 +2051,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1",
"OSE",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -2062,9 +2063,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2",
"OSE",
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
UNDEFINED,
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -2074,9 +2075,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"SendSignalId",
"OSE",
"Sends id in each signal. Used in trace files.",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"true",
"false",
"true" },
@@ -2086,9 +2087,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Checksum",
"OSE",
"If checksum is enabled, all signals between nodes are checked for errors",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::BOOL,
+ ConfigInfo::CI_BOOL,
"false",
"false",
"true" },
@@ -2098,9 +2099,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PrioASignalSize",
"OSE",
"Size of priority A signals (in bytes)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1000",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -2110,9 +2111,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"PrioBSignalSize",
"OSE",
"Size of priority B signals (in bytes)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"1000",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -2122,9 +2123,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"ReceiveArraySize",
"OSE",
"Number of OSE signals checked for correct ordering (in no of OSE signals)",
- ConfigInfo::USED,
+ ConfigInfo::CI_USED,
false,
- ConfigInfo::INT,
+ ConfigInfo::CI_INT,
"10",
"0",
STR_VALUE(MAX_INT_RNIL) },
@@ -2134,9 +2135,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId1_System",
"OSE",
"System for node 1 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
@@ -2145,9 +2146,9 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"NodeId2_System",
"OSE",
"System for node 2 in connection",
- ConfigInfo::INTERNAL,
+ ConfigInfo::CI_INTERNAL,
false,
- ConfigInfo::STRING,
+ ConfigInfo::CI_STRING,
UNDEFINED,
0, 0 },
};
@@ -2195,7 +2196,7 @@ ConfigInfo::ConfigInfo()
}
switch (param._type) {
- case BOOL:
+ case CI_BOOL:
{
bool tmp_bool;
require(InitConfigFileParser::convertStringToBool(param._min, tmp_bool));
@@ -2204,8 +2205,8 @@ ConfigInfo::ConfigInfo()
pinfo.put64("Max", tmp_bool);
break;
}
- case INT:
- case INT64:
+ case CI_INT:
+ case CI_INT64:
{
Uint64 tmp_uint64;
require(InitConfigFileParser::convertStringToUint64(param._min, tmp_uint64));
@@ -2214,10 +2215,10 @@ ConfigInfo::ConfigInfo()
pinfo.put64("Max", tmp_uint64);
break;
}
- case SECTION:
+ case CI_SECTION:
pinfo.put("SectionType", (Uint32)UintPtr(param._default));
break;
- case STRING:
+ case CI_STRING:
break;
}
@@ -2235,7 +2236,7 @@ ConfigInfo::ConfigInfo()
// Replace section with modified section
m_info.put(param._section, section, true);
- if(param._type != ConfigInfo::SECTION){
+ if(param._type != ConfigInfo::CI_SECTION){
Properties * p;
if(!m_systemDefaults.getCopy(param._section, &p)){
p = new Properties(true);
@@ -2244,20 +2245,20 @@ ConfigInfo::ConfigInfo()
param._default != MANDATORY){
switch (param._type)
{
- case SECTION:
+ case CI_SECTION:
break;
- case STRING:
+ case CI_STRING:
require(p->put(param._fname, param._default));
break;
- case BOOL:
+ case CI_BOOL:
{
bool tmp_bool;
require(InitConfigFileParser::convertStringToBool(param._default, default_bool));
require(p->put(param._fname, default_bool));
break;
}
- case INT:
- case INT64:
+ case CI_INT:
+ case CI_INT64:
{
Uint64 tmp_uint64;
require(InitConfigFileParser::convertStringToUint64(param._default, default_uint64));
@@ -2279,7 +2280,7 @@ ConfigInfo::ConfigInfo()
exit(-1);
}
- if(m_ParamInfo[i]._type == ConfigInfo::SECTION)
+ if(m_ParamInfo[i]._type == ConfigInfo::CI_SECTION)
continue;
const Properties * p = getInfo(m_ParamInfo[i]._section);
@@ -2439,9 +2440,9 @@ void ConfigInfo::print(const char* section) const {
Properties::Iterator it(sec);
for (const char* n = it.first(); n != NULL; n = it.next()) {
// Skip entries with different F- and P-names
- if (getStatus(sec, n) == ConfigInfo::INTERNAL) continue;
- if (getStatus(sec, n) == ConfigInfo::DEPRICATED) continue;
- if (getStatus(sec, n) == ConfigInfo::NOTIMPLEMENTED) continue;
+ if (getStatus(sec, n) == ConfigInfo::CI_INTERNAL) continue;
+ if (getStatus(sec, n) == ConfigInfo::CI_DEPRICATED) continue;
+ if (getStatus(sec, n) == ConfigInfo::CI_NOTIMPLEMENTED) continue;
print(sec, n);
}
}
@@ -2451,7 +2452,7 @@ void ConfigInfo::print(const Properties * section,
ndbout << parameter;
// ndbout << getDescription(section, parameter) << endl;
switch (getType(section, parameter)) {
- case ConfigInfo::BOOL:
+ case ConfigInfo::CI_BOOL:
ndbout << " (Boolean value)" << endl;
ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == false) {
@@ -2466,8 +2467,8 @@ void ConfigInfo::print(const Properties * section,
ndbout << endl;
break;
- case ConfigInfo::INT:
- case ConfigInfo::INT64:
+ case ConfigInfo::CI_INT:
+ case ConfigInfo::CI_INT64:
ndbout << " (Non-negative Integer)" << endl;
ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == (UintPtr)MANDATORY) {
@@ -2482,7 +2483,7 @@ void ConfigInfo::print(const Properties * section,
ndbout << endl;
break;
- case ConfigInfo::STRING:
+ case ConfigInfo::CI_STRING:
ndbout << " (String)" << endl;
ndbout << getDescription(section, parameter) << endl;
if (getDefault(section, parameter) == (UintPtr)MANDATORY) {
@@ -2492,7 +2493,7 @@ void ConfigInfo::print(const Properties * section,
}
ndbout << endl;
break;
- case ConfigInfo::SECTION:
+ case ConfigInfo::CI_SECTION:
break;
}
}
@@ -2772,26 +2773,26 @@ applyDefaultValues(InitConfigFileParser::Context & ctx,
ConfigInfo::Status st = ctx.m_info->getStatus(ctx.m_currentInfo, name);
if(!ctx.m_currentSection->contains(name)){
switch (ctx.m_info->getType(ctx.m_currentInfo, name)){
- case ConfigInfo::INT:
- case ConfigInfo::BOOL:{
+ case ConfigInfo::CI_INT:
+ case ConfigInfo::CI_BOOL:{
Uint32 val = 0;
::require(defaults->get(name, &val));
ctx.m_currentSection->put(name, val);
break;
}
- case ConfigInfo::INT64:{
+ case ConfigInfo::CI_INT64:{
Uint64 val = 0;
::require(defaults->get(name, &val));
ctx.m_currentSection->put64(name, val);
break;
}
- case ConfigInfo::STRING:{
+ case ConfigInfo::CI_STRING:{
const char * val;
::require(defaults->get(name, &val));
ctx.m_currentSection->put(name, val);
break;
}
- case ConfigInfo::SECTION:
+ case ConfigInfo::CI_SECTION:
break;
}
}
@@ -3042,7 +3043,7 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
if(!(ctx.m_userDefaults &&
ctx.m_userDefaults->get("PortNumber", &base)) &&
!ctx.m_systemDefaults->get("PortNumber", &base)) {
- base= strtoll(NDB_BASE_PORT,0,0);
+ base= strtoll(NDB_TCP_BASE_PORT,0,0);
// ctx.reportError("Cannot retrieve base port number");
// return false;
}
@@ -3214,7 +3215,7 @@ transform(InitConfigFileParser::Context & ctx,
require(ctx.m_currentSection->getTypeOf(oldName, &oldType));
ConfigInfo::Type newType = ctx.m_info->getType(ctx.m_currentInfo, newName);
if(!((oldType == PropertiesType_Uint32 || oldType == PropertiesType_Uint64)
- && (newType == ConfigInfo::INT || newType == ConfigInfo::INT64 || newType == ConfigInfo::BOOL))){
+ && (newType == ConfigInfo::CI_INT || newType == ConfigInfo::CI_INT64 || newType == ConfigInfo::CI_BOOL))){
ndbout << "oldType: " << (int)oldType << ", newType: " << (int)newType << endl;
ctx.reportError("Unable to handle type conversion w.r.t deprication %s %s"
"- [%s] starting at line: %d",
@@ -3225,7 +3226,7 @@ transform(InitConfigFileParser::Context & ctx,
Uint64 oldVal;
require(ctx.m_currentSection->get(oldName, &oldVal));
- Uint64 newVal = (Uint64)(oldVal * mul + add);
+ Uint64 newVal = (Uint64)((Int64)oldVal * mul + add);
if(!ctx.m_info->verify(ctx.m_currentInfo, newName, newVal)){
ctx.reportError("Unable to handle deprication, new value not within bounds"
"%s %s - [%s] starting at line: %d",
@@ -3234,9 +3235,9 @@ transform(InitConfigFileParser::Context & ctx,
return false;
}
- if(newType == ConfigInfo::INT || newType == ConfigInfo::BOOL){
+ if(newType == ConfigInfo::CI_INT || newType == ConfigInfo::CI_BOOL){
require(dst.put(newName, (Uint32)newVal));
- } else if(newType == ConfigInfo::INT64) {
+ } else if(newType == ConfigInfo::CI_INT64) {
require(dst.put64(newName, newVal));
}
return true;
@@ -3318,7 +3319,7 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){
require(sec->get("Status", &status));
require(sec->get("SectionType", &typeVal));
- if(id == KEY_INTERNAL || status == ConfigInfo::INTERNAL){
+ if(id == KEY_INTERNAL || status == ConfigInfo::CI_INTERNAL){
ndbout_c("skipping section %s", ctx.fname);
break;
}
@@ -3491,7 +3492,7 @@ static bool add_server_ports(Vector<ConfigInfo::ConfigRuleSection>&sections,
#if 0
Properties * props= ctx.m_config;
Properties computers(true);
- Uint32 port_base = NDB_BASE_PORT;
+ Uint32 port_base = NDB_TCP_BASE_PORT;
Uint32 nNodes;
ctx.m_userProperties.get("NoOfNodes", &nNodes);
diff --git a/ndb/src/mgmsrv/ConfigInfo.hpp b/ndb/src/mgmsrv/ConfigInfo.hpp
index 512505cbd30..dff8b34bf4a 100644
--- a/ndb/src/mgmsrv/ConfigInfo.hpp
+++ b/ndb/src/mgmsrv/ConfigInfo.hpp
@@ -38,11 +38,11 @@ static const char* UNDEFINED = 0; // Default value for undefined
*/
class ConfigInfo {
public:
- enum Type { BOOL, INT, INT64, STRING, SECTION };
- enum Status { USED, ///< Active
- DEPRICATED, ///< Can be, but shouldn't
- NOTIMPLEMENTED, ///< Is ignored.
- INTERNAL ///< Not configurable by the user
+ enum Type { CI_BOOL, CI_INT, CI_INT64, CI_STRING, CI_SECTION };
+ enum Status { CI_USED, ///< Active
+ CI_DEPRICATED, ///< Can be, but shouldn't
+ CI_NOTIMPLEMENTED, ///< Is ignored.
+ CI_INTERNAL ///< Not configurable by the user
};
/**
diff --git a/ndb/src/mgmsrv/InitConfigFileParser.cpp b/ndb/src/mgmsrv/InitConfigFileParser.cpp
index 05102255eaa..5cc5c3e9b32 100644
--- a/ndb/src/mgmsrv/InitConfigFileParser.cpp
+++ b/ndb/src/mgmsrv/InitConfigFileParser.cpp
@@ -21,6 +21,7 @@
#include "MgmtErrorReporter.hpp"
#include <NdbOut.hpp>
#include "ConfigInfo.hpp"
+#include <m_string.h>
const int MAX_LINE_LENGTH = 1024; // Max length of line of text in config file
static void trim(char *);
@@ -253,10 +254,10 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line)
return false;
}
ConfigInfo::Status status = m_info->getStatus(ctx.m_currentInfo, fname);
- if (status == ConfigInfo::NOTIMPLEMENTED) {
+ if (status == ConfigInfo::CI_NOTIMPLEMENTED) {
ctx.reportWarning("[%s] %s not yet implemented", ctx.fname, fname);
}
- if (status == ConfigInfo::DEPRICATED) {
+ if (status == ConfigInfo::CI_DEPRICATED) {
const char * desc = m_info->getDescription(ctx.m_currentInfo, fname);
if(desc){
ctx.reportWarning("[%s] %s is depricated, use %s instead",
@@ -296,7 +297,7 @@ InitConfigFileParser::storeNameValuePair(Context& ctx,
const ConfigInfo::Type type = m_info->getType(ctx.m_currentInfo, fname);
switch(type){
- case ConfigInfo::BOOL: {
+ case ConfigInfo::CI_BOOL: {
bool value_bool;
if (!convertStringToBool(value, value_bool)) {
ctx.reportError("Illegal boolean value for parameter %s", fname);
@@ -305,8 +306,8 @@ InitConfigFileParser::storeNameValuePair(Context& ctx,
MGM_REQUIRE(ctx.m_currentSection->put(pname, value_bool));
break;
}
- case ConfigInfo::INT:
- case ConfigInfo::INT64:{
+ case ConfigInfo::CI_INT:
+ case ConfigInfo::CI_INT64:{
Uint64 value_int;
if (!convertStringToUint64(value, value_int)) {
ctx.reportError("Illegal integer value for parameter %s", fname);
@@ -319,17 +320,17 @@ InitConfigFileParser::storeNameValuePair(Context& ctx,
m_info->getMax(ctx.m_currentInfo, fname));
return false;
}
- if(type == ConfigInfo::INT){
+ if(type == ConfigInfo::CI_INT){
MGM_REQUIRE(ctx.m_currentSection->put(pname, (Uint32)value_int));
} else {
MGM_REQUIRE(ctx.m_currentSection->put64(pname, value_int));
}
break;
}
- case ConfigInfo::STRING:
+ case ConfigInfo::CI_STRING:
MGM_REQUIRE(ctx.m_currentSection->put(pname, value));
break;
- case ConfigInfo::SECTION:
+ case ConfigInfo::CI_SECTION:
abort();
}
return true;
@@ -365,7 +366,7 @@ bool InitConfigFileParser::convertStringToUint64(const char* s,
errno = 0;
char* p;
- long long v = strtoll(s, &p, log10base);
+ Int64 v = strtoll(s, &p, log10base);
if (errno != 0)
return false;
diff --git a/ndb/src/mgmsrv/Makefile.am b/ndb/src/mgmsrv/Makefile.am
index ee5220ef9f8..50e0b6023ad 100644
--- a/ndb/src/mgmsrv/Makefile.am
+++ b/ndb/src/mgmsrv/Makefile.am
@@ -32,9 +32,7 @@ LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \
DEFS_LOC = -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
- -DMYSQLCLUSTERDIR="\"$(MYSQLCLUSTERdir)\"" \
- -DNDB_PORT="\"@ndb_port@\"" \
- -DNDB_BASE_PORT="\"@ndb_port_base@\""
+ -DMYSQLCLUSTERDIR="\"$(MYSQLCLUSTERdir)\""
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
@@ -43,3 +41,17 @@ ndb_mgmd_LDFLAGS = @ndb_bin_am_ldflags@
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: ndb_mgmd.dsp
+
+ndb_mgmd.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(ndbbin_PROGRAMS)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_mgmd_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 061aa2e0cb8..6777e85a74e 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -54,6 +54,7 @@
#include <mgmapi.h>
#include <mgmapi_configuration.hpp>
#include <mgmapi_config_parameters.h>
+#include <m_string.h>
//#define MGM_SRV_DEBUG
#ifdef MGM_SRV_DEBUG
@@ -125,7 +126,7 @@ MgmtSrvr::signalRecvThreadRun()
while(!_isStopThread) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
- if(m_signalRecvQueue.waitFor(siglist, handler, signal, DEFAULT_TIMEOUT)) {
+ if(m_signalRecvQueue.waitFor(siglist, &handler, &signal, DEFAULT_TIMEOUT)) {
if(handler->function != 0)
(this->*handler->function)(signal);
}
@@ -547,7 +548,7 @@ MgmtSrvr::MgmtSrvr(SocketServer *socket_server,
{
MgmStatService::StatListener se;
- se.m_socket = -1;
+ se.m_socket = NDB_INVALID_SOCKET;
for(size_t t = 0; t<LogLevel::LOGLEVEL_CATEGORIES; t++){
se.m_logLevel.setLogLevel((LogLevel::EventCategory)t, 7);
}
@@ -2672,7 +2673,7 @@ MgmtSrvr::setDbParameter(int node, int param, const char * value,
int p_type;
unsigned val_32;
- unsigned long long val_64;
+ Uint64 val_64;
const char * val_char;
do {
p_type = 0;
@@ -2734,7 +2735,7 @@ MgmtSrvr::setDbParameter(int node, int param, const char * value,
template class Vector<SigMatch>;
#if __SUNPRO_CC != 0x560
-template bool SignalQueue::waitFor<SigMatch>(Vector<SigMatch>&, SigMatch*&, NdbApiSignal*&, unsigned);
+template bool SignalQueue::waitFor<SigMatch>(Vector<SigMatch>&, SigMatch**, NdbApiSignal**, unsigned);
#endif
template class MutexVector<unsigned short>;
diff --git a/ndb/src/mgmsrv/MgmtSrvr.hpp b/ndb/src/mgmsrv/MgmtSrvr.hpp
index 1afb0848ecc..9a07c5ffa5a 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.hpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.hpp
@@ -661,7 +661,7 @@ private:
*/
static void signalReceivedNotification(void* mgmtSrvr,
NdbApiSignal* signal,
- class LinearSectionPtr ptr[3]);
+ struct LinearSectionPtr ptr[3]);
/**
* Called from "outside" of MgmtSrvr when a DB process has died.
diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp
index 5834d40cc78..d8a3e5cf582 100644
--- a/ndb/src/mgmsrv/Services.cpp
+++ b/ndb/src/mgmsrv/Services.cpp
@@ -29,7 +29,7 @@
#include <ConfigValues.hpp>
#include <mgmapi_configuration.hpp>
-
+#include <Vector.hpp>
#include "Services.hpp"
extern bool g_StopServer;
@@ -284,8 +284,8 @@ MgmApiSession::runSession() {
/* Backwards compatibility for old NDBs that still use
* the old "GET CONFIG" command.
*/
-
- for(size_t i=0; i<strlen(ctx.m_currentToken); i++)
+ size_t i;
+ for(i=0; i<strlen(ctx.m_currentToken); i++)
ctx.m_currentToken[i] = toupper(ctx.m_currentToken[i]);
if(strncmp("GET CONFIG ",
@@ -1270,7 +1270,7 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
m_clients.lock();
for(i = m_clients.size() - 1; i >= 0; i--){
if(threshold <= m_clients[i].m_logLevel.getLogLevel(cat)){
- if(m_clients[i].m_socket >= 0 &&
+ if(m_clients[i].m_socket != NDB_INVALID_SOCKET &&
println_socket(m_clients[i].m_socket,
MAX_WRITE_TIMEOUT, m_text) == -1){
copy.push_back(m_clients[i].m_socket);
@@ -1320,7 +1320,7 @@ MgmStatService::add_listener(const StatListener& client){
void
MgmStatService::stopSessions(){
for(int i = m_clients.size() - 1; i >= 0; i--){
- if(m_clients[i].m_socket >= 0){
+ if(m_clients[i].m_socket != NDB_INVALID_SOCKET){
NDB_CLOSE_SOCKET(m_clients[i].m_socket);
m_clients.erase(i);
}
@@ -1406,7 +1406,7 @@ MgmApiSession::listen_event(Parser<MgmApiSession>::Context & ctx,
m_mgmsrv.m_statisticsListner.add_listener(le);
m_stop = true;
- m_socket = -1;
+ m_socket = NDB_INVALID_SOCKET;
done:
m_output->println("listen event");
diff --git a/ndb/src/mgmsrv/Services.hpp b/ndb/src/mgmsrv/Services.hpp
index 6a5f06a659e..8627343b1cf 100644
--- a/ndb/src/mgmsrv/Services.hpp
+++ b/ndb/src/mgmsrv/Services.hpp
@@ -107,7 +107,7 @@ public:
m_mgmsrv = mgmsrv;
}
- MgmApiSession * newSession(NDB_SOCKET_TYPE socket){
+ SocketServer::Session * newSession(NDB_SOCKET_TYPE socket){
return new MgmApiSession(* m_mgmsrv, socket);
}
};
diff --git a/ndb/src/mgmsrv/SignalQueue.hpp b/ndb/src/mgmsrv/SignalQueue.hpp
index 76acaf2289a..bacbad53415 100644
--- a/ndb/src/mgmsrv/SignalQueue.hpp
+++ b/ndb/src/mgmsrv/SignalQueue.hpp
@@ -47,8 +47,8 @@ public:
NodeId nodeid = 0,
Uint32 timeout = DEFAULT_TIMEOUT);
template<class T> bool waitFor(Vector<T> &t,
- T *&handler,
- NdbApiSignal *&signal,
+ T **handler,
+ NdbApiSignal **signal,
Uint32 timeout = DEFAULT_TIMEOUT);
private:
NdbMutex *m_mutex; /* Locks all data in SignalQueue */
@@ -75,8 +75,8 @@ private:
template<class T> bool
SignalQueue::waitFor(Vector<T> &t,
- T *&handler,
- NdbApiSignal *&signal,
+ T **handler,
+ NdbApiSignal **signal,
Uint32 timeout) {
Guard g(m_mutex);
@@ -88,8 +88,8 @@ SignalQueue::waitFor(Vector<T> &t,
for(size_t i = 0; i < t.size(); i++) {
if(t[i].check(m_signalQueueHead->signal)) {
- handler = &t[i];
- signal = pop();
+ * handler = &t[i];
+ * signal = pop();
return true;
}
}
diff --git a/ndb/src/mgmsrv/main.cpp b/ndb/src/mgmsrv/main.cpp
index 64a2cb35c1f..50f60d793cd 100644
--- a/ndb/src/mgmsrv/main.cpp
+++ b/ndb/src/mgmsrv/main.cpp
@@ -200,7 +200,7 @@ int main(int argc, char** argv)
if (glob.mgmObject->init())
goto error_end;
- chdir(NdbConfig_get_path(0));
+ my_setwd(NdbConfig_get_path(0), MYF(0));
glob.localNodeId= glob.mgmObject->getOwnNodeId();
if (glob.localNodeId == 0) {
@@ -261,7 +261,9 @@ int main(int argc, char** argv)
}
}
+#ifndef NDB_WIN32
signal(SIGPIPE, SIG_IGN);
+#endif
{
BaseString error_string;
if(!glob.mgmObject->start(error_string)){
diff --git a/ndb/src/ndbapi/Makefile.am b/ndb/src/ndbapi/Makefile.am
index 57552cd6ce1..9044812beec 100644
--- a/ndb/src/ndbapi/Makefile.am
+++ b/ndb/src/ndbapi/Makefile.am
@@ -46,3 +46,17 @@ include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libndbapi.dsp
+
+libndbapi.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libndbapi_la_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp
index 75ae539fc8b..06aa7365179 100644
--- a/ndb/src/ndbapi/Ndb.cpp
+++ b/ndb/src/ndbapi/Ndb.cpp
@@ -22,7 +22,7 @@ Name: Ndb.cpp
******************************************************************************/
#include <ndb_global.h>
-#include <pthread.h>
+
#include "NdbApiSignal.hpp"
#include "NdbImpl.hpp"
diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp
index b75af260105..0a1433c71f3 100644
--- a/ndb/src/ndbapi/NdbBlob.cpp
+++ b/ndb/src/ndbapi/NdbBlob.cpp
@@ -975,7 +975,7 @@ NdbBlob::deletePartsUnknown(Uint32 part)
setErrorCode(tOp);
return -1;
}
- tOp->m_abortOption = IgnoreError;
+ tOp->m_abortOption = AO_IgnoreError;
n++;
}
DBG("deletePartsUnknown: executeNoBlobs [in] bat=" << bat);
@@ -1223,7 +1223,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch)
return -1;
}
if (isWriteOp()) {
- tOp->m_abortOption = IgnoreError;
+ tOp->m_abortOption = AO_IgnoreError;
}
theHeadInlineReadOp = tOp;
// execute immediately
@@ -1269,7 +1269,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch)
return -1;
}
if (isWriteOp()) {
- tOp->m_abortOption = IgnoreError;
+ tOp->m_abortOption = AO_IgnoreError;
}
theHeadInlineReadOp = tOp;
// execute immediately
diff --git a/ndb/src/ndbapi/NdbConnection.cpp b/ndb/src/ndbapi/NdbConnection.cpp
index f809647a725..3c1657b892e 100644
--- a/ndb/src/ndbapi/NdbConnection.cpp
+++ b/ndb/src/ndbapi/NdbConnection.cpp
@@ -1601,7 +1601,7 @@ from other transactions.
(theLastExecOpInList->theCommitIndicator == 1)){
- if (m_abortOption == IgnoreError && theError.code != 0){
+ if (m_abortOption == AO_IgnoreError && theError.code != 0){
/**
* There's always a TCKEYCONF when using IgnoreError
*/
@@ -1852,7 +1852,7 @@ NdbConnection::OpCompleteFailure(Uint8 abortOption, bool setFailure)
//decide the success of the whole transaction since a simple
//operation is not really part of that transaction.
//------------------------------------------------------------------------
- if (abortOption == IgnoreError){
+ if (abortOption == AO_IgnoreError){
/**
* There's always a TCKEYCONF when using IgnoreError
*/
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/ndb/src/ndbapi/NdbDictionaryImpl.hpp
index 3ea20e2af16..2820ec3d642 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.hpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.hpp
@@ -317,7 +317,7 @@ private:
friend class Ndb;
static void execSignal(void* dictImpl,
class NdbApiSignal* signal,
- class LinearSectionPtr ptr[3]);
+ struct LinearSectionPtr ptr[3]);
static void execNodeStatus(void* dictImpl, Uint32,
bool alive, bool nfCompleted);
diff --git a/ndb/src/ndbapi/NdbImpl.hpp b/ndb/src/ndbapi/NdbImpl.hpp
index 1fb1969b589..baac0ee2846 100644
--- a/ndb/src/ndbapi/NdbImpl.hpp
+++ b/ndb/src/ndbapi/NdbImpl.hpp
@@ -107,7 +107,7 @@ Uint32 convertEndian(Uint32 Data);
enum WaitSignalType {
NO_WAIT = 0,
WAIT_NODE_FAILURE = 1, // Node failure during wait
- WAIT_TIMEOUT = 2, // Timeout during wait
+ WST_WAIT_TIMEOUT = 2, // Timeout during wait
WAIT_TC_SEIZE = 3,
WAIT_TC_RELEASE = 4,
@@ -146,7 +146,7 @@ NdbWaiter::wait(int waitTime)
NdbCondition_Wait(m_condition, (NdbMutex*)m_mutex);
} else {
if (waitTime <= 0) {
- m_state = WAIT_TIMEOUT;
+ m_state = WST_WAIT_TIMEOUT;
break;
}
NdbCondition_WaitTimeout(m_condition, (NdbMutex*)m_mutex, waitTime);
diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp
index 9258ce618e8..738977a0920 100644
--- a/ndb/src/ndbapi/NdbOperationExec.cpp
+++ b/ndb/src/ndbapi/NdbOperationExec.cpp
@@ -199,7 +199,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen);
// A simple read is always ignore error
- abortOption = tSimpleIndicator ? IgnoreError : abortOption;
+ abortOption = tSimpleIndicator ? AO_IgnoreError : abortOption;
tcKeyReq->setAbortOption(tReqInfo, abortOption);
Uint8 tDistrKeyIndicator = theDistrKeyIndicator_;
@@ -542,7 +542,7 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
theStatus = Finished;
// blobs want this
- if (m_abortOption != IgnoreError)
+ if (m_abortOption != AO_IgnoreError)
{
theNdbCon->theReturnStatus = NdbConnection::ReturnFailure;
}
@@ -550,7 +550,7 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
theNdbCon->setOperationErrorCodeAbort(aSignal->readData(4), ao);
if(theOperationType != ReadRequest || !theSimpleIndicator) // not simple read
- return theNdbCon->OpCompleteFailure(ao, m_abortOption != IgnoreError);
+ return theNdbCon->OpCompleteFailure(ao, m_abortOption != AO_IgnoreError);
/**
* If TCKEYCONF has arrived
diff --git a/ndb/src/ndbapi/ObjectMap.hpp b/ndb/src/ndbapi/ObjectMap.hpp
index 12bede3aa3f..21407279f0b 100644
--- a/ndb/src/ndbapi/ObjectMap.hpp
+++ b/ndb/src/ndbapi/ObjectMap.hpp
@@ -29,7 +29,7 @@
class NdbObjectIdMap //: NdbLockable
{
public:
- STATIC_CONST( InvalidId = ~0 );
+ STATIC_CONST( InvalidId = ~(Uint32)0 );
NdbObjectIdMap(Uint32 initalSize = 128, Uint32 expandSize = 10);
~NdbObjectIdMap();
diff --git a/ndb/src/ndbapi/ndberror.c b/ndb/src/ndbapi/ndberror.c
index 9762eb85de1..77105871d26 100644
--- a/ndb/src/ndbapi/ndberror.c
+++ b/ndb/src/ndbapi/ndberror.c
@@ -17,6 +17,7 @@
#include <ndb_global.h>
#include <ndberror.h>
+#include <m_string.h>
typedef struct ErrorBundle {
int code;
@@ -649,10 +650,10 @@ int ndb_error_string(int err_no, char *str, unsigned int size)
ndberror_update(&error);
len =
- snprintf(str, size-1, "%s: %s: %s", error.message,
- ndberror_status_message(error.status),
- ndberror_classification_message(error.classification));
+ my_snprintf(str, size-1, "%s: %s: %s", error.message,
+ ndberror_status_message(error.status),
+ ndberror_classification_message(error.classification));
str[size-1]= '\0';
-
+
return len;
}
diff --git a/ndb/test/Makefile.am b/ndb/test/Makefile.am
index 2e0f30df9d4..b8753668c60 100644
--- a/ndb/test/Makefile.am
+++ b/ndb/test/Makefile.am
@@ -4,3 +4,5 @@ EXTRA_DIST = include
dist-hook:
-rm -rf `find $(distdir) -type d -name SCCS`
+
+windoze-dsp:
diff --git a/ndb/test/include/NdbSchemaOp.hpp b/ndb/test/include/NdbSchemaOp.hpp
index 43f76c8c253..ac859f8abe8 100644
--- a/ndb/test/include/NdbSchemaOp.hpp
+++ b/ndb/test/include/NdbSchemaOp.hpp
@@ -303,6 +303,7 @@ public:
*
* @deprecated do not use!
*/
+#ifndef NDB_WIN32
inline int createTable( const char* aTableName,
Uint32 aTableSize,
KeyType aTupleKey,
@@ -324,6 +325,7 @@ public:
aMemoryType,
(aStoredTable == 1 ? true : false));
}
+#endif
/**
* Add a new attribute to a database table.
diff --git a/ndb/test/ndbapi/Makefile.am b/ndb/test/ndbapi/Makefile.am
index c50cd9648f0..7d12714b3bd 100644
--- a/ndb/test/ndbapi/Makefile.am
+++ b/ndb/test/ndbapi/Makefile.am
@@ -90,4 +90,65 @@ testBackup_LDADD = $(LDADD) bank/libbank.a
+windoze-dsp: flexBench.dsp testBasic.dsp testBlobs.dsp \
+ testScan.dsp
+flexBench.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ flexBench
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(flexBench_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+testBasic.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ testBasic
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(testBasic_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+testOIBasic.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ testOIBasic
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(testOIBasic_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+testBlobs.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ testBlobs
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(testBlobs_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+testScan.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ testScan
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(testScan_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
diff --git a/ndb/test/ndbapi/bank/Makefile.am b/ndb/test/ndbapi/bank/Makefile.am
index 886d664aefb..d4f82a7f9c4 100644
--- a/ndb/test/ndbapi/bank/Makefile.am
+++ b/ndb/test/ndbapi/bank/Makefile.am
@@ -20,3 +20,5 @@ include $(top_srcdir)/ndb/config/type_ndbapitest.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp:
diff --git a/ndb/test/ndbapi/testOperations.cpp b/ndb/test/ndbapi/testOperations.cpp
index f31906dd737..949f08281a5 100644
--- a/ndb/test/ndbapi/testOperations.cpp
+++ b/ndb/test/ndbapi/testOperations.cpp
@@ -171,7 +171,7 @@ runTwoOperations(NDBT_Context* ctx, NDBT_Step* step){
// Insert, read
CHECK(hugoOps.startTransaction(pNdb) == 0);
CHECK(runOp(hugoOps, pNdb, op1, val1) == 0);
- AbortOption oa = (res1 == 0) ? AbortOnError : IgnoreError;
+ AbortOption oa = (res1 == 0) ? AbortOnError : AO_IgnoreError;
CHECK(hugoOps.execute_NoCommit(pNdb, oa) == res1);
CHECK(checkVal(hugoOps, op1, val1, res1) == 0);
diff --git a/ndb/test/run-test/Makefile.am b/ndb/test/run-test/Makefile.am
index c890536dcc6..83dcb3dbbcf 100644
--- a/ndb/test/run-test/Makefile.am
+++ b/ndb/test/run-test/Makefile.am
@@ -23,3 +23,5 @@ wrappers_SCRIPTS=atrt-testBackup atrt-mysql-test-run
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp:
diff --git a/ndb/test/src/CpcClient.cpp b/ndb/test/src/CpcClient.cpp
index d407ba65312..2ef23528360 100644
--- a/ndb/test/src/CpcClient.cpp
+++ b/ndb/test/src/CpcClient.cpp
@@ -15,9 +15,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
-#include <editline/editline.h>
-
-#include <netdb.h>
#include <NdbOut.hpp>
#include <NdbTCP.h>
diff --git a/ndb/test/src/Makefile.am b/ndb/test/src/Makefile.am
index 56f3d6a1ec6..289633b060a 100644
--- a/ndb/test/src/Makefile.am
+++ b/ndb/test/src/Makefile.am
@@ -19,3 +19,17 @@ include $(top_srcdir)/ndb/config/type_ndbapitest.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libNDBT.dsp
+
+libNDBT.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libNDBT_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB
diff --git a/ndb/test/src/NdbRestarts.cpp b/ndb/test/src/NdbRestarts.cpp
index b649a60d98b..607e48c4126 100644
--- a/ndb/test/src/NdbRestarts.cpp
+++ b/ndb/test/src/NdbRestarts.cpp
@@ -445,7 +445,7 @@ int twoNodeFailure(NdbRestarter& _restarter,
<< ") secs " << endl;
NdbSleep_SecSleep(seconds);
- randomId = (random() % _restarter.getNumDbNodes());
+ randomId = (rand() % _restarter.getNumDbNodes());
nodeId = _restarter.getDbNodeId(randomId);
g_info << _restart->m_name << ": node = "<< nodeId << endl;
diff --git a/ndb/test/src/getarg.c b/ndb/test/src/getarg.c
index 9f03af69824..5b67eb6343d 100644
--- a/ndb/test/src/getarg.c
+++ b/ndb/test/src/getarg.c
@@ -35,6 +35,7 @@
#include <ndb_global.h>
#include "getarg.h"
+#include <basestring_vsnprintf.h>
#ifndef HAVE_STRLCPY
static size_t
@@ -293,7 +294,7 @@ arg_printusage (struct getargs *args,
col += fprintf(stderr, " %s", buf);
}
if (args[i].short_name) {
- snprintf(buf, sizeof(buf), "[-%c", args[i].short_name);
+ basestring_snprintf(buf, sizeof(buf), "[-%c", args[i].short_name);
len += 2;
len += print_arg(buf + strlen(buf), sizeof(buf) - strlen(buf),
0, 0, &args[i]);
diff --git a/ndb/test/tools/Makefile.am b/ndb/test/tools/Makefile.am
index 42dc067a473..6b5e127b03d 100644
--- a/ndb/test/tools/Makefile.am
+++ b/ndb/test/tools/Makefile.am
@@ -27,3 +27,5 @@ ndb_cpcc_LDADD = $(LDADD)
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp:
diff --git a/ndb/tools/Makefile.am b/ndb/tools/Makefile.am
index 7a61a9b1be5..c350fb0a141 100644
--- a/ndb/tools/Makefile.am
+++ b/ndb/tools/Makefile.am
@@ -48,3 +48,109 @@ ndb_restore_LDFLAGS = @ndb_bin_am_ldflags@
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: \
+ ndb_waiter.dsp \
+ ndb_drop_table.dsp \
+ ndb_delete_all.dsp \
+ ndb_desc.dsp \
+ ndb_drop_index.dsp \
+ ndb_show_tables.dsp \
+ ndb_select_all.dsp \
+ ndb_select_count.dsp
+
+ndb_waiter.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_waiter
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_waiter_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+ndb_drop_table.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_drop_table
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_drop_table_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+ndb_delete_all.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_delete_all
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_delete_all_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+ndb_desc.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_desc
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_desc_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+ndb_drop_index.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_drop_index
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_drop_index_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+ndb_show_tables.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_show_tables
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_show_tables_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+ndb_select_all.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_select_all
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_select_all_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
+
+ndb_select_count.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ ndb_select_count
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndb_select_count_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh
index e68b5bebbd4..3dce83c0c59 100644
--- a/scripts/make_win_src_distribution.sh
+++ b/scripts/make_win_src_distribution.sh
@@ -188,7 +188,7 @@ copy_dir_files()
print_debug "Creating directory '$arg'"
mkdir $BASE/$arg
fi
- for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
+ for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def *.hpp *.dsp \
README INSTALL* LICENSE
do
if [ -f $i ]
@@ -244,10 +244,15 @@ do
done
#
+# Create project files for ndb
+#
+make -C $SOURCE/ndb windoze
+
+#
# Input directories to be copied recursively
#
-for i in bdb innobase
+for i in bdb innobase ndb
do
copy_dir_dirs $i
done
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 2e395758304..536087ef2d9 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -193,7 +193,7 @@ int execute_no_commit_ie(ha_ndbcluster *h, NdbConnection *trans)
if (m_batch_execute)
return 0;
#endif
- return trans->execute(NoCommit,IgnoreError,h->m_force_send);
+ return trans->execute(NoCommit,AO_IgnoreError,h->m_force_send);
}
/*