#At file:///home/jonas/src/telco-6.2/
2855 Jonas Oreland 2009-02-23
autotest, fix BackupOne, which was just a test-prg bug
modified:
storage/ndb/test/src/NdbBackup.cpp
=== modified file 'storage/ndb/test/src/NdbBackup.cpp'
--- a/storage/ndb/test/src/NdbBackup.cpp 2008-12-11 09:43:11 +0000
+++ b/storage/ndb/test/src/NdbBackup.cpp 2009-02-23 12:37:14 +0000
@@ -150,28 +150,30 @@ NdbBackup::execRestore(bool _restore_dat
int res = system(tmp.c_str());
ndbout << "scp res: " << res << endl;
-
- tmp.assfmt("%sndb_restore -c \"%s:%d\" -n %d -b %d %s %s .",
+
+ if (res == 0 && _restore_meta)
+ {
+ /** don't restore DD objects */
+
+ tmp.assfmt("%sndb_restore -c \"%s:%d\" -n %d -b %d -m -d .",
#if 1
- "",
+ "",
#else
- "valgrind --leak-check=yes -v "
+ "valgrind --leak-check=yes -v "
#endif
- ndb_mgm_get_connected_host(handle),
- ndb_mgm_get_connected_port(handle),
- _node_id,
- _backup_id,
- _restore_data?"-r":"",
- _restore_meta?"-m":"");
+ ndb_mgm_get_connected_host(handle),
+ ndb_mgm_get_connected_port(handle),
+ _node_id,
+ _backup_id);
+
+ ndbout << "buf: "<< tmp.c_str() <<endl;
+ res = system(tmp.c_str());
+ }
- ndbout << "buf: "<< tmp.c_str() <<endl;
- res = system(tmp.c_str());
-
- if (res && _restore_meta)
+ if (res == 0 && _restore_data)
{
- /** try once wo/ restoring DD objects */
- tmp.assfmt("%sndb_restore -c \"%s:%d\" -n %d -b %d -d %s %s .",
+ tmp.assfmt("%sndb_restore -c \"%s:%d\" -n %d -b %d -r .",
#if 1
"",
#else
@@ -180,9 +182,7 @@ NdbBackup::execRestore(bool _restore_dat
ndb_mgm_get_connected_host(handle),
ndb_mgm_get_connected_port(handle),
_node_id,
- _backup_id,
- _restore_data?"-r":"",
- _restore_meta?"-m":"");
+ _backup_id);
ndbout << "buf: "<< tmp.c_str() <<endl;
res = system(tmp.c_str());
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.2 branch (jonas:2855) | Jonas Oreland | 23 Feb |