summaryrefslogtreecommitdiff
path: root/ndb/test/ndbapi/testDict.cpp
diff options
context:
space:
mode:
authorunknown <mronstrom@mysql.com>2004-08-26 18:25:48 +0200
committerunknown <mronstrom@mysql.com>2004-08-26 18:25:48 +0200
commit68750ccfda19440a2a844dc92872b969539cdf06 (patch)
tree50e58a0ef6d96016dfe053ab53c79bcfceb8b930 /ndb/test/ndbapi/testDict.cpp
parente387719d468da6571f50c9938c50b4091a1065c4 (diff)
downloadmariadb-git-68750ccfda19440a2a844dc92872b969539cdf06.tar.gz
Fixed wrong number of fragment records in DIH
Fixed bug in failed create table Fixed new test case for failed create table using new ERROR_INSERT ndb/src/kernel/blocks/ERROR_codes.txt: Added new error insert for test of failed create table ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Added new error insert for test of failed create table Fixed bug in handling failed create table Moved some constants to pc.hpp ndb/src/kernel/vm/Configuration.cpp: Added new error insert for test of failed create table Fixed bug in handling failed create table Moved some constants to pc.hpp ndb/src/kernel/vm/pc.hpp: Constants moved here from DIH ndb/test/ndbapi/testDict.cpp: New test case for failed create table
Diffstat (limited to 'ndb/test/ndbapi/testDict.cpp')
-rw-r--r--ndb/test/ndbapi/testDict.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/ndb/test/ndbapi/testDict.cpp b/ndb/test/ndbapi/testDict.cpp
index e7597c26960..c527bbd655b 100644
--- a/ndb/test/ndbapi/testDict.cpp
+++ b/ndb/test/ndbapi/testDict.cpp
@@ -1002,11 +1002,13 @@ int runGetPrimaryKey(NDBT_Context* ctx, NDBT_Step* step){
return result;
}
-int
+struct ErrorCodes { int error_id; bool crash;};
+ErrorCodes
NF_codes[] = {
- 6003
- ,6004
- //,6005
+ {6003, true},
+ {6004, true},
+ //,6005, true,
+ {7173, false}
};
int
@@ -1042,7 +1044,9 @@ runNF1(NDBT_Context* ctx, NDBT_Step* step){
for(int i = 0; i<sz; i++){
int rand = myRandom48(restarter.getNumDbNodes());
int nodeId = restarter.getRandomNotMasterNodeId(rand);
- int error = NF_codes[i];
+ struct ErrorCodes err_struct = NF_codes[i];
+ int error = err_struct.error_id;
+ bool crash = err_struct.crash;
g_info << "NF1: node = " << nodeId << " error code = " << error << endl;
@@ -1057,31 +1061,33 @@ runNF1(NDBT_Context* ctx, NDBT_Step* step){
CHECK2(dict->createTable(* pTab) == 0,
"failed to create table");
- CHECK2(restarter.waitNodesNoStart(&nodeId, 1) == 0,
+ if (crash) {
+ CHECK2(restarter.waitNodesNoStart(&nodeId, 1) == 0,
"waitNodesNoStart failed");
- if(myRandom48(100) > 50){
- CHECK2(restarter.startNodes(&nodeId, 1) == 0,
+ if(myRandom48(100) > 50){
+ CHECK2(restarter.startNodes(&nodeId, 1) == 0,
"failed to start node");
- CHECK2(restarter.waitClusterStarted() == 0,
+ CHECK2(restarter.waitClusterStarted() == 0,
"waitClusterStarted failed");
- CHECK2(dict->dropTable(pTab->getName()) == 0,
+ CHECK2(dict->dropTable(pTab->getName()) == 0,
"drop table failed");
- } else {
- CHECK2(dict->dropTable(pTab->getName()) == 0,
+ } else {
+ CHECK2(dict->dropTable(pTab->getName()) == 0,
"drop table failed");
- CHECK2(restarter.startNodes(&nodeId, 1) == 0,
+ CHECK2(restarter.startNodes(&nodeId, 1) == 0,
"failed to start node");
- CHECK2(restarter.waitClusterStarted() == 0,
+ CHECK2(restarter.waitClusterStarted() == 0,
"waitClusterStarted failed");
- }
+ }
- CHECK2(restarter.dumpStateOneNode(nodeId, &val, 1) == 0,
+ CHECK2(restarter.dumpStateOneNode(nodeId, &val, 1) == 0,
"Failed to set LCP to min value");
+ }
}
}
end: