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
34532803
Commit
34532803
authored
May 10, 2004
by
tomas@mc05.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compiler warnings in ndb
parent
c745ae95
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
62 additions
and
104 deletions
+62
-104
ndb/include/debugger/SignalLoggerManager.hpp
ndb/include/debugger/SignalLoggerManager.hpp
+1
-1
ndb/include/mgmapi/mgmapi.h
ndb/include/mgmapi/mgmapi.h
+6
-6
ndb/include/ndb_version.h
ndb/include/ndb_version.h
+1
-1
ndb/include/portlib/NdbTick.h
ndb/include/portlib/NdbTick.h
+1
-1
ndb/src/common/debugger/signaldata/CreateFragmentation.cpp
ndb/src/common/debugger/signaldata/CreateFragmentation.cpp
+1
-1
ndb/src/common/portlib/unix/NdbMem.c
ndb/src/common/portlib/unix/NdbMem.c
+0
-1
ndb/src/common/portlib/unix/NdbThread.c
ndb/src/common/portlib/unix/NdbThread.c
+1
-1
ndb/src/common/portlib/unix/NdbTick.c
ndb/src/common/portlib/unix/NdbTick.c
+2
-2
ndb/src/common/util/Parser.cpp
ndb/src/common/util/Parser.cpp
+1
-0
ndb/src/common/util/getarg.c
ndb/src/common/util/getarg.c
+2
-2
ndb/src/common/util/version.c
ndb/src/common/util/version.c
+3
-3
ndb/src/cw/cpcd/common.cpp
ndb/src/cw/cpcd/common.cpp
+4
-1
ndb/src/kernel/blocks/backup/restore/Restore.cpp
ndb/src/kernel/blocks/backup/restore/Restore.cpp
+3
-2
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
+1
-1
ndb/src/kernel/blocks/dbutil/DbUtil.cpp
ndb/src/kernel/blocks/dbutil/DbUtil.cpp
+0
-61
ndb/src/kernel/blocks/grep/Grep.cpp
ndb/src/kernel/blocks/grep/Grep.cpp
+1
-1
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+2
-3
ndb/src/kernel/blocks/suma/SumaInit.cpp
ndb/src/kernel/blocks/suma/SumaInit.cpp
+2
-2
ndb/src/kernel/ndb-main/Main.cpp
ndb/src/kernel/ndb-main/Main.cpp
+1
-1
ndb/src/mgmapi/Makefile
ndb/src/mgmapi/Makefile
+1
-1
ndb/src/mgmapi/test/keso.c
ndb/src/mgmapi/test/keso.c
+2
-2
ndb/src/mgmclient/test_cpcd/test_cpcd.cpp
ndb/src/mgmclient/test_cpcd/test_cpcd.cpp
+2
-2
ndb/src/mgmsrv/CommandInterpreter.cpp
ndb/src/mgmsrv/CommandInterpreter.cpp
+2
-0
ndb/src/mgmsrv/main.cpp
ndb/src/mgmsrv/main.cpp
+1
-0
ndb/src/ndbapi/NdbDictionaryImpl.hpp
ndb/src/ndbapi/NdbDictionaryImpl.hpp
+1
-1
ndb/src/ndbapi/NdbOperationDefine.cpp
ndb/src/ndbapi/NdbOperationDefine.cpp
+0
-2
ndb/src/ndbapi/NdbOperationSearch.cpp
ndb/src/ndbapi/NdbOperationSearch.cpp
+1
-1
ndb/src/ndbapi/NdbSchemaOp.cpp
ndb/src/ndbapi/NdbSchemaOp.cpp
+3
-0
ndb/src/ndbapi/Ndberror.cpp
ndb/src/ndbapi/Ndberror.cpp
+2
-0
ndb/src/ndbapi/Ndbinit.cpp
ndb/src/ndbapi/Ndbinit.cpp
+2
-2
ndb/src/newtonapi/dba_binding.cpp
ndb/src/newtonapi/dba_binding.cpp
+6
-0
ndb/src/rep/state/RepState.cpp
ndb/src/rep/state/RepState.cpp
+6
-2
No files found.
ndb/include/debugger/SignalLoggerManager.hpp
View file @
34532803
...
@@ -153,7 +153,7 @@ public:
...
@@ -153,7 +153,7 @@ public:
private:
private:
bool
m_logDistributed
;
bool
m_logDistributed
;
int
m_ownNodeId
;
Uint32
m_ownNodeId
;
FILE
*
outputStream
;
FILE
*
outputStream
;
int
log
(
int
cmd
,
BlockNumber
bno
,
LogMode
logMode
);
int
log
(
int
cmd
,
BlockNumber
bno
,
LogMode
logMode
);
...
...
ndb/include/mgmapi/mgmapi.h
View file @
34532803
...
@@ -80,13 +80,13 @@ extern "C" {
...
@@ -80,13 +80,13 @@ extern "C" {
* NDB Cluster node types
* NDB Cluster node types
*/
*/
enum
ndb_mgm_node_type
{
enum
ndb_mgm_node_type
{
NDB_MGM_NODE_TYPE_UNKNOWN
=
-
1
,
/
//< Node type not known
NDB_MGM_NODE_TYPE_UNKNOWN
=
-
1
,
/
*/< Node type not known*/
NDB_MGM_NODE_TYPE_API
=
0
,
/
//< An application node (API)
NDB_MGM_NODE_TYPE_API
=
0
,
/
*/< An application node (API)*/
NDB_MGM_NODE_TYPE_NDB
=
1
,
/
//< A database node (DB)
NDB_MGM_NODE_TYPE_NDB
=
1
,
/
*/< A database node (DB)*/
NDB_MGM_NODE_TYPE_MGM
=
2
,
/
//< A management server node (MGM)
NDB_MGM_NODE_TYPE_MGM
=
2
,
/
*/< A management server node (MGM)*/
NDB_MGM_NODE_TYPE_MIN
=
0
,
/
//< Min valid value
NDB_MGM_NODE_TYPE_MIN
=
0
,
/
*/< Min valid value*/
NDB_MGM_NODE_TYPE_MAX
=
2
/
//< Max valid value
NDB_MGM_NODE_TYPE_MAX
=
2
/
*/< Max valid value*/
};
};
/**
/**
...
...
ndb/include/ndb_version.h
View file @
34532803
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
* Used by transporter and when communicating with
* Used by transporter and when communicating with
* managment server
* managment server
*/
*/
/
/#define NDB_VERSION_ID 0
/
*#define NDB_VERSION_ID 0*/
#endif
#endif
ndb/include/portlib/NdbTick.h
View file @
34532803
...
@@ -42,7 +42,7 @@ NDB_TICKS NdbTick_CurrentMillisecond(void);
...
@@ -42,7 +42,7 @@ NDB_TICKS NdbTick_CurrentMillisecond(void);
*/
*/
int
NdbTick_CurrentMicrosecond
(
NDB_TICKS
*
secs
,
Uint32
*
micros
);
int
NdbTick_CurrentMicrosecond
(
NDB_TICKS
*
secs
,
Uint32
*
micros
);
//#define TIME_MEASUREMENT
/*#define TIME_MEASUREMENT*/
#ifdef TIME_MEASUREMENT
#ifdef TIME_MEASUREMENT
struct
MicroSecondTimer
{
struct
MicroSecondTimer
{
...
...
ndb/src/common/debugger/signaldata/CreateFragmentation.cpp
View file @
34532803
...
@@ -26,7 +26,7 @@ printCREATE_FRAGMENTATION_REQ(FILE * output, const Uint32 * theData,
...
@@ -26,7 +26,7 @@ printCREATE_FRAGMENTATION_REQ(FILE * output, const Uint32 * theData,
fprintf
(
output
,
" noOfFragments: %x
\n
"
,
sig
->
noOfFragments
);
fprintf
(
output
,
" noOfFragments: %x
\n
"
,
sig
->
noOfFragments
);
fprintf
(
output
,
" fragmentNode: %x
\n
"
,
sig
->
fragmentNode
);
fprintf
(
output
,
" fragmentNode: %x
\n
"
,
sig
->
fragmentNode
);
if
(
sig
->
primaryTableId
==
RNIL
)
if
(
sig
->
primaryTableId
==
RNIL
)
fprintf
(
output
,
" primaryTableId: none
\n
"
,
sig
->
primaryTableId
);
fprintf
(
output
,
" primaryTableId: none
\n
"
);
else
else
fprintf
(
output
,
" primaryTableId: %x
\n
"
,
sig
->
primaryTableId
);
fprintf
(
output
,
" primaryTableId: %x
\n
"
,
sig
->
primaryTableId
);
return
true
;
return
true
;
...
...
ndb/src/common/portlib/unix/NdbMem.c
View file @
34532803
...
@@ -62,7 +62,6 @@ int NdbMem_MemLockAll(){
...
@@ -62,7 +62,6 @@ int NdbMem_MemLockAll(){
#if defined NDB_MACOSX
#if defined NDB_MACOSX
return
0
;
return
0
;
#else
#else
//return mlockall(MCL_CURRENT | MCL_FUTURE);
return
mlockall
(
MCL_CURRENT
);
return
mlockall
(
MCL_CURRENT
);
#endif
#endif
}
}
...
...
ndb/src/common/portlib/unix/NdbThread.c
View file @
34532803
...
@@ -94,7 +94,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
...
@@ -94,7 +94,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
if
(
p_wait_thread
==
NULL
)
if
(
p_wait_thread
==
NULL
)
return
0
;
return
0
;
if
(
p_wait_thread
->
thread
==
NULL
)
if
(
p_wait_thread
->
thread
==
0
)
return
0
;
return
0
;
result
=
pthread_join
(
p_wait_thread
->
thread
,
status
);
result
=
pthread_join
(
p_wait_thread
->
thread
,
status
);
...
...
ndb/src/common/portlib/unix/NdbTick.c
View file @
34532803
...
@@ -99,12 +99,12 @@ NdbTick_getMicrosPassed(struct MicroSecondTimer start,
...
@@ -99,12 +99,12 @@ NdbTick_getMicrosPassed(struct MicroSecondTimer start,
ret_value
=
((
NDB_TICKS
)
MICROSEC_PER_SEC
)
*
sec_passed
;
ret_value
=
((
NDB_TICKS
)
MICROSEC_PER_SEC
)
*
sec_passed
;
}
else
if
(
start
.
seconds
>
stop
.
seconds
)
{
}
else
if
(
start
.
seconds
>
stop
.
seconds
)
{
return
ret_value
;
return
ret_value
;
}
//if
}
if
(
start
.
micro_seconds
<
stop
.
micro_seconds
)
{
if
(
start
.
micro_seconds
<
stop
.
micro_seconds
)
{
ret_value
+=
(
stop
.
micro_seconds
-
start
.
micro_seconds
);
ret_value
+=
(
stop
.
micro_seconds
-
start
.
micro_seconds
);
}
else
if
(
ret_value
!=
(
NDB_TICKS
)
0
)
{
}
else
if
(
ret_value
!=
(
NDB_TICKS
)
0
)
{
ret_value
-=
(
start
.
micro_seconds
-
stop
.
micro_seconds
);
ret_value
-=
(
start
.
micro_seconds
-
stop
.
micro_seconds
);
}
//if
}
return
ret_value
;
return
ret_value
;
}
}
#endif
#endif
ndb/src/common/util/Parser.cpp
View file @
34532803
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include <assert.h>
#include <assert.h>
#include <Base64.hpp>
#include <Base64.hpp>
#undef DEBUG
#define DEBUG(x) ndbout << x << endl;
#define DEBUG(x) ndbout << x << endl;
static
void
trim
(
char
*
str
);
static
void
trim
(
char
*
str
);
...
...
ndb/src/common/util/getarg.c
View file @
34532803
...
@@ -407,12 +407,12 @@ arg_match_long(struct getargs *args, size_t num_args,
...
@@ -407,12 +407,12 @@ arg_match_long(struct getargs *args, size_t num_args,
}
}
case
arg_string
:
case
arg_string
:
{
{
*
(
char
**
)
current
->
value
=
optarg
+
1
;
*
(
char
**
)
current
->
value
=
(
char
*
)
optarg
+
1
;
return
0
;
return
0
;
}
}
case
arg_strings
:
case
arg_strings
:
{
{
add_string
((
getarg_strings
*
)
current
->
value
,
optarg
+
1
);
add_string
((
getarg_strings
*
)
current
->
value
,
(
char
*
)
optarg
+
1
);
return
0
;
return
0
;
}
}
case
arg_flag
:
case
arg_flag
:
...
...
ndb/src/common/util/version.c
View file @
34532803
...
@@ -61,7 +61,7 @@ struct NdbUpGradeCompatible {
...
@@ -61,7 +61,7 @@ struct NdbUpGradeCompatible {
UG_MatchType
matchType
;
UG_MatchType
matchType
;
};
};
/
/#define TEST_VERSION
/
*#define TEST_VERSION*/
#ifndef TEST_VERSION
#ifndef TEST_VERSION
struct
NdbUpGradeCompatible
ndbCompatibleTable_full
[]
=
{
struct
NdbUpGradeCompatible
ndbCompatibleTable_full
[]
=
{
...
@@ -74,7 +74,7 @@ struct NdbUpGradeCompatible ndbCompatibleTable_upgrade[] = {
...
@@ -74,7 +74,7 @@ struct NdbUpGradeCompatible ndbCompatibleTable_upgrade[] = {
void
ndbSetOwnVersion
()
{}
void
ndbSetOwnVersion
()
{}
#else /
/ testing purposes
#else
/
* testing purposes */
struct
NdbUpGradeCompatible
ndbCompatibleTable_full
[]
=
{
struct
NdbUpGradeCompatible
ndbCompatibleTable_full
[]
=
{
{
MAKE_VERSION
(
4
,
1
,
5
),
MAKE_VERSION
(
4
,
1
,
0
),
UG_Range
},
{
MAKE_VERSION
(
4
,
1
,
5
),
MAKE_VERSION
(
4
,
1
,
0
),
UG_Range
},
...
@@ -122,7 +122,7 @@ ndbGetOwnVersion()
...
@@ -122,7 +122,7 @@ ndbGetOwnVersion()
{
{
#ifndef TEST_VERSION
#ifndef TEST_VERSION
return
NDB_VERSION_D
;
return
NDB_VERSION_D
;
#else /
/ testing purposes
#else
/
* testing purposes */
if
(
ndbOwnVersionTesting
==
0
)
if
(
ndbOwnVersionTesting
==
0
)
return
NDB_VERSION_D
;
return
NDB_VERSION_D
;
else
else
...
...
ndb/src/cw/cpcd/common.cpp
View file @
34532803
...
@@ -152,7 +152,10 @@ parse_config_file(struct getargs args[], int num_arg, const Properties& p){
...
@@ -152,7 +152,10 @@ parse_config_file(struct getargs args[], int num_arg, const Properties& p){
break
;
break
;
}
}
}
}
if
(
!
found
)
if
(
!
found
)
{
printf
(
"Unknown parameter: %s
\n
"
,
name
);
printf
(
"Unknown parameter: %s
\n
"
,
name
);
return
1
;
}
}
}
return
0
;
}
}
ndb/src/kernel/blocks/backup/restore/Restore.cpp
View file @
34532803
...
@@ -514,7 +514,8 @@ RestoreMetaData::parseTableDescriptor(const Uint32 * data,
...
@@ -514,7 +514,8 @@ RestoreMetaData::parseTableDescriptor(const Uint32 * data,
NdbDictionary
::
Column
::
Type
type
;
NdbDictionary
::
Column
::
Type
type
;
if
(
getMajor
(
m_fileHeader
.
NdbVersion
)
<
VERSION_3X
)
{
if
(
getMajor
(
m_fileHeader
.
NdbVersion
)
<
VERSION_3X
)
{
tableImpl
->
setName
(
tableName
);
tableImpl
->
setName
(
tableName
);
for
(
Uint32
i
=
0
;
i
<
tableImpl
->
getNoOfColumns
();
i
++
)
{
Uint32
noOfColumns
=
tableImpl
->
getNoOfColumns
();
for
(
Uint32
i
=
0
;
i
<
noOfColumns
;
i
++
)
{
type
=
convertToV3x
(
tableImpl
->
getColumn
(
i
)
->
m_extType
,
type
=
convertToV3x
(
tableImpl
->
getColumn
(
i
)
->
m_extType
,
columnTypeMapping
,
columnTypeMapping
,
-
1
);
-
1
);
...
@@ -562,7 +563,7 @@ bool
...
@@ -562,7 +563,7 @@ bool
TupleS
::
prepareRecord
(
const
TableS
&
tab
){
TupleS
::
prepareRecord
(
const
TableS
&
tab
){
m_currentTable
=
&
tab
;
m_currentTable
=
&
tab
;
for
(
int
i
=
0
;
i
<
allAttributes
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
allAttributes
.
size
();
i
++
)
{
if
(
!
allAttributes
[
i
]
=
=
NULL
)
if
(
allAttributes
[
i
]
!
=
NULL
)
delete
allAttributes
[
i
];
delete
allAttributes
[
i
];
}
}
allAttributes
.
clear
();
allAttributes
.
clear
();
...
...
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
View file @
34532803
...
@@ -49,7 +49,7 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
...
@@ -49,7 +49,7 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
Uint32
noOfAttributes
=
signal
->
theData
[
4
];
Uint32
noOfAttributes
=
signal
->
theData
[
4
];
Uint32
fragId
=
signal
->
theData
[
5
];
Uint32
fragId
=
signal
->
theData
[
5
];
Uint32
noOfNullAttr
=
signal
->
theData
[
7
];
Uint32
noOfNullAttr
=
signal
->
theData
[
7
];
Uint32
schemaVersion
=
signal
->
theData
[
8
];
/* Uint32 schemaVersion = signal->theData[8];*/
Uint32
noOfKeyAttr
=
signal
->
theData
[
9
];
Uint32
noOfKeyAttr
=
signal
->
theData
[
9
];
Uint32
noOfNewAttr
=
signal
->
theData
[
10
];
Uint32
noOfNewAttr
=
signal
->
theData
[
10
];
...
...
ndb/src/kernel/blocks/dbutil/DbUtil.cpp
View file @
34532803
...
@@ -1303,26 +1303,6 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
...
@@ -1303,26 +1303,6 @@ DbUtil::prepareOperation(Signal* signal, PreparePtr prepPtr)
TcKeyReq
::
setAIInTcKeyReq
(
requestInfo
,
0
);
// Attrinfo sent separately
TcKeyReq
::
setAIInTcKeyReq
(
requestInfo
,
0
);
// Attrinfo sent separately
prepOpPtr
.
p
->
tckey
.
requestInfo
=
requestInfo
;
prepOpPtr
.
p
->
tckey
.
requestInfo
=
requestInfo
;
if
(
operationType
==
UtilPrepareReq
::
Read
)
{
// ResultSet
AttrMappingBuffer
::
ConstDataBufferIterator
tmpIt
;
#if 0 //def EVENT_DEBUG
ResultSetBuffer & rs = prepOpPtr.p->rsInfo;
ResultSetInfoBuffer::DataBufferIterator it;
rs.first(it);
for (prepOpPtr.p->attrMapping.first(tmpIt);
tmpIt.curr.i != RNIL;
prepOpPtr.p->attrMapping.next(tmpIt)) {
AttributeHeader* ah = (AttributeHeader *) tmpIt.data;
ah->print(stdout);
AttributeHeader* rsah = (AttributeHeader *) it.data;
rsah->print(stdout);
rs.next(it,1);
printf("%d\n",it.data);
}
#endif
}
/****************************
/****************************
* Confirm completed prepare
* Confirm completed prepare
****************************/
****************************/
...
@@ -1914,7 +1894,6 @@ DbUtil::runOperation(Signal* signal, TransactionPtr & transPtr,
...
@@ -1914,7 +1894,6 @@ DbUtil::runOperation(Signal* signal, TransactionPtr & transPtr,
Operation
*
op
=
opPtr
.
p
;
Operation
*
op
=
opPtr
.
p
;
const
PreparedOperation
*
pop
=
op
->
prepOp
;
const
PreparedOperation
*
pop
=
op
->
prepOp
;
Uint32
lastFlag
=
0
;
if
(
!
transPtr
.
p
->
operations
.
next
(
opPtr
)){
if
(
!
transPtr
.
p
->
operations
.
next
(
opPtr
)){
TcKeyReq
::
setCommitFlag
(
start
,
1
);
// Last operation
TcKeyReq
::
setCommitFlag
(
start
,
1
);
// Last operation
TcKeyReq
::
setExecuteFlag
(
start
,
1
);
TcKeyReq
::
setExecuteFlag
(
start
,
1
);
...
@@ -2127,43 +2106,11 @@ DbUtil::execTRANSID_AI(Signal* signal){
...
@@ -2127,43 +2106,11 @@ DbUtil::execTRANSID_AI(Signal* signal){
/**
/**
* Save result
* Save result
*/
*/
Uint32
srcSz
=
dataLen
;
const
Uint32
*
src
=
&
signal
->
theData
[
3
];
const
Uint32
*
src
=
&
signal
->
theData
[
3
];
const
Uint32
segSize
=
opP
->
rs
.
getSegmentSize
();
#if 0 //def EVENT_DEBUG
printf("rsRecv %u, dataLen %u, rsExpect %u\n",
opP->rsRecv, dataLen, opP->rsExpect);
#endif
ResultSetBuffer
::
DataBufferIterator
rs
=
opP
->
rsIterator
;
ResultSetBuffer
::
DataBufferIterator
rs
=
opP
->
rsIterator
;
#if 0 //def EVENT_DEBUG
for(int i = 0; i < dataLen; i++)
printf("H'%.8x ", src[i]);
#endif
ndbrequire
(
opP
->
rs
.
import
(
rs
,
src
,
dataLen
));
ndbrequire
(
opP
->
rs
.
import
(
rs
,
src
,
dataLen
));
opP
->
rs
.
next
(
rs
,
dataLen
);
opP
->
rs
.
next
(
rs
,
dataLen
);
#if 0 // replaced this section with import() above
while(srcSz > segSize){
ndbrequire(rs.curr.i != RNIL);
memcpy(rs.data, src, segSize << 2);
opP->rs.next(rs, segSize);
srcSz -= segSize;
// src += segSize * 4; // Bug?
src += segSize;
}
if(srcSz > 0){
jam();
memcpy(rs.data, src, srcSz << 2);
rs.curr.i = RNIL;
rs.data = 0;
}
#endif
opP
->
rsIterator
=
rs
;
opP
->
rsIterator
=
rs
;
if
(
!
opP
->
complete
()){
if
(
!
opP
->
complete
()){
...
@@ -2171,20 +2118,12 @@ DbUtil::execTRANSID_AI(Signal* signal){
...
@@ -2171,20 +2118,12 @@ DbUtil::execTRANSID_AI(Signal* signal){
return
;
return
;
}
}
#if 0 //def EVENT_DEBUG
printf("op complete\n");
#endif
transPtr
.
p
->
recv
++
;
transPtr
.
p
->
recv
++
;
if
(
!
transPtr
.
p
->
complete
()){
if
(
!
transPtr
.
p
->
complete
()){
jam
();
jam
();
return
;
return
;
}
}
#if 0 //def EVENT_DEBUG
printf("trans complete\n");
#endif
finishTransaction
(
signal
,
transPtr
);
finishTransaction
(
signal
,
transPtr
);
}
}
...
...
ndb/src/kernel/blocks/grep/Grep.cpp
View file @
34532803
...
@@ -1294,7 +1294,7 @@ Grep::PSPart::execSUB_REMOVE_REF(Signal* signal)
...
@@ -1294,7 +1294,7 @@ Grep::PSPart::execSUB_REMOVE_REF(Signal* signal)
jamEntry
();
jamEntry
();
SubRemoveRef
*
const
ref
=
(
SubRemoveRef
*
)
signal
->
getDataPtr
();
SubRemoveRef
*
const
ref
=
(
SubRemoveRef
*
)
signal
->
getDataPtr
();
Uint32
subData
=
ref
->
subscriberData
;
Uint32
subData
=
ref
->
subscriberData
;
GrepError
::
Code
err
=
(
GrepError
::
Code
)
ref
->
err
;
/* GrepError::Code err = (GrepError::Code)ref->err;*/
SubscriptionPtr
subPtr
;
SubscriptionPtr
subPtr
;
c_subscriptions
.
getPtr
(
subPtr
,
subData
);
c_subscriptions
.
getPtr
(
subPtr
,
subData
);
...
...
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
34532803
...
@@ -566,9 +566,8 @@ AsyncFile::writeReq( Request * request)
...
@@ -566,9 +566,8 @@ AsyncFile::writeReq( Request * request)
if
(((
i
+
1
)
<
request
->
par
.
readWrite
.
numberOfPages
))
{
if
(((
i
+
1
)
<
request
->
par
.
readWrite
.
numberOfPages
))
{
// There are more pages to write
// There are more pages to write
// Check that offsets are consequtive
// Check that offsets are consequtive
if
((
page_offset
+
request
->
par
.
readWrite
.
pages
[
i
].
size
)
off_t
tmp
=
page_offset
+
request
->
par
.
readWrite
.
pages
[
i
].
size
;
!=
if
(
tmp
!=
request
->
par
.
readWrite
.
pages
[
i
+
1
].
offset
)
{
request
->
par
.
readWrite
.
pages
[
i
+
1
].
offset
)
{
// Next page is not aligned with previous, not allowed
// Next page is not aligned with previous, not allowed
DEBUG
(
ndbout_c
(
"Page offsets are not aligned"
));
DEBUG
(
ndbout_c
(
"Page offsets are not aligned"
));
request
->
error
=
EINVAL
;
request
->
error
=
EINVAL
;
...
...
ndb/src/kernel/blocks/suma/SumaInit.cpp
View file @
34532803
...
@@ -132,9 +132,9 @@ SumaParticipant::~SumaParticipant()
...
@@ -132,9 +132,9 @@ SumaParticipant::~SumaParticipant()
Suma
::
Suma
(
const
Configuration
&
conf
)
:
Suma
::
Suma
(
const
Configuration
&
conf
)
:
SumaParticipant
(
conf
),
SumaParticipant
(
conf
),
Restart
(
*
this
),
c_nodes
(
c_nodePool
),
c_nodes
(
c_nodePool
),
c_runningSubscriptions
(
c_subCoordinatorPool
),
c_runningSubscriptions
(
c_subCoordinatorPool
)
Restart
(
*
this
)
{
{
c_nodePool
.
setSize
(
MAX_NDB_NODES
);
c_nodePool
.
setSize
(
MAX_NDB_NODES
);
...
...
ndb/src/kernel/ndb-main/Main.cpp
View file @
34532803
...
@@ -188,9 +188,9 @@ NDB_MAIN(ndb_kernel){
...
@@ -188,9 +188,9 @@ NDB_MAIN(ndb_kernel){
void
void
systemInfo
(
const
Configuration
&
config
,
const
LogLevel
&
logLevel
){
systemInfo
(
const
Configuration
&
config
,
const
LogLevel
&
logLevel
){
#ifdef NDB_WIN32
int
processors
=
0
;
int
processors
=
0
;
int
speed
;
int
speed
;
#ifdef NDB_WIN32
SYSTEM_INFO
sinfo
;
SYSTEM_INFO
sinfo
;
GetSystemInfo
(
&
sinfo
);
GetSystemInfo
(
&
sinfo
);
processors
=
sinfo
.
dwNumberOfProcessors
;
processors
=
sinfo
.
dwNumberOfProcessors
;
...
...
ndb/src/mgmapi/Makefile
View file @
34532803
...
@@ -9,7 +9,7 @@ A_LIB := Y
...
@@ -9,7 +9,7 @@ A_LIB := Y
SO_LIB
:=
Y
SO_LIB
:=
Y
PIC_LIB
:=
Y
PIC_LIB
:=
Y
DIRS
:=
test
#
DIRS := test
LIB_TARGET
:=
MGM_API
LIB_TARGET
:=
MGM_API
LIB_TARGET_ARCHIVES
:=
$(ARCHIVE_TARGET)
general portlib
LIB_TARGET_ARCHIVES
:=
$(ARCHIVE_TARGET)
general portlib
...
...
ndb/src/mgmapi/test/keso.c
View file @
34532803
...
@@ -60,8 +60,8 @@ struct test_case test_connect_disconnect[] = {
...
@@ -60,8 +60,8 @@ struct test_case test_connect_disconnect[] = {
struct
test_case
tests
[]
=
{
struct
test_case
tests
[]
=
{
{
"testStatus"
,
&
testStatus
},
{
"testStatus"
,
&
testStatus
},
{
"testFilterClusterLog"
,
&
testFilterClusterLog
},
{
"testFilterClusterLog"
,
&
testFilterClusterLog
},
/
/{ "testSetLogLevelClusterLog", &testSetLogLevelClusterLog },
/
*{ "testSetLogLevelClusterLog", &testSetLogLevelClusterLog },*/
/
/{ "testSetLogLevelNode", &testSetLogLevelNode },
/
*{ "testSetLogLevelNode", &testSetLogLevelNode },*/
{
"testRestartNode"
,
&
testRestartNode
},
{
"testRestartNode"
,
&
testRestartNode
},
{
"testGetStatPort"
,
&
testGetStatPort
},
{
"testGetStatPort"
,
&
testGetStatPort
},
#ifdef VM_TRACE
#ifdef VM_TRACE
...
...
ndb/src/mgmclient/test_cpcd/test_cpcd.cpp
View file @
34532803
...
@@ -136,7 +136,7 @@ void list(){
...
@@ -136,7 +136,7 @@ void list(){
ABORT
();
ABORT
();
}
}
for
(
int
i
=
0
;
i
<
procs
.
size
();
i
++
){
for
(
Uint32
i
=
0
;
i
<
procs
.
size
();
i
++
){
SimpleCpcClient
::
Process
*
p
=
find
(
procs
[
i
].
m_id
);
SimpleCpcClient
::
Process
*
p
=
find
(
procs
[
i
].
m_id
);
if
(
p
!=
0
){
if
(
p
!=
0
){
p
->
m_status
=
procs
[
i
].
m_status
;
p
->
m_status
=
procs
[
i
].
m_status
;
...
@@ -144,7 +144,7 @@ void list(){
...
@@ -144,7 +144,7 @@ void list(){
}
}
}
}
SimpleCpcClient
::
Process
*
find
(
int
id
){
SimpleCpcClient
::
Process
*
find
(
int
id
){
for
(
int
i
=
0
;
i
<
g_procs
.
size
();
i
++
){
for
(
Uint32
i
=
0
;
i
<
g_procs
.
size
();
i
++
){
if
(
g_procs
[
i
].
m_id
==
id
)
if
(
g_procs
[
i
].
m_id
==
id
)
return
&
g_procs
[
i
];
return
&
g_procs
[
i
];
}
}
...
...
ndb/src/mgmsrv/CommandInterpreter.cpp
View file @
34532803
...
@@ -645,6 +645,8 @@ versionCallback(int nodeId, int version, void * anyData, int errCode){
...
@@ -645,6 +645,8 @@ versionCallback(int nodeId, int version, void * anyData, int errCode){
}
}
break
;
break
;
case
NDB_MGM_NODE_TYPE_UNKNOWN
:
assert
(
0
);
};
};
}
else
{
}
else
{
...
...
ndb/src/mgmsrv/main.cpp
View file @
34532803
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include "CommandInterpreter.hpp"
#include "CommandInterpreter.hpp"
#endif
#endif
#undef DEBUG
#define DEBUG(x) ndbout << x << endl;
#define DEBUG(x) ndbout << x << endl;
const
char
progname
[]
=
"mgmtsrvr"
;
const
char
progname
[]
=
"mgmtsrvr"
;
...
...
ndb/src/ndbapi/NdbDictionaryImpl.hpp
View file @
34532803
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
class
NdbDictObjectImpl
{
class
NdbDictObjectImpl
{
public:
public:
int
m_version
;
Uint32
m_version
;
NdbDictionary
::
Object
::
Status
m_status
;
NdbDictionary
::
Object
::
Status
m_status
;
bool
change
();
bool
change
();
...
...
ndb/src/ndbapi/NdbOperationDefine.cpp
View file @
34532803
...
@@ -164,7 +164,6 @@ NdbOperation::readTupleExclusive()
...
@@ -164,7 +164,6 @@ NdbOperation::readTupleExclusive()
int
int
NdbOperation
::
simpleRead
()
NdbOperation
::
simpleRead
()
{
{
NdbConnection
*
tNdbCon
=
theNdbCon
;
int
tErrorLine
=
theErrorLine
;
int
tErrorLine
=
theErrorLine
;
if
(
theStatus
==
Init
)
{
if
(
theStatus
==
Init
)
{
theStatus
=
OperationDefined
;
theStatus
=
OperationDefined
;
...
@@ -193,7 +192,6 @@ NdbOperation::dirtyRead()
...
@@ -193,7 +192,6 @@ NdbOperation::dirtyRead()
int
int
NdbOperation
::
committedRead
()
NdbOperation
::
committedRead
()
{
{
NdbConnection
*
tNdbCon
=
theNdbCon
;
int
tErrorLine
=
theErrorLine
;
int
tErrorLine
=
theErrorLine
;
if
(
theStatus
==
Init
)
{
if
(
theStatus
==
Init
)
{
theStatus
=
OperationDefined
;
theStatus
=
OperationDefined
;
...
...
ndb/src/ndbapi/NdbOperationSearch.cpp
View file @
34532803
...
@@ -319,7 +319,7 @@ NdbOperation::setTupleId()
...
@@ -319,7 +319,7 @@ NdbOperation::setTupleId()
return
0
;
return
0
;
}
}
Uint64
tTupleId
=
theNdb
->
getTupleIdFromNdb
(
m_currentTable
->
m_tableId
);
Uint64
tTupleId
=
theNdb
->
getTupleIdFromNdb
(
m_currentTable
->
m_tableId
);
if
(
tTupleId
==
~
0
){
if
(
tTupleId
==
~
(
Uint64
)
0
){
setErrorCodeAbort
(
theNdb
->
theError
.
code
);
setErrorCodeAbort
(
theNdb
->
theError
.
code
);
return
0
;
return
0
;
}
}
...
...
ndb/src/ndbapi/NdbSchemaOp.cpp
View file @
34532803
...
@@ -29,6 +29,7 @@ Documentation: Handles createTable and createAttribute calls
...
@@ -29,6 +29,7 @@ Documentation: Handles createTable and createAttribute calls
Adjust: 980125 UABMNST First version.
Adjust: 980125 UABMNST First version.
020826 EMIKRON New version for new DICT
020826 EMIKRON New version for new DICT
*****************************************************************************/
*****************************************************************************/
#include <assert.h>
#include "NdbSchemaOp.hpp"
#include "NdbSchemaOp.hpp"
#include "NdbSchemaCon.hpp"
#include "NdbSchemaCon.hpp"
#include "API.hpp"
#include "API.hpp"
...
@@ -139,6 +140,8 @@ NdbSchemaOp::createAttribute( const char* anAttrName,
...
@@ -139,6 +140,8 @@ NdbSchemaOp::createAttribute( const char* anAttrName,
case
String
:
case
String
:
col
.
setType
(
NdbDictionary
::
Column
::
Char
);
col
.
setType
(
NdbDictionary
::
Column
::
Char
);
break
;
break
;
default:
assert
(
0
);
}
}
col
.
setLength
(
anArraySize
);
col
.
setLength
(
anArraySize
);
col
.
setNullable
(
nullable
);
col
.
setNullable
(
nullable
);
...
...
ndb/src/ndbapi/Ndberror.cpp
View file @
34532803
...
@@ -460,6 +460,7 @@ int Nb = sizeof(StatusClassificationMapping)/sizeof(ErrorStatusClassification);
...
@@ -460,6 +460,7 @@ int Nb = sizeof(StatusClassificationMapping)/sizeof(ErrorStatusClassification);
* Complete all fields of an NdbError given the error code
* Complete all fields of an NdbError given the error code
* and details
* and details
*/
*/
#if 0
static
static
void
void
set(NdbError & error, int code, const char * details, ...){
set(NdbError & error, int code, const char * details, ...){
...
@@ -470,6 +471,7 @@ set(NdbError & error, int code, const char * details, ...){
...
@@ -470,6 +471,7 @@ set(NdbError & error, int code, const char * details, ...){
vsnprintf(error.details, sizeof(error.details), details, ap);
vsnprintf(error.details, sizeof(error.details), details, ap);
va_end(ap);
va_end(ap);
}
}
#endif
static
static
void
void
...
...
ndb/src/ndbapi/Ndbinit.cpp
View file @
34532803
...
@@ -55,6 +55,7 @@ Parameters: aDataBase : Name of the database.
...
@@ -55,6 +55,7 @@ Parameters: aDataBase : Name of the database.
Remark: Connect to the database.
Remark: Connect to the database.
***************************************************************************/
***************************************************************************/
Ndb
::
Ndb
(
const
char
*
aDataBase
,
const
char
*
aDataBaseSchema
)
:
Ndb
::
Ndb
(
const
char
*
aDataBase
,
const
char
*
aDataBaseSchema
)
:
theNdbObjectIdMap
(
0
),
thePreparedTransactionsArray
(
NULL
),
thePreparedTransactionsArray
(
NULL
),
theSentTransactionsArray
(
NULL
),
theSentTransactionsArray
(
NULL
),
theCompletedTransactionsArray
(
NULL
),
theCompletedTransactionsArray
(
NULL
),
...
@@ -89,8 +90,7 @@ Ndb::Ndb( const char* aDataBase , const char* aDataBaseSchema) :
...
@@ -89,8 +90,7 @@ Ndb::Ndb( const char* aDataBase , const char* aDataBaseSchema) :
theFirstTransId
(
0
),
theFirstTransId
(
0
),
theRestartGCI
(
0
),
theRestartGCI
(
0
),
theNdbBlockNumber
(
-
1
),
theNdbBlockNumber
(
-
1
),
theInitState
(
NotConstructed
),
theInitState
(
NotConstructed
)
theNdbObjectIdMap
(
0
)
{
{
cgetSignals
=
0
;
cgetSignals
=
0
;
cfreeSignals
=
0
;
cfreeSignals
=
0
;
...
...
ndb/src/newtonapi/dba_binding.cpp
View file @
34532803
...
@@ -367,6 +367,12 @@ matchSize(NdbDictionary::Column::Type t, unsigned b, Size_t s) {
...
@@ -367,6 +367,12 @@ matchSize(NdbDictionary::Column::Type t, unsigned b, Size_t s) {
case
NdbDictionary
:
:
Column
::
Datetime
:
case
NdbDictionary
:
:
Column
::
Datetime
:
case
NdbDictionary
:
:
Column
::
Timespec
:
case
NdbDictionary
:
:
Column
::
Timespec
:
case
NdbDictionary
:
:
Column
::
Blob
:
case
NdbDictionary
:
:
Column
::
Blob
:
case
NdbDictionary
:
:
Column
::
Tinyint
:
case
NdbDictionary
:
:
Column
::
Tinyunsigned
:
case
NdbDictionary
:
:
Column
::
Smallint
:
case
NdbDictionary
:
:
Column
::
Smallunsigned
:
case
NdbDictionary
:
:
Column
::
Mediumint
:
case
NdbDictionary
:
:
Column
::
Mediumunsigned
:
case
NdbDictionary
:
:
Column
::
Undefined
:
case
NdbDictionary
:
:
Column
::
Undefined
:
return
false
;
return
false
;
}
}
...
...
ndb/src/rep/state/RepState.cpp
View file @
34532803
...
@@ -681,7 +681,7 @@ Properties * RepState::query(QueryCounter counter, Uint32 replicationId)
...
@@ -681,7 +681,7 @@ Properties * RepState::query(QueryCounter counter, Uint32 replicationId)
if
(
prop
==
NULL
)
if
(
prop
==
NULL
)
return
NULL
;
return
NULL
;
NdbMutex_Lock
(
m_mutex
);
NdbMutex_Lock
(
m_mutex
);
if
(
counter
!=
(
Uint32
)
-
1
)
if
(
counter
!=
~
(
Uint32
)
0
)
getEpochState
((
Channel
::
Position
)
counter
,
prop
);
getEpochState
((
Channel
::
Position
)
counter
,
prop
);
prop
->
put
(
"no_of_nodegroups"
,
m_channel
.
getNoOfNodeGroups
());
prop
->
put
(
"no_of_nodegroups"
,
m_channel
.
getNoOfNodeGroups
());
prop
->
put
(
"subid"
,
m_channel
.
getNoOfNodeGroups
());
prop
->
put
(
"subid"
,
m_channel
.
getNoOfNodeGroups
());
...
@@ -714,9 +714,13 @@ RepState::getEpochState(Channel::Position pos, Properties * p)
...
@@ -714,9 +714,13 @@ RepState::getEpochState(Channel::Position pos, Properties * p)
*/
*/
pos_first
--
;
pos_first
--
;
pos_last
--
;
pos_last
--
;
first_buf
[
pos_first
]
=
'\0'
;
last_buf
[
pos_last
]
=
'\0'
;
#if 0
sprintf(first_buf+pos_first,"","");
sprintf(first_buf+pos_first,"","");
sprintf(last_buf + pos_last,"","");
sprintf(last_buf + pos_last,"","");
#endif
p
->
put
(
"first"
,
first_buf
);
p
->
put
(
"first"
,
first_buf
);
p
->
put
(
"last"
,
last_buf
);
p
->
put
(
"last"
,
last_buf
);
...
...
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