Commit 5a6ab9bd authored by unknown's avatar unknown

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb

into mc05.(none):/space2/tomas/mysql-4.1


ndb/include/newtonapi/defs/pcn_types.h:
  Auto merged
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp:
  Auto merged
ndb/src/common/portlib/unix/NdbCondition.c:
  Auto merged
ndb/src/common/portlib/unix/NdbDaemon.c:
  Auto merged
ndb/src/common/util/File.cpp:
  Auto merged
ndb/src/common/util/getarg.c:
  Auto merged
ndb/src/common/util/strlcat.c:
  Auto merged
ndb/src/common/util/strlcpy.c:
  Auto merged
ndb/src/cw/cpcd/Process.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp:
  Auto merged
ndb/src/kernel/ndb-main/Main.cpp:
  Auto merged
ndb/test/ndbapi/flexBench/flexBench.cpp:
  Auto merged
ndb/test/src/HugoCalculator.cpp:
  Auto merged
ndb/test/src/NDBT_ResultRow.cpp:
  Auto merged
ndb/test/src/NdbBackup.cpp:
  Auto merged
ndb/test/src/NdbConfig.cpp:
  Auto merged
ndb/test/src/NdbRestarter.cpp:
  Auto merged
ndb/tools/cpcc/cpcc.cpp:
  Auto merged
