Commit cdf20b96 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-4.1/mysql-4.1-bug-19651

into  dev3-76.dev.cn.tlan:/home/dli/mysql/mysql-5.0/mysql-5.0-bug-19651
parents 9e0c7c29 cb3b878a
......@@ -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
......@@ -179,6 +179,11 @@ BackupRestore::finalize_table(const TableS & table){
} while (1);
}
bool
BackupRestore::has_temp_error(){
return m_temp_error;
}
bool
BackupRestore::table(const TableS & table){
if (!m_restore && !m_restore_meta)
......@@ -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
......
......@@ -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;
......
......@@ -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
......
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