diff options
author | unknown <joreland@mysql.com> | 2004-11-22 08:20:34 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2004-11-22 08:20:34 +0100 |
commit | 366ef4faebf354e28afbcf104635a1400e99cbeb (patch) | |
tree | e62aff8c238f4510f2e229834c2f6871bad7f480 /ndb/test | |
parent | 5a022e7ba99ea492da74a95907574d852deda514 (diff) | |
parent | 5a7198f54d1a11ac7ef70a55c6a9b9044147df54 (diff) | |
download | mariadb-git-366ef4faebf354e28afbcf104635a1400e99cbeb.tar.gz |
Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/wl2077
client/Makefile.am:
Auto merged
client/mysqladmin.cc:
Auto merged
ndb/src/kernel/vm/Configuration.cpp:
Auto merged
Diffstat (limited to 'ndb/test')
-rw-r--r-- | ndb/test/ndbapi/testDict.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ndb/test/ndbapi/testDict.cpp b/ndb/test/ndbapi/testDict.cpp index 712ab2e4d25..0a43bb02fff 100644 --- a/ndb/test/ndbapi/testDict.cpp +++ b/ndb/test/ndbapi/testDict.cpp @@ -1480,8 +1480,10 @@ runTestDictionaryPerf(NDBT_Context* ctx, NDBT_Step* step){ } int runFailAddFragment(NDBT_Context* ctx, NDBT_Step* step){ + static int acclst[] = { 3001 }; static int tuplst[] = { 4007, 4008, 4009, 4010, 4011, 4012 }; static int tuxlst[] = { 12001, 12002, 12003, 12004, 12005, 12006 }; + static unsigned acccnt = sizeof(acclst)/sizeof(acclst[0]); static unsigned tupcnt = sizeof(tuplst)/sizeof(tuplst[0]); static unsigned tuxcnt = sizeof(tuxlst)/sizeof(tuxlst[0]); @@ -1509,6 +1511,19 @@ int runFailAddFragment(NDBT_Context* ctx, NDBT_Step* step){ (void)pDic->dropTable(tab.getName()); for (int l = 0; l < loops; l++) { + for (unsigned i0 = 0; i0 < acccnt; i0++) { + unsigned j = (l == 0 ? i0 : myRandom48(acccnt)); + int errval = acclst[j]; + g_info << "insert error node=" << nodeId << " value=" << errval << endl; + CHECK2(restarter.insertErrorInNode(nodeId, errval) == 0, + "failed to set error insert"); + CHECK2(pDic->createTable(tab) != 0, + "failed to fail after error insert " << errval); + CHECK2(pDic->createTable(tab) == 0, + pDic->getNdbError()); + CHECK2(pDic->dropTable(tab.getName()) == 0, + pDic->getNdbError()); + } for (unsigned i1 = 0; i1 < tupcnt; i1++) { unsigned j = (l == 0 ? i1 : myRandom48(tupcnt)); int errval = tuplst[j]; @@ -1638,7 +1653,7 @@ TESTCASE("DictionaryPerf", INITIALIZER(runTestDictionaryPerf); } TESTCASE("FailAddFragment", - "Fail add fragment or attribute in TUP or TUX\n"){ + "Fail add fragment or attribute in ACC or TUP or TUX\n"){ INITIALIZER(runFailAddFragment); } NDBT_TESTSUITE_END(testDict); @@ -1650,5 +1665,3 @@ int main(int argc, const char** argv){ myRandom48Init(NdbTick_CurrentMillisecond()); return testDict.execute(argc, argv); } - - |