Commit 47c877bd authored by unknown's avatar unknown

ndb_init() to all ndb programs


ndb/examples/ndbapi_async_example/ndbapi_async.cpp:
  ndb_init()
ndb/examples/ndbapi_example1/ndbapi_example1.cpp:
  ndb_init()
ndb/examples/ndbapi_example2/ndbapi_example2.cpp:
  ndb_init()
ndb/examples/ndbapi_example3/ndbapi_example3.cpp:
  ndb_init()
ndb/examples/ndbapi_example4/ndbapi_example4.cpp:
  ndb_init()
ndb/examples/ndbapi_example5/ndbapi_example5.cpp:
  ndb_init()
ndb/examples/ndbapi_scan_example/ndbapi_scan.cpp:
  ndb_init()
ndb/examples/select_all/select_all.cpp:
  ndb_init()
ndb/include/ndb_global.h:
  ndb_init()
ndb/src/common/util/Makefile.am:
  ndb_init()
ndb/src/kernel/blocks/backup/read.cpp:
  ndb_init()
ndb/src/kernel/blocks/backup/restore/main.cpp:
  ndb_init()
ndb/src/kernel/main.cpp:
  ndb_init()
ndb/src/kernel/vm/Configuration.cpp:
  ndb_init()
ndb/src/mgmclient/main.cpp:
  ndb_init()
ndb/src/mgmsrv/main.cpp:
  ndb_init()
ndb/src/mgmsrv/mkconfig/mkconfig.cpp:
  ndb_init()
ndb/src/ndbapi/Ndbinit.cpp:
  ndb_init()
ndb/test/ndbapi/acid.cpp:
  ndb_init()
ndb/test/ndbapi/acid2.cpp:
  ndb_init()
ndb/test/ndbapi/benchronja.cpp:
  ndb_init()
ndb/test/ndbapi/bulk_copy.cpp:
  ndb_init()
ndb/test/ndbapi/cdrserver.cpp:
  ndb_init()
ndb/test/ndbapi/celloDb.cpp:
  ndb_init()
ndb/test/ndbapi/create_all_tabs.cpp:
  ndb_init()
ndb/test/ndbapi/create_tab.cpp:
  ndb_init()
ndb/test/ndbapi/drop_all_tabs.cpp:
  ndb_init()
ndb/test/ndbapi/flexAsynch.cpp:
  ndb_init()
ndb/test/ndbapi/flexBench.cpp:
  ndb_init()
ndb/test/ndbapi/flexHammer.cpp:
  ndb_init()
ndb/test/ndbapi/flexScan.cpp:
  ndb_init()
ndb/test/ndbapi/flexTT.cpp:
  ndb_init()
ndb/test/ndbapi/flexTimedAsynch.cpp:
  ndb_init()
ndb/test/ndbapi/flex_bench_mysql.cpp:
  ndb_init()
ndb/test/ndbapi/index.cpp:
  ndb_init()
ndb/test/ndbapi/index2.cpp:
  ndb_init()
ndb/test/ndbapi/initronja.cpp:
  ndb_init()
ndb/test/ndbapi/interpreterInTup.cpp:
  ndb_init()
ndb/test/ndbapi/mainAsyncGenerator.cpp:
  ndb_init()
ndb/test/ndbapi/msa.cpp:
  ndb_init()
ndb/test/ndbapi/restarter.cpp:
  ndb_init()
ndb/test/ndbapi/restarter2.cpp:
  ndb_init()
ndb/test/ndbapi/restarts.cpp:
  ndb_init()
ndb/test/ndbapi/size.cpp:
  ndb_init()
ndb/test/ndbapi/slow_select.cpp:
  ndb_init()
ndb/test/ndbapi/testBackup.cpp:
  ndb_init()
ndb/test/ndbapi/testBasic.cpp:
  ndb_init()
ndb/test/ndbapi/testBasicAsynch.cpp:
  ndb_init()
ndb/test/ndbapi/testBlobs.cpp:
  ndb_init()
ndb/test/ndbapi/testDataBuffers.cpp:
  ndb_init()
ndb/test/ndbapi/testDeadlock.cpp:
  ndb_init()
ndb/test/ndbapi/testDict.cpp:
  ndb_init()
ndb/test/ndbapi/testGrep.cpp:
  ndb_init()
ndb/test/ndbapi/testGrepVerify.cpp:
  ndb_init()
ndb/test/ndbapi/testIndex.cpp:
  ndb_init()
ndb/test/ndbapi/testInterpreter.cpp:
  ndb_init()
ndb/test/ndbapi/testMgm.cpp:
  ndb_init()
ndb/test/ndbapi/bank/bankCreator.cpp:
  ndb_init()
ndb/test/ndbapi/bank/bankMakeGL.cpp:
  ndb_init()
ndb/test/ndbapi/bank/bankSumAccounts.cpp:
  ndb_init()
ndb/test/ndbapi/bank/bankTimer.cpp:
  ndb_init()
ndb/test/ndbapi/bank/bankTransactionMaker.cpp:
  ndb_init()
ndb/test/ndbapi/bank/bankValidateAllGLs.cpp:
  ndb_init()
ndb/test/ndbapi/bank/testBank.cpp:
  ndb_init()
ndb/test/ndbapi/testNdbApi.cpp:
  ndb_init()
ndb/test/ndbapi/testNodeRestart.cpp:
  ndb_init()
ndb/test/ndbapi/testOIBasic.cpp:
  ndb_init()
ndb/test/ndbapi/testOperations.cpp:
  ndb_init()
ndb/test/ndbapi/testOrderedIndex.cpp:
  ndb_init()
ndb/test/ndbapi/testReadPerf.cpp:
  ndb_init()
ndb/test/ndbapi/testRestartGci.cpp:
  ndb_init()
ndb/test/ndbapi/testScan.cpp:
  ndb_init()
ndb/test/ndbapi/testScanInterpreter.cpp:
  ndb_init()
ndb/test/ndbapi/testScanPerf.cpp:
  ndb_init()
ndb/test/ndbapi/testSystemRestart.cpp:
  ndb_init()
ndb/test/ndbapi/testTimeout.cpp:
  ndb_init()
ndb/test/ndbapi/testTransactions.cpp:
  ndb_init()
ndb/test/ndbapi/test_event.cpp:
  ndb_init()
ndb/test/run-test/main.cpp:
  ndb_init()
ndb/test/src/NDBT_Test.cpp:
  ndb_init()
ndb/test/tools/copy_tab.cpp:
  ndb_init()
ndb/test/tools/cpcc.cpp:
  ndb_init()
ndb/test/tools/create_index.cpp:
  ndb_init()
ndb/test/tools/hugoCalculator.cpp:
  ndb_init()
ndb/test/tools/hugoFill.cpp:
  ndb_init()
ndb/test/tools/hugoLoad.cpp:
  ndb_init()
ndb/test/tools/hugoLockRecords.cpp:
  ndb_init()
ndb/test/tools/hugoPkDelete.cpp:
  ndb_init()
ndb/test/tools/hugoPkRead.cpp:
  ndb_init()
ndb/test/tools/hugoPkReadRecord.cpp:
  ndb_init()
ndb/test/tools/hugoPkUpdate.cpp:
  ndb_init()
ndb/test/tools/hugoScanRead.cpp:
  ndb_init()
ndb/test/tools/hugoScanUpdate.cpp:
  ndb_init()
ndb/test/tools/restart.cpp:
  ndb_init()
ndb/test/tools/transproxy.cpp:
  ndb_init()
ndb/test/tools/verify_index.cpp:
  ndb_init()
ndb/tools/delete_all.cpp:
  ndb_init()
ndb/tools/desc.cpp:
  ndb_init()
ndb/tools/drop_index.cpp:
  ndb_init()
ndb/tools/drop_tab.cpp:
  ndb_init()
ndb/tools/listTables.cpp:
  ndb_init()
ndb/tools/ndbsql.cpp:
  ndb_init()
ndb/tools/select_all.cpp:
  ndb_init()
ndb/tools/select_count.cpp:
  ndb_init()
ndb/tools/waiter.cpp:
  ndb_init()
