Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
192c01e1
Commit
192c01e1
authored
Sep 26, 2006
by
dli@dev3-76.dev.cn.tlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for bug#19651, if temporary error occured while retoring, report it in the restore result.
parent
cb6d518d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
0 deletions
+21
-0
ndb/tools/restore/consumer.hpp
ndb/tools/restore/consumer.hpp
+1
-0
ndb/tools/restore/consumer_restore.cpp
ndb/tools/restore/consumer_restore.cpp
+6
-0
ndb/tools/restore/consumer_restore.hpp
ndb/tools/restore/consumer_restore.hpp
+3
-0
ndb/tools/restore/restore_main.cpp
ndb/tools/restore/restore_main.cpp
+11
-0
No files found.
ndb/tools/restore/consumer.hpp
View file @
192c01e1
...
@@ -31,6 +31,7 @@ public:
...
@@ -31,6 +31,7 @@ public:
virtual
void
logEntry
(
const
LogEntry
&
){}
virtual
void
logEntry
(
const
LogEntry
&
){}
virtual
void
endOfLogEntrys
(){}
virtual
void
endOfLogEntrys
(){}
virtual
bool
finalize_table
(
const
TableS
&
){
return
true
;}
virtual
bool
finalize_table
(
const
TableS
&
){
return
true
;}
virtual
bool
has_temp_error
()
{
return
false
;}
};
};
#endif
#endif
ndb/tools/restore/consumer_restore.cpp
View file @
192c01e1
...
@@ -139,6 +139,11 @@ BackupRestore::finalize_table(const TableS & table){
...
@@ -139,6 +139,11 @@ BackupRestore::finalize_table(const TableS & table){
return
ret
;
return
ret
;
}
}
bool
BackupRestore
::
has_temp_error
(){
return
m_temp_error
;
}
bool
bool
BackupRestore
::
table
(
const
TableS
&
table
){
BackupRestore
::
table
(
const
TableS
&
table
){
if
(
!
m_restore
&&
!
m_restore_meta
)
if
(
!
m_restore
&&
!
m_restore_meta
)
...
@@ -437,6 +442,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb)
...
@@ -437,6 +442,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
...
...
ndb/tools/restore/consumer_restore.hpp
View file @
192c01e1
...
@@ -41,6 +41,7 @@ public:
...
@@ -41,6 +41,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
;
}
}
...
@@ -60,6 +61,7 @@ public:
...
@@ -60,6 +61,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
();
void
connectToMysql
();
void
connectToMysql
();
Ndb
*
m_ndb
;
Ndb
*
m_ndb
;
bool
m_restore
;
bool
m_restore
;
...
@@ -72,6 +74,7 @@ public:
...
@@ -72,6 +74,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;
...
...
ndb/tools/restore/restore_main.cpp
View file @
192c01e1
...
@@ -411,6 +411,17 @@ main(int argc, char** argv)
...
@@ -411,6 +411,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
(
"
\n
Restore 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment