int desc_datafile(Ndb_cluster_connection &con, Ndb *myndb, char* name) { unsigned id; NdbDictionary::Dictionary *dict= myndb->getDictionary(); assert(dict); Ndb_cluster_connection_node_iter iter; con.init_get_next_node(iter); while ((id= con.get_next_node(iter))) { NdbDictionary::Datafile df= dict->getDatafile(id, name); NdbError err= dict->getNdbError(); if ((int) err.classification != (int) ndberror_cl_none) return 0; ndbout << "Type: Datafile" << endl; ndbout << "Name: " << name << endl; ndbout << "Node: " << id << endl; ndbout << "Path: " << df.getPath() << endl; ndbout << "Size: " << df.getSize() << endl; ndbout << "Free: " << df.getFree() << endl; ndbout << "Tablespace: " << df.getTablespace() << endl; /** We probably don't need to display this ever... ndbout << "Number: " << uf.getFileNo() << endl; */ ndbout << endl; } return 1; }
int desc_undofile(Ndb_cluster_connection &con, Ndb *myndb, char* name) { unsigned id; NdbDictionary::Dictionary *dict= myndb->getDictionary(); Ndb_cluster_connection_node_iter iter; assert(dict); con.init_get_next_node(iter); while ((id= con.get_next_node(iter))) { NdbDictionary::Undofile uf= dict->getUndofile(0, name); NdbError err= dict->getNdbError(); if ((int) err.classification != (int) ndberror_cl_none) return 0; ndbout << "Type: Undofile" << endl; ndbout << "Name: " << name << endl; ndbout << "Node: " << id << endl; ndbout << "Path: " << uf.getPath() << endl; ndbout << "Size: " << uf.getSize() << endl; ndbout << "Logfile Group: " << uf.getLogfileGroup() << endl; /** FIXME: are these needed, the functions aren't there but the prototypes are... ndbout << "Number: " << uf.getFileNo() << endl; */ ndbout << endl; } return 1; }