Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e2fd02e4
Commit
e2fd02e4
authored
May 12, 2004
by
tomas@mc05.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portability/autoconf fixes and removed warnings
parent
3a880e3a
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
58 additions
and
84 deletions
+58
-84
ndb/include/newtonapi/defs/pcn_types.h
ndb/include/newtonapi/defs/pcn_types.h
+0
-6
ndb/include/portlib/NdbMutex.h
ndb/include/portlib/NdbMutex.h
+3
-1
ndb/src/common/editline/editline.c
ndb/src/common/editline/editline.c
+2
-2
ndb/src/common/mgmcommon/ConfigRetriever.cpp
ndb/src/common/mgmcommon/ConfigRetriever.cpp
+0
-1
ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp
ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp
+0
-1
ndb/src/common/portlib/unix/NdbCondition.c
ndb/src/common/portlib/unix/NdbCondition.c
+0
-1
ndb/src/common/portlib/unix/NdbDaemon.c
ndb/src/common/portlib/unix/NdbDaemon.c
+11
-4
ndb/src/common/portlib/unix/NdbHost.c
ndb/src/common/portlib/unix/NdbHost.c
+1
-1
ndb/src/common/util/File.cpp
ndb/src/common/util/File.cpp
+2
-6
ndb/src/common/util/getarg.c
ndb/src/common/util/getarg.c
+0
-2
ndb/src/common/util/strlcat.c
ndb/src/common/util/strlcat.c
+0
-1
ndb/src/common/util/strlcpy.c
ndb/src/common/util/strlcpy.c
+0
-5
ndb/src/cw/cpcd/Process.cpp
ndb/src/cw/cpcd/Process.cpp
+0
-3
ndb/src/cw/cpcd/common.cpp
ndb/src/cw/cpcd/common.cpp
+2
-2
ndb/src/cw/cpcd/main.cpp
ndb/src/cw/cpcd/main.cpp
+1
-3
ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp
.../kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp
+0
-1
ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
+0
-1
ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp
+1
-3
ndb/src/kernel/error/TimeModule.cpp
ndb/src/kernel/error/TimeModule.cpp
+1
-1
ndb/src/kernel/ndb-main/Main.cpp
ndb/src/kernel/ndb-main/Main.cpp
+0
-3
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+3
-5
ndb/src/mgmsrv/main.cpp
ndb/src/mgmsrv/main.cpp
+2
-3
ndb/test/ndbapi/flexBench/flexBench.cpp
ndb/test/ndbapi/flexBench/flexBench.cpp
+15
-15
ndb/test/src/HugoCalculator.cpp
ndb/test/src/HugoCalculator.cpp
+1
-1
ndb/test/src/HugoOperations.cpp
ndb/test/src/HugoOperations.cpp
+3
-3
ndb/test/src/HugoTransactions.cpp
ndb/test/src/HugoTransactions.cpp
+4
-2
ndb/test/src/NDBT_ResultRow.cpp
ndb/test/src/NDBT_ResultRow.cpp
+3
-1
ndb/test/src/NdbBackup.cpp
ndb/test/src/NdbBackup.cpp
+0
-1
ndb/test/src/NdbConfig.cpp
ndb/test/src/NdbConfig.cpp
+0
-2
ndb/test/src/NdbRestarter.cpp
ndb/test/src/NdbRestarter.cpp
+2
-2
ndb/tools/cpcc/cpcc.cpp
ndb/tools/cpcc/cpcc.cpp
+1
-1
No files found.
ndb/include/newtonapi/defs/pcn_types.h
View file @
e2fd02e4
...
...
@@ -19,13 +19,7 @@
#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
;
#endif
typedef
int
Boolean_t
;
...
...
ndb/include/portlib/NdbMutex.h
View file @
e2fd02e4
...
...
@@ -17,6 +17,8 @@
#ifndef NDB_MUTEX_H
#define NDB_MUTEX_H
#include <ndb_global.h>
#ifdef NDB_WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
...
...
@@ -34,7 +36,7 @@ typedef SEMAPHORE NdbMutex;
#elif defined NDB_WIN32
typedef
CRITICAL_SECTION
NdbMutex
;
#else
#include <pthread.h>
#include <
my_
pthread.h>
typedef
pthread_mutex_t
NdbMutex
;
#define NDB_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#endif
...
...
ndb/src/common/editline/editline.c
View file @
e2fd02e4
...
...
@@ -19,10 +19,10 @@
**
** Main editing routines for editline library.
*/
#include <ndb_global.h>
#include "editline_internal.h"
#include <signal.h>
#include <ctype.h>
#include <unistd.h>
/*
** Manifest constants.
...
...
ndb/src/common/mgmcommon/ConfigRetriever.cpp
View file @
e2fd02e4
...
...
@@ -16,7 +16,6 @@
#include <ndb_global.h>
#include <ndb_version.h>
#include <sys/stat.h>
#include <ConfigRetriever.hpp>
...
...
ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp
View file @
e2fd02e4
...
...
@@ -18,7 +18,6 @@
#include <ndb_global.h>
#include <sys/mman.h>
#include <NdbOut.hpp>
#include <NdbThread.h>
...
...
ndb/src/common/portlib/unix/NdbCondition.c
View file @
e2fd02e4
...
...
@@ -61,7 +61,6 @@ NdbCondition_Wait(struct NdbCondition* p_cond,
return
result
;
}
#include <time.h>
int
NdbCondition_WaitTimeout
(
struct
NdbCondition
*
p_cond
,
NdbMutex
*
p_mutex
,
...
...
ndb/src/common/portlib/unix/NdbDaemon.c
View file @
e2fd02e4
...
...
@@ -19,15 +19,13 @@
#define NdbDaemon_ErrorSize 500
#if defined(NDB_LINUX) || defined(NDB_SOLARIS)
/* XXX fix other unixes */
long
NdbDaemon_DaemonPid
;
int
NdbDaemon_ErrorCode
;
char
NdbDaemon_ErrorText
[
NdbDaemon_ErrorSize
];
#endif
int
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
;
char
buf
[
64
];
...
...
@@ -129,10 +127,19 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
dup2
(
logfd
,
2
);
close
(
logfd
);
}
#endif
/* Success */
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
...
...
ndb/src/common/portlib/unix/NdbHost.c
View file @
e2fd02e4
...
...
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "NdbHost.h"
#include <unistd.h>
int
NdbHost_GetHostName
(
char
*
buf
)
{
...
...
ndb/src/common/util/File.cpp
View file @
e2fd02e4
...
...
@@ -14,13 +14,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <File.hpp>
#include <sys/stat.h>
#include <ndb_global.h>
#if defined NDB_OSE || defined NDB_SOFTOSE
#include <unistd.h>
#endif
#include <File.hpp>
#include <NdbOut.hpp>
...
...
ndb/src/common/util/getarg.c
View file @
e2fd02e4
...
...
@@ -34,8 +34,6 @@
#include <ndb_global.h>
#include <time.h>
#include <ctype.h>
#include "getarg.h"
#define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag)
...
...
ndb/src/common/util/strlcat.c
View file @
e2fd02e4
...
...
@@ -32,7 +32,6 @@
*/
#include <ndb_global.h>
#include <ndb_types.h>
/* RCSID("$KTH: strlcat.c,v 1.1 2000/08/16 01:23:47 lha Exp $"); */
...
...
ndb/src/common/util/strlcpy.c
View file @
e2fd02e4
...
...
@@ -32,16 +32,11 @@
*/
#include <ndb_global.h>
#include <ndb_types.h>
/* RCSID("$KTH: strlcpy.c,v 1.1 2000/08/16 01:23:48 lha Exp $"); */
#ifndef HAVE_STRLCPY
#ifdef NDB_WIN32
#include <string.h>
#endif
size_t
strlcpy
(
char
*
dst
,
const
char
*
src
,
size_t
dst_sz
)
{
...
...
ndb/src/cw/cpcd/Process.cpp
View file @
e2fd02e4
...
...
@@ -25,10 +25,7 @@
#include "CPCD.hpp"
#include <pwd.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/wait.h>
void
CPCD
::
Process
::
print
(
FILE
*
f
){
...
...
ndb/src/cw/cpcd/common.cpp
View file @
e2fd02e4
...
...
@@ -14,11 +14,11 @@
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 "common.hpp"
#include <logger/Logger.hpp>
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include <Properties.hpp>
#include <BaseString.hpp>
...
...
ndb/src/cw/cpcd/main.cpp
View file @
e2fd02e4
...
...
@@ -14,9 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <sys/types.h>
/* Needed for mkdir(2) */
#include <sys/stat.h>
/* Needed for mkdir(2) */
#include <errno.h>
#include <ndb_global.h>
/* Needed for mkdir(2) */
#include <signal.h>
#include "CPCD.hpp"
...
...
ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp
View file @
e2fd02e4
...
...
@@ -16,7 +16,6 @@
#include <ndb_global.h>
#include <sys/stat.h>
#include <NdbMain.h>
#include <NdbOut.hpp>
...
...
ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
View file @
e2fd02e4
...
...
@@ -16,7 +16,6 @@
#include <ndb_global.h>
#include <sys/stat.h>
#include <NdbMain.h>
#include <NdbOut.hpp>
...
...
ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp
View file @
e2fd02e4
...
...
@@ -16,10 +16,8 @@
//#define TESTDEBUG 1
#include <sys/stat.h>
#include <fcntl.h>
#include <ndb_global.h>
#include <string.h>
#include <kernel_types.h>
#include <Pool.hpp>
#include "AsyncFile.hpp"
...
...
ndb/src/kernel/error/TimeModule.cpp
View file @
e2fd02e4
...
...
@@ -16,8 +16,8 @@
#include <ndb_global.h>
#include "TimeModule.hpp"
#include <time.h>
static
const
char
*
cMonth
[]
=
{
"x"
,
"January"
,
"February"
,
"Mars"
,
"April"
,
"May"
,
"June"
,
"July"
,
"August"
,
"September"
,
"October"
,
"November"
,
"December"
};
...
...
ndb/src/kernel/ndb-main/Main.cpp
View file @
e2fd02e4
...
...
@@ -42,9 +42,6 @@
#endif
extern
EventLogger
g_eventLogger
;
#if defined (NDB_LINUX) || defined (NDB_SOLARIS)
#include <sys/wait.h>
#endif
void
catchsigs
(
bool
ignore
);
// for process signal handling
extern
"C"
void
handler
(
int
signo
);
// for process signal handling
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
e2fd02e4
...
...
@@ -14,10 +14,12 @@
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 <my_pthread.h>
#include "MgmtSrvr.hpp"
#include "MgmtErrorReporter.hpp"
#include <ctype.h>
#include <NdbOut.hpp>
#include <AttrType.hpp>
#include <NdbApiSignal.hpp>
...
...
@@ -42,15 +44,11 @@
#include <EventLogger.hpp>
#include <DebuggerNames.hpp>
#include <ndb_version.h>
#include <string.h>
#include "SocketServer.hpp"
#include "NodeLogLevel.hpp"
#include <NdbConfig.h>
#include <time.h>
#include <pthread.h>
//#define MGM_SRV_DEBUG
#ifdef MGM_SRV_DEBUG
#define DEBUG(x) do ndbout << x << endl; while(0)
...
...
ndb/src/mgmsrv/main.cpp
View file @
e2fd02e4
...
...
@@ -14,8 +14,9 @@
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 <signal.h>
#include <sys/ioctl.h>
#include "MgmtSrvr.hpp"
#include "EventLogger.hpp"
...
...
@@ -198,7 +199,6 @@ NDB_MAIN(mgmsrv){
goto
error_end
;
}
#if defined (NDB_LINUX) || defined (NDB_SOLARIS)
if
(
glob
.
daemon
)
{
// Become a daemon
char
homePath
[
255
],
lockfile
[
255
],
logfile
[
255
];
...
...
@@ -210,7 +210,6 @@ NDB_MAIN(mgmsrv){
return
1
;
}
}
#endif
if
(
!
glob
.
mgmObject
->
start
()){
ndbout_c
(
"Unable to start management server."
);
...
...
ndb/test/ndbapi/flexBench/flexBench.cpp
View file @
e2fd02e4
...
...
@@ -292,7 +292,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
if
(
useLongKeys
){
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
);
memset
(
longKeyAttrName
[
i
],
0
,
strlen
(
"KEYATTR "
)
+
1
);
sprintf
(
longKeyAttrName
[
i
],
"KEYATTR%i"
,
i
);
...
...
@@ -531,7 +531,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
waitForThreads
(
pThreadsData
);
void
*
tmp
;
for
(
int
i
=
0
;
i
<
tNoOfThreads
;
i
++
){
for
(
Uint32
i
=
0
;
i
<
tNoOfThreads
;
i
++
){
NdbThread_WaitFor
(
pThreadsData
[
i
].
threadLife
,
&
tmp
);
NdbThread_Destroy
(
&
pThreadsData
[
i
].
threadLife
);
}
...
...
@@ -540,7 +540,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
if
(
useLongKeys
==
true
)
{
// Only free these areas if they have been allocated
// Otherwise cores will happen
for
(
int
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
for
(
Uint32
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
free
(
longKeyAttrName
[
i
]);
free
(
longKeyAttrName
);
}
// if
...
...
@@ -629,13 +629,13 @@ static void* flexBenchThread(void* pArg)
if
(
useLongKeys
){
// Allocate and populate the longkey array.
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
);
for
(
int
n
=
0
;
n
<
tNoOfOperations
;
n
++
){
for
(
int
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
{
for
(
Uint32
n
=
0
;
n
<
tNoOfOperations
;
n
++
){
for
(
Uint32
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
{
longKeyAttrValue
[
n
][
i
]
=
(
unsigned
*
)
malloc
(
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.
longKeyAttrValue
[
n
][
i
][
j
]
=
threadBase
+
n
;
}
...
...
@@ -645,10 +645,10 @@ static void* flexBenchThread(void* pArg)
int
nRefOpOffset
=
0
;
//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
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
)(
threadBase
+
ops
+
a
)
;
}
...
...
@@ -757,7 +757,7 @@ static void* flexBenchThread(void* pArg)
if
(
useLongKeys
){
// 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
],
(
char
*
)
longKeyAttrValue
[
count
-
1
][
i
],
tSizeOfLongPK
*
4
);
}
...
...
@@ -923,8 +923,8 @@ static void* flexBenchThread(void* pArg)
if
(
useLongKeys
==
true
)
{
// Only free these areas if they have been allocated
// Otherwise cores will occur
for
(
int
n
=
0
;
n
<
tNoOfOperations
;
n
++
){
for
(
int
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
{
for
(
Uint32
n
=
0
;
n
<
tNoOfOperations
;
n
++
){
for
(
Uint32
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
{
free
(
longKeyAttrValue
[
n
][
i
]);
}
free
(
longKeyAttrValue
[
n
]);
...
...
@@ -1064,13 +1064,13 @@ static void sleepBeforeStartingTest(int seconds){
static
int
createTables
(
Ndb
*
pMyNdb
){
for
(
int
i
=
0
;
i
<
tNoOfAttributes
;
i
++
){
for
(
Uint32
i
=
0
;
i
<
tNoOfAttributes
;
i
++
){
snprintf
(
attrName
[
i
],
MAXSTRLEN
,
"COL%d"
,
i
);
}
// Note! Uses only uppercase letters in table name's
// 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
){
snprintf
(
tableName
[
i
],
MAXSTRLEN
,
"TAB%d_%d"
,
i
,
(
int
)(
NdbTick_CurrentMillisecond
()
/
1000
));
...
...
@@ -1087,7 +1087,7 @@ createTables(Ndb* pMyNdb){
tmpTable
.
setStoredTable
(
!
theTempTable
);
if
(
useLongKeys
){
for
(
int
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
{
for
(
Uint32
i
=
0
;
i
<
tNoOfLongPK
;
i
++
)
{
NdbDictionary
::
Column
col
(
longKeyAttrName
[
i
]);
col
.
setType
(
NdbDictionary
::
Column
::
Unsigned
);
col
.
setLength
(
tSizeOfLongPK
);
...
...
ndb/test/src/HugoCalculator.cpp
View file @
e2fd02e4
...
...
@@ -157,7 +157,7 @@ HugoCalculator::verifyRowValues(NDBT_ResultRow* const pRow) const{
<<
", NdbDict::Column::getLength(): "
<<
attr
->
getLength
()
<<
endl
;
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
]
<<
"]"
;
if
(
buf
[
j
]
!=
buf2
[
j
])
...
...
ndb/test/src/HugoOperations.cpp
View file @
e2fd02e4
...
...
@@ -652,7 +652,7 @@ void HugoOperations::deallocRows(){
int
HugoOperations
::
saveCopyOfRecord
(
int
numRecords
){
if
(
numRecords
>
rows
.
size
())
if
(
numRecords
>
(
int
)
rows
.
size
())
return
NDBT_FAILED
;
for
(
int
i
=
0
;
i
<
numRecords
;
i
++
){
...
...
@@ -662,7 +662,7 @@ int HugoOperations::saveCopyOfRecord(int numRecords ){
}
BaseString
HugoOperations
::
getRecordStr
(
int
recordNum
){
if
(
recordNum
>
rows
.
size
())
if
(
recordNum
>
(
int
)
rows
.
size
())
return
NULL
;
return
rows
[
recordNum
]
->
c_str
();
}
...
...
@@ -673,7 +673,7 @@ int HugoOperations::getRecordGci(int recordNum){
int
HugoOperations
::
compareRecordToCopy
(
int
numRecords
){
if
(
numRecords
>
rows
.
size
())
if
(
numRecords
>
(
int
)
rows
.
size
())
return
NDBT_FAILED
;
if
((
unsigned
)
numRecords
>
savedRecords
.
size
())
return
NDBT_FAILED
;
...
...
ndb/test/src/HugoTransactions.cpp
View file @
e2fd02e4
...
...
@@ -1253,9 +1253,11 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
g_info
<<
" UPDATE: "
;
recEvent
=
recUpdateEvent
;
break
;
case
NdbDictionary
:
:
Event
::
TE_ALL
:
abort
();
}
if
(
pk
<
records
)
{
if
(
(
int
)
pk
<
records
)
{
recEvent
[
pk
].
pk
=
pk
;
recEvent
[
pk
].
count
++
;
}
...
...
@@ -1304,7 +1306,7 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
if
(
stats
.
n_updates
>
0
)
{
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
)
{
stats
.
n_consecutive
++
;
ndbout
<<
"missing insert pk "
<<
i
<<
endl
;
...
...
ndb/test/src/NDBT_ResultRow.cpp
View file @
e2fd02e4
...
...
@@ -66,6 +66,7 @@ NDBT_ResultRow::attributeStore(const char* name){
return
data
[
i
];
}
assert
(
false
);
return
0
;
}
NdbOut
&
...
...
@@ -189,7 +190,8 @@ NDBT_ResultRow::clone () const {
NDBT_ResultRow
*
row
=
new
NDBT_ResultRow
(
m_table
,
ad
[
0
]);
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
();
}
...
...
ndb/test/src/NdbBackup.cpp
View file @
e2fd02e4
...
...
@@ -66,7 +66,6 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
/**
* Fetch configuration from management server
*/
char
buf
[
255
];
ConfigRetriever
cr
;
...
...
ndb/test/src/NdbConfig.cpp
View file @
e2fd02e4
...
...
@@ -31,7 +31,6 @@ NdbConfig::getPropsForNode(unsigned int node_id,
/**
* Fetch configuration from management server
*/
char
buf
[
255
];
ConfigRetriever
cr
;
...
...
@@ -111,7 +110,6 @@ NdbConfig::getHostName(unsigned int node_id,
/**
* Fetch configuration from management server
*/
char
buf
[
255
];
ConfigRetriever
cr
;
...
...
ndb/test/src/NdbRestarter.cpp
View file @
e2fd02e4
...
...
@@ -167,7 +167,7 @@ NdbRestarter::getRandomNotMasterNodeId(int rand){
if
(
master
==
-
1
)
return
-
1
;
int
counter
=
0
;
Uint32
counter
=
0
;
rand
=
rand
%
ndbNodes
.
size
();
while
(
counter
++
<
ndbNodes
.
size
()
&&
ndbNodes
[
rand
].
node_id
==
master
)
rand
=
(
rand
+
1
)
%
ndbNodes
.
size
();
...
...
@@ -196,7 +196,7 @@ NdbRestarter::getRandomNodeOtherNodeGroup(int nodeId, int rand){
return
-
1
;
}
int
counter
=
0
;
Uint32
counter
=
0
;
rand
=
rand
%
ndbNodes
.
size
();
while
(
counter
++
<
ndbNodes
.
size
()
&&
ndbNodes
[
rand
].
node_group
==
node_group
)
rand
=
(
rand
+
1
)
%
ndbNodes
.
size
();
...
...
ndb/tools/cpcc/cpcc.cpp
View file @
e2fd02e4
...
...
@@ -116,7 +116,7 @@ public:
}
virtual
bool
evaluate
(
SimpleCpcClient
*
c
,
const
SimpleCpcClient
::
Process
&
p
){
return
p
.
m_id
==
id
&&
c
==
host
;
return
p
.
m_id
==
(
int
)
id
&&
c
==
host
;
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment