diff options
Diffstat (limited to 'ndb/test/ndbapi')
-rw-r--r-- | ndb/test/ndbapi/InsertRecs.cpp (renamed from ndb/test/ndbapi/telco/InsertRecs.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/Makefile.am | 81 | ||||
-rw-r--r-- | ndb/test/ndbapi/Makefile_old (renamed from ndb/test/ndbapi/Makefile) | 3 | ||||
-rw-r--r-- | ndb/test/ndbapi/ScanFilter.hpp (renamed from ndb/test/ndbapi/testScanInterpreter/ScanFilter.hpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ScanFunctions.hpp (renamed from ndb/test/ndbapi/testScan/ScanFunctions.hpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ScanInterpretTest.hpp (renamed from ndb/test/ndbapi/testScanInterpreter/ScanInterpretTest.hpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/TraceNdbApi.cpp (renamed from ndb/test/ndbapi/acid2/TraceNdbApi.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/VerifyNdbApi.cpp (renamed from ndb/test/ndbapi/acid2/VerifyNdbApi.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/acid.cpp (renamed from ndb/test/ndbapi/acid/acid.cpp) | 15 | ||||
-rw-r--r-- | ndb/test/ndbapi/acid2.cpp (renamed from ndb/test/ndbapi/acid2/acid2.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/adoInsertRecs.cpp (renamed from ndb/test/ndbapi/telco/adoInsertRecs.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/asyncGenerator.cpp (renamed from ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/Bank.cpp (renamed from ndb/test/ndbapi/bank/src/Bank.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/BankLoad.cpp (renamed from ndb/test/ndbapi/bank/src/BankLoad.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/Makefile.am | 22 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/Makefile_old (renamed from ndb/test/ndbapi/bank/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/bankCreator.cpp (renamed from ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/bankMakeGL.cpp (renamed from ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/bankSumAccounts.cpp (renamed from ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/bankTimer.cpp (renamed from ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/bankTransactionMaker.cpp (renamed from ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/bankValidateAllGLs.cpp (renamed from ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/bankCreator/Makefile (renamed from ndb/test/ndbapi/bank/bankCreator/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/bankMakeGL/Makefile (renamed from ndb/test/ndbapi/bank/bankMakeGL/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/bankSumAccounts/Makefile (renamed from ndb/test/ndbapi/bank/bankSumAccounts/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/bankTimer/Makefile (renamed from ndb/test/ndbapi/bank/bankTimer/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/bankTransactionMaker/Makefile (renamed from ndb/test/ndbapi/bank/bankTransactionMaker/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/bankValidateAllGLs/Makefile (renamed from ndb/test/ndbapi/bank/bankValidateAllGLs/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/src/Makefile (renamed from ndb/test/ndbapi/bank/src/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/old_dirs/testBank/Makefile (renamed from ndb/test/ndbapi/bank/testBank/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bank/testBank.cpp (renamed from ndb/test/ndbapi/bank/testBank/testBank.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/benchronja.cpp (renamed from ndb/test/ndbapi/ronja/benchronja/benchronja.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/bulk_copy.cpp (renamed from ndb/test/ndbapi/bulk_copy/bulk_copy.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/cdrserver.cpp (renamed from ndb/test/ndbapi/vw_test/cdrserver.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/celloDb.cpp (renamed from ndb/test/ndbapi/cello-sessionDb/celloDb.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/create_all_tabs.cpp (renamed from ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/create_tab.cpp (renamed from ndb/test/ndbapi/create_tab/create_tab.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/drop_all_tabs.cpp (renamed from ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/flexAsynch.cpp (renamed from ndb/test/ndbapi/flexAsynch/flexAsynch.cpp) | 9 | ||||
-rw-r--r-- | ndb/test/ndbapi/flexBench.cpp (renamed from ndb/test/ndbapi/flexBench/flexBench.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/flexHammer.cpp (renamed from ndb/test/ndbapi/flexHammer/flexHammer.cpp) | 15 | ||||
-rw-r--r-- | ndb/test/ndbapi/flexScan.cpp (renamed from ndb/test/ndbapi/flexScan/flexScan.cpp) | 25 | ||||
-rw-r--r-- | ndb/test/ndbapi/flexTT.cpp (renamed from ndb/test/ndbapi/flexTT/flexTT.cpp) | 5 | ||||
-rw-r--r-- | ndb/test/ndbapi/flexTimedAsynch.cpp (renamed from ndb/test/ndbapi/flexTimedAsynch/flexTimedAsynch.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/flex_bench_mysql.cpp (renamed from ndb/test/ndbapi/flex_bench_mysql/flex_bench_mysql.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/index.cpp (renamed from ndb/test/ndbapi/indexTest/index.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/index2.cpp (renamed from ndb/test/ndbapi/indexTest2/index2.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/initronja.cpp (renamed from ndb/test/ndbapi/ronja/initronja/initronja.cpp) | 11 | ||||
-rw-r--r-- | ndb/test/ndbapi/interpreterInTup.cpp (renamed from ndb/test/ndbapi/interpreterInTup/interpreterInTup.cpp) | 45 | ||||
-rw-r--r-- | ndb/test/ndbapi/mainAsyncGenerator.cpp (renamed from ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/msa.cpp (renamed from ndb/test/ndbapi/telco/msa.cpp) | 6 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_async1.cpp (renamed from ndb/test/ndbapi/lmc-bench/async-src/user/ndb_async1.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_async2.cpp (renamed from ndb/test/ndbapi/lmc-bench/async-src/user/ndb_async2.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_user_populate.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_user_transaction.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_user_transaction2.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction2.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_user_transaction3.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction3.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_user_transaction4.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction4.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_user_transaction5.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction5.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/ndb_user_transaction6.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction6.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/acid/Makefile (renamed from ndb/test/ndbapi/acid/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/acid2/Makefile (renamed from ndb/test/ndbapi/acid2/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp (renamed from ndb/test/ndbapi/acid2/TraceNdbApi.hpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp (renamed from ndb/test/ndbapi/acid2/VerifyNdbApi.hpp) | 0 | ||||
-rwxr-xr-x | ndb/test/ndbapi/old_dirs/basicAsynch/Makefile (renamed from ndb/test/ndbapi/basicAsynch/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/bulk_copy/Makefile (renamed from ndb/test/ndbapi/bulk_copy/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/create_all_tabs/Makefile (renamed from ndb/test/ndbapi/create_all_tabs/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/create_tab/Makefile (renamed from ndb/test/ndbapi/create_tab/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/drop_all_tabs/Makefile (renamed from ndb/test/ndbapi/drop_all_tabs/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexAsynch/Makefile (renamed from ndb/test/ndbapi/flexAsynch/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexBench/Makefile.am | 10 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexBench/Makefile_old (renamed from ndb/test/ndbapi/flexBench/Makefile) | 0 | ||||
-rwxr-xr-x | ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl (renamed from ndb/test/ndbapi/flexBench/ndbplot.pl) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexHammer/Makefile (renamed from ndb/test/ndbapi/flexHammer/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexHammer/README (renamed from ndb/test/ndbapi/flexHammer/README) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexScan/Makefile (renamed from ndb/test/ndbapi/flexScan/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexScan/README (renamed from ndb/test/ndbapi/flexScan/README) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexTT/Makefile (renamed from ndb/test/ndbapi/flexTT/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flexTimedAsynch/Makefile (renamed from ndb/test/ndbapi/flexTimedAsynch/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/flex_bench_mysql/Makefile (renamed from ndb/test/ndbapi/flex_bench_mysql/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/indexTest/Makefile (renamed from ndb/test/ndbapi/indexTest/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/indexTest2/Makefile (renamed from ndb/test/ndbapi/indexTest2/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/interpreterInTup/Makefile (renamed from ndb/test/ndbapi/interpreterInTup/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/Makefile (renamed from ndb/test/ndbapi/lmc-bench/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/Makefile (renamed from ndb/test/ndbapi/lmc-bench/async-src/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/generator/Makefile (renamed from ndb/test/ndbapi/lmc-bench/async-src/generator/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h (renamed from ndb/test/ndbapi/lmc-bench/async-src/include/dbGenerator.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h (renamed from ndb/test/ndbapi/lmc-bench/async-src/include/testData.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h (renamed from ndb/test/ndbapi/lmc-bench/async-src/include/userInterface.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/Makefile (renamed from ndb/test/ndbapi/lmc-bench/async-src/user/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h (renamed from ndb/test/ndbapi/lmc-bench/async-src/user/macros.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp (renamed from ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/bin/.empty (renamed from ndb/test/ndbapi/lmc-bench/bin/.empty) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp (renamed from ndb/test/ndbapi/lmc-bench/include/ndb_schema.hpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h (renamed from ndb/test/ndbapi/lmc-bench/include/testDefinitions.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/lib/.empty (renamed from ndb/test/ndbapi/lmc-bench/lib/.empty) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/script/Makefile (renamed from ndb/test/ndbapi/lmc-bench/script/Makefile) | 0 | ||||
-rwxr-xr-x | ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l-p10.sh (renamed from ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-l-p10.sh) | 0 | ||||
-rwxr-xr-x | ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l.sh (renamed from ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-l.sh) | 0 | ||||
-rwxr-xr-x | ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-p10.sh (renamed from ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-p10.sh) | 0 | ||||
-rwxr-xr-x | ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench.sh (renamed from ndb/test/ndbapi/lmc-bench/script/async-lmc-bench.sh) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/Makefile (renamed from ndb/test/ndbapi/lmc-bench/src/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/README (renamed from ndb/test/ndbapi/lmc-bench/src/README) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/Makefile (renamed from ndb/test/ndbapi/lmc-bench/src/generator/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c (renamed from ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h (renamed from ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c (renamed from ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h (renamed from ndb/test/ndbapi/lmc-bench/src/include/testData.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h (renamed from ndb/test/ndbapi/lmc-bench/src/include/userInterface.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.linux (renamed from ndb/test/ndbapi/lmc-bench/src/makevars.linux) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.sparc (renamed from ndb/test/ndbapi/lmc-bench/src/makevars.sparc) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/Makefile (renamed from ndb/test/ndbapi/lmc-bench/src/populator/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c (renamed from ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h (renamed from ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c (renamed from ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/Makefile (renamed from ndb/test/ndbapi/lmc-bench/src/user/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c (renamed from ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h (renamed from ndb/test/ndbapi/lmc-bench/src/user/macros.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/Makefile (renamed from ndb/test/ndbapi/lmc-bench/src/user/old/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h (renamed from ndb/test/ndbapi/lmc-bench/src/user/old/userHandle.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c (renamed from ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c (renamed from ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h (renamed from ndb/test/ndbapi/lmc-bench/src/user/userHandle.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp (renamed from ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp) | 61 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c (renamed from ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/restarter/Makefile (renamed from ndb/test/ndbapi/restarter/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/restarter2/Makefile (renamed from ndb/test/ndbapi/restarter2/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/restarts/Makefile (renamed from ndb/test/ndbapi/restarts/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/ronja/Makefile (renamed from ndb/test/ndbapi/ronja/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/ronja/benchronja/Makefile (renamed from ndb/test/ndbapi/ronja/benchronja/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/ronja/initronja/Makefile (renamed from ndb/test/ndbapi/ronja/initronja/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/telco/Makefile (renamed from ndb/test/ndbapi/telco/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/telco/readme (renamed from ndb/test/ndbapi/telco/readme) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testBackup/Makefile (renamed from ndb/test/ndbapi/testBackup/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testBasic/Makefile (renamed from ndb/test/ndbapi/testBasic/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testBlobs/Makefile (renamed from ndb/test/ndbapi/testBlobs/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testDataBuffers/Makefile (renamed from ndb/test/ndbapi/testDataBuffers/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testDict/Makefile (renamed from ndb/test/ndbapi/testDict/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testGrep/Makefile (renamed from ndb/test/ndbapi/testGrep/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testGrep/verify/Makefile (renamed from ndb/test/ndbapi/testGrep/verify/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testIndex/Makefile (renamed from ndb/test/ndbapi/testIndex/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testInterpreter/Makefile (renamed from ndb/test/ndbapi/testInterpreter/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testMgm/Makefile (renamed from ndb/test/ndbapi/testMgm/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testNdbApi/Makefile (renamed from ndb/test/ndbapi/testNdbApi/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testNodeRestart/Makefile (renamed from ndb/test/ndbapi/testNodeRestart/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testOIBasic/Makefile (renamed from ndb/test/ndbapi/testOIBasic/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testOIBasic/times.txt (renamed from ndb/test/ndbapi/testOIBasic/times.txt) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testOperations/Makefile (renamed from ndb/test/ndbapi/testOperations/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testOrderedIndex/Makefile (renamed from ndb/test/ndbapi/testOrderedIndex/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testRestartGci/Makefile (renamed from ndb/test/ndbapi/testRestartGci/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testScan/Makefile (renamed from ndb/test/ndbapi/testScan/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testScanInterpreter/Makefile (renamed from ndb/test/ndbapi/testScanInterpreter/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testSystemRestart/Makefile (renamed from ndb/test/ndbapi/testSystemRestart/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testTimeout/Makefile (renamed from ndb/test/ndbapi/testTimeout/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/testTransactions/Makefile (renamed from ndb/test/ndbapi/testTransactions/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/test_event/Makefile (renamed from ndb/test/ndbapi/test_event/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/vw_test/Makefile (renamed from ndb/test/ndbapi/vw_test/Makefile) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/vw_test/bcd.h (renamed from ndb/test/ndbapi/vw_test/bcd.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/vw_test/script/client_start (renamed from ndb/test/ndbapi/vw_test/script/client_start) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/vw_test/utv.h (renamed from ndb/test/ndbapi/vw_test/utv.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h (renamed from ndb/test/ndbapi/vw_test/vcdrfunc.h) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/restarter.cpp (renamed from ndb/test/ndbapi/restarter/restarter.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/restarter2.cpp (renamed from ndb/test/ndbapi/restarter2/restarter2.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/restarts.cpp (renamed from ndb/test/ndbapi/restarts/restarts.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/size.cpp (renamed from ndb/test/ndbapi/vw_test/size.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testBackup.cpp (renamed from ndb/test/ndbapi/testBackup/testBackup.cpp) | 3 | ||||
-rw-r--r-- | ndb/test/ndbapi/testBasic.cpp (renamed from ndb/test/ndbapi/testBasic/testBasic.cpp) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | ndb/test/ndbapi/testBasicAsynch.cpp (renamed from ndb/test/ndbapi/basicAsynch/testBasicAsynch.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testBlobs.cpp | 1213 | ||||
-rw-r--r-- | ndb/test/ndbapi/testBlobs/testBlobs.cpp | 195 | ||||
-rw-r--r-- | ndb/test/ndbapi/testDataBuffers.cpp (renamed from ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp) | 6 | ||||
-rw-r--r-- | ndb/test/ndbapi/testDict.cpp (renamed from ndb/test/ndbapi/testDict/testDict.cpp) | 6 | ||||
-rw-r--r-- | ndb/test/ndbapi/testGrep.cpp (renamed from ndb/test/ndbapi/testGrep/testGrep.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testGrepVerify.cpp (renamed from ndb/test/ndbapi/testGrep/verify/testGrepVerify.cpp) | 5 | ||||
-rw-r--r-- | ndb/test/ndbapi/testIndex.cpp (renamed from ndb/test/ndbapi/testIndex/testIndex.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testInterpreter.cpp (renamed from ndb/test/ndbapi/testInterpreter/testInterpreter.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testMgm.cpp (renamed from ndb/test/ndbapi/testMgm/testMgm.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testNdbApi.cpp (renamed from ndb/test/ndbapi/testNdbApi/testNdbApi.cpp) | 4 | ||||
-rw-r--r-- | ndb/test/ndbapi/testNodeRestart.cpp (renamed from ndb/test/ndbapi/testNodeRestart/testNodeRestart.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testOIBasic.cpp (renamed from ndb/test/ndbapi/testOIBasic/testOIBasic.cpp) | 61 | ||||
-rw-r--r-- | ndb/test/ndbapi/testOperations.cpp (renamed from ndb/test/ndbapi/testOperations/testOperations.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testOrderedIndex.cpp (renamed from ndb/test/ndbapi/testOrderedIndex/testOrderedIndex.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/testRestartGci.cpp (renamed from ndb/test/ndbapi/testRestartGci/testRestartGci.cpp) | 2 | ||||
-rw-r--r-- | ndb/test/ndbapi/testScan.cpp (renamed from ndb/test/ndbapi/testScan/testScan.cpp) | 91 | ||||
-rw-r--r-- | ndb/test/ndbapi/testScanInterpreter.cpp (renamed from ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp) | 20 | ||||
-rw-r--r-- | ndb/test/ndbapi/testScanPerf/Makefile | 9 | ||||
-rw-r--r-- | ndb/test/ndbapi/testScanPerf/testScanPerf.cpp | 368 | ||||
-rw-r--r-- | ndb/test/ndbapi/testSystemRestart.cpp (renamed from ndb/test/ndbapi/testSystemRestart/testSystemRestart.cpp) | 247 | ||||
-rw-r--r-- | ndb/test/ndbapi/testTimeout.cpp (renamed from ndb/test/ndbapi/testTimeout/testTimeout.cpp) | 12 | ||||
-rw-r--r-- | ndb/test/ndbapi/testTransactions.cpp (renamed from ndb/test/ndbapi/testTransactions/testTransactions.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/test_event.cpp (renamed from ndb/test/ndbapi/test_event/test_event.cpp) | 0 | ||||
-rw-r--r-- | ndb/test/ndbapi/userInterface.cpp (renamed from ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp) | 0 |
193 files changed, 2219 insertions, 349 deletions
diff --git a/ndb/test/ndbapi/telco/InsertRecs.cpp b/ndb/test/ndbapi/InsertRecs.cpp index f42786d666d..f42786d666d 100644 --- a/ndb/test/ndbapi/telco/InsertRecs.cpp +++ b/ndb/test/ndbapi/InsertRecs.cpp diff --git a/ndb/test/ndbapi/Makefile.am b/ndb/test/ndbapi/Makefile.am new file mode 100644 index 00000000000..52058c306fb --- /dev/null +++ b/ndb/test/ndbapi/Makefile.am @@ -0,0 +1,81 @@ + +SUBDIRS = bank + +ndbtest_PROGRAMS = \ +flexBench \ +drop_all_tabs \ +create_all_tabs \ +create_tab \ +flexAsynch \ +flexBench \ +flexHammer \ +flexScan \ +flexTT \ +testBackup \ +testBasic \ +testBasicAsynch \ +testBlobs \ +testDataBuffers \ +testDict \ +testIndex \ +testMgm \ +testNdbApi \ +testNodeRestart \ +testOIBasic \ +testOperations \ +testRestartGci \ +testScan \ +testScanInterpreter \ +testSystemRestart \ +testTimeout \ +testTransactions \ +test_event + +#flexTimedAsynch +#testBlobs +#flex_bench_mysql + +create_all_tabs_SOURCES = create_all_tabs.cpp +create_tab_SOURCES = create_tab.cpp +drop_all_tabs_SOURCES = drop_all_tabs.cpp +flexAsynch_SOURCES = flexAsynch.cpp +flexBench_SOURCES = flexBench.cpp +flexHammer_SOURCES = flexHammer.cpp +flexScan_SOURCES = flexScan.cpp +flexTT_SOURCES = flexTT.cpp +#flexTimedAsynch_SOURCES = flexTimedAsynch.cpp +#flex_bench_mysql_SOURCES = flex_bench_mysql.cpp +testBackup_SOURCES = testBackup.cpp +testBasic_SOURCES = testBasic.cpp +testBasicAsynch_SOURCES = testBasicAsynch.cpp +testBlobs_SOURCES = testBlobs.cpp +testDataBuffers_SOURCES = testDataBuffers.cpp +testDict_SOURCES = testDict.cpp +testIndex_SOURCES = testIndex.cpp +testMgm_SOURCES = testMgm.cpp +testNdbApi_SOURCES = testNdbApi.cpp +testNodeRestart_SOURCES = testNodeRestart.cpp +testOIBasic_SOURCES = testOIBasic.cpp +testOperations_SOURCES = testOperations.cpp +testRestartGci_SOURCES = testRestartGci.cpp +testScan_SOURCES = testScan.cpp +testScanInterpreter_SOURCES = testScanInterpreter.cpp +testSystemRestart_SOURCES = testSystemRestart.cpp +testTimeout_SOURCES = testTimeout.cpp +testTransactions_SOURCES = testTransactions.cpp +test_event_SOURCES = test_event.cpp + +INCLUDES_LOC = -I$(top_srcdir)/ndb/include/kernel + +include $(top_srcdir)/ndb/config/common.mk.am +include $(top_srcdir)/ndb/config/type_ndbapitest.mk.am + +##testDict_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel +##testIndex_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel +##testSystemRestart_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel +##testTransactions_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel +testBackup_LDADD = $(LDADD) bank/libbank.a + +# Don't update the files from bitkeeper +%::SCCS/s.% + diff --git a/ndb/test/ndbapi/Makefile b/ndb/test/ndbapi/Makefile_old index 91f0c84c18e..34761e1eb9c 100644 --- a/ndb/test/ndbapi/Makefile +++ b/ndb/test/ndbapi/Makefile_old @@ -37,7 +37,8 @@ BIN_DIRS = \ indexTest \ test_event \ indexTest2 \ - testGrep + testGrep \ + testBlobs ifeq ($(NDB_OS), SOLARIS) ifeq ($(NDB_COMPILER), FORTE6) diff --git a/ndb/test/ndbapi/testScanInterpreter/ScanFilter.hpp b/ndb/test/ndbapi/ScanFilter.hpp index 09786756798..09786756798 100644 --- a/ndb/test/ndbapi/testScanInterpreter/ScanFilter.hpp +++ b/ndb/test/ndbapi/ScanFilter.hpp diff --git a/ndb/test/ndbapi/testScan/ScanFunctions.hpp b/ndb/test/ndbapi/ScanFunctions.hpp index 36d01909861..36d01909861 100644 --- a/ndb/test/ndbapi/testScan/ScanFunctions.hpp +++ b/ndb/test/ndbapi/ScanFunctions.hpp diff --git a/ndb/test/ndbapi/testScanInterpreter/ScanInterpretTest.hpp b/ndb/test/ndbapi/ScanInterpretTest.hpp index 3862de34111..3862de34111 100644 --- a/ndb/test/ndbapi/testScanInterpreter/ScanInterpretTest.hpp +++ b/ndb/test/ndbapi/ScanInterpretTest.hpp diff --git a/ndb/test/ndbapi/acid2/TraceNdbApi.cpp b/ndb/test/ndbapi/TraceNdbApi.cpp index bd43b15f2e6..bd43b15f2e6 100644 --- a/ndb/test/ndbapi/acid2/TraceNdbApi.cpp +++ b/ndb/test/ndbapi/TraceNdbApi.cpp diff --git a/ndb/test/ndbapi/acid2/VerifyNdbApi.cpp b/ndb/test/ndbapi/VerifyNdbApi.cpp index 79645827e2c..79645827e2c 100644 --- a/ndb/test/ndbapi/acid2/VerifyNdbApi.cpp +++ b/ndb/test/ndbapi/VerifyNdbApi.cpp diff --git a/ndb/test/ndbapi/acid/acid.cpp b/ndb/test/ndbapi/acid.cpp index 49961531a1c..157b3c7b3ef 100644 --- a/ndb/test/ndbapi/acid/acid.cpp +++ b/ndb/test/ndbapi/acid.cpp @@ -15,6 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <NdbApi.hpp> +#include <NdbSchemaCon.hpp> #include <NdbMutex.h> #include <NdbOut.hpp> #include <NdbSleep.h> @@ -230,7 +231,6 @@ extern "C" void* NdbThreadFuncInsert(void* pArg) VerifyMethodInt(pNdbOperationW, setValue(c_szWarehouseSum, nWarehouseSum)); int iExec = pNdbConnection->execute(Commit); int iError = pNdbConnection->getNdbError().code; - CommitStatusType cs = pNdbConnection->commitStatus(); if(iExec<0 && iError!=0 && iError!=266 && iError!=630) { ReportMethodInt(iExec, pNdbConnection, "pNdbConnection", "execute(Commit)", __FILE__, __LINE__); @@ -285,7 +285,6 @@ extern "C" void* NdbThreadFuncUpdate(void* pArg) VerifyMethodInt(pNdbOperationW, setValue(c_szWarehouseSum, nWarehouseSum)); int iExec = pNdbConnection->execute(Commit); int iError = pNdbConnection->getNdbError().code; - CommitStatusType cs = pNdbConnection->commitStatus(); if(iExec<0 && iError!=0 && iError!=266 && iError!=626) { ReportMethodInt(iExec, pNdbConnection, "pNdbConnection", "execute(Commit)", __FILE__, __LINE__); @@ -333,7 +332,6 @@ extern "C" void* NdbThreadFuncDelete(void* pArg) } int iExec = pNdbConnection->execute(Commit); int iError = pNdbConnection->getNdbError().code; - CommitStatusType cs = pNdbConnection->commitStatus(); if(iExec<0 && iError!=0 && iError!=266 && iError!=626) { ReportMethodInt(iExec, pNdbConnection, "pNdbConnection", "execute(Commit)", __FILE__, __LINE__); @@ -389,7 +387,7 @@ extern "C" void* NdbThreadFuncRead(void* pArg) } int iExec = pNdbConnection->execute(Commit); int iError = pNdbConnection->getNdbError().code; - CommitStatusType cs = pNdbConnection->commitStatus(); + if(iExec<0 && iError!=0 && iError!=266 && iError!=626) { ReportMethodInt(iExec, pNdbConnection, "pNdbConnection", "execute(Commit)", __FILE__, __LINE__); } @@ -465,8 +463,7 @@ NDB_COMMAND(acid, "acid", "acid", "acid", 65535) VerifyMethodInt(pNdb, init()); VerifyMethodInt(pNdb, waitUntilReady()); - NdbSchemaCon* pNdbSchemaCon = NULL ; - VerifyMethodPtr(pNdbSchemaCon, pNdb, startSchemaTransaction()); + NdbSchemaCon* pNdbSchemaCon= NdbSchemaCon::startSchemaTrans(pNdb); if(!pNdbSchemaCon){ ndbout <<"startSchemaTransaction failed, exiting now" << endl ; delete pNdb ; @@ -497,9 +494,9 @@ NDB_COMMAND(acid, "acid", "acid", "acid", 65535) VerifyMethodInt(pNdbSchemaOp, createAttribute(c_szWarehouseSum, NoKey, 32, 1, UnSigned, MMBased, false)); VerifyMethodInt(pNdbSchemaOp, createAttribute(c_szWarehouseCount, NoKey, 32, 1, UnSigned, MMBased, false)); VerifyMethodInt(pNdbSchemaCon, execute()); - VerifyMethodVoid(pNdb, closeSchemaTransaction(pNdbSchemaCon)); + NdbSchemaCon::closeSchemaTrans(pNdbSchemaCon); - VerifyMethodPtr(pNdbSchemaCon, pNdb, startSchemaTransaction()); + pNdbSchemaCon= NdbSchemaCon::startSchemaTrans(pNdb); VerifyMethodPtr(pNdbSchemaOp, pNdbSchemaCon, getNdbSchemaOp()); #if defined NDB_OSE || defined NDB_SOFTOSE VerifyMethodInt(pNdbSchemaOp, createTable( @@ -526,7 +523,7 @@ NDB_COMMAND(acid, "acid", "acid", "acid", 65535) VerifyMethodInt(pNdbSchemaOp, createAttribute(c_szDistrictSum, NoKey, 32, 1, UnSigned, MMBased, false)); VerifyMethodInt(pNdbSchemaOp, createAttribute(c_szDistrictCount, NoKey, 32, 1, UnSigned, MMBased, false)); VerifyMethodInt(pNdbSchemaCon, execute()); - VerifyMethodVoid(pNdb, closeSchemaTransaction(pNdbSchemaCon)); + NdbSchemaCon::closeSchemaTrans(pNdbSchemaCon); g_pNdbMutex = NdbMutex_Create(); NdbMutex_Lock(g_pNdbMutex); diff --git a/ndb/test/ndbapi/acid2/acid2.cpp b/ndb/test/ndbapi/acid2.cpp index 434a0450daa..434a0450daa 100644 --- a/ndb/test/ndbapi/acid2/acid2.cpp +++ b/ndb/test/ndbapi/acid2.cpp diff --git a/ndb/test/ndbapi/telco/adoInsertRecs.cpp b/ndb/test/ndbapi/adoInsertRecs.cpp index 0bc67ef641b..0bc67ef641b 100644 --- a/ndb/test/ndbapi/telco/adoInsertRecs.cpp +++ b/ndb/test/ndbapi/adoInsertRecs.cpp diff --git a/ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp b/ndb/test/ndbapi/asyncGenerator.cpp index 84a93414712..84a93414712 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp +++ b/ndb/test/ndbapi/asyncGenerator.cpp diff --git a/ndb/test/ndbapi/bank/src/Bank.cpp b/ndb/test/ndbapi/bank/Bank.cpp index 11ebf087fd4..14883205693 100644 --- a/ndb/test/ndbapi/bank/src/Bank.cpp +++ b/ndb/test/ndbapi/bank/Bank.cpp @@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "../Bank.hpp" +#include "Bank.hpp" #include <time.h> #include <NdbSleep.h> #include <UtilTransactions.hpp> diff --git a/ndb/test/ndbapi/bank/src/BankLoad.cpp b/ndb/test/ndbapi/bank/BankLoad.cpp index 985a49d5f64..76261b664a6 100644 --- a/ndb/test/ndbapi/bank/src/BankLoad.cpp +++ b/ndb/test/ndbapi/bank/BankLoad.cpp @@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "../Bank.hpp" +#include "Bank.hpp" #include <UtilTransactions.hpp> /** diff --git a/ndb/test/ndbapi/bank/Makefile.am b/ndb/test/ndbapi/bank/Makefile.am new file mode 100644 index 00000000000..886d664aefb --- /dev/null +++ b/ndb/test/ndbapi/bank/Makefile.am @@ -0,0 +1,22 @@ + +ndbtest_PROGRAMS = testBank bankSumAccounts bankValidateAllGLs bankMakeGL bankTransactionMaker bankCreator bankTimer + +noinst_LIBRARIES = libbank.a + +libbank_a_SOURCES = Bank.cpp BankLoad.cpp Bank.hpp + +testBank_SOURCES = testBank.cpp +bankSumAccounts_SOURCES = bankSumAccounts.cpp +bankValidateAllGLs_SOURCES = bankValidateAllGLs.cpp +bankMakeGL_SOURCES = bankMakeGL.cpp +bankTransactionMaker_SOURCES = bankTransactionMaker.cpp +bankCreator_SOURCES = bankCreator.cpp +bankTimer_SOURCES = bankTimer.cpp + +LDADD_LOC = $(noinst_LIBRARIES) + +include $(top_srcdir)/ndb/config/common.mk.am +include $(top_srcdir)/ndb/config/type_ndbapitest.mk.am + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/ndb/test/ndbapi/bank/Makefile b/ndb/test/ndbapi/bank/Makefile_old index f710f9e6612..f710f9e6612 100644 --- a/ndb/test/ndbapi/bank/Makefile +++ b/ndb/test/ndbapi/bank/Makefile_old diff --git a/ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp b/ndb/test/ndbapi/bank/bankCreator.cpp index d84818baf24..5331ec6ba69 100644 --- a/ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp +++ b/ndb/test/ndbapi/bank/bankCreator.cpp @@ -23,7 +23,7 @@ #include <NDBT.hpp> #include <NdbSleep.h> #include <getarg.h> -#include "../Bank.hpp" +#include "Bank.hpp" int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp b/ndb/test/ndbapi/bank/bankMakeGL.cpp index 55e9081a598..54bc559fbf9 100644 --- a/ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp +++ b/ndb/test/ndbapi/bank/bankMakeGL.cpp @@ -23,7 +23,7 @@ #include <NDBT.hpp> #include <NdbSleep.h> #include <getarg.h> -#include "../Bank.hpp" +#include "Bank.hpp" int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp b/ndb/test/ndbapi/bank/bankSumAccounts.cpp index ab3e862e8d2..c0a903f9034 100644 --- a/ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp +++ b/ndb/test/ndbapi/bank/bankSumAccounts.cpp @@ -23,7 +23,7 @@ #include <NDBT.hpp> #include <NdbSleep.h> #include <getarg.h> -#include "../Bank.hpp" +#include "Bank.hpp" int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp b/ndb/test/ndbapi/bank/bankTimer.cpp index ba8de9e4af1..ba3165fccb4 100644 --- a/ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp +++ b/ndb/test/ndbapi/bank/bankTimer.cpp @@ -24,7 +24,7 @@ #include <NDBT.hpp> #include <NdbSleep.h> #include <getarg.h> -#include "../Bank.hpp" +#include "Bank.hpp" int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp b/ndb/test/ndbapi/bank/bankTransactionMaker.cpp index 0c7d5d72473..fe9b53e0c8d 100644 --- a/ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp +++ b/ndb/test/ndbapi/bank/bankTransactionMaker.cpp @@ -24,7 +24,7 @@ #include <NDBT.hpp> #include <NdbSleep.h> #include <getarg.h> -#include "../Bank.hpp" +#include "Bank.hpp" int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp b/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp index 13136755de8..f9d974bb5f7 100644 --- a/ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp +++ b/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp @@ -24,7 +24,7 @@ #include <NDBT.hpp> #include <NdbSleep.h> #include <getarg.h> -#include "../Bank.hpp" +#include "Bank.hpp" int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/bank/bankCreator/Makefile b/ndb/test/ndbapi/bank/old_dirs/bankCreator/Makefile index d40103a8347..d40103a8347 100644 --- a/ndb/test/ndbapi/bank/bankCreator/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/bankCreator/Makefile diff --git a/ndb/test/ndbapi/bank/bankMakeGL/Makefile b/ndb/test/ndbapi/bank/old_dirs/bankMakeGL/Makefile index 16a092e885c..16a092e885c 100644 --- a/ndb/test/ndbapi/bank/bankMakeGL/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/bankMakeGL/Makefile diff --git a/ndb/test/ndbapi/bank/bankSumAccounts/Makefile b/ndb/test/ndbapi/bank/old_dirs/bankSumAccounts/Makefile index 34f1cc21bc6..34f1cc21bc6 100644 --- a/ndb/test/ndbapi/bank/bankSumAccounts/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/bankSumAccounts/Makefile diff --git a/ndb/test/ndbapi/bank/bankTimer/Makefile b/ndb/test/ndbapi/bank/old_dirs/bankTimer/Makefile index a2fcf703723..a2fcf703723 100644 --- a/ndb/test/ndbapi/bank/bankTimer/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/bankTimer/Makefile diff --git a/ndb/test/ndbapi/bank/bankTransactionMaker/Makefile b/ndb/test/ndbapi/bank/old_dirs/bankTransactionMaker/Makefile index 2e482898476..2e482898476 100644 --- a/ndb/test/ndbapi/bank/bankTransactionMaker/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/bankTransactionMaker/Makefile diff --git a/ndb/test/ndbapi/bank/bankValidateAllGLs/Makefile b/ndb/test/ndbapi/bank/old_dirs/bankValidateAllGLs/Makefile index 660b73fb830..660b73fb830 100644 --- a/ndb/test/ndbapi/bank/bankValidateAllGLs/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/bankValidateAllGLs/Makefile diff --git a/ndb/test/ndbapi/bank/src/Makefile b/ndb/test/ndbapi/bank/old_dirs/src/Makefile index e0ab8e0e536..e0ab8e0e536 100644 --- a/ndb/test/ndbapi/bank/src/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/src/Makefile diff --git a/ndb/test/ndbapi/bank/testBank/Makefile b/ndb/test/ndbapi/bank/old_dirs/testBank/Makefile index 382aaadad7c..382aaadad7c 100644 --- a/ndb/test/ndbapi/bank/testBank/Makefile +++ b/ndb/test/ndbapi/bank/old_dirs/testBank/Makefile diff --git a/ndb/test/ndbapi/bank/testBank/testBank.cpp b/ndb/test/ndbapi/bank/testBank.cpp index 094ecaa499c..77ac1172d7c 100644 --- a/ndb/test/ndbapi/bank/testBank/testBank.cpp +++ b/ndb/test/ndbapi/bank/testBank.cpp @@ -29,7 +29,7 @@ continue; } -#include "../Bank.hpp" +#include "Bank.hpp" int runCreateBank(NDBT_Context* ctx, NDBT_Step* step){ Bank bank; diff --git a/ndb/test/ndbapi/ronja/benchronja/benchronja.cpp b/ndb/test/ndbapi/benchronja.cpp index ce0aee35e8f..ce0aee35e8f 100644 --- a/ndb/test/ndbapi/ronja/benchronja/benchronja.cpp +++ b/ndb/test/ndbapi/benchronja.cpp diff --git a/ndb/test/ndbapi/bulk_copy/bulk_copy.cpp b/ndb/test/ndbapi/bulk_copy.cpp index 18881cae216..18881cae216 100644 --- a/ndb/test/ndbapi/bulk_copy/bulk_copy.cpp +++ b/ndb/test/ndbapi/bulk_copy.cpp diff --git a/ndb/test/ndbapi/vw_test/cdrserver.cpp b/ndb/test/ndbapi/cdrserver.cpp index 8354d28f53f..8354d28f53f 100644 --- a/ndb/test/ndbapi/vw_test/cdrserver.cpp +++ b/ndb/test/ndbapi/cdrserver.cpp diff --git a/ndb/test/ndbapi/cello-sessionDb/celloDb.cpp b/ndb/test/ndbapi/celloDb.cpp index ec61e783585..ec61e783585 100644 --- a/ndb/test/ndbapi/cello-sessionDb/celloDb.cpp +++ b/ndb/test/ndbapi/celloDb.cpp diff --git a/ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp b/ndb/test/ndbapi/create_all_tabs.cpp index 55d04888144..55d04888144 100644 --- a/ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp +++ b/ndb/test/ndbapi/create_all_tabs.cpp diff --git a/ndb/test/ndbapi/create_tab/create_tab.cpp b/ndb/test/ndbapi/create_tab.cpp index 8bb1e7a9572..8bb1e7a9572 100644 --- a/ndb/test/ndbapi/create_tab/create_tab.cpp +++ b/ndb/test/ndbapi/create_tab.cpp diff --git a/ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp b/ndb/test/ndbapi/drop_all_tabs.cpp index 59c57396acd..59c57396acd 100644 --- a/ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp +++ b/ndb/test/ndbapi/drop_all_tabs.cpp diff --git a/ndb/test/ndbapi/flexAsynch/flexAsynch.cpp b/ndb/test/ndbapi/flexAsynch.cpp index 0822f3ee999..396ac06c87a 100644 --- a/ndb/test/ndbapi/flexAsynch/flexAsynch.cpp +++ b/ndb/test/ndbapi/flexAsynch.cpp @@ -15,7 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #include "NdbApi.hpp" +#include <NdbSchemaCon.hpp> #include <NdbMain.h> #include <md5_hash.hpp> @@ -738,7 +740,7 @@ createTables(Ndb* pMyNdb){ if (theTableCreateFlag == 0) { for(int i=0; i < 1 ;i++) { ndbout << "Creating " << tableName[i] << "..." << endl; - MySchemaTransaction = pMyNdb->startSchemaTransaction(); + MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pMyNdb); if(MySchemaTransaction == NULL && (!error_handler(MySchemaTransaction->getNdbError()))) @@ -748,7 +750,8 @@ createTables(Ndb* pMyNdb){ if(MySchemaOp == NULL && (!error_handler(MySchemaTransaction->getNdbError()))) return -1; - + + check = MySchemaOp->createTable( tableName[i] ,8 // Table Size ,TupleKey // Key Type @@ -793,7 +796,7 @@ createTables(Ndb* pMyNdb){ (!error_handler(MySchemaTransaction->getNdbError()))) return -1; - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); } } diff --git a/ndb/test/ndbapi/flexBench/flexBench.cpp b/ndb/test/ndbapi/flexBench.cpp index 809d11086bf..809d11086bf 100644 --- a/ndb/test/ndbapi/flexBench/flexBench.cpp +++ b/ndb/test/ndbapi/flexBench.cpp diff --git a/ndb/test/ndbapi/flexHammer/flexHammer.cpp b/ndb/test/ndbapi/flexHammer.cpp index 057efb31e74..c1c47923de9 100644 --- a/ndb/test/ndbapi/flexHammer/flexHammer.cpp +++ b/ndb/test/ndbapi/flexHammer.cpp @@ -58,6 +58,7 @@ Revision history: #include <NdbTick.h> #include <NdbTest.hpp> #include <NDBT_Error.hpp> +#include <NdbSchemaCon.hpp> ErrorData * flexHammerErrorData; @@ -754,7 +755,7 @@ createTables(Ndb* pMyNdb) } // if ndbout << endl; - MySchemaTransaction = pMyNdb->startSchemaTransaction(); + MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pMyNdb); if (MySchemaTransaction == NULL) { return(-1); } // if @@ -762,7 +763,7 @@ createTables(Ndb* pMyNdb) MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if (MySchemaOp == NULL) { // Clean up opened schema transaction - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return(-1); } // if @@ -787,7 +788,7 @@ createTables(Ndb* pMyNdb) #endif if (check == -1) { // Clean up opened schema transaction - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return(-1); } // if @@ -798,7 +799,7 @@ createTables(Ndb* pMyNdb) NotNullAttribute ); if (check == -1) { // Clean up opened schema transaction - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return(-1); } // if @@ -810,7 +811,7 @@ createTables(Ndb* pMyNdb) NotNullAttribute ); if (check == -1) { // Clean up opened schema transaction - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return(-1); } // if } // for @@ -819,11 +820,11 @@ createTables(Ndb* pMyNdb) check = MySchemaTransaction->execute(); if (check == -1) { // Clean up opened schema transaction - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return(-1); } // if - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); } // for } // if diff --git a/ndb/test/ndbapi/flexScan/flexScan.cpp b/ndb/test/ndbapi/flexScan.cpp index 19fb6dc5ab0..5b5b4dde730 100644 --- a/ndb/test/ndbapi/flexScan/flexScan.cpp +++ b/ndb/test/ndbapi/flexScan.cpp @@ -62,6 +62,7 @@ #include <NdbMain.h> #include <NdbTest.hpp> #include <NDBT_Error.hpp> +#include <NdbSchemaCon.hpp> #define PKSIZE 1 #define FOREVER 1 @@ -151,7 +152,6 @@ static void UpdateArray(int *attrValue) int attrCount = 0; int opCount = 0; int sizeCount = 0; - int Index = 0; int* pValue = attrValue; for (tableCount = 0; tableCount < tNoOfTables; tableCount++) { @@ -179,7 +179,6 @@ static void Compare(int* attrValue, int* readValue) int attrCount = 0; int OpCount = 0; int first = 0; - int sizeCount = 0; for (tableCount = 0; tableCount < tNoOfTables; tableCount++) { for (attrCount = 0; attrCount < tNoOfAttributes-1; attrCount++) { @@ -592,19 +591,14 @@ flexScanThread(void* ThreadData) ThreadNdb* pThreadData = (ThreadNdb*)ThreadData; unsigned int thread_no = pThreadData->ThreadNo; unsigned int thread_base = (thread_no * 2000000) + (tNodeId * 26000); - int NrOfScannedRecords = 0; int tThreadResult = 0; Ndb* MyNdb = NULL; - NdbConnection *MyTransaction = NULL; - NdbOperation* MyOperation[MAXTABLES]; int check = 0; StartType tType = stLast; int* pkValue = NULL; int* attrValue = NULL; int* readValue = NULL; int AllocSize = 0; - NdbRecAttr* tTmp = NULL; - OperationType opType; AllocSize = tNoOfTables * (tNoOfAttributes-1) * tNoOfOperations * tAttributeSize * sizeof(int); @@ -770,15 +764,15 @@ static int createTables(Ndb* pMyNdb) do { i++; ndbout << endl << "Creating " << tableName[i - 1] << "..." << endl; - - MySchemaTransaction = pMyNdb->startSchemaTransaction(); + + MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pMyNdb); if( MySchemaTransaction == NULL ) { return (-1); } // if MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if( MySchemaOp == NULL ) { - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return (-1); } // if @@ -800,14 +794,14 @@ static int createTables(Ndb* pMyNdb) ,40); // Nr of Pages #endif if (check == -1) { - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return -1; } // if check = MySchemaOp->createAttribute( (char*)attrName[0], TupleKey, 32, PKSIZE, UnSigned, MMBased, NotNullAttribute ); if (check == -1) { - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return -1; } // if @@ -815,7 +809,7 @@ static int createTables(Ndb* pMyNdb) check = MySchemaOp->createAttribute( (char*)attrName[j], NoKey, 32, tAttributeSize, UnSigned, MMBased, NotNullAttribute ); if (check == -1) { - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return -1; } // if } // for @@ -825,7 +819,7 @@ static int createTables(Ndb* pMyNdb) ndbout << "Probably, " << tableName[i - 1] << " already exist" << endl; } // if - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); } while (tNoOfTables > i); } @@ -1058,7 +1052,6 @@ static int insertRows(Ndb* pNdb, // NDB object int attrCount = 0; NdbConnection* MyTransaction = NULL; NdbOperation* MyOperations[MAXTABLES] = {NULL}; - int Index = 0; int opCount = 0; for (opCount = 0; opCount < tNoOfOperations; opCount++) { @@ -1099,7 +1092,7 @@ static int insertRows(Ndb* pNdb, // NDB object } // if for (attrCount = 0; attrCount < tNoOfAttributes - 1; attrCount++) { - Index = tableCount * (tNoOfAttributes - 1) * tNoOfOperations * tAttributeSize + + int Index = tableCount * (tNoOfAttributes - 1) * tNoOfOperations * tAttributeSize + attrCount * tNoOfOperations * tAttributeSize + opCount * tAttributeSize; check = MyOperations[tableCount]-> setValue((char*)attrName[attrCount + 1], diff --git a/ndb/test/ndbapi/flexTT/flexTT.cpp b/ndb/test/ndbapi/flexTT.cpp index c45cbd95762..a82875de5c2 100644 --- a/ndb/test/ndbapi/flexTT/flexTT.cpp +++ b/ndb/test/ndbapi/flexTT.cpp @@ -18,6 +18,7 @@ #include <ndb_global.h> #include <NdbApi.hpp> +#include <NdbSchemaCon.hpp> #include <NdbMain.h> #include <md5_hash.hpp> @@ -662,7 +663,7 @@ createTables(Ndb* pMyNdb){ if (theTableCreateFlag == 0) { ndbout << "Creating Table: vpn_users " << "..." << endl; - MySchemaTransaction = pMyNdb->startSchemaTransaction(); + MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pMyNdb); if(MySchemaTransaction == NULL && (!error_handler(MySchemaTransaction->getNdbError()))) @@ -748,7 +749,7 @@ createTables(Ndb* pMyNdb){ (!error_handler(MySchemaTransaction->getNdbError()))) return -1; - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); }//if return 0; diff --git a/ndb/test/ndbapi/flexTimedAsynch/flexTimedAsynch.cpp b/ndb/test/ndbapi/flexTimedAsynch.cpp index 761be53fdd3..761be53fdd3 100644 --- a/ndb/test/ndbapi/flexTimedAsynch/flexTimedAsynch.cpp +++ b/ndb/test/ndbapi/flexTimedAsynch.cpp diff --git a/ndb/test/ndbapi/flex_bench_mysql/flex_bench_mysql.cpp b/ndb/test/ndbapi/flex_bench_mysql.cpp index 7cc883ab3e6..7cc883ab3e6 100644 --- a/ndb/test/ndbapi/flex_bench_mysql/flex_bench_mysql.cpp +++ b/ndb/test/ndbapi/flex_bench_mysql.cpp diff --git a/ndb/test/ndbapi/indexTest/index.cpp b/ndb/test/ndbapi/index.cpp index 508186de529..508186de529 100644 --- a/ndb/test/ndbapi/indexTest/index.cpp +++ b/ndb/test/ndbapi/index.cpp diff --git a/ndb/test/ndbapi/indexTest2/index2.cpp b/ndb/test/ndbapi/index2.cpp index e49113d2f1b..e49113d2f1b 100644 --- a/ndb/test/ndbapi/indexTest2/index2.cpp +++ b/ndb/test/ndbapi/index2.cpp diff --git a/ndb/test/ndbapi/ronja/initronja/initronja.cpp b/ndb/test/ndbapi/initronja.cpp index f3f4d9628e2..b3215104822 100644 --- a/ndb/test/ndbapi/ronja/initronja/initronja.cpp +++ b/ndb/test/ndbapi/initronja.cpp @@ -21,6 +21,7 @@ * *************************************************** */ #include "NdbApi.hpp" +#include "NdbSchemaCon.hpp" #include <NdbOut.hpp> #include <NdbMain.h> #include <NdbTest.hpp> @@ -90,7 +91,7 @@ NDB_COMMAND(initronja, "initronja", "initronja", "initronja", 65535){ ndbout << endl << "Creating the table SHORT_REC" << "..." << endl; - MySchemaTransaction = pNdb->startSchemaTransaction(); + MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); if(!MySchemaTransaction) goto error_handler; MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if(!MySchemaOp) goto error_handler; @@ -148,11 +149,11 @@ NDB_COMMAND(initronja, "initronja", "initronja", "initronja", 65535){ ndbout << "SHORT_REC created " << endl; }// if - pNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); ndbout << endl << "Creating the table LONG_REC..." << endl; - MySchemaTransaction = pNdb->startSchemaTransaction(); + MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); if(!MySchemaTransaction) goto error_handler; MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); @@ -212,7 +213,7 @@ NDB_COMMAND(initronja, "initronja", "initronja", "initronja", 65535){ ndbout << "LONG_REC created" << endl; }// if - pNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); check = InsertRecords(pNdb, tNoOfRecords); @@ -234,7 +235,7 @@ NDB_COMMAND(initronja, "initronja", "initronja", "initronja", 65535){ error_handler: ndbout << "SchemaTransaction returned error:" ; ndbout << MySchemaTransaction->getNdbError() << endl; - pNdb->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); delete pNdb ; NDBT_ProgramExit(NDBT_FAILED) ; exit(-1); diff --git a/ndb/test/ndbapi/interpreterInTup/interpreterInTup.cpp b/ndb/test/ndbapi/interpreterInTup.cpp index a2352edf707..47960cd5d12 100644 --- a/ndb/test/ndbapi/interpreterInTup/interpreterInTup.cpp +++ b/ndb/test/ndbapi/interpreterInTup.cpp @@ -58,6 +58,7 @@ #include <NdbThread.h> #include <NdbMutex.h> #include <NdbApi.hpp> +#include <NdbSchemaCon.hpp> #include <NDBT.hpp> #define MAXATTR 3 @@ -93,8 +94,8 @@ TTYPE t_addReg(int, NdbOperation*); TTYPE t_subReg(int, NdbOperation*); TTYPE t_subroutineWithBranchLabel(int, NdbOperation*); -char tableName[MAXTABLES][MAXSTRLEN+1] = {0}; -char attrName[MAXATTR][MAXSTRLEN+1] = {0}; +char tableName[MAXSTRLEN+1]; +char attrName[MAXATTR][MAXSTRLEN+1]; int attrValue[NUMBEROFRECORDS] = {0}; int pkValue[NUMBEROFRECORDS] = {0}; const int tAttributeSize = 1 ; @@ -105,11 +106,9 @@ int bTestPassed = 0; int main(int argc, const char** argv) { - int tTableId = 0; int operationType = 0; - int tupTest = 0 ; - int scanTest = 0 ; - bool loop = 0 ; + int tupTest = 0; + int scanTest = 0; Ndb* pNdb = new Ndb("TEST_DB"); pNdb->init(); @@ -140,7 +139,7 @@ int main(int argc, const char** argv) { setAttrNames() ; setTableNames() ; - const void * p = NDBT_Table::discoverTableFromDb(pNdb, tableName[0]); + const void * p = NDBT_Table::discoverTableFromDb(pNdb, tableName); if (p != 0){ create_table(pNdb); } @@ -252,18 +251,17 @@ void create_table(Ndb* pMyNdb) { ***************************************************************/ int check = -1 ; - NdbSchemaCon *MySchemaTransaction = NULL ; NdbSchemaOp *MySchemaOp = NULL ; - ndbout << endl << "Creating " << tableName[0] << " ... " << endl; + ndbout << endl << "Creating " << tableName << " ... " << endl; - MySchemaTransaction = pMyNdb->startSchemaTransaction(); + NdbSchemaCon* MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pMyNdb); if(!MySchemaTransaction) error_handler(MySchemaTransaction->getNdbError(), NO_FAIL); MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if( !MySchemaOp ) error_handler(MySchemaTransaction->getNdbError(), NO_FAIL); // Create table - check = MySchemaOp->createTable( tableName[0], + check = MySchemaOp->createTable( tableName, 8, // Table size TupleKey, // Key Type 40 // Nr of Pages @@ -305,7 +303,8 @@ void create_table(Ndb* pMyNdb) { ndbout << tableName[0] << " created" << endl; } - pMyNdb->closeSchemaTransaction(MySchemaTransaction); + + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return; @@ -333,7 +332,7 @@ void write_rows (Ndb* pMyNdb) { error_handler(pMyNdb->getNdbError(), NO_FAIL); }//if - MyOperation = MyTransaction->getNdbOperation(tableName[0]); + MyOperation = MyTransaction->getNdbOperation(tableName); if (!MyOperation) { error_handler(pMyNdb->getNdbError(), NO_FAIL); }//if @@ -366,9 +365,6 @@ void verify_deleted(Ndb* pMyNdb) { int check = -1 ; int loop_count_ops = nRecords; - NdbRecAttr* tTmp; - int readValue[MAXATTR]; - NdbConnection* pMyTransaction = NULL ; NdbOperation* pMyOperation = NULL ; ndbout << "Verifying deleted records..."<< flush; @@ -378,7 +374,7 @@ void verify_deleted(Ndb* pMyNdb) { NdbConnection* pMyTransaction = pMyNdb->startTransaction(); if (!pMyTransaction) error_handler(pMyNdb->getNdbError(), NO_FAIL); - pMyOperation = pMyTransaction->getNdbOperation(tableName[0]); + pMyOperation = pMyTransaction->getNdbOperation(tableName); if (!pMyOperation) error_handler(pMyNdb->getNdbError(), NO_FAIL); check = pMyOperation->readTuple(); @@ -421,7 +417,7 @@ void read_and_verify_rows(Ndb* pMyNdb, bool pre) { pMyTransaction = pMyNdb->startTransaction(); if (!pMyTransaction) error_handler(pMyNdb->getNdbError(), NO_FAIL); - MyOp = pMyTransaction->getNdbOperation(tableName[0]); + MyOp = pMyTransaction->getNdbOperation(tableName); if (!MyOp) error_handler( pMyTransaction->getNdbError(), NO_FAIL); @@ -1232,14 +1228,13 @@ void scan_rows(Ndb* pMyNdb, int opType, int tupleType, int scanType) { int readValue = 0 ; int readValue2 = 0 ; int scanCount = 0 ; - NdbRecAttr* tTmp = NULL ; TTYPE fail = NO_FAIL ; for (int count=0 ; count < loop_count_ops ; count++) { NdbConnection* MyTransaction = pMyNdb->startTransaction(); if (!MyTransaction) error_handler(pMyNdb->getNdbError(), NO_FAIL); - NdbOperation* MyOperation = MyTransaction->getNdbOperation(tableName[0]); + NdbOperation* MyOperation = MyTransaction->getNdbOperation(tableName); if (!MyOperation) error_handler(pMyNdb->getNdbError(), NO_FAIL); if (opType == 1) @@ -1306,7 +1301,7 @@ void scan_rows(Ndb* pMyNdb, int opType, int tupleType, int scanType) { }else{ // Sends the SCAN_NEXTREQ signal(s) and reads the answer in TRANS_ID signals. // SCAN_TABCONF or SCAN_TABREF is the confirmation. - while (eOf = MyTransaction->nextScanResult() == 0) { + while ((eOf = MyTransaction->nextScanResult()) == 0) { ndbout << readValue <<"; "; // Here we call takeOverScanOp for update of the tuple. } @@ -1348,7 +1343,7 @@ void update_rows(Ndb* pMyNdb, int tupleType, int opType) { return; }//if - MyOperation = MyTransaction->getNdbOperation(tableName[0]); + MyOperation = MyTransaction->getNdbOperation(tableName); if (MyOperation == NULL) { error_handler(pMyNdb->getNdbError(), NO_FAIL); return; @@ -1442,7 +1437,7 @@ void delete_rows(Ndb* pMyNdb, int tupleTest, int opType) { MyTransaction = pMyNdb->startTransaction(); if (!MyTransaction) error_handler(pMyNdb->getNdbError(), NO_FAIL) ; - MyOperation = MyTransaction->getNdbOperation(tableName[0]); + MyOperation = MyTransaction->getNdbOperation(tableName); if (!MyOperation) error_handler(pMyNdb->getNdbError(), NO_FAIL) ; check = MyOperation->interpretedDeleteTuple(); @@ -1517,8 +1512,6 @@ inline void setAttrNames(){ inline void setTableNames(){ - for (int i = 0; i < MAXTABLES; i++){ - snprintf(tableName[i], MAXSTRLEN, "TAB%d", i); - } + snprintf(tableName, MAXSTRLEN, "TAB1"); } diff --git a/ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp b/ndb/test/ndbapi/mainAsyncGenerator.cpp index f613c66d07b..f613c66d07b 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp +++ b/ndb/test/ndbapi/mainAsyncGenerator.cpp diff --git a/ndb/test/ndbapi/telco/msa.cpp b/ndb/test/ndbapi/msa.cpp index 39ddaac2019..7a734f9cb79 100644 --- a/ndb/test/ndbapi/telco/msa.cpp +++ b/ndb/test/ndbapi/msa.cpp @@ -17,6 +17,7 @@ #include <ndb_global.h> #include <NdbApi.hpp> +#include <NdbSchemaCon.hpp> #include <NdbCondition.h> #include <NdbMutex.h> #include <NdbSleep.h> @@ -849,7 +850,7 @@ int CreateCallContextTable(Ndb* pNdb, const char* szTableName, bool bStored) NdbError err; memset(&err, 0, sizeof(err)); - NdbSchemaCon* pNdbSchemaCon = pNdb->startSchemaTransaction(); + NdbSchemaCon* pNdbSchemaCon = NdbSchemaCon::startSchemaTrans(pNdb); if(pNdbSchemaCon) { NdbSchemaOp* pNdbSchemaOp = pNdbSchemaCon->getNdbSchemaOp(); @@ -874,7 +875,8 @@ int CreateCallContextTable(Ndb* pNdb, const char* szTableName, bool bStored) } else err = pNdbSchemaCon->getNdbError(); - pNdb->closeSchemaTransaction(pNdbSchemaCon); + + NdbSchemaCon::closeSchemaTrans(pNdbSchemaCon); } else err = pNdb->getNdbError(); diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_async1.cpp b/ndb/test/ndbapi/ndb_async1.cpp index 2a84f6b2aca..2a84f6b2aca 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_async1.cpp +++ b/ndb/test/ndbapi/ndb_async1.cpp diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_async2.cpp b/ndb/test/ndbapi/ndb_async2.cpp index 0c1d138defb..0c1d138defb 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_async2.cpp +++ b/ndb/test/ndbapi/ndb_async2.cpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp b/ndb/test/ndbapi/ndb_user_populate.cpp index ce3a76cdd59..ce3a76cdd59 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp +++ b/ndb/test/ndbapi/ndb_user_populate.cpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction.cpp b/ndb/test/ndbapi/ndb_user_transaction.cpp index 182f1f99586..182f1f99586 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction.cpp +++ b/ndb/test/ndbapi/ndb_user_transaction.cpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction2.cpp b/ndb/test/ndbapi/ndb_user_transaction2.cpp index df3c7a7989e..df3c7a7989e 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction2.cpp +++ b/ndb/test/ndbapi/ndb_user_transaction2.cpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction3.cpp b/ndb/test/ndbapi/ndb_user_transaction3.cpp index d2c92ecd424..d2c92ecd424 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction3.cpp +++ b/ndb/test/ndbapi/ndb_user_transaction3.cpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction4.cpp b/ndb/test/ndbapi/ndb_user_transaction4.cpp index e652c7bfed8..e652c7bfed8 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction4.cpp +++ b/ndb/test/ndbapi/ndb_user_transaction4.cpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction5.cpp b/ndb/test/ndbapi/ndb_user_transaction5.cpp index 86580008d10..86580008d10 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction5.cpp +++ b/ndb/test/ndbapi/ndb_user_transaction5.cpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction6.cpp b/ndb/test/ndbapi/ndb_user_transaction6.cpp index 262f38e9ffb..262f38e9ffb 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_transaction6.cpp +++ b/ndb/test/ndbapi/ndb_user_transaction6.cpp diff --git a/ndb/test/ndbapi/acid/Makefile b/ndb/test/ndbapi/old_dirs/acid/Makefile index 33dc49fcdea..33dc49fcdea 100644 --- a/ndb/test/ndbapi/acid/Makefile +++ b/ndb/test/ndbapi/old_dirs/acid/Makefile diff --git a/ndb/test/ndbapi/acid2/Makefile b/ndb/test/ndbapi/old_dirs/acid2/Makefile index 69c9d409b9e..69c9d409b9e 100644 --- a/ndb/test/ndbapi/acid2/Makefile +++ b/ndb/test/ndbapi/old_dirs/acid2/Makefile diff --git a/ndb/test/ndbapi/acid2/TraceNdbApi.hpp b/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp index 2bd4eab6b70..2bd4eab6b70 100644 --- a/ndb/test/ndbapi/acid2/TraceNdbApi.hpp +++ b/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp diff --git a/ndb/test/ndbapi/acid2/VerifyNdbApi.hpp b/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp index 4a5b8cc8111..4a5b8cc8111 100644 --- a/ndb/test/ndbapi/acid2/VerifyNdbApi.hpp +++ b/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp diff --git a/ndb/test/ndbapi/basicAsynch/Makefile b/ndb/test/ndbapi/old_dirs/basicAsynch/Makefile index 802c5e5a2bd..802c5e5a2bd 100755 --- a/ndb/test/ndbapi/basicAsynch/Makefile +++ b/ndb/test/ndbapi/old_dirs/basicAsynch/Makefile diff --git a/ndb/test/ndbapi/bulk_copy/Makefile b/ndb/test/ndbapi/old_dirs/bulk_copy/Makefile index 22c05b138b7..22c05b138b7 100644 --- a/ndb/test/ndbapi/bulk_copy/Makefile +++ b/ndb/test/ndbapi/old_dirs/bulk_copy/Makefile diff --git a/ndb/test/ndbapi/create_all_tabs/Makefile b/ndb/test/ndbapi/old_dirs/create_all_tabs/Makefile index 58309807682..58309807682 100644 --- a/ndb/test/ndbapi/create_all_tabs/Makefile +++ b/ndb/test/ndbapi/old_dirs/create_all_tabs/Makefile diff --git a/ndb/test/ndbapi/create_tab/Makefile b/ndb/test/ndbapi/old_dirs/create_tab/Makefile index c2ea0b52b15..c2ea0b52b15 100644 --- a/ndb/test/ndbapi/create_tab/Makefile +++ b/ndb/test/ndbapi/old_dirs/create_tab/Makefile diff --git a/ndb/test/ndbapi/drop_all_tabs/Makefile b/ndb/test/ndbapi/old_dirs/drop_all_tabs/Makefile index 96db0781417..96db0781417 100644 --- a/ndb/test/ndbapi/drop_all_tabs/Makefile +++ b/ndb/test/ndbapi/old_dirs/drop_all_tabs/Makefile diff --git a/ndb/test/ndbapi/flexAsynch/Makefile b/ndb/test/ndbapi/old_dirs/flexAsynch/Makefile index 2c77c8e21df..2c77c8e21df 100644 --- a/ndb/test/ndbapi/flexAsynch/Makefile +++ b/ndb/test/ndbapi/old_dirs/flexAsynch/Makefile diff --git a/ndb/test/ndbapi/old_dirs/flexBench/Makefile.am b/ndb/test/ndbapi/old_dirs/flexBench/Makefile.am new file mode 100644 index 00000000000..d4de4b92b60 --- /dev/null +++ b/ndb/test/ndbapi/old_dirs/flexBench/Makefile.am @@ -0,0 +1,10 @@ + +bin_PROGRAMS = flexBench + +flexBench_SOURCES = flexBench.cpp + +include $(top_srcdir)/ndb/config/common.mk.am +include $(top_srcdir)/ndb/config/type_ndbapitest.mk.am + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/ndb/test/ndbapi/flexBench/Makefile b/ndb/test/ndbapi/old_dirs/flexBench/Makefile_old index bfff5cd161a..bfff5cd161a 100644 --- a/ndb/test/ndbapi/flexBench/Makefile +++ b/ndb/test/ndbapi/old_dirs/flexBench/Makefile_old diff --git a/ndb/test/ndbapi/flexBench/ndbplot.pl b/ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl index b16f6d5897d..b16f6d5897d 100755 --- a/ndb/test/ndbapi/flexBench/ndbplot.pl +++ b/ndb/test/ndbapi/old_dirs/flexBench/ndbplot.pl diff --git a/ndb/test/ndbapi/flexHammer/Makefile b/ndb/test/ndbapi/old_dirs/flexHammer/Makefile index c8e436fb7f5..c8e436fb7f5 100644 --- a/ndb/test/ndbapi/flexHammer/Makefile +++ b/ndb/test/ndbapi/old_dirs/flexHammer/Makefile diff --git a/ndb/test/ndbapi/flexHammer/README b/ndb/test/ndbapi/old_dirs/flexHammer/README index 556582aab96..556582aab96 100644 --- a/ndb/test/ndbapi/flexHammer/README +++ b/ndb/test/ndbapi/old_dirs/flexHammer/README diff --git a/ndb/test/ndbapi/flexScan/Makefile b/ndb/test/ndbapi/old_dirs/flexScan/Makefile index 78f9d481063..78f9d481063 100644 --- a/ndb/test/ndbapi/flexScan/Makefile +++ b/ndb/test/ndbapi/old_dirs/flexScan/Makefile diff --git a/ndb/test/ndbapi/flexScan/README b/ndb/test/ndbapi/old_dirs/flexScan/README index cddbdea5336..cddbdea5336 100644 --- a/ndb/test/ndbapi/flexScan/README +++ b/ndb/test/ndbapi/old_dirs/flexScan/README diff --git a/ndb/test/ndbapi/flexTT/Makefile b/ndb/test/ndbapi/old_dirs/flexTT/Makefile index a63bd803d95..a63bd803d95 100644 --- a/ndb/test/ndbapi/flexTT/Makefile +++ b/ndb/test/ndbapi/old_dirs/flexTT/Makefile diff --git a/ndb/test/ndbapi/flexTimedAsynch/Makefile b/ndb/test/ndbapi/old_dirs/flexTimedAsynch/Makefile index e9995dbd16f..e9995dbd16f 100644 --- a/ndb/test/ndbapi/flexTimedAsynch/Makefile +++ b/ndb/test/ndbapi/old_dirs/flexTimedAsynch/Makefile diff --git a/ndb/test/ndbapi/flex_bench_mysql/Makefile b/ndb/test/ndbapi/old_dirs/flex_bench_mysql/Makefile index d2608526cae..d2608526cae 100644 --- a/ndb/test/ndbapi/flex_bench_mysql/Makefile +++ b/ndb/test/ndbapi/old_dirs/flex_bench_mysql/Makefile diff --git a/ndb/test/ndbapi/indexTest/Makefile b/ndb/test/ndbapi/old_dirs/indexTest/Makefile index d842e487ee5..d842e487ee5 100644 --- a/ndb/test/ndbapi/indexTest/Makefile +++ b/ndb/test/ndbapi/old_dirs/indexTest/Makefile diff --git a/ndb/test/ndbapi/indexTest2/Makefile b/ndb/test/ndbapi/old_dirs/indexTest2/Makefile index ad78fd51986..ad78fd51986 100644 --- a/ndb/test/ndbapi/indexTest2/Makefile +++ b/ndb/test/ndbapi/old_dirs/indexTest2/Makefile diff --git a/ndb/test/ndbapi/interpreterInTup/Makefile b/ndb/test/ndbapi/old_dirs/interpreterInTup/Makefile index 074adbf674a..074adbf674a 100644 --- a/ndb/test/ndbapi/interpreterInTup/Makefile +++ b/ndb/test/ndbapi/old_dirs/interpreterInTup/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/Makefile index af472b1589f..af472b1589f 100644 --- a/ndb/test/ndbapi/lmc-bench/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/async-src/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/Makefile index 744d6171139..744d6171139 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/async-src/generator/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/generator/Makefile index c1f84a3ef70..c1f84a3ef70 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/generator/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/generator/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/async-src/include/dbGenerator.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h index 2256498e151..2256498e151 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/include/dbGenerator.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h diff --git a/ndb/test/ndbapi/lmc-bench/async-src/include/testData.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h index 3db85e7342e..3db85e7342e 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/include/testData.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h diff --git a/ndb/test/ndbapi/lmc-bench/async-src/include/userInterface.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h index 94bd1e80ab3..94bd1e80ab3 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/include/userInterface.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/Makefile index c0b532a8359..c0b532a8359 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/user/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/macros.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h index 22b7f564490..22b7f564490 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/user/macros.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp index 9e6c5e55e73..9e6c5e55e73 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp diff --git a/ndb/test/ndbapi/lmc-bench/bin/.empty b/ndb/test/ndbapi/old_dirs/lmc-bench/bin/.empty index e69de29bb2d..e69de29bb2d 100644 --- a/ndb/test/ndbapi/lmc-bench/bin/.empty +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/bin/.empty diff --git a/ndb/test/ndbapi/lmc-bench/include/ndb_schema.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp index af08bc2eecd..af08bc2eecd 100644 --- a/ndb/test/ndbapi/lmc-bench/include/ndb_schema.hpp +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp diff --git a/ndb/test/ndbapi/lmc-bench/include/testDefinitions.h b/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h index 2f4aeb30975..2f4aeb30975 100644 --- a/ndb/test/ndbapi/lmc-bench/include/testDefinitions.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h diff --git a/ndb/test/ndbapi/lmc-bench/lib/.empty b/ndb/test/ndbapi/old_dirs/lmc-bench/lib/.empty index e69de29bb2d..e69de29bb2d 100644 --- a/ndb/test/ndbapi/lmc-bench/lib/.empty +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/lib/.empty diff --git a/ndb/test/ndbapi/lmc-bench/script/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/script/Makefile index 240b5957573..240b5957573 100644 --- a/ndb/test/ndbapi/lmc-bench/script/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/script/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-l-p10.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l-p10.sh index 1ce3969f9fb..1ce3969f9fb 100755 --- a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-l-p10.sh +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l-p10.sh diff --git a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-l.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l.sh index a5de71395c4..a5de71395c4 100755 --- a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-l.sh +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-l.sh diff --git a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-p10.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-p10.sh index 92c853cdd86..92c853cdd86 100755 --- a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench-p10.sh +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench-p10.sh diff --git a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench.sh b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench.sh index da8e9d9bf42..da8e9d9bf42 100755 --- a/ndb/test/ndbapi/lmc-bench/script/async-lmc-bench.sh +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/script/async-lmc-bench.sh diff --git a/ndb/test/ndbapi/lmc-bench/src/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/Makefile index ae7fac9c49b..ae7fac9c49b 100644 --- a/ndb/test/ndbapi/lmc-bench/src/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/src/README b/ndb/test/ndbapi/old_dirs/lmc-bench/src/README index e81c8ba0051..e81c8ba0051 100644 --- a/ndb/test/ndbapi/lmc-bench/src/README +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/README diff --git a/ndb/test/ndbapi/lmc-bench/src/generator/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/Makefile index 143d9ba655e..143d9ba655e 100644 --- a/ndb/test/ndbapi/lmc-bench/src/generator/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c index 7484c7647f5..7484c7647f5 100644 --- a/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c diff --git a/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h index 824688b6cf9..824688b6cf9 100644 --- a/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h diff --git a/ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c index 4a31db0b4e9..4a31db0b4e9 100644 --- a/ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c diff --git a/ndb/test/ndbapi/lmc-bench/src/include/testData.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h index 863c230502b..863c230502b 100644 --- a/ndb/test/ndbapi/lmc-bench/src/include/testData.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h diff --git a/ndb/test/ndbapi/lmc-bench/src/include/userInterface.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h index b70ded87756..b70ded87756 100644 --- a/ndb/test/ndbapi/lmc-bench/src/include/userInterface.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h diff --git a/ndb/test/ndbapi/lmc-bench/src/makevars.linux b/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.linux index a933669cfe7..a933669cfe7 100644 --- a/ndb/test/ndbapi/lmc-bench/src/makevars.linux +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.linux diff --git a/ndb/test/ndbapi/lmc-bench/src/makevars.sparc b/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.sparc index 57ab8bf982f..57ab8bf982f 100644 --- a/ndb/test/ndbapi/lmc-bench/src/makevars.sparc +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/makevars.sparc diff --git a/ndb/test/ndbapi/lmc-bench/src/populator/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/Makefile index 2107c948843..2107c948843 100644 --- a/ndb/test/ndbapi/lmc-bench/src/populator/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c index 42fbb52f3b2..42fbb52f3b2 100644 --- a/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c diff --git a/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h index 1916720e141..1916720e141 100644 --- a/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h diff --git a/ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c index 838ac8a7196..838ac8a7196 100644 --- a/ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c diff --git a/ndb/test/ndbapi/lmc-bench/src/user/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/Makefile index 9bf229ac84c..9bf229ac84c 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c index dd100507016..dd100507016 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c diff --git a/ndb/test/ndbapi/lmc-bench/src/user/macros.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h index 363f247b93f..363f247b93f 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/macros.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp index b3aaeac822e..b3aaeac822e 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp diff --git a/ndb/test/ndbapi/lmc-bench/src/user/old/Makefile b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/Makefile index 9b1247d44af..9b1247d44af 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/old/Makefile +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/Makefile diff --git a/ndb/test/ndbapi/lmc-bench/src/user/old/userHandle.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h index 1de468d4dad..1de468d4dad 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/old/userHandle.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h diff --git a/ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c index bacf1861dde..bacf1861dde 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c diff --git a/ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c index a2f4787bb0c..a2f4787bb0c 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c diff --git a/ndb/test/ndbapi/lmc-bench/src/user/userHandle.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h index 6da76fc2bff..6da76fc2bff 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/userHandle.h +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h diff --git a/ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp index 67c4e037215..fe3c17acbf5 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp @@ -32,6 +32,7 @@ #include <NdbSleep.h> #include "ndb_schema.hpp" #include <NDBT.hpp> +#include <NdbSchemaCon.hpp> /*************************************************************** * L O C A L C O N S T A N T S * @@ -141,13 +142,11 @@ extern int useIndexTables; int -create_table_server(Ndb * pNDB){ - +create_table_server(Ndb * pNdb){ int check; - - NdbSchemaCon * MySchemaTransaction = pNDB->startSchemaTransaction(); + NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNDB->getNdbError(), 0); + error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if( MySchemaOp == NULL ) @@ -246,17 +245,17 @@ create_table_server(Ndb * pNDB){ error_handler("schemaTransaction->execute()", MySchemaTransaction->getNdbError(), 0); } - pNDB->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return 0; } int -create_table_group(Ndb * pNDB){ +create_table_group(Ndb * pNdb){ int check; - NdbSchemaCon * MySchemaTransaction = pNDB->startSchemaTransaction(); + NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNDB->getNdbError(), 0); + error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if( MySchemaOp == NULL ) @@ -340,16 +339,16 @@ create_table_group(Ndb * pNDB){ error_handler("schemaTransaction->execute()", MySchemaTransaction->getNdbError(), 0); } - pNDB->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return 0; } int -create_table_subscriber(Ndb * pNDB){ +create_table_subscriber(Ndb * pNdb){ int check; - NdbSchemaCon * MySchemaTransaction = pNDB->startSchemaTransaction(); + NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNDB->getNdbError(), 0); + error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if( MySchemaOp == NULL ) @@ -459,16 +458,16 @@ create_table_subscriber(Ndb * pNDB){ error_handler("schemaTransaction->execute()", MySchemaTransaction->getNdbError(), 0); } - pNDB->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return 0; } int -create_table_session(Ndb * pNDB){ +create_table_session(Ndb * pNdb){ int check; - NdbSchemaCon * MySchemaTransaction = pNDB->startSchemaTransaction(); + NdbSchemaCon * MySchemaTransaction = NdbSchemaCon::startSchemaTrans(pNdb); if( MySchemaTransaction == NULL ) - error_handler("startSchemaTransaction", pNDB->getNdbError(), 0); + error_handler("startSchemaTransaction", pNdb->getNdbError(), 0); NdbSchemaOp * MySchemaOp = MySchemaTransaction->getNdbSchemaOp(); if( MySchemaOp == NULL ) @@ -533,29 +532,29 @@ create_table_session(Ndb * pNDB){ error_handler("schemaTransaction->execute()", MySchemaTransaction->getNdbError(), 0); } - pNDB->closeSchemaTransaction(MySchemaTransaction); + NdbSchemaCon::closeSchemaTrans(MySchemaTransaction); return 0; } void -create_table(const char * name, int (* function)(Ndb * pNDB), Ndb* pNDB){ +create_table(const char * name, int (* function)(Ndb * pNdb), Ndb* pNdb){ printf("creating table %s...", name); - if(pNDB->getDictionary()->getTable(name) != 0){ + if(pNdb->getDictionary()->getTable(name) != 0){ printf(" it already exists\n"); return; } else { printf("\n"); } - function(pNDB); + function(pNdb); printf("creating table %s... done\n", name); } -static int dbCreate(Ndb * pNDB) +static int dbCreate(Ndb * pNdb) { - create_table(SUBSCRIBER_TABLE, create_table_subscriber, pNDB); - create_table(GROUP_TABLE , create_table_group, pNDB); - create_table(SESSION_TABLE , create_table_session, pNDB); - create_table(SERVER_TABLE , create_table_server, pNDB); + create_table(SUBSCRIBER_TABLE, create_table_subscriber, pNdb); + create_table(GROUP_TABLE , create_table_group, pNdb); + create_table(SESSION_TABLE , create_table_session, pNdb); + create_table(SERVER_TABLE , create_table_server, pNdb); return 0; } @@ -570,23 +569,23 @@ userDbConnect(uint32 createDb, char *dbName) { NdbMutex_Lock(startupMutex); - Ndb * pNDB = new Ndb(""); + Ndb * pNdb = new Ndb(""); //printf("Initializing...\n"); - pNDB->init(); + pNdb->init(); //printf("Waiting..."); - while(pNDB->waitUntilReady() != 0){ + while(pNdb->waitUntilReady() != 0){ //printf("..."); } // printf("done\n"); if( createDb ) - dbCreate(pNDB); + dbCreate(pNdb); UserHandle * uh = new UserHandle; - uh->pNDB = pNDB; + uh->pNDB = pNdb; uh->pCurrTrans = 0; NdbMutex_Unlock(startupMutex); diff --git a/ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c index a2f4787bb0c..a2f4787bb0c 100644 --- a/ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c +++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c diff --git a/ndb/test/ndbapi/restarter/Makefile b/ndb/test/ndbapi/old_dirs/restarter/Makefile index 041fbfd82ba..041fbfd82ba 100644 --- a/ndb/test/ndbapi/restarter/Makefile +++ b/ndb/test/ndbapi/old_dirs/restarter/Makefile diff --git a/ndb/test/ndbapi/restarter2/Makefile b/ndb/test/ndbapi/old_dirs/restarter2/Makefile index ba33a2e21dc..ba33a2e21dc 100644 --- a/ndb/test/ndbapi/restarter2/Makefile +++ b/ndb/test/ndbapi/old_dirs/restarter2/Makefile diff --git a/ndb/test/ndbapi/restarts/Makefile b/ndb/test/ndbapi/old_dirs/restarts/Makefile index 9f14b81fae5..9f14b81fae5 100644 --- a/ndb/test/ndbapi/restarts/Makefile +++ b/ndb/test/ndbapi/old_dirs/restarts/Makefile diff --git a/ndb/test/ndbapi/ronja/Makefile b/ndb/test/ndbapi/old_dirs/ronja/Makefile index a11a27c5fd7..a11a27c5fd7 100644 --- a/ndb/test/ndbapi/ronja/Makefile +++ b/ndb/test/ndbapi/old_dirs/ronja/Makefile diff --git a/ndb/test/ndbapi/ronja/benchronja/Makefile b/ndb/test/ndbapi/old_dirs/ronja/benchronja/Makefile index f0521c3ba77..f0521c3ba77 100644 --- a/ndb/test/ndbapi/ronja/benchronja/Makefile +++ b/ndb/test/ndbapi/old_dirs/ronja/benchronja/Makefile diff --git a/ndb/test/ndbapi/ronja/initronja/Makefile b/ndb/test/ndbapi/old_dirs/ronja/initronja/Makefile index dd66dd813d1..dd66dd813d1 100644 --- a/ndb/test/ndbapi/ronja/initronja/Makefile +++ b/ndb/test/ndbapi/old_dirs/ronja/initronja/Makefile diff --git a/ndb/test/ndbapi/telco/Makefile b/ndb/test/ndbapi/old_dirs/telco/Makefile index 8f82c714119..8f82c714119 100644 --- a/ndb/test/ndbapi/telco/Makefile +++ b/ndb/test/ndbapi/old_dirs/telco/Makefile diff --git a/ndb/test/ndbapi/telco/readme b/ndb/test/ndbapi/old_dirs/telco/readme index 627b4256eef..627b4256eef 100644 --- a/ndb/test/ndbapi/telco/readme +++ b/ndb/test/ndbapi/old_dirs/telco/readme diff --git a/ndb/test/ndbapi/testBackup/Makefile b/ndb/test/ndbapi/old_dirs/testBackup/Makefile index ce0e404803c..ce0e404803c 100644 --- a/ndb/test/ndbapi/testBackup/Makefile +++ b/ndb/test/ndbapi/old_dirs/testBackup/Makefile diff --git a/ndb/test/ndbapi/testBasic/Makefile b/ndb/test/ndbapi/old_dirs/testBasic/Makefile index 755b19939cb..755b19939cb 100644 --- a/ndb/test/ndbapi/testBasic/Makefile +++ b/ndb/test/ndbapi/old_dirs/testBasic/Makefile diff --git a/ndb/test/ndbapi/testBlobs/Makefile b/ndb/test/ndbapi/old_dirs/testBlobs/Makefile index cc5bb629c17..cc5bb629c17 100644 --- a/ndb/test/ndbapi/testBlobs/Makefile +++ b/ndb/test/ndbapi/old_dirs/testBlobs/Makefile diff --git a/ndb/test/ndbapi/testDataBuffers/Makefile b/ndb/test/ndbapi/old_dirs/testDataBuffers/Makefile index 181fbc829d4..181fbc829d4 100644 --- a/ndb/test/ndbapi/testDataBuffers/Makefile +++ b/ndb/test/ndbapi/old_dirs/testDataBuffers/Makefile diff --git a/ndb/test/ndbapi/testDict/Makefile b/ndb/test/ndbapi/old_dirs/testDict/Makefile index 75d493c3424..75d493c3424 100644 --- a/ndb/test/ndbapi/testDict/Makefile +++ b/ndb/test/ndbapi/old_dirs/testDict/Makefile diff --git a/ndb/test/ndbapi/testGrep/Makefile b/ndb/test/ndbapi/old_dirs/testGrep/Makefile index 34fdd7113d0..34fdd7113d0 100644 --- a/ndb/test/ndbapi/testGrep/Makefile +++ b/ndb/test/ndbapi/old_dirs/testGrep/Makefile diff --git a/ndb/test/ndbapi/testGrep/verify/Makefile b/ndb/test/ndbapi/old_dirs/testGrep/verify/Makefile index 4e6182de6b2..4e6182de6b2 100644 --- a/ndb/test/ndbapi/testGrep/verify/Makefile +++ b/ndb/test/ndbapi/old_dirs/testGrep/verify/Makefile diff --git a/ndb/test/ndbapi/testIndex/Makefile b/ndb/test/ndbapi/old_dirs/testIndex/Makefile index e5cd4542c9c..e5cd4542c9c 100644 --- a/ndb/test/ndbapi/testIndex/Makefile +++ b/ndb/test/ndbapi/old_dirs/testIndex/Makefile diff --git a/ndb/test/ndbapi/testInterpreter/Makefile b/ndb/test/ndbapi/old_dirs/testInterpreter/Makefile index e84287a1b16..e84287a1b16 100644 --- a/ndb/test/ndbapi/testInterpreter/Makefile +++ b/ndb/test/ndbapi/old_dirs/testInterpreter/Makefile diff --git a/ndb/test/ndbapi/testMgm/Makefile b/ndb/test/ndbapi/old_dirs/testMgm/Makefile index be50d3dae7e..be50d3dae7e 100644 --- a/ndb/test/ndbapi/testMgm/Makefile +++ b/ndb/test/ndbapi/old_dirs/testMgm/Makefile diff --git a/ndb/test/ndbapi/testNdbApi/Makefile b/ndb/test/ndbapi/old_dirs/testNdbApi/Makefile index 3bb3cba427e..3bb3cba427e 100644 --- a/ndb/test/ndbapi/testNdbApi/Makefile +++ b/ndb/test/ndbapi/old_dirs/testNdbApi/Makefile diff --git a/ndb/test/ndbapi/testNodeRestart/Makefile b/ndb/test/ndbapi/old_dirs/testNodeRestart/Makefile index 8c13ab3beb4..8c13ab3beb4 100644 --- a/ndb/test/ndbapi/testNodeRestart/Makefile +++ b/ndb/test/ndbapi/old_dirs/testNodeRestart/Makefile diff --git a/ndb/test/ndbapi/testOIBasic/Makefile b/ndb/test/ndbapi/old_dirs/testOIBasic/Makefile index 1bbbcf1d17e..1bbbcf1d17e 100644 --- a/ndb/test/ndbapi/testOIBasic/Makefile +++ b/ndb/test/ndbapi/old_dirs/testOIBasic/Makefile diff --git a/ndb/test/ndbapi/testOIBasic/times.txt b/ndb/test/ndbapi/old_dirs/testOIBasic/times.txt index 641e9ddb4bf..641e9ddb4bf 100644 --- a/ndb/test/ndbapi/testOIBasic/times.txt +++ b/ndb/test/ndbapi/old_dirs/testOIBasic/times.txt diff --git a/ndb/test/ndbapi/testOperations/Makefile b/ndb/test/ndbapi/old_dirs/testOperations/Makefile index 25546ade639..25546ade639 100644 --- a/ndb/test/ndbapi/testOperations/Makefile +++ b/ndb/test/ndbapi/old_dirs/testOperations/Makefile diff --git a/ndb/test/ndbapi/testOrderedIndex/Makefile b/ndb/test/ndbapi/old_dirs/testOrderedIndex/Makefile index d8899a37895..d8899a37895 100644 --- a/ndb/test/ndbapi/testOrderedIndex/Makefile +++ b/ndb/test/ndbapi/old_dirs/testOrderedIndex/Makefile diff --git a/ndb/test/ndbapi/testRestartGci/Makefile b/ndb/test/ndbapi/old_dirs/testRestartGci/Makefile index 24f449b747d..24f449b747d 100644 --- a/ndb/test/ndbapi/testRestartGci/Makefile +++ b/ndb/test/ndbapi/old_dirs/testRestartGci/Makefile diff --git a/ndb/test/ndbapi/testScan/Makefile b/ndb/test/ndbapi/old_dirs/testScan/Makefile index fe48f5bc926..fe48f5bc926 100644 --- a/ndb/test/ndbapi/testScan/Makefile +++ b/ndb/test/ndbapi/old_dirs/testScan/Makefile diff --git a/ndb/test/ndbapi/testScanInterpreter/Makefile b/ndb/test/ndbapi/old_dirs/testScanInterpreter/Makefile index c7d96494148..c7d96494148 100644 --- a/ndb/test/ndbapi/testScanInterpreter/Makefile +++ b/ndb/test/ndbapi/old_dirs/testScanInterpreter/Makefile diff --git a/ndb/test/ndbapi/testSystemRestart/Makefile b/ndb/test/ndbapi/old_dirs/testSystemRestart/Makefile index 7a306eb313d..7a306eb313d 100644 --- a/ndb/test/ndbapi/testSystemRestart/Makefile +++ b/ndb/test/ndbapi/old_dirs/testSystemRestart/Makefile diff --git a/ndb/test/ndbapi/testTimeout/Makefile b/ndb/test/ndbapi/old_dirs/testTimeout/Makefile index 01a9df9887f..01a9df9887f 100644 --- a/ndb/test/ndbapi/testTimeout/Makefile +++ b/ndb/test/ndbapi/old_dirs/testTimeout/Makefile diff --git a/ndb/test/ndbapi/testTransactions/Makefile b/ndb/test/ndbapi/old_dirs/testTransactions/Makefile index 0279a526923..0279a526923 100644 --- a/ndb/test/ndbapi/testTransactions/Makefile +++ b/ndb/test/ndbapi/old_dirs/testTransactions/Makefile diff --git a/ndb/test/ndbapi/test_event/Makefile b/ndb/test/ndbapi/old_dirs/test_event/Makefile index 6299fa47845..6299fa47845 100644 --- a/ndb/test/ndbapi/test_event/Makefile +++ b/ndb/test/ndbapi/old_dirs/test_event/Makefile diff --git a/ndb/test/ndbapi/vw_test/Makefile b/ndb/test/ndbapi/old_dirs/vw_test/Makefile index 144873dcc69..144873dcc69 100644 --- a/ndb/test/ndbapi/vw_test/Makefile +++ b/ndb/test/ndbapi/old_dirs/vw_test/Makefile diff --git a/ndb/test/ndbapi/vw_test/bcd.h b/ndb/test/ndbapi/old_dirs/vw_test/bcd.h index d0aaffbd8b7..d0aaffbd8b7 100644 --- a/ndb/test/ndbapi/vw_test/bcd.h +++ b/ndb/test/ndbapi/old_dirs/vw_test/bcd.h diff --git a/ndb/test/ndbapi/vw_test/script/client_start b/ndb/test/ndbapi/old_dirs/vw_test/script/client_start index 2965be6fbb5..2965be6fbb5 100644 --- a/ndb/test/ndbapi/vw_test/script/client_start +++ b/ndb/test/ndbapi/old_dirs/vw_test/script/client_start diff --git a/ndb/test/ndbapi/vw_test/utv.h b/ndb/test/ndbapi/old_dirs/vw_test/utv.h index 6f378e5595b..6f378e5595b 100644 --- a/ndb/test/ndbapi/vw_test/utv.h +++ b/ndb/test/ndbapi/old_dirs/vw_test/utv.h diff --git a/ndb/test/ndbapi/vw_test/vcdrfunc.h b/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h index 3c5444d733b..3c5444d733b 100644 --- a/ndb/test/ndbapi/vw_test/vcdrfunc.h +++ b/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h diff --git a/ndb/test/ndbapi/restarter/restarter.cpp b/ndb/test/ndbapi/restarter.cpp index 9a522f5dcac..9a522f5dcac 100644 --- a/ndb/test/ndbapi/restarter/restarter.cpp +++ b/ndb/test/ndbapi/restarter.cpp diff --git a/ndb/test/ndbapi/restarter2/restarter2.cpp b/ndb/test/ndbapi/restarter2.cpp index f2bcf6f8e7b..f2bcf6f8e7b 100644 --- a/ndb/test/ndbapi/restarter2/restarter2.cpp +++ b/ndb/test/ndbapi/restarter2.cpp diff --git a/ndb/test/ndbapi/restarts/restarts.cpp b/ndb/test/ndbapi/restarts.cpp index 0ec2883d53c..0ec2883d53c 100644 --- a/ndb/test/ndbapi/restarts/restarts.cpp +++ b/ndb/test/ndbapi/restarts.cpp diff --git a/ndb/test/ndbapi/vw_test/size.cpp b/ndb/test/ndbapi/size.cpp index c506771ebde..c506771ebde 100644 --- a/ndb/test/ndbapi/vw_test/size.cpp +++ b/ndb/test/ndbapi/size.cpp diff --git a/ndb/test/ndbapi/testBackup/testBackup.cpp b/ndb/test/ndbapi/testBackup.cpp index f9ae7ffcbbc..129eced54b0 100644 --- a/ndb/test/ndbapi/testBackup/testBackup.cpp +++ b/ndb/test/ndbapi/testBackup.cpp @@ -205,8 +205,7 @@ int runClearTable(NDBT_Context* ctx, NDBT_Step* step){ return NDBT_OK; } - -#include "../bank/Bank.hpp" +#include "bank/Bank.hpp" int runCreateBank(NDBT_Context* ctx, NDBT_Step* step){ Bank bank; diff --git a/ndb/test/ndbapi/testBasic/testBasic.cpp b/ndb/test/ndbapi/testBasic.cpp index 64dfe492c2c..64dfe492c2c 100644 --- a/ndb/test/ndbapi/testBasic/testBasic.cpp +++ b/ndb/test/ndbapi/testBasic.cpp diff --git a/ndb/test/ndbapi/basicAsynch/testBasicAsynch.cpp b/ndb/test/ndbapi/testBasicAsynch.cpp index a97920e53da..a97920e53da 100755..100644 --- a/ndb/test/ndbapi/basicAsynch/testBasicAsynch.cpp +++ b/ndb/test/ndbapi/testBasicAsynch.cpp diff --git a/ndb/test/ndbapi/testBlobs.cpp b/ndb/test/ndbapi/testBlobs.cpp new file mode 100644 index 00000000000..001ec83630a --- /dev/null +++ b/ndb/test/ndbapi/testBlobs.cpp @@ -0,0 +1,1213 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + * testBlobs + */ + +#include <ndb_global.h> +#include <NdbMain.h> +#include <NdbOut.hpp> +#include <NdbTest.hpp> + +struct Bcol { + bool m_nullable; + unsigned m_inline; + unsigned m_partsize; + unsigned m_stripe; + char m_btname[NdbBlob::BlobTableNameSize]; + Bcol(bool a, unsigned b, unsigned c, unsigned d) : + m_nullable(a), + m_inline(b), + m_partsize(c), + m_stripe(d) + {} +}; + +struct Opt { + bool m_core; + bool m_dbg; + bool m_dbgall; + bool m_full; + unsigned m_loop; + unsigned m_parts; + unsigned m_rows; + unsigned m_seed; + char m_skip[255]; + // metadata + const char* m_tname; + const char* m_x1name; // hash index + const char* m_x2name; // ordered index + unsigned m_pk1off; + unsigned m_pk2len; + bool m_oneblob; + Bcol m_blob1; + Bcol m_blob2; + // bugs + int m_bug; + int (*m_bugtest)(); + Opt() : + m_core(false), + m_dbg(false), + m_dbgall(false), + m_full(false), + m_loop(1), + m_parts(10), + m_rows(100), + m_seed(0), + // metadata + m_tname("TBLOB1"), + m_x1name("TBLOB1X1"), + m_x2name("TBLOB1X2"), + m_pk1off(0x12340000), + m_pk2len(55), + m_oneblob(false), + m_blob1(false, 7, 1137, 10), + m_blob2(true, 99, 55, 1), + // bugs + m_bug(0), + m_bugtest(0) { + memset(m_skip, false, sizeof(m_skip)); + } +}; + +static const unsigned g_max_pk2len = 256; + +static void +printusage() +{ + Opt d; + ndbout + << "usage: testBlobs options [default/max]" << endl + << " -core dump core on error" << endl + << " -dbg print debug" << endl + << " -dbgall print also NDB API debug (if compiled in)" << endl + << " -full read/write only full blob values" << endl + << " -inline read/write only blobs which fit inline" << endl + << " -loop N loop N times 0=forever [" << d.m_loop << "]" << endl + << " -parts N max parts in blob value [" << d.m_parts << "]" << endl + << " -rows N number of rows [" << d.m_rows << "]" << endl + << " -seed N random seed 0=loop number [" << d.m_seed << "]" << endl + << " -skip xxx skip these tests (see list)" << endl + << "metadata" << endl + << " -pk2len N length of PK2 [" << d.m_pk2len << "/" << g_max_pk2len <<"]" << endl + << " -oneblob only 1 blob attribute [default 2]" << endl + << "testcases for -skip" << endl + << " k primary key ops" << endl + << " i hash index ops" << endl + << " s table scans" << endl + << " r ordered index scans" << endl + << " u update blob value" << endl + << " v getValue / setValue" << endl + << " w readData / writeData" << endl + << "bug tests (no blob test)" << endl + << " -bug 4088 ndb api hang with mixed ops on index table" << endl + << " -bug 2222 delete + write gives 626" << endl + << " -bug 3333 acc crash on delete and long key" << endl + ; +} + +static Opt g_opt; + +static char& +skip(unsigned x) +{ + assert(x < sizeof(g_opt.m_skip)); + return g_opt.m_skip[x]; +} + +static Ndb* g_ndb = 0; +static NdbDictionary::Dictionary* g_dic = 0; +static NdbConnection* g_con = 0; +static NdbOperation* g_opr = 0; +static NdbIndexOperation* g_opx = 0; +static NdbScanOperation* g_ops = 0; +static NdbBlob* g_bh1 = 0; +static NdbBlob* g_bh2 = 0; +static bool g_printerror = true; + +static void +printerror(int line, const char* msg) +{ + ndbout << "line " << line << ": " << msg << " failed" << endl; + if (! g_printerror) { + return; + } + if (g_ndb != 0 && g_ndb->getNdbError().code != 0) { + ndbout << "ndb: " << g_ndb->getNdbError() << endl; + } + if (g_dic != 0 && g_dic->getNdbError().code != 0) { + ndbout << "dic: " << g_dic->getNdbError() << endl; + } + if (g_con != 0 && g_con->getNdbError().code != 0) { + ndbout << "con: " << g_con->getNdbError() << endl; + if (g_opr != 0 && g_opr->getNdbError().code != 0) { + ndbout << "opr: table=" << g_opr->getTableName() << " " << g_opr->getNdbError() << endl; + } + if (g_opx != 0 && g_opx->getNdbError().code != 0) { + ndbout << "opx: table=" << g_opx->getTableName() << " " << g_opx->getNdbError() << endl; + } + if (g_ops != 0 && g_ops->getNdbError().code != 0) { + ndbout << "ops: table=" << g_ops->getTableName() << " " << g_ops->getNdbError() << endl; + } + NdbOperation* ope = g_con->getNdbErrorOperation(); + if (ope != 0 && ope->getNdbError().code != 0) { + if (ope != g_opr && ope != g_opx && ope != g_ops) + ndbout << "ope: table=" << ope->getTableName() << " " << ope->getNdbError() << endl; + } + } + if (g_bh1 != 0 && g_bh1->getNdbError().code != 0) { + ndbout << "bh1: " << g_bh1->getNdbError() << endl; + } + if (g_bh2 != 0 && g_bh2->getNdbError().code != 0) { + ndbout << "bh2: " << g_bh2->getNdbError() << endl; + } + if (g_opt.m_core) { + abort(); + } + g_printerror = false; +} + +#define CHK(x) \ + do { \ + if (x) break; \ + printerror(__LINE__, #x); return -1; \ + } while (0) +#define DBG(x) \ + do { \ + if (! g_opt.m_dbg) break; \ + ndbout << "line " << __LINE__ << " " << x << endl; \ + } while (0) + +static int +dropTable() +{ + NdbDictionary::Table tab(g_opt.m_tname); + if (g_dic->getTable(g_opt.m_tname) != 0) + CHK(g_dic->dropTable(tab) == 0); + return 0; +} + +static int +createTable() +{ + NdbDictionary::Table tab(g_opt.m_tname); + // col PK1 - Uint32 + { NdbDictionary::Column col("PK1"); + col.setType(NdbDictionary::Column::Unsigned); + col.setPrimaryKey(true); + tab.addColumn(col); + } + // col BL1 - Blob not-nullable + { NdbDictionary::Column col("BL1"); + const Bcol& b = g_opt.m_blob1; + col.setType(NdbDictionary::Column::Blob); + col.setInlineSize(b.m_inline); + col.setPartSize(b.m_partsize); + col.setStripeSize(b.m_stripe); + tab.addColumn(col); + } + // col PK2 - Char[55] + if (g_opt.m_pk2len != 0) + { NdbDictionary::Column col("PK2"); + col.setType(NdbDictionary::Column::Char); + col.setLength(g_opt.m_pk2len); + col.setPrimaryKey(true); + tab.addColumn(col); + } + // col BL2 - Clob nullable + if (! g_opt.m_oneblob) + { NdbDictionary::Column col("BL2"); + const Bcol& b = g_opt.m_blob2; + col.setType(NdbDictionary::Column::Clob); + col.setNullable(true); + col.setInlineSize(b.m_inline); + col.setPartSize(b.m_partsize); + col.setStripeSize(b.m_stripe); + tab.addColumn(col); + } + // create table + CHK(g_dic->createTable(tab) == 0); + // unique hash index on PK2 + if (g_opt.m_pk2len != 0) + { NdbDictionary::Index idx(g_opt.m_x1name); + idx.setType(NdbDictionary::Index::UniqueHashIndex); + idx.setTable(g_opt.m_tname); + idx.addColumnName("PK2"); + CHK(g_dic->createIndex(idx) == 0); + } + // ordered index on PK2 + if (g_opt.m_pk2len != 0) + { NdbDictionary::Index idx(g_opt.m_x2name); + idx.setType(NdbDictionary::Index::OrderedIndex); + idx.setLogging(false); + idx.setTable(g_opt.m_tname); + idx.addColumnName("PK2"); + CHK(g_dic->createIndex(idx) == 0); + } + return 0; +} + +// tuples + +struct Bval { + char* m_val; + unsigned m_len; + char* m_buf; + unsigned m_buflen; + Bval() : + m_val(0), + m_len(0), + m_buf(0), // read/write buffer + m_buflen(0) + {} + ~Bval() { delete [] m_val; delete [] m_buf; } + void alloc(unsigned buflen) { + m_buflen = buflen; + delete [] m_buf; + m_buf = new char [m_buflen]; + trash(); + } + void copy(const Bval& v) { + m_len = v.m_len; + delete [] m_val; + if (v.m_val == 0) + m_val = 0; + else + m_val = (char*)memcpy(new char [m_len], v.m_val, m_len); + } + void trash() const { + assert(m_buf != 0); + memset(m_buf, 'x', m_buflen); + } +private: + Bval(const Bval&); + Bval& operator=(const Bval&); +}; + +struct Tup { + bool m_exists; // exists in table + Uint32 m_pk1; // primary keys concatenated like keyinfo + char m_pk2[g_max_pk2len + 1]; + Bval m_blob1; + Bval m_blob2; + Tup() : + m_exists(false) + {} + ~Tup() { } + // alloc buffers of max size + void alloc() { + m_blob1.alloc(g_opt.m_blob1.m_inline + g_opt.m_blob1.m_partsize * g_opt.m_parts); + m_blob2.alloc(g_opt.m_blob2.m_inline + g_opt.m_blob2.m_partsize * g_opt.m_parts); + } + void copy(const Tup& tup) { + assert(m_pk1 == tup.m_pk1); + m_blob1.copy(tup.m_blob1); + m_blob2.copy(tup.m_blob2); + } +private: + Tup(const Tup&); + Tup& operator=(const Tup&); +}; + +static Tup* g_tups; + +static unsigned +urandom(unsigned n) +{ + return n == 0 ? 0 : random() % n; +} + +static void +calcBval(const Bcol& b, Bval& v, bool keepsize) +{ + if (b.m_nullable && urandom(10) == 0) { + v.m_len = 0; + delete v.m_val; + v.m_val = 0; + v.m_buf = new char [1]; + } else { + if (keepsize && v.m_val != 0) + ; + else if (urandom(10) == 0) + v.m_len = urandom(b.m_inline); + else + v.m_len = urandom(b.m_inline + g_opt.m_parts * b.m_partsize + 1); + delete v.m_val; + v.m_val = new char [v.m_len + 1]; + for (unsigned i = 0; i < v.m_len; i++) + v.m_val[i] = 'a' + urandom(25); + v.m_val[v.m_len] = 0; + v.m_buf = new char [v.m_len]; + } + v.m_buflen = v.m_len; + v.trash(); +} + +static void +calcTups(bool keepsize) +{ + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + tup.m_pk1 = g_opt.m_pk1off + k; + for (unsigned i = 0, n = k; i < g_opt.m_pk2len; i++) { + if (n != 0) { + tup.m_pk2[i] = '0' + n % 10; + n = n / 10; + } else { + tup.m_pk2[i] = 'a' + i % 26; + } + } + calcBval(g_opt.m_blob1, tup.m_blob1, keepsize); + if (! g_opt.m_oneblob) + calcBval(g_opt.m_blob2, tup.m_blob2, keepsize); + } +} + +// blob handle ops + +static int +getBlobLength(NdbBlob* h, unsigned& len) +{ + Uint64 len2 = (unsigned)-1; + CHK(h->getLength(len2) == 0); + len = (unsigned)len2; + assert(len == len2); + return 0; +} + +static int +setBlobValue(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + DBG("set " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + if (null) { + CHK(h->setNull() == 0); + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + CHK(h->setValue(v.m_val, v.m_len) == 0); + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + } + return 0; +} + +static int +getBlobValue(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + DBG("get " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + CHK(h->getValue(v.m_buf, v.m_buflen) == 0); + return 0; +} + +static int +getBlobValue(const Tup& tup) +{ + CHK(getBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(getBlobValue(g_bh2, tup.m_blob2) == 0); + return 0; +} + +static int +verifyBlobValue(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + if (null) { + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + isNull = true; + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + for (unsigned i = 0; i < v.m_len; i++) + CHK(v.m_val[i] == v.m_buf[i]); + } + return 0; +} + +static int +verifyBlobValue(const Tup& tup) +{ + CHK(verifyBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(verifyBlobValue(g_bh2, tup.m_blob2) == 0); + return 0; +} + +static int +writeBlobData(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + DBG("write " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + if (null) { + CHK(h->setNull() == 0); + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + unsigned n = 0; + do { + unsigned m = g_opt.m_full ? v.m_len : urandom(v.m_len + 1); + if (m > v.m_len - n) + m = v.m_len - n; + DBG("write pos=" << n << " cnt=" << m); + CHK(h->writeData(v.m_val + n, m) == 0); + n += m; + } while (n < v.m_len); + assert(n == v.m_len); + isNull = true; + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + } + return 0; +} + +static int +readBlobData(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + DBG("read " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + if (null) { + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + isNull = true; + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + v.trash(); + unsigned n = 0; + while (n < v.m_len) { + unsigned m = g_opt.m_full ? v.m_len : urandom(v.m_len + 1); + if (m > v.m_len - n) + m = v.m_len - n; + DBG("read pos=" << n << " cnt=" << m); + const unsigned m2 = m; + CHK(h->readData(v.m_buf + n, m) == 0); + CHK(m2 == m); + n += m; + } + assert(n == v.m_len); + // need to execute to see the data + CHK(g_con->execute(NoCommit) == 0); + for (unsigned i = 0; i < v.m_len; i++) + CHK(v.m_val[i] == v.m_buf[i]); + } + return 0; +} + +static int +readBlobData(const Tup& tup) +{ + CHK(readBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(readBlobData(g_bh2, tup.m_blob2) == 0); + return 0; +} + +// verify blob data + +static int +verifyHeadInline(const Bcol& c, const Bval& v, NdbRecAttr* ra) +{ + if (v.m_val == 0) { + CHK(ra->isNULL() == 1); + } else { + CHK(ra->isNULL() == 0); + CHK(ra->u_64_value() == v.m_len); + } + return 0; +} + +static int +verifyHeadInline(const Tup& tup) +{ + DBG("verifyHeadInline pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->readTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + NdbRecAttr* ra1; + NdbRecAttr* ra2; + CHK((ra1 = g_opr->getValue("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((ra2 = g_opr->getValue("BL2")) != 0); + if (tup.m_exists) { + CHK(g_con->execute(Commit) == 0); + DBG("verifyHeadInline BL1"); + CHK(verifyHeadInline(g_opt.m_blob1, tup.m_blob1, ra1) == 0); + if (! g_opt.m_oneblob) { + DBG("verifyHeadInline BL2"); + CHK(verifyHeadInline(g_opt.m_blob2, tup.m_blob2, ra2) == 0); + } + } else { + CHK(g_con->execute(Commit) == -1 && g_con->getNdbError().code == 626); + } + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + return 0; +} + +static int +verifyBlobTable(const Bcol& b, const Bval& v, Uint32 pk1, bool exists) +{ + DBG("verify " << b.m_btname << " pk1=" << pk1); + NdbRecAttr* ra_pk; + NdbRecAttr* ra_part; + NdbRecAttr* ra_data; + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(b.m_btname)) != 0); + CHK(g_opr->openScanRead() == 0); + CHK((ra_pk = g_opr->getValue("PK")) != 0); + CHK((ra_part = g_opr->getValue("PART")) != 0); + CHK((ra_data = g_opr->getValue("DATA")) != 0); + CHK(g_con->executeScan() == 0); + unsigned partcount; + if (! exists || v.m_len <= b.m_inline) + partcount = 0; + else + partcount = (v.m_len - b.m_inline + b.m_partsize - 1) / b.m_partsize; + char* seen = new char [partcount]; + memset(seen, 0, partcount); + while (1) { + int ret; + CHK((ret = g_con->nextScanResult()) == 0 || ret == 1); + if (ret == 1) + break; + if (pk1 != ra_pk->u_32_value()) + continue; + Uint32 part = ra_part->u_32_value(); + DBG("part " << part << " of " << partcount); + const char* data = ra_data->aRef(); + CHK(part < partcount && ! seen[part]); + seen[part] = 1; + unsigned n = b.m_inline + part * b.m_partsize; + assert(exists && v.m_val != 0 && n < v.m_len); + unsigned m = v.m_len - n; + if (m > b.m_partsize) + m = b.m_partsize; + CHK(memcmp(data, v.m_val + n, m) == 0); + } + for (unsigned i = 0; i < partcount; i++) + CHK(seen[i] == 1); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + return 0; +} + +static int +verifyBlobTable(const Tup& tup) +{ + CHK(verifyBlobTable(g_opt.m_blob1, tup.m_blob1, tup.m_pk1, tup.m_exists) == 0); + if (! g_opt.m_oneblob) + CHK(verifyBlobTable(g_opt.m_blob2, tup.m_blob2, tup.m_pk1, tup.m_exists) == 0); + return 0; +} + +static int +verifyBlob() +{ + for (unsigned k = 0; k < g_opt.m_rows; k++) { + const Tup& tup = g_tups[k]; + DBG("verifyBlob pk1=" << tup.m_pk1); + CHK(verifyHeadInline(tup) == 0); + CHK(verifyBlobTable(tup) == 0); + } + return 0; +} + +// operations + +static int +insertPk(bool rw) +{ + DBG("--- insertPk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("insertPk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->insertTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opr->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opr->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(setBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(setBlobValue(g_bh2, tup.m_blob2) == 0); + } else { + // non-nullable must be set + CHK(g_bh1->setValue("", 0) == 0); + CHK(g_con->execute(NoCommit) == 0); + CHK(writeBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(writeBlobData(g_bh2, tup.m_blob2) == 0); + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + tup.m_exists = true; + } + return 0; +} + +static int +updatePk(bool rw) +{ + DBG("--- updatePk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("updatePk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->updateTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opr->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opr->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(setBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(setBlobValue(g_bh2, tup.m_blob2) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(writeBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(writeBlobData(g_bh2, tup.m_blob2) == 0); + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + tup.m_exists = true; + } + return 0; +} + +static int +updateIdx(bool rw) +{ + DBG("--- updateIdx ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("updateIdx pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->updateTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opx->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opx->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(setBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(setBlobValue(g_bh2, tup.m_blob2) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(writeBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(writeBlobData(g_bh2, tup.m_blob2) == 0); + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opx = 0; + g_con = 0; + tup.m_exists = true; + } + return 0; +} + +static int +readPk(bool rw) +{ + DBG("--- readPk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("readPk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->readTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opr->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opr->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(getBlobValue(tup) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(readBlobData(tup) == 0); + } + CHK(g_con->execute(Commit) == 0); + if (! rw) { + CHK(verifyBlobValue(tup) == 0); + } + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + } + return 0; +} + +static int +readIdx(bool rw) +{ + DBG("--- readIdx ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("readIdx pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->readTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opx->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opx->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(getBlobValue(tup) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(readBlobData(tup) == 0); + } + CHK(g_con->execute(Commit) == 0); + if (! rw) { + CHK(verifyBlobValue(tup) == 0); + } + g_ndb->closeTransaction(g_con); + g_opx = 0; + g_con = 0; + } + return 0; +} + +static int +readScan(bool rw, bool idx) +{ + const char* func = ! idx ? "scan read table" : "scan read index"; + DBG("--- " << func << " ---"); + Tup tup; + tup.alloc(); // allocate buffers + NdbResultSet* rs; + CHK((g_con = g_ndb->startTransaction()) != 0); + if (! idx) { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_tname)) != 0); + } else { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_x2name, g_opt.m_tname)) != 0); + } + CHK((rs = g_ops->readTuples(240, NdbScanOperation::LM_Exclusive)) != 0); + CHK(g_ops->getValue("PK1", (char*)&tup.m_pk1) != 0); + if (g_opt.m_pk2len != 0) + CHK(g_ops->getValue("PK2", tup.m_pk2) != 0); + CHK((g_bh1 = g_ops->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_ops->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(getBlobValue(tup) == 0); + } + CHK(g_con->execute(NoCommit) == 0); + unsigned rows = 0; + while (1) { + int ret; + tup.m_pk1 = (Uint32)-1; + memset(tup.m_pk2, 'x', g_opt.m_pk2len); + CHK((ret = rs->nextResult(true)) == 0 || ret == 1); + if (ret == 1) + break; + DBG(func << " pk1=" << tup.m_pk1); + Uint32 k = tup.m_pk1 - g_opt.m_pk1off; + CHK(k < g_opt.m_rows && g_tups[k].m_exists); + tup.copy(g_tups[k]); + if (! rw) { + CHK(verifyBlobValue(tup) == 0); + } else { + CHK(readBlobData(tup) == 0); + } + rows++; + } + g_ndb->closeTransaction(g_con); + g_con = 0; + g_ops = 0; + CHK(g_opt.m_rows == rows); + return 0; +} + +static int +deletePk() +{ + DBG("--- deletePk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("deletePk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->deleteTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + tup.m_exists = false; + } + return 0; +} + +static int +deleteIdx() +{ + DBG("--- deleteIdx ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("deleteIdx pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->deleteTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opx = 0; + g_con = 0; + tup.m_exists = false; + } + return 0; +} + +static int +deleteScan(bool idx) +{ + const char* func = ! idx ? "scan delete table" : "scan delete index"; + DBG("--- " << func << " ---"); + Tup tup; + NdbResultSet* rs; + CHK((g_con = g_ndb->startTransaction()) != 0); + if (! idx) { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_tname)) != 0); + } else { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_x2name, g_opt.m_tname)) != 0); + } + CHK((rs = g_ops->readTuples(240, NdbScanOperation::LM_Exclusive)) != 0); + CHK(g_ops->getValue("PK1", (char*)&tup.m_pk1) != 0); + if (g_opt.m_pk2len != 0) + CHK(g_ops->getValue("PK2", tup.m_pk2) != 0); + CHK(g_con->execute(NoCommit) == 0); + unsigned rows = 0; + while (1) { + int ret; + tup.m_pk1 = (Uint32)-1; + memset(tup.m_pk2, 'x', g_opt.m_pk2len); + CHK((ret = rs->nextResult()) == 0 || ret == 1); + if (ret == 1) + break; + DBG(func << " pk1=" << tup.m_pk1); + CHK(rs->deleteTuple() == 0); + CHK(g_con->execute(NoCommit) == 0); + Uint32 k = tup.m_pk1 - g_opt.m_pk1off; + CHK(k < g_opt.m_rows && g_tups[k].m_exists); + g_tups[k].m_exists = false; + rows++; + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_con = 0; + g_opr = 0; + g_ops = 0; + CHK(g_opt.m_rows == rows); + return 0; +} + +// main + +static int +testmain() +{ + g_ndb = new Ndb("TEST_DB"); + CHK(g_ndb->init() == 0); + CHK(g_ndb->waitUntilReady() == 0); + g_dic = g_ndb->getDictionary(); + g_tups = new Tup [g_opt.m_rows]; + CHK(dropTable() == 0); + CHK(createTable() == 0); + if (g_opt.m_bugtest != 0) { + // test a general bug instead of blobs + CHK((*g_opt.m_bugtest)() == 0); + return 0; + } + Bcol& b1 = g_opt.m_blob1; + CHK(NdbBlob::getBlobTableName(b1.m_btname, g_ndb, g_opt.m_tname, "BL1") == 0); + DBG("BL1: inline=" << b1.m_inline << " part=" << b1.m_partsize << " table=" << b1.m_btname); + if (! g_opt.m_oneblob) { + Bcol& b2 = g_opt.m_blob2; + CHK(NdbBlob::getBlobTableName(b2.m_btname, g_ndb, g_opt.m_tname, "BL2") == 0); + DBG("BL2: inline=" << b2.m_inline << " part=" << b2.m_partsize << " table=" << b2.m_btname); + } + if (g_opt.m_seed != 0) + srandom(g_opt.m_seed); + for (unsigned loop = 0; g_opt.m_loop == 0 || loop < g_opt.m_loop; loop++) { + DBG("=== loop " << loop << " ==="); + if (g_opt.m_seed == 0) + srandom(loop); + bool llim = skip('v') ? true : false; + bool ulim = skip('w') ? false : true; + // pk + for (int rw = llim; rw <= ulim; rw++) { + if (skip('k')) + continue; + DBG("--- pk ops " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readPk(rw) == 0); + if (! skip('u')) { + calcTups(rw); + CHK(updatePk(rw) == 0); + CHK(verifyBlob() == 0); + } + CHK(readPk(rw) == 0); + CHK(deletePk() == 0); + CHK(verifyBlob() == 0); + } + // hash index + for (int rw = llim; rw <= ulim; rw++) { + if (skip('i')) + continue; + DBG("--- idx ops " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readIdx(rw) == 0); + calcTups(rw); + if (! skip('u')) { + CHK(updateIdx(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readIdx(rw) == 0); + } + CHK(deleteIdx() == 0); + CHK(verifyBlob() == 0); + } + // scan table + for (int rw = llim; rw <= ulim; rw++) { + if (skip('s')) + continue; + DBG("--- table scan " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readScan(rw, false) == 0); + CHK(deleteScan(false) == 0); + CHK(verifyBlob() == 0); + } + // scan index + for (int rw = llim; rw <= ulim; rw++) { + if (skip('r')) + continue; + DBG("--- index scan " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readScan(rw, true) == 0); + CHK(deleteScan(true) == 0); + CHK(verifyBlob() == 0); + } + } + delete g_ndb; + return 0; +} + +// bug tests + +static int +bugtest_4088() +{ + DBG("bug test 4088 - ndb api hang with mixed ops on index table"); + // insert rows + calcTups(false); + CHK(insertPk(false) == 0); + // new trans + CHK((g_con = g_ndb->startTransaction()) != 0); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + // read table pk via index as a table + const unsigned pkcnt = 2; + Tup pktup[pkcnt]; + for (unsigned i = 0; i < pkcnt; i++) { + char name[20]; + // XXX guess table id + sprintf(name, "%d/%s", 4, g_opt.m_x1name); + CHK((g_opr = g_con->getNdbOperation(name)) != 0); + CHK(g_opr->readTuple() == 0); + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK(g_opr->getValue("NDB$PK", (char*)&pktup[i].m_pk1) != 0); + } + // read blob inline via index as an index + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->readTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + assert(tup.m_blob1.m_buf != 0); + CHK(g_opx->getValue("BL1", (char*)tup.m_blob1.m_buf) != 0); + // execute + // BUG 4088: gets 1 tckeyconf, 1 tcindxconf, then hangs + CHK(g_con->execute(Commit) == 0); + // verify + for (unsigned i = 0; i < pkcnt; i++) { + CHK(pktup[i].m_pk1 == tup.m_pk1); + CHK(memcmp(pktup[i].m_pk2, tup.m_pk2, g_opt.m_pk2len) == 0); + } + CHK(memcmp(tup.m_blob1.m_val, tup.m_blob1.m_buf, 8 + g_opt.m_blob1.m_inline) == 0); + } + return 0; +} + +static int +bugtest_2222() +{ + return 0; +} + +static int +bugtest_3333() +{ + return 0; +} + +static struct { + int m_bug; + int (*m_test)(); +} g_bugtest[] = { + { 4088, bugtest_4088 }, + { 2222, bugtest_2222 }, + { 3333, bugtest_3333 } +}; + +NDB_COMMAND(testOdbcDriver, "testBlobs", "testBlobs", "testBlobs", 65535) +{ + while (++argv, --argc > 0) { + const char* arg = argv[0]; + if (strcmp(arg, "-core") == 0) { + g_opt.m_core = true; + continue; + } + if (strcmp(arg, "-dbg") == 0) { + g_opt.m_dbg = true; + continue; + } + if (strcmp(arg, "-dbgall") == 0) { + g_opt.m_dbg = true; + g_opt.m_dbgall = true; + putenv("NDB_BLOB_DEBUG=1"); + continue; + } + if (strcmp(arg, "-full") == 0) { + g_opt.m_full = true; + continue; + } + if (strcmp(arg, "-loop") == 0) { + if (++argv, --argc > 0) { + g_opt.m_loop = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-parts") == 0) { + if (++argv, --argc > 0) { + g_opt.m_parts = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-rows") == 0) { + if (++argv, --argc > 0) { + g_opt.m_rows = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-seed") == 0) { + if (++argv, --argc > 0) { + g_opt.m_seed = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-skip") == 0) { + if (++argv, --argc > 0) { + for (const char* p = argv[0]; *p != 0; p++) { + skip(*p) = true; + } + continue; + } + } + // metadata + if (strcmp(arg, "-pk2len") == 0) { + if (++argv, --argc > 0) { + g_opt.m_pk2len = atoi(argv[0]); + if (g_opt.m_pk2len == 0) { + skip('i') = true; + skip('r') = true; + } + if (g_opt.m_pk2len <= g_max_pk2len) + continue; + } + } + if (strcmp(arg, "-oneblob") == 0) { + g_opt.m_oneblob = true; + continue; + } + // bugs + if (strcmp(arg, "-bug") == 0) { + if (++argv, --argc > 0) { + g_opt.m_bug = atoi(argv[0]); + for (unsigned i = 0; i < sizeof(g_bugtest)/sizeof(g_bugtest[0]); i++) { + if (g_opt.m_bug == g_bugtest[i].m_bug) { + g_opt.m_bugtest = g_bugtest[i].m_test; + break; + } + } + if (g_opt.m_bugtest != 0) + continue; + } + } + ndbout << "testOIBasic: unknown option " << arg << endl; + printusage(); + return NDBT_ProgramExit(NDBT_WRONGARGS); + } + if (testmain() == -1) { + return NDBT_ProgramExit(NDBT_FAILED); + } + return NDBT_ProgramExit(NDBT_OK); +} + +// vim: set sw=2 et: diff --git a/ndb/test/ndbapi/testBlobs/testBlobs.cpp b/ndb/test/ndbapi/testBlobs/testBlobs.cpp deleted file mode 100644 index 9f959702402..00000000000 --- a/ndb/test/ndbapi/testBlobs/testBlobs.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - * testBlobs - */ - -#include <ndb_global.h> - -#include <NdbMain.h> -#include <NdbOut.hpp> -#include <NdbThread.h> -#include <NdbMutex.h> -#include <NdbCondition.h> -#include <NdbTest.hpp> -#include <NdbTick.h> -#include <ndb_limits.h> - -struct Opt { - bool m_core; - const char* m_table; - Opt() : - m_core(false), - m_table("TB1") - { - } -}; - -static Opt opt; - -static void printusage() -{ - Opt d; - ndbout - << "usage: testBlobs [options]" << endl - << "-core dump core on error - default " << d.m_core << endl - ; -} - -static Ndb* myNdb = 0; -static NdbDictionary::Dictionary* myDic = 0; -static NdbConnection* myCon = 0; -static NdbOperation* myOp = 0; -static NdbBlob* myBlob = 0; - -static void -fatal(const char* fmt, ...) -{ - va_list ap; - char buf[200]; - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - ndbout << "fatal: " << buf << endl; - if (myNdb != 0 && myNdb->getNdbError().code != 0) - ndbout << "ndb - " << myNdb->getNdbError() << endl; - if (myDic != 0 && myDic->getNdbError().code != 0) - ndbout << "dic - " << myDic->getNdbError() << endl; - if (opt.m_core) - abort(); - NDBT_ProgramExit(NDBT_FAILED); - exit(1); -} - -static void -dropBlobsTable() -{ - NdbDictionary::Table tab(NDB_BLOB_TABLE_NAME); - if (myDic->dropTable(tab) == -1) - if (myDic->getNdbError().code != 709) - fatal("dropTable"); -} - -static void -createBlobsTable() -{ - NdbDictionary::Table tab(NDB_BLOB_TABLE_NAME); - // col 0 - NdbDictionary::Column col0("BLOBID"); - col0.setPrimaryKey(true); - col0.setType(NdbDictionary::Column::Bigunsigned); - tab.addColumn(col0); - // col 1 - NdbDictionary::Column col1("DATA"); - col1.setPrimaryKey(false); - col1.setType(NdbDictionary::Column::Binary); - col1.setLength(NDB_BLOB_PIECE_SIZE); - tab.addColumn(col1); - // create - if (myDic->createTable(tab) == -1) - fatal("createTable"); -} - -static void -dropTable() -{ - NdbDictionary::Table tab(opt.m_table); - if (myDic->dropTable(tab) == -1) - if (myDic->getNdbError().code != 709) - fatal("dropTable"); -} - -static void -createTable() -{ - NdbDictionary::Table tab(opt.m_table); - // col 0 - NdbDictionary::Column col0("A"); - col0.setPrimaryKey(true); - col0.setType(NdbDictionary::Column::Unsigned); - tab.addColumn(col0); - // col 1 - NdbDictionary::Column col1("B"); - col1.setPrimaryKey(false); - col1.setType(NdbDictionary::Column::Blob); - tab.addColumn(col1); - // create - if (myDic->createTable(tab) == -1) - fatal("createTable"); -} - -static void -insertData(Uint32 key) -{ -} - -static void -insertTuples() -{ - for (Uint32 key = 0; key <= 99; key++) { - if ((myCon = myNdb->startTransaction()) == 0) - fatal("startTransaction"); - if ((myOp = myCon->getNdbOperation(opt.m_table)) == 0) - fatal("getNdbOperation"); - if (myOp->insertTuple() == -1) - fatal("insertTuple"); - if (myOp->setValue((unsigned)0, key) == -1) - fatal("setValue %u", (unsigned)key); - if ((myBlob = myOp->setBlob(1)) == 0) - fatal("setBlob"); - if (myCon->execute(NoCommit) == -1) - fatal("execute NoCommit"); - insertData(key); - if (myCon->execute(Commit) == -1) - fatal("execute Commit"); - myNdb->closeTransaction(myCon); - myOp = 0; - myBlob = 0; - myCon = 0; - } -} - -static void -testMain() -{ - myNdb = new Ndb("TEST_DB"); - if (myNdb->init() != 0) - fatal("init"); - if (myNdb->waitUntilReady() < 0) - fatal("waitUntilReady"); - myDic = myNdb->getDictionary(); - dropBlobsTable(); - createBlobsTable(); // until moved to Ndbcntr - dropTable(); - createTable(); - insertTuples(); -} - -NDB_COMMAND(testOdbcDriver, "testBlobs", "testBlobs", "testBlobs", 65535) -{ - while (++argv, --argc > 0) { - const char* arg = argv[0]; - if (strcmp(arg, "-core") == 0) { - opt.m_core = true; - continue; - } - } - testMain(); - return NDBT_ProgramExit(NDBT_OK); -} - -// vim: set sw=4: diff --git a/ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp b/ndb/test/ndbapi/testDataBuffers.cpp index b8e0fef6cef..75773040113 100644 --- a/ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp +++ b/ndb/test/ndbapi/testDataBuffers.cpp @@ -34,7 +34,7 @@ #include <NdbOut.hpp> #include <NdbApi.hpp> #include <NdbTest.hpp> - +#include <NdbSchemaCon.hpp> // limits static int const MaxAttr = 64; static int const MaxOper = 1000; @@ -99,7 +99,7 @@ ndberror(char const* fmt, ...) if (tcon) ndbout << "tcon: " << tcon->getNdbError() << endl; if (top) - ndbout << "top : " << top->getNdbError() << endl; + ndbout << "top: " << top->getNdbError() << endl; if (con) ndbout << "con : " << con->getNdbError() << endl; if (op) @@ -258,7 +258,7 @@ testcase(int flag) if (ndb->waitUntilReady(30) < 0) return ndberror("waitUntilReady"); - if ((tcon = ndb->startSchemaTransaction()) == 0) + if ((tcon = NdbSchemaCon::startSchemaTrans(ndb)) == 0) return ndberror("startSchemaTransaction"); if ((top = tcon->getNdbSchemaOp()) == 0) return ndberror("getNdbSchemaOp"); diff --git a/ndb/test/ndbapi/testDict/testDict.cpp b/ndb/test/ndbapi/testDict.cpp index 06614690b8d..1451c942362 100644 --- a/ndb/test/ndbapi/testDict/testDict.cpp +++ b/ndb/test/ndbapi/testDict.cpp @@ -1003,9 +1003,9 @@ int runGetPrimaryKey(NDBT_Context* ctx, NDBT_Step* step){ int NF_codes[] = { - 14000 - ,14001 - //,14002 + 6003 + ,6004 + //,6005 }; int diff --git a/ndb/test/ndbapi/testGrep/testGrep.cpp b/ndb/test/ndbapi/testGrep.cpp index 4b870f6f9a9..4b870f6f9a9 100644 --- a/ndb/test/ndbapi/testGrep/testGrep.cpp +++ b/ndb/test/ndbapi/testGrep.cpp diff --git a/ndb/test/ndbapi/testGrep/verify/testGrepVerify.cpp b/ndb/test/ndbapi/testGrepVerify.cpp index 7fd2c19d9f7..05445c1ba1b 100644 --- a/ndb/test/ndbapi/testGrep/verify/testGrepVerify.cpp +++ b/ndb/test/ndbapi/testGrepVerify.cpp @@ -74,16 +74,13 @@ int main(int argc, const char** argv){ if(table == 0) return NDBT_ProgramExit(NDBT_WRONGARGS); - Ndb::useFullyQualifiedNames(false); - Ndb * m_ndb = new Ndb(""); + m_ndb->useFullyQualifiedNames(false); m_ndb->setConnectString(connectString); - Ndb::useFullyQualifiedNames(false); /** * @todo Set proper max no of transactions?? needed?? Default 12?? */ m_ndb->init(2048); - Ndb::useFullyQualifiedNames(false); if (m_ndb->waitUntilReady() != 0){ ndbout_c("NDB Cluster not ready for connections"); } diff --git a/ndb/test/ndbapi/testIndex/testIndex.cpp b/ndb/test/ndbapi/testIndex.cpp index 47db0b3cff7..47db0b3cff7 100644 --- a/ndb/test/ndbapi/testIndex/testIndex.cpp +++ b/ndb/test/ndbapi/testIndex.cpp diff --git a/ndb/test/ndbapi/testInterpreter/testInterpreter.cpp b/ndb/test/ndbapi/testInterpreter.cpp index 9c584d6f581..9c584d6f581 100644 --- a/ndb/test/ndbapi/testInterpreter/testInterpreter.cpp +++ b/ndb/test/ndbapi/testInterpreter.cpp diff --git a/ndb/test/ndbapi/testMgm/testMgm.cpp b/ndb/test/ndbapi/testMgm.cpp index d5b9372cc9b..d5b9372cc9b 100644 --- a/ndb/test/ndbapi/testMgm/testMgm.cpp +++ b/ndb/test/ndbapi/testMgm.cpp diff --git a/ndb/test/ndbapi/testNdbApi/testNdbApi.cpp b/ndb/test/ndbapi/testNdbApi.cpp index c0e262f590f..2e08ebbed4e 100644 --- a/ndb/test/ndbapi/testNdbApi/testNdbApi.cpp +++ b/ndb/test/ndbapi/testNdbApi.cpp @@ -23,8 +23,8 @@ #include <Vector.hpp> #include <random.h> #include <NdbTick.h> -#include <AttrType.hpp> +#define MAX_NDB_OBJECTS 32678 #define CHECK(b) if (!(b)) { \ ndbout << "ERR: "<< step->getName() \ @@ -79,7 +79,7 @@ int runTestMaxNdb(NDBT_Context* ctx, NDBT_Step* step){ ndbout << i << " ndb objects created" << endl; - if (l > 0 && i != oldi && init != MAX_NO_THREADS){ + if (l > 0 && i != oldi && init != MAX_NDB_OBJECTS){ ndbout << l << ": not as manyNdb objects created" << endl << i << " != " << oldi << endl; result = NDBT_FAILED; diff --git a/ndb/test/ndbapi/testNodeRestart/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp index fd591f04c69..fd591f04c69 100644 --- a/ndb/test/ndbapi/testNodeRestart/testNodeRestart.cpp +++ b/ndb/test/ndbapi/testNodeRestart.cpp diff --git a/ndb/test/ndbapi/testOIBasic/testOIBasic.cpp b/ndb/test/ndbapi/testOIBasic.cpp index a47d9d2099e..0ca8ce79e2e 100644 --- a/ndb/test/ndbapi/testOIBasic/testOIBasic.cpp +++ b/ndb/test/ndbapi/testOIBasic.cpp @@ -39,6 +39,7 @@ struct Opt { NdbDictionary::Object::FragmentType m_fragtype; const char* m_index; unsigned m_loop; + bool m_nologging; unsigned m_rows; unsigned m_scanrd; unsigned m_scanex; @@ -54,6 +55,7 @@ struct Opt { m_fragtype(NdbDictionary::Object::FragUndefined), m_index(0), m_loop(1), + m_nologging(false), m_rows(1000), m_scanrd(240), m_scanex(240), @@ -82,6 +84,7 @@ printhelp() << " -fragtype T fragment type single/small/medium/large" << endl << " -index xyz only given index numbers (digits 1-9)" << endl << " -loop N loop count full suite forever=0 [" << d.m_loop << "]" << endl + << " -nologging create tables in no-logging mode" << endl << " -rows N rows per thread [" << d.m_rows << "]" << endl << " -scanrd N scan read parallelism [" << d.m_scanrd << "]" << endl << " -scanex N scan exclusive parallelism [" << d.m_scanex << "]" << endl @@ -476,7 +479,7 @@ tt1 = { "TT1", 5, tt1col, 4, tt1itab }; -// tt2 + tt2x1 tt2x2 tt2x3 +// tt2 + tt2x1 tt2x2 tt2x3 tt2x4 static const Col tt2col[] = { @@ -505,6 +508,14 @@ tt2x3col[] = { { 1, tt2col[4] } }; +static const ICol +tt2x4col[] = { + { 0, tt2col[4] }, + { 1, tt2col[3] }, + { 2, tt2col[2] }, + { 3, tt2col[1] } +}; + static const ITab tt2x1 = { "TT2X1", 2, tt2x1col @@ -521,15 +532,21 @@ tt2x3 = { }; static const ITab +tt2x4 = { + "TT2X4", 4, tt2x4col +}; + +static const ITab tt2itab[] = { tt2x1, tt2x2, - tt2x3 + tt2x3, + tt2x4 }; static const Tab tt2 = { - "TT2", 5, tt2col, 3, tt2itab + "TT2", 5, tt2col, 4, tt2itab }; // all tables @@ -823,6 +840,9 @@ createtable(Par par) if (par.m_fragtype != NdbDictionary::Object::FragUndefined) { t.setFragmentType(par.m_fragtype); } + if (par.m_nologging) { + t.setLogging(false); + } for (unsigned k = 0; k < tab.m_cols; k++) { const Col& col = tab.m_col[k]; NdbDictionary::Column c(col.m_name); @@ -2202,7 +2222,6 @@ pkupdateindexbuild(Par par) { if (par.m_no == 0) { CHK(createindex(par) == 0); - CHK(invalidateindex(par) == 0); } else { CHK(pkupdate(par) == 0); } @@ -2493,6 +2512,7 @@ tbusybuild(Par par) RUNSTEP(par, pkinsert, MT); for (unsigned i = 0; i < par.m_subloop; i++) { RUNSTEP(par, pkupdateindexbuild, MT); + RUNSTEP(par, invalidateindex, MT); RUNSTEP(par, readverify, MT); RUNSTEP(par, dropindex, ST); } @@ -2500,9 +2520,28 @@ tbusybuild(Par par) } static int -ttiming(Par par) +ttimebuild(Par par) +{ + Tmr t1; + RUNSTEP(par, droptable, ST); + RUNSTEP(par, createtable, ST); + RUNSTEP(par, invalidatetable, MT); + for (unsigned i = 0; i < par.m_subloop; i++) { + RUNSTEP(par, pkinsert, MT); + t1.on(); + RUNSTEP(par, createindex, ST); + t1.off(par.m_totrows); + RUNSTEP(par, invalidateindex, MT); + RUNSTEP(par, dropindex, ST); + } + LL1("build index - " << t1.time()); + return 0; +} + +static int +ttimemaint(Par par) { - Tmr t0, t1, t2; + Tmr t1, t2; RUNSTEP(par, droptable, ST); RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); @@ -2511,16 +2550,13 @@ ttiming(Par par) t1.on(); RUNSTEP(par, pkupdate, MT); t1.off(par.m_totrows); - t0.on(); RUNSTEP(par, createindex, ST); RUNSTEP(par, invalidateindex, MT); - t0.off(par.m_totrows); t2.on(); RUNSTEP(par, pkupdate, MT); t2.off(par.m_totrows); RUNSTEP(par, dropindex, ST); } - LL1("build index - " << t0.time()); LL1("update - " << t1.time()); LL1("update indexed - " << t2.time()); LL1("overhead - " << t2.over(t1)); @@ -2551,7 +2587,8 @@ tcaselist[] = { TCase("b", tpkops, "pk operations and scan reads"), TCase("c", tmixedops, "pk operations and scan operations"), TCase("d", tbusybuild, "pk operations and index build"), - TCase("t", ttiming, "time index build and maintenance"), + TCase("t", ttimebuild, "time index build"), + TCase("u", ttimemaint, "time index maintenance"), TCase("z", tdrop, "drop test tables") }; @@ -2689,6 +2726,10 @@ NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535) continue; } } + if (strcmp(arg, "-nologging") == 0) { + g_opt.m_nologging = true; + continue; + } if (strcmp(arg, "-rows") == 0) { if (++argv, --argc > 0) { g_opt.m_rows = atoi(argv[0]); diff --git a/ndb/test/ndbapi/testOperations/testOperations.cpp b/ndb/test/ndbapi/testOperations.cpp index bb58e69e898..bb58e69e898 100644 --- a/ndb/test/ndbapi/testOperations/testOperations.cpp +++ b/ndb/test/ndbapi/testOperations.cpp diff --git a/ndb/test/ndbapi/testOrderedIndex/testOrderedIndex.cpp b/ndb/test/ndbapi/testOrderedIndex.cpp index 51cc53c9975..51cc53c9975 100644 --- a/ndb/test/ndbapi/testOrderedIndex/testOrderedIndex.cpp +++ b/ndb/test/ndbapi/testOrderedIndex.cpp diff --git a/ndb/test/ndbapi/testRestartGci/testRestartGci.cpp b/ndb/test/ndbapi/testRestartGci.cpp index 1e36368ba62..e3dd1f8e2ce 100644 --- a/ndb/test/ndbapi/testRestartGci/testRestartGci.cpp +++ b/ndb/test/ndbapi/testRestartGci.cpp @@ -121,7 +121,7 @@ int runVerifyInserts(NDBT_Context* ctx, NDBT_Step* step){ HugoOperations hugoOps(*ctx->getTab()); NdbRestarter restarter; - int restartGCI = pNdb->NdbTamper(ReadRestartGCI, 0); + int restartGCI = pNdb->NdbTamper(Ndb::ReadRestartGCI, 0); ndbout << "restartGCI = " << restartGCI << endl; int count = 0; diff --git a/ndb/test/ndbapi/testScan/testScan.cpp b/ndb/test/ndbapi/testScan.cpp index dbf91f016d8..bc3be0b7dc9 100644 --- a/ndb/test/ndbapi/testScan/testScan.cpp +++ b/ndb/test/ndbapi/testScan.cpp @@ -379,6 +379,31 @@ int runScanReadUntilStoppedNoCount(NDBT_Context* ctx, NDBT_Step* step){ return NDBT_OK; } +int runScanReadUntilStoppedPrintTime(NDBT_Context* ctx, NDBT_Step* step){ + int records = ctx->getNumRecords(); + int i = 0; + int parallelism = ctx->getProperty("Parallelism", 240); + NdbTimer timer; + Ndb* ndb = GETNDB(step); + + + HugoTransactions hugoTrans(*ctx->getTab()); + while (ctx->isTestStopped() == false) { + timer.doReset(); + timer.doStart(); + g_info << i << ": "; + if (ndb->waitUntilReady() != 0) + return NDBT_FAILED; + if (hugoTrans.scanReadRecords(GETNDB(step), records, 0, parallelism) != 0) + return NDBT_FAILED; + timer.doStop(); + if ((timer.elapsedTime()/1000) > 1) + timer.printTotalTime(); + i++; + } + return NDBT_OK; +} + int runPkRead(NDBT_Context* ctx, NDBT_Step* step){ int loops = ctx->getNumLoops(); @@ -504,6 +529,64 @@ int runRestarter(NDBT_Context* ctx, NDBT_Step* step){ return result; } + +int runStopAndStartNode(NDBT_Context* ctx, NDBT_Step* step){ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + NdbRestarter restarter; + int i = 0; + int lastId = 0; + int timeout = 240; + + if (restarter.getNumDbNodes() < 2){ + ctx->stopTest(); + return NDBT_OK; + } + while(i<loops && result != NDBT_FAILED){ + if(restarter.waitClusterStarted(timeout) != 0){ + g_err << "Cluster failed to start 1" << endl; + result = NDBT_FAILED; + break; + } + NdbSleep_SecSleep(1); + int nodeId = restarter.getDbNodeId(lastId); + lastId = (lastId + 1) % restarter.getNumDbNodes(); + g_err << "Stopping node " << nodeId << endl; + + if(restarter.restartOneDbNode(nodeId, false, true) != 0){ + g_err << "Failed to restartOneDbNode" << endl; + result = NDBT_FAILED; + break; + } + + if(restarter.waitNodesNoStart(&nodeId, 1, timeout) != 0){ + g_err << "Node failed to reach NoStart" << endl; + result = NDBT_FAILED; + break; + } + + g_info << "Sleeping for 10 secs" << endl; + NdbSleep_SecSleep(10); + + g_err << "Starting node " << nodeId << endl; + if(restarter.startNodes(&nodeId, 1) != 0){ + g_err << "Failed to start the node" << endl; + result = NDBT_FAILED; + break; + } + + i++; + } + if(restarter.waitClusterStarted(timeout) != 0){ + g_err << "Cluster failed to start 2" << endl; + result = NDBT_FAILED; + } + + ctx->stopTest(); + + return result; +} + int runRestarter9999(NDBT_Context* ctx, NDBT_Step* step){ int result = NDBT_OK; int loops = ctx->getNumLoops(); @@ -1302,6 +1385,14 @@ TESTCASE("CheckAfterTerror", STEPS(runScanRead, 5); FINALIZER(runClearTable); } +TESTCASE("ScanReadWhileNodeIsDown", + "Scan requirement:A scan should be able to run as fast when "\ + "one or more nodes in the cluster is down."){ + INITIALIZER(runLoadTable); + STEP(runScanReadUntilStoppedPrintTime); + STEP(runStopAndStartNode); + FINALIZER(runClearTable); +} NDBT_TESTSUITE_END(testScan); int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp b/ndb/test/ndbapi/testScanInterpreter.cpp index 18fd98bdbb3..3b5baf954e0 100644 --- a/ndb/test/ndbapi/testScanInterpreter/testScanInterpreter.cpp +++ b/ndb/test/ndbapi/testScanInterpreter.cpp @@ -214,8 +214,8 @@ TESTCASE("ScanLessThan", "Read all records in table TX with attrX less "\ "than a value and store the resultset in TX_RES."\ "Then compare records in TX_RES with records in TX."){ - TABLE("T1"); - TABLE("T2"); + // TABLE("T1"); + // TABLE("T2"); INITIALIZER(runLoadTable); INITIALIZER(runCreateResultTable); STEP(runScanLessThan); @@ -227,8 +227,8 @@ TESTCASE("ScanEqual", "Read all records in table TX with attrX equal "\ "to a value and store the resultset in TX_RES."\ "Then compare records in TX_RES with records in TX."){ - TABLE("T1"); - TABLE("T2"); + // TABLE("T1"); + // TABLE("T2"); INITIALIZER(runLoadTable); INITIALIZER(runCreateResultTable); STEP(runScanEqual); @@ -239,8 +239,8 @@ TESTCASE("ScanEqual", TESTCASE("ScanEqualLoop", "Scan all records in TX equal to a value."\ "Do this loop number of times"){ - TABLE("T1"); - TABLE("T2"); + // TABLE("T1"); + // TABLE("T2"); INITIALIZER(runLoadTable); INITIALIZER(runCreateResultTable); STEP(runScanEqualLoop); @@ -251,8 +251,8 @@ TESTCASE("ScanEqualVerifyLoop", "Scan all records in TX equal to a value."\ "Verify record in TX_RES table"\ "Do this loop number of times"){ - TABLE("T1"); - TABLE("T2"); + // TABLE("T1"); + // TABLE("T2"); INITIALIZER(runLoadTable); INITIALIZER(runCreateResultTable); STEP(runScanEqualVerifyLoop); @@ -262,8 +262,8 @@ TESTCASE("ScanEqualVerifyLoop", TESTCASE("ScanLessThanLoop", "Scan all records in TX less than a value."\ "Do this loop number of times"){ - TABLE("T1"); - TABLE("T2"); + // TABLE("T1"); + // TABLE("T2"); INITIALIZER(runLoadTable); INITIALIZER(runCreateResultTable); STEP(runScanLessThanLoop); diff --git a/ndb/test/ndbapi/testScanPerf/Makefile b/ndb/test/ndbapi/testScanPerf/Makefile new file mode 100644 index 00000000000..fdf5980b385 --- /dev/null +++ b/ndb/test/ndbapi/testScanPerf/Makefile @@ -0,0 +1,9 @@ +include .defs.mk + +TYPE = ndbapitest + +BIN_TARGET = testScanPerf + +SOURCES = testScanPerf.cpp + +include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/test/ndbapi/testScanPerf/testScanPerf.cpp b/ndb/test/ndbapi/testScanPerf/testScanPerf.cpp new file mode 100644 index 00000000000..61af1ffb989 --- /dev/null +++ b/ndb/test/ndbapi/testScanPerf/testScanPerf.cpp @@ -0,0 +1,368 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <NDBT.hpp> +#include <NDBT_Test.hpp> +#include <HugoTransactions.hpp> +#include <UtilTransactions.hpp> +#include <random.h> +#include <getarg.h> + +struct Parameter { + char * name; + unsigned value; + unsigned min; + unsigned max; +}; + +#define P_BATCH 0 +#define P_PARRA 1 +#define P_LOCK 2 +#define P_FILT 3 +#define P_BOUND 4 +#define P_ACCESS 5 +#define P_FETCH 6 +#define P_ROWS 7 +#define P_LOOPS 8 +#define P_CREATE 9 +#define P_LOAD 10 + +#define P_MAX 11 + +static +Parameter +g_paramters[] = { + { "batch", 0, 0, 1 }, // 0, 15 + { "parallelism", 0, 0, 1 }, // 0, 1 + { "lock", 0, 0, 2 }, // read, exclusive, dirty + { "filter", 0, 0, 3 }, // all, none, 1, 100 + { "range", 0, 0, 3 }, // all, none, 1, 100 + { "access", 0, 0, 2 }, // scan, idx, idx sorted + { "fetch", 0, 0, 1 }, // No, yes + { "size", 1000000, 1, ~0 }, + { "iterations", 3, 1, ~0 }, + { "create_drop", 1, 0, 1 }, + { "data", 1, 0, 1 } +}; + +static Ndb* g_ndb = 0; +static const NdbDictionary::Table * g_table; +static const NdbDictionary::Index * g_index; +static char g_tablename[256]; +static char g_indexname[256]; + +int create_table(); +int load_table(); +int run_scan(); +int clear_table(); +int drop_table(); + +int +main(int argc, const char** argv){ + int verbose = 1; + int optind = 0; + + struct getargs args[1+P_MAX] = { + { "verbose", 'v', arg_flag, &verbose, "Print verbose status", "verbose" } + }; + const int num_args = 1 + P_MAX; + for(int i = 0; i<P_MAX; i++){ + args[i+1].long_name = g_paramters[i].name; + args[i+1].short_name = * g_paramters[i].name; + args[i+1].type = arg_integer; + args[i+1].value = &g_paramters[i].value; + BaseString tmp; + tmp.assfmt("min: %d max: %d", g_paramters[i].min, g_paramters[i].max); + args[i+1].help = strdup(tmp.c_str()); + args[i+1].arg_help = 0; + } + + if(getarg(args, num_args, argc, argv, &optind)) { + arg_printusage(args, num_args, argv[0], "tabname1 tabname2 ..."); + return NDBT_WRONGARGS; + } + + myRandom48Init(NdbTick_CurrentMillisecond()); + + g_ndb = new Ndb("TEST_DB"); + if(g_ndb->init() != 0){ + g_err << "init() failed" << endl; + goto error; + } + if(g_ndb->waitUntilReady() != 0){ + g_err << "Wait until ready failed" << endl; + goto error; + } + for(int i = optind; i<argc; i++){ + const char * T = argv[i]; + g_info << "Testing " << T << endl; + snprintf(g_tablename, sizeof(g_tablename), T); + snprintf(g_indexname, sizeof(g_indexname), "IDX_%s", T); + if(create_table()) + goto error; + if(load_table()) + goto error; + if(run_scan()) + goto error; + if(clear_table()) + goto error; + if(drop_table()) + goto error; + } + + if(g_ndb) delete g_ndb; + return NDBT_OK; + error: + if(g_ndb) delete g_ndb; + return NDBT_FAILED; +} + +int +create_table(){ + NdbDictionary::Dictionary* dict = g_ndb->getDictionary(); + assert(dict); + if(g_paramters[P_CREATE].value){ + const NdbDictionary::Table * pTab = NDBT_Tables::getTable(g_tablename); + assert(pTab); + NdbDictionary::Table copy = * pTab; + copy.setLogging(false); + if(dict->createTable(copy) != 0){ + g_err << "Failed to create table: " << g_tablename << endl; + return -1; + } + + NdbDictionary::Index x(g_indexname); + x.setTable(g_tablename); + x.setType(NdbDictionary::Index::OrderedIndex); + x.setLogging(false); + for (unsigned k = 0; k < copy.getNoOfColumns(); k++){ + if(copy.getColumn(k)->getPrimaryKey()){ + x.addColumnName(copy.getColumn(k)->getName()); + } + } + + if(dict->createIndex(x) != 0){ + g_err << "Failed to create index: " << endl; + return -1; + } + } + g_table = dict->getTable(g_tablename); + g_index = dict->getIndex(g_indexname, g_tablename); + assert(g_table); + assert(g_index); + return 0; +} + +int +drop_table(){ + if(!g_paramters[P_CREATE].value) + return 0; + if(g_ndb->getDictionary()->dropTable(g_table->getName()) != 0){ + g_err << "Failed to drop table: " << g_table->getName() << endl; + return -1; + } + g_table = 0; + return 0; +} + +int +load_table(){ + if(!g_paramters[P_LOAD].value) + return 0; + + int rows = g_paramters[P_ROWS].value; + HugoTransactions hugoTrans(* g_table); + if (hugoTrans.loadTable(g_ndb, rows)){ + g_err.println("Failed to load %s with %d rows", g_table->getName(), rows); + return -1; + } + return 0; +} + +int +clear_table(){ + if(!g_paramters[P_LOAD].value) + return 0; + + int rows = g_paramters[P_ROWS].value; + + UtilTransactions utilTrans(* g_table); + if (utilTrans.clearTable(g_ndb, rows) != 0){ + g_err.println("Failed to clear table %s", g_table->getName()); + return -1; + } + return 0; +} + +inline +void err(NdbError e){ + ndbout << e << endl; +} + +int +run_scan(){ + int iter = g_paramters[P_LOOPS].value; + Uint64 start1; + Uint64 sum1 = 0; + + Uint32 tot = g_paramters[P_ROWS].value; + + for(int i = 0; i<iter; i++){ + start1 = NdbTick_CurrentMillisecond(); + NdbConnection * pTrans = g_ndb->startTransaction(); + if(!pTrans){ + g_err << "Failed to start transaction" << endl; + err(g_ndb->getNdbError()); + return -1; + } + + NdbScanOperation * pOp; +#ifdef NdbIndexScanOperation_H + NdbIndexScanOperation * pIOp; +#else + NdbScanOperation * pIOp; +#endif + + NdbResultSet * rs; + int par = g_paramters[P_PARRA].value; + int bat = g_paramters[P_BATCH].value; + NdbScanOperation::LockMode lm; + switch(g_paramters[P_LOCK].value){ + case 0: + lm = NdbScanOperation::LM_Read; + break; + case 1: + lm = NdbScanOperation::LM_Exclusive; + break; + case 2: + lm = NdbScanOperation::LM_CommittedRead; + break; + default: + abort(); + } + + if(g_paramters[P_ACCESS].value == 0){ + pOp = pTrans->getNdbScanOperation(g_tablename); + assert(pOp); +#ifdef NdbIndexScanOperation_H + rs = pOp->readTuples(lm, bat, par); +#else + int oldp = (par == 0 ? 240 : par) * (bat == 0 ? 15 : bat); + rs = pOp->readTuples(oldp > 240 ? 240 : oldp, lm); +#endif + } else { +#ifdef NdbIndexScanOperation_H + pOp = pIOp = pTrans->getNdbIndexScanOperation(g_indexname, g_tablename); + bool ord = g_paramters[P_ACCESS].value == 2; + rs = pIOp->readTuples(lm, bat, par, ord); +#else + pOp = pIOp = pTrans->getNdbScanOperation(g_indexname, g_tablename); + assert(pOp); + int oldp = (par == 0 ? 240 : par) * (bat == 0 ? 15 : bat); + rs = pIOp->readTuples(oldp > 240 ? 240 : oldp, lm); +#endif + switch(g_paramters[P_BOUND].value){ + case 0: // All + break; + case 1: // None +#ifdef NdbIndexScanOperation_H + pIOp->setBound((Uint32)0, NdbIndexScanOperation::BoundEQ, 0); +#else + pIOp->setBound((Uint32)0, NdbOperation::BoundEQ, 0); +#endif + break; + case 2: { // 1 row + default: + assert(g_table->getNoOfPrimaryKeys() == 1); // only impl. so far + abort(); +#if 0 + int tot = g_paramters[P_ROWS].value; + int row = rand() % tot; + fix_eq_bound(pIOp, row); +#endif + break; + } + } + } + assert(pOp); + assert(rs); + + int check = 0; + switch(g_paramters[P_FILT].value){ + case 0: // All + check = pOp->interpret_exit_ok(); + break; + case 1: // None + check = pOp->interpret_exit_nok(); + break; + case 2: { // 1 row + default: + assert(g_table->getNoOfPrimaryKeys() == 1); // only impl. so far + abort(); +#if 0 + int tot = g_paramters[P_ROWS].value; + int row = rand() % tot; + NdbScanFilter filter(pOp) ; + filter.begin(NdbScanFilter::AND); + fix_eq(filter, pOp, row); + filter.end(); + break; +#endif + } + } + if(check != 0){ + err(pOp->getNdbError()); + return -1; + } + assert(check == 0); + + for(int i = 0; i<g_table->getNoOfColumns(); i++){ + pOp->getValue(i); + } + + int rows = 0; + check = pTrans->execute(NoCommit); + assert(check == 0); + int fetch = g_paramters[P_FETCH].value; + while((check = rs->nextResult(true)) == 0){ + do { + rows++; + } while(!fetch && ((check = rs->nextResult(false)) == 0)); + if(check == -1){ + err(pTrans->getNdbError()); + return -1; + } + assert(check == 2); + } + + if(check == -1){ + err(pTrans->getNdbError()); + return -1; + } + assert(check == 1); + g_info << "Found " << rows << " rows" << endl; + + pTrans->close(); + + Uint64 stop = NdbTick_CurrentMillisecond(); + start1 = (stop - start1); + sum1 += start1; + } + sum1 /= iter; + + g_err.println("Avg time: %Ldms = %d rows/sec", sum1, (1000*tot)/sum1); + return 0; +} diff --git a/ndb/test/ndbapi/testSystemRestart/testSystemRestart.cpp b/ndb/test/ndbapi/testSystemRestart.cpp index 1b8a35487cb..61e086ff941 100644 --- a/ndb/test/ndbapi/testSystemRestart/testSystemRestart.cpp +++ b/ndb/test/ndbapi/testSystemRestart.cpp @@ -805,6 +805,207 @@ int runSystemRestart5(NDBT_Context* ctx, NDBT_Step* step){ return result; } +int runSystemRestart6(NDBT_Context* ctx, NDBT_Step* step){ + Ndb* pNdb = GETNDB(step); + int result = NDBT_OK; + int timeout = 300; + Uint32 loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter restarter; + Uint32 i = 1; + + const Uint32 nodeCount = restarter.getNumDbNodes(); + if(nodeCount < 2){ + g_info << "SR6 - Needs atleast 2 nodes to test" << endl; + return NDBT_OK; + } + + Vector<int> nodeIds; + for(Uint32 i = 0; i<nodeCount; i++) + nodeIds.push_back(restarter.getDbNodeId(i)); + + Uint32 currentRestartNodeIndex = 0; + UtilTransactions utilTrans(*ctx->getTab()); + HugoTransactions hugoTrans(*ctx->getTab()); + + while(i<=loops && result != NDBT_FAILED){ + + g_info << "Loop " << i << "/"<< loops <<" started" << endl; + /** + * 1. Load data + * 2. Restart all node -nostart + * 3. Restart some nodes -i -nostart + * 4. Start all nodes verify records + */ + g_info << "Loading records..." << endl; + hugoTrans.loadTable(pNdb, records); + + CHECK(restarter.restartAll(false, true, false) == 0); + + Uint32 nodeId = nodeIds[currentRestartNodeIndex]; + currentRestartNodeIndex = (currentRestartNodeIndex + 1 ) % nodeCount; + + CHECK(restarter.restartOneDbNode(nodeId, true, true,false) == 0); + CHECK(restarter.waitClusterNoStart(timeout) == 0); + CHECK(restarter.startAll() == 0); + CHECK(restarter.waitClusterStarted(timeout) == 0); + CHECK(pNdb->waitUntilReady(timeout) == 0); + int count = records - 1; + CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0); + CHECK(count == records); + CHECK(utilTrans.clearTable(pNdb) == 0); + i++; + } + + g_info << "runSystemRestart6 finished" << endl; + + return result; +} + +int runSystemRestart7(NDBT_Context* ctx, NDBT_Step* step){ + Ndb* pNdb = GETNDB(step); + int result = NDBT_OK; + Uint32 loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter restarter; + Uint32 i = 1; + + const Uint32 nodeCount = restarter.getNumDbNodes(); + if(nodeCount < 2){ + g_info << "SR8 - Needs atleast 2 nodes to test" << endl; + return NDBT_OK; + } + + Vector<int> nodeIds; + for(Uint32 i = 0; i<nodeCount; i++) + nodeIds.push_back(restarter.getDbNodeId(i)); + + int a_nodeIds[64]; + if(nodeCount > 64) + abort(); + + Uint32 currentRestartNodeIndex = 1; + UtilTransactions utilTrans(*ctx->getTab()); + HugoTransactions hugoTrans(*ctx->getTab()); + + while(i<=loops && result != NDBT_FAILED){ + + g_info << "Loop " << i << "/"<< loops <<" started" << endl; + /** + * 1. Load data + * 2. Restart all node -nostart + * 3. Start all but one node + * 4. Wait for startphase >= 2 + * 5. Start last node + * 6. Verify records + */ + g_info << "Loading records..." << endl; + hugoTrans.loadTable(pNdb, records); + + CHECK(restarter.restartAll(false, true, false) == 0); + + int nodeId = nodeIds[currentRestartNodeIndex]; + currentRestartNodeIndex = (currentRestartNodeIndex + 1 ) % nodeCount; + + Uint32 j = 0; + for(Uint32 k = 0; k<nodeCount; k++){ + if(nodeIds[k] != nodeId){ + a_nodeIds[j++] = nodeIds[k]; + } + } + + CHECK(restarter.startNodes(a_nodeIds, nodeCount - 1) == 0); + CHECK(restarter.waitNodesStarted(a_nodeIds, nodeCount - 1, 120) == 0); + CHECK(pNdb->waitUntilReady(5) == 0); + int count = records - 1; + CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0); + CHECK(count == records); + + CHECK(restarter.startNodes(&nodeId, 1) == 0); + CHECK(restarter.waitNodesStarted(&nodeId, 1, 120) == 0); + + CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0); + CHECK(count == records); + CHECK(utilTrans.clearTable(pNdb) == 0); + + i++; + } + + g_info << "runSystemRestart7 finished" << endl; + + return result; +} + +int runSystemRestart8(NDBT_Context* ctx, NDBT_Step* step){ + Ndb* pNdb = GETNDB(step); + int result = NDBT_OK; + int timeout = 300; + Uint32 loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter restarter; + Uint32 i = 1; + + const Uint32 nodeCount = restarter.getNumDbNodes(); + if(nodeCount < 2){ + g_info << "SR8 - Needs atleast 2 nodes to test" << endl; + return NDBT_OK; + } + + Vector<int> nodeIds; + for(Uint32 i = 0; i<nodeCount; i++) + nodeIds.push_back(restarter.getDbNodeId(i)); + + int a_nodeIds[64]; + if(nodeCount > 64) + abort(); + + Uint32 currentRestartNodeIndex = 1; + UtilTransactions utilTrans(*ctx->getTab()); + HugoTransactions hugoTrans(*ctx->getTab()); + + while(i<=loops && result != NDBT_FAILED){ + + g_info << "Loop " << i << "/"<< loops <<" started" << endl; + /** + * 1. Load data + * 2. Restart all node -nostart + * 3. Start all but one node + * 4. Verify records + * 5. Start last node + * 6. Verify records + */ + g_info << "Loading records..." << endl; + hugoTrans.loadTable(pNdb, records); + + CHECK(restarter.restartAll(false, true, false) == 0); + + int nodeId = nodeIds[currentRestartNodeIndex]; + currentRestartNodeIndex = (currentRestartNodeIndex + 1 ) % nodeCount; + + Uint32 j = 0; + for(Uint32 k = 0; k<nodeCount; k++){ + if(nodeIds[k] != nodeId){ + a_nodeIds[j++] = nodeIds[k]; + } + } + + CHECK(restarter.startNodes(a_nodeIds, nodeCount-1) == 0); + CHECK(restarter.waitNodesStartPhase(a_nodeIds, nodeCount-1, 3, 120) == 0); + CHECK(restarter.startNodes(&nodeId, 1) == 0); + CHECK(restarter.waitClusterStarted(timeout) == 0); + + int count = records - 1; + CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0); + CHECK(count == records); + CHECK(utilTrans.clearTable(pNdb) == 0); + i++; + } + + g_info << "runSystemRestart7 finished" << endl; + + return result; +} + int runWaitStarted(NDBT_Context* ctx, NDBT_Step* step){ NdbRestarter restarter; @@ -817,8 +1018,13 @@ int runWaitStarted(NDBT_Context* ctx, NDBT_Step* step){ int runClearTable(NDBT_Context* ctx, NDBT_Step* step){ int records = ctx->getNumRecords(); - UtilTransactions utilTrans(*ctx->getTab()); - if (utilTrans.clearTable2(GETNDB(step), records) != 0){ + Ndb* pNdb = GETNDB(step); + if(pNdb->waitUntilReady(5) != 0){ + return NDBT_FAILED; + } + + UtilTransactions utilTrans(*ctx->getTab()); + if (utilTrans.clearTable2(pNdb, records) != 0){ return NDBT_FAILED; } return NDBT_OK; @@ -933,6 +1139,43 @@ TESTCASE("SR5", STEP(runSystemRestart5); FINALIZER(runClearTable); } +TESTCASE("SR6", + "Perform system restart with some nodes having FS others wo/\n" + "* 1. Load data\n" + "* 2. Restart all node -nostart\n" + "* 3. Restart some nodes -i -nostart\n" + "* 4. Start all nodes verify records\n"){ + INITIALIZER(runWaitStarted); + INITIALIZER(runClearTable); + STEP(runSystemRestart6); + FINALIZER(runClearTable); +} +TESTCASE("SR7", + "Perform partition win system restart\n" + "* 1. Load data\n" + "* 2. Restart all node -nostart\n" + "* 3. Start all but one node\n" + "* 4. Verify records\n" + "* 5. Start last node\n" + "* 6. Verify records\n"){ + INITIALIZER(runWaitStarted); + INITIALIZER(runClearTable); + STEP(runSystemRestart7); + FINALIZER(runClearTable); +} +TESTCASE("SR8", + "Perform partition win system restart with other nodes delayed\n" + "* 1. Load data\n" + "* 2. Restart all node -nostart\n" + "* 3. Start all but one node\n" + "* 4. Wait for startphase >= 2\n" + "* 5. Start last node\n" + "* 6. Verify records\n"){ + INITIALIZER(runWaitStarted); + INITIALIZER(runClearTable); + STEP(runSystemRestart8); + FINALIZER(runClearTable); +} NDBT_TESTSUITE_END(testSystemRestart); int main(int argc, const char** argv){ diff --git a/ndb/test/ndbapi/testTimeout/testTimeout.cpp b/ndb/test/ndbapi/testTimeout.cpp index de1d2cfc40b..8a7866880b3 100644 --- a/ndb/test/ndbapi/testTimeout/testTimeout.cpp +++ b/ndb/test/ndbapi/testTimeout.cpp @@ -57,8 +57,8 @@ int runTimeoutTrans(NDBT_Context* ctx, NDBT_Step* step){ int stepNo = step->getStepNo(); Uint32 timeoutVal; if (!conf.getProperty(nodeId, - "DB", - "TransactionInactiveTimeout", + NODE_TYPE_DB, + CFG_DB_TRANSACTION_INACTIVE_TIMEOUT, &timeoutVal)){ return NDBT_FAILED; } @@ -103,8 +103,8 @@ int runDontTimeoutTrans(NDBT_Context* ctx, NDBT_Step* step){ int stepNo = step->getStepNo(); Uint32 timeoutVal; if (!conf.getProperty(nodeId, - "DB", - "TransactionInactiveTimeout", + NODE_TYPE_DB, + CFG_DB_TRANSACTION_INACTIVE_TIMEOUT, &timeoutVal)){ return NDBT_FAILED; } @@ -151,8 +151,8 @@ int runBuddyTransNoTimeout(NDBT_Context* ctx, NDBT_Step* step){ int stepNo = step->getStepNo(); Uint32 timeoutVal; if (!conf.getProperty(nodeId, - "DB", - "TransactionInactiveTimeout", + NODE_TYPE_DB, + CFG_DB_TRANSACTION_INACTIVE_TIMEOUT, &timeoutVal)){ return NDBT_FAILED; } diff --git a/ndb/test/ndbapi/testTransactions/testTransactions.cpp b/ndb/test/ndbapi/testTransactions.cpp index 9ce928f8736..9ce928f8736 100644 --- a/ndb/test/ndbapi/testTransactions/testTransactions.cpp +++ b/ndb/test/ndbapi/testTransactions.cpp diff --git a/ndb/test/ndbapi/test_event/test_event.cpp b/ndb/test/ndbapi/test_event.cpp index 40fc1c6defa..40fc1c6defa 100644 --- a/ndb/test/ndbapi/test_event/test_event.cpp +++ b/ndb/test/ndbapi/test_event.cpp diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp b/ndb/test/ndbapi/userInterface.cpp index fdbc229cc98..fdbc229cc98 100644 --- a/ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp +++ b/ndb/test/ndbapi/userInterface.cpp |