41 #define NUMBEROFRECORDS 10
43 #define ATTRNAMELEN 16
46 static void createTable_IPACCT(
Ndb*);
47 static void createTable_RPACCT(
Ndb*);
48 static void createTable_SBMCALL(
Ndb*);
49 static void createTable_TODACCT(
Ndb*);
51 static void error_handler(
const char*);
52 static bool error_handler2(
const char*,
int) ;
54 static void setAttrNames(
void);
55 static void setTableNames(
void);
57 static void insert_rows(
Ndb*);
58 static void update_rows(
Ndb*);
59 static void delete_rows(
Ndb*);
60 static void verify_deleted(
Ndb*);
61 static void read_and_verify_rows(
Ndb*);
63 static void insert_IPACCT(
Ndb*, Uint32, Uint32, Uint32, Uint32, Uint32);
65 static void read_IPACCT(
Ndb* , Uint32 , Uint32 , Uint32 );
67 static int tAttributeSize;
68 static int bTestPassed;
70 static char tableName[MAXTABLES][ATTRNAMELEN];
static char attrName[MAXATTR][ATTRNAMELEN];
71 static int attrValue[NUMBEROFRECORDS];
72 static int pkValue[NUMBEROFRECORDS];
73 static int failed = 0 ;
76 NDB_COMMAND(celloDb,
"celloDb",
"celloDb",
"celloDb", 65535)
82 Ndb MyNdb(
"CELLO-SESSION-DB" );
99 if (MyNdb.waitUntilReady() == 0) {
100 ndbout << endl <<
"Cello session db - Starting " << endl;
101 ndbout <<
"Test basic functions and status of NDB" << endl;
105 createTable_SBMCALL (&MyNdb );
106 createTable_RPACCT (&MyNdb );
107 createTable_TODACCT (&MyNdb );
108 createTable_IPACCT (&MyNdb );
110 insert_IPACCT(&MyNdb, 1,2,1,2,2);
111 read_IPACCT(&MyNdb, 1, 2 , 1);
136 if (bTestPassed == 0)
139 ndbout <<
"OK - Test passed" << endl;
144 ndbout <<
"FAIL - Test failed" << endl;
151 error_handler(
const char* errorText)
154 ndbout << endl <<
"ErrorMessage: " << errorText << endl;
159 createTable_SBMCALL (
Ndb* pMyNdb )
170 const char* tname =
"SBMCALL";
171 Uint32 recordsize = 244;
173 Uint32 tTableId = pMyNdb->getTable()->openTable(tname);
175 if (tTableId == -1) {
181 ndbout <<
"Creating " << tname <<
"..." << endl;
183 MySchemaTransaction = pMyNdb->startSchemaTransaction();
184 if( ( MySchemaTransaction == NULL ) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
188 if( ( MySchemaOp == NULL ) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
194 Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
195 Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
197 ndbout <<
"table size " << tablesize <<
"for table name " << tname << endl;
212 error_handler(MySchemaTransaction->getNdbErrorString());
227 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
240 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
253 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
265 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
277 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
281 if( (MySchemaTransaction->
execute() == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
284 pMyNdb->closeSchemaTransaction(MySchemaTransaction);
285 ndbout <<
"done" << endl;
296 createTable_RPACCT(
Ndb*pMyNdb)
308 const char* tname =
"RPACCT";
309 Uint32 recordsize = 380;
311 Uint32 tTableId = pMyNdb->getTable()->openTable(tname);
313 if (tTableId == -1) {
319 ndbout <<
"Creating " << tname <<
"..." << endl;
321 MySchemaTransaction = pMyNdb->startSchemaTransaction();
322 if( MySchemaTransaction == NULL )
323 error_handler(MySchemaTransaction->getNdbErrorString());
326 if( MySchemaOp == NULL )
327 error_handler(MySchemaTransaction->getNdbErrorString());
331 Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
332 Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
334 ndbout <<
"table size " << tablesize <<
"for table name " << tname << endl;
336 check = MySchemaOp->createTable( tname,
343 error_handler(MySchemaTransaction->getNdbErrorString());
348 check = MySchemaOp->createAttribute(
"SPBBOARDID",
356 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
361 check = MySchemaOp->createAttribute(
"CALLID",
369 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
374 check = MySchemaOp->createAttribute(
"MSID",
382 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
387 check = MySchemaOp->createAttribute(
"PDSN",
395 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
400 check = MySchemaOp->createAttribute(
"SPCF",
408 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
414 check = MySchemaOp->createAttribute(
"BSID",
422 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
430 check = MySchemaOp->createAttribute(
"UZ",
438 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
443 check = MySchemaOp->createAttribute(
"FMO",
451 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
456 check = MySchemaOp->createAttribute(
"RMO",
464 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
469 check = MySchemaOp->createAttribute(
"FFR",
477 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
482 check = MySchemaOp->createAttribute(
"RFR",
490 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
496 check = MySchemaOp->createAttribute(
"SO",
504 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
511 check = MySchemaOp->createAttribute(
"FTT",
519 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
525 check = MySchemaOp->createAttribute(
"RTT",
533 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
539 check = MySchemaOp->createAttribute(
"FFS",
547 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
553 check = MySchemaOp->createAttribute(
"FFRC",
561 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
567 check = MySchemaOp->createAttribute(
"RFRC",
575 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
580 check = MySchemaOp->createAttribute(
"DCCH",
588 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
593 check = MySchemaOp->createAttribute(
"AQOS",
601 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
607 check = MySchemaOp->createAttribute(
"BPPPFC",
615 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
622 check = MySchemaOp->createAttribute(
"AT",
630 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
636 check = MySchemaOp->createAttribute(
"NBAT",
644 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
649 check = MySchemaOp->createAttribute(
"SDBOCI",
657 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
664 check = MySchemaOp->createAttribute(
"NBSDBI",
672 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
679 check = MySchemaOp->createAttribute(
"NBSDBO",
687 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
694 check = MySchemaOp->createAttribute(
"HDLC",
702 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
707 if( (MySchemaTransaction->
execute() == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
710 pMyNdb->closeSchemaTransaction(MySchemaTransaction);
711 ndbout <<
"done" << endl;
720 createTable_IPACCT(
Ndb* pMyNdb)
733 const char* tname =
"IPACCT";
734 Uint32 recordsize = 70;
736 Uint32 tTableId = pMyNdb->getTable()->openTable(tname);
738 if (tTableId == -1) {
744 ndbout <<
"Creating " << tname <<
"..." << endl;
746 MySchemaTransaction = pMyNdb->startSchemaTransaction();
747 if( MySchemaTransaction == NULL )
748 error_handler(MySchemaTransaction->getNdbErrorString());
751 if( MySchemaOp == NULL )
752 error_handler(MySchemaTransaction->getNdbErrorString());
756 Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
757 Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
759 ndbout <<
"table size " << tablesize <<
"for table name " << tname << endl;
761 check = MySchemaOp->createTable( tname,
768 error_handler(MySchemaTransaction->getNdbErrorString());
773 check = MySchemaOp->createAttribute(
"SPBBOARDID",
781 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
786 check = MySchemaOp->createAttribute(
"CALLID",
794 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
798 check = MySchemaOp->createAttribute(
"IPADDR",
806 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
813 check = MySchemaOp->createAttribute(
"ASID",
821 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
826 check = MySchemaOp->createAttribute(
"CID",
834 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
839 check = MySchemaOp->createAttribute(
"MIPHA",
847 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
855 check = MySchemaOp->createAttribute(
"IPT",
863 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
869 check = MySchemaOp->createAttribute(
"CTID",
877 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
881 check = MySchemaOp->createAttribute(
"IPQOS",
889 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
894 check = MySchemaOp->createAttribute(
"DOCI",
902 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
906 check = MySchemaOp->createAttribute(
"DOCO",
914 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
918 check = MySchemaOp->createAttribute(
"ET",
926 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
930 check = MySchemaOp->createAttribute(
"IMSC",
938 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
942 check = MySchemaOp->createAttribute(
"OMSC",
950 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
954 if( (MySchemaTransaction->
execute() == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
957 pMyNdb->closeSchemaTransaction(MySchemaTransaction);
958 ndbout <<
"done" << endl;
969 createTable_TODACCT(
Ndb* pMyNdb)
982 const char* tname =
"TODACCT";
983 Uint32 recordsize = 92;
985 Uint32 tTableId = pMyNdb->getTable()->openTable(tname);
987 if (tTableId == -1) {
993 ndbout <<
"Creating " << tname <<
"..." << endl;
995 MySchemaTransaction = pMyNdb->startSchemaTransaction();
996 if( MySchemaTransaction == NULL )
997 error_handler(MySchemaTransaction->getNdbErrorString());
1000 if( MySchemaOp == NULL )
1001 error_handler(MySchemaTransaction->getNdbErrorString());
1005 Uint32 tablesize=(recordsize*NUMBEROFRECORDS + OVERHEAD * NUMBEROFRECORDS)/1024;
1006 Uint32 noPages=(pksize*NUMBEROFRECORDS)/PAGESIZE;
1008 ndbout <<
"table size " << tablesize <<
"for table name " << tname << endl;
1010 check = MySchemaOp->createTable( tname,
1017 error_handler(MySchemaTransaction->getNdbErrorString());
1022 check = MySchemaOp->createAttribute(
"SPBBOARDID",
1030 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
1035 check = MySchemaOp->createAttribute(
"CALLID",
1043 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
1047 check = MySchemaOp->createAttribute(
"IPADDR",
1055 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
1061 check = MySchemaOp->createAttribute(
"INDEX",
1069 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
1076 check = MySchemaOp->createAttribute(
"TOD",
1085 if( (check == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
1090 if( (MySchemaTransaction->
execute() == -1) && (!error_handler2((
const char*)MySchemaTransaction->getNdbErrorString(), MySchemaTransaction->
getNdbError())) )
1093 pMyNdb->closeSchemaTransaction(MySchemaTransaction);
1094 ndbout <<
"done" << endl;
1106 static void read_IPACCT(
Ndb* pMyNdb, Uint32 CALLID, Uint32 SPBBOARDID , Uint32 IPADDR)
1113 int count_attributes;
1122 if (MyTransaction == NULL)
1123 error_handler(pMyNdb->getNdbErrorString());
1126 if (MyOperation == NULL)
1127 error_handler( MyTransaction->getNdbErrorString());
1129 check = MyOperation->readTuple();
1131 error_handler( MyTransaction->getNdbErrorString());
1133 check = MyOperation->equal(
"SPBBOARDID",SPBBOARDID );
1135 error_handler( MyTransaction->getNdbErrorString());
1138 check = MyOperation->equal(
"IPADDR",
"IPADDR" );
1140 error_handler( MyTransaction->getNdbErrorString());
1143 check = MyOperation->equal(
"CALLID",CALLID );
1145 error_handler( MyTransaction->getNdbErrorString());
1150 tTmp = MyOperation->getValue(
"IPQOS", NULL );
1152 error_handler( MyTransaction->getNdbErrorString());
1153 ndbout <<
" tTmp " << tTmp->isNULL() << endl;
1154 MyTransaction->
execute(Commit);
1156 ndbout <<
" value read " << tTmp->int32_value() << endl;
1162 static void insert_IPACCT(
Ndb* pMyNdb, Uint32 CALLID, Uint32 SPBBOARDID , Uint32 IPADDR, Uint32 ASID, Uint32 IPQOS)
1176 ndbout <<
"Inserting records..." << flush;
1179 if (MyTransaction == NULL)
1180 error_handler(pMyNdb->getNdbErrorString());
1183 if (MyOperation == NULL)
1184 error_handler(MyTransaction->getNdbErrorString());
1188 check = MyOperation->insertTuple();
1190 error_handler(MyTransaction->getNdbErrorString());
1192 ndbout <<
"insertTuple" << endl;
1194 check = MyOperation->equal(
"CALLID",CALLID );
1196 error_handler(MyTransaction->getNdbErrorString());
1197 ndbout <<
"equal" << endl;
1200 check = MyOperation->equal(
"SPBBOARDID",SPBBOARDID );
1202 error_handler(MyTransaction->getNdbErrorString());
1203 ndbout <<
"equal" << endl;
1206 check = MyOperation->equal(
"IPADDR",
"IPADDR" );
1208 error_handler(MyTransaction->getNdbErrorString());
1209 ndbout <<
"equal" << endl;
1212 check = MyOperation->setValue(
"IPQOS", IPQOS);
1214 error_handler(MyTransaction->getNdbErrorString());
1215 ndbout <<
"Set Value" << endl;
1219 check = MyOperation->setValue(
"ASID", ASID);
1221 error_handler(MyTransaction->getNdbErrorString());
1222 ndbout <<
"Set Value" << endl;
1225 check = MyTransaction->
execute( Commit );
1227 ndbout <<
"error at commit" << endl;
1228 error_handler(MyTransaction->getNdbErrorString());
1237 ndbout <<
"OK" << endl;
1243 update_rows(
Ndb* pMyNdb){
1256 ndbout <<
"Updating records..." << flush;
1258 loop_count_ops = NUMBEROFRECORDS;
1260 for (count=0 ; count < loop_count_ops ; count++) {
1263 if (MyTransaction == NULL)
1264 error_handler( pMyNdb->getNdbErrorString() );
1267 if (MyOperation == NULL)
1268 error_handler(MyTransaction->getNdbErrorString());
1270 check = MyOperation->updateTuple();
1272 error_handler(MyTransaction->getNdbErrorString());
1274 check = MyOperation->equal( attrName[0], (
char*)&pkValue[count] );
1276 error_handler(MyTransaction->getNdbErrorString());
1278 for (i = 1; i < MAXATTR; i++)
1280 check = MyOperation->setValue( attrName[i], (
char*)&attrValue[count]);
1282 error_handler(MyTransaction->getNdbErrorString());
1285 if( MyTransaction->
execute( Commit ) == -1 )
1286 error_handler(MyTransaction->getNdbErrorString());
1294 ndbout <<
"OK" << endl;
1300 delete_rows(
Ndb* pMyNdb){
1313 ndbout <<
"Deleting records..."<< flush;
1315 loop_count_ops = NUMBEROFRECORDS;
1317 for (count=0 ; count < loop_count_ops ; count++) {
1320 if (MyTransaction == NULL)
1321 error_handler( pMyNdb->getNdbErrorString() );
1324 if (MyOperation == NULL)
1325 error_handler(MyTransaction->getNdbErrorString());
1328 check = MyOperation->deleteTuple();
1330 error_handler(MyTransaction->getNdbErrorString());
1332 check = MyOperation->equal( attrName[0], (
char*)&pkValue[count] );
1334 error_handler(MyTransaction->getNdbErrorString());
1337 if( MyTransaction->
execute( Commit ) == -1 )
1338 error_handler(MyTransaction->getNdbErrorString());
1346 ndbout <<
"OK" << endl;
1352 verify_deleted(
Ndb* pMyNdb){
1359 ndbout <<
"Verifying deleted records..."<< flush;
1361 loop_count_ops = NUMBEROFRECORDS;
1363 for (count=0 ; count < loop_count_ops ; count++)
1366 if (MyTransaction == NULL)
1367 error_handler(pMyNdb->getNdbErrorString());
1370 if (MyOperation == NULL)
1371 error_handler( MyTransaction->getNdbErrorString());
1373 check = MyOperation->readTuple();
1375 error_handler( MyTransaction->getNdbErrorString());
1377 check = MyOperation->equal( attrName[0],(
char*)&pkValue[count] );
1379 error_handler( MyTransaction->getNdbErrorString());
1382 if( MyTransaction->
execute( Commit ) != -1 )
1383 error_handler(MyTransaction->getNdbErrorString());
1393 ndbout <<
"OK" << endl;
1398 read_and_verify_rows(
Ndb* pMyNdb)
1404 int count_attributes;
1410 int readValue[MAXATTR];
1412 ndbout <<
"Verifying records..."<< flush;
1414 loop_count_ops = NUMBEROFRECORDS;
1416 for (count=0 ; count < loop_count_ops ; count++)
1419 if (MyTransaction == NULL)
1420 error_handler(pMyNdb->getNdbErrorString());
1423 if (MyOperation == NULL)
1424 error_handler( MyTransaction->getNdbErrorString());
1426 check = MyOperation->readTuple();
1428 error_handler( MyTransaction->getNdbErrorString());
1430 check = MyOperation->equal( attrName[0],(
char*)&pkValue[count] );
1432 error_handler( MyTransaction->getNdbErrorString());
1434 for (count_attributes = 1; count_attributes < MAXATTR; count_attributes++)
1436 tTmp = MyOperation->getValue( (
char*)attrName[count_attributes], (
char*)&readValue[count_attributes] );
1438 error_handler( MyTransaction->getNdbErrorString());
1441 if( MyTransaction->
execute( Commit ) == -1 )
1442 error_handler(MyTransaction->getNdbErrorString());
1449 if ( readValue[1]!=attrValue[count] )
1450 error_handler(
"Verification error!");
1452 if ( readValue[2]!=attrValue[count] )
1453 error_handler(
"Verification error!");
1455 if ( readValue[3]!=attrValue[count] )
1456 error_handler(
"Verification error!");
1466 ndbout <<
"OK" << endl;
1479 for (i = 0; i < MAXATTR ; i++)
1481 sprintf(&attrName[i][0],
"Col%d", i);
1490 sprintf(&tableName[0][0],
"SBMCALL", 0);
1491 sprintf(&tableName[1][0],
"RPACCT", 0);
1492 sprintf(&tableName[2][0],
"IPACCT", 0);
1493 sprintf(&tableName[3][0],
"TODACCT", 0);
1498 bool error_handler2(
const char* error_string,
int error_int) {
1500 ndbout << error_string << endl ;
1501 if ( 4008==error_int || 721==error_int || 266==error_int ){
1502 ndbout << endl <<
"Attempting to recover and continue now..." << endl ;