diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2007-10-15 09:10:14 +0200 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2007-10-15 09:10:14 +0200 |
commit | 007e29e2bc04ab78dd1abc7240b5c22731d598d3 (patch) | |
tree | 87aa03e38d315072946dcaab21143d426cc343cb /storage/ndb/test | |
parent | 72a432e205815e4ad3f52862564e39055d375ad6 (diff) | |
download | mariadb-git-007e29e2bc04ab78dd1abc7240b5c22731d598d3.tar.gz |
ndb - bug#31482
(re)impl. simple-read (read that releases lock just before LQHKEYCONF)
use simple-read for blobs
storage/ndb/include/kernel/signaldata/TcKeyConf.hpp:
rename bit
storage/ndb/include/ndbapi/NdbOperation.hpp:
add new lock-mode
storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp:
rename bit
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
remove aggregate
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
impl. simple-read = normal read + release lock just before LQHKEYCONF
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
impl. simple-read = normal read + release lock just before LQHKEYCONF
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
impl. simple-read = normal read + release lock just before LQHKEYCONF
storage/ndb/src/ndbapi/NdbBlob.cpp:
use simple read for blobs
storage/ndb/src/ndbapi/NdbIndexOperation.cpp:
no simple-read for ui (yet)
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
impl. simple-read
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
impl. simple-read
storage/ndb/src/ndbapi/NdbReceiver.cpp:
impl. simple-read
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
no simple-read for scan (yet)
storage/ndb/src/ndbapi/NdbTransaction.cpp:
rename bit
storage/ndb/test/ndbapi/testBasic.cpp:
add testcase for simlpe-read
storage/ndb/test/run-test/daily-basic-tests.txt:
add testcase
storage/ndb/test/src/HugoOperations.cpp:
add simple-read
Diffstat (limited to 'storage/ndb/test')
-rw-r--r-- | storage/ndb/test/ndbapi/testBasic.cpp | 35 | ||||
-rw-r--r-- | storage/ndb/test/run-test/daily-basic-tests.txt | 8 | ||||
-rw-r--r-- | storage/ndb/test/src/HugoOperations.cpp | 1 |
3 files changed, 22 insertions, 22 deletions
diff --git a/storage/ndb/test/ndbapi/testBasic.cpp b/storage/ndb/test/ndbapi/testBasic.cpp index 952b5a50dc5..ac23ceaad18 100644 --- a/storage/ndb/test/ndbapi/testBasic.cpp +++ b/storage/ndb/test/ndbapi/testBasic.cpp @@ -136,31 +136,13 @@ int runPkRead(NDBT_Context* ctx, NDBT_Step* step){ int loops = ctx->getNumLoops(); int records = ctx->getNumRecords(); int batchSize = ctx->getProperty("BatchSize", 1); + int lm = ctx->getProperty("LockMode", NdbOperation::LM_Read); int i = 0; HugoTransactions hugoTrans(*ctx->getTab()); while (i<loops) { g_info << i << ": "; - if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize) != NDBT_OK){ - g_info << endl; - return NDBT_FAILED; - } - i++; - } - g_info << endl; - return NDBT_OK; -} - -int runPkDirtyRead(NDBT_Context* ctx, NDBT_Step* step){ - int loops = ctx->getNumLoops(); - int records = ctx->getNumRecords(); - int batchSize = ctx->getProperty("BatchSize", 1); - int i = 0; - bool dirty = true; - HugoTransactions hugoTrans(*ctx->getTab()); - while (i<loops) { - g_info << i << ": "; - if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize, - NdbOperation::LM_CommittedRead) != NDBT_OK){ + if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize, + (NdbOperation::LockMode)lm) != NDBT_OK){ g_info << endl; return NDBT_FAILED; } @@ -1552,14 +1534,23 @@ TESTCASE("PkInsert", } TESTCASE("PkRead", "Verify that we can insert, read and delete from this table using PK"){ + TC_PROPERTY("LockMode", NdbOperation::LM_Read); INITIALIZER(runLoadTable); STEP(runPkRead); FINALIZER(runClearTable); } TESTCASE("PkDirtyRead", "Verify that we can insert, dirty read and delete from this table using PK"){ + TC_PROPERTY("LockMode", NdbOperation::LM_Dirty); INITIALIZER(runLoadTable); - STEP(runPkDirtyRead); + STEP(runPkRead); + FINALIZER(runClearTable); +} +TESTCASE("PkSimpleRead", + "Verify that we can insert, simple read and delete from this table using PK"){ + TC_PROPERTY("LockMode", NdbOperation::LM_SimpleRead); + INITIALIZER(runLoadTable); + STEP(runPkRead); FINALIZER(runClearTable); } TESTCASE("PkUpdate", diff --git a/storage/ndb/test/run-test/daily-basic-tests.txt b/storage/ndb/test/run-test/daily-basic-tests.txt index 0ca81b7f63b..450a9996101 100644 --- a/storage/ndb/test/run-test/daily-basic-tests.txt +++ b/storage/ndb/test/run-test/daily-basic-tests.txt @@ -65,6 +65,14 @@ args: -n PkRead max-time: 500 cmd: testBasic +args: -n PkSimpleRead + +max-time: 500 +cmd: testBasic +args: -n PkDirtyRead + +max-time: 500 +cmd: testBasic args: -n PkUpdate max-time: 500 diff --git a/storage/ndb/test/src/HugoOperations.cpp b/storage/ndb/test/src/HugoOperations.cpp index 1a2e5180f1f..93a9eaf435a 100644 --- a/storage/ndb/test/src/HugoOperations.cpp +++ b/storage/ndb/test/src/HugoOperations.cpp @@ -93,6 +93,7 @@ rand_lock_mode: case NdbOperation::LM_Read: case NdbOperation::LM_Exclusive: case NdbOperation::LM_CommittedRead: + case NdbOperation::LM_SimpleRead: if(idx && idx->getType() == NdbDictionary::Index::OrderedIndex && pIndexScanOp == 0) { |