summaryrefslogtreecommitdiff
path: root/ndb/test/ndbapi/testDict.cpp
diff options
context:
space:
mode:
authorunknown <pekka@mysql.com>2004-11-19 16:49:17 +0100
committerunknown <pekka@mysql.com>2004-11-19 16:49:17 +0100
commit79d806693f3d0e06328e7d67b6216b03af8fa91c (patch)
treed1efc7adf24fc08c6b23c511f3ab283cca79f889 /ndb/test/ndbapi/testDict.cpp
parentb699f969a53c5a034cf27b97181b18a3b900789e (diff)
downloadmariadb-git-79d806693f3d0e06328e7d67b6216b03af8fa91c.tar.gz
ndb: do not crash on config mismatch if release compiled
ndb/src/kernel/blocks/ERROR_codes.txt: do not crash on config mismatch if release compiled ndb/src/kernel/blocks/dbacc/DbaccMain.cpp: do not crash on config mismatch if release compiled ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: do not crash on config mismatch if release compiled ndb/test/ndbapi/testDict.cpp: do not crash on config mismatch if release compiled
Diffstat (limited to 'ndb/test/ndbapi/testDict.cpp')
-rw-r--r--ndb/test/ndbapi/testDict.cpp19
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);
}
-
-