Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
This commit is contained in:
commit
6c4f9f5d96
@ -3114,7 +3114,6 @@ AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
|
|||||||
ndb/src/kernel/blocks/qmgr/Makefile dnl
|
ndb/src/kernel/blocks/qmgr/Makefile dnl
|
||||||
ndb/src/kernel/blocks/trix/Makefile dnl
|
ndb/src/kernel/blocks/trix/Makefile dnl
|
||||||
ndb/src/kernel/blocks/backup/Makefile dnl
|
ndb/src/kernel/blocks/backup/Makefile dnl
|
||||||
ndb/src/kernel/blocks/backup/restore/Makefile dnl
|
|
||||||
ndb/src/kernel/blocks/dbutil/Makefile dnl
|
ndb/src/kernel/blocks/dbutil/Makefile dnl
|
||||||
ndb/src/kernel/blocks/suma/Makefile dnl
|
ndb/src/kernel/blocks/suma/Makefile dnl
|
||||||
ndb/src/kernel/blocks/grep/Makefile dnl
|
ndb/src/kernel/blocks/grep/Makefile dnl
|
||||||
|
@ -11,4 +11,5 @@ INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
|
|||||||
-I$(top_srcdir)/ndb/include/util \
|
-I$(top_srcdir)/ndb/include/util \
|
||||||
-I$(top_srcdir)/ndb/include/portlib \
|
-I$(top_srcdir)/ndb/include/portlib \
|
||||||
-I$(top_srcdir)/ndb/test/include \
|
-I$(top_srcdir)/ndb/test/include \
|
||||||
-I$(top_srcdir)/ndb/include/mgmapi
|
-I$(top_srcdir)/ndb/include/mgmapi \
|
||||||
|
-I$(top_srcdir)/ndb/include/kernel
|
||||||
|
@ -11,8 +11,8 @@ libndbclient_la_LIBADD = \
|
|||||||
common/transporter/libtransporter.la \
|
common/transporter/libtransporter.la \
|
||||||
common/debugger/libtrace.la \
|
common/debugger/libtrace.la \
|
||||||
common/debugger/signaldata/libsignaldataprint.la \
|
common/debugger/signaldata/libsignaldataprint.la \
|
||||||
common/mgmcommon/libmgmsrvcommon.la \
|
|
||||||
mgmapi/libmgmapi.la \
|
mgmapi/libmgmapi.la \
|
||||||
|
common/mgmcommon/libmgmsrvcommon.la \
|
||||||
common/logger/liblogger.la \
|
common/logger/liblogger.la \
|
||||||
common/portlib/libportlib.la \
|
common/portlib/libportlib.la \
|
||||||
common/util/libgeneral.la
|
common/util/libgeneral.la
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
noinst_LTLIBRARIES = libmgmsrvcommon.la
|
noinst_LTLIBRARIES = libmgmsrvcommon.la
|
||||||
|
|
||||||
libmgmsrvcommon_la_SOURCES = \
|
libmgmsrvcommon_la_SOURCES = \
|
||||||
LocalConfig.cpp \
|
|
||||||
ConfigRetriever.cpp \
|
ConfigRetriever.cpp \
|
||||||
IPCConfig.cpp NdbConfig.c
|
IPCConfig.cpp
|
||||||
|
|
||||||
INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmapi -I$(top_srcdir)/ndb/src/mgmsrv
|
INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmapi -I$(top_srcdir)/ndb/src/mgmsrv
|
||||||
|
|
||||||
DEFS_LOC = -DNDB_PORT="\"@ndb_port@\""
|
|
||||||
|
|
||||||
include $(top_srcdir)/ndb/config/common.mk.am
|
include $(top_srcdir)/ndb/config/common.mk.am
|
||||||
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
|
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
|
||||||
include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
|
include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
|
||||||
|
@ -5,7 +5,8 @@ noinst_LTLIBRARIES = libportlib.la
|
|||||||
libportlib_la_SOURCES = \
|
libportlib_la_SOURCES = \
|
||||||
NdbCondition.c NdbMutex.c NdbSleep.c NdbTick.c \
|
NdbCondition.c NdbMutex.c NdbSleep.c NdbTick.c \
|
||||||
NdbEnv.c NdbThread.c NdbHost.c NdbTCP.cpp \
|
NdbEnv.c NdbThread.c NdbHost.c NdbTCP.cpp \
|
||||||
NdbDaemon.c NdbMem.c
|
NdbDaemon.c NdbMem.c \
|
||||||
|
NdbConfig.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
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
SUBDIRS = restore
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libbackup.a
|
noinst_LIBRARIES = libbackup.a
|
||||||
|
|
||||||
libbackup_a_SOURCES = Backup.cpp BackupInit.cpp
|
libbackup_a_SOURCES = Backup.cpp BackupInit.cpp
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#include "LocalConfig.hpp"
|
#include <LocalConfig.hpp>
|
||||||
#include <NdbEnv.h>
|
#include <NdbEnv.h>
|
||||||
#include <NdbConfig.h>
|
#include <NdbConfig.h>
|
||||||
#include <NdbAutoPtr.hpp>
|
#include <NdbAutoPtr.hpp>
|
||||||
@ -164,17 +164,25 @@ LocalConfig::parseNodeId(const char * buf){
|
|||||||
bool
|
bool
|
||||||
LocalConfig::parseHostName(const char * buf){
|
LocalConfig::parseHostName(const char * buf){
|
||||||
char tempString[1024];
|
char tempString[1024];
|
||||||
|
char tempString2[1024];
|
||||||
int port;
|
int port;
|
||||||
for(int i = 0; hostNameTokens[i] != 0; i++) {
|
do {
|
||||||
if (sscanf(buf, hostNameTokens[i], tempString, &port) == 2) {
|
for(int i = 0; hostNameTokens[i] != 0; i++) {
|
||||||
MgmtSrvrId mgmtSrvrId;
|
if (sscanf(buf, hostNameTokens[i], tempString, &port) == 2) {
|
||||||
mgmtSrvrId.type = MgmId_TCP;
|
MgmtSrvrId mgmtSrvrId;
|
||||||
mgmtSrvrId.name.assign(tempString);
|
mgmtSrvrId.type = MgmId_TCP;
|
||||||
mgmtSrvrId.port = port;
|
mgmtSrvrId.name.assign(tempString);
|
||||||
ids.push_back(mgmtSrvrId);
|
mgmtSrvrId.port = port;
|
||||||
return true;
|
ids.push_back(mgmtSrvrId);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (buf == tempString2)
|
||||||
|
break;
|
||||||
|
// try to add default port to see if it works
|
||||||
|
snprintf(tempString2, sizeof(tempString2),"%s:%s", buf, NDB_PORT);
|
||||||
|
buf= tempString2;
|
||||||
|
} while(1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,11 @@
|
|||||||
|
|
||||||
noinst_LTLIBRARIES = libmgmapi.la
|
noinst_LTLIBRARIES = libmgmapi.la
|
||||||
|
|
||||||
libmgmapi_la_SOURCES = mgmapi.cpp mgmapi_configuration.cpp
|
libmgmapi_la_SOURCES = mgmapi.cpp mgmapi_configuration.cpp LocalConfig.cpp
|
||||||
|
|
||||||
INCLUDES_LOC = -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/common/mgmcommon
|
INCLUDES_LOC = -I$(top_srcdir)/ndb/include/mgmapi
|
||||||
DEFS_LOC = -DNO_DEBUG_MESSAGES
|
|
||||||
|
DEFS_LOC = -DNO_DEBUG_MESSAGES -DNDB_PORT="\"@ndb_port@\""
|
||||||
|
|
||||||
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
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <ndb_global.h>
|
#include <ndb_global.h>
|
||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
|
|
||||||
|
#include <LocalConfig.hpp>
|
||||||
#include <NdbAutoPtr.hpp>
|
#include <NdbAutoPtr.hpp>
|
||||||
|
|
||||||
#include <NdbTCP.h>
|
#include <NdbTCP.h>
|
||||||
@ -94,6 +95,8 @@ struct ndb_mgm_handle {
|
|||||||
|
|
||||||
NDB_SOCKET_TYPE socket;
|
NDB_SOCKET_TYPE socket;
|
||||||
|
|
||||||
|
char cfg_ptr[sizeof(LocalConfig)];
|
||||||
|
|
||||||
#ifdef MGMAPI_LOG
|
#ifdef MGMAPI_LOG
|
||||||
FILE* logfile;
|
FILE* logfile;
|
||||||
#endif
|
#endif
|
||||||
@ -146,10 +149,12 @@ ndb_mgm_create_handle()
|
|||||||
h->last_error = 0;
|
h->last_error = 0;
|
||||||
h->last_error_line = 0;
|
h->last_error_line = 0;
|
||||||
h->hostname = 0;
|
h->hostname = 0;
|
||||||
h->socket = -1;
|
h->socket = NDB_INVALID_SOCKET;
|
||||||
h->read_timeout = 50000;
|
h->read_timeout = 50000;
|
||||||
h->write_timeout = 100;
|
h->write_timeout = 100;
|
||||||
|
|
||||||
|
new (h->cfg_ptr) LocalConfig;
|
||||||
|
|
||||||
strncpy(h->last_error_desc, "No error", NDB_MGM_MAX_ERR_DESC_SIZE);
|
strncpy(h->last_error_desc, "No error", NDB_MGM_MAX_ERR_DESC_SIZE);
|
||||||
#ifdef MGMAPI_LOG
|
#ifdef MGMAPI_LOG
|
||||||
h->logfile = 0;
|
h->logfile = 0;
|
||||||
@ -177,6 +182,7 @@ ndb_mgm_destroy_handle(NdbMgmHandle * handle)
|
|||||||
(* handle)->logfile = 0;
|
(* handle)->logfile = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
((LocalConfig*)((*handle)->cfg_ptr))->~LocalConfig();
|
||||||
my_free((char*)* handle,MYF(MY_ALLOW_ZERO_PTR));
|
my_free((char*)* handle,MYF(MY_ALLOW_ZERO_PTR));
|
||||||
* handle = 0;
|
* handle = 0;
|
||||||
}
|
}
|
||||||
@ -220,42 +226,6 @@ ndb_mgm_get_latest_error_msg(const NdbMgmHandle h)
|
|||||||
return "Error"; // Unknown Error message
|
return "Error"; // Unknown Error message
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
int
|
|
||||||
parse_connect_string(const char * connect_string,
|
|
||||||
NdbMgmHandle handle)
|
|
||||||
{
|
|
||||||
if(connect_string == 0){
|
|
||||||
SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, "");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char * line = my_strdup(connect_string,MYF(MY_WME));
|
|
||||||
My_auto_ptr<char> ap1(line);
|
|
||||||
if(line == 0){
|
|
||||||
SET_ERROR(handle, NDB_MGM_OUT_OF_MEMORY, "");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char * tmp = strchr(line, ':');
|
|
||||||
if(tmp == 0){
|
|
||||||
SET_ERROR(handle, NDB_MGM_OUT_OF_MEMORY, "");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
* tmp = 0; tmp++;
|
|
||||||
|
|
||||||
int port = 0;
|
|
||||||
if(sscanf(tmp, "%d", &port) != 1){
|
|
||||||
SET_ERROR(handle, NDB_MGM_ILLEGAL_PORT_NUMBER, "");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
my_free(handle->hostname,MYF(MY_ALLOW_ZERO_PTR));
|
|
||||||
handle->hostname = my_strdup(line,MYF(MY_WME));
|
|
||||||
handle->port = port;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call an operation, and return the reply
|
* Call an operation, and return the reply
|
||||||
*/
|
*/
|
||||||
@ -349,11 +319,6 @@ ndb_mgm_connect(NdbMgmHandle handle, const char * mgmsrv)
|
|||||||
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_connect");
|
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_connect");
|
||||||
CHECK_HANDLE(handle, -1);
|
CHECK_HANDLE(handle, -1);
|
||||||
|
|
||||||
if(parse_connect_string(mgmsrv, handle) != 0) {
|
|
||||||
SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, "");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef MGMAPI_LOG
|
#ifdef MGMAPI_LOG
|
||||||
/**
|
/**
|
||||||
* Open the log file
|
* Open the log file
|
||||||
@ -366,14 +331,37 @@ ndb_mgm_connect(NdbMgmHandle handle, const char * mgmsrv)
|
|||||||
/**
|
/**
|
||||||
* Do connect
|
* Do connect
|
||||||
*/
|
*/
|
||||||
SocketClient s(handle->hostname, handle->port);
|
LocalConfig *cfg= (LocalConfig*)(handle->cfg_ptr);
|
||||||
const NDB_SOCKET_TYPE sockfd = s.connect();
|
new (cfg) LocalConfig;
|
||||||
if (sockfd < 0) {
|
if (!cfg->init(mgmsrv, 0) ||
|
||||||
setError(handle, NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET, __LINE__,
|
cfg->ids.size() == 0)
|
||||||
"Unable to connect to %s", mgmsrv);
|
{
|
||||||
|
SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, "");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NDB_SOCKET_TYPE sockfd= NDB_INVALID_SOCKET;
|
||||||
|
Uint32 i;
|
||||||
|
for (i = 0; i < cfg->ids.size(); i++)
|
||||||
|
{
|
||||||
|
if (cfg->ids[i].type != MgmId_TCP)
|
||||||
|
continue;
|
||||||
|
SocketClient s(cfg->ids[i].name.c_str(), cfg->ids[i].port);
|
||||||
|
sockfd = s.connect();
|
||||||
|
if (sockfd != NDB_INVALID_SOCKET)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (sockfd == NDB_INVALID_SOCKET)
|
||||||
|
{
|
||||||
|
setError(handle, NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET, __LINE__,
|
||||||
|
"Unable to connect using connectstring %s", mgmsrv);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
my_free(handle->hostname,MYF(MY_ALLOW_ZERO_PTR));
|
||||||
|
handle->hostname = my_strdup(cfg->ids[i].name.c_str(),MYF(MY_WME));
|
||||||
|
handle->port = cfg->ids[i].port;
|
||||||
|
|
||||||
handle->socket = sockfd;
|
handle->socket = sockfd;
|
||||||
handle->connected = 1;
|
handle->connected = 1;
|
||||||
|
|
||||||
@ -392,7 +380,7 @@ ndb_mgm_disconnect(NdbMgmHandle handle)
|
|||||||
CHECK_CONNECTED(handle, -1);
|
CHECK_CONNECTED(handle, -1);
|
||||||
|
|
||||||
NDB_CLOSE_SOCKET(handle->socket);
|
NDB_CLOSE_SOCKET(handle->socket);
|
||||||
handle->socket = -1;
|
handle->socket = NDB_INVALID_SOCKET;
|
||||||
handle->connected = 0;
|
handle->connected = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -384,8 +384,10 @@ CommandInterpreter::CommandInterpreter(const char *_host)
|
|||||||
|
|
||||||
connected = false;
|
connected = false;
|
||||||
try_reconnect = 0;
|
try_reconnect = 0;
|
||||||
|
if (_host)
|
||||||
host = my_strdup(_host,MYF(MY_WME));
|
host= my_strdup(_host,MYF(MY_WME));
|
||||||
|
else
|
||||||
|
host= 0;
|
||||||
#ifdef HAVE_GLOBAL_REPLICATION
|
#ifdef HAVE_GLOBAL_REPLICATION
|
||||||
rep_host = NULL;
|
rep_host = NULL;
|
||||||
m_repserver = NULL;
|
m_repserver = NULL;
|
||||||
@ -400,7 +402,7 @@ CommandInterpreter::~CommandInterpreter()
|
|||||||
{
|
{
|
||||||
connected = false;
|
connected = false;
|
||||||
ndb_mgm_destroy_handle(&m_mgmsrv);
|
ndb_mgm_destroy_handle(&m_mgmsrv);
|
||||||
my_free((char *)host,MYF(0));
|
my_free((char *)host,MYF(MY_ALLOW_ZERO_PTR));
|
||||||
host = NULL;
|
host = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,17 +3,24 @@ noinst_LTLIBRARIES = libndbmgmclient.la
|
|||||||
ndbtools_PROGRAMS = ndb_mgm
|
ndbtools_PROGRAMS = ndb_mgm
|
||||||
|
|
||||||
libndbmgmclient_la_SOURCES = CommandInterpreter.cpp
|
libndbmgmclient_la_SOURCES = CommandInterpreter.cpp
|
||||||
|
libndbmgmclient_la_LIBADD = ../mgmapi/libmgmapi.la \
|
||||||
|
../common/logger/liblogger.la \
|
||||||
|
../common/portlib/libportlib.la \
|
||||||
|
../common/util/libgeneral.la \
|
||||||
|
../common/portlib/libportlib.la
|
||||||
|
|
||||||
|
|
||||||
ndb_mgm_SOURCES = main.cpp
|
ndb_mgm_SOURCES = main.cpp
|
||||||
|
|
||||||
include $(top_srcdir)/ndb/config/common.mk.am
|
include $(top_srcdir)/ndb/config/common.mk.am
|
||||||
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
|
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
|
||||||
|
|
||||||
INCLUDES += -I$(top_srcdir)/ndb/include/mgmapi -I$(top_srcdir)/ndb/src/common/mgmcommon
|
INCLUDES += -I$(top_srcdir)/ndb/include/mgmapi \
|
||||||
|
-I$(top_srcdir)/ndb/src/common/mgmcommon
|
||||||
|
|
||||||
LDADD_LOC = $(noinst_LTLIBRARIES) \
|
LDADD_LOC = $(noinst_LTLIBRARIES) \
|
||||||
|
../common/portlib/libportlib.la \
|
||||||
@readline_link@ \
|
@readline_link@ \
|
||||||
$(top_builddir)/ndb/src/libndbclient.la \
|
|
||||||
$(top_builddir)/dbug/libdbug.a \
|
$(top_builddir)/dbug/libdbug.a \
|
||||||
$(top_builddir)/mysys/libmysys.a \
|
$(top_builddir)/mysys/libmysys.a \
|
||||||
$(top_builddir)/strings/libmystrings.a \
|
$(top_builddir)/strings/libmystrings.a \
|
||||||
|
@ -145,33 +145,21 @@ int main(int argc, char** argv){
|
|||||||
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
|
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
|
||||||
exit(ho_error);
|
exit(ho_error);
|
||||||
|
|
||||||
LocalConfig cfg;
|
char buf[MAXHOSTNAMELEN+10];
|
||||||
|
if(argc == 1) {
|
||||||
if(argc >= 1) {
|
BaseString::snprintf(buf, sizeof(buf), "%s", argv[0]);
|
||||||
_host = argv[0];
|
opt_connect_str= buf;
|
||||||
if(argc >= 2) {
|
} else if (argc >= 2) {
|
||||||
_port = atoi(argv[1]);
|
BaseString::snprintf(buf, sizeof(buf), "%s:%s", argv[0], argv[1]);
|
||||||
}
|
opt_connect_str= buf;
|
||||||
} else {
|
|
||||||
if(cfg.init(opt_connect_str, 0) && cfg.ids.size() > 0 && cfg.ids[0].type == MgmId_TCP){
|
|
||||||
_host = cfg.ids[0].name.c_str();
|
|
||||||
_port = cfg.ids[0].port;
|
|
||||||
} else {
|
|
||||||
cfg.printError();
|
|
||||||
cfg.printUsage();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char buf[MAXHOSTNAMELEN+10];
|
|
||||||
BaseString::snprintf(buf, sizeof(buf), "%s:%d", _host, _port);
|
|
||||||
|
|
||||||
ndbout << "-- NDB Cluster -- Management Client --" << endl;
|
ndbout << "-- NDB Cluster -- Management Client --" << endl;
|
||||||
printf("Connecting to Management Server: %s\n", buf);
|
printf("Connecting to Management Server: %s\n", opt_connect_str ? opt_connect_str : "default");
|
||||||
|
|
||||||
signal(SIGPIPE, handler);
|
signal(SIGPIPE, handler);
|
||||||
|
|
||||||
com = new Ndb_mgmclient(buf);
|
com = new Ndb_mgmclient(opt_connect_str);
|
||||||
while(read_and_execute(_try_reconnect));
|
while(read_and_execute(_try_reconnect));
|
||||||
delete com;
|
delete com;
|
||||||
|
|
||||||
|
@ -8,9 +8,12 @@ ndbtools_PROGRAMS = \
|
|||||||
ndb_drop_index \
|
ndb_drop_index \
|
||||||
ndb_show_tables \
|
ndb_show_tables \
|
||||||
ndb_select_all \
|
ndb_select_all \
|
||||||
ndb_select_count
|
ndb_select_count \
|
||||||
|
ndb_restore
|
||||||
|
|
||||||
tools_common_sources = ../test/src/NDBT_ReturnCodes.cpp ../test/src/NDBT_Table.cpp ../test/src/NDBT_Output.cpp
|
tools_common_sources = ../test/src/NDBT_ReturnCodes.cpp \
|
||||||
|
../test/src/NDBT_Table.cpp \
|
||||||
|
../test/src/NDBT_Output.cpp
|
||||||
|
|
||||||
ndb_test_platform_SOURCES = ndb_test_platform.cpp
|
ndb_test_platform_SOURCES = ndb_test_platform.cpp
|
||||||
ndb_waiter_SOURCES = waiter.cpp $(tools_common_sources)
|
ndb_waiter_SOURCES = waiter.cpp $(tools_common_sources)
|
||||||
@ -19,8 +22,15 @@ ndb_desc_SOURCES = desc.cpp $(tools_common_sources)
|
|||||||
ndb_drop_index_SOURCES = drop_index.cpp $(tools_common_sources)
|
ndb_drop_index_SOURCES = drop_index.cpp $(tools_common_sources)
|
||||||
ndb_drop_table_SOURCES = drop_tab.cpp $(tools_common_sources)
|
ndb_drop_table_SOURCES = drop_tab.cpp $(tools_common_sources)
|
||||||
ndb_show_tables_SOURCES = listTables.cpp $(tools_common_sources)
|
ndb_show_tables_SOURCES = listTables.cpp $(tools_common_sources)
|
||||||
ndb_select_all_SOURCES = select_all.cpp ../test/src/NDBT_ResultRow.cpp $(tools_common_sources)
|
ndb_select_all_SOURCES = select_all.cpp \
|
||||||
|
../test/src/NDBT_ResultRow.cpp \
|
||||||
|
$(tools_common_sources)
|
||||||
ndb_select_count_SOURCES = select_count.cpp $(tools_common_sources)
|
ndb_select_count_SOURCES = select_count.cpp $(tools_common_sources)
|
||||||
|
ndb_restore_SOURCES = restore/main.cpp \
|
||||||
|
restore/consumer.cpp \
|
||||||
|
restore/consumer_restore.cpp \
|
||||||
|
restore/consumer_printer.cpp \
|
||||||
|
restore/Restore.cpp
|
||||||
|
|
||||||
include $(top_srcdir)/ndb/config/common.mk.am
|
include $(top_srcdir)/ndb/config/common.mk.am
|
||||||
include $(top_srcdir)/ndb/config/type_ndbapitools.mk.am
|
include $(top_srcdir)/ndb/config/type_ndbapitools.mk.am
|
||||||
@ -34,6 +44,7 @@ ndb_drop_index_LDFLAGS = @ndb_bin_am_ldflags@
|
|||||||
ndb_show_tables_LDFLAGS = @ndb_bin_am_ldflags@
|
ndb_show_tables_LDFLAGS = @ndb_bin_am_ldflags@
|
||||||
ndb_select_all_LDFLAGS = @ndb_bin_am_ldflags@
|
ndb_select_all_LDFLAGS = @ndb_bin_am_ldflags@
|
||||||
ndb_select_count_LDFLAGS = @ndb_bin_am_ldflags@
|
ndb_select_count_LDFLAGS = @ndb_bin_am_ldflags@
|
||||||
|
ndb_restore_LDFLAGS = @ndb_bin_am_ldflags@
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#include "Restore.hpp"
|
#include "Restore.hpp"
|
||||||
#include "BackupFormat.hpp"
|
|
||||||
#include <NdbTCP.h>
|
#include <NdbTCP.h>
|
||||||
#include <OutputStream.hpp>
|
#include <OutputStream.hpp>
|
||||||
#include <Bitmask.hpp>
|
#include <Bitmask.hpp>
|
||||||
@ -25,9 +24,6 @@
|
|||||||
#include <SimpleProperties.hpp>
|
#include <SimpleProperties.hpp>
|
||||||
#include <signaldata/DictTabInfo.hpp>
|
#include <signaldata/DictTabInfo.hpp>
|
||||||
|
|
||||||
// from src/ndbapi
|
|
||||||
#include <NdbDictionaryImpl.hpp>
|
|
||||||
|
|
||||||
Uint16 Twiddle16(Uint16 in); // Byte shift 16-bit data
|
Uint16 Twiddle16(Uint16 in); // Byte shift 16-bit data
|
||||||
Uint32 Twiddle32(Uint32 in); // Byte shift 32-bit data
|
Uint32 Twiddle32(Uint32 in); // Byte shift 32-bit data
|
||||||
Uint64 Twiddle64(Uint64 in); // Byte shift 64-bit data
|
Uint64 Twiddle64(Uint64 in); // Byte shift 64-bit data
|
@ -19,7 +19,8 @@
|
|||||||
|
|
||||||
#include <ndb_global.h>
|
#include <ndb_global.h>
|
||||||
#include <NdbOut.hpp>
|
#include <NdbOut.hpp>
|
||||||
#include <BackupFormat.hpp>
|
#include "../src/kernel/blocks/backup/BackupFormat.hpp"
|
||||||
|
#include "../src/ndbapi/NdbDictionaryImpl.hpp"
|
||||||
#include <NdbApi.hpp>
|
#include <NdbApi.hpp>
|
||||||
|
|
||||||
#include <ndb_version.h>
|
#include <ndb_version.h>
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "consumer_restore.hpp"
|
#include "consumer_restore.hpp"
|
||||||
#include <NdbSleep.h>
|
#include <NdbSleep.h>
|
||||||
#include <NdbDictionaryImpl.hpp>
|
|
||||||
|
|
||||||
extern FilteredNdbOut err;
|
extern FilteredNdbOut err;
|
||||||
extern FilteredNdbOut info;
|
extern FilteredNdbOut info;
|
@ -23,12 +23,13 @@
|
|||||||
#include <NdbOut.hpp>
|
#include <NdbOut.hpp>
|
||||||
#include <NdbSleep.h>
|
#include <NdbSleep.h>
|
||||||
#include <kernel/ndb_limits.h>
|
#include <kernel/ndb_limits.h>
|
||||||
#include "../include/mgmcommon/LocalConfig.hpp"
|
#include <LocalConfig.hpp>
|
||||||
|
|
||||||
#include <NDBT.hpp>
|
#include <NDBT.hpp>
|
||||||
|
|
||||||
int
|
int
|
||||||
waitClusterStatus(const char* _addr, ndb_mgm_node_status _status, unsigned int _timeout);
|
waitClusterStatus(const char* _addr, ndb_mgm_node_status _status,
|
||||||
|
unsigned int _timeout);
|
||||||
|
|
||||||
static const char* opt_connect_str= 0;
|
static const char* opt_connect_str= 0;
|
||||||
static int _no_contact = 0;
|
static int _no_contact = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user