Commit 6e5eda03 authored by unknown's avatar unknown

Irix64 mipspro ndb compile fixes

parent e119be86
...@@ -351,8 +351,9 @@ CPCD::loadProcessList(){ ...@@ -351,8 +351,9 @@ CPCD::loadProcessList(){
sess.loadFile(); sess.loadFile();
loadingProcessList = false; loadingProcessList = false;
size_t i;
Vector<int> temporary; Vector<int> temporary;
for(size_t i = 0; i<m_processes.size(); i++){ for(i = 0; i<m_processes.size(); i++){
Process * proc = m_processes[i]; Process * proc = m_processes[i];
proc->readPid(); proc->readPid();
if(proc->m_processType == TEMPORARY){ if(proc->m_processType == TEMPORARY){
...@@ -360,7 +361,7 @@ CPCD::loadProcessList(){ ...@@ -360,7 +361,7 @@ CPCD::loadProcessList(){
} }
} }
for(size_t i = 0; i<temporary.size(); i++){ for(i = 0; i<temporary.size(); i++){
RequestStatus rs; RequestStatus rs;
undefineProcess(&rs, temporary[i]); undefineProcess(&rs, temporary[i]);
} }
......
...@@ -256,7 +256,7 @@ set_ulimit(const BaseString & pair){ ...@@ -256,7 +256,7 @@ set_ulimit(const BaseString & pair){
void void
CPCD::Process::do_exec() { CPCD::Process::do_exec() {
size_t i;
setup_environment(m_env.c_str()); setup_environment(m_env.c_str());
char **argv = BaseString::argify(m_path.c_str(), m_args.c_str()); char **argv = BaseString::argify(m_path.c_str(), m_args.c_str());
...@@ -272,7 +272,7 @@ CPCD::Process::do_exec() { ...@@ -272,7 +272,7 @@ CPCD::Process::do_exec() {
Vector<BaseString> ulimit; Vector<BaseString> ulimit;
m_ulimit.split(ulimit); m_ulimit.split(ulimit);
for(size_t i = 0; i<ulimit.size(); i++){ for(i = 0; i<ulimit.size(); i++){
if(ulimit[i].trim().length() > 0 && set_ulimit(ulimit[i]) != 0){ if(ulimit[i].trim().length() > 0 && set_ulimit(ulimit[i]) != 0){
_exit(1); _exit(1);
} }
...@@ -286,7 +286,7 @@ CPCD::Process::do_exec() { ...@@ -286,7 +286,7 @@ CPCD::Process::do_exec() {
BaseString * redirects[] = { &m_stdin, &m_stdout, &m_stderr }; BaseString * redirects[] = { &m_stdin, &m_stdout, &m_stderr };
int fds[3]; int fds[3];
for(int i = 0; i<3; i++){ for(i = 0; i<3; i++){
if(redirects[i]->empty()){ if(redirects[i]->empty()){
#ifndef DEBUG #ifndef DEBUG
dup2(fd, i); dup2(fd, i);
...@@ -319,7 +319,7 @@ CPCD::Process::do_exec() { ...@@ -319,7 +319,7 @@ CPCD::Process::do_exec() {
} }
/* Close all filedescriptors */ /* Close all filedescriptors */
for(int i = STDERR_FILENO+1; i < getdtablesize(); i++) for(i = STDERR_FILENO+1; i < getdtablesize(); i++)
close(i); close(i);
execv(m_path.c_str(), argv); execv(m_path.c_str(), argv);
......
...@@ -635,6 +635,7 @@ CommandInterpreter::executeHelp(char* parameters) ...@@ -635,6 +635,7 @@ CommandInterpreter::executeHelp(char* parameters)
void void
CommandInterpreter::executeShow(char* parameters) CommandInterpreter::executeShow(char* parameters)
{ {
int i;
connect(); connect();
if (emptyString(parameters)) { if (emptyString(parameters)) {
ndbout << "Cluster Configuration" << endl ndbout << "Cluster Configuration" << endl
...@@ -652,7 +653,7 @@ CommandInterpreter::executeShow(char* parameters) ...@@ -652,7 +653,7 @@ CommandInterpreter::executeShow(char* parameters)
api_nodes = 0, api_nodes = 0,
mgm_nodes = 0; mgm_nodes = 0;
for(int i=0; i < state->no_of_nodes; i++) { for(i=0; i < state->no_of_nodes; i++) {
switch(state->node_states[i].node_type) { switch(state->node_states[i].node_type) {
case NDB_MGM_NODE_TYPE_API: case NDB_MGM_NODE_TYPE_API:
api_nodes++; api_nodes++;
...@@ -673,7 +674,7 @@ CommandInterpreter::executeShow(char* parameters) ...@@ -673,7 +674,7 @@ CommandInterpreter::executeShow(char* parameters)
<< " NDB Node(s)" << " NDB Node(s)"
<< endl; << endl;
for(int i=0; i < state->no_of_nodes; i++) { for(i=0; i < state->no_of_nodes; i++) {
if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_NDB) { if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_NDB) {
ndbout << "DB node:\t" << state->node_states[i].node_id; ndbout << "DB node:\t" << state->node_states[i].node_id;
if(state->node_states[i].version != 0) { if(state->node_states[i].version != 0) {
...@@ -695,7 +696,7 @@ CommandInterpreter::executeShow(char* parameters) ...@@ -695,7 +696,7 @@ CommandInterpreter::executeShow(char* parameters)
<< " API Node(s)" << " API Node(s)"
<< endl; << endl;
for(int i=0; i < state->no_of_nodes; i++) { for(i=0; i < state->no_of_nodes; i++) {
if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_API) { if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_API) {
ndbout << "API node:\t" << state->node_states[i].node_id; ndbout << "API node:\t" << state->node_states[i].node_id;
if(state->node_states[i].version != 0) { if(state->node_states[i].version != 0) {
...@@ -716,7 +717,7 @@ CommandInterpreter::executeShow(char* parameters) ...@@ -716,7 +717,7 @@ CommandInterpreter::executeShow(char* parameters)
<< " MGM Node(s)" << " MGM Node(s)"
<< endl; << endl;
for(int i=0; i < state->no_of_nodes; i++) { for(i=0; i < state->no_of_nodes; i++) {
if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_MGM) { if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_MGM) {
ndbout << "MGM node:\t" << state->node_states[i].node_id; ndbout << "MGM node:\t" << state->node_states[i].node_id;
if(state->node_states[i].version != 0) { if(state->node_states[i].version != 0) {
...@@ -759,6 +760,7 @@ CommandInterpreter::executeShow(char* parameters) ...@@ -759,6 +760,7 @@ CommandInterpreter::executeShow(char* parameters)
void void
CommandInterpreter::executeClusterLog(char* parameters) CommandInterpreter::executeClusterLog(char* parameters)
{ {
int i;
connect(); connect();
if (parameters != 0 && strlen(parameters) != 0) { if (parameters != 0 && strlen(parameters) != 0) {
enum ndb_mgm_clusterlog_level severity = NDB_MGM_CLUSTERLOG_ALL; enum ndb_mgm_clusterlog_level severity = NDB_MGM_CLUSTERLOG_ALL;
...@@ -846,10 +848,10 @@ CommandInterpreter::executeClusterLog(char* parameters) ...@@ -846,10 +848,10 @@ CommandInterpreter::executeClusterLog(char* parameters)
ndbout << "Cluster logging is disabled." << endl; ndbout << "Cluster logging is disabled." << endl;
for(int i = 0; i<7;i++) for(i = 0; i<7;i++)
printf("enabled[%d] = %d\n", i, enabled[i]); printf("enabled[%d] = %d\n", i, enabled[i]);
ndbout << "Severities enabled: "; ndbout << "Severities enabled: ";
for(int i = 1; i < 7; i++) { for(i = 1; i < 7; i++) {
if(enabled[i]) if(enabled[i])
ndbout << names[i] << " "; ndbout << names[i] << " ";
} }
...@@ -1298,14 +1300,15 @@ CommandInterpreter::executeLog(int processId, ...@@ -1298,14 +1300,15 @@ CommandInterpreter::executeLog(int processId,
return; return;
} }
int len=0; int len=0;
for(Uint32 i=0; i<blocks.size(); i++) { Uint32 i;
for(i=0; i<blocks.size(); i++) {
ndbout_c("blocks %s %d",blocks[i], strlen(blocks[i])); ndbout_c("blocks %s %d",blocks[i], strlen(blocks[i]));
len += strlen(blocks[i]); len += strlen(blocks[i]);
} }
len += blocks.size()*2; len += blocks.size()*2;
char * blockNames = (char*)malloc(len); char * blockNames = (char*)malloc(len);
for(Uint32 i=0; i<blocks.size(); i++) { for(i=0; i<blocks.size(); i++) {
strcat(blockNames, blocks[i]); strcat(blockNames, blocks[i]);
strcat(blockNames, "|"); strcat(blockNames, "|");
} }
......
...@@ -2816,3 +2816,7 @@ NdbDictInterface::execLIST_TABLES_CONF(NdbApiSignal* signal, ...@@ -2816,3 +2816,7 @@ NdbDictInterface::execLIST_TABLES_CONF(NdbApiSignal* signal,
template class Vector<Uint32>; template class Vector<Uint32>;
template class Vector<Vector<Uint32> >; template class Vector<Vector<Uint32> >;
template class Vector<NdbTableImpl*>;
template class Vector<NdbColumnImpl*>;
template class Bitmask<4>;
...@@ -73,7 +73,8 @@ int main(int argc, const char** argv){ ...@@ -73,7 +73,8 @@ int main(int argc, const char** argv){
ndbout << "-- Indexes -- " << endl; ndbout << "-- Indexes -- " << endl;
ndbout << "PRIMARY KEY("; ndbout << "PRIMARY KEY(";
for (unsigned j= 0; j < pTab->getNoOfPrimaryKeys(); j++) unsigned j;
for (j= 0; j < pTab->getNoOfPrimaryKeys(); j++)
{ {
const NdbDictionary::Column * col = pTab->getColumn(j); const NdbDictionary::Column * col = pTab->getColumn(j);
ndbout << col->getName(); ndbout << col->getName();
...@@ -82,7 +83,7 @@ int main(int argc, const char** argv){ ...@@ -82,7 +83,7 @@ int main(int argc, const char** argv){
} }
ndbout << ") - UniqueHashIndex" << endl; ndbout << ") - UniqueHashIndex" << endl;
for (unsigned j= 0; j < list.count; j++) { for (j= 0; j < list.count; j++) {
NdbDictionary::Dictionary::List::Element& elt = list.elements[j]; NdbDictionary::Dictionary::List::Element& elt = list.elements[j];
const NdbDictionary::Index *pIdx = dict->getIndex(elt.name, argv[i]); const NdbDictionary::Index *pIdx = dict->getIndex(elt.name, argv[i]);
if (!pIdx){ if (!pIdx){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment