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
1cf57350
Commit
1cf57350
authored
May 18, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
parents
1aec91bd
85b607cc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
19 deletions
+85
-19
storage/ndb/src/common/transporter/Packer.cpp
storage/ndb/src/common/transporter/Packer.cpp
+5
-0
storage/ndb/src/common/transporter/TCP_Transporter.hpp
storage/ndb/src/common/transporter/TCP_Transporter.hpp
+4
-0
storage/ndb/src/common/transporter/TransporterRegistry.cpp
storage/ndb/src/common/transporter/TransporterRegistry.cpp
+21
-19
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+17
-0
storage/ndb/test/ndbapi/testNdbApi.cpp
storage/ndb/test/ndbapi/testNdbApi.cpp
+34
-0
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
storage/ndb/src/common/transporter/Packer.cpp
View file @
1cf57350
...
@@ -20,7 +20,12 @@
...
@@ -20,7 +20,12 @@
#include <TransporterCallback.hpp>
#include <TransporterCallback.hpp>
#include <RefConvert.hpp>
#include <RefConvert.hpp>
#ifdef ERROR_INSERT
Uint32
MAX_RECEIVED_SIGNALS
=
1024
;
#else
#define MAX_RECEIVED_SIGNALS 1024
#define MAX_RECEIVED_SIGNALS 1024
#endif
Uint32
Uint32
TransporterRegistry
::
unpack
(
Uint32
*
readPtr
,
TransporterRegistry
::
unpack
(
Uint32
*
readPtr
,
Uint32
sizeOfData
,
Uint32
sizeOfData
,
...
...
storage/ndb/src/common/transporter/TCP_Transporter.hpp
View file @
1cf57350
...
@@ -101,6 +101,10 @@ private:
...
@@ -101,6 +101,10 @@ private:
virtual
void
updateReceiveDataPtr
(
Uint32
bytesRead
);
virtual
void
updateReceiveDataPtr
(
Uint32
bytesRead
);
virtual
Uint32
get_free_buffer
()
const
;
virtual
Uint32
get_free_buffer
()
const
;
inline
bool
hasReceiveData
()
const
{
return
receiveBuffer
.
sizeOfData
>
0
;
}
protected:
protected:
/**
/**
* Setup client/server and perform connect/accept
* Setup client/server and perform connect/accept
...
...
storage/ndb/src/common/transporter/TransporterRegistry.cpp
View file @
1cf57350
...
@@ -738,6 +738,7 @@ TransporterRegistry::poll_SHM(Uint32 timeOutMillis)
...
@@ -738,6 +738,7 @@ TransporterRegistry::poll_SHM(Uint32 timeOutMillis)
Uint32
Uint32
TransporterRegistry
::
poll_TCP
(
Uint32
timeOutMillis
)
TransporterRegistry
::
poll_TCP
(
Uint32
timeOutMillis
)
{
{
bool
hasdata
=
false
;
if
(
false
&&
nTCPTransporters
==
0
)
if
(
false
&&
nTCPTransporters
==
0
)
{
{
tcpReadSelectReply
=
0
;
tcpReadSelectReply
=
0
;
...
@@ -770,6 +771,7 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
...
@@ -770,6 +771,7 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
// Put the connected transporters in the socket read-set
// Put the connected transporters in the socket read-set
FD_SET
(
socket
,
&
tcpReadset
);
FD_SET
(
socket
,
&
tcpReadset
);
}
}
hasdata
|=
t
->
hasReceiveData
();
}
}
// The highest socket value plus one
// The highest socket value plus one
...
@@ -786,7 +788,7 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
...
@@ -786,7 +788,7 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
}
}
#endif
#endif
return
tcpReadSelectReply
;
return
tcpReadSelectReply
||
hasdata
;
}
}
#endif
#endif
...
@@ -795,8 +797,6 @@ void
...
@@ -795,8 +797,6 @@ void
TransporterRegistry
::
performReceive
()
TransporterRegistry
::
performReceive
()
{
{
#ifdef NDB_TCP_TRANSPORTER
#ifdef NDB_TCP_TRANSPORTER
if
(
tcpReadSelectReply
>
0
)
{
for
(
int
i
=
0
;
i
<
nTCPTransporters
;
i
++
)
for
(
int
i
=
0
;
i
<
nTCPTransporters
;
i
++
)
{
{
checkJobBuffer
();
checkJobBuffer
();
...
@@ -804,21 +804,23 @@ TransporterRegistry::performReceive()
...
@@ -804,21 +804,23 @@ TransporterRegistry::performReceive()
const
NodeId
nodeId
=
t
->
getRemoteNodeId
();
const
NodeId
nodeId
=
t
->
getRemoteNodeId
();
const
NDB_SOCKET_TYPE
socket
=
t
->
getSocket
();
const
NDB_SOCKET_TYPE
socket
=
t
->
getSocket
();
if
(
is_connected
(
nodeId
)){
if
(
is_connected
(
nodeId
)){
if
(
t
->
isConnected
()
&&
FD_ISSET
(
socket
,
&
tcpReadset
))
if
(
t
->
isConnected
())
{
{
const
int
receiveSize
=
t
->
doReceive
();
if
(
FD_ISSET
(
socket
,
&
tcpReadset
))
if
(
receiveSize
>
0
)
{
t
->
doReceive
();
}
if
(
t
->
hasReceiveData
())
{
{
Uint32
*
ptr
;
Uint32
*
ptr
;
Uint32
sz
=
t
->
getReceiveData
(
&
ptr
);
Uint32
sz
=
t
->
getReceiveData
(
&
ptr
);
transporter_recv_from
(
callbackObj
,
nodeId
);
Uint32
szUsed
=
unpack
(
ptr
,
sz
,
nodeId
,
ioStates
[
nodeId
]);
Uint32
szUsed
=
unpack
(
ptr
,
sz
,
nodeId
,
ioStates
[
nodeId
]);
t
->
updateReceiveDataPtr
(
szUsed
);
t
->
updateReceiveDataPtr
(
szUsed
);
}
}
}
}
}
}
}
}
}
#endif
#endif
#ifdef NDB_SCI_TRANSPORTER
#ifdef NDB_SCI_TRANSPORTER
...
...
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
View file @
1cf57350
...
@@ -137,6 +137,7 @@ Cmvmi::~Cmvmi()
...
@@ -137,6 +137,7 @@ Cmvmi::~Cmvmi()
#ifdef ERROR_INSERT
#ifdef ERROR_INSERT
NodeBitmask
c_error_9000_nodes_mask
;
NodeBitmask
c_error_9000_nodes_mask
;
extern
Uint32
MAX_RECEIVED_SIGNALS
;
#endif
#endif
void
Cmvmi
::
execNDB_TAMPER
(
Signal
*
signal
)
void
Cmvmi
::
execNDB_TAMPER
(
Signal
*
signal
)
...
@@ -166,6 +167,22 @@ void Cmvmi::execNDB_TAMPER(Signal* signal)
...
@@ -166,6 +167,22 @@ void Cmvmi::execNDB_TAMPER(Signal* signal)
kill
(
getpid
(),
SIGABRT
);
kill
(
getpid
(),
SIGABRT
);
}
}
#endif
#endif
#ifdef ERROR_INSERT
if
(
signal
->
theData
[
0
]
==
9003
)
{
if
(
MAX_RECEIVED_SIGNALS
<
1024
)
{
MAX_RECEIVED_SIGNALS
=
1024
;
}
else
{
MAX_RECEIVED_SIGNALS
=
rand
()
%
128
;
}
ndbout_c
(
"MAX_RECEIVED_SIGNALS: %d"
,
MAX_RECEIVED_SIGNALS
);
CLEAR_ERROR_INSERT_VALUE
;
}
#endif
}
//execNDB_TAMPER()
}
//execNDB_TAMPER()
void
Cmvmi
::
execSET_LOGLEVELORD
(
Signal
*
signal
)
void
Cmvmi
::
execSET_LOGLEVELORD
(
Signal
*
signal
)
...
...
storage/ndb/test/ndbapi/testNdbApi.cpp
View file @
1cf57350
...
@@ -1321,6 +1321,36 @@ int runTestExecuteAsynch(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -1321,6 +1321,36 @@ int runTestExecuteAsynch(NDBT_Context* ctx, NDBT_Step* step){
template
class
Vector
<
NdbScanOperation
*
>;
template
class
Vector
<
NdbScanOperation
*
>;
int
runBug28443
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
result
=
NDBT_OK
;
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
restarter
;
restarter
.
insertErrorInAllNodes
(
9003
);
for
(
Uint32
i
=
0
;
i
<
ctx
->
getNumLoops
();
i
++
)
{
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
if
(
hugoTrans
.
loadTable
(
GETNDB
(
step
),
records
,
2048
)
!=
0
)
{
result
=
NDBT_FAILED
;
goto
done
;
}
if
(
runClearTable
(
ctx
,
step
)
!=
0
)
{
result
=
NDBT_FAILED
;
goto
done
;
}
}
done:
restarter
.
insertErrorInAllNodes
(
9003
);
return
result
;
}
NDBT_TESTSUITE
(
testNdbApi
);
NDBT_TESTSUITE
(
testNdbApi
);
TESTCASE
(
"MaxNdb"
,
TESTCASE
(
"MaxNdb"
,
...
@@ -1416,6 +1446,10 @@ TESTCASE("ExecuteAsynch",
...
@@ -1416,6 +1446,10 @@ TESTCASE("ExecuteAsynch",
"Check that executeAsync() works (BUG#27495)
\n
"
){
"Check that executeAsync() works (BUG#27495)
\n
"
){
INITIALIZER
(
runTestExecuteAsynch
);
INITIALIZER
(
runTestExecuteAsynch
);
}
}
TESTCASE
(
"Bug28443"
,
""
){
INITIALIZER
(
runBug28443
);
}
NDBT_TESTSUITE_END
(
testNdbApi
);
NDBT_TESTSUITE_END
(
testNdbApi
);
int
main
(
int
argc
,
const
char
**
argv
){
int
main
(
int
argc
,
const
char
**
argv
){
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
1cf57350
...
@@ -684,6 +684,10 @@ max-time: 500
...
@@ -684,6 +684,10 @@ max-time: 500
cmd: testNdbApi
cmd: testNdbApi
args: -n ExecuteAsynch T1
args: -n ExecuteAsynch T1
max-time: 1000
cmd: testNdbApi
args: -n BugBug28443
#max-time: 500
#max-time: 500
#cmd: testInterpreter
#cmd: testInterpreter
#args: T1
#args: T1
...
...
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