mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Compile fixes for irix
This commit is contained in:
parent
ec9cd4ecc9
commit
ebe79c0b9b
15 changed files with 171 additions and 162 deletions
|
@ -488,14 +488,14 @@ template <unsigned size>
|
|||
inline void
|
||||
BitmaskPOD<size>::assign(const typename BitmaskPOD<size>::Data & src)
|
||||
{
|
||||
assign(rep.data, src.data);
|
||||
BitmaskPOD<size>::assign(rep.data, src.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
inline void
|
||||
BitmaskPOD<size>::assign(const BitmaskPOD<size> & src)
|
||||
{
|
||||
assign(rep.data, src.rep.data);
|
||||
BitmaskPOD<size>::assign(rep.data, src.rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -523,7 +523,7 @@ template <unsigned size>
|
|||
inline bool
|
||||
BitmaskPOD<size>::get(unsigned n) const
|
||||
{
|
||||
return get(rep.data, n);
|
||||
return BitmaskPOD<size>::get(rep.data, n);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -537,7 +537,7 @@ template <unsigned size>
|
|||
inline void
|
||||
BitmaskPOD<size>::set(unsigned n, bool value)
|
||||
{
|
||||
set(rep.data, n, value);
|
||||
BitmaskPOD<size>::set(rep.data, n, value);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -551,7 +551,7 @@ template <unsigned size>
|
|||
inline void
|
||||
BitmaskPOD<size>::set(unsigned n)
|
||||
{
|
||||
set(rep.data, n);
|
||||
BitmaskPOD<size>::set(rep.data, n);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -565,7 +565,7 @@ template <unsigned size>
|
|||
inline void
|
||||
BitmaskPOD<size>::set()
|
||||
{
|
||||
set(rep.data);
|
||||
BitmaskPOD<size>::set(rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -579,7 +579,7 @@ template <unsigned size>
|
|||
inline void
|
||||
BitmaskPOD<size>::clear(unsigned n)
|
||||
{
|
||||
clear(rep.data, n);
|
||||
BitmaskPOD<size>::clear(rep.data, n);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -593,7 +593,7 @@ template <unsigned size>
|
|||
inline void
|
||||
BitmaskPOD<size>::clear()
|
||||
{
|
||||
clear(rep.data);
|
||||
BitmaskPOD<size>::clear(rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -607,7 +607,7 @@ template <unsigned size>
|
|||
inline bool
|
||||
BitmaskPOD<size>::isclear() const
|
||||
{
|
||||
return isclear(rep.data);
|
||||
return BitmaskPOD<size>::isclear(rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -621,7 +621,7 @@ template <unsigned size>
|
|||
inline unsigned
|
||||
BitmaskPOD<size>::count() const
|
||||
{
|
||||
return count(rep.data);
|
||||
return BitmaskPOD<size>::count(rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -635,7 +635,7 @@ template <unsigned size>
|
|||
inline unsigned
|
||||
BitmaskPOD<size>::find(unsigned n) const
|
||||
{
|
||||
return find(rep.data, n);
|
||||
return BitmaskPOD<size>::find(rep.data, n);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -649,7 +649,7 @@ template <unsigned size>
|
|||
inline bool
|
||||
BitmaskPOD<size>::equal(const BitmaskPOD<size>& mask2) const
|
||||
{
|
||||
return equal(rep.data, mask2.rep.data);
|
||||
return BitmaskPOD<size>::equal(rep.data, mask2.rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -663,7 +663,7 @@ template <unsigned size>
|
|||
inline BitmaskPOD<size>&
|
||||
BitmaskPOD<size>::bitOR(const BitmaskPOD<size>& mask2)
|
||||
{
|
||||
bitOR(rep.data, mask2.rep.data);
|
||||
BitmaskPOD<size>::bitOR(rep.data, mask2.rep.data);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -678,7 +678,7 @@ template <unsigned size>
|
|||
inline BitmaskPOD<size>&
|
||||
BitmaskPOD<size>::bitAND(const BitmaskPOD<size>& mask2)
|
||||
{
|
||||
bitAND(rep.data, mask2.rep.data);
|
||||
BitmaskPOD<size>::bitAND(rep.data, mask2.rep.data);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -693,7 +693,7 @@ template <unsigned size>
|
|||
inline BitmaskPOD<size>&
|
||||
BitmaskPOD<size>::bitANDC(const BitmaskPOD<size>& mask2)
|
||||
{
|
||||
bitANDC(rep.data, mask2.rep.data);
|
||||
BitmaskPOD<size>::bitANDC(rep.data, mask2.rep.data);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -708,7 +708,7 @@ template <unsigned size>
|
|||
inline BitmaskPOD<size>&
|
||||
BitmaskPOD<size>::bitXOR(const BitmaskPOD<size>& mask2)
|
||||
{
|
||||
bitXOR(rep.data, mask2.rep.data);
|
||||
BitmaskPOD<size>::bitXOR(rep.data, mask2.rep.data);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -723,7 +723,7 @@ template <unsigned size>
|
|||
inline char *
|
||||
BitmaskPOD<size>::getText(char* buf) const
|
||||
{
|
||||
return getText(rep.data, buf);
|
||||
return BitmaskPOD<size>::getText(rep.data, buf);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -737,7 +737,7 @@ template <unsigned size>
|
|||
inline bool
|
||||
BitmaskPOD<size>::contains(BitmaskPOD<size> that)
|
||||
{
|
||||
return contains(this->rep.data, that.rep.data);
|
||||
return BitmaskPOD<size>::contains(this->rep.data, that.rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
@ -751,7 +751,7 @@ template <unsigned size>
|
|||
inline bool
|
||||
BitmaskPOD<size>::overlaps(BitmaskPOD<size> that)
|
||||
{
|
||||
return overlaps(this->rep.data, that.rep.data);
|
||||
return BitmaskPOD<size>::overlaps(this->rep.data, that.rep.data);
|
||||
}
|
||||
|
||||
template <unsigned size>
|
||||
|
|
|
@ -261,4 +261,6 @@ const unsigned short NO_OF_PRINT_FUNCTIONS = sizeof(SignalDataPrintFunctions)/si
|
|||
template class Bitmask<1>;
|
||||
template class Bitmask<2>;
|
||||
template class Bitmask<4>;
|
||||
|
||||
template struct BitmaskPOD<1>;
|
||||
template struct BitmaskPOD<2>;
|
||||
template struct BitmaskPOD<4>;
|
||||
|
|
|
@ -2822,6 +2822,7 @@ NdbDictInterface::execLIST_TABLES_CONF(NdbApiSignal* signal,
|
|||
}
|
||||
}
|
||||
|
||||
template class Vector<int>;
|
||||
template class Vector<Uint32>;
|
||||
template class Vector<Vector<Uint32> >;
|
||||
template class Vector<NdbTableImpl*>;
|
||||
|
|
|
@ -146,7 +146,7 @@ tellThreads(StartType what)
|
|||
NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
|
||||
{
|
||||
ThreadNdb* pThreadData;
|
||||
int tLoops=0;
|
||||
int tLoops=0, i;
|
||||
int returnValue = NDBT_OK;
|
||||
|
||||
flexAsynchErrorData = new ErrorData;
|
||||
|
@ -256,7 +256,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
|
|||
PRINT_TIMER("insert", noOfTransacts, tNoOfOpsPerTrans);
|
||||
|
||||
if (0 < failed) {
|
||||
int i = retry_opt ;
|
||||
i = retry_opt ;
|
||||
int ci = 1 ;
|
||||
while (0 < failed && 0 < i){
|
||||
ndbout << failed << " of the transactions returned errors!"
|
||||
|
@ -293,7 +293,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
|
|||
PRINT_TIMER("read", noOfTransacts, tNoOfOpsPerTrans);
|
||||
|
||||
if (0 < failed) {
|
||||
int i = retry_opt ;
|
||||
i = retry_opt ;
|
||||
int cr = 1;
|
||||
while (0 < failed && 0 < i){
|
||||
ndbout << failed << " of the transactions returned errors!"<<endl ;
|
||||
|
@ -330,7 +330,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
|
|||
PRINT_TIMER("update", noOfTransacts, tNoOfOpsPerTrans) ;
|
||||
|
||||
if (0 < failed) {
|
||||
int i = retry_opt ;
|
||||
i = retry_opt ;
|
||||
int cu = 1 ;
|
||||
while (0 < failed && 0 < i){
|
||||
ndbout << failed << " of the transactions returned errors!"<<endl ;
|
||||
|
@ -366,7 +366,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
|
|||
PRINT_TIMER("read", noOfTransacts, tNoOfOpsPerTrans);
|
||||
|
||||
if (0 < failed) {
|
||||
int i = retry_opt ;
|
||||
i = retry_opt ;
|
||||
int cr2 = 1 ;
|
||||
while (0 < failed && 0 < i){
|
||||
ndbout << failed << " of the transactions returned errors!"<<endl ;
|
||||
|
@ -403,7 +403,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
|
|||
PRINT_TIMER("delete", noOfTransacts, tNoOfOpsPerTrans);
|
||||
|
||||
if (0 < failed) {
|
||||
int i = retry_opt ;
|
||||
i = retry_opt ;
|
||||
int cd = 1 ;
|
||||
while (0 < failed && 0 < i){
|
||||
ndbout << failed << " of the transactions returned errors!"<< endl ;
|
||||
|
@ -438,7 +438,7 @@ NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
|
|||
|
||||
execute(stStop);
|
||||
void * tmp;
|
||||
for(int i = 0; i<tNoOfThreads; i++){
|
||||
for(i = 0; i<tNoOfThreads; i++){
|
||||
NdbThread_WaitFor(threadLife[i], &tmp);
|
||||
NdbThread_Destroy(&threadLife[i]);
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ tellThreads(ThreadData* pt, StartType what)
|
|||
NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
|
||||
{
|
||||
ThreadData* pThreadsData;
|
||||
int tLoops = 0;
|
||||
int tLoops = 0, i;
|
||||
int returnValue = NDBT_OK;
|
||||
|
||||
if (readArguments(argc, argv) != 0){
|
||||
|
@ -355,7 +355,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
|
|||
****************************************************************/
|
||||
resetThreads(pThreadsData);
|
||||
|
||||
for (unsigned int i = 0; i < tNoOfThreads; i++){
|
||||
for (i = 0; i < tNoOfThreads; i++){
|
||||
pThreadsData[i].threadNo = i;
|
||||
pThreadsData[i].threadLife = NdbThread_Create(flexBenchThread,
|
||||
(void**)&pThreadsData[i],
|
||||
|
@ -531,7 +531,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
|
|||
waitForThreads(pThreadsData);
|
||||
|
||||
void * tmp;
|
||||
for(Uint32 i = 0; i<tNoOfThreads; i++){
|
||||
for(i = 0; i<tNoOfThreads; i++){
|
||||
NdbThread_WaitFor(pThreadsData[i].threadLife, &tmp);
|
||||
NdbThread_Destroy(&pThreadsData[i].threadLife);
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
|
|||
if (useLongKeys == true) {
|
||||
// Only free these areas if they have been allocated
|
||||
// Otherwise cores will happen
|
||||
for (Uint32 i = 0; i < tNoOfLongPK; i++)
|
||||
for (i = 0; i < tNoOfLongPK; i++)
|
||||
free(longKeyAttrName[i]);
|
||||
free(longKeyAttrName);
|
||||
} // if
|
||||
|
@ -629,9 +629,10 @@ static void* flexBenchThread(void* pArg)
|
|||
if(useLongKeys){
|
||||
// Allocate and populate the longkey array.
|
||||
longKeyAttrValue = (unsigned ***) malloc(sizeof(unsigned**) * tNoOfOperations );
|
||||
for (Uint32 n = 0; n < tNoOfOperations; n++)
|
||||
Uint32 n;
|
||||
for (n = 0; n < tNoOfOperations; n++)
|
||||
longKeyAttrValue[n] = (unsigned **) malloc(sizeof(unsigned*) * tNoOfLongPK );
|
||||
for (Uint32 n = 0; n < tNoOfOperations; n++){
|
||||
for (n = 0; n < tNoOfOperations; n++){
|
||||
for (Uint32 i = 0; i < tNoOfLongPK ; i++) {
|
||||
longKeyAttrValue[n][i] = (unsigned *) malloc(sizeof(unsigned) * tSizeOfLongPK);
|
||||
memset(longKeyAttrValue[n][i], 0, sizeof(unsigned) * tSizeOfLongPK);
|
||||
|
@ -1064,13 +1065,14 @@ static void sleepBeforeStartingTest(int seconds){
|
|||
|
||||
static int
|
||||
createTables(Ndb* pMyNdb){
|
||||
for (Uint32 i = 0; i < tNoOfAttributes; i++){
|
||||
int i;
|
||||
for (i = 0; i < tNoOfAttributes; i++){
|
||||
snprintf(attrName[i], MAXSTRLEN, "COL%d", i);
|
||||
}
|
||||
|
||||
// Note! Uses only uppercase letters in table name's
|
||||
// so that we can look at the tables with SQL
|
||||
for (Uint32 i = 0; i < tNoOfTables; i++){
|
||||
for (i = 0; i < tNoOfTables; i++){
|
||||
if (theStdTableNameFlag == 0){
|
||||
snprintf(tableName[i], MAXSTRLEN, "TAB%d_%d", i,
|
||||
(int)(NdbTick_CurrentMillisecond() / 1000));
|
||||
|
@ -1079,7 +1081,7 @@ createTables(Ndb* pMyNdb){
|
|||
}
|
||||
}
|
||||
|
||||
for(unsigned i = 0; i < tNoOfTables; i++){
|
||||
for(i = 0; i < tNoOfTables; i++){
|
||||
ndbout << "Creating " << tableName[i] << "... ";
|
||||
|
||||
NdbDictionary::Table tmpTable(tableName[i]);
|
||||
|
|
|
@ -173,7 +173,7 @@ NDB_COMMAND(flexTT, "flexTT", "flexTT", "flexTT", 65535)
|
|||
{
|
||||
ThreadNdb* pThreadData;
|
||||
int returnValue = NDBT_OK;
|
||||
|
||||
int i;
|
||||
flexTTErrorData = new ErrorData;
|
||||
flexTTErrorData->resetErrorCounters();
|
||||
|
||||
|
@ -250,7 +250,7 @@ NDB_COMMAND(flexTT, "flexTT", "flexTT", "flexTT", 65535)
|
|||
* Create NDB objects. *
|
||||
****************************************************************/
|
||||
resetThreads();
|
||||
for (int i = 0; i < tNoOfThreads ; i++) {
|
||||
for (i = 0; i < tNoOfThreads ; i++) {
|
||||
pThreadData[i].threadNo = i;
|
||||
threadLife[i] = NdbThread_Create(threadLoop,
|
||||
(void**)&pThreadData[i],
|
||||
|
@ -301,7 +301,7 @@ NDB_COMMAND(flexTT, "flexTT", "flexTT", "flexTT", 65535)
|
|||
|
||||
execute(stStop);
|
||||
void * tmp;
|
||||
for(int i = 0; i<tNoOfThreads; i++){
|
||||
for(i = 0; i<tNoOfThreads; i++){
|
||||
NdbThread_WaitFor(threadLife[i], &tmp);
|
||||
NdbThread_Destroy(&threadLife[i]);
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ static
|
|||
int
|
||||
readOneNoCommit(Ndb* pNdb, NdbConnection* pTrans,
|
||||
const NdbDictionary::Table* tab,NDBT_ResultRow * row){
|
||||
|
||||
int a;
|
||||
NdbOperation * pOp = pTrans->getNdbOperation(tab->getName());
|
||||
if (pOp == NULL){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -280,7 +280,7 @@ readOneNoCommit(Ndb* pNdb, NdbConnection* pTrans,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab->getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab->getNoOfColumns(); a++){
|
||||
if (tab->getColumn(a)->getPrimaryKey() == true){
|
||||
if(tmp.equalForAttr(pOp, a, 0) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -290,7 +290,7 @@ readOneNoCommit(Ndb* pNdb, NdbConnection* pTrans,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab->getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab->getNoOfColumns(); a++){
|
||||
if((row->attributeStore(a) =
|
||||
pOp->getValue(tab->getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -639,35 +639,35 @@ int runNoCommitRollback630(NDBT_Context* ctx, NDBT_Step* step){
|
|||
|
||||
|
||||
int runNoCommitAndClose(NDBT_Context* ctx, NDBT_Step* step){
|
||||
int result = NDBT_OK;
|
||||
int i, result = NDBT_OK;
|
||||
HugoOperations hugoOps(*ctx->getTab());
|
||||
Ndb* pNdb = GETNDB(step);
|
||||
|
||||
do{
|
||||
// Read
|
||||
CHECK(hugoOps.startTransaction(pNdb) == 0);
|
||||
for (int i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
CHECK(hugoOps.pkReadRecord(pNdb, i, true) == 0);
|
||||
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
|
||||
CHECK(hugoOps.closeTransaction(pNdb) == 0);
|
||||
|
||||
// Update
|
||||
CHECK(hugoOps.startTransaction(pNdb) == 0);
|
||||
for (int i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
CHECK(hugoOps.pkUpdateRecord(pNdb, i) == 0);
|
||||
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
|
||||
CHECK(hugoOps.closeTransaction(pNdb) == 0);
|
||||
|
||||
// Delete
|
||||
CHECK(hugoOps.startTransaction(pNdb) == 0);
|
||||
for (int i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
CHECK(hugoOps.pkDeleteRecord(pNdb, i) == 0);
|
||||
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
|
||||
CHECK(hugoOps.closeTransaction(pNdb) == 0);
|
||||
|
||||
// Try to insert, record should already exist
|
||||
CHECK(hugoOps.startTransaction(pNdb) == 0);
|
||||
for (int i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
CHECK(hugoOps.pkInsertRecord(pNdb, i) == 0);
|
||||
CHECK(hugoOps.execute_Commit(pNdb) == 630);
|
||||
CHECK(hugoOps.closeTransaction(pNdb) == 0);
|
||||
|
@ -781,14 +781,14 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
|
|||
CHECK(hugoOps.closeTransaction(pNdb) == 0);
|
||||
|
||||
Uint32 updatesValue = 0;
|
||||
|
||||
Uint32 j;
|
||||
for(Uint32 i = 0; i<1; i++){
|
||||
// Read record 5 - 10
|
||||
CHECK(hugoOps.startTransaction(pNdb) == 0);
|
||||
CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
|
||||
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
|
||||
|
||||
for(Uint32 j = 0; j<10; j++){
|
||||
for(j = 0; j<10; j++){
|
||||
// Update record 5 - 10
|
||||
updatesValue++;
|
||||
CHECK(hugoOps.pkUpdateRecord(pNdb, 5, 10, updatesValue) == 0);
|
||||
|
@ -799,7 +799,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
|
|||
CHECK(hugoOps.verifyUpdatesValue(updatesValue) == 0);
|
||||
}
|
||||
|
||||
for(Uint32 j = 0; j<10; j++){
|
||||
for(j = 0; j<10; j++){
|
||||
// Delete record 5 - 10 times
|
||||
CHECK(hugoOps.pkDeleteRecord(pNdb, 5, 10) == 0);
|
||||
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
|
||||
|
|
|
@ -1170,6 +1170,7 @@ deleteScan(bool idx)
|
|||
static int
|
||||
testmain()
|
||||
{
|
||||
int style;
|
||||
g_ndb = new Ndb("TEST_DB");
|
||||
CHK(g_ndb->init() == 0);
|
||||
CHK(g_ndb->waitUntilReady() == 0);
|
||||
|
@ -1197,7 +1198,7 @@ testmain()
|
|||
if (g_opt.m_seed == 0)
|
||||
srandom(g_loop);
|
||||
// pk
|
||||
for (int style = 0; style <= 2; style++) {
|
||||
for (style = 0; style <= 2; style++) {
|
||||
if (skipcase('k') || skipstyle(style))
|
||||
continue;
|
||||
DBG("--- pk ops " << stylename[style] << " ---");
|
||||
|
@ -1215,7 +1216,7 @@ testmain()
|
|||
CHK(verifyBlob() == 0);
|
||||
}
|
||||
// hash index
|
||||
for (int style = 0; style <= 2; style++) {
|
||||
for (style = 0; style <= 2; style++) {
|
||||
if (skipcase('i') || skipstyle(style))
|
||||
continue;
|
||||
DBG("--- idx ops " << stylename[style] << " ---");
|
||||
|
@ -1233,7 +1234,7 @@ testmain()
|
|||
CHK(verifyBlob() == 0);
|
||||
}
|
||||
// scan table
|
||||
for (int style = 0; style <= 2; style++) {
|
||||
for (style = 0; style <= 2; style++) {
|
||||
if (skipcase('s') || skipstyle(style))
|
||||
continue;
|
||||
DBG("--- table scan " << stylename[style] << " ---");
|
||||
|
@ -1249,7 +1250,7 @@ testmain()
|
|||
CHK(verifyBlob() == 0);
|
||||
}
|
||||
// scan index
|
||||
for (int style = 0; style <= 2; style++) {
|
||||
for (style = 0; style <= 2; style++) {
|
||||
if (skipcase('r') || skipstyle(style))
|
||||
continue;
|
||||
DBG("--- index scan " << stylename[style] << " ---");
|
||||
|
@ -1274,6 +1275,7 @@ testmain()
|
|||
static int
|
||||
bugtest_4088()
|
||||
{
|
||||
unsigned i;
|
||||
DBG("bug test 4088 - ndb api hang with mixed ops on index table");
|
||||
// insert rows
|
||||
calcTups(false);
|
||||
|
@ -1285,7 +1287,7 @@ bugtest_4088()
|
|||
// read table pk via index as a table
|
||||
const unsigned pkcnt = 2;
|
||||
Tup pktup[pkcnt];
|
||||
for (unsigned i = 0; i < pkcnt; i++) {
|
||||
for (i = 0; i < pkcnt; i++) {
|
||||
char name[20];
|
||||
// XXX guess table id
|
||||
sprintf(name, "%d/%s", 4, g_opt.m_x1name);
|
||||
|
@ -1304,7 +1306,7 @@ bugtest_4088()
|
|||
// BUG 4088: gets 1 tckeyconf, 1 tcindxconf, then hangs
|
||||
CHK(g_con->execute(Commit) == 0);
|
||||
// verify
|
||||
for (unsigned i = 0; i < pkcnt; i++) {
|
||||
for (i = 0; i < pkcnt; i++) {
|
||||
CHK(pktup[i].m_pk1 == tup.m_pk1);
|
||||
CHK(memcmp(pktup[i].m_pk2, tup.m_pk2, g_opt.m_pk2len) == 0);
|
||||
}
|
||||
|
|
|
@ -165,12 +165,13 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
|
||||
allocRows(trans*operations);
|
||||
allocTransactions(trans);
|
||||
int a, t, r;
|
||||
|
||||
for (int i = 0; i < batch; i++) { // For each batch
|
||||
while (cRecords < records*batch) {
|
||||
cTrans = 0;
|
||||
cReadIndex = 0;
|
||||
for (int t = 0; t < trans; t++) { // For each transaction
|
||||
for (t = 0; t < trans; t++) { // For each transaction
|
||||
transactions[t] = pNdb->startTransaction();
|
||||
if (transactions[t] == NULL) {
|
||||
ERR(pNdb->getNdbError());
|
||||
|
@ -187,7 +188,7 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
// Read
|
||||
// Define primary keys
|
||||
check = pOp->readTupleExclusive();
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true) {
|
||||
if (equalForAttr(pOp, a, cReadRecords) != 0){
|
||||
ERR(transactions[t]->getNdbError());
|
||||
|
@ -197,7 +198,7 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
}
|
||||
}
|
||||
// Define attributes to read
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if ((rows[cReadIndex]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(transactions[t]->getNdbError());
|
||||
|
@ -225,7 +226,7 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
pNdb->sendPollNdb(3000, 0, 0);
|
||||
|
||||
// Verify the data!
|
||||
for (int r = 0; r < trans*operations; r++) {
|
||||
for (r = 0; r < trans*operations; r++) {
|
||||
if (calc.verifyRowValues(rows[r]) != 0) {
|
||||
g_info << "|- Verify failed..." << endl;
|
||||
// Close all transactions
|
||||
|
@ -239,7 +240,7 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
// Update
|
||||
cTrans = 0;
|
||||
cIndex = 0;
|
||||
for (int t = 0; t < trans; t++) { // For each transaction
|
||||
for (t = 0; t < trans; t++) { // For each transaction
|
||||
for (int k = 0; k < operations; k++) { // For each operation
|
||||
NdbOperation* pOp = transactions[t]->getNdbOperation(tab.getName());
|
||||
if (pOp == NULL) {
|
||||
|
@ -258,7 +259,7 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Set search condition for the record
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true) {
|
||||
if (equalForAttr(pOp, a, cRecords) != 0) {
|
||||
ERR(transactions[t]->getNdbError());
|
||||
|
@ -269,7 +270,7 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Update the record
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if (tab.getColumn(a)->getPrimaryKey() == false) {
|
||||
if (setValueForAttr(pOp, a, cRecords, updates) != 0) {
|
||||
ERR(transactions[t]->getNdbError());
|
||||
|
@ -298,7 +299,7 @@ HugoAsynchTransactions::pkUpdateRecordsAsynch(Ndb* pNdb,
|
|||
pNdb->sendPollNdb(3000, 0, 0);
|
||||
|
||||
// Close all transactions
|
||||
for (int t = 0; t < cTrans; t++) {
|
||||
for (t = 0; t < cTrans; t++) {
|
||||
pNdb->closeTransaction(transactions[t]);
|
||||
}
|
||||
|
||||
|
@ -346,6 +347,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
int cTrans = 0;
|
||||
int cRecords = 0;
|
||||
int cIndex = 0;
|
||||
int a,t,r;
|
||||
|
||||
transactionsCompleted = 0;
|
||||
allocTransactions(trans);
|
||||
|
@ -354,7 +356,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
while (cRecords < records*batch) {
|
||||
cTrans = 0;
|
||||
cIndex = 0;
|
||||
for (int t = 0; t < trans; t++) { // For each transaction
|
||||
for (t = 0; t < trans; t++) { // For each transaction
|
||||
transactions[t] = pNdb->startTransaction();
|
||||
if (transactions[t] == NULL) {
|
||||
ERR(pNdb->getNdbError());
|
||||
|
@ -379,7 +381,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Set a calculated value for each attribute in this table
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if (setValueForAttr(pOp, a, cRecords, 0 ) != 0) {
|
||||
ERR(transactions[t]->getNdbError());
|
||||
pNdb->closeTransaction(transactions[t]);
|
||||
|
@ -394,7 +396,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
case NO_READ:
|
||||
// Define primary keys
|
||||
check = pOp->readTuple();
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true) {
|
||||
if (equalForAttr(pOp, a, cRecords) != 0){
|
||||
ERR(transactions[t]->getNdbError());
|
||||
|
@ -404,7 +406,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
}
|
||||
}
|
||||
// Define attributes to read
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if ((rows[cIndex]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(transactions[t]->getNdbError());
|
||||
|
@ -423,7 +425,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for (int a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
for (a = 0; a < tab.getNoOfColumns(); a++) {
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if (equalForAttr(pOp, a, cRecords) != 0) {
|
||||
ERR(transactions[t]->getNdbError());
|
||||
|
@ -462,7 +464,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
switch (theOperation) {
|
||||
case NO_READ:
|
||||
// Verify the data!
|
||||
for (int r = 0; r < trans*operations; r++) {
|
||||
for (r = 0; r < trans*operations; r++) {
|
||||
if (calc.verifyRowValues(rows[r]) != 0) {
|
||||
g_info << "|- Verify failed..." << endl;
|
||||
// Close all transactions
|
||||
|
@ -480,7 +482,7 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Close all transactions
|
||||
for (int t = 0; t < cTrans; t++) {
|
||||
for (t = 0; t < cTrans; t++) {
|
||||
pNdb->closeTransaction(transactions[t]);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ int HugoOperations::pkReadRecord(Ndb* pNdb,
|
|||
int recordNo,
|
||||
bool exclusive,
|
||||
int numRecords){
|
||||
|
||||
int a;
|
||||
allocRows(numRecords);
|
||||
int check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
|
@ -71,7 +71,7 @@ int HugoOperations::pkReadRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -81,7 +81,7 @@ int HugoOperations::pkReadRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[r]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -95,7 +95,7 @@ int HugoOperations::pkReadRecord(Ndb* pNdb,
|
|||
int HugoOperations::pkDirtyReadRecord(Ndb* pNdb,
|
||||
int recordNo,
|
||||
int numRecords){
|
||||
|
||||
int a;
|
||||
allocRows(numRecords);
|
||||
int check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
|
@ -113,7 +113,7 @@ int HugoOperations::pkDirtyReadRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -123,7 +123,7 @@ int HugoOperations::pkDirtyReadRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[r]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -137,7 +137,7 @@ int HugoOperations::pkDirtyReadRecord(Ndb* pNdb,
|
|||
int HugoOperations::pkSimpleReadRecord(Ndb* pNdb,
|
||||
int recordNo,
|
||||
int numRecords){
|
||||
|
||||
int a;
|
||||
allocRows(numRecords);
|
||||
int check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
|
@ -155,7 +155,7 @@ int HugoOperations::pkSimpleReadRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -165,7 +165,7 @@ int HugoOperations::pkSimpleReadRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[r]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -180,7 +180,7 @@ int HugoOperations::pkUpdateRecord(Ndb* pNdb,
|
|||
int recordNo,
|
||||
int numRecords,
|
||||
int updatesValue){
|
||||
|
||||
int a;
|
||||
allocRows(numRecords);
|
||||
int check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
|
@ -197,7 +197,7 @@ int HugoOperations::pkUpdateRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -207,7 +207,7 @@ int HugoOperations::pkUpdateRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to update
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == false){
|
||||
if(setValueForAttr(pOp, a, recordNo+r, updatesValue ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -224,7 +224,7 @@ int HugoOperations::pkInsertRecord(Ndb* pNdb,
|
|||
int numRecords,
|
||||
int updatesValue){
|
||||
|
||||
int check;
|
||||
int a, check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
NdbOperation* pOp = pTrans->getNdbOperation(tab.getName());
|
||||
if (pOp == NULL) {
|
||||
|
@ -239,7 +239,7 @@ int HugoOperations::pkInsertRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -249,7 +249,7 @@ int HugoOperations::pkInsertRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to update
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == false){
|
||||
if(setValueForAttr(pOp, a, recordNo+r, updatesValue ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -265,7 +265,7 @@ int HugoOperations::pkDeleteRecord(Ndb* pNdb,
|
|||
int recordNo,
|
||||
int numRecords){
|
||||
|
||||
int check;
|
||||
int a, check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
NdbOperation* pOp = pTrans->getNdbOperation(tab.getName());
|
||||
if (pOp == NULL) {
|
||||
|
@ -280,7 +280,7 @@ int HugoOperations::pkDeleteRecord(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -619,6 +619,7 @@ int HugoOperations::indexReadRecords(Ndb*, const char * idxName, int recordNo,
|
|||
bool exclusive,
|
||||
int numRecords){
|
||||
|
||||
int a;
|
||||
allocRows(numRecords);
|
||||
int check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
|
@ -638,7 +639,7 @@ int HugoOperations::indexReadRecords(Ndb*, const char * idxName, int recordNo,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -648,7 +649,7 @@ int HugoOperations::indexReadRecords(Ndb*, const char * idxName, int recordNo,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[r]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -665,7 +666,7 @@ HugoOperations::indexUpdateRecord(Ndb*,
|
|||
int recordNo,
|
||||
int numRecords,
|
||||
int updatesValue){
|
||||
|
||||
int a;
|
||||
allocRows(numRecords);
|
||||
int check;
|
||||
for(int r=0; r < numRecords; r++){
|
||||
|
@ -682,7 +683,7 @@ HugoOperations::indexUpdateRecord(Ndb*,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+recordNo) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -692,7 +693,7 @@ HugoOperations::indexUpdateRecord(Ndb*,
|
|||
}
|
||||
|
||||
// Define attributes to update
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == false){
|
||||
if(setValueForAttr(pOp, a, recordNo+r, updatesValue ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
|
|
@ -46,7 +46,7 @@ HugoTransactions::scanReadRecords(Ndb* pNdb,
|
|||
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
NdbScanOperation *pOp;
|
||||
|
||||
|
@ -96,7 +96,7 @@ HugoTransactions::scanReadRecords(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((row.attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -220,7 +220,7 @@ HugoTransactions::scanUpdateRecords1(Ndb* pNdb,
|
|||
#else
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
|
||||
|
@ -269,7 +269,7 @@ HugoTransactions::scanUpdateRecords1(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Read all attributes from this table
|
||||
for(int a=0; a<tab.getNoOfColumns(); a++){
|
||||
for(a=0; a<tab.getNoOfColumns(); a++){
|
||||
if((row.attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == NULL){
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
|
@ -387,7 +387,7 @@ HugoTransactions::scanUpdateRecords2(Ndb* pNdb,
|
|||
#else
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
|
||||
|
@ -436,7 +436,7 @@ HugoTransactions::scanUpdateRecords2(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Read all attributes from this table
|
||||
for(int a=0; a<tab.getNoOfColumns(); a++){
|
||||
for(a=0; a<tab.getNoOfColumns(); a++){
|
||||
if((row.attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == NULL){
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
|
@ -553,7 +553,7 @@ HugoTransactions::scanUpdateRecords3(Ndb* pNdb,
|
|||
int parallelism){
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
NdbScanOperation *pOp;
|
||||
|
||||
|
@ -592,7 +592,7 @@ HugoTransactions::scanUpdateRecords3(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Read all attributes from this table
|
||||
for(int a=0; a<tab.getNoOfColumns(); a++){
|
||||
for(a=0; a<tab.getNoOfColumns(); a++){
|
||||
if((row.attributeStore(a) = pOp->getValue(tab.getColumn(a)->getName())) == NULL){
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
|
@ -634,7 +634,7 @@ HugoTransactions::scanUpdateRecords3(Ndb* pNdb,
|
|||
}
|
||||
const int updates = calc.getUpdatesValue(&row) + 1;
|
||||
const int r = calc.getIdValue(&row);
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == false){
|
||||
if(setValueForAttr(pUp, a, r, updates ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -695,7 +695,7 @@ HugoTransactions::loadTable(Ndb* pNdb,
|
|||
bool allowConstraintViolation,
|
||||
int doSleep,
|
||||
bool oneTrans){
|
||||
int check;
|
||||
int check, a;
|
||||
int retryAttempt = 0;
|
||||
int retryMax = 5;
|
||||
NdbConnection *pTrans;
|
||||
|
@ -763,7 +763,7 @@ HugoTransactions::loadTable(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Set a calculated value for each attribute in this table
|
||||
for (int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for (a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if(setValueForAttr(pOp, a, c+b, 0 ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
|
@ -838,7 +838,7 @@ HugoTransactions::loadTable(Ndb* pNdb,
|
|||
int
|
||||
HugoTransactions::fillTable(Ndb* pNdb,
|
||||
int batch){
|
||||
int check;
|
||||
int check, a, b;
|
||||
int retryAttempt = 0;
|
||||
int retryMax = 5;
|
||||
NdbConnection *pTrans;
|
||||
|
@ -869,7 +869,7 @@ HugoTransactions::fillTable(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int b = 0; b < batch; b++){
|
||||
for(b = 0; b < batch; b++){
|
||||
|
||||
pOp = pTrans->getNdbOperation(tab.getName());
|
||||
if (pOp == NULL) {
|
||||
|
@ -886,7 +886,7 @@ HugoTransactions::fillTable(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Set a calculated value for each attribute in this table
|
||||
for (int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for (a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if(setValueForAttr(pOp, a, c+b, 0 ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
pNdb->closeTransaction(pTrans);
|
||||
|
@ -1025,7 +1025,7 @@ int
|
|||
HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
|
||||
int records) {
|
||||
int myXXXXX = XXXXX++;
|
||||
|
||||
Uint32 i;
|
||||
const char function[] = "HugoTransactions::eventOperation: ";
|
||||
struct receivedEvent* recInsertEvent;
|
||||
NdbAutoObjArrayPtr<struct receivedEvent>
|
||||
|
@ -1042,7 +1042,7 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
|
|||
stats.n_duplicates = 0;
|
||||
stats.n_inconsistent_gcis = 0;
|
||||
|
||||
for (int i = 0; i < records; i++) {
|
||||
for (i = 0; i < records; i++) {
|
||||
recInsertEvent[i].pk = 0xFFFFFFFF;
|
||||
recInsertEvent[i].count = 0;
|
||||
recInsertEvent[i].event = 0xFFFFFFFF;
|
||||
|
@ -1150,7 +1150,7 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
|
|||
}
|
||||
|
||||
g_info << "overrun " << overrun << " pk " << pk;
|
||||
for (int i = 1; i < noEventColumnName; i++) {
|
||||
for (i = 1; i < noEventColumnName; i++) {
|
||||
if (recAttr[i]->isNULL() >= 0) { // we have a value
|
||||
g_info << " post[" << i << "]=";
|
||||
if (recAttr[i]->isNULL() == 0) // we have a non-null value
|
||||
|
@ -1193,7 +1193,7 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats,
|
|||
if (stats.n_updates > 0) {
|
||||
stats.n_consecutive++;
|
||||
}
|
||||
for (Uint32 i = 0; i < (Uint32)records/3; i++) {
|
||||
for (i = 0; i < (Uint32)records/3; i++) {
|
||||
if (recInsertEvent[i].pk != i) {
|
||||
stats.n_consecutive ++;
|
||||
ndbout << "missing insert pk " << i << endl;
|
||||
|
@ -1232,7 +1232,7 @@ HugoTransactions::pkReadRecords(Ndb* pNdb,
|
|||
int r = 0;
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
|
||||
|
@ -1284,7 +1284,7 @@ HugoTransactions::pkReadRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+b) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1295,7 +1295,7 @@ HugoTransactions::pkReadRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[b]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1358,7 +1358,7 @@ HugoTransactions::pkUpdateRecords(Ndb* pNdb,
|
|||
int r = 0;
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a, b;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
|
||||
|
@ -1390,7 +1390,7 @@ HugoTransactions::pkUpdateRecords(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int b = 0; b<batch && (r+b) < records; b++){
|
||||
for(b = 0; b<batch && (r+b) < records; b++){
|
||||
pOp = pTrans->getNdbOperation(tab.getName());
|
||||
if (pOp == NULL) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1406,7 +1406,7 @@ HugoTransactions::pkUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+b) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1417,7 +1417,7 @@ HugoTransactions::pkUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[b]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1443,7 +1443,7 @@ HugoTransactions::pkUpdateRecords(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int b = 0; b<batch && (b+r)<records; b++){
|
||||
for(b = 0; b<batch && (b+r)<records; b++){
|
||||
if (calc.verifyRowValues(rows[b]) != 0){
|
||||
pNdb->closeTransaction(pTrans);
|
||||
return NDBT_FAILED;
|
||||
|
@ -1466,7 +1466,7 @@ HugoTransactions::pkUpdateRecords(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pUpdOp, a, r+b) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1476,7 +1476,7 @@ HugoTransactions::pkUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
}
|
||||
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == false){
|
||||
if(setValueForAttr(pUpdOp, a, r+b, updates ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1526,7 +1526,7 @@ HugoTransactions::pkInterpretedUpdateRecords(Ndb* pNdb,
|
|||
int r = 0;
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
|
||||
while (r < records){
|
||||
|
@ -1566,7 +1566,7 @@ HugoTransactions::pkInterpretedUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1577,7 +1577,7 @@ HugoTransactions::pkInterpretedUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Read update value
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (calc.isUpdateCol(a) == true){
|
||||
if((row.attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
|
@ -1622,7 +1622,7 @@ HugoTransactions::pkInterpretedUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// PKs
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pUpdOp, a, r) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1633,7 +1633,7 @@ HugoTransactions::pkInterpretedUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Update col
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if ((tab.getColumn(a)->getPrimaryKey() == false) &&
|
||||
(calc.isUpdateCol(a) == true)){
|
||||
|
||||
|
@ -1650,7 +1650,7 @@ HugoTransactions::pkInterpretedUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Remaining attributes
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if ((tab.getColumn(a)->getPrimaryKey() == false) &&
|
||||
(calc.isUpdateCol(a) == false)){
|
||||
if(setValueForAttr(pUpdOp, a, r, updates ) != 0){
|
||||
|
@ -1705,7 +1705,7 @@ HugoTransactions::pkDelRecords(Ndb* pNdb,
|
|||
int r = 0;
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
|
||||
|
@ -1750,7 +1750,7 @@ HugoTransactions::pkDelRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1820,7 +1820,7 @@ HugoTransactions::lockRecords(Ndb* pNdb,
|
|||
int r = 0;
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a, b;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
|
||||
|
@ -1857,7 +1857,7 @@ HugoTransactions::lockRecords(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int b = 0; (b<lockBatch) && (r+b < records); b++){
|
||||
for(b = 0; (b<lockBatch) && (r+b < records); b++){
|
||||
pOp = pTrans->getNdbOperation(tab.getName());
|
||||
if (pOp == NULL) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1873,7 +1873,7 @@ HugoTransactions::lockRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+b) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1884,7 +1884,7 @@ HugoTransactions::lockRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[b]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -1967,7 +1967,7 @@ HugoTransactions::indexReadRecords(Ndb* pNdb,
|
|||
int r = 0;
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
NdbIndexScanOperation *sOp;
|
||||
|
@ -2039,7 +2039,7 @@ HugoTransactions::indexReadRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+b) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -2050,7 +2050,7 @@ HugoTransactions::indexReadRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[b]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -2118,7 +2118,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
|
|||
int r = 0;
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a, b;
|
||||
NdbConnection *pTrans;
|
||||
NdbOperation *pOp;
|
||||
NdbScanOperation * sOp;
|
||||
|
@ -2155,7 +2155,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int b = 0; b<batchsize && (b+r)<records; b++){
|
||||
for(b = 0; b<batchsize && (b+r)<records; b++){
|
||||
if(!ordered){
|
||||
pOp = pTrans->getNdbIndexOperation(idxName, tab.getName());
|
||||
if (pOp == NULL) {
|
||||
|
@ -2183,7 +2183,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define primary keys
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pOp, a, r+b) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -2194,7 +2194,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
// Define attributes to read
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((rows[b]->attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -2225,7 +2225,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
|
|||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
for(int b = 0; b<batchsize && (b+r)<records; b++){
|
||||
for(b = 0; b<batchsize && (b+r)<records; b++){
|
||||
if (calc.verifyRowValues(rows[b]) != 0){
|
||||
pNdb->closeTransaction(pTrans);
|
||||
return NDBT_FAILED;
|
||||
|
@ -2254,7 +2254,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
|
||||
if(!ordered){
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == true){
|
||||
if(equalForAttr(pUpdOp, a, r+b) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
@ -2265,7 +2265,7 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb,
|
|||
}
|
||||
}
|
||||
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if (tab.getColumn(a)->getPrimaryKey() == false){
|
||||
if(setValueForAttr(pUpdOp, a, r+b, updates ) != 0){
|
||||
ERR(pTrans->getNdbError());
|
||||
|
|
|
@ -625,9 +625,9 @@ int restartNFDuringNR(NdbRestarter& _restarter,
|
|||
const NdbRestarts::NdbRestart* _restart){
|
||||
|
||||
myRandom48Init(NdbTick_CurrentMillisecond());
|
||||
|
||||
int i;
|
||||
const int sz = sizeof(NFDuringNR_codes)/sizeof(NFDuringNR_codes[0]);
|
||||
for(int i = 0; i<sz; i++){
|
||||
for(i = 0; i<sz; i++){
|
||||
int randomId = myRandom48(_restarter.getNumDbNodes());
|
||||
int nodeId = _restarter.getDbNodeId(randomId);
|
||||
int error = NFDuringNR_codes[i];
|
||||
|
@ -673,7 +673,7 @@ int restartNFDuringNR(NdbRestarter& _restarter,
|
|||
if(NdbEnv_GetEnv("USER", buf, 256) == 0 || strcmp(buf, "ejonore") != 0)
|
||||
return NDBT_OK;
|
||||
|
||||
for(int i = 0; i<sz; i++){
|
||||
for(i = 0; i<sz; i++){
|
||||
const int randomId = myRandom48(_restarter.getNumDbNodes());
|
||||
int nodeId = _restarter.getDbNodeId(randomId);
|
||||
const int error = NFDuringNR_codes[i];
|
||||
|
@ -753,14 +753,14 @@ NRDuringLCP_NonMaster_codes[] = {
|
|||
|
||||
int restartNodeDuringLCP(NdbRestarter& _restarter,
|
||||
const NdbRestarts::NdbRestart* _restart) {
|
||||
|
||||
int i;
|
||||
// Master
|
||||
int val = DumpStateOrd::DihMinTimeBetweenLCP;
|
||||
CHECK(_restarter.dumpStateAllNodes(&val, 1) == 0,
|
||||
"Failed to set LCP to min value"); // Set LCP to min val
|
||||
int sz = sizeof(NRDuringLCP_Master_codes)/
|
||||
sizeof(NRDuringLCP_Master_codes[0]);
|
||||
for(int i = 0; i<sz; i++) {
|
||||
for(i = 0; i<sz; i++) {
|
||||
|
||||
int error = NRDuringLCP_Master_codes[i];
|
||||
int masterNodeId = _restarter.getMasterNodeId();
|
||||
|
@ -798,7 +798,7 @@ int restartNodeDuringLCP(NdbRestarter& _restarter,
|
|||
// NON-Master
|
||||
sz = sizeof(NRDuringLCP_NonMaster_codes)/
|
||||
sizeof(NRDuringLCP_NonMaster_codes[0]);
|
||||
for(int i = 0; i<sz; i++) {
|
||||
for(i = 0; i<sz; i++) {
|
||||
|
||||
int error = NRDuringLCP_NonMaster_codes[i];
|
||||
int nodeId = getRandomNodeId(_restarter);
|
||||
|
|
|
@ -1040,7 +1040,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
|
|||
NdbDictionary::Index::Type indexType= pIndex->getType();
|
||||
int retryAttempt = 0;
|
||||
const int retryMax = 100;
|
||||
int check;
|
||||
int check, a;
|
||||
NdbConnection *pTrans1=NULL;
|
||||
NdbResultSet *cursor= NULL;
|
||||
NdbOperation *pOp;
|
||||
|
@ -1100,7 +1100,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
|
|||
#if VERBOSE
|
||||
printf("PK: ");
|
||||
#endif
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
const NdbDictionary::Column* attr = tab.getColumn(a);
|
||||
if (attr->getPrimaryKey() == true){
|
||||
if (pOp->equal(attr->getName(), row.attributeStore(a)->aRef()) != 0){
|
||||
|
@ -1119,7 +1119,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
|
|||
#if VERBOSE
|
||||
printf("Reading %u attributes: ", tab.getNoOfColumns());
|
||||
#endif
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
if((tabRow.attributeStore(a) =
|
||||
pOp->getValue(tab.getColumn(a)->getName())) == 0) {
|
||||
ERR(pTrans1->getNdbError());
|
||||
|
@ -1170,7 +1170,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
|
|||
#if VERBOSE
|
||||
printf("SI: ");
|
||||
#endif
|
||||
for(int a = 0; a<(int)pIndex->getNoOfColumns(); a++){
|
||||
for(a = 0; a<(int)pIndex->getNoOfColumns(); a++){
|
||||
const NdbDictionary::Column * col = pIndex->getColumn(a);
|
||||
|
||||
int r;
|
||||
|
@ -1200,7 +1200,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
|
|||
#if VERBOSE
|
||||
printf("Reading %u attributes: ", tab.getNoOfColumns());
|
||||
#endif
|
||||
for(int a = 0; a<tab.getNoOfColumns(); a++){
|
||||
for(a = 0; a<tab.getNoOfColumns(); a++){
|
||||
void* pCheck;
|
||||
|
||||
if (pIndexOp)
|
||||
|
|
|
@ -192,7 +192,7 @@ main(int argc, const char** argv){
|
|||
,{ "rm", 0, arg_flag, &rm, "-c rm", "undefine process(es)" }
|
||||
};
|
||||
const int num_args = 10;
|
||||
|
||||
int i;
|
||||
int optind = 0;
|
||||
char desc[] = "[host:[port]]\n";
|
||||
|
||||
|
@ -215,13 +215,13 @@ main(int argc, const char** argv){
|
|||
|
||||
Expression * m_expr = 0;
|
||||
|
||||
for(int i = optind; i<argc; i++){
|
||||
for(i = optind; i<argc; i++){
|
||||
add_host(g_hosts, argv[i]);
|
||||
}
|
||||
|
||||
OrExpr * orE = new OrExpr(new Operate(cmd, g_settings), true);
|
||||
m_expr = orE;
|
||||
for(int i = optind; i<argc; i++){
|
||||
for(i = optind; i<argc; i++){
|
||||
BaseString tmp(argv[i]);
|
||||
Vector<BaseString> split;
|
||||
tmp.split(split, ":");
|
||||
|
|
|
@ -43,7 +43,7 @@ int main(int argc, const char** argv)
|
|||
};
|
||||
|
||||
int num_args = sizeof(args) / sizeof(args[0]);
|
||||
int optind = 0;
|
||||
int optind = 0, i;
|
||||
|
||||
if(getarg(args, num_args, argc, argv, &optind) || argv[optind] == NULL) {
|
||||
arg_printusage(args, num_args, argv[0], "table name\n");
|
||||
|
@ -80,7 +80,7 @@ int main(int argc, const char** argv)
|
|||
}
|
||||
op->readTuple();
|
||||
NdbRecAttr** data = new NdbRecAttr*[table->getNoOfColumns()];
|
||||
for (int i = 0; i < table->getNoOfColumns(); i++)
|
||||
for (i = 0; i < table->getNoOfColumns(); i++)
|
||||
{
|
||||
const NdbDictionary::Column* c = table->getColumn(i);
|
||||
if (c->getPrimaryKey())
|
||||
|
@ -93,11 +93,10 @@ int main(int argc, const char** argv)
|
|||
data[i] = op->getValue(c->getName(), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (conn->execute(Commit) == 0)
|
||||
{
|
||||
// Print column names
|
||||
for (int i = 0; i < table->getNoOfColumns(); i++)
|
||||
for (i = 0; i < table->getNoOfColumns(); i++)
|
||||
{
|
||||
const NdbDictionary::Column* c = table->getColumn(i);
|
||||
|
||||
|
@ -111,7 +110,7 @@ int main(int argc, const char** argv)
|
|||
{
|
||||
g_info << hex;
|
||||
}
|
||||
for (int i = 0; i < table->getNoOfColumns(); i++)
|
||||
for (i = 0; i < table->getNoOfColumns(); i++)
|
||||
{
|
||||
NdbRecAttr* a = data[i];
|
||||
switch(a->getType())
|
||||
|
|
Loading…
Reference in a new issue