parents c2ce702b efe5a75d
...@@ -19,13 +19,7 @@ ...@@ -19,13 +19,7 @@
#include <ndb_global.h> #include <ndb_global.h>
#ifdef NDB_MACOSX
typedef unsigned int Size_t;
#elif defined(NDB_SPARC_64)
typedef unsigned int Size_t;
#else
typedef size_t Size_t; typedef size_t Size_t;
#endif
typedef int Boolean_t; typedef int Boolean_t;
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#ifndef NDB_MUTEX_H #ifndef NDB_MUTEX_H
#define NDB_MUTEX_H #define NDB_MUTEX_H
#include <ndb_global.h>
#ifdef NDB_WIN32 #ifdef NDB_WIN32
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
...@@ -34,7 +36,7 @@ typedef SEMAPHORE NdbMutex; ...@@ -34,7 +36,7 @@ typedef SEMAPHORE NdbMutex;
#elif defined NDB_WIN32 #elif defined NDB_WIN32
typedef CRITICAL_SECTION NdbMutex; typedef CRITICAL_SECTION NdbMutex;
#else #else
#include <pthread.h> #include <my_pthread.h>
typedef pthread_mutex_t NdbMutex; typedef pthread_mutex_t NdbMutex;
#define NDB_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #define NDB_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#endif #endif
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
** **
** Main editing routines for editline library. ** Main editing routines for editline library.
*/ */
#include <ndb_global.h>
#include "editline_internal.h" #include "editline_internal.h"
#include <signal.h> #include <signal.h>
#include <ctype.h>
#include <unistd.h>
/* /*
** Manifest constants. ** Manifest constants.
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <ndb_version.h> #include <ndb_version.h>
#include <sys/stat.h>
#include <ConfigRetriever.hpp> #include <ConfigRetriever.hpp>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <sys/mman.h>
#include <NdbOut.hpp> #include <NdbOut.hpp>
#include <NdbThread.h> #include <NdbThread.h>
......
...@@ -61,7 +61,6 @@ NdbCondition_Wait(struct NdbCondition* p_cond, ...@@ -61,7 +61,6 @@ NdbCondition_Wait(struct NdbCondition* p_cond,
return result; return result;
} }
#include <time.h>
int int
NdbCondition_WaitTimeout(struct NdbCondition* p_cond, NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
NdbMutex* p_mutex, NdbMutex* p_mutex,
......
...@@ -19,15 +19,13 @@ ...@@ -19,15 +19,13 @@
#define NdbDaemon_ErrorSize 500 #define NdbDaemon_ErrorSize 500
#if defined(NDB_LINUX) || defined(NDB_SOLARIS) #if defined(NDB_LINUX) || defined(NDB_SOLARIS)
/* XXX fix other unixes */
long NdbDaemon_DaemonPid; long NdbDaemon_DaemonPid;
int NdbDaemon_ErrorCode; int NdbDaemon_ErrorCode;
char NdbDaemon_ErrorText[NdbDaemon_ErrorSize]; char NdbDaemon_ErrorText[NdbDaemon_ErrorSize];
#endif
int int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
{ {
/* XXX fix other unixes */
#if defined(NDB_LINUX) || defined(NDB_SOLARIS)
int lockfd = -1, logfd = -1, n; int lockfd = -1, logfd = -1, n;
char buf[64]; char buf[64];
...@@ -129,10 +127,19 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) ...@@ -129,10 +127,19 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
dup2(logfd, 2); dup2(logfd, 2);
close(logfd); close(logfd);
} }
#endif
/* Success */ /* Success */
return 0; return 0;
} }
#else
int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
{
/* Fail */
snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
"Daemon mode not implemented");
return -1;
}
#endif
#ifdef NDB_DAEMON_TEST #ifdef NDB_DAEMON_TEST
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "NdbHost.h" #include "NdbHost.h"
#include <unistd.h>
int NdbHost_GetHostName(char* buf) int NdbHost_GetHostName(char* buf)
{ {
......
...@@ -14,13 +14,9 @@ ...@@ -14,13 +14,9 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <File.hpp> #include <ndb_global.h>
#include <sys/stat.h>
#if defined NDB_OSE || defined NDB_SOFTOSE #include <File.hpp>
#include <unistd.h>
#endif
#include <NdbOut.hpp> #include <NdbOut.hpp>
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <time.h>
#include <ctype.h>
#include "getarg.h" #include "getarg.h"
#define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag) #define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag)
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
*/ */
#include <ndb_global.h> #include <ndb_global.h>
#include <ndb_types.h>
/* RCSID("$KTH: strlcat.c,v 1.1 2000/08/16 01:23:47 lha Exp $"); */ /* RCSID("$KTH: strlcat.c,v 1.1 2000/08/16 01:23:47 lha Exp $"); */
......
...@@ -32,16 +32,11 @@ ...@@ -32,16 +32,11 @@
*/ */
#include <ndb_global.h> #include <ndb_global.h>
#include <ndb_types.h>
/* RCSID("$KTH: strlcpy.c,v 1.1 2000/08/16 01:23:48 lha Exp $"); */ /* RCSID("$KTH: strlcpy.c,v 1.1 2000/08/16 01:23:48 lha Exp $"); */
#ifndef HAVE_STRLCPY #ifndef HAVE_STRLCPY
#ifdef NDB_WIN32
#include <string.h>
#endif
size_t size_t
strlcpy (char *dst, const char *src, size_t dst_sz) strlcpy (char *dst, const char *src, size_t dst_sz)
{ {
......
...@@ -25,10 +25,7 @@ ...@@ -25,10 +25,7 @@
#include "CPCD.hpp" #include "CPCD.hpp"
#include <pwd.h> #include <pwd.h>
#include <sys/stat.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/types.h>
#include <sys/wait.h>
void void
CPCD::Process::print(FILE * f){ CPCD::Process::print(FILE * f){
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "common.hpp" #include "common.hpp"
#include <logger/Logger.hpp> #include <logger/Logger.hpp>
#include <pwd.h> #include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include <Properties.hpp> #include <Properties.hpp>
#include <BaseString.hpp> #include <BaseString.hpp>
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <sys/types.h> /* Needed for mkdir(2) */ #include <ndb_global.h> /* Needed for mkdir(2) */
#include <sys/stat.h> /* Needed for mkdir(2) */
#include <errno.h>
#include <signal.h> #include <signal.h>
#include "CPCD.hpp" #include "CPCD.hpp"
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <sys/stat.h>
#include <NdbMain.h> #include <NdbMain.h>
#include <NdbOut.hpp> #include <NdbOut.hpp>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <sys/stat.h>
#include <NdbMain.h> #include <NdbMain.h>
#include <NdbOut.hpp> #include <NdbOut.hpp>
......
...@@ -16,10 +16,8 @@ ...@@ -16,10 +16,8 @@
//#define TESTDEBUG 1 //#define TESTDEBUG 1
#include <sys/stat.h> #include <ndb_global.h>
#include <fcntl.h>
#include <string.h>
#include <kernel_types.h> #include <kernel_types.h>
#include <Pool.hpp> #include <Pool.hpp>
#include "AsyncFile.hpp" #include "AsyncFile.hpp"
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include <ndb_global.h>
#include "TimeModule.hpp" #include "TimeModule.hpp"
#include <time.h>
static const char* cMonth[] = { "x", "January", "February", "Mars", "April", "May", "June", static const char* cMonth[] = { "x", "January", "February", "Mars", "April", "May", "June",
"July", "August", "September", "October", "November", "December"}; "July", "August", "September", "October", "November", "December"};
......
...@@ -42,9 +42,6 @@ ...@@ -42,9 +42,6 @@
#endif #endif
extern EventLogger g_eventLogger; extern EventLogger g_eventLogger;
#if defined (NDB_LINUX) || defined (NDB_SOLARIS)
#include <sys/wait.h>
#endif
void catchsigs(bool ignore); // for process signal handling void catchsigs(bool ignore); // for process signal handling
extern "C" void handler(int signo); // for process signal handling extern "C" void handler(int signo); // for process signal handling
......
...@@ -14,10 +14,12 @@ ...@@ -14,10 +14,12 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <my_pthread.h>
#include "MgmtSrvr.hpp" #include "MgmtSrvr.hpp"
#include "MgmtErrorReporter.hpp" #include "MgmtErrorReporter.hpp"
#include <ctype.h>
#include <NdbOut.hpp> #include <NdbOut.hpp>
#include <AttrType.hpp> #include <AttrType.hpp>
#include <NdbApiSignal.hpp> #include <NdbApiSignal.hpp>
...@@ -42,15 +44,11 @@ ...@@ -42,15 +44,11 @@
#include <EventLogger.hpp> #include <EventLogger.hpp>
#include <DebuggerNames.hpp> #include <DebuggerNames.hpp>
#include <ndb_version.h> #include <ndb_version.h>
#include <string.h>
#include "SocketServer.hpp" #include "SocketServer.hpp"
#include "NodeLogLevel.hpp" #include "NodeLogLevel.hpp"
#include <NdbConfig.h> #include <NdbConfig.h>
#include <time.h>
#include <pthread.h>
//#define MGM_SRV_DEBUG //#define MGM_SRV_DEBUG
#ifdef MGM_SRV_DEBUG #ifdef MGM_SRV_DEBUG
#define DEBUG(x) do ndbout << x << endl; while(0) #define DEBUG(x) do ndbout << x << endl; while(0)
......
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <signal.h> #include <signal.h>
#include <sys/ioctl.h>
#include "MgmtSrvr.hpp" #include "MgmtSrvr.hpp"
#include "EventLogger.hpp" #include "EventLogger.hpp"
...@@ -198,7 +199,6 @@ NDB_MAIN(mgmsrv){ ...@@ -198,7 +199,6 @@ NDB_MAIN(mgmsrv){
goto error_end; goto error_end;
} }
#if defined (NDB_LINUX) || defined (NDB_SOLARIS)
if (glob.daemon) { if (glob.daemon) {
// Become a daemon // Become a daemon
char homePath[255],lockfile[255], logfile[255]; char homePath[255],lockfile[255], logfile[255];
...@@ -210,7 +210,6 @@ NDB_MAIN(mgmsrv){ ...@@ -210,7 +210,6 @@ NDB_MAIN(mgmsrv){
return 1; return 1;
} }
} }
#endif
if(!glob.mgmObject->start()){ if(!glob.mgmObject->start()){
ndbout_c("Unable to start management server."); ndbout_c("Unable to start management server.");
......
...@@ -292,7 +292,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) ...@@ -292,7 +292,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
if(useLongKeys){ if(useLongKeys){
longKeyAttrName = (char **) malloc(sizeof(char*) * tNoOfLongPK); longKeyAttrName = (char **) malloc(sizeof(char*) * tNoOfLongPK);
for (int i = 0; i < tNoOfLongPK; i++) { for (Uint32 i = 0; i < tNoOfLongPK; i++) {
longKeyAttrName[i] = (char *) malloc(strlen("KEYATTR ") + 1); longKeyAttrName[i] = (char *) malloc(strlen("KEYATTR ") + 1);
memset(longKeyAttrName[i], 0, strlen("KEYATTR ") + 1); memset(longKeyAttrName[i], 0, strlen("KEYATTR ") + 1);
sprintf(longKeyAttrName[i], "KEYATTR%i", i); sprintf(longKeyAttrName[i], "KEYATTR%i", i);
...@@ -531,7 +531,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) ...@@ -531,7 +531,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
waitForThreads(pThreadsData); waitForThreads(pThreadsData);
void * tmp; void * tmp;
for(int i = 0; i<tNoOfThreads; i++){ for(Uint32 i = 0; i<tNoOfThreads; i++){
NdbThread_WaitFor(pThreadsData[i].threadLife, &tmp); NdbThread_WaitFor(pThreadsData[i].threadLife, &tmp);
NdbThread_Destroy(&pThreadsData[i].threadLife); NdbThread_Destroy(&pThreadsData[i].threadLife);
} }
...@@ -540,7 +540,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) ...@@ -540,7 +540,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
if (useLongKeys == true) { if (useLongKeys == true) {
// Only free these areas if they have been allocated // Only free these areas if they have been allocated
// Otherwise cores will happen // Otherwise cores will happen
for (int i = 0; i < tNoOfLongPK; i++) for (Uint32 i = 0; i < tNoOfLongPK; i++)
free(longKeyAttrName[i]); free(longKeyAttrName[i]);
free(longKeyAttrName); free(longKeyAttrName);
} // if } // if
...@@ -629,13 +629,13 @@ static void* flexBenchThread(void* pArg) ...@@ -629,13 +629,13 @@ static void* flexBenchThread(void* pArg)
if(useLongKeys){ if(useLongKeys){
// Allocate and populate the longkey array. // Allocate and populate the longkey array.
longKeyAttrValue = (unsigned ***) malloc(sizeof(unsigned**) * tNoOfOperations ); longKeyAttrValue = (unsigned ***) malloc(sizeof(unsigned**) * tNoOfOperations );
for (int n = 0; n < tNoOfOperations; n++) for (Uint32 n = 0; n < tNoOfOperations; n++)
longKeyAttrValue[n] = (unsigned **) malloc(sizeof(unsigned*) * tNoOfLongPK ); longKeyAttrValue[n] = (unsigned **) malloc(sizeof(unsigned*) * tNoOfLongPK );
for (int n = 0; n < tNoOfOperations; n++){ for (Uint32 n = 0; n < tNoOfOperations; n++){
for (int i = 0; i < tNoOfLongPK ; i++) { for (Uint32 i = 0; i < tNoOfLongPK ; i++) {
longKeyAttrValue[n][i] = (unsigned *) malloc(sizeof(unsigned) * tSizeOfLongPK); longKeyAttrValue[n][i] = (unsigned *) malloc(sizeof(unsigned) * tSizeOfLongPK);
memset(longKeyAttrValue[n][i], 0, sizeof(unsigned) * tSizeOfLongPK); memset(longKeyAttrValue[n][i], 0, sizeof(unsigned) * tSizeOfLongPK);
for(int j = 0; j < tSizeOfLongPK; j++) { for(Uint32 j = 0; j < tSizeOfLongPK; j++) {
// Repeat the unique value to fill up the long key. // Repeat the unique value to fill up the long key.
longKeyAttrValue[n][i][j] = threadBase + n; longKeyAttrValue[n][i][j] = threadBase + n;
} }
...@@ -645,10 +645,10 @@ static void* flexBenchThread(void* pArg) ...@@ -645,10 +645,10 @@ static void* flexBenchThread(void* pArg)
int nRefOpOffset = 0 ; int nRefOpOffset = 0 ;
//Assign reference attribute values to memory //Assign reference attribute values to memory
for(int ops = 1 ; ops < tNoOfOperations ; ops++){ for(Uint32 ops = 1 ; ops < tNoOfOperations ; ops++){
// Calculate offset value before going into the next loop // Calculate offset value before going into the next loop
nRefOpOffset = tAttributeSize*tNoOfAttributes*(ops-1) ; nRefOpOffset = tAttributeSize*tNoOfAttributes*(ops-1) ;
for(int a = 0 ; a < tNoOfAttributes ; a++){ for(Uint32 a = 0 ; a < tNoOfAttributes ; a++){
*(int*)&attrRefValue[nRefOpOffset + tAttributeSize*a] = *(int*)&attrRefValue[nRefOpOffset + tAttributeSize*a] =
(int)(threadBase + ops + a) ; (int)(threadBase + ops + a) ;
} }
...@@ -757,7 +757,7 @@ static void* flexBenchThread(void* pArg) ...@@ -757,7 +757,7 @@ static void* flexBenchThread(void* pArg)
if(useLongKeys){ if(useLongKeys){
// Loop the equal call so the complete key is send to the kernel. // Loop the equal call so the complete key is send to the kernel.
for(int i = 0; i < tNoOfLongPK; i++) for(Uint32 i = 0; i < tNoOfLongPK; i++)
pOps[countTables]->equal(longKeyAttrName[i], pOps[countTables]->equal(longKeyAttrName[i],
(char *)longKeyAttrValue[count - 1][i], tSizeOfLongPK*4); (char *)longKeyAttrValue[count - 1][i], tSizeOfLongPK*4);
} }
...@@ -923,8 +923,8 @@ static void* flexBenchThread(void* pArg) ...@@ -923,8 +923,8 @@ static void* flexBenchThread(void* pArg)
if (useLongKeys == true) { if (useLongKeys == true) {
// Only free these areas if they have been allocated // Only free these areas if they have been allocated
// Otherwise cores will occur // Otherwise cores will occur
for (int n = 0; n < tNoOfOperations; n++){ for (Uint32 n = 0; n < tNoOfOperations; n++){
for (int i = 0; i < tNoOfLongPK; i++) { for (Uint32 i = 0; i < tNoOfLongPK; i++) {
free(longKeyAttrValue[n][i]); free(longKeyAttrValue[n][i]);
} }
free(longKeyAttrValue[n]); free(longKeyAttrValue[n]);
...@@ -1064,13 +1064,13 @@ static void sleepBeforeStartingTest(int seconds){ ...@@ -1064,13 +1064,13 @@ static void sleepBeforeStartingTest(int seconds){
static int static int
createTables(Ndb* pMyNdb){ createTables(Ndb* pMyNdb){
for (int i = 0; i < tNoOfAttributes; i++){ for (Uint32 i = 0; i < tNoOfAttributes; i++){
snprintf(attrName[i], MAXSTRLEN, "COL%d", i); snprintf(attrName[i], MAXSTRLEN, "COL%d", i);
} }
// Note! Uses only uppercase letters in table name's // Note! Uses only uppercase letters in table name's
// so that we can look at the tables with SQL // so that we can look at the tables with SQL
for (int i = 0; i < tNoOfTables; i++){ for (Uint32 i = 0; i < tNoOfTables; i++){
if (theStdTableNameFlag == 0){ if (theStdTableNameFlag == 0){
snprintf(tableName[i], MAXSTRLEN, "TAB%d_%d", i, snprintf(tableName[i], MAXSTRLEN, "TAB%d_%d", i,
(int)(NdbTick_CurrentMillisecond() / 1000)); (int)(NdbTick_CurrentMillisecond() / 1000));
...@@ -1087,7 +1087,7 @@ createTables(Ndb* pMyNdb){ ...@@ -1087,7 +1087,7 @@ createTables(Ndb* pMyNdb){
tmpTable.setStoredTable(!theTempTable); tmpTable.setStoredTable(!theTempTable);
if(useLongKeys){ if(useLongKeys){
for(int i = 0; i < tNoOfLongPK; i++) { for(Uint32 i = 0; i < tNoOfLongPK; i++) {
NdbDictionary::Column col(longKeyAttrName[i]); NdbDictionary::Column col(longKeyAttrName[i]);
col.setType(NdbDictionary::Column::Unsigned); col.setType(NdbDictionary::Column::Unsigned);
col.setLength(tSizeOfLongPK); col.setLength(tSizeOfLongPK);
......
...@@ -157,7 +157,7 @@ HugoCalculator::verifyRowValues(NDBT_ResultRow* const pRow) const{ ...@@ -157,7 +157,7 @@ HugoCalculator::verifyRowValues(NDBT_ResultRow* const pRow) const{
<< ", NdbDict::Column::getLength(): " << attr->getLength() << ", NdbDict::Column::getLength(): " << attr->getLength()
<< endl; << endl;
const char* buf2 = pRow->attributeStore(i)->aRef(); const char* buf2 = pRow->attributeStore(i)->aRef();
for (int j = 0; j < pRow->attributeStore(i)->arraySize(); j++) for (Uint32 j = 0; j < pRow->attributeStore(i)->arraySize(); j++)
{ {
g_err << j << ":" << buf[j] << "[" << buf2[j] << "]"; g_err << j << ":" << buf[j] << "[" << buf2[j] << "]";
if (buf[j] != buf2[j]) if (buf[j] != buf2[j])
......
...@@ -652,7 +652,7 @@ void HugoOperations::deallocRows(){ ...@@ -652,7 +652,7 @@ void HugoOperations::deallocRows(){
int HugoOperations::saveCopyOfRecord(int numRecords ){ int HugoOperations::saveCopyOfRecord(int numRecords ){
if (numRecords > rows.size()) if (numRecords > (int)rows.size())
return NDBT_FAILED; return NDBT_FAILED;
for (int i = 0; i < numRecords; i++){ for (int i = 0; i < numRecords; i++){
...@@ -662,7 +662,7 @@ int HugoOperations::saveCopyOfRecord(int numRecords ){ ...@@ -662,7 +662,7 @@ int HugoOperations::saveCopyOfRecord(int numRecords ){
} }
BaseString HugoOperations::getRecordStr(int recordNum){ BaseString HugoOperations::getRecordStr(int recordNum){
if (recordNum > rows.size()) if (recordNum > (int)rows.size())
return NULL; return NULL;
return rows[recordNum]->c_str(); return rows[recordNum]->c_str();
} }
...@@ -673,7 +673,7 @@ int HugoOperations::getRecordGci(int recordNum){ ...@@ -673,7 +673,7 @@ int HugoOperations::getRecordGci(int recordNum){
int HugoOperations::compareRecordToCopy(int numRecords ){ int HugoOperations::compareRecordToCopy(int numRecords ){
if (numRecords > rows.size()) if (numRecords > (int)rows.size())
return NDBT_FAILED; return NDBT_FAILED;
if ((unsigned)numRecords > savedRecords.size()) if ((unsigned)numRecords > savedRecords.size())
return NDBT_FAILED; return NDBT_FAILED;
......
...@@ -1253,9 +1253,11 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats, ...@@ -1253,9 +1253,11 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
g_info << " UPDATE: "; g_info << " UPDATE: ";
recEvent = recUpdateEvent; recEvent = recUpdateEvent;
break; break;
case NdbDictionary::Event::TE_ALL:
abort();
} }
if (pk < records) { if ((int)pk < records) {
recEvent[pk].pk = pk; recEvent[pk].pk = pk;
recEvent[pk].count++; recEvent[pk].count++;
} }
...@@ -1304,7 +1306,7 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats, ...@@ -1304,7 +1306,7 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
if (stats.n_updates > 0) { if (stats.n_updates > 0) {
stats.n_consecutive++; stats.n_consecutive++;
} }
for (Uint32 i = 0; i < records/3; i++) { for (Uint32 i = 0; i < (Uint32)records/3; i++) {
if (recInsertEvent[i].pk != i) { if (recInsertEvent[i].pk != i) {
stats.n_consecutive ++; stats.n_consecutive ++;
ndbout << "missing insert pk " << i << endl; ndbout << "missing insert pk " << i << endl;
......
...@@ -66,6 +66,7 @@ NDBT_ResultRow::attributeStore(const char* name){ ...@@ -66,6 +66,7 @@ NDBT_ResultRow::attributeStore(const char* name){
return data[i]; return data[i];
} }
assert(false); assert(false);
return 0;
} }
NdbOut & NdbOut &
...@@ -189,7 +190,8 @@ NDBT_ResultRow::clone () const { ...@@ -189,7 +190,8 @@ NDBT_ResultRow::clone () const {
NDBT_ResultRow * row = new NDBT_ResultRow(m_table, ad[0]); NDBT_ResultRow * row = new NDBT_ResultRow(m_table, ad[0]);
row->m_ownData = true; row->m_ownData = true;
for(Uint32 i = 0; i<m_table.getNoOfColumns(); i++){ Uint32 noOfColumns = m_table.getNoOfColumns();
for(Uint32 i = 0; i < noOfColumns; i++){
row->data[i] = data[i]->clone(); row->data[i] = data[i]->clone();
} }
......
...@@ -66,7 +66,6 @@ NdbBackup::getFileSystemPathForNode(int _node_id){ ...@@ -66,7 +66,6 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
/** /**
* Fetch configuration from management server * Fetch configuration from management server
*/ */
char buf[255];
ConfigRetriever cr; ConfigRetriever cr;
......
...@@ -31,7 +31,6 @@ NdbConfig::getPropsForNode(unsigned int node_id, ...@@ -31,7 +31,6 @@ NdbConfig::getPropsForNode(unsigned int node_id,
/** /**
* Fetch configuration from management server * Fetch configuration from management server
*/ */
char buf[255];
ConfigRetriever cr; ConfigRetriever cr;
...@@ -111,7 +110,6 @@ NdbConfig::getHostName(unsigned int node_id, ...@@ -111,7 +110,6 @@ NdbConfig::getHostName(unsigned int node_id,
/** /**
* Fetch configuration from management server * Fetch configuration from management server
*/ */
char buf[255];
ConfigRetriever cr; ConfigRetriever cr;
......
...@@ -167,7 +167,7 @@ NdbRestarter::getRandomNotMasterNodeId(int rand){ ...@@ -167,7 +167,7 @@ NdbRestarter::getRandomNotMasterNodeId(int rand){
if(master == -1) if(master == -1)
return -1; return -1;
int counter = 0; Uint32 counter = 0;
rand = rand % ndbNodes.size(); rand = rand % ndbNodes.size();
while(counter++ < ndbNodes.size() && ndbNodes[rand].node_id == master) while(counter++ < ndbNodes.size() && ndbNodes[rand].node_id == master)
rand = (rand + 1) % ndbNodes.size(); rand = (rand + 1) % ndbNodes.size();
...@@ -196,7 +196,7 @@ NdbRestarter::getRandomNodeOtherNodeGroup(int nodeId, int rand){ ...@@ -196,7 +196,7 @@ NdbRestarter::getRandomNodeOtherNodeGroup(int nodeId, int rand){
return -1; return -1;
} }
int counter = 0; Uint32 counter = 0;
rand = rand % ndbNodes.size(); rand = rand % ndbNodes.size();
while(counter++ < ndbNodes.size() && ndbNodes[rand].node_group == node_group) while(counter++ < ndbNodes.size() && ndbNodes[rand].node_group == node_group)
rand = (rand + 1) % ndbNodes.size(); rand = (rand + 1) % ndbNodes.size();
......
...@@ -116,7 +116,7 @@ class ProcEQ : public Expression { ...@@ -116,7 +116,7 @@ class ProcEQ : public Expression {
} }
virtual bool evaluate(SimpleCpcClient* c,const SimpleCpcClient::Process & p){ virtual bool evaluate(SimpleCpcClient* c,const SimpleCpcClient::Process & p){
return p.m_id == id && c == host; return p.m_id == (int)id && c == host;
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment