Commit d5072ac1 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0

parents 3357d89b 293539ca
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -36,8 +36,16 @@
#define MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8)  | ((C) << 0))

#define NDB_VERSION_D MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR, NDB_VERSION_BUILD)

#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS))
#define NDB_VERSION_STRING_BUF_SZ 100
#ifdef __cplusplus
extern "C"
#else
extern
#endif
char ndb_version_string_buf[NDB_VERSION_STRING_BUF_SZ];
#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS, \
                                             ndb_version_string_buf, \
                                             sizeof(ndb_version_string_buf)))

#define NDB_VERSION ndbGetOwnVersion()

+9 −3
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
#define NDB_NONBLOCK FNDELAY
#define NDB_SOCKET_TYPE int
#define NDB_INVALID_SOCKET -1
#define NDB_CLOSE_SOCKET(x) close(x)
#define _NDB_CLOSE_SOCKET(x) close(x)

/**
 * socklen_t not defined in the header files of OSE 
@@ -52,7 +52,7 @@ typedef int socklen_t;
#define EWOULDBLOCK WSAEWOULDBLOCK
#define NDB_SOCKET_TYPE SOCKET
#define NDB_INVALID_SOCKET INVALID_SOCKET
#define NDB_CLOSE_SOCKET(x) closesocket(x)
#define _NDB_CLOSE_SOCKET(x) closesocket(x)

#else

@@ -64,7 +64,7 @@ typedef int socklen_t;
#define NDB_NONBLOCK O_NONBLOCK
#define NDB_SOCKET_TYPE int
#define NDB_INVALID_SOCKET -1
#define NDB_CLOSE_SOCKET(x) ::close(x)
#define _NDB_CLOSE_SOCKET(x) ::close(x)

#define InetErrno errno

@@ -89,6 +89,12 @@ extern "C" {
 */
int Ndb_getInAddr(struct in_addr * dst, const char *address);

#ifdef DBUG_OFF
#define NDB_CLOSE_SOCKET(fd) _NDB_CLOSE_SOCKET(fd)
#else
int NDB_CLOSE_SOCKET(int fd);
#endif

#ifdef	__cplusplus
}
#endif
+7 −1
Original line number Diff line number Diff line
@@ -41,7 +41,13 @@ public:
  protected:
    friend class SocketServer;
    friend void* sessionThread_C(void*);
    Session(NDB_SOCKET_TYPE sock): m_socket(sock){ m_stop = m_stopped = false;}
    Session(NDB_SOCKET_TYPE sock): m_socket(sock)
      {
	DBUG_ENTER("SocketServer::Session");
	DBUG_PRINT("enter",("NDB_SOCKET: %d", m_socket));
	m_stop = m_stopped = false;
	DBUG_VOID_RETURN;
      }
    
    bool m_stop;    // Has the session been ordered to stop?
    bool m_stopped; // Has the session stopped?
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
my_bool	opt_ndb_optimized_node_selection

int opt_ndb_nodeid;
bool opt_endinfo= 0;
my_bool opt_ndb_shm;
const char *opt_ndb_connectstring= 0;
const char *opt_connect_str= 0;
@@ -119,6 +120,7 @@ ndb_std_get_one_option(int optid,
    {
      DBUG_PUSH("d:t");
    }
    opt_endinfo= 1;
    break;
#endif
  case 'V':
+2 −1
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ extern "C" {

  Uint32 makeVersion(Uint32 major, Uint32 minor, Uint32 build);

  const char* getVersionString(Uint32 version, const char * status);
  const char* getVersionString(Uint32 version, const char * status,
			       char *buf, unsigned sz);
  
  void ndbPrintVersion();
  Uint32 ndbGetOwnVersion();
Loading