ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Auto merged
ndb/src/ndbapi/NdbReceiver.cpp:
  Auto merged
ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
ndb/src/ndbapi/TransporterFacade.hpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  SCCS merged
This commit is contained in:
unknown 2004-09-02 12:11:46 +00:00
commit 0a6dda5518
27 changed files with 561 additions and 254 deletions

View file

@ -16,6 +16,7 @@ ndbapi/NdbError.hpp \
ndbapi/NdbEventOperation.hpp \
ndbapi/NdbIndexOperation.hpp \
ndbapi/NdbOperation.hpp \
ndbapi/ndb_cluster_connection.hpp \
ndbapi/NdbBlob.hpp \
ndbapi/NdbPool.hpp \
ndbapi/NdbRecAttr.hpp \

View file

@ -37,7 +37,7 @@ public:
*/
int init();
int do_connect();
int do_connect(int exit_on_connect_failure= false);
/**
* Get configuration for current (nodeId given in local config file) node.

View file

@ -21,6 +21,7 @@
extern "C" {
#endif
const char* NdbConfig_get_path(int *len);
void NdbConfig_SetPath(const char *path);
char* NdbConfig_NdbCfgName(int with_ndb_home);
char* NdbConfig_ErrorFileName(int node_id);

View file

@ -860,6 +860,7 @@
#include <ndb_types.h>
#include <ndbapi_limits.h>
#include <ndb_cluster_connection.hpp>
#include <NdbError.hpp>
#include <NdbDictionary.hpp>
@ -992,6 +993,8 @@ public:
* deprecated.
*/
Ndb(const char* aCatalogName = "", const char* aSchemaName = "def");
Ndb(Ndb_cluster_connection *ndb_cluster_connection,
const char* aCatalogName = "", const char* aSchemaName = "def");
~Ndb();
@ -1081,7 +1084,10 @@ public:
* @return 0: Ndb is ready and timeout has not occurred.<br>
* -1: Timeout has expired
*/
int waitUntilReady(int timeout = 60);
void connected(Uint32 block_reference);
/** @} *********************************************************************/
@ -1447,6 +1453,9 @@ public:
****************************************************************************/
private:
void setup(Ndb_cluster_connection *ndb_cluster_connection,
const char* aCatalogName, const char* aSchemaName);
NdbConnection* startTransactionLocal(Uint32 aPrio, Uint32 aFragmentId);
// Connect the connection object to the Database.
@ -1585,6 +1594,7 @@ private:
* These are the private variables in this class.
*****************************************************************************/
NdbObjectIdMap* theNdbObjectIdMap;
Ndb_cluster_connection *m_ndb_cluster_connection;
NdbConnection** thePreparedTransactionsArray;
NdbConnection** theSentTransactionsArray;
@ -1703,7 +1713,7 @@ private:
static void executeMessage(void*, NdbApiSignal *,
struct LinearSectionPtr ptr[3]);
static void statusMessage(void*, Uint16, bool, bool);
static void statusMessage(void*, Uint32, bool, bool);
#ifdef VM_TRACE
void printState(const char* fmt, ...);
#endif

View file

@ -0,0 +1,45 @@
/* 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 */
#ifndef CLUSTER_CONNECTION_HPP
#define CLUSTER_CONNECTION_HPP
class TransporterFacade;
class ConfigRetriever;
class NdbThread;
extern "C" {
void* run_ndb_cluster_connection_connect_thread(void*);
}
class Ndb_cluster_connection {
public:
Ndb_cluster_connection(const char * connect_string = 0);
~Ndb_cluster_connection();
int connect(int reconnect= 0);
int start_connect_thread(int (*connect_callback)(void)= 0);
private:
friend void* run_ndb_cluster_connection_connect_thread(void*);
void connect_thread();
char *m_connect_string;
TransporterFacade *m_facade;
ConfigRetriever *m_config_retriever;
NdbThread *m_connect_thread;
int (*m_connect_callback)(void);
};
#endif