diff options
author | unknown <dli@dev3-76.dev.cn.tlan> | 2006-09-28 20:52:28 +0800 |
---|---|---|
committer | unknown <dli@dev3-76.dev.cn.tlan> | 2006-09-28 20:52:28 +0800 |
commit | af8903b2154aa02f00fabcdffcafe0ad6c1bc144 (patch) | |
tree | 39b3085532ee9d7c8ffcaead7bd4ee2411d4be9d /storage/ndb/tools | |
parent | 4551c50d39a3b703c9ee88f351ec4619dff1b56e (diff) | |
parent | c55f25ca71a4db4e35b55fbf1db9cc8b3c10a50c (diff) | |
download | mariadb-git-af8903b2154aa02f00fabcdffcafe0ad6c1bc144.tar.gz |
Merge dev3-76.dev.cn.tlan:/home/dli/mysql/mysql-5.0/mysql-5.0-bug-19651
into dev3-76.dev.cn.tlan:/home/dli/mysql/mysql-5.1/mysql-5.1-bug-19651
storage/ndb/include/util/ndb_opts.h:
Auto merged
storage/ndb/test/ndbapi/flexScan.cpp:
Auto merged
storage/ndb/tools/ndb_condig.cpp:
Auto merged
storage/ndb/tools/restore/consumer.hpp:
merged for push bug#19651
storage/ndb/tools/restore/consumer_restore.cpp:
merged for push bug#19651
storage/ndb/tools/restore/consumer_restore.hpp:
merged for push bug#19651
storage/ndb/tools/restore/restore_main.cpp:
merged for push bug#19651
Diffstat (limited to 'storage/ndb/tools')
-rw-r--r-- | storage/ndb/tools/restore/consumer.hpp | 1 | ||||
-rw-r--r-- | storage/ndb/tools/restore/consumer_restore.cpp | 6 | ||||
-rw-r--r-- | storage/ndb/tools/restore/consumer_restore.hpp | 3 | ||||
-rw-r--r-- | storage/ndb/tools/restore/restore_main.cpp | 12 |
4 files changed, 22 insertions, 0 deletions
diff --git a/storage/ndb/tools/restore/consumer.hpp b/storage/ndb/tools/restore/consumer.hpp index 5a09bf54270..d5c6d38985a 100644 --- a/storage/ndb/tools/restore/consumer.hpp +++ b/storage/ndb/tools/restore/consumer.hpp @@ -39,6 +39,7 @@ public: virtual bool update_apply_status(const RestoreMetaData &metaData){return true;} NODE_GROUP_MAP *m_nodegroup_map; uint m_nodegroup_map_len; + virtual bool has_temp_error() {return false;} }; #endif diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp index 44f4b770b05..507058e2743 100644 --- a/storage/ndb/tools/restore/consumer_restore.cpp +++ b/storage/ndb/tools/restore/consumer_restore.cpp @@ -607,6 +607,11 @@ BackupRestore::object(Uint32 type, const void * ptr) } bool +BackupRestore::has_temp_error(){ + return m_temp_error; +} + +bool BackupRestore::update_apply_status(const RestoreMetaData &metaData) { if (!m_restore_epoch) @@ -1100,6 +1105,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/storage/ndb/tools/restore/consumer_restore.hpp b/storage/ndb/tools/restore/consumer_restore.hpp index 4389f71724e..c1d9472aea0 100644 --- a/storage/ndb/tools/restore/consumer_restore.hpp +++ b/storage/ndb/tools/restore/consumer_restore.hpp @@ -51,6 +51,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; } @@ -71,6 +72,7 @@ public: virtual void logEntry(const LogEntry &); virtual void endOfLogEntrys(); virtual bool finalize_table(const TableS &); + virtual bool has_temp_error(); virtual bool update_apply_status(const RestoreMetaData &metaData); void connectToMysql(); bool map_in_frm(char *new_data, const char *data, @@ -96,6 +98,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/storage/ndb/tools/restore/restore_main.cpp b/storage/ndb/tools/restore/restore_main.cpp index d76cf441dd6..8070dba9bf6 100644 --- a/storage/ndb/tools/restore/restore_main.cpp +++ b/storage/ndb/tools/restore/restore_main.cpp @@ -668,6 +668,7 @@ main(int argc, char** argv) } } } + if (ga_restore_epoch) { for (i= 0; i < g_consumers.size(); i++) @@ -678,6 +679,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 |