[This commit e-mail is a repeat.]
#At file:///home/frazer/bzr/mysql-5.1-telco-7.0/ based on
revid:magnus.blaudd@stripped
4404 Frazer Clement 2011-05-23
Fix testRestartGci
modified:
storage/ndb/test/ndbapi/testRestartGci.cpp
=== modified file 'storage/ndb/test/ndbapi/testRestartGci.cpp'
--- a/storage/ndb/test/ndbapi/testRestartGci.cpp 2011-05-18 05:25:47 +0000
+++ b/storage/ndb/test/ndbapi/testRestartGci.cpp 2011-05-23 16:13:34 +0000
@@ -63,9 +63,9 @@ maybeExtraBits(Ndb* ndb, NdbDictionary::
return 0;
}
- bool useExtendedBits = ((rand() % 5) != 0);
- Uint32 numGciBits= rand() % 32; /* 0 -> 31 */
- Uint32 numAuthorBits = rand() % 32; /* 0 -> 31 */
+ bool useExtendedBits = ((ndb_rand() % 5) != 0);
+ Uint32 numGciBits= ndb_rand() % 32; /* 0 -> 31 */
+ Uint32 numAuthorBits = ndb_rand() % 32; /* 0 -> 31 */
if (useExtendedBits && (numGciBits || numAuthorBits))
{
@@ -136,7 +136,7 @@ int runInsertRememberGci(NDBT_Context* c
Uint32 authorVal = 0;
if (ctx->getTab()->getExtraRowAuthorBits() > 0)
{
- authorVal = (rand() & authorMask);
+ authorVal = (ndb_rand() & authorMask);
/* Pain here due to need to use NdbRecord */
char rowBuff[NDB_MAX_TUPLE_SIZE];
const NdbDictionary::Table* tab = ctx->getTab();
@@ -378,7 +378,7 @@ int runVerifyInserts(NDBT_Context* ctx,
ndbout << "ERR: Record "<<i<<" should not have existed" << endl;
result = NDBT_FAILED;
}
- bool expectRounding = (expectedRecordGci && 0xffffffff) >=
firstSaturatedValue;
+ bool expectRounding = (expectedRecordGci & 0xffffffff) >=
firstSaturatedValue;
Uint64 expectedRoundedGci = (expectedRecordGci | 0xffffffff);
Uint64 readGci = rowGci->u_64_value();
Uint64 expectedRead = (expectRounding)?expectedRoundedGci :
Attachment: [text/bzr-bundle] bzr/frazer.clement@oracle.com-20110523161334-38gbt7egzixhm7ln.bundle
| Thread |
|---|
| • [Resend] bzr commit into mysql-5.1-telco-7.0 branch (frazer.clement:4404) | Frazer Clement | 23 May |