#At file:///Users/mz/mysql/ndb-7.1/ based on revid:bocklin@stripped
4098 Martin Zaun 2011-02-21 [merge]
merge from ndb-7.0 to ndb-7.1
modified:
storage/ndb/include/util/NdbTypesUtil.hpp
storage/ndb/test/ndbapi/testDict.cpp
storage/ndb/test/ndbapi/testNdbApi.cpp
storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/test/ndbapi/test_event.cpp
=== modified file 'storage/ndb/include/util/NdbTypesUtil.hpp'
--- a/storage/ndb/include/util/NdbTypesUtil.hpp 2011-02-19 02:47:10 +0000
+++ b/storage/ndb/include/util/NdbTypesUtil.hpp 2011-02-21 17:39:23 +0000
@@ -435,13 +435,11 @@ NDB_SPECIALIZE_NUM_TYPE_HELPER(Huint64,
// specialize the Helper template members for non-standard numeric types
#define NDB_SPECIALIZE_NON_STD_NUM_TYPE_HELPER( H, T, INT3KORR ) \
template<> inline void H::load(T * t, const char * s) { \
- assert(t); assert(s); \
- assert(t > (const T *)s); \
+ assert(t); assert(s); assert(t != (const T *)s); \
*t = (INT3KORR(s)); \
} \
template<> inline void H::store(char * t, const T * s) { \
- assert(t); assert(s); \
- assert(((T *)t > s) || ((T *)t < s)); \
+ assert(t); assert(s); assert((const T *)t != s); \
int3store(t, (*s)); \
}
=== modified file 'storage/ndb/test/ndbapi/testDict.cpp'
--- a/storage/ndb/test/ndbapi/testDict.cpp 2011-01-30 20:56:00 +0000
+++ b/storage/ndb/test/ndbapi/testDict.cpp 2011-02-21 15:08:51 +0000
@@ -7186,7 +7186,8 @@ runFailAddPartition(NDBT_Context* ctx, N
const NdbDictionary::Table * org = pDic->getTable(tab.getName());
NdbDictionary::Table altered = * org;
- altered.setFragmentCount(org->getFragmentCount() + 2);
+ altered.setFragmentCount(org->getFragmentCount() +
+ restarter.getNumDbNodes());
if (pDic->beginSchemaTrans())
{
=== modified file 'storage/ndb/test/ndbapi/testNdbApi.cpp'
--- a/storage/ndb/test/ndbapi/testNdbApi.cpp 2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/ndbapi/testNdbApi.cpp 2011-02-21 14:27:16 +0000
@@ -3605,14 +3605,16 @@ int runFragmentedScanOtherApi(NDBT_Conte
* on timing
*/
if ((execError != 0) &&
- (execError != 874))
+ (execError != 874) &&
+ (execError != 4002))
{
+ ndbout_c("%u incorrect error code: %u", __LINE__, execError);
ERR(trans->getNdbError());
trans->close();
delete[] buff;
return NDBT_FAILED;
}
-
+
/* nextResult will always fail */
CHECK(-1 == scan->nextResult());
@@ -3632,6 +3634,7 @@ int runFragmentedScanOtherApi(NDBT_Conte
}
else
{
+ ndbout_c("%u incorrect error code: %u", __LINE__, execError);
ERR(scan->getNdbError());
trans->close();
delete[] buff;
=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp 2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp 2011-02-21 13:17:16 +0000
@@ -4062,11 +4062,22 @@ runForceStopAndRestart(NDBT_Context* ctx
}
}
+ printf("group1: ");
+ for (size_t i = 0; i<group1.size(); i++)
+ printf("%d ", group1[i]);
+ printf("\n");
+
+ printf("group2: ");
+ for (size_t i = 0; i<group2.size(); i++)
+ printf("%d ", group2[i]);
+ printf("\n");
+
// Stop half of the cluster
res.restartNodes(group1.getBase(), (int)group1.size(),
- NdbRestarter::NRRF_NOSTART);
+ NdbRestarter::NRRF_NOSTART | NdbRestarter::NRRF_ABORT);
res.waitNodesNoStart(group1.getBase(), (int)group1.size());
+ ndbout_c("%u", __LINE__);
// Try to stop first node in second half without force, should return error
if (res.restartOneDbNode(group2[0],
false, /* initial */
@@ -4074,10 +4085,13 @@ runForceStopAndRestart(NDBT_Context* ctx
false, /* abort */
false /* force */) != -1)
{
+ ndbout_c("%u", __LINE__);
g_err << "Restart suceeded without force" << endl;
return NDBT_FAILED;
}
+ ndbout_c("%u", __LINE__);
+
// Now stop with force
if (res.restartOneDbNode(group2[0],
false, /* initial */
@@ -4085,18 +4099,25 @@ runForceStopAndRestart(NDBT_Context* ctx
false, /* abort */
true /* force */) != 0)
{
+ ndbout_c("%u", __LINE__);
g_err << "Could not restart with force" << endl;
return NDBT_FAILED;
}
+ ndbout_c("%u", __LINE__);
+
// All nodes should now be in nostart, the above stop force
// cvaused the remainig nodes to be stopped(and restarted nostart)
res.waitClusterNoStart();
+ ndbout_c("%u", __LINE__);
+
// Start second half back up again
res.startNodes(group2.getBase(), (int)group2.size());
res.waitNodesStarted(group2.getBase(), (int)group2.size());
+ ndbout_c("%u", __LINE__);
+
// Try to stop remaining half without force, should return error
if (res.restartNodes(group2.getBase(), (int)group2.size(),
NdbRestarter::NRRF_NOSTART) != -1)
@@ -4105,6 +4126,8 @@ runForceStopAndRestart(NDBT_Context* ctx
return NDBT_FAILED;
}
+ ndbout_c("%u", __LINE__);
+
// Now stop with force
if (res.restartNodes(group2.getBase(), (int)group2.size(),
NdbRestarter::NRRF_NOSTART |
@@ -4113,6 +4136,9 @@ runForceStopAndRestart(NDBT_Context* ctx
g_err << "Could not restart with force" << endl;
return NDBT_FAILED;
}
+
+ ndbout_c("%u", __LINE__);
+
if (res.waitNodesNoStart(group2.getBase(), (int)group2.size()))
{
g_err << "Failed to waitNodesNoStart" << endl;
=== modified file 'storage/ndb/test/ndbapi/test_event.cpp'
--- a/storage/ndb/test/ndbapi/test_event.cpp 2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/ndbapi/test_event.cpp 2011-02-21 14:10:20 +0000
@@ -3351,14 +3351,15 @@ runBug57886_subscribe_unsunscribe(NDBT_C
{
Ndb* pNdb;
Ndb_cluster_connection *pCC;
+
+ NdbDictionary::Table tab = * ctx->getTab();
+
if (cc(&pCC, &pNdb))
{
// too few api slots...
return NDBT_OK;
}
- NdbDictionary::Table tab = * ctx->getTab();
-
while (!ctx->isTestStopped())
{
createEvent(pNdb, tab, false, false);
Attachment: [text/bzr-bundle] bzr/martin.zaun@oracle.com-20110221174135-d002uq1koja3tjqy.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:4098) | Martin Zaun | 21 Feb |