mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into perch.ndb.mysql.com:/home/jonas/src/50-work ndb/src/common/transporter/Packer.cpp: Auto merged ndb/src/common/transporter/TCP_Transporter.hpp: Auto merged ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged ndb/src/common/transporter/TransporterRegistry.cpp: merge ndb/test/ndbapi/testNdbApi.cpp: merge ndb/test/run-test/daily-basic-tests.txt: merge
This commit is contained in:
@@ -21,7 +21,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,
|
||||||
|
@@ -102,6 +102,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
|
||||||
|
@@ -842,6 +842,7 @@ TransporterRegistry::poll_OSE(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;
|
||||||
@@ -886,6 +887,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
|
||||||
@@ -902,7 +904,7 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return tcpReadSelectReply;
|
return tcpReadSelectReply || hasdata;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -938,26 +940,26 @@ TransporterRegistry::performReceive()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#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();
|
||||||
{
|
TCP_Transporter *t = theTCPTransporters[i];
|
||||||
checkJobBuffer();
|
const NodeId nodeId = t->getRemoteNodeId();
|
||||||
TCP_Transporter *t = theTCPTransporters[i];
|
const NDB_SOCKET_TYPE socket = t->getSocket();
|
||||||
const NodeId nodeId = t->getRemoteNodeId();
|
if(is_connected(nodeId)){
|
||||||
const NDB_SOCKET_TYPE socket = t->getSocket();
|
if(t->isConnected())
|
||||||
if(is_connected(nodeId)){
|
{
|
||||||
if(t->isConnected() && FD_ISSET(socket, &tcpReadset))
|
if (FD_ISSET(socket, &tcpReadset))
|
||||||
{
|
{
|
||||||
const int receiveSize = t->doReceive();
|
t->doReceive();
|
||||||
if(receiveSize > 0)
|
}
|
||||||
{
|
|
||||||
Uint32 * ptr;
|
if (t->hasReceiveData())
|
||||||
Uint32 sz = t->getReceiveData(&ptr);
|
{
|
||||||
transporter_recv_from(callbackObj, nodeId);
|
Uint32 * ptr;
|
||||||
Uint32 szUsed = unpack(ptr, sz, nodeId, ioStates[nodeId]);
|
Uint32 sz = t->getReceiveData(&ptr);
|
||||||
t->updateReceiveDataPtr(szUsed);
|
Uint32 szUsed = unpack(ptr, sz, nodeId, ioStates[nodeId]);
|
||||||
}
|
t->updateReceiveDataPtr(szUsed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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)
|
|||||||
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)
|
||||||
|
@@ -1237,6 +1237,36 @@ int runScan_4006(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",
|
||||||
@@ -1323,6 +1353,10 @@ TESTCASE("Scan_4006",
|
|||||||
INITIALIZER(runScan_4006);
|
INITIALIZER(runScan_4006);
|
||||||
FINALIZER(runClearTable);
|
FINALIZER(runClearTable);
|
||||||
}
|
}
|
||||||
|
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){
|
||||||
|
@@ -625,6 +625,10 @@ max-time: 500
|
|||||||
cmd: testNdbApi
|
cmd: testNdbApi
|
||||||
args: -n Scan_4006 T1
|
args: -n Scan_4006 T1
|
||||||
|
|
||||||
|
max-time: 1000
|
||||||
|
cmd: testNdbApi
|
||||||
|
args: -n BugBug28443
|
||||||
|
|
||||||
#max-time: 500
|
#max-time: 500
|
||||||
#cmd: testInterpreter
|
#cmd: testInterpreter
|
||||||
#args: T1
|
#args: T1
|
||||||
|
Reference in New Issue
Block a user