diff options
author | unknown <dli@dev3-76.dev.cn.tlan> | 2006-09-28 20:06:18 +0800 |
---|---|---|
committer | unknown <dli@dev3-76.dev.cn.tlan> | 2006-09-28 20:06:18 +0800 |
commit | c55f25ca71a4db4e35b55fbf1db9cc8b3c10a50c (patch) | |
tree | c631e73561a20e6cdb308ec9f4ac10f782d829f0 /ndb/tools | |
parent | 6c167919a622010b9c464c229945cb38bed641c1 (diff) | |
parent | a0a664c837e72e7468594014325cff0800ecd4b2 (diff) | |
download | mariadb-git-c55f25ca71a4db4e35b55fbf1db9cc8b3c10a50c.tar.gz |
Merge dev3-76.dev.cn.tlan:/home/dli/mysql/mysql-4.1/mysql-4.1-bug-19651
into dev3-76.dev.cn.tlan:/home/dli/mysql/mysql-5.0/mysql-5.0-bug-19651
ndb/test/ndbapi/flexScan.cpp:
Auto merged
ndb/tools/ndb_config.cpp:
Auto merged
ndb/tools/restore/consumer_restore.cpp:
Auto merged
ndb/tools/restore/consumer_restore.hpp:
Auto merged
ndb/tools/restore/restore_main.cpp:
Auto merged
ndb/include/util/ndb_opts.h:
C
Diffstat (limited to 'ndb/tools')
-rw-r--r-- | ndb/tools/restore/consumer.hpp | 1 | ||||
-rw-r--r-- | ndb/tools/restore/consumer_restore.cpp | 6 | ||||
-rw-r--r-- | ndb/tools/restore/consumer_restore.hpp | 3 | ||||
-rw-r--r-- | ndb/tools/restore/restore_main.cpp | 11 |
4 files changed, 21 insertions, 0 deletions
diff --git a/ndb/tools/restore/consumer.hpp b/ndb/tools/restore/consumer.hpp index 692c814159f..6a8ef29e295 100644 --- a/ndb/tools/restore/consumer.hpp +++ b/ndb/tools/restore/consumer.hpp @@ -31,6 +31,7 @@ public: virtual void logEntry(const LogEntry &){} virtual void endOfLogEntrys(){} virtual bool finalize_table(const TableS &){return true;} + virtual bool has_temp_error() {return false;} }; #endif diff --git a/ndb/tools/restore/consumer_restore.cpp b/ndb/tools/restore/consumer_restore.cpp index dc1399e73b2..d67ed139f52 100644 --- a/ndb/tools/restore/consumer_restore.cpp +++ b/ndb/tools/restore/consumer_restore.cpp @@ -180,6 +180,11 @@ BackupRestore::finalize_table(const TableS & table){ } bool +BackupRestore::has_temp_error(){ + return m_temp_error; +} + +bool BackupRestore::table(const TableS & table){ if (!m_restore && !m_restore_meta) return true; @@ -485,6 +490,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb) case NdbError::TemporaryError: err << "Temporary error: " << error << endl; + m_temp_error = true; NdbSleep_MilliSleep(sleepTime); return true; // RETRY diff --git a/ndb/tools/restore/consumer_restore.hpp b/ndb/tools/restore/consumer_restore.hpp index 1bf6d89a912..d1a9678b5ef 100644 --- a/ndb/tools/restore/consumer_restore.hpp +++ b/ndb/tools/restore/consumer_restore.hpp @@ -42,6 +42,7 @@ public: m_parallelism = parallelism; m_callback = 0; m_free_callback = 0; + m_temp_error = false; m_transactions = 0; m_cache.m_old_table = 0; } @@ -61,6 +62,7 @@ public: virtual void logEntry(const LogEntry &); virtual void endOfLogEntrys(); virtual bool finalize_table(const TableS &); + virtual bool has_temp_error(); void connectToMysql(); Ndb * m_ndb; Ndb_cluster_connection * m_cluster_connection; @@ -74,6 +76,7 @@ public: restore_callback_t *m_callback; restore_callback_t *m_free_callback; + bool m_temp_error; /** * m_new_table_ids[X] = Y; diff --git a/ndb/tools/restore/restore_main.cpp b/ndb/tools/restore/restore_main.cpp index c2e0697b9c5..d9acd31b1b2 100644 --- a/ndb/tools/restore/restore_main.cpp +++ b/ndb/tools/restore/restore_main.cpp @@ -430,6 +430,17 @@ main(int argc, char** argv) } } } + for(Uint32 i= 0; i < g_consumers.size(); i++) + { + if (g_consumers[i]->has_temp_error()) + { + clearConsumers(); + ndbout_c("\nRestore successful, but encountered temporary error, " + "please look at configuration."); + return NDBT_ProgramExit(NDBT_TEMPORARY); + } + } + clearConsumers(); return NDBT_ProgramExit(NDBT_OK); } // main |