18 #include <NDBT_Test.hpp>
19 #include <NDBT_ReturnCodes.h>
20 #include <HugoTransactions.hpp>
21 #include <UtilTransactions.hpp>
22 #include <NdbRestarter.hpp>
23 #include <signaldata/DictTabInfo.hpp>
24 #include <Bitmask.hpp>
26 #include <signaldata/DumpStateOrd.hpp>
36 int records = ctx->getNumRecords();
38 if (hugoTrans.loadTable(GETNDB(step), records, 512,
false, 0,
true) != 0){
46 int records = ctx->getNumRecords();
48 if (hugoTrans.loadTable(GETNDB(step), records) != 0){
56 int records = ctx->getNumRecords();
60 if (hugoTrans.loadTable(GETNDB(step), records, 1,
false) != 0){
68 int records = ctx->getNumRecords();
71 if (hugoTrans.loadTable(GETNDB(step), records, 1,
false) != 630){
78 int records = ctx->getNumRecords();
81 if (hugoTrans.pkDelRecords(GETNDB(step), records, 1,
false) != 0){
88 int records = ctx->getNumRecords();
91 while (ctx->isTestStopped() ==
false) {
93 if (hugoTrans.loadTable(GETNDB(step), records) != 0){
104 int records = ctx->getNumRecords();
105 int batchSize = ctx->getProperty(
"BatchSize", 1);
108 if (hugoTrans.pkDelRecords(GETNDB(step), records, batchSize) != 0){
115 int loops = ctx->getNumLoops();
116 int records = ctx->getNumRecords();
122 if (hugoTrans.pkDelRecords(GETNDB(step), records) != 0){
127 if (hugoTrans.loadTable(GETNDB(step), records, 512,
false) != 0){
139 int loops = ctx->getNumLoops();
140 int records = ctx->getNumRecords();
141 int batchSize = ctx->getProperty(
"BatchSize", 1);
147 if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize,
159 int records = ctx->getNumRecords();
160 int batchSize = ctx->getProperty(
"BatchSize", 1);
163 while (ctx->isTestStopped() ==
false) {
165 if (hugoTrans.pkReadRecords(GETNDB(step), records, batchSize) != 0){
176 int loops = ctx->getNumLoops();
177 int records = ctx->getNumRecords();
178 int batchSize = ctx->getProperty(
"BatchSize", 1);
182 g_info <<
"|- " << i <<
": ";
183 if (hugoTrans.pkUpdateRecords(GETNDB(step), records, batchSize) != 0){
194 int records = ctx->getNumRecords();
195 int batchSize = ctx->getProperty(
"BatchSize", 1);
198 while (ctx->isTestStopped()) {
200 if (hugoTrans.pkUpdateRecords(GETNDB(step), records, batchSize) != 0){
211 int result = NDBT_OK;
212 int records = ctx->getNumRecords();
215 if (hugoTrans.lockRecords(GETNDB(step), records, 10, 500) != 0){
216 result = NDBT_FAILED;
226 if(ctx->getProperty(
"InsertCommitted", (Uint32)0) != 0){
230 while(ctx->getProperty(
"Read1Performed", (Uint32)0) == 0){
231 NdbSleep_MilliSleep(20);
236 if (hugoTrans.loadTable(GETNDB(step), 1, 1) != 0){
240 ctx->setProperty(
"InsertCommitted", 1);
242 NdbSleep_SecSleep(2);
269 if(tmp.equalForAttr(pOp, a, 0) != 0){
278 if((row->attributeStore(a) =
285 check = pTrans->
execute(NoCommit);
297 Ndb* pNdb = GETNDB(step);
302 if(ctx->getProperty(
"Read1Performed", (Uint32)0) != 0){
306 if(ctx->getProperty(
"InsertCommitted", (Uint32)0) != 0){
311 if (pTrans == NULL) {
317 const int res1 = readOneNoCommit(pNdb, pTrans, tab, &row1);
318 g_info <<
"|- res1 = " << res1 << endl;
320 ctx->setProperty(
"Read1Performed", 1);
322 while(ctx->getProperty(
"InsertCommitted", (Uint32)0) == 0 &&
323 !ctx->isTestStopped()){
324 g_info <<
"|- Waiting for insert" << endl;
325 NdbSleep_MilliSleep(20);
328 if(ctx->isTestStopped()){
340 const int res2 = readOneNoCommit(pNdb, pTrans, tab, &row2);
344 g_info <<
"|- res2 = " << res2 << endl;
346 if (res2 == 626 && res1 == res2)
355 if (hugoTrans.fillTable(GETNDB(step), batch ) != 0){
362 int records = ctx->getNumRecords();
365 if (utilTrans.clearTable2(GETNDB(step), records, 240) != 0){
371 #define CHECK(b) if (!(b)) { \
372 ndbout << "ERR: "<< step->getName() \
373 << " failed on line " << __LINE__ << endl; \
374 result = NDBT_FAILED; \
378 int result = NDBT_OK;
380 Ndb* pNdb = GETNDB(step);
382 for (
int i = 2; i < 8; i++){
384 CHECK(hugoOps.startTransaction(pNdb) == 0);
386 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
388 ndbout << i <<
": Sleeping for " << sleepTime <<
" ms" << endl;
389 NdbSleep_MilliSleep(sleepTime);
393 hugoOps.closeTransaction(pNdb);
395 sleepTime = sleepTime *
i;
398 hugoOps.closeTransaction(pNdb);
404 int result = NDBT_OK;
406 Ndb* pNdb = GETNDB(step);
410 CHECK(hugoOps.startTransaction(pNdb) == 0);
412 CHECK(hugoOps.execute_Commit(pNdb) == 626);
413 CHECK(hugoOps.closeTransaction(pNdb) == 0);
417 CHECK(hugoOps.startTransaction(pNdb) == 0);
421 CHECK(hugoOps.execute_Commit(pNdb) == 626);
424 hugoOps.closeTransaction(pNdb);
430 int result = NDBT_OK;
432 Ndb* pNdb = GETNDB(step);
436 CHECK(hugoOps.startTransaction(pNdb) == 0);
437 CHECK(hugoOps.pkInsertRecord(pNdb, 1) == 0);
438 CHECK(hugoOps.execute_Commit(pNdb) == 630);
441 hugoOps.closeTransaction(pNdb);
447 int result = NDBT_OK;
449 Ndb* pNdb = GETNDB(step);
453 CHECK(hugoOps.startTransaction(pNdb) == 0);
455 CHECK(hugoOps.execute_Commit(pNdb, TryCommit) == 626);
456 CHECK(hugoOps.closeTransaction(pNdb) == 0);
461 CHECK(hugoOps.startTransaction(pNdb) == 0);
465 CHECK(hugoOps.pkInsertRecord(pNdb, 1) == 0);
467 CHECK(hugoOps.execute_Commit(pNdb, TryCommit) == 626);
470 hugoOps.closeTransaction(pNdb);
476 int result = NDBT_OK;
478 Ndb* pNdb = GETNDB(step);
482 CHECK(hugoOps.startTransaction(pNdb) == 0);
483 CHECK(hugoOps.pkInsertRecord(pNdb, 1) == 0);
484 CHECK(hugoOps.execute_Commit(pNdb, TryCommit) == 630);
487 hugoOps.closeTransaction(pNdb);
493 int result = NDBT_OK;
495 Ndb* pNdb = GETNDB(step);
499 CHECK(hugoOps.startTransaction(pNdb) == 0);
501 CHECK(hugoOps.execute_Commit(pNdb, CommitAsMuchAsPossible) == 626);
502 CHECK(hugoOps.closeTransaction(pNdb) == 0);
505 CHECK(hugoOps.startTransaction(pNdb) == 0);
508 CHECK(hugoOps.pkInsertRecord(pNdb, 1) == 0);
509 CHECK(hugoOps.execute_Commit(pNdb, CommitAsMuchAsPossible) == 626);
510 CHECK(hugoOps.closeTransaction(pNdb) == 0);
512 CHECK(hugoOps.startTransaction(pNdb) == 0);
513 CHECK(hugoOps.pkReadRecord(pNdb, 1) == 0);
514 CHECK(hugoOps.execute_Commit(pNdb) == 0);
515 CHECK(hugoOps.closeTransaction(pNdb) == 0);
518 hugoOps.closeTransaction(pNdb);
524 int result = NDBT_OK;
526 Ndb* pNdb = GETNDB(step);
530 CHECK(hugoOps.startTransaction(pNdb) == 0);
531 CHECK(hugoOps.pkInsertRecord(pNdb, 1) == 0);
532 CHECK(hugoOps.pkDeleteRecord(pNdb, 2) == 0);
533 CHECK(hugoOps.execute_Commit(pNdb, CommitAsMuchAsPossible) == 630);
534 CHECK(hugoOps.closeTransaction(pNdb) == 0);
536 CHECK(hugoOps.startTransaction(pNdb) == 0);
537 CHECK(hugoOps.pkReadRecord(pNdb, 2) == 0);
538 CHECK(hugoOps.execute_Commit(pNdb) == 626);
541 hugoOps.closeTransaction(pNdb);
547 int result = NDBT_OK;
549 Ndb* pNdb = GETNDB(step);
553 CHECK(hugoOps.startTransaction(pNdb) == 0);
555 CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
556 CHECK(hugoOps.closeTransaction(pNdb) == 0);
559 CHECK(hugoOps.startTransaction(pNdb) == 0);
561 CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
564 hugoOps.closeTransaction(pNdb);
570 int result = NDBT_OK;
572 Ndb* pNdb = GETNDB(step);
576 CHECK(hugoOps.startTransaction(pNdb) == 0);
577 CHECK(hugoOps.pkInsertRecord(pNdb, 1) == 0);
578 CHECK(hugoOps.execute_NoCommit(pNdb) == 630);
581 hugoOps.closeTransaction(pNdb);
587 int result = NDBT_OK;
589 Ndb* pNdb = GETNDB(step);
593 CHECK(hugoOps.startTransaction(pNdb) == 0);
595 CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
596 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
597 CHECK(hugoOps.closeTransaction(pNdb) == 0);
601 CHECK(hugoOps.startTransaction(pNdb) == 0);
606 CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
607 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
610 hugoOps.closeTransaction(pNdb);
616 int result = NDBT_OK;
618 Ndb* pNdb = GETNDB(step);
622 CHECK(hugoOps.startTransaction(pNdb) == 0);
623 CHECK(hugoOps.pkInsertRecord(pNdb, 1) == 0);
624 CHECK(hugoOps.execute_NoCommit(pNdb) == 630);
625 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
628 hugoOps.closeTransaction(pNdb);
635 int i, result = NDBT_OK;
637 Ndb* pNdb = GETNDB(step);
641 CHECK(hugoOps.startTransaction(pNdb) == 0);
642 for (i = 0; i < 10; i++)
644 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
645 CHECK(hugoOps.closeTransaction(pNdb) == 0);
648 CHECK(hugoOps.startTransaction(pNdb) == 0);
649 for (i = 0; i < 10; i++)
650 CHECK(hugoOps.pkUpdateRecord(pNdb, i) == 0);
651 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
652 CHECK(hugoOps.closeTransaction(pNdb) == 0);
655 CHECK(hugoOps.startTransaction(pNdb) == 0);
656 for (i = 0; i < 10; i++)
657 CHECK(hugoOps.pkDeleteRecord(pNdb, i) == 0);
658 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
659 CHECK(hugoOps.closeTransaction(pNdb) == 0);
662 CHECK(hugoOps.startTransaction(pNdb) == 0);
663 for (i = 0; i < 10; i++)
664 CHECK(hugoOps.pkInsertRecord(pNdb, i) == 0);
665 CHECK(hugoOps.execute_Commit(pNdb) == 630);
666 CHECK(hugoOps.closeTransaction(pNdb) == 0);
670 hugoOps.closeTransaction(pNdb);
678 int result = NDBT_OK;
680 Ndb* pNdb = GETNDB(step);
685 CHECK(hugoOps.startTransaction(pNdb) == 0);
686 CHECK(hugoOps.pkReadRecord(pNdb, 5) == 0);
687 CHECK(hugoOps.execute_Commit(pNdb) == 0);
688 CHECK(hugoOps.saveCopyOfRecord() == NDBT_OK);
689 CHECK(hugoOps.closeTransaction(pNdb) == 0);
692 CHECK(hugoOps.startTransaction(pNdb) == 0);
693 CHECK(hugoOps.pkDeleteRecord(pNdb, 5) == 0);
694 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
698 CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
699 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
701 CHECK(hugoOps.closeTransaction(pNdb) == 0);
704 CHECK(hugoOps.startTransaction(pNdb) == 0);
706 CHECK(hugoOps.execute_Commit(pNdb) == 0);
707 CHECK(hugoOps.closeTransaction(pNdb) == 0);
710 CHECK(hugoOps.startTransaction(pNdb) == 0);
712 CHECK(hugoOps.execute_Commit(pNdb) == 0);
713 CHECK(hugoOps.compareRecordToCopy() == NDBT_OK);
718 hugoOps.closeTransaction(pNdb);
724 int result = NDBT_OK;
726 Ndb* pNdb = GETNDB(step);
731 CHECK(hugoOps.startTransaction(pNdb) == 0);
732 CHECK(hugoOps.pkReadRecord(pNdb, 1, numRecords) == 0);
733 CHECK(hugoOps.execute_Commit(pNdb) == 0);
734 CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK);
735 CHECK(hugoOps.closeTransaction(pNdb) == 0);
738 CHECK(hugoOps.startTransaction(pNdb) == 0);
739 CHECK(hugoOps.pkUpdateRecord(pNdb, 1, numRecords, 5) == 0);
740 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
744 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
745 CHECK(hugoOps.verifyUpdatesValue(5) == NDBT_OK);
746 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
748 CHECK(hugoOps.closeTransaction(pNdb) == 0);
751 CHECK(hugoOps.startTransaction(pNdb) == 0);
753 CHECK(hugoOps.execute_Commit(pNdb) == 0);
754 CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK);
758 hugoOps.closeTransaction(pNdb);
764 int result = NDBT_OK;
766 Ndb* pNdb = GETNDB(step);
770 CHECK(hugoOps.startTransaction(pNdb) == 0);
771 CHECK(hugoOps.pkReadRecord(pNdb, 5, 10) == 0);
772 CHECK(hugoOps.execute_Commit(pNdb) == 0);
773 CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK);
774 CHECK(hugoOps.closeTransaction(pNdb) == 0);
776 Uint32 updatesValue = 0;
778 for(Uint32 i = 0; i<1; i++){
780 CHECK(hugoOps.startTransaction(pNdb) == 0);
782 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
784 for(j = 0; j<10; j++){
787 CHECK(hugoOps.pkUpdateRecord(pNdb, 5, 10, updatesValue) == 0);
788 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
791 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
792 CHECK(hugoOps.verifyUpdatesValue(updatesValue) == 0);
795 for(j = 0; j<10; j++){
797 CHECK(hugoOps.pkDeleteRecord(pNdb, 5, 10) == 0);
798 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
803 CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
807 CHECK(hugoOps.pkInsertRecord(pNdb, 5, 10, updatesValue) == 0);
808 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
811 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
812 CHECK(hugoOps.verifyUpdatesValue(updatesValue) == 0);
815 CHECK(hugoOps.pkDeleteRecord(pNdb, 5, 10) == 0);
816 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
820 CHECK(hugoOps.execute_NoCommit(pNdb) == 626);
821 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
823 CHECK(hugoOps.closeTransaction(pNdb) == 0);
828 CHECK(hugoOps.startTransaction(pNdb) == 0);
830 CHECK(hugoOps.execute_Commit(pNdb) == 0);
831 CHECK(hugoOps.verifyUpdatesValue(0) == NDBT_OK);
835 hugoOps.closeTransaction(pNdb);
842 int result = NDBT_OK;
844 Ndb* pNdb = GETNDB(step);
848 CHECK(hugoOps.startTransaction(pNdb) == 0);
850 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
851 CHECK(hugoOps.closeTransaction(pNdb) == 0);
854 CHECK(hugoOps.startTransaction(pNdb) == 0);
855 CHECK(hugoOps.pkUpdateRecord(pNdb, 5) == 0);
856 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
857 CHECK(hugoOps.closeTransaction(pNdb) == 0);
860 CHECK(hugoOps.startTransaction(pNdb) == 0);
861 CHECK(hugoOps.pkDeleteRecord(pNdb, 5) == 0);
862 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
863 CHECK(hugoOps.closeTransaction(pNdb) == 0);
867 CHECK(hugoOps.startTransaction(pNdb) == 0);
869 CHECK(hugoOps.execute_Commit(pNdb) == 0);
872 hugoOps.closeTransaction(pNdb);
878 int result = NDBT_OK;
880 Ndb* pNdb = GETNDB(step);
884 CHECK(hugoOps.startTransaction(pNdb) == 0);
886 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
889 CHECK(hugoOps.pkUpdateRecord(pNdb, 5, 10) == 0);
890 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
893 CHECK(hugoOps.pkDeleteRecord(pNdb, 5, 10) == 0);
894 CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
896 CHECK(hugoOps.execute_Commit(pNdb) == 0);
897 CHECK(hugoOps.closeTransaction(pNdb) == 0);
900 CHECK(hugoOps.startTransaction(pNdb) == 0);
902 CHECK(hugoOps.execute_Commit(pNdb) == 626);
906 hugoOps.closeTransaction(pNdb);
912 int result = NDBT_OK;
914 Ndb* pNdb = GETNDB(step);
918 CHECK(hugoOps.startTransaction(pNdb) == 0);
919 CHECK(hugoOps.pkDeleteRecord(pNdb, 5, 10) == 0);
921 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
922 CHECK(hugoOps.closeTransaction(pNdb) == 0);
925 CHECK(hugoOps.startTransaction(pNdb) == 0);
927 CHECK(hugoOps.execute_Commit(pNdb) == 0);
928 CHECK(hugoOps.closeTransaction(pNdb) == 0);
930 CHECK(hugoOps.startTransaction(pNdb) == 0);
931 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
935 hugoOps.closeTransaction(pNdb);
943 const int records = 4 * restarter.getNumDbNodes();
946 if (hugoTrans.loadTable(GETNDB(step), records) != 0){
950 int result = NDBT_OK;
952 Ndb* pNdb = GETNDB(step);
954 const Uint32 OPS_PER_TRANS = 256;
955 const Uint32 OPS_TOTAL = 4096;
957 for(
int row = 0; row < records; row++){
959 CHECK(hugoOps.startTransaction(pNdb) == 0);
960 for(Uint32 i = 0; i<OPS_TOTAL; i += OPS_PER_TRANS){
961 for(Uint32 j = 0; j<OPS_PER_TRANS; j++){
962 CHECK(hugoOps.pkUpdateRecord(pNdb, row, 1, i) == 0);
964 g_info <<
"Performed " << (i+OPS_PER_TRANS) <<
" updates on row: " << row
966 if(result != NDBT_OK){
969 res = hugoOps.execute_NoCommit(pNdb);
971 NdbError err = pNdb->getNdbError(res);
976 if(result != NDBT_OK){
979 g_info <<
"executeRollback" << endl;
980 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
981 CHECK(hugoOps.closeTransaction(pNdb) == 0);
984 hugoOps.closeTransaction(pNdb);
992 if (hugoTrans.loadTable(GETNDB(step), 1) != 0){
996 int result = NDBT_OK;
998 Ndb* pNdb = GETNDB(step);
1000 const Uint32 OPS_TOTAL = 4096;
1001 const Uint32 LOOPS = 10;
1003 for(Uint32 loop = 0; loop<LOOPS; loop++){
1004 CHECK(hugoOps.startTransaction(pNdb) == 0);
1005 for(Uint32 i = 0; i<OPS_TOTAL-1; i ++){
1007 CHECK(hugoOps.pkUpdateRecord(pNdb, 0, 1, loop) == 0);
1009 CHECK(hugoOps.pkUpdateRecord(pNdb, 1, 1, loop) == 0);
1012 CHECK(hugoOps.execute_Commit(pNdb) == 626);
1013 CHECK(hugoOps.execute_Rollback(pNdb) == 0);
1014 CHECK(hugoOps.closeTransaction(pNdb) == 0);
1017 hugoOps.closeTransaction(pNdb);
1024 int result = NDBT_OK;
1026 Ndb* pNdb = GETNDB(step);
1028 const Uint32 BATCH = 10;
1029 const Uint32 OPS_TOTAL = 50;
1030 const Uint32 LOOPS = 100;
1032 for(Uint32 loop = 0; loop<LOOPS; loop++)
1034 CHECK(hugoOps.startTransaction(pNdb) == 0);
1036 for (Uint32 i = 0; i<OPS_TOTAL; i+= BATCH)
1038 CHECK(hugoOps.pkInsertRecord(pNdb, i, BATCH, 0) == 0);
1039 if (hugoOps.execute_NoCommit(pNdb) != 0)
1045 hugoOps.execute_Rollback(pNdb);
1046 CHECK(hugoOps.closeTransaction(pNdb) == 0);
1049 hugoOps.closeTransaction(pNdb);
1056 int result = NDBT_OK;
1058 Ndb* pNdb = GETNDB(step);
1060 const Uint32 BATCH = 10;
1061 const Uint32 OPS_TOTAL = 20;
1062 const Uint32 LOOPS = 100;
1064 for(Uint32 loop = 0; loop<LOOPS; loop++)
1066 CHECK(hugoOps.startTransaction(pNdb) == 0);
1068 for (Uint32 i = 0; i<OPS_TOTAL; i+= BATCH)
1070 CHECK(hugoOps.pkInsertRecord(pNdb, i, BATCH, 0) == 0);
1071 CHECK(hugoOps.pkDeleteRecord(pNdb, i, BATCH) == 0);
1072 if (hugoOps.execute_NoCommit(pNdb) != 0)
1078 hugoOps.execute_Rollback(pNdb);
1079 CHECK(hugoOps.closeTransaction(pNdb) == 0);
1082 hugoOps.closeTransaction(pNdb);
1128 Ndb* pNdb = GETNDB(step);
1132 int bits = TupError::TE_MULTI_OP;
1135 if (tab->
getColumn(i)->getArrayType() != NdbDictionary::Column::ArrayTypeFixed)
1136 bits |= TupError::TE_VARSIZE;
1137 if (tab->
getColumn(i)->getStorageType()!= NdbDictionary::Column::StorageTypeMemory)
1138 bits |= TupError::TE_DISK;
1141 if (restarter.getNumDbNodes() >= 2)
1143 bits |= TupError::TE_REPLICA;
1147 pNdb->getDictionary()->listIndexes(l, tab->
getName());
1148 for (i = 0; i<(int)l.
count; i++)
1151 bits |= TupError::TE_OI;
1153 bits |= TupError::TE_UI;
1159 for(i = 0; f_tup_errors[
i].op != -1; i++)
1166 if ((f_tup_errors[i].bits & bits) != f_tup_errors[
i].bits)
1168 g_err <<
"Skipping " << f_tup_errors[
i].error
1169 <<
" - req bits: " << hex << f_tup_errors[
i].bits
1170 <<
" bits: " << hex << bits << endl;
1174 g_err <<
"Testing error insert: " << f_tup_errors[
i].error << endl;
1175 restarter.insertErrorInAllNodes(f_tup_errors[i].error);
1176 if (f_tup_errors[i].bits & TupError::TE_MULTI_OP)
1182 hugoTrans.loadTable(pNdb, 5);
1184 restarter.insertErrorInAllNodes(0);
1185 if (hugoTrans.clearTable(pNdb, 5) != 0)
1194 hugoTrans.loadTable(pNdb, 5);
1195 for(i = 0; f_tup_errors[
i].op != -1; i++)
1202 if ((f_tup_errors[i].bits & bits) != f_tup_errors[i].bits)
1204 g_err <<
"Skipping " << f_tup_errors[
i].error
1205 <<
" - req bits: " << hex << f_tup_errors[
i].bits
1206 <<
" bits: " << hex << bits << endl;
1210 g_err <<
"Testing error insert: " << f_tup_errors[
i].error << endl;
1211 restarter.insertErrorInAllNodes(f_tup_errors[i].error);
1212 if (f_tup_errors[i].bits & TupError::TE_MULTI_OP)
1218 hugoTrans.scanUpdateRecords(pNdb, 5);
1220 restarter.insertErrorInAllNodes(0);
1221 if (hugoTrans.scanUpdateRecords(pNdb, 5) != 0)
1233 int result = NDBT_OK;
1236 Ndb* pNdb = GETNDB(step);
1239 restarter.insertErrorInAllNodes(4017);
1240 const Uint32 LOOPS = 10;
1241 for (Uint32 i = 0; i<LOOPS; i++)
1243 CHECK(hugoOp1.startTransaction(pNdb) == 0);
1244 CHECK(hugoOp1.pkInsertRecord(pNdb, 1) == 0);
1246 CHECK(hugoOp2.startTransaction(pNdb) == 0);
1247 CHECK(hugoOp2.pkReadRecord(pNdb, 1, 1) == 0);
1251 hugoOp1.wait_async(pNdb);
1252 hugoOp2.wait_async(pNdb);
1253 CHECK(hugoOp1.closeTransaction(pNdb) == 0);
1254 CHECK(hugoOp2.closeTransaction(pNdb) == 0);
1257 restarter.insertErrorInAllNodes(0);
1264 int result = NDBT_OK;
1266 Ndb* pNdb = GETNDB(step);
1269 restarter.insertErrorInAllNodes(4017);
1271 const Uint32 LOOPS = 1;
1272 for (Uint32 i = 0; i<LOOPS; i++)
1274 CHECK(hugoOp1.startTransaction(pNdb) == 0);
1275 CHECK(hugoOp1.pkInsertRecord(pNdb, 1) == 0);
1276 CHECK(hugoOp1.pkDeleteRecord(pNdb, 1) == 0);
1278 hugoOp1.execute_NoCommit(pNdb);
1279 CHECK(hugoOp1.closeTransaction(pNdb) == 0);
1282 restarter.insertErrorInAllNodes(0);
1289 Ndb* pNdb = GETNDB(step);
1294 int loops = ctx->getNumLoops();
1299 ops.startTransaction(pNdb);
1300 ops.pkReadRecord(pNdb, 1, 1);
1301 ops.execute_Commit(pNdb, AO_IgnoreError);
1303 ops.closeTransaction(pNdb);
1312 Ndb* pNdb = GETNDB(step);
1319 int loops = ctx->getNumLoops();
1327 tmp.equalForRow(pOp, loops);
1344 tmp.setValues(pOp, loops, 0);
1348 tmp.equalForRow(pOp, loops);
1357 if (pTrans->
execute(Commit) != 0)
1373 Ndb* pNdb = GETNDB(step);
1378 int loops = ctx->getNumLoops();
1384 ops.startTransaction(pNdb);
1385 ops.pkInsertRecord(pNdb, 1, 1);
1386 ops.execute_NoCommit(pNdb);
1391 ops.equalForRow(op, 1);
1393 ops.execute_NoCommit(pNdb);
1396 ndbout_c(
"copy at: %llx", copies.back());
1397 ops.execute_NoCommit(pNdb);
1399 ops.pkDeleteRecord(pNdb, 1, 1);
1400 ops.execute_NoCommit(pNdb);
1404 ops.execute_Rollback(pNdb);
1405 ops.closeTransaction(pNdb);
1409 ops.execute_Commit(pNdb);
1410 ops.closeTransaction(pNdb);
1411 ops.clearTable(pNdb, 100);
1415 for (Uint32 i = 0; i<copies.size(); i++)
1416 if (copies[i] != copies.back())
1418 ndbout_c(
"Memleak detected");
1428 int result = NDBT_OK;
1432 Ndb* pNdb = GETNDB(step);
1433 int loops = ctx->getNumLoops();
1434 bool inserted=
false;
1440 CHECK(hugoOp1.startTransaction(pNdb) == 0);
1441 CHECK(hugoOp1.pkInsertRecord(pNdb, 1, 1) == 0);
1442 CHECK(hugoOp1.execute_Commit(pNdb) == 0);
1443 CHECK(hugoOp1.closeTransaction(pNdb) == 0);
1449 const char *key= (
const char *)(&key_val);
1450 CHECK(hugoOp1.startTransaction(pNdb, table, key, 4) == 0);
1451 CHECK(hugoOp2.startTransaction(pNdb, table, key, 4) == 0);
1454 for (Uint32 i= 0; i < 2; i++)
1459 CHECK(hugoOp1.execute_NoCommit(pNdb) == 0);
1463 for (Uint32 i= 0; i < 2; i++)
1471 CHECK(hugoOp1.pkUpdateRecord(pNdb, 1, 1) == 0);
1477 CHECK(hugoOp2.wait_async(pNdb) == 0);
1482 CHECK(hugoOp2.wait_async(pNdb) == 0);
1484 hugoOp1.wait_async(pNdb);
1486 CHECK(hugoOp1.closeTransaction(pNdb) == 0);
1487 CHECK(hugoOp2.closeTransaction(pNdb) == 0);
1496 Ndb* pNdb = GETNDB(step);
1499 bool hasDefault =
false;
1514 hugoTrans.loadTable(pNdb, 1);
1519 hugoTrans.equalForRow(pOp, 0);
1520 if (pTrans->
execute(NoCommit) != 0)
1525 hugoTrans.equalForRow(pOp, 0);
1532 hugoTrans.setValueForAttr(pOp, i, 0, 1);
1536 if (pTrans->
execute(Commit) != 0)
1544 hugoTrans.equalForRow(pOp, 0);
1552 values.push_back(pOp->
getValue(i));
1556 if (pTrans->
execute(Commit) != 0)
1559 bool defaultOk =
true;
1560 for (
unsigned int i = 0; i<values.size(); i++)
1564 unsigned int defaultLen = 0;
1565 const char* def = (
const char*) col->getDefaultValue(&defaultLen);
1573 if (memcmp(def, recAttr->
aRef(), defaultLen) != 0)
1576 ndbout_c(
"column %s does not have correct default value",
1577 recAttr->getColumn()->
getName());
1583 ndbout_c(
"column %s is null, should have default value",
1584 recAttr->getColumn()->
getName());
1593 ndbout_c(
"column %s is not NULL", recAttr->getColumn()->
getName());
1610 Ndb* pNdb = GETNDB(step);
1616 int expectedError = 0;
1618 bool tabHasDD =
false;
1621 tabHasDD |= (tab->
getColumn(i)->getStorageType() ==
1622 NdbDictionary::Column::StorageTypeDisk);
1628 expectedError = 1601;
1634 for (Uint32 i = 0; i<l.
count; i++)
1639 expectedError = 9999;
1647 ndbout_c(
"Table %s has no disk attributes or ordered indexes, skipping",
1655 int result = NDBT_OK;
1657 for (Uint32 loop = 0; loop < 100; loop ++)
1659 restarter.insertErrorInAllNodes(errCode);
1660 CHECK(hugoOps.startTransaction(pNdb) == 0);
1667 CHECK(hugoOps.pkInsertRecord(pNdb, loop, 1, 0) == 0);
1670 Uint32 numUpdates = 1 + (loop % 15);
1671 for (Uint32 updateCnt = 0; updateCnt < numUpdates; updateCnt++)
1672 CHECK(hugoOps.pkUpdateRecord(pNdb, loop, 1, 1+updateCnt) == 0);
1674 CHECK(hugoOps.execute_Commit(pNdb) != 0);
1676 NdbError err= hugoOps.getTransaction()->getNdbError();
1678 CHECK(err.code == expectedError);
1680 hugoOps.closeTransaction(pNdb);
1683 restarter.insertErrorInAllNodes(0);
1691 if (!(b)) { g_err << "ERR: " << step->getName() << " failed on line " << __LINE__ << endl; result = NDBT_FAILED; continue; }
1692 #define chk2(b, e) \
1693 if (!(b)) { g_err << "ERR: " << step->getName() << " failed on line " << __LINE__ << ": " << e << endl; result = NDBT_FAILED; continue; }
1695 const char* tabname_bug34348 =
"TBug34348";
1701 const int rangeFullError = 633;
1702 Ndb* pNdb = GETNDB(step);
1703 int result = NDBT_OK;
1704 while (result == NDBT_OK)
1707 chk2(ops.startTransaction(pNdb) == 0, ops.getNdbError());
1708 chk2(ops.pkInsertRecord(pNdb, i, 1) == 0, ops.getNdbError());
1709 chk2(ops.execute_Commit(pNdb) == 0 || (code = ops.getNdbError().
code) == rangeFullError, ops.getNdbError());
1710 ops.closeTransaction(pNdb);
1711 *rangeFull = (code == rangeFullError);
1721 Ndb* pNdb = GETNDB(step);
1722 int result = NDBT_OK;
1723 while (result == NDBT_OK)
1725 chk2(ops.startTransaction(pNdb) == 0, ops.getNdbError());
1726 chk2(ops.pkDeleteRecord(pNdb, i, 1) == 0, ops.getNdbError());
1727 chk2(ops.execute_Commit(pNdb) == 0, ops.getNdbError());
1728 ops.closeTransaction(pNdb);
1737 myRandom48Init((
long)NdbTick_CurrentMillisecond());
1738 Ndb* pNdb = GETNDB(step);
1741 int result = NDBT_OK;
1742 const int loops = ctx->getNumLoops();
1743 const int errInsDBACC = 3002;
1744 const int errInsCLEAR = 0;
1745 Uint32* rowmask = 0;
1747 while (result == NDBT_OK)
1749 chk1(restarter.insertErrorInAllNodes(errInsDBACC) == 0);
1750 ndbout <<
"error insert " << errInsDBACC <<
" done" << endl;
1753 while (result == NDBT_OK)
1755 (void)pDict->
dropTable(tabname_bug34348);
1779 while (result == NDBT_OK && loop < loops)
1781 ndbout <<
"loop:" << loop << endl;
1785 while (result == NDBT_OK)
1788 chk1(runBug34348insert(ctx, step, ops, rowcnt, &rangeFull) == NDBT_OK);
1792 ndbout <<
"dir range full at " << rowcnt << endl;
1797 chk1(result == NDBT_OK);
1798 const int rowmax = rowcnt;
1801 rowmaxprev = rowmax;
1803 chk2(rowmaxprev == rowmax,
"rowmaxprev:" << rowmaxprev <<
" rowmax:" << rowmax);
1805 const int sz = (rowmax + 31) / 32;
1807 rowmask =
new Uint32 [sz];
1811 for (i = 0; i < rowmax; i++)
1816 while (result == NDBT_OK)
1818 int i = myRandom48(rowmax);
1821 chk1(runBug34348delete(ctx, step, ops, i) == NDBT_OK);
1825 chk1(runBug34348insert(ctx, step, ops, rowmax, &rangeFull) == NDBT_OK);
1828 chk1(runBug34348delete(ctx, step, ops, rowmax) == NDBT_OK);
1830 ndbout <<
"dir range released at " << rowcnt << endl;
1834 chk1(result == NDBT_OK);
1838 while (result == NDBT_OK)
1841 for (i = 0; result == NDBT_OK && i < rowmax; i++)
1845 if (myRandom48(100) < 50)
1847 chk1(runBug34348delete(ctx, step, ops, i) == NDBT_OK);
1851 ndbout <<
"deleted down to " << rowcnt << endl;
1854 chk1(result == NDBT_OK);
1858 while (result == NDBT_OK)
1861 for (i = 0; result == NDBT_OK && i < rowmax; i++)
1866 chk1(runBug34348insert(ctx, step, ops, i, &rangeFull) == NDBT_OK);
1868 chk2(!rangeFull,
"dir range full too early at " << rowcnt);
1872 chk1(result == NDBT_OK);
1873 ndbout <<
"inserted all back to " << rowcnt << endl;
1876 chk1(result == NDBT_OK);
1880 while (result == NDBT_OK)
1883 for (i = 0; result == NDBT_OK && i < rowmax; i++)
1887 chk1(runBug34348delete(ctx, step, ops, i) == NDBT_OK);
1891 ndbout <<
"deleted all" << endl;
1894 chk1(result == NDBT_OK);
1896 assert(rowcnt == 0);
1903 chk1(restarter.insertErrorInAllNodes(errInsCLEAR) == 0);
1904 ndbout <<
"error insert clear done" << endl;
1908 if (result != NDBT_OK && restarter.insertErrorInAllNodes(errInsCLEAR) != 0)
1909 g_err <<
"error insert clear failed" << endl;
1916 #define check(b, e) \
1917 if (!(b)) { g_err << "ERR: " << step->getName() << " failed on line " << __LINE__ << ": " << e.getNdbError() << endl; return NDBT_FAILED; }
1920 int loops = ctx->getNumLoops();
1921 int records = ctx->getNumRecords();
1922 int batchSize = ctx->getProperty(
"Batchsize", 1);
1923 int doubleUnlock = ctx->getProperty(
"DoubleUnlock", (Uint32)0);
1927 Ndb* ndb = GETNDB(step);
1929 g_err <<
"Unlocker : ";
1930 g_err <<
"Loops = " << loops <<
" Records = " << records <<
" Batchsize = "
1931 << batchSize << endl;
1937 check(hugoOps.startTransaction(ndb) == 0, (*ndb));
1939 const int maxRetries = 10;
1940 int retryAttempt = 0;
1946 int batchContents = MIN(r, batchSize);
1948 check(hugoOps.pkReadRecordLockHandle(ndb,
1957 if (hugoOps.execute_NoCommit(ndb) != 0)
1959 NdbError err = hugoOps.getNdbError();
1961 retryAttempt < maxRetries){
1963 NdbSleep_MilliSleep(50);
1965 lockHandles.clear();
1966 check(hugoOps.closeTransaction(ndb) == 0,
1968 check(hugoOps.startTransaction(ndb) == 0, (*ndb));
1975 check(hugoOps.pkUnlockRecord(ndb,
1979 check(hugoOps.execute_NoCommit(ndb) == 0,
1996 g_err <<
"Double unlock, abort option is "
2000 check(hugoOps.pkUnlockRecord(ndb,
2007 check(hugoOps.execute_NoCommit(ndb,
2008 DefaultAbortOption) != 0,
2012 check(hugoOps.getNdbError().code == 417,
2020 lockHandles.clear();
2021 check(hugoOps.closeTransaction(ndb) == 0,
2023 check(hugoOps.startTransaction(ndb) == 0, (*ndb));
2032 check(hugoOps.releaseLockHandles(ndb,
2036 lockHandles.clear();
2042 check(hugoOps.execute_Commit(ndb) == 0,
2046 check(hugoOps.execute_Rollback(ndb) == 0,
2054 check(hugoOps.closeTransaction(ndb) == 0,
2070 Ndb* pNdb = GETNDB(step);
2082 hugoTrans.loadTable(pNdb, 20);
2083 hugoTrans.clearTable(pNdb);
2085 const Uint32 rows = 5000;
2088 hugoTransCopy.loadTable(pNdb, rows);
2091 restarter.getNumDbNodes();
2095 for (Uint32 i = 0; i<3; i++)
2097 int dump[] = { DumpStateOrd::DihStartLcpImmediately };
2101 restarter.dumpStateAllNodes(dump, 1);
2107 ndb_mgm_destroy_logevent_handle(&handle);
2110 for (
int i = 0; i<5; i++)
2112 int val1 = DumpStateOrd::DihMaxTimeBetweenLCP;
2115 restarter.dumpStateAllNodes(&val1, 1);
2116 int val[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
2117 restarter.dumpStateAllNodes(val, 2);
2119 restarter.insertErrorInAllNodes(932);
2122 hugoTrans.loadTable(pNdb, 20);
2124 restarter.dumpStateAllNodes(&val2, 1);
2126 NdbSleep_SecSleep(15);
2127 hugoTrans.clearTable(pNdb);
2129 hugoTransCopy.pkReadRecords(pNdb, rows);
2132 hugoOps.startTransaction(pNdb);
2133 hugoOps.pkInsertRecord(pNdb, 1);
2134 hugoOps.execute_NoCommit(pNdb);
2136 restarter.insertErrorInAllNodes(5056);
2137 restarter.dumpStateAllNodes(&val2, 1);
2138 restarter.waitClusterNoStart();
2140 restarter.dumpStateAllNodes(&vall, 1);
2141 restarter.startAll();
2142 restarter.waitClusterStarted();
2148 restarter.restartAll(
false,
true,
true);
2149 restarter.waitClusterNoStart();
2150 restarter.startAll();
2151 restarter.waitClusterStarted();
2158 Ndb* pNdb = GETNDB(step);
2162 for (Uint32 i = 0; i<5; i++)
2164 Uint32 rows = 5000 + i * 2000;
2166 hugoOps.startTransaction(pNdb);
2168 for (Uint32 r = 0; r < rows; r++)
2170 for (Uint32 b = 0; b<100; b++, r++)
2172 hugoOps.pkInsertRecord(pNdb, r);
2174 hugoOps.execute_NoCommit(pNdb);
2177 res.insertErrorInAllNodes(8087);
2180 hugoTrans.loadTableStartFrom(pNdb, 50000, 100);
2182 hugoOps.execute_Rollback(pNdb);
2183 hugoTrans.clearTable(pNdb);
2185 res.insertErrorInAllNodes(0);
2193 Ndb* pNdb = GETNDB(step);
2196 int rowcount = ctx->getProperty(
"CHECK_ROWCOUNT", Uint32(0));
2197 int records = ctx->getNumRecords();
2202 while (!ctx->isTestStopped())
2204 if (hugoTrans.scanReadRecords(pNdb,
2207 (
int)NdbScanOperation::SF_TupScan) != NDBT_OK)
2216 Ndb* pNdb = GETNDB(step);
2219 int loops = ctx->getNumLoops();
2220 int records = ctx->getNumRecords();
2223 for (
int i = 0; i < loops; i++)
2225 hugoOps.startTransaction(pNdb);
2226 hugoOps.pkInsertRecord(pNdb, 0, records, 0);
2227 hugoOps.execute_NoCommit(pNdb);
2228 hugoOps.pkUpdateRecord(pNdb, 0, records, rand());
2229 hugoOps.execute_NoCommit(pNdb);
2230 hugoOps.pkUpdateRecord(pNdb, 0, records, rand());
2231 hugoOps.execute_NoCommit(pNdb);
2232 res.insertErrorInAllNodes(8089);
2233 hugoOps.execute_Commit(pNdb);
2234 res.insertErrorInAllNodes(0);
2235 hugoOps.closeTransaction(pNdb);
2236 hugoOps.clearTable(pNdb);
2245 Ndb* pNdb = GETNDB(step);
2248 int loops = ctx->getNumLoops();
2249 int records = ctx->getNumRecords();
2252 for (
int i = 0; i < loops; i++)
2254 hugoOps.startTransaction(pNdb);
2255 hugoOps.pkDeleteRecord(pNdb, 0, records);
2256 hugoOps.execute_NoCommit(pNdb);
2257 hugoOps.pkInsertRecord(pNdb, 0, records, 0);
2258 hugoOps.execute_NoCommit(pNdb);
2260 res.insertErrorInAllNodes(8089);
2261 hugoOps.execute_Rollback(pNdb);
2262 res.insertErrorInAllNodes(0);
2264 hugoOps.closeTransaction(pNdb);
2270 #define CHK_RET_FAILED(x) if (!(x)) { ndbout_c("Failed on line: %u", __LINE__); return NDBT_FAILED; }
2275 Ndb* pNdb = GETNDB(step);
2278 const int rows = ctx->getNumRecords();
2279 const int loops = ctx->getNumLoops();
2280 const int batch = ctx->getProperty(
"Batch", Uint32(50));
2281 const int until_stopped = ctx->getProperty(
"UntilStopped");
2284 CHK_RET_FAILED(pRowRecord != 0);
2286 const Uint32 len = NdbDictionary::getRecordRowLength(pRowRecord);
2287 Uint8 * pRow =
new Uint8[len];
2290 int count_failed = 0;
2292 for (
int i = 0; i < loops || (until_stopped && !ctx->isTestStopped()); i++)
2294 ndbout_c(
"loop: %d",i);
2296 for (
int rowNo = 0; rowNo < rows;)
2299 CHK_RET_FAILED(pTrans != 0);
2301 for (
int b = 0; rowNo < rows && b < batch; rowNo++, b++)
2308 bzero(&opts,
sizeof(opts));
2313 calc.setValues(pRow, pRowRecord, rowNo, rand());
2314 pOp = pTrans->writeTuple(pRowRecord, (
char*)pRow,
2315 pRowRecord, (
char*)pRow,
2319 result = pTrans->
execute(NoCommit);
2322 calc.setValues(pRow, pRowRecord, rowNo, rand());
2323 pOp = pTrans->deleteTuple(pRowRecord, (
char*)pRow,
2324 pRowRecord, (
char*)pRow,
2328 result = pTrans->
execute(NoCommit, AO_IgnoreError);
2332 CHK_RET_FAILED(pOp != 0);
2339 result = pTrans->
execute(Commit);
2350 ndbout << err << endl;
2355 if (err.
code == 899)
2358 ndbout << err << endl;
2369 ndbout_c(
"count_ok: %d count_failed: %d (899: %d)",
2370 count_ok, count_failed, count_899);
2373 return count_899 == 0 ? NDBT_OK : NDBT_FAILED;
2380 int val = DumpStateOrd::DihMinTimeBetweenLCP;
2381 restarter.dumpStateAllNodes(&val, 1);
2383 Ndb* pNdb = GETNDB(step);
2389 int val2[] = { DumpStateOrd::BackupErrorInsert, 10042, tableId };
2391 for (
int i = 0; i < restarter.getNumDbNodes(); i++)
2395 int nodeId = restarter.getDbNodeId(i);
2396 ndbout_c(
"Setting slow LCP of table %d on node %d",
2398 restarter.dumpStateOneNode(nodeId, val2, 3);
2410 int val[] = { DumpStateOrd::DihMinTimeBetweenLCP, 0 };
2411 restarter.dumpStateAllNodes(val, 2);
2413 restarter.insertErrorInAllNodes(0);
2422 Ndb* pNdb = GETNDB(step);
2424 bool merge_events =
false;
2425 bool report =
false;
2427 char eventName[1024];
2428 sprintf(eventName,
"%s_EVENT",tab.
getName());
2433 g_err <<
"Dictionary not found "
2439 myDict->dropEvent(eventName);
2442 myEvent.setTable(tab.
getName());
2445 myEvent.addEventColumn(a);
2447 myEvent.mergeEvents(merge_events);
2450 myEvent.setReport(NdbDictionary::Event::ER_SUBSCRIBE);
2452 int res = myDict->createEvent(myEvent);
2456 else if (myDict->getNdbError().classification ==
2459 g_info <<
"Event creation failed event exists\n";
2460 res = myDict->dropEvent(eventName);
2462 g_err <<
"Failed to drop event: "
2463 << myDict->getNdbError().code <<
" : "
2464 << myDict->getNdbError().message << endl;
2468 res = myDict->createEvent(myEvent);
2470 g_err <<
"Failed to create event (1): "
2471 << myDict->getNdbError().code <<
" : "
2472 << myDict->getNdbError().message << endl;
2478 g_err <<
"Failed to create event (2): "
2479 << myDict->getNdbError().code <<
" : "
2480 << myDict->getNdbError().message << endl;
2489 Ndb* pNdb = GETNDB(step);
2492 char eventName[1024];
2493 sprintf(eventName,
"%s_EVENT",tab.
getName());
2498 g_err <<
"Dictionary not found "
2504 myDict->dropEvent(eventName);
2511 Ndb* ndb = GETNDB(step);
2516 Uint32 rowCountSum = 0;
2517 Uint32 rowScanCount = 0;
2519 int result = NDBT_OK;
2523 CHECK(trans != NULL);
2526 CHECK(scan != NULL);
2532 CHECK(code.interpret_exit_last_row() == 0);
2533 CHECK(code.finalise() == 0);
2536 CHECK(rowCountRA != NULL);
2539 CHECK(trans->
execute(NoCommit) == 0);
2542 rowCountSum+= rowCountRA->u_32_value();
2547 CHECK(trans != NULL);
2550 CHECK(scan != NULL);
2554 rowCountRA = scan->
getValue(NdbDictionary::Column::ROW_COUNT);
2555 CHECK(rowCountRA != NULL);
2557 CHECK(trans->
execute(NoCommit) == 0);
2566 if (result == NDBT_OK)
2568 ndbout_c(
"Sum of fragment row counts : %u Number rows scanned : %u",
2572 if (rowCountSum != rowScanCount)
2574 ndbout_c(
"MISMATCH");
2575 result = NDBT_FAILED;
2582 enum ApiEventType { Insert, Update, Delete };
2594 int collectEvents(
Ndb* ndb,
2603 int MaxTimeouts = 5;
2618 int id = (*whichVersion)[idCol]->u_32_value();
2619 Uint64 gci = pOp->
getGCI();
2621 Uint32 scenario = ((anyValue >> 24) & 0xff) -1;
2622 Uint32 optype = ((anyValue >> 16) & 0xff);
2623 Uint32 recNum = (anyValue & 0xffff);
2625 g_err <<
"# " << receivedEvents.size()
2626 <<
" GCI : " << (gci >> 32)
2628 << (gci & 0xffffffff)
2631 <<
" scenario : " << scenario
2632 <<
" optype : " << optype
2633 <<
" record : " << recNum
2637 int updatesValue = (*whichVersion)[updateCol]->u_32_value();
2639 if ((*whichVersion)[updateCol]->isNULL() ||
2640 (*whichVersion)[idCol]->isNULL())
2642 g_err <<
"Null update/id cols : REFRESH of !EXISTS ";
2645 g_err <<
"(Updates val = " << updatesValue <<
")";
2647 for (
int i=0; i < (int) whichVersion->size(); i++)
2654 if (calc.verifyRecAttr(recNum, updatesValue, ra) != 0)
2656 g_err <<
"Verify failed on recNum : " << recNum <<
" with updates value "
2657 << updatesValue <<
" for column " << ra->getColumn()->getAttrId()
2669 g_err <<
" Insert event" << endl;
2674 g_err <<
" Delete event" << endl;
2678 g_err <<
" Update event" << endl;
2681 g_err <<
" Event type : " << pOp->
getEventType() << endl;
2689 receivedEvents.push_back(ei);
2694 if (--MaxTimeouts == 0)
2713 g_err <<
"Received total of " << receivedEvents.size() <<
" events" << endl;
2718 keys.fill(records, z);
2719 gcis.fill(records, z2);
2722 for (Uint32 e=0; e < receivedEvents.size(); e++)
2726 if (ei.gci != currGci)
2728 if (ei.gci < currGci)
2733 for (
int i=0; i < records; i++)
2735 if (keys[i] != keys[0])
2737 g_err <<
"Count for id " << i
2738 <<
" is " << keys[
i]
2739 <<
" but should be " << keys[0] << endl;
2747 Uint32 eventIndex = keys[ei.id];
2750 ApiEventType et = expectedEvents[eventIndex];
2754 g_err <<
"Expected event of type " << et
2755 <<
" but found " << ei.type
2756 <<
" at expectedEvent " << eventIndex
2757 <<
" and event num " << e << endl;
2766 int records = ctx->getNumRecords();
2767 Ndb* ndb = GETNDB(step);
2773 char eventName[1024];
2774 sprintf(eventName,
"%s_EVENT",tab.
getName());
2779 g_err <<
"Failed to create event operation\n";
2793 eventBeforeRecAttr.push_back(pOp->getPreValue(tab.
getColumn(a)->
getName()));
2794 if (calc.isIdCol(a))
2796 if (calc.isUpdateCol(a))
2803 g_err <<
"Event operation execution failed : " << pOp->getNdbError() << endl;
2812 for (scenario = 0; scenario < 2; scenario++)
2814 g_err <<
"Scenario = " << scenario
2816 << ((scenario == 0)?
"before":
"after")
2817 <<
" operations )" << endl;
2820 int expectedError = 0;
2823 check(hugoOps.startTransaction(ndb) == 0, hugoOps);
2827 g_err <<
"Refresh before operations" << endl;
2831 check(hugoOps.pkRefreshRecord(ndb, 0, records, anyValue) == 0, hugoOps);
2839 g_err <<
" Do nothing" << endl;
2841 expectedEvents.push_back(Delete);
2847 g_err <<
" Insert" << endl;
2848 check(hugoOps.pkInsertRecord(ndb, 0, records, 1) == 0, hugoOps);
2852 expectedError = 630;
2853 expectedEvents.push_back(Delete);
2858 expectedEvents.push_back(Insert);
2866 g_err <<
" Refresh" << endl;
2869 expectedEvents.push_back(Delete);
2873 expectedEvents.push_back(Insert);
2881 g_err <<
" Update" << endl;
2882 check(hugoOps.pkUpdateRecord(ndb, 0, records, 3) == 0, hugoOps);
2885 expectedError = 920;
2886 expectedEvents.push_back(Delete);
2891 expectedEvents.push_back(Insert);
2898 g_err <<
" [Refresh] Delete [Refresh]" << endl;
2901 expectedError = 920;
2902 expectedEvents.push_back(Delete);
2907 expectedEvents.push_back(Delete);
2909 check(hugoOps.pkDeleteRecord(ndb, 0, records) == 0, hugoOps);
2914 g_err <<
" Refresh" << endl;
2916 expectedEvents.push_back(Delete);
2922 g_err <<
" Double refresh" << endl;
2926 check(hugoOps.pkRefreshRecord(ndb, 0, records, anyValue) == 0, hugoOps);
2927 expectedError = 920;
2928 expectedEvents.push_back(Delete);
2937 g_err <<
"Refresh after operations" << endl;
2941 check(hugoOps.pkRefreshRecord(ndb, 0, records, anyValue) == 0, hugoOps);
2944 int rc = hugoOps.execute_Commit(ndb, AO_IgnoreError);
2945 check(rc == expectedError, hugoOps);
2947 check(hugoOps.closeTransaction(ndb) == 0, hugoOps);
2953 if (runVerifyRowCount(ctx, step) != NDBT_OK)
2960 if (runVerifyRowCount(ctx, step) != NDBT_OK)
2964 g_err <<
"Expecting the following sequence..." << endl;
2965 for (Uint32 i=0; i < expectedEvents.size(); i++)
2968 switch(expectedEvents[i])
2971 g_err <<
"Insert" << endl;
2974 g_err <<
"Update" << endl;
2977 g_err <<
"Delete" << endl;
2986 int rc = collectEvents(ndb, calc, tab, receivedEvents, idCol, updateCol,
2987 &eventBeforeRecAttr,
2988 &eventAfterRecAttr);
2991 rc = verifyEvents(receivedEvents,
2998 g_err <<
"Drop Event Operation failed : " << ndb->
getNdbError() << endl;
3017 PreRefreshOps preRefreshOps;
3021 {
"No row, No pre-ops",
false, PR_NONE },
3022 {
"No row, Insert pre-op",
false, PR_INSERT },
3023 {
"No row, Insert-Del pre-op",
false, PR_INSERTDELETE },
3024 {
"Row exists, No pre-ops",
true, PR_NONE },
3025 {
"Row exists, Delete pre-op",
true, PR_DELETE }
3040 const char* opTypeNames[] =
3069 Ndb* ndb = GETNDB(step);
3070 Uint32 numScenarios =
sizeof(refreshTests) /
sizeof(refreshTests[0]);
3073 for (Uint32 s = 0; s < numScenarios; s++)
3077 if (scenario.preExist)
3080 if (hugoTrans.loadTable(ndb, 1) != 0)
3082 g_err <<
"Pre-exist failed : " << hugoTrans.getNdbError() << endl;
3087 if (hugoTrans.startTransaction(ndb) != 0)
3089 g_err <<
"Start trans failed : " << hugoTrans.getNdbError() << endl;
3093 g_err <<
"Scenario : " << scenario.name << endl;
3096 switch (scenario.preRefreshOps)
3101 case PR_INSERTDELETE:
3102 if (hugoTrans.pkInsertRecord(ndb, 0) != 0)
3104 g_err <<
"Pre insert failed : " << hugoTrans.getNdbError() << endl;
3108 if (scenario.preRefreshOps == PR_INSERT)
3111 if (hugoTrans.pkDeleteRecord(ndb, 0) != 0)
3113 g_err <<
"Pre delete failed : " << hugoTrans.getNdbError() << endl;
3120 if (hugoTrans.pkRefreshRecord(ndb, 0) != 0)
3122 g_err <<
"Refresh failed : " << hugoTrans.getNdbError() << endl;
3127 if (hugoTrans.execute_NoCommit(ndb) != 0)
3129 g_err <<
"Execute failed : " << hugoTrans.getNdbError() << endl;
3136 Uint32 ot = OP_READ_C;
3138 while (ot < OP_LAST)
3140 if (hugoOps.startTransaction(ndb) != 0)
3142 g_err <<
"Start trans2 failed : " << hugoOps.getNdbError() << endl;
3146 g_err <<
"Operation type : " << opTypeNames[ot] << endl;
3160 res = hugoOps.pkInsertRecord(ndb, 0);
3163 res = hugoOps.pkUpdateRecord(ndb, 0);
3166 res = hugoOps.pkWriteRecord(ndb, 0);
3169 res = hugoOps.pkDeleteRecord(ndb, 0);
3175 hugoOps.execute_Commit(ndb);
3177 if ((ot == OP_READ_C) && (scenario.preExist))
3179 if (hugoOps.getNdbError().code == 0)
3181 g_err <<
"Read committed succeeded" << endl;
3185 g_err <<
"UNEXPECTED : Read committed failed. " << hugoOps.getNdbError() << endl;
3191 if (hugoOps.getNdbError().code == 0)
3193 g_err << opTypeNames[ot] <<
" succeeded, should not have" << endl;
3198 hugoOps.closeTransaction(ndb);
3206 hugoTrans.closeTransaction(ndb);
3208 if (scenario.preExist)
3211 if (hugoTrans.pkDelRecords(ndb, 0) != 0)
3213 g_err <<
"Delete pre existing failed : " << hugoTrans.getNdbError() << endl;
3223 NDBT_TESTSUITE(testBasic);
3224 TESTCASE(
"PkInsert",
3225 "Verify that we can insert and delete from this table using PK"
3226 "NOTE! No errors are allowed!" ){
3227 INITIALIZER(runInsert);
3228 VERIFIER(runVerifyInsert);
3231 "Verify that we can insert, read and delete from this table using PK"){
3233 INITIALIZER(runLoadTable);
3235 FINALIZER(runClearTable);
3237 TESTCASE(
"PkDirtyRead",
3238 "Verify that we can insert, dirty read and delete from this table using PK"){
3239 TC_PROPERTY(
"LockMode", NdbOperation::LM_Dirty);
3240 INITIALIZER(runLoadTable);
3242 FINALIZER(runClearTable);
3244 TESTCASE(
"PkSimpleRead",
3245 "Verify that we can insert, simple read and delete from this table using PK"){
3247 INITIALIZER(runLoadTable);
3249 FINALIZER(runClearTable);
3251 TESTCASE(
"PkUpdate",
3252 "Verify that we can insert, update and delete from this table using PK"){
3253 INITIALIZER(runLoadTable);
3255 FINALIZER(runClearTable);
3257 TESTCASE(
"PkDelete",
3258 "Verify that we can delete from this table using PK"){
3259 INITIALIZER(runLoadTable);
3261 FINALIZER(runClearTable);
3263 TESTCASE(
"UpdateAndRead",
3264 "Verify that we can read and update at the same time"){
3265 INITIALIZER(runLoadTable);
3272 FINALIZER(runClearTable);
3274 TESTCASE(
"PkReadAndLocker",
3275 "Verify that we can read although there are "\
3276 " a number of 1 second locks in the table"){
3277 INITIALIZER(runLoadTable);
3278 STEP(runPkReadUntilStopped);
3280 FINALIZER(runClearTable);
3282 TESTCASE(
"PkReadAndLocker2",
3283 "Verify that we can read and update although there are "\
3284 " a number of 1 second locks in the table"){
3285 INITIALIZER(runLoadTable);
3286 STEP(runPkReadUntilStopped);
3287 STEP(runPkReadUntilStopped);
3288 STEP(runPkReadUntilStopped);
3289 STEP(runPkReadUntilStopped);
3290 STEP(runPkReadUntilStopped);
3291 STEP(runPkReadUntilStopped);
3293 FINALIZER(runClearTable);
3295 TESTCASE(
"PkReadUpdateAndLocker",
3296 "Verify that we can read and update although there are "\
3297 " a number of 1 second locks in the table"){
3298 INITIALIZER(runLoadTable);
3299 STEP(runPkReadUntilStopped);
3300 STEP(runPkReadUntilStopped);
3301 STEP(runPkUpdateUntilStopped);
3302 STEP(runPkUpdateUntilStopped);
3304 FINALIZER(runClearTable);
3306 TESTCASE(
"ReadWithLocksAndInserts",
3307 "TR457: This test is added to verify that an insert of a records "\
3308 "that is already in the database does not delete the record"){
3309 INITIALIZER(runLoadTable);
3310 STEP(runPkReadUntilStopped);
3311 STEP(runPkReadUntilStopped);
3313 STEP(runInsertUntilStopped);
3314 FINALIZER(runClearTable);
3316 TESTCASE(
"PkInsertTwice",
3317 "Verify that we can't insert an already inserted record."
3318 "Error should be returned" ){
3319 INITIALIZER(runLoadTable);
3320 STEP(runInsertTwice);
3321 FINALIZER(runClearTable);
3323 TESTCASE(
"NoCommitSleep",
3324 "Verify what happens when a NoCommit transaction is aborted by "
3325 "NDB because the application is sleeping" ){
3326 INITIALIZER(runLoadTable);
3327 INITIALIZER(runNoCommitSleep);
3328 FINALIZER(runClearTable2);
3330 TESTCASE(
"Commit626",
3331 "Verify what happens when a Commit transaction is aborted by "
3332 "NDB because the record does no exist" ){
3333 INITIALIZER(runClearTable2);
3334 INITIALIZER(runCommit626);
3335 FINALIZER(runClearTable2);
3337 TESTCASE(
"CommitTry626",
3338 "Verify what happens when a Commit(TryCommit) \n"
3339 "transaction is aborted by "
3340 "NDB because the record does no exist" ){
3341 INITIALIZER(runClearTable2);
3342 INITIALIZER(runCommit_TryCommit626);
3343 FINALIZER(runClearTable2);
3345 TESTCASE(
"CommitAsMuch626",
3346 "Verify what happens when a Commit(CommitAsMuchAsPossible) \n"
3347 "transaction is aborted by\n"
3348 "NDB because the record does no exist" ){
3349 INITIALIZER(runClearTable2);
3350 INITIALIZER(runCommit_CommitAsMuchAsPossible626);
3351 FINALIZER(runClearTable2);
3353 TESTCASE(
"NoCommit626",
3354 "Verify what happens when a NoCommit transaction is aborted by "
3355 "NDB because the record does no exist" ){
3356 INITIALIZER(runClearTable2);
3357 INITIALIZER(runNoCommit626);
3358 FINALIZER(runClearTable2);
3360 TESTCASE(
"NoCommitRollback626",
3361 "Verify what happens when a NoCommit transaction is aborted by "
3362 "NDB because the record does no exist and then we try to rollback\n"
3363 "the transaction" ){
3364 INITIALIZER(runClearTable2);
3365 INITIALIZER(runNoCommitRollback626);
3366 FINALIZER(runClearTable2);
3368 TESTCASE(
"Commit630",
3369 "Verify what happens when a Commit transaction is aborted by "
3370 "NDB because the record already exist" ){
3371 INITIALIZER(runLoadTable);
3372 INITIALIZER(runCommit630);
3373 FINALIZER(runClearTable2);
3375 TESTCASE(
"CommitTry630",
3376 "Verify what happens when a Commit(TryCommit) \n"
3377 "transaction is aborted by "
3378 "NDB because the record already exist" ){
3379 INITIALIZER(runLoadTable);
3380 INITIALIZER(runCommit_TryCommit630);
3381 FINALIZER(runClearTable2);
3383 TESTCASE(
"CommitAsMuch630",
3384 "Verify what happens when a Commit(CommitAsMuchAsPossible) \n"
3385 "transaction is aborted by\n"
3386 "NDB because the record already exist" ){
3387 INITIALIZER(runLoadTable);
3388 INITIALIZER(runCommit_CommitAsMuchAsPossible630);
3389 FINALIZER(runClearTable2);
3391 TESTCASE(
"NoCommit630",
3392 "Verify what happens when a NoCommit transaction is aborted by "
3393 "NDB because the record already exist" ){
3394 INITIALIZER(runLoadTable);
3395 INITIALIZER(runNoCommit630);
3396 FINALIZER(runClearTable2);
3398 TESTCASE(
"NoCommitRollback630",
3399 "Verify what happens when a NoCommit transaction is aborted by "
3400 "NDB because the record already exist and then we try to rollback\n"
3401 "the transaction" ){
3402 INITIALIZER(runLoadTable);
3403 INITIALIZER(runNoCommitRollback630);
3404 FINALIZER(runClearTable2);
3406 TESTCASE(
"NoCommitAndClose",
3407 "Verify what happens when a NoCommit transaction is closed "
3408 "without rolling back the transaction " ){
3409 INITIALIZER(runLoadTable);
3410 INITIALIZER(runNoCommitAndClose);
3411 FINALIZER(runClearTable2);
3413 TESTCASE(
"RollbackDelete",
3414 "Test rollback of a no committed delete"){
3415 INITIALIZER(runLoadTable);
3416 INITIALIZER(runCheckRollbackDelete);
3417 FINALIZER(runClearTable2);
3419 TESTCASE(
"RollbackUpdate",
3420 "Test rollback of a no committed update"){
3421 INITIALIZER(runLoadTable);
3422 INITIALIZER(runCheckRollbackUpdate);
3423 FINALIZER(runClearTable2);
3425 TESTCASE(
"RollbackDeleteMultiple",
3426 "Test rollback of 10 non committed delete"){
3427 INITIALIZER(runLoadTable);
3428 INITIALIZER(runCheckRollbackDeleteMultiple);
3429 FINALIZER(runClearTable2);
3431 TESTCASE(
"ImplicitRollbackDelete",
3432 "Test close transaction after a no commited delete\n"
3433 "this would give an implicit rollback of the delete\n"){
3434 INITIALIZER(runLoadTable);
3435 INITIALIZER(runCheckImplicitRollbackDelete);
3436 FINALIZER(runClearTable2);
3438 TESTCASE(
"CommitDelete",
3439 "Test close transaction after a no commited delete\n"
3440 "this would give an implicit rollback of the delete\n"){
3441 INITIALIZER(runLoadTable);
3442 INITIALIZER(runCheckCommitDelete);
3443 FINALIZER(runClearTable2);
3445 TESTCASE(
"RollbackNothing",
3446 "Test rollback of nothing"){
3447 INITIALIZER(runLoadTable);
3448 INITIALIZER(runRollbackNothing);
3449 FINALIZER(runClearTable2);
3451 TESTCASE(
"MassiveRollback",
3452 "Test rollback of 4096 operations"){
3453 INITIALIZER(runClearTable2);
3454 INITIALIZER(runMassiveRollback);
3455 FINALIZER(runClearTable2);
3457 TESTCASE(
"MassiveRollback2",
3458 "Test rollback of 4096 operations"){
3459 INITIALIZER(runClearTable2);
3460 INITIALIZER(runMassiveRollback2);
3461 FINALIZER(runClearTable2);
3463 TESTCASE(
"MassiveRollback3",
3464 "Test rollback of 4096 operations"){
3465 INITIALIZER(runClearTable2);
3466 STEP(runMassiveRollback3);
3467 STEP(runMassiveRollback3);
3468 FINALIZER(runClearTable2);
3470 TESTCASE(
"MassiveRollback4",
3471 "Test rollback of 4096 operations"){
3472 INITIALIZER(runClearTable2);
3473 STEP(runMassiveRollback4);
3474 STEP(runMassiveRollback4);
3475 FINALIZER(runClearTable2);
3477 TESTCASE(
"MassiveTransaction",
3478 "Test very large insert transaction"){
3479 INITIALIZER(runLoadTable2);
3480 FINALIZER(runClearTable2);
3482 TESTCASE(
"TupError",
3483 "Verify what happens when we fill the db" ){
3484 INITIALIZER(runTupErrors);
3486 TESTCASE(
"InsertError",
"" ){
3487 INITIALIZER(runInsertError);
3489 TESTCASE(
"InsertError2",
"" ){
3490 INITIALIZER(runInsertError2);
3493 "Verify what happens when we fill the db" ){
3496 TESTCASE(
"Bug25090",
3497 "Verify what happens when we fill the db" ){
3500 TESTCASE(
"DeleteRead",
3501 "Verify Delete+Read" ){
3502 INITIALIZER(runLoadTable);
3503 INITIALIZER(runDeleteRead);
3504 FINALIZER(runClearTable2);
3506 TESTCASE(
"Bug27756",
3507 "Verify what happens when we fill the db" ){
3510 TESTCASE(
"Bug28073",
3511 "Infinite loop in lock queue" ){
3514 TESTCASE(
"Bug20535",
3515 "Verify what happens when we fill the db" ){
3518 TESTCASE(
"DDInsertFailUpdateBatch",
3519 "Verify DD insert failure effect on other ops in batch on same PK"){
3520 STEP(runDDInsertFailUpdateBatch);
3523 TESTCASE(
"Bug34348",
3524 "Test fragment directory range full in ACC.\n"
3525 "NOTE: If interrupted, must clear error insert 3002 manually"){
3528 TESTCASE(
"UnlockBatch",
3529 "Test that batched unlock operations work ok"){
3530 TC_PROPERTY(
"Batchsize", 33);
3531 INITIALIZER(runLoadTable);
3533 FINALIZER(runClearTable);
3535 TESTCASE(
"DoubleUnlock",
3536 "Test that batched unlock operations work ok"){
3537 TC_PROPERTY(
"DoubleUnlock", 1);
3538 INITIALIZER(runLoadTable);
3540 FINALIZER(runClearTable);
3542 TESTCASE(
"UnlockUpdateBatch",
3543 "Test Unlock mixed with Update"){
3544 TC_PROPERTY(
"Batchsize", 32);
3545 INITIALIZER(runLoadTable);
3552 FINALIZER(runClearTable);
3554 TESTCASE(
"RefreshTuple",
3555 "Test refreshTuple() operation properties"){
3556 INITIALIZER(initSubscription);
3557 INITIALIZER(runRefreshTuple);
3558 FINALIZER(removeSubscription);
3560 TESTCASE(
"Bug54986",
"")
3562 INITIALIZER(runBug54986);
3564 TESTCASE(
"Bug54944",
"")
3566 INITIALIZER(runBug54944);
3568 TESTCASE(
"Bug59496_case1",
"")
3570 STEP(runBug59496_case1);
3571 STEPS(runBug59496_scan, 10);
3573 TESTCASE(
"Bug59496_case2",
"")
3575 TC_PROPERTY(
"CHECK_ROWCOUNT", 1);
3576 INITIALIZER(runLoadTable);
3577 STEP(runBug59496_case2);
3578 STEPS(runBug59496_scan, 10);
3582 INITIALIZER(runLoadTable);
3583 INITIALIZER(runInit899);
3585 FINALIZER(runEnd899);
3587 TESTCASE(
"RefreshLocking",
3588 "Test Refresh locking properties")
3590 INITIALIZER(runRefreshLocking);
3592 NDBT_TESTSUITE_END(testBasic);
3595 TESTCASE(
"ReadConsistency",
3596 "Check that a read within a transaction returns the " \
3597 "same result no matter"){
3600 FINALIZER(runClearTable2);
3603 "Verify what happens when we fill the db" ){
3604 INITIALIZER(runFillTable);
3605 INITIALIZER(runPkRead);
3606 FINALIZER(runClearTable2);
3610 int main(
int argc,
const char** argv){
3612 NDBT_TESTSUITE_INSTANCE(testBasic);
3613 return testBasic.execute(argc, argv);