mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
ndb:
add optional reporting of of a "name" tied to a nodeid in the cluster log reporting added for mysql server and ndb_restore
This commit is contained in:
parent
b2b4e18f7b
commit
12de2b7a8f
9 changed files with 84 additions and 4 deletions
|
|
@ -27,6 +27,8 @@ extern FilteredNdbOut debug;
|
|||
static void callback(int, NdbTransaction*, void*);
|
||||
|
||||
extern const char * g_connect_string;
|
||||
extern BaseString g_options;
|
||||
|
||||
bool
|
||||
BackupRestore::init()
|
||||
{
|
||||
|
|
@ -36,6 +38,7 @@ BackupRestore::init()
|
|||
return true;
|
||||
|
||||
m_cluster_connection = new Ndb_cluster_connection(g_connect_string);
|
||||
m_cluster_connection->set_name(g_options.c_str());
|
||||
if(m_cluster_connection->connect(12, 5, 1) != 0)
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ static int _print_data = 0;
|
|||
static int _print_log = 0;
|
||||
static int _restore_data = 0;
|
||||
static int _restore_meta = 0;
|
||||
|
||||
BaseString g_options("ndb_restore");
|
||||
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
NDB_STD_OPTS("ndb_restore"),
|
||||
|
|
@ -249,6 +250,14 @@ main(int argc, char** argv)
|
|||
exitHandler(NDBT_FAILED);
|
||||
}
|
||||
|
||||
g_options.appfmt(" -b %d", ga_backupId);
|
||||
g_options.appfmt(" -n %d", ga_nodeId);
|
||||
if (_restore_meta)
|
||||
g_options.appfmt(" -m");
|
||||
if (_restore_data)
|
||||
g_options.appfmt(" -r");
|
||||
g_options.appfmt(" -p %d", ga_nParallelism);
|
||||
|
||||
g_connect_string = opt_connect_str;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue