summaryrefslogtreecommitdiff
path: root/ndb/test/src
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.(none)>2004-09-15 15:47:04 +0000
committerunknown <tomas@poseidon.(none)>2004-09-15 15:47:04 +0000
commit16bd53d4b35b61e75f694c3694e1b6438b30ec0b (patch)
tree2c8798c210addd122d9580c0f49ca569896ad51c /ndb/test/src
parent48cce6198863c6157b979df501293433285a6705 (diff)
downloadmariadb-git-16bd53d4b35b61e75f694c3694e1b6438b30ec0b.tar.gz
fixed return code for ndb_backup
added possibility to set number of accounts in createAndLoadBank bumbed up number of threads in tastBackup BackupBank ndb/src/kernel/blocks/backup/restore/main.cpp: fixed return code ndb/test/ndbapi/bank/Bank.hpp: added possibility to set number of accounts in createAndLoadBank ndb/test/ndbapi/bank/BankLoad.cpp: added possibility to set number of accounts in createAndLoadBank ndb/test/ndbapi/testBackup.cpp: bumbed up number of threads in tastBackup BackupBank ndb/test/src/NdbBackup.cpp: some small optimizations
Diffstat (limited to 'ndb/test/src')
-rw-r--r--ndb/test/src/NdbBackup.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/ndb/test/src/NdbBackup.cpp b/ndb/test/src/NdbBackup.cpp
index f33c5d8c313..71b4b49b3a6 100644
--- a/ndb/test/src/NdbBackup.cpp
+++ b/ndb/test/src/NdbBackup.cpp
@@ -140,14 +140,16 @@ NdbBackup::execRestore(bool _restore_data,
*/
snprintf(buf, buf_len,
- "scp %s:%s/BACKUP/BACKUP-%d/* .",
+ "scp %s:%s/BACKUP/BACKUP-%d/BACKUP-%d*.%d.* .",
host, path,
- _backup_id);
+ _backup_id,
+ _backup_id,
+ _node_id);
ndbout << "buf: "<< buf <<endl;
int res = system(buf);
- ndbout << "res: " << res << endl;
+ ndbout << "scp res: " << res << endl;
snprintf(buf, 255, "%sndb_restore -c \"host=%s\" -n %d -b %d %s %s .",
#if 1
@@ -162,9 +164,9 @@ NdbBackup::execRestore(bool _restore_data,
_restore_meta?"-m":"");
ndbout << "buf: "<< buf <<endl;
- res = system(buf);
+ res = system(buf);
- ndbout << "res: " << res << endl;
+ ndbout << "ndb_restore res: " << res << endl;
return res;
@@ -180,20 +182,13 @@ NdbBackup::restore(unsigned _backup_id){
return -1;
int res;
- if ( ndbNodes.size() == 1) {
- // restore metadata and data in one call
- res = execRestore(true, true, ndbNodes[0].node_id, _backup_id);
- } else {
- assert(ndbNodes.size() > 1);
-
- // restore metadata first
- res = execRestore(false, true, ndbNodes[0].node_id, _backup_id);
-
- // Restore data once for each node
- for(size_t i = 0; i < ndbNodes.size(); i++){
- res = execRestore(true, false, ndbNodes[i].node_id, _backup_id);
- }
+ // restore metadata first and data for first node
+ res = execRestore(true, true, ndbNodes[0].node_id, _backup_id);
+
+ // Restore data once for each node
+ for(size_t i = 1; i < ndbNodes.size(); i++){
+ res = execRestore(true, false, ndbNodes[i].node_id, _backup_id);
}
return 0;