summaryrefslogtreecommitdiff
path: root/ndb/test/ndbapi/testBasic.cpp
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2004-10-08 16:42:51 +0200
committerunknown <joreland@mysql.com>2004-10-08 16:42:51 +0200
commit950c68259350412c81c59dfc2843d4f00cfa0ea5 (patch)
tree9f2bc2ae3091f2ed8a1f9dcb600ebabb266a1da4 /ndb/test/ndbapi/testBasic.cpp
parentb5c406a1f7948721edad8733e3f7fc99f659d54a (diff)
downloadmariadb-git-950c68259350412c81c59dfc2843d4f00cfa0ea5.tar.gz
Test prg update
- make test node restart test harder ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Removed debug printout ndb/test/include/HugoOperations.hpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode) ndb/test/include/HugoTransactions.hpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode) ndb/test/ndbapi/testBasic.cpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode) ndb/test/ndbapi/testNdbApi.cpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode) ndb/test/ndbapi/testNodeRestart.cpp: Use mixed pkread Use rand() no of records Use rand() batch size Restart node abort (instead of graceful) ndb/test/ndbapi/testOperations.cpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode) ndb/test/ndbapi/testTransactions.cpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode) ndb/test/run-test/daily-devel-tests.txt: Run mixed pkread tests instead of just LM_Read (readTuple()) ndb/test/src/HugoOperations.cpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode) ndb/test/src/HugoTransactions.cpp: Remove multipl pkRead (simple/dirty)... and replace with pkRead(LockMode)
Diffstat (limited to 'ndb/test/ndbapi/testBasic.cpp')
-rw-r--r--ndb/test/ndbapi/testBasic.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/ndb/test/ndbapi/testBasic.cpp b/ndb/test/ndbapi/testBasic.cpp
index 7d03016b87a..4fa9ae77ca2 100644
--- a/ndb/test/ndbapi/testBasic.cpp
+++ b/ndb/test/ndbapi/testBasic.cpp
@@ -160,8 +160,8 @@ int runPkDirtyRead(NDBT_Context* ctx, NDBT_Step* step){
HugoTransactions hugoTrans(*ctx->getTab());
while (i<loops) {
g_info << i << ": ";
- if (hugoTrans.pkReadRecords(GETNDB(step), records,
- batchSize, dirty) != NDBT_OK){
+ if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize,
+ NdbOperation::LM_CommittedRead) != NDBT_OK){
g_info << endl;
return NDBT_FAILED;
}
@@ -736,7 +736,7 @@ int runCheckRollbackUpdate(NDBT_Context* ctx, NDBT_Step* step){
// Read value and save it for later
CHECK(hugoOps.startTransaction(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 1, false, numRecords) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 1, numRecords) == 0);
CHECK(hugoOps.execute_Commit(pNdb) == 0);
CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK); // Update value 0
CHECK(hugoOps.closeTransaction(pNdb) == 0);
@@ -747,7 +747,7 @@ int runCheckRollbackUpdate(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
// Check record is updated
- CHECK(hugoOps.pkReadRecord(pNdb, 1, true, numRecords) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 1, numRecords, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
CHECK(hugoOps.verifyUpdatesValue(5) == NDBT_OK); // Updates value 5
CHECK(hugoOps.execute_Rollback(pNdb) == 0);
@@ -756,7 +756,7 @@ int runCheckRollbackUpdate(NDBT_Context* ctx, NDBT_Step* step){
// Check record is back to original value
CHECK(hugoOps.startTransaction(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 1, true, numRecords) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 1, numRecords, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_Commit(pNdb) == 0);
CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK); // Updates value 0
@@ -775,7 +775,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
do{
// Read value and save it for later
CHECK(hugoOps.startTransaction(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 5, false, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10) == 0);
CHECK(hugoOps.execute_Commit(pNdb) == 0);
CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK);
CHECK(hugoOps.closeTransaction(pNdb) == 0);
@@ -785,7 +785,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
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.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
for(j = 0; j<10; j++){
@@ -794,7 +794,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoOps.pkUpdateRecord(pNdb, 5, 10, updatesValue) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
CHECK(hugoOps.verifyUpdatesValue(updatesValue) == 0);
}
@@ -806,7 +806,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
#if 0
// Check records are deleted
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
#endif
@@ -814,7 +814,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoOps.pkInsertRecord(pNdb, 5, 10, updatesValue) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
CHECK(hugoOps.verifyUpdatesValue(updatesValue) == 0);
}
@@ -823,7 +823,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
// Check records are deleted
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
CHECK(hugoOps.execute_Rollback(pNdb) == 0);
@@ -833,7 +833,7 @@ int runCheckRollbackDeleteMultiple(NDBT_Context* ctx, NDBT_Step* step){
// Check records are not deleted
// after rollback
CHECK(hugoOps.startTransaction(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_Commit(pNdb) == 0);
CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK);
@@ -889,7 +889,7 @@ int runCheckCommitDelete(NDBT_Context* ctx, NDBT_Step* step){
do{
// Read 10 records
CHECK(hugoOps.startTransaction(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
// Update 10 records
@@ -905,7 +905,7 @@ int runCheckCommitDelete(NDBT_Context* ctx, NDBT_Step* step){
// Check record's are deleted
CHECK(hugoOps.startTransaction(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_Commit(pNdb) == 626);
}while(false);
@@ -930,7 +930,7 @@ int runRollbackNothing(NDBT_Context* ctx, NDBT_Step* step){
// Check records are not deleted
CHECK(hugoOps.startTransaction(pNdb) == 0);
- CHECK(hugoOps.pkReadRecord(pNdb, 5, true, 10) == 0);
+ CHECK(hugoOps.pkReadRecord(pNdb, 5, 10, NdbOperation::LM_Exclusive) == 0);
CHECK(hugoOps.execute_Commit(pNdb) == 0);
CHECK(hugoOps.closeTransaction(pNdb) == 0);