diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2006-08-01 17:06:02 +0200 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2006-08-01 17:06:02 +0200 |
commit | 2f8bc2141ef9045b4dafe57d5946e40cf8cbf7c7 (patch) | |
tree | 5cce023ea5da7bc6bd2298bdea451528616394d5 /ndb/test | |
parent | eb94c0c9f2aeb799926910c901fd53f47ebde011 (diff) | |
parent | 0752f2d52b3d3f19fe57d890d7fc0cd25d7f522a (diff) | |
download | mariadb-git-2f8bc2141ef9045b4dafe57d5946e40cf8cbf7c7.tar.gz |
Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into perch.ndb.mysql.com:/home/jonas/src/50-work
ndb/src/kernel/blocks/ERROR_codes.txt:
Auto merged
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
Auto merged
ndb/test/ndbapi/testIndex.cpp:
Auto merged
ndb/test/run-test/daily-basic-tests.txt:
Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
merge
Diffstat (limited to 'ndb/test')
-rw-r--r-- | ndb/test/ndbapi/testIndex.cpp | 52 | ||||
-rw-r--r-- | ndb/test/run-test/daily-basic-tests.txt | 4 |
2 files changed, 56 insertions, 0 deletions
diff --git a/ndb/test/ndbapi/testIndex.cpp b/ndb/test/ndbapi/testIndex.cpp index 5785db232c4..c25aae55897 100644 --- a/ndb/test/ndbapi/testIndex.cpp +++ b/ndb/test/ndbapi/testIndex.cpp @@ -1199,6 +1199,48 @@ int runLQHKEYREF(NDBT_Context* ctx, NDBT_Step* step){ return NDBT_OK; } +int +runBug21384(NDBT_Context* ctx, NDBT_Step* step) +{ + Ndb* pNdb = GETNDB(step); + HugoTransactions hugoTrans(*ctx->getTab()); + NdbRestarter restarter; + + int loops = ctx->getNumLoops(); + const int rows = ctx->getNumRecords(); + const int batchsize = ctx->getProperty("BatchSize", 50); + + while (loops--) + { + if(restarter.insertErrorInAllNodes(8037) != 0) + { + g_err << "Failed to error insert(8037)" << endl; + return NDBT_FAILED; + } + + if (hugoTrans.indexReadRecords(pNdb, pkIdxName, rows, batchsize) == 0) + { + g_err << "Index succeded (it should have failed" << endl; + return NDBT_FAILED; + } + + if(restarter.insertErrorInAllNodes(0) != 0) + { + g_err << "Failed to error insert(0)" << endl; + return NDBT_FAILED; + } + + if (hugoTrans.indexReadRecords(pNdb, pkIdxName, rows, batchsize) != 0){ + g_err << "Index read failed" << endl; + return NDBT_FAILED; + } + } + + return NDBT_OK; +} + + + NDBT_TESTSUITE(testIndex); TESTCASE("CreateAll", "Test that we can create all various indexes on each table\n" @@ -1512,6 +1554,16 @@ TESTCASE("UniqueNull", FINALIZER(createPkIndex_Drop); FINALIZER(runClearTable); } +TESTCASE("Bug21384", + "Test that unique indexes and nulls"){ + TC_PROPERTY("LoggedIndexes", (unsigned)0); + INITIALIZER(runClearTable); + INITIALIZER(createPkIndex); + INITIALIZER(runLoadTable); + STEP(runBug21384); + FINALIZER(createPkIndex_Drop); + FINALIZER(runClearTable); +} NDBT_TESTSUITE_END(testIndex); int main(int argc, const char** argv){ diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt index cbb8a9a2574..a2edc568426 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -449,6 +449,10 @@ max-time: 1000 cmd: testNodeRestart args: -n Bug20185 T1 +max-time: 1000 +cmd: testIndex +args: -n Bug21384 + # OLD FLEX max-time: 500 cmd: flexBench |