parent ff376da0
...@@ -454,6 +454,7 @@ int populate(Ndb * myNdb, int data, async_callback_t * cbData) ...@@ -454,6 +454,7 @@ int populate(Ndb * myNdb, int data, async_callback_t * cbData)
int main() int main()
{ {
ndb_init();
Ndb* myNdb = new Ndb( "TEST_DB" ); // Object representing the database Ndb* myNdb = new Ndb( "TEST_DB" ); // Object representing the database
/******************************************* /*******************************************
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
int main() int main()
{ {
ndb_init();
Ndb* myNdb = new Ndb( "TEST_DB_1" ); // Object representing the database Ndb* myNdb = new Ndb( "TEST_DB_1" ); // Object representing the database
NdbDictionary::Table myTable; NdbDictionary::Table myTable;
NdbDictionary::Column myColumn; NdbDictionary::Column myColumn;
......
...@@ -39,6 +39,7 @@ static void callback(int result, NdbConnection* NdbObject, void* aObject); ...@@ -39,6 +39,7 @@ static void callback(int result, NdbConnection* NdbObject, void* aObject);
int main() int main()
{ {
ndb_init();
Ndb* myNdb = new Ndb( "TEST_DB_2" ); // Object representing the database Ndb* myNdb = new Ndb( "TEST_DB_2" ); // Object representing the database
NdbConnection* myNdbConnection[2]; // For transactions NdbConnection* myNdbConnection[2]; // For transactions
......
...@@ -176,6 +176,7 @@ int executeInsertTransaction(int transactionId, Ndb* myNdb) { ...@@ -176,6 +176,7 @@ int executeInsertTransaction(int transactionId, Ndb* myNdb) {
int main() int main()
{ {
ndb_init();
Ndb* myNdb = new Ndb( "TEST_DB_1" ); // Object representing the database Ndb* myNdb = new Ndb( "TEST_DB_1" ); // Object representing the database
/******************************************* /*******************************************
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
int main() int main()
{ {
ndb_init();
Ndb* myNdb = new Ndb( "TEST_DB_1" ); // Object representing the database Ndb* myNdb = new Ndb( "TEST_DB_1" ); // Object representing the database
NdbDictionary::Table myTable; NdbDictionary::Table myTable;
NdbDictionary::Column myColumn; NdbDictionary::Column myColumn;
......
...@@ -65,6 +65,7 @@ int myCreateEvent(Ndb* myNdb, ...@@ -65,6 +65,7 @@ int myCreateEvent(Ndb* myNdb,
int main() int main()
{ {
ndb_init();
Ndb* myNdb = myCreateNdb(); Ndb* myNdb = myCreateNdb();
NdbDictionary::Dictionary *myDict; NdbDictionary::Dictionary *myDict;
......
...@@ -761,6 +761,7 @@ int scan_print(Ndb * myNdb, int parallelism, ...@@ -761,6 +761,7 @@ int scan_print(Ndb * myNdb, int parallelism,
int main() int main()
{ {
ndb_init();
Ndb* myNdb = new Ndb( "TEST_DB" ); // Object representing the database Ndb* myNdb = new Ndb( "TEST_DB" ); // Object representing the database
......
...@@ -112,6 +112,7 @@ const char* ResultSetContainer::getAttrName(int i) const {return m_names[i];} ...@@ -112,6 +112,7 @@ const char* ResultSetContainer::getAttrName(int i) const {return m_names[i];}
int main(int argc, const char** argv) int main(int argc, const char** argv)
{ {
ndb_init();
Ndb* myNdb = new Ndb("ndbapi_example4"); // Object representing the database Ndb* myNdb = new Ndb("ndbapi_example4"); // Object representing the database
NdbConnection* myNdbConnection; // For transactions NdbConnection* myNdbConnection; // For transactions
NdbOperation* myNdbOperation; // For operations NdbOperation* myNdbOperation; // For operations
......
...@@ -76,6 +76,9 @@ extern "C" { ...@@ -76,6 +76,9 @@ extern "C" {
#include <assert.h> #include <assert.h>
/* call in main() - does not return on error */
extern int ndb_init(void);
#ifndef HAVE_STRDUP #ifndef HAVE_STRDUP
extern char * strdup(const char *s); extern char * strdup(const char *s);
#endif #endif
......
...@@ -9,7 +9,7 @@ libgeneral_la_SOURCES = \ ...@@ -9,7 +9,7 @@ libgeneral_la_SOURCES = \
NdbSqlUtil.cpp new.cpp \ NdbSqlUtil.cpp new.cpp \
uucode.c random.c getarg.c version.c \ uucode.c random.c getarg.c version.c \
strdup.c strlcat.c strlcpy.c \ strdup.c strlcat.c strlcpy.c \
ConfigValues.cpp ConfigValues.cpp ndb_init.c
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am include $(top_srcdir)/ndb/config/type_util.mk.am
......
/* 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 <ndb_global.h>
#include <my_sys.h>
int
ndb_init()
{
if (my_init()) {
const char* err = "my_init() failed - exit\n";
write(2, err, strlen(err));
exit(1);
}
return 0;
}
...@@ -48,6 +48,7 @@ static Uint32 logEntryNo; ...@@ -48,6 +48,7 @@ static Uint32 logEntryNo;
int int
main(int argc, const char * argv[]){ main(int argc, const char * argv[]){
ndb_init();
if(argc <= 1){ if(argc <= 1){
printf("Usage: %s <filename>", argv[0]); printf("Usage: %s <filename>", argv[0]);
exit(1); exit(1);
......
...@@ -206,6 +206,7 @@ free_data_callback() ...@@ -206,6 +206,7 @@ free_data_callback()
int int
main(int argc, const char** argv) main(int argc, const char** argv)
{ {
ndb_init();
if (!readArguments(argc, argv)) if (!readArguments(argc, argv))
{ {
return -1; return -1;
......
...@@ -56,6 +56,7 @@ const char programName[] = "NDB Kernel"; ...@@ -56,6 +56,7 @@ const char programName[] = "NDB Kernel";
NDB_MAIN(ndb_kernel){ NDB_MAIN(ndb_kernel){
ndb_init();
// Print to stdout/console // Print to stdout/console
g_eventLogger.createConsoleHandler(); g_eventLogger.createConsoleHandler();
g_eventLogger.setCategory("NDB"); g_eventLogger.setCategory("NDB");
......
...@@ -105,7 +105,6 @@ Configuration::init(int argc, const char** argv){ ...@@ -105,7 +105,6 @@ Configuration::init(int argc, const char** argv){
} }
// check for depricated flag '-i' // check for depricated flag '-i'
my_init();
#ifndef DBUG_OFF #ifndef DBUG_OFF
if (debug_option) if (debug_option)
DBUG_PUSH(debug_option); DBUG_PUSH(debug_option);
......
...@@ -44,6 +44,7 @@ handler(int sig){ ...@@ -44,6 +44,7 @@ handler(int sig){
} }
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int optind = 0; int optind = 0;
const char *_host = 0; const char *_host = 0;
int _port = 0; int _port = 0;
......
...@@ -129,6 +129,7 @@ int num_args = sizeof(args) / sizeof(args[0]); ...@@ -129,6 +129,7 @@ int num_args = sizeof(args) / sizeof(args[0]);
* MAIN * MAIN
*/ */
NDB_MAIN(mgmsrv){ NDB_MAIN(mgmsrv){
ndb_init();
/** /**
* OSE specific. Enable shared ownership of file system resources. * OSE specific. Enable shared ownership of file system resources.
* This is needed in order to use the cluster log since the events * This is needed in order to use the cluster log since the events
...@@ -151,7 +152,6 @@ NDB_MAIN(mgmsrv){ ...@@ -151,7 +152,6 @@ NDB_MAIN(mgmsrv){
glob.daemon= 0; glob.daemon= 0;
} }
my_init();
#ifndef DBUG_OFF #ifndef DBUG_OFF
if (debug_option) if (debug_option)
DBUG_PUSH(debug_option); DBUG_PUSH(debug_option);
......
...@@ -32,6 +32,7 @@ void usage(const char * prg){ ...@@ -32,6 +32,7 @@ void usage(const char * prg){
NDB_COMMAND(mkconfig, NDB_COMMAND(mkconfig,
"mkconfig", "mkconfig", "mkconfig", "mkconfig",
"Make a binary configuration from a config file", 16384){ "Make a binary configuration from a config file", 16384){
ndb_init();
if(argc < 3){ if(argc < 3){
usage(argv[0]); usage(argv[0]);
return 0; return 0;
......
...@@ -62,7 +62,6 @@ Ndb::Ndb( const char* aDataBase , const char* aSchema) { ...@@ -62,7 +62,6 @@ Ndb::Ndb( const char* aDataBase , const char* aSchema) {
abort(); // old and new Ndb constructor used mixed abort(); // old and new Ndb constructor used mixed
theNoOfNdbObjects++; theNoOfNdbObjects++;
if (global_ndb_cluster_connection == 0) { if (global_ndb_cluster_connection == 0) {
my_init();
global_ndb_cluster_connection= new Ndb_cluster_connection(ndbConnectString); global_ndb_cluster_connection= new Ndb_cluster_connection(ndbConnectString);
global_ndb_cluster_connection->connect(); global_ndb_cluster_connection->connect();
} }
......
...@@ -434,6 +434,7 @@ extern "C" void* NdbThreadFuncRead(void* pArg) ...@@ -434,6 +434,7 @@ extern "C" void* NdbThreadFuncRead(void* pArg)
NDB_COMMAND(acid, "acid", "acid", "acid", 65535) NDB_COMMAND(acid, "acid", "acid", "acid", 65535)
{ {
ndb_init();
long nSeconds = 60; long nSeconds = 60;
int rc = NDBT_OK; int rc = NDBT_OK;
......
...@@ -610,6 +610,7 @@ extern "C" void* ThreadFunc(void*) ...@@ -610,6 +610,7 @@ extern "C" void* ThreadFunc(void*)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
ndb_init();
Uint32 nSeconds = 1; Uint32 nSeconds = 1;
Uint32 nThread = 1; Uint32 nThread = 1;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _help = 0; int _help = 0;
struct getargs args[] = { struct getargs args[] = {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _help = 0; int _help = 0;
struct getargs args[] = { struct getargs args[] = {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _help = 0; int _help = 0;
struct getargs args[] = { struct getargs args[] = {
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _help = 0; int _help = 0;
int _wait = 30; int _wait = 30;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _help = 0; int _help = 0;
int _wait = 20; int _wait = 20;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _help = 0; int _help = 0;
struct getargs args[] = { struct getargs args[] = {
......
...@@ -141,6 +141,7 @@ TESTCASE("Bank", ...@@ -141,6 +141,7 @@ TESTCASE("Bank",
NDBT_TESTSUITE_END(testBank); NDBT_TESTSUITE_END(testBank);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
// Tables should not be auto created // Tables should not be auto created
testBank.setCreateTable(false); testBank.setCreateTable(false);
......
...@@ -66,6 +66,7 @@ static int ThreadReady[MAXTHREADS]; ...@@ -66,6 +66,7 @@ static int ThreadReady[MAXTHREADS];
static int ThreadStart[MAXTHREADS]; static int ThreadStart[MAXTHREADS];
NDB_COMMAND(benchronja, "benchronja", "benchronja", "benchronja", 65535){ NDB_COMMAND(benchronja, "benchronja", "benchronja", "benchronja", 65535){
ndb_init();
ThreadNdb tabThread[MAXTHREADS]; ThreadNdb tabThread[MAXTHREADS];
int i = 0 ; int i = 0 ;
......
...@@ -221,6 +221,7 @@ int insertFile(Ndb* pNdb, ...@@ -221,6 +221,7 @@ int insertFile(Ndb* pNdb,
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _tabname = NULL; const char* _tabname = NULL;
int _help = 0; int _help = 0;
......
...@@ -113,6 +113,7 @@ using namespace std; ...@@ -113,6 +113,7 @@ using namespace std;
int main(int argc, const char** argv) int main(int argc, const char** argv)
{ {
ndb_init();
/******** NDB ***********/ /******** NDB ***********/
/* /*
Ndb MyNdb( "TEST_DB" ); Ndb MyNdb( "TEST_DB" );
......
...@@ -73,6 +73,7 @@ static int failed = 0 ; ...@@ -73,6 +73,7 @@ static int failed = 0 ;
NDB_COMMAND(celloDb, "celloDb", "celloDb", "celloDb", 65535) NDB_COMMAND(celloDb, "celloDb", "celloDb", "celloDb", 65535)
{ {
ndb_init();
int tTableId; int tTableId;
int i; int i;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _temp = false; int _temp = false;
int _help = 0; int _help = 0;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _temp = false; int _temp = false;
int _help = 0; int _help = 0;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <getarg.h> #include <getarg.h>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _help = 0; int _help = 0;
struct getargs args[] = { struct getargs args[] = {
......
...@@ -145,6 +145,7 @@ tellThreads(StartType what) ...@@ -145,6 +145,7 @@ tellThreads(StartType what)
NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535) NDB_COMMAND(flexAsynch, "flexAsynch", "flexAsynch", "flexAsynch", 65535)
{ {
ndb_init();
ThreadNdb* pThreadData; ThreadNdb* pThreadData;
int tLoops=0, i; int tLoops=0, i;
int returnValue = NDBT_OK; int returnValue = NDBT_OK;
......
...@@ -281,6 +281,7 @@ tellThreads(ThreadData* pt, StartType what) ...@@ -281,6 +281,7 @@ tellThreads(ThreadData* pt, StartType what)
NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
{ {
ndb_init();
ThreadData* pThreadsData; ThreadData* pThreadsData;
int tLoops = 0, i; int tLoops = 0, i;
int returnValue = NDBT_OK; int returnValue = NDBT_OK;
......
...@@ -178,6 +178,7 @@ tellThreads(ThreadNdb* threadArrayP, const StartType what) ...@@ -178,6 +178,7 @@ tellThreads(ThreadNdb* threadArrayP, const StartType what)
NDB_COMMAND(flexHammer, "flexHammer", "flexHammer", "flexHammer", 65535) NDB_COMMAND(flexHammer, "flexHammer", "flexHammer", "flexHammer", 65535)
//main(int argc, const char** argv) //main(int argc, const char** argv)
{ {
ndb_init();
ThreadNdb* pThreads = NULL; // Pointer to thread data array ThreadNdb* pThreads = NULL; // Pointer to thread data array
Ndb* pMyNdb = NULL; // Pointer to Ndb object Ndb* pMyNdb = NULL; // Pointer to Ndb object
int tLoops = 0; int tLoops = 0;
......
...@@ -297,6 +297,7 @@ static int checkThreadResults(ThreadNdb *threadArrayP, char *action) ...@@ -297,6 +297,7 @@ static int checkThreadResults(ThreadNdb *threadArrayP, char *action)
NDB_COMMAND(flexScan, "flexScan", "flexScan", "flexScan", 65535) NDB_COMMAND(flexScan, "flexScan", "flexScan", "flexScan", 65535)
{ {
ndb_init();
ThreadNdb* pThreads = NULL; ThreadNdb* pThreads = NULL;
Ndb* pMyNdb = NULL; Ndb* pMyNdb = NULL;
int tLoops = 0; int tLoops = 0;
......
...@@ -171,6 +171,7 @@ tellThreads(StartType what) ...@@ -171,6 +171,7 @@ tellThreads(StartType what)
NDB_COMMAND(flexTT, "flexTT", "flexTT", "flexTT", 65535) NDB_COMMAND(flexTT, "flexTT", "flexTT", "flexTT", 65535)
{ {
ndb_init();
ThreadNdb* pThreadData; ThreadNdb* pThreadData;
int returnValue = NDBT_OK; int returnValue = NDBT_OK;
int i; int i;
......
...@@ -174,6 +174,7 @@ void deleteAttributeSpace(){ ...@@ -174,6 +174,7 @@ void deleteAttributeSpace(){
NDB_COMMAND(flexTimedAsynch, "flexTimedAsynch", "flexTimedAsynch [-tpoilcas]", "flexTimedAsynch", 65535) NDB_COMMAND(flexTimedAsynch, "flexTimedAsynch", "flexTimedAsynch [-tpoilcas]", "flexTimedAsynch", 65535)
{ {
ndb_init();
ThreadNdb tabThread[MAXTHREADS]; ThreadNdb tabThread[MAXTHREADS];
int tLoops=0; int tLoops=0;
int returnValue; int returnValue;
......
...@@ -308,6 +308,7 @@ tellThreads(ThreadData* pt, StartType what) ...@@ -308,6 +308,7 @@ tellThreads(ThreadData* pt, StartType what)
NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535)
{ {
ndb_init();
ThreadData* pThreadsData; ThreadData* pThreadsData;
int tLoops = 0; int tLoops = 0;
int returnValue = NDBT_OK; int returnValue = NDBT_OK;
......
...@@ -771,6 +771,7 @@ static void dropIndex(Ndb &myNdb, unsigned int noOfIndexes) ...@@ -771,6 +771,7 @@ static void dropIndex(Ndb &myNdb, unsigned int noOfIndexes)
NDB_COMMAND(indexTest, "indexTest", "indexTest", "indexTest", 65535) NDB_COMMAND(indexTest, "indexTest", "indexTest", "indexTest", 65535)
{ {
ndb_init();
bool createTableOp, createIndexOp, dropIndexOp, insertOp, updateOp, deleteOp, readOp, readIndexOp, updateIndexOp, deleteIndexOp, twoKey, longKey; bool createTableOp, createIndexOp, dropIndexOp, insertOp, updateOp, deleteOp, readOp, readIndexOp, updateIndexOp, deleteIndexOp, twoKey, longKey;
unsigned int noOfTuples = 1; unsigned int noOfTuples = 1;
unsigned int noOfOperations = 1; unsigned int noOfOperations = 1;
......
...@@ -608,6 +608,7 @@ static void dropIndex(Ndb &myNdb, unsigned int noOfIndexes) ...@@ -608,6 +608,7 @@ static void dropIndex(Ndb &myNdb, unsigned int noOfIndexes)
NDB_COMMAND(indexTest, "indexTest", "indexTest", "indexTest", 65535) NDB_COMMAND(indexTest, "indexTest", "indexTest", "indexTest", 65535)
{ {
ndb_init();
bool createTableOp, createIndexOp, dropIndexOp, insertOp, updateOp, deleteOp, readOp, readIndexOp, updateIndexOp, deleteIndexOp, twoKey, longKey; bool createTableOp, createIndexOp, dropIndexOp, insertOp, updateOp, deleteOp, readOp, readIndexOp, updateIndexOp, deleteIndexOp, twoKey, longKey;
unsigned int noOfTuples = 1; unsigned int noOfTuples = 1;
unsigned int noOfOperations = 1; unsigned int noOfOperations = 1;
......
...@@ -46,6 +46,7 @@ static char attrName[MAXATTR][MAXSTRLEN]; ...@@ -46,6 +46,7 @@ static char attrName[MAXATTR][MAXSTRLEN];
inline int InsertRecords(Ndb*, int) ; inline int InsertRecords(Ndb*, int) ;
NDB_COMMAND(initronja, "initronja", "initronja", "initronja", 65535){ NDB_COMMAND(initronja, "initronja", "initronja", "initronja", 65535){
ndb_init();
Ndb* pNdb = NULL ; Ndb* pNdb = NULL ;
NdbSchemaCon *MySchemaTransaction = NULL ; NdbSchemaCon *MySchemaTransaction = NULL ;
......
...@@ -105,6 +105,7 @@ int bTestPassed = 0; ...@@ -105,6 +105,7 @@ int bTestPassed = 0;
int main(int argc, const char** argv) { int main(int argc, const char** argv) {
ndb_init();
int operationType = 0; int operationType = 0;
int tupTest = 0; int tupTest = 0;
......
...@@ -282,6 +282,7 @@ threadRoutine(void *arg) ...@@ -282,6 +282,7 @@ threadRoutine(void *arg)
NDB_COMMAND(DbAsyncGenerator, "DbAsyncGenerator", NDB_COMMAND(DbAsyncGenerator, "DbAsyncGenerator",
"DbAsyncGenerator", "DbAsyncGenerator", 65535) "DbAsyncGenerator", "DbAsyncGenerator", 65535)
{ {
ndb_init();
int i; int i;
int j; int j;
int k; int k;
......
...@@ -971,6 +971,7 @@ void ShowHelp(const char* szCmd) ...@@ -971,6 +971,7 @@ void ShowHelp(const char* szCmd)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
ndb_init();
int iRes = -1; int iRes = -1;
g_nNumThreads = 0; g_nNumThreads = 0;
g_nMaxCallsPerSecond = 0; g_nMaxCallsPerSecond = 0;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <NDBT.hpp> #include <NDBT.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _hostName = NULL; const char* _hostName = NULL;
int _loops = 10; int _loops = 10;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <NDBT.hpp> #include <NDBT.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _hostName = NULL; const char* _hostName = NULL;
int _loops = 10; int _loops = 10;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <NDBT.hpp> #include <NDBT.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _restartName = NULL; const char* _restartName = NULL;
int _loops = 1; int _loops = 1;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
int main(void) int main(void)
{ {
ndb_init();
printf("cdrstruct=%d\n",sizeof(struct cdr_record)); printf("cdrstruct=%d\n",sizeof(struct cdr_record));
printf("long int=%d\n",sizeof(long int)); printf("long int=%d\n",sizeof(long int));
printf("int=%d\n",sizeof(int)); printf("int=%d\n",sizeof(int));
......
...@@ -36,6 +36,7 @@ static void lookup(); ...@@ -36,6 +36,7 @@ static void lookup();
int int
main(void){ main(void){
ndb_init();
Ndb g_ndb("test"); Ndb g_ndb("test");
g_ndb.init(1024); g_ndb.init(1024);
......
...@@ -473,6 +473,7 @@ TESTCASE("FailSlave", ...@@ -473,6 +473,7 @@ TESTCASE("FailSlave",
NDBT_TESTSUITE_END(testBackup); NDBT_TESTSUITE_END(testBackup);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testBackup.execute(argc, argv); return testBackup.execute(argc, argv);
} }
......
...@@ -1278,6 +1278,7 @@ TESTCASE("MassiveTransaction", ...@@ -1278,6 +1278,7 @@ TESTCASE("MassiveTransaction",
NDBT_TESTSUITE_END(testBasic); NDBT_TESTSUITE_END(testBasic);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testBasic.execute(argc, argv); return testBasic.execute(argc, argv);
} }
......
...@@ -181,6 +181,7 @@ TESTCASE("PkDeleteAsynch", ...@@ -181,6 +181,7 @@ TESTCASE("PkDeleteAsynch",
NDBT_TESTSUITE_END(testBasicAsynch); NDBT_TESTSUITE_END(testBasicAsynch);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testBasicAsynch.execute(argc, argv); return testBasicAsynch.execute(argc, argv);
} }
...@@ -1338,6 +1338,7 @@ static struct { ...@@ -1338,6 +1338,7 @@ static struct {
NDB_COMMAND(testOdbcDriver, "testBlobs", "testBlobs", "testBlobs", 65535) NDB_COMMAND(testOdbcDriver, "testBlobs", "testBlobs", "testBlobs", 65535)
{ {
ndb_init();
while (++argv, --argc > 0) { while (++argv, --argc > 0) {
const char* arg = argv[0]; const char* arg = argv[0];
if (strcmp(arg, "-batch") == 0) { if (strcmp(arg, "-batch") == 0) {
......
...@@ -545,6 +545,7 @@ testcase(int flag) ...@@ -545,6 +545,7 @@ testcase(int flag)
NDB_COMMAND(testDataBuffers, "testDataBuffers", "testDataBuffers", "testDataBuffers", 65535) NDB_COMMAND(testDataBuffers, "testDataBuffers", "testDataBuffers", "testDataBuffers", 65535)
{ {
ndb_init();
while (++argv, --argc > 0) { while (++argv, --argc > 0) {
char const* p = argv[0]; char const* p = argv[0];
if (*p++ != '-' || strlen(p) != 1) if (*p++ != '-' || strlen(p) != 1)
......
...@@ -491,6 +491,7 @@ wl1822_main(char scantx) ...@@ -491,6 +491,7 @@ wl1822_main(char scantx)
NDB_COMMAND(testOdbcDriver, "testDeadlock", "testDeadlock", "testDeadlock", 65535) NDB_COMMAND(testOdbcDriver, "testDeadlock", "testDeadlock", "testDeadlock", 65535)
{ {
ndb_init();
while (++argv, --argc > 0) { while (++argv, --argc > 0) {
const char* arg = argv[0]; const char* arg = argv[0];
if (strcmp(arg, "-scan") == 0) { if (strcmp(arg, "-scan") == 0) {
......
...@@ -1576,6 +1576,7 @@ TESTCASE("DictionaryPerf", ...@@ -1576,6 +1576,7 @@ TESTCASE("DictionaryPerf",
NDBT_TESTSUITE_END(testDict); NDBT_TESTSUITE_END(testDict);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
// Tables should not be auto created // Tables should not be auto created
testDict.setCreateTable(false); testDict.setCreateTable(false);
myRandom48Init(NdbTick_CurrentMillisecond()); myRandom48Init(NdbTick_CurrentMillisecond());
......
...@@ -533,6 +533,7 @@ TESTCASE("FailSlave", ...@@ -533,6 +533,7 @@ TESTCASE("FailSlave",
NDBT_TESTSUITE_END(testGrep); NDBT_TESTSUITE_END(testGrep);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testGrep.execute(argc, argv); return testGrep.execute(argc, argv);
} }
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
continue; } continue; }
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char * connectString = NULL; const char * connectString = NULL;
......
...@@ -1528,6 +1528,7 @@ TESTCASE("UniqueNull", ...@@ -1528,6 +1528,7 @@ TESTCASE("UniqueNull",
NDBT_TESTSUITE_END(testIndex); NDBT_TESTSUITE_END(testIndex);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testIndex.execute(argc, argv); return testIndex.execute(argc, argv);
} }
......
...@@ -224,6 +224,7 @@ TESTCASE("NdbErrorOperation", ...@@ -224,6 +224,7 @@ TESTCASE("NdbErrorOperation",
NDBT_TESTSUITE_END(testInterpreter); NDBT_TESTSUITE_END(testInterpreter);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
// TABLE("T1"); // TABLE("T1");
return testInterpreter.execute(argc, argv); return testInterpreter.execute(argc, argv);
} }
......
...@@ -178,6 +178,7 @@ TESTCASE("SingleUserMode", ...@@ -178,6 +178,7 @@ TESTCASE("SingleUserMode",
NDBT_TESTSUITE_END(testMgm); NDBT_TESTSUITE_END(testMgm);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
myRandom48Init(NdbTick_CurrentMillisecond()); myRandom48Init(NdbTick_CurrentMillisecond());
return testMgm.execute(argc, argv); return testMgm.execute(argc, argv);
} }
......
...@@ -1006,6 +1006,7 @@ TESTCASE("NdbErrorOperation", ...@@ -1006,6 +1006,7 @@ TESTCASE("NdbErrorOperation",
NDBT_TESTSUITE_END(testNdbApi); NDBT_TESTSUITE_END(testNdbApi);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
// TABLE("T1"); // TABLE("T1");
return testNdbApi.execute(argc, argv); return testNdbApi.execute(argc, argv);
} }
......
...@@ -434,6 +434,7 @@ TESTCASE("StopOnError", ...@@ -434,6 +434,7 @@ TESTCASE("StopOnError",
NDBT_TESTSUITE_END(testNodeRestart); NDBT_TESTSUITE_END(testNodeRestart);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
#if 0 #if 0
// It might be interesting to have longer defaults for num // It might be interesting to have longer defaults for num
// loops in this test // loops in this test
......
...@@ -3201,6 +3201,7 @@ runtest(Par par) ...@@ -3201,6 +3201,7 @@ runtest(Par par)
NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535) NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535)
{ {
ndb_init();
while (++argv, --argc > 0) { while (++argv, --argc > 0) {
const char* arg = argv[0]; const char* arg = argv[0];
if (*arg != '-') { if (*arg != '-') {
......
...@@ -230,6 +230,7 @@ runClearTable(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -230,6 +230,7 @@ runClearTable(NDBT_Context* ctx, NDBT_Step* step){
int int
main(int argc, const char** argv){ main(int argc, const char** argv){
ndb_init();
NDBT_TestSuite ts("testOperations"); NDBT_TestSuite ts("testOperations");
for(Uint32 i = 0; i<sizeof(matrix)/sizeof(matrix[0]); i++){ for(Uint32 i = 0; i<sizeof(matrix)/sizeof(matrix[0]); i++){
......
...@@ -218,6 +218,7 @@ NDBT_TESTSUITE_END(testOrderedIndex); ...@@ -218,6 +218,7 @@ NDBT_TESTSUITE_END(testOrderedIndex);
int int
main(int argc, const char** argv) main(int argc, const char** argv)
{ {
ndb_init();
return testOrderedIndex.execute(argc, argv); return testOrderedIndex.execute(argc, argv);
} }
......
...@@ -91,6 +91,7 @@ void print_result(); ...@@ -91,6 +91,7 @@ void print_result();
int int
main(int argc, const char** argv){ main(int argc, const char** argv){
ndb_init();
int verbose = 1; int verbose = 1;
int optind = 0; int optind = 0;
......
...@@ -214,6 +214,7 @@ TESTCASE("InsertRestartGci", ...@@ -214,6 +214,7 @@ TESTCASE("InsertRestartGci",
NDBT_TESTSUITE_END(testRestartGci); NDBT_TESTSUITE_END(testRestartGci);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testRestartGci.execute(argc, argv); return testRestartGci.execute(argc, argv);
} }
......
...@@ -1400,6 +1400,7 @@ TESTCASE("ScanRestart", ...@@ -1400,6 +1400,7 @@ TESTCASE("ScanRestart",
NDBT_TESTSUITE_END(testScan); NDBT_TESTSUITE_END(testScan);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
myRandom48Init(NdbTick_CurrentMillisecond()); myRandom48Init(NdbTick_CurrentMillisecond());
return testScan.execute(argc, argv); return testScan.execute(argc, argv);
} }
......
...@@ -273,6 +273,7 @@ TESTCASE("ScanLessThanLoop", ...@@ -273,6 +273,7 @@ TESTCASE("ScanLessThanLoop",
NDBT_TESTSUITE_END(testScanInterpreter); NDBT_TESTSUITE_END(testScanInterpreter);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testScanInterpreter.execute(argc, argv); return testScanInterpreter.execute(argc, argv);
} }
......
...@@ -72,6 +72,7 @@ int drop_table(); ...@@ -72,6 +72,7 @@ int drop_table();
int int
main(int argc, const char** argv){ main(int argc, const char** argv){
ndb_init();
int verbose = 1; int verbose = 1;
int optind = 0; int optind = 0;
......
...@@ -1179,6 +1179,7 @@ TESTCASE("SR8", ...@@ -1179,6 +1179,7 @@ TESTCASE("SR8",
NDBT_TESTSUITE_END(testSystemRestart); NDBT_TESTSUITE_END(testSystemRestart);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return testSystemRestart.execute(argc, argv); return testSystemRestart.execute(argc, argv);
} }
......
...@@ -406,6 +406,7 @@ TESTCASE("BuddyTransNoTimeout5", ...@@ -406,6 +406,7 @@ TESTCASE("BuddyTransNoTimeout5",
NDBT_TESTSUITE_END(testTimeout); NDBT_TESTSUITE_END(testTimeout);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
myRandom48Init(NdbTick_CurrentMillisecond()); myRandom48Init(NdbTick_CurrentMillisecond());
return testTimeout.execute(argc, argv); return testTimeout.execute(argc, argv);
} }
......
...@@ -364,6 +364,7 @@ runClearTable(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -364,6 +364,7 @@ runClearTable(NDBT_Context* ctx, NDBT_Step* step){
int int
main(int argc, const char** argv){ main(int argc, const char** argv){
ndb_init();
NDBT_TestSuite ts("testOperations"); NDBT_TestSuite ts("testOperations");
for(Uint32 i = 0; i<sizeof(matrix)/sizeof(matrix[0]); i++){ for(Uint32 i = 0; i<sizeof(matrix)/sizeof(matrix[0]); i++){
......
...@@ -137,6 +137,7 @@ NDBT_TESTSUITE_END(test_event); ...@@ -137,6 +137,7 @@ NDBT_TESTSUITE_END(test_event);
#endif #endif
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
return test_event.execute(argc, argv); return test_event.execute(argc, argv);
} }
...@@ -79,6 +79,7 @@ const int arg_count = 10; ...@@ -79,6 +79,7 @@ const int arg_count = 10;
int int
main(int argc, const char ** argv){ main(int argc, const char ** argv){
ndb_init();
bool restart = true; bool restart = true;
int lineno = 1; int lineno = 1;
......
...@@ -985,7 +985,6 @@ int NDBT_TestSuite::execute(int argc, const char** argv){ ...@@ -985,7 +985,6 @@ int NDBT_TestSuite::execute(int argc, const char** argv){
} }
#ifndef DBUG_OFF #ifndef DBUG_OFF
my_init();
if (debug_option) if (debug_option)
DBUG_PUSH(debug_option); DBUG_PUSH(debug_option);
#endif #endif
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <getarg.h> #include <getarg.h>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _tabname = NULL; const char* _tabname = NULL;
const char* _to_tabname = NULL; const char* _to_tabname = NULL;
......
...@@ -173,6 +173,7 @@ add_hosts(Vector<SimpleCpcClient*> & hosts, BaseString list){ ...@@ -173,6 +173,7 @@ add_hosts(Vector<SimpleCpcClient*> & hosts, BaseString list){
int int
main(int argc, const char** argv){ main(int argc, const char** argv){
ndb_init();
int help = 0; int help = 0;
const char *cmd=0, *name=0, *group=0, *owner=0; const char *cmd=0, *name=0, *group=0, *owner=0;
int list = 0, start = 0, stop = 0, rm = 0; int list = 0, start = 0, stop = 0, rm = 0;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
int int
main(int argc, const char** argv){ main(int argc, const char** argv){
ndb_init();
const char* _dbname = "TEST_DB"; const char* _dbname = "TEST_DB";
int _help = 0; int _help = 0;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
int main(int argc, const char** argv) int main(int argc, const char** argv)
{ {
ndb_init();
int _row = 0; int _row = 0;
int _column = 0; int _column = 0;
int _updates = 0; int _updates = 0;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
const char* _tabname = NULL; const char* _tabname = NULL;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
const char* _tabname = NULL; const char* _tabname = NULL;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <HugoTransactions.hpp> #include <HugoTransactions.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
int _loops = 1; int _loops = 1;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <HugoTransactions.hpp> #include <HugoTransactions.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
int _loops = 1; int _loops = 1;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
int _loops = 1; int _loops = 1;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
int main(int argc, const char** argv) int main(int argc, const char** argv)
{ {
ndb_init();
int _row = 0; int _row = 0;
int _hex = 0; int _hex = 0;
int _primaryKey = 0; int _primaryKey = 0;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <HugoTransactions.hpp> #include <HugoTransactions.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
int _loops = 1; int _loops = 1;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <HugoTransactions.hpp> #include <HugoTransactions.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
int _loops = 1; int _loops = 1;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <HugoTransactions.hpp> #include <HugoTransactions.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _records = 0; int _records = 0;
int _loops = 1; int _loops = 1;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <NDBT.hpp> #include <NDBT.hpp>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _hostName = NULL; const char* _hostName = NULL;
int _initial = 0; int _initial = 0;
......
...@@ -346,6 +346,7 @@ start() ...@@ -346,6 +346,7 @@ start()
int int
main(int av, char** ac) main(int av, char** ac)
{ {
ndb_init();
debug("start"); debug("start");
hostname = "ndb-srv7"; hostname = "ndb-srv7";
if (Ndb_getInAddr(&hostaddr.sin_addr, hostname) != 0) { if (Ndb_getInAddr(&hostaddr.sin_addr, hostname) != 0) {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
int _parallelism = 240; int _parallelism = 240;
const char* _tabname = NULL; const char* _tabname = NULL;
const char* _indexname = NULL; const char* _indexname = NULL;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
static int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab, int parallelism=240); static int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab, int parallelism=240);
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _tabname = NULL; const char* _tabname = NULL;
const char* _dbname = "TEST_DB"; const char* _dbname = "TEST_DB";
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _tabname = NULL; const char* _tabname = NULL;
const char* _dbname = "TEST_DB"; const char* _dbname = "TEST_DB";
int _unqualified = 0; int _unqualified = 0;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <getarg.h> #include <getarg.h>
int main(int argc, const char** argv){ int main(int argc, const char** argv){
ndb_init();
const char* _tabname = NULL; const char* _tabname = NULL;
const char* _dbname = "TEST_DB"; const char* _dbname = "TEST_DB";
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment