mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
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
This commit is contained in:
commit
af8903b215
4 changed files with 22 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue