Commit af8903b2 authored by unknown's avatar unknown

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
parents 4551c50d c55f25ca
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
virtual bool update_apply_status(const RestoreMetaData &metaData){return true;} virtual bool update_apply_status(const RestoreMetaData &metaData){return true;}
NODE_GROUP_MAP *m_nodegroup_map; NODE_GROUP_MAP *m_nodegroup_map;
uint m_nodegroup_map_len; uint m_nodegroup_map_len;
virtual bool has_temp_error() {return false;}
}; };
#endif #endif
...@@ -606,6 +606,11 @@ BackupRestore::object(Uint32 type, const void * ptr) ...@@ -606,6 +606,11 @@ BackupRestore::object(Uint32 type, const void * ptr)
return true; return true;
} }
bool
BackupRestore::has_temp_error(){
return m_temp_error;
}
bool bool
BackupRestore::update_apply_status(const RestoreMetaData &metaData) BackupRestore::update_apply_status(const RestoreMetaData &metaData)
{ {
...@@ -1100,6 +1105,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb) ...@@ -1100,6 +1105,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb)
case NdbError::TemporaryError: case NdbError::TemporaryError:
err << "Temporary error: " << error << endl; err << "Temporary error: " << error << endl;
m_temp_error = true;
NdbSleep_MilliSleep(sleepTime); NdbSleep_MilliSleep(sleepTime);
return true; return true;
// RETRY // RETRY
......
...@@ -51,6 +51,7 @@ public: ...@@ -51,6 +51,7 @@ public:
m_parallelism = parallelism; m_parallelism = parallelism;
m_callback = 0; m_callback = 0;
m_free_callback = 0; m_free_callback = 0;
m_temp_error = false;
m_transactions = 0; m_transactions = 0;
m_cache.m_old_table = 0; m_cache.m_old_table = 0;
} }
...@@ -71,6 +72,7 @@ public: ...@@ -71,6 +72,7 @@ public:
virtual void logEntry(const LogEntry &); virtual void logEntry(const LogEntry &);
virtual void endOfLogEntrys(); virtual void endOfLogEntrys();
virtual bool finalize_table(const TableS &); virtual bool finalize_table(const TableS &);
virtual bool has_temp_error();
virtual bool update_apply_status(const RestoreMetaData &metaData); virtual bool update_apply_status(const RestoreMetaData &metaData);
void connectToMysql(); void connectToMysql();
bool map_in_frm(char *new_data, const char *data, bool map_in_frm(char *new_data, const char *data,
...@@ -96,6 +98,7 @@ public: ...@@ -96,6 +98,7 @@ public:
restore_callback_t *m_callback; restore_callback_t *m_callback;
restore_callback_t *m_free_callback; restore_callback_t *m_free_callback;
bool m_temp_error;
/** /**
* m_new_table_ids[X] = Y; * m_new_table_ids[X] = Y;
......
...@@ -668,6 +668,7 @@ main(int argc, char** argv) ...@@ -668,6 +668,7 @@ main(int argc, char** argv)
} }
} }
} }
if (ga_restore_epoch) if (ga_restore_epoch)
{ {
for (i= 0; i < g_consumers.size(); i++) for (i= 0; i < g_consumers.size(); i++)
...@@ -678,6 +679,17 @@ main(int argc, char** argv) ...@@ -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(); clearConsumers();
return NDBT_ProgramExit(NDBT_OK); return NDBT_ProgramExit(NDBT_OK);
} // main } // main
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment