mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
This commit is contained in:
@@ -35,8 +35,8 @@ if [ -d ../sql ] ; then
|
|||||||
exec_mgmtsrvr=$ndbtop/src/mgmsrv/ndb_mgmd
|
exec_mgmtsrvr=$ndbtop/src/mgmsrv/ndb_mgmd
|
||||||
exec_waiter=$ndbtop/tools/ndb_waiter
|
exec_waiter=$ndbtop/tools/ndb_waiter
|
||||||
exec_test=$ndbtop/tools/ndb_test_platform
|
exec_test=$ndbtop/tools/ndb_test_platform
|
||||||
exec_test_ndberror=
|
|
||||||
exec_test_ndberror=$ndbtop/src/ndbapi/ndberror_check
|
exec_test_ndberror=$ndbtop/src/ndbapi/ndberror_check
|
||||||
|
exec_mgmtclient=$ndbtop/src/mgmclient/ndb_mgm
|
||||||
else
|
else
|
||||||
BINARY_DIST=1
|
BINARY_DIST=1
|
||||||
if test -x "$BASEDIR/libexec/ndbd"
|
if test -x "$BASEDIR/libexec/ndbd"
|
||||||
|
@@ -1008,7 +1008,7 @@ int ha_ndbcluster::get_metadata(const char *path)
|
|||||||
DBUG_ASSERT(m_table == NULL);
|
DBUG_ASSERT(m_table == NULL);
|
||||||
DBUG_ASSERT(m_table_info == NULL);
|
DBUG_ASSERT(m_table_info == NULL);
|
||||||
|
|
||||||
const void *data, *pack_data;
|
const void *data= NULL, *pack_data= NULL;
|
||||||
uint length, pack_length;
|
uint length, pack_length;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -4732,7 +4732,7 @@ int ha_ndbcluster::create(const char *name,
|
|||||||
NDBTAB tab;
|
NDBTAB tab;
|
||||||
NDBCOL col;
|
NDBCOL col;
|
||||||
uint pack_length, length, i, pk_length= 0;
|
uint pack_length, length, i, pk_length= 0;
|
||||||
const void *data, *pack_data;
|
const void *data= NULL, *pack_data= NULL;
|
||||||
bool create_from_engine= (create_info->table_options & HA_OPTION_CREATE_FROM_ENGINE);
|
bool create_from_engine= (create_info->table_options & HA_OPTION_CREATE_FROM_ENGINE);
|
||||||
bool is_truncate= (thd->lex->sql_command == SQLCOM_TRUNCATE);
|
bool is_truncate= (thd->lex->sql_command == SQLCOM_TRUNCATE);
|
||||||
char tablespace[FN_LEN];
|
char tablespace[FN_LEN];
|
||||||
@@ -5065,7 +5065,7 @@ int ha_ndbcluster::create_handler_files(const char *file,
|
|||||||
{
|
{
|
||||||
Ndb* ndb;
|
Ndb* ndb;
|
||||||
const NDBTAB *tab;
|
const NDBTAB *tab;
|
||||||
const void *data, *pack_data;
|
const void *data= NULL, *pack_data= NULL;
|
||||||
uint length, pack_length;
|
uint length, pack_length;
|
||||||
int error= 0;
|
int error= 0;
|
||||||
|
|
||||||
@@ -6108,7 +6108,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db,
|
|||||||
int error= 0;
|
int error= 0;
|
||||||
NdbError ndb_error;
|
NdbError ndb_error;
|
||||||
uint len;
|
uint len;
|
||||||
const void* data;
|
const void* data= NULL;
|
||||||
Ndb* ndb;
|
Ndb* ndb;
|
||||||
char key[FN_REFLEN];
|
char key[FN_REFLEN];
|
||||||
DBUG_ENTER("ndbcluster_discover");
|
DBUG_ENTER("ndbcluster_discover");
|
||||||
@@ -6187,6 +6187,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db,
|
|||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
err:
|
err:
|
||||||
|
my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
|
||||||
if (share)
|
if (share)
|
||||||
{
|
{
|
||||||
/* ndb_share reference temporary free */
|
/* ndb_share reference temporary free */
|
||||||
|
@@ -744,9 +744,9 @@ void getTextEventBufferStatus(QQQQ) {
|
|||||||
"Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
|
"Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
|
||||||
"max=%d%s apply_gci=%lld latest_gci=%lld",
|
"max=%d%s apply_gci=%lld latest_gci=%lld",
|
||||||
used, used_unit,
|
used, used_unit,
|
||||||
theData[2] ? (theData[1]*100)/theData[2] : 0,
|
theData[2] ? (Uint32)((((Uint64)theData[1])*100)/theData[2]) : 0,
|
||||||
alloc, alloc_unit,
|
alloc, alloc_unit,
|
||||||
theData[3] ? (theData[2]*100)/theData[3] : 0,
|
theData[3] ? (Uint32)((((Uint64)theData[2])*100)/theData[3]) : 0,
|
||||||
max_, max_unit,
|
max_, max_unit,
|
||||||
theData[4]+(((Uint64)theData[5])<<32),
|
theData[4]+(((Uint64)theData[5])<<32),
|
||||||
theData[6]+(((Uint64)theData[7])<<32));
|
theData[6]+(((Uint64)theData[7])<<32));
|
||||||
|
@@ -1645,6 +1645,8 @@ private:
|
|||||||
// NR
|
// NR
|
||||||
Uint32 c_dictLockSlavePtrI_nodeRestart; // userPtr for NR
|
Uint32 c_dictLockSlavePtrI_nodeRestart; // userPtr for NR
|
||||||
void recvDictLockConf_nodeRestart(Signal* signal, Uint32 data, Uint32 ret);
|
void recvDictLockConf_nodeRestart(Signal* signal, Uint32 data, Uint32 ret);
|
||||||
|
|
||||||
|
Uint32 c_error_7181_ref;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if (DIH_CDATA_SIZE < _SYSFILE_SIZE32)
|
#if (DIH_CDATA_SIZE < _SYSFILE_SIZE32)
|
||||||
|
@@ -5101,6 +5101,7 @@ void Dbdih::execMASTER_GCPREQ(Signal* signal)
|
|||||||
{
|
{
|
||||||
ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
|
ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
|
||||||
CLEAR_ERROR_INSERT_VALUE;
|
CLEAR_ERROR_INSERT_VALUE;
|
||||||
|
signal->theData[0] = c_error_7181_ref;
|
||||||
signal->theData[1] = coldgcp;
|
signal->theData[1] = coldgcp;
|
||||||
execGCP_TCFINISHED(signal);
|
execGCP_TCFINISHED(signal);
|
||||||
}
|
}
|
||||||
@@ -5176,6 +5177,7 @@ void Dbdih::execMASTER_GCPREQ(Signal* signal)
|
|||||||
{
|
{
|
||||||
ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
|
ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
|
||||||
CLEAR_ERROR_INSERT_VALUE;
|
CLEAR_ERROR_INSERT_VALUE;
|
||||||
|
signal->theData[0] = c_error_7181_ref;
|
||||||
signal->theData[1] = coldgcp;
|
signal->theData[1] = coldgcp;
|
||||||
execGCP_TCFINISHED(signal);
|
execGCP_TCFINISHED(signal);
|
||||||
}
|
}
|
||||||
@@ -8078,6 +8080,7 @@ void Dbdih::execGCP_COMMIT(Signal* signal)
|
|||||||
cgckptflag = false;
|
cgckptflag = false;
|
||||||
emptyverificbuffer(signal, true);
|
emptyverificbuffer(signal, true);
|
||||||
cgcpParticipantState = GCP_PARTICIPANT_COMMIT_RECEIVED;
|
cgcpParticipantState = GCP_PARTICIPANT_COMMIT_RECEIVED;
|
||||||
|
signal->theData[0] = calcDihBlockRef(masterNodeId);
|
||||||
signal->theData[1] = coldgcp;
|
signal->theData[1] = coldgcp;
|
||||||
sendSignal(clocaltcblockref, GSN_GCP_NOMORETRANS, signal, 2, JBB);
|
sendSignal(clocaltcblockref, GSN_GCP_NOMORETRANS, signal, 2, JBB);
|
||||||
return;
|
return;
|
||||||
@@ -8087,11 +8090,13 @@ void Dbdih::execGCP_TCFINISHED(Signal* signal)
|
|||||||
{
|
{
|
||||||
jamEntry();
|
jamEntry();
|
||||||
CRASH_INSERTION(7007);
|
CRASH_INSERTION(7007);
|
||||||
|
Uint32 retRef = signal->theData[0];
|
||||||
Uint32 gci = signal->theData[1];
|
Uint32 gci = signal->theData[1];
|
||||||
ndbrequire(gci == coldgcp);
|
ndbrequire(gci == coldgcp);
|
||||||
|
|
||||||
if (ERROR_INSERTED(7181) || ERROR_INSERTED(7182))
|
if (ERROR_INSERTED(7181) || ERROR_INSERTED(7182))
|
||||||
{
|
{
|
||||||
|
c_error_7181_ref = retRef; // Save ref
|
||||||
ndbout_c("killing %d", refToNode(cmasterdihref));
|
ndbout_c("killing %d", refToNode(cmasterdihref));
|
||||||
signal->theData[0] = 9999;
|
signal->theData[0] = 9999;
|
||||||
sendSignal(numberToRef(CMVMI, refToNode(cmasterdihref)),
|
sendSignal(numberToRef(CMVMI, refToNode(cmasterdihref)),
|
||||||
@@ -8103,7 +8108,7 @@ void Dbdih::execGCP_TCFINISHED(Signal* signal)
|
|||||||
signal->theData[0] = cownNodeId;
|
signal->theData[0] = cownNodeId;
|
||||||
signal->theData[1] = coldgcp;
|
signal->theData[1] = coldgcp;
|
||||||
signal->theData[2] = cfailurenr;
|
signal->theData[2] = cfailurenr;
|
||||||
sendSignal(cmasterdihref, GSN_GCP_NODEFINISH, signal, 3, JBB);
|
sendSignal(retRef, GSN_GCP_NODEFINISH, signal, 3, JBB);
|
||||||
}//Dbdih::execGCP_TCFINISHED()
|
}//Dbdih::execGCP_TCFINISHED()
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@@ -1955,5 +1955,8 @@ private:
|
|||||||
// those variables should be removed and exchanged for stack
|
// those variables should be removed and exchanged for stack
|
||||||
// variable communication.
|
// variable communication.
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
|
Uint32 c_gcp_ref;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6886,6 +6886,7 @@ void Dbtc::timeOutFoundFragLab(Signal* signal, UintR TscanConPtr)
|
|||||||
void Dbtc::execGCP_NOMORETRANS(Signal* signal)
|
void Dbtc::execGCP_NOMORETRANS(Signal* signal)
|
||||||
{
|
{
|
||||||
jamEntry();
|
jamEntry();
|
||||||
|
c_gcp_ref = signal->theData[0];
|
||||||
tcheckGcpId = signal->theData[1];
|
tcheckGcpId = signal->theData[1];
|
||||||
if (cfirstgcp != RNIL) {
|
if (cfirstgcp != RNIL) {
|
||||||
jam();
|
jam();
|
||||||
@@ -9934,6 +9935,7 @@ void Dbtc::sendScanTabConf(Signal* signal, ScanRecordPtr scanPtr) {
|
|||||||
|
|
||||||
void Dbtc::gcpTcfinished(Signal* signal)
|
void Dbtc::gcpTcfinished(Signal* signal)
|
||||||
{
|
{
|
||||||
|
signal->theData[0] = c_gcp_ref;
|
||||||
signal->theData[1] = tcheckGcpId;
|
signal->theData[1] = tcheckGcpId;
|
||||||
sendSignal(cdihblockref, GSN_GCP_TCFINISHED, signal, 2, JBB);
|
sendSignal(cdihblockref, GSN_GCP_TCFINISHED, signal, 2, JBB);
|
||||||
}//Dbtc::gcpTcfinished()
|
}//Dbtc::gcpTcfinished()
|
||||||
|
@@ -2136,6 +2136,8 @@ MgmtSrvr::alloc_node_id_req(NodeId free_node_id, enum ndb_mgm_node_type type)
|
|||||||
{
|
{
|
||||||
do_send = 1;
|
do_send = 1;
|
||||||
nodeId = refToNode(ref->masterRef);
|
nodeId = refToNode(ref->masterRef);
|
||||||
|
if (!theFacade->get_node_alive(nodeId))
|
||||||
|
nodeId = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return ref->errorCode;
|
return ref->errorCode;
|
||||||
@@ -2626,6 +2628,8 @@ MgmtSrvr::startBackup(Uint32& backupId, int waitCompleted)
|
|||||||
ndbout_c("I'm not master resending to %d", nodeId);
|
ndbout_c("I'm not master resending to %d", nodeId);
|
||||||
#endif
|
#endif
|
||||||
do_send = 1; // try again
|
do_send = 1; // try again
|
||||||
|
if (!theFacade->get_node_alive(nodeId))
|
||||||
|
m_master_node = nodeId = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
event.Event = BackupEvent::BackupFailedToStart;
|
event.Event = BackupEvent::BackupFailedToStart;
|
||||||
|
@@ -2101,15 +2101,17 @@ NdbEventBuffer::alloc_mem(EventBufData* data,
|
|||||||
|
|
||||||
NdbMem_Free((char*)data->memory);
|
NdbMem_Free((char*)data->memory);
|
||||||
assert(m_total_alloc >= data->sz);
|
assert(m_total_alloc >= data->sz);
|
||||||
m_total_alloc -= data->sz;
|
|
||||||
data->memory = 0;
|
data->memory = 0;
|
||||||
data->sz = 0;
|
data->sz = 0;
|
||||||
|
|
||||||
data->memory = (Uint32*)NdbMem_Allocate(alloc_size);
|
data->memory = (Uint32*)NdbMem_Allocate(alloc_size);
|
||||||
if (data->memory == 0)
|
if (data->memory == 0)
|
||||||
|
{
|
||||||
|
m_total_alloc -= data->sz;
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
|
}
|
||||||
data->sz = alloc_size;
|
data->sz = alloc_size;
|
||||||
m_total_alloc += data->sz;
|
m_total_alloc += add_sz;
|
||||||
|
|
||||||
if (change_sz != NULL)
|
if (change_sz != NULL)
|
||||||
*change_sz += add_sz;
|
*change_sz += add_sz;
|
||||||
@@ -2781,7 +2783,7 @@ NdbEventBuffer::reportStatus()
|
|||||||
else
|
else
|
||||||
apply_gci= latest_gci;
|
apply_gci= latest_gci;
|
||||||
|
|
||||||
if (100*m_free_data_sz < m_min_free_thresh*m_total_alloc &&
|
if (100*(Uint64)m_free_data_sz < m_min_free_thresh*(Uint64)m_total_alloc &&
|
||||||
m_total_alloc > 1024*1024)
|
m_total_alloc > 1024*1024)
|
||||||
{
|
{
|
||||||
/* report less free buffer than m_free_thresh,
|
/* report less free buffer than m_free_thresh,
|
||||||
@@ -2792,7 +2794,7 @@ NdbEventBuffer::reportStatus()
|
|||||||
goto send_report;
|
goto send_report;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (100*m_free_data_sz > m_max_free_thresh*m_total_alloc &&
|
if (100*(Uint64)m_free_data_sz > m_max_free_thresh*(Uint64)m_total_alloc &&
|
||||||
m_total_alloc > 1024*1024)
|
m_total_alloc > 1024*1024)
|
||||||
{
|
{
|
||||||
/* report more free than 2 * m_free_thresh
|
/* report more free than 2 * m_free_thresh
|
||||||
|
Reference in New Issue
Block a user