summaryrefslogtreecommitdiff
path: root/ndb/tools
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/tools')
-rw-r--r--ndb/tools/delete_all.cpp2
-rw-r--r--ndb/tools/desc.cpp2
-rw-r--r--ndb/tools/drop_index.cpp2
-rw-r--r--ndb/tools/drop_tab.cpp2
-rw-r--r--ndb/tools/listTables.cpp2
-rw-r--r--ndb/tools/ndb_config.cpp13
-rw-r--r--ndb/tools/restore/Restore.hpp3
-rw-r--r--ndb/tools/restore/consumer.hpp1
-rw-r--r--ndb/tools/restore/restore_main.cpp12
-rw-r--r--ndb/tools/select_all.cpp4
-rw-r--r--ndb/tools/select_count.cpp2
11 files changed, 33 insertions, 12 deletions
diff --git a/ndb/tools/delete_all.cpp b/ndb/tools/delete_all.cpp
index 6b50d850d3f..ae380560e35 100644
--- a/ndb/tools/delete_all.cpp
+++ b/ndb/tools/delete_all.cpp
@@ -43,9 +43,11 @@ static struct my_option my_long_options[] =
};
static void usage()
{
+#ifdef NOT_USED
char desc[] =
"tabname\n"\
"This program will delete all records in the specified table using scan delete.\n";
+#endif
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
diff --git a/ndb/tools/desc.cpp b/ndb/tools/desc.cpp
index fa7b6a750b1..c2f3ea8b615 100644
--- a/ndb/tools/desc.cpp
+++ b/ndb/tools/desc.cpp
@@ -42,10 +42,12 @@ static struct my_option my_long_options[] =
};
static void usage()
{
+#ifdef NOT_USED
char desc[] =
"tabname\n"\
"This program list all properties of table(s) in NDB Cluster.\n"\
" ex: desc T1 T2 T4\n";
+#endif
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
diff --git a/ndb/tools/drop_index.cpp b/ndb/tools/drop_index.cpp
index 7cc791dcdb7..23ebfff6cf4 100644
--- a/ndb/tools/drop_index.cpp
+++ b/ndb/tools/drop_index.cpp
@@ -36,9 +36,11 @@ static struct my_option my_long_options[] =
};
static void usage()
{
+#ifdef NOT_USED
char desc[] =
"[<table> <index>]+\n"\
"This program will drop index(es) in Ndb\n";
+#endif
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
diff --git a/ndb/tools/drop_tab.cpp b/ndb/tools/drop_tab.cpp
index efbbba73d4b..d965be29f31 100644
--- a/ndb/tools/drop_tab.cpp
+++ b/ndb/tools/drop_tab.cpp
@@ -36,9 +36,11 @@ static struct my_option my_long_options[] =
};
static void usage()
{
+#ifdef NOT_USED
char desc[] =
"tabname\n"\
"This program will drop one table in Ndb\n";
+#endif
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
diff --git a/ndb/tools/listTables.cpp b/ndb/tools/listTables.cpp
index 75bed2e35fe..db88f9bc25c 100644
--- a/ndb/tools/listTables.cpp
+++ b/ndb/tools/listTables.cpp
@@ -189,6 +189,7 @@ static struct my_option my_long_options[] =
};
static void usage()
{
+#ifdef NOT_USED
char desc[] =
"tabname\n"\
"This program list all system objects in NDB Cluster.\n"\
@@ -196,6 +197,7 @@ static void usage()
" ex: ndb_show_tables -t 2 would show all UserTables\n"\
"To show all indexes for a table write table name as final argument\n"\
" ex: ndb_show_tables T1\n";
+#endif
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
diff --git a/ndb/tools/ndb_config.cpp b/ndb/tools/ndb_config.cpp
index 5c842076873..31fc59a8b83 100644
--- a/ndb/tools/ndb_config.cpp
+++ b/ndb/tools/ndb_config.cpp
@@ -97,6 +97,7 @@ static void usage()
{
char desc[] =
"This program will retreive config options for a ndb cluster\n";
+ puts(desc);
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
@@ -111,12 +112,14 @@ struct Match
{
int m_key;
BaseString m_value;
+ Match() {}
virtual int eval(const Iter&);
virtual ~Match() {}
};
struct HostMatch : public Match
{
+ HostMatch() {}
virtual int eval(const Iter&);
};
@@ -131,11 +134,13 @@ struct Apply
struct NodeTypeApply : public Apply
{
+ NodeTypeApply() {}
virtual int apply(const Iter&);
};
struct ConnectionTypeApply : public Apply
{
+ ConnectionTypeApply() {}
virtual int apply(const Iter&);
};
@@ -294,10 +299,10 @@ parse_where(Vector<Match*>& where, int &argc, char**& argv)
Match m;
if(g_host)
{
- HostMatch *m = new HostMatch;
- m->m_key = CFG_NODE_HOST;
- m->m_value.assfmt("%s", g_host);
- where.push_back(m);
+ HostMatch *tmp = new HostMatch;
+ tmp->m_key = CFG_NODE_HOST;
+ tmp->m_value.assfmt("%s", g_host);
+ where.push_back(tmp);
}
if(g_type)
diff --git a/ndb/tools/restore/Restore.hpp b/ndb/tools/restore/Restore.hpp
index b132dda374d..8b660698d1a 100644
--- a/ndb/tools/restore/Restore.hpp
+++ b/ndb/tools/restore/Restore.hpp
@@ -25,7 +25,7 @@
#include <ndb_version.h>
#include <version.h>
-static const char * delimiter = ";"; // Delimiter in file dump
+#define delimiter ";"
const int FileNameLenC = 256;
const int TableNameLenC = 256;
@@ -358,6 +358,7 @@ public:
m_values_e.push_back(m_values[i]);
m_values.clear();
}
+ LogEntry() {}
~LogEntry()
{
Uint32 i;
diff --git a/ndb/tools/restore/consumer.hpp b/ndb/tools/restore/consumer.hpp
index 14611897f19..a4e8e71012b 100644
--- a/ndb/tools/restore/consumer.hpp
+++ b/ndb/tools/restore/consumer.hpp
@@ -20,6 +20,7 @@
class BackupConsumer {
public:
+ BackupConsumer() {}
virtual ~BackupConsumer() { }
virtual bool init() { return true;}
virtual bool table(const TableS &){return true;}
diff --git a/ndb/tools/restore/restore_main.cpp b/ndb/tools/restore/restore_main.cpp
index 0110782ff39..c17e3fbabe2 100644
--- a/ndb/tools/restore/restore_main.cpp
+++ b/ndb/tools/restore/restore_main.cpp
@@ -356,8 +356,8 @@ main(int argc, char** argv)
while ((tuple = dataIter.getNextTuple(res= 1)) != 0)
{
if (checkSysTable(tuple->getTable()->getTableName()))
- for(Uint32 i= 0; i < g_consumers.size(); i++)
- g_consumers[i]->tuple(* tuple);
+ for(Uint32 j= 0; j < g_consumers.size(); j++)
+ g_consumers[j]->tuple(* tuple);
} // while (tuple != NULL);
if (res < 0)
@@ -400,8 +400,8 @@ main(int argc, char** argv)
while ((logEntry = logIter.getNextLogEntry(res= 0)) != 0)
{
if (checkSysTable(logEntry->m_table->getTableName()))
- for(Uint32 i= 0; i < g_consumers.size(); i++)
- g_consumers[i]->logEntry(* logEntry);
+ for(Uint32 j= 0; j < g_consumers.size(); j++)
+ g_consumers[j]->logEntry(* logEntry);
}
if (res < 0)
{
@@ -432,9 +432,9 @@ main(int argc, char** argv)
}
}
}
- for(Uint32 i= 0; i < g_consumers.size(); i++)
+ for(Uint32 j= 0; j < g_consumers.size(); j++)
{
- if (g_consumers[i]->has_temp_error())
+ if (g_consumers[j]->has_temp_error())
{
clearConsumers();
ndbout_c("\nRestore successful, but encountered temporary error, "
diff --git a/ndb/tools/select_all.cpp b/ndb/tools/select_all.cpp
index 5d70ac32d02..69bd5b0f917 100644
--- a/ndb/tools/select_all.cpp
+++ b/ndb/tools/select_all.cpp
@@ -39,7 +39,7 @@ NDB_STD_OPTS_VARS;
static const char* _dbname = "TEST_DB";
static const char* _delimiter = "\t";
-static int _unqualified, _header, _parallelism, _useHexFormat, _lock,
+static int _header, _parallelism, _useHexFormat, _lock,
_order, _descending;
const char *load_default_groups[]= { "mysql_cluster",0 };
@@ -75,6 +75,7 @@ static struct my_option my_long_options[] =
};
static void usage()
{
+#ifdef NOT_USED
char desc[] =
"tabname\n"\
"This program reads all records from one table in NDB Cluster\n"\
@@ -82,6 +83,7 @@ static void usage()
"(It only print error messages if it encounters a permanent error.)\n"\
"It can also be used to dump the content of a table to file \n"\
" ex: select_all --no-header --delimiter=';' T4 > T4.data\n";
+#endif
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
diff --git a/ndb/tools/select_count.cpp b/ndb/tools/select_count.cpp
index a133f7967f8..8933d803f53 100644
--- a/ndb/tools/select_count.cpp
+++ b/ndb/tools/select_count.cpp
@@ -55,9 +55,11 @@ static struct my_option my_long_options[] =
};
static void usage()
{
+#ifdef NOT_USED
char desc[] =
"tabname1 ... tabnameN\n"\
"This program will count the number of records in tables\n";
+#endif
ndb_std_print_version();
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");