static void initGeneratorStatistics(GeneratorStatistics *gen) { int i; if( initSequence(&gen->transactionSequence, transactionDefinition) != 0 ) { ndbout_c("could not set the transaction types"); exit(0); } if( initSequence(&gen->rollbackSequenceT4, rollbackDefinition) != 0 ) { ndbout_c("could not set the rollback sequence"); exit(0); } if( initSequence(&gen->rollbackSequenceT5, rollbackDefinition) != 0 ) { ndbout_c("could not set the rollback sequence"); exit(0); } for(i = 0; i < NUM_TRANSACTION_TYPES; i++ ) clearTransaction(&gen->transactions[i]); gen->totalTransactions = 0; gen->activeSessions.numberInList = 0; gen->activeSessions.readIndex = 0; gen->activeSessions.writeIndex = 0; }
void TransactionWidget::loadQuery() { ThreadControl *tc = qobject_cast<ThreadControl *>( sender() ); if( !tc ) return; int i = tc->getIndexOfLastQuery( qList ); if( i < 0 ) return; QString str = tc->getData(); switch(i) { case 0: { loadHeader( str ); break; } case 1: case 4: case 5: { loadTransactions( str ); break; } case 2: { clearTransaction( str ); break; } case 3: { loadAccount( str ); break; } case 6: case 7: { loadAccountSaldo( str ); break; } } }