From d65edca7a13c036e3749f7800b78d171be8b0ac0 Mon Sep 17 00:00:00 2001 From: "jonas@perch.ndb.mysql.com" <> Date: Mon, 6 Feb 2006 10:07:15 +0100 Subject: [PATCH] bug#16873 - Print creating of dd objects during ndb_restore --- .../ndb/tools/restore/consumer_restore.cpp | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp index ad33cbe7b85..200925bf8bb 100644 --- a/storage/ndb/tools/restore/consumer_restore.cpp +++ b/storage/ndb/tools/restore/consumer_restore.cpp @@ -453,15 +453,15 @@ BackupRestore::object(Uint32 type, const void * ptr) { NdbDictionary::LogfileGroup * lg = m_logfilegroups[old.getDefaultLogfileGroupId()]; old.setDefaultLogfileGroup(* lg); + info << "Creating tablespace: " << old.getName() << "..." << flush; int ret = dict->createTablespace(old); if (ret) { NdbError errobj= dict->getNdbError(); - err << "Failed to create tablespace \"" << old.getName() << "\": " - << errobj << endl; + info << "FAILED " << errobj << endl; return false; } - debug << "Created tablespace: " << old.getName() << endl; + info << "done" << endl; } NdbDictionary::Tablespace curr = dict->getTablespace(old.getName()); @@ -491,15 +491,15 @@ BackupRestore::object(Uint32 type, const void * ptr) if (!m_no_restore_disk) { + info << "Creating logfile group: " << old.getName() << "..." << flush; int ret = dict->createLogfileGroup(old); if (ret) { NdbError errobj= dict->getNdbError(); - err << "Failed to create logfile group \"" << old.getName() << "\": " - << errobj << endl; + info << "FAILED" << errobj << endl; return false; } - debug << "Created logfile group: " << old.getName() << endl; + info << "done" << endl; } NdbDictionary::LogfileGroup curr = dict->getLogfileGroup(old.getName()); @@ -532,12 +532,13 @@ BackupRestore::object(Uint32 type, const void * ptr) << " to tablespace: oldid: " << old.getTablespaceId() << " newid: " << ts->getObjectId() << endl; old.setTablespace(* ts); + info << "Creating datafile \"" << old.getPath() << "\"..." << flush; if (dict->createDatafile(old)) { - err << "Failed to create datafile \"" << old.getPath() << "\": " - << dict->getNdbError() << endl; + info << "FAILED " << dict->getNdbError() << endl; return false; } + info << "done" << endl; } return true; break; @@ -554,12 +555,13 @@ BackupRestore::object(Uint32 type, const void * ptr) << " newid: " << lg->getObjectId() << " " << (void*)lg << endl; old.setLogfileGroup(* lg); + info << "Creating undofile \"" << old.getPath() << "\"..." << flush; if (dict->createUndofile(old)) { - err << "Failed to create undofile \"" << old.getPath() << "\": " - << dict->getNdbError() << endl; + info << "FAILED " << dict->getNdbError() << endl; return false; } + info << "done" << endl; } return true; break;