mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-5.0 ndb/tools/restore/consumer_restore.cpp: Auto merged
This commit is contained in:
commit
a2037c6717
1 changed files with 16 additions and 8 deletions
|
@ -301,12 +301,11 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
|
||||||
cb->connection = m_ndb->startTransaction();
|
cb->connection = m_ndb->startTransaction();
|
||||||
if (cb->connection == NULL)
|
if (cb->connection == NULL)
|
||||||
{
|
{
|
||||||
/*
|
if (errorHandler(cb))
|
||||||
if (errorHandler(cb))
|
{
|
||||||
{
|
m_ndb->sendPollNdb(3000, 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
exitHandler();
|
exitHandler();
|
||||||
} // if
|
} // if
|
||||||
|
|
||||||
|
@ -423,9 +422,17 @@ void BackupRestore::cback(int result, restore_callback_t *cb)
|
||||||
*/
|
*/
|
||||||
bool BackupRestore::errorHandler(restore_callback_t *cb)
|
bool BackupRestore::errorHandler(restore_callback_t *cb)
|
||||||
{
|
{
|
||||||
NdbError error= cb->connection->getNdbError();
|
NdbError error;
|
||||||
m_ndb->closeTransaction(cb->connection);
|
if(cb->connection)
|
||||||
cb->connection= 0;
|
{
|
||||||
|
error= cb->connection->getNdbError();
|
||||||
|
m_ndb->closeTransaction(cb->connection);
|
||||||
|
cb->connection= 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
error= m_ndb->getNdbError();
|
||||||
|
}
|
||||||
|
|
||||||
Uint32 sleepTime = 100 + cb->retries * 300;
|
Uint32 sleepTime = 100 + cb->retries * 300;
|
||||||
|
|
||||||
|
@ -440,6 +447,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NdbError::TemporaryError:
|
case NdbError::TemporaryError:
|
||||||
|
err << "Temporary error: " << error << endl;
|
||||||
NdbSleep_MilliSleep(sleepTime);
|
NdbSleep_MilliSleep(sleepTime);
|
||||||
return true;
|
return true;
|
||||||
// RETRY
|
// RETRY
|
||||||
|
|
Loading…
Reference in a new issue