Commit 273de17c authored by dli@dev3-76.dev.cn.tlan's avatar dli@dev3-76.dev.cn.tlan

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
parents 493e5ddb cdf20b96
......@@ -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
......@@ -606,6 +606,11 @@ BackupRestore::object(Uint32 type, const void * ptr)
return true;
}
bool
BackupRestore::has_temp_error(){
return m_temp_error;
}
bool
BackupRestore::update_apply_status(const RestoreMetaData &metaData)
{
......@@ -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
......
......@@ -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;
......
......@@ -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
......
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