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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
40e48024
Commit
40e48024
authored
Mar 22, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save core files before removing the data_dir
parent
dec3dff2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+24
-2
No files found.
mysql-test/mysql-test-run.pl
View file @
40e48024
...
...
@@ -2118,11 +2118,32 @@ sub save_installed_db () {
}
}
#
# Save any interesting files in the data_dir
# before the data dir is removed.
#
sub
save_files_before_restore
($$)
{
my
$test_name
=
shift
;
my
$data_dir
=
shift
;
my
$save_name
=
"
$opt_vardir
/log/
$test_name
";
# Look for core files
foreach
my
$core_file
(
glob
("
$data_dir
/core*
")
)
{
my
$core_name
=
basename
(
$core_file
);
mtr_report
("
Saving
$core_name
");
mkdir
(
$save_name
)
if
!
-
d
$save_name
;
rename
("
$core_file
",
"
$save_name
/
$core_name
");
}
}
#
# Restore snapshot of the installed test db(s)
# if the snapshot exists
#
sub
restore_installed_db
()
{
sub
restore_installed_db
($)
{
my
$test_name
=
shift
;
if
(
-
d
$path_snapshot
)
{
...
...
@@ -2133,6 +2154,7 @@ sub restore_installed_db () {
foreach
my
$data_dir
(
@data_dir_lst
)
{
my
$name
=
basename
(
$data_dir
);
save_files_before_restore
(
$test_name
,
$data_dir
);
rmtree
("
$data_dir
");
copy_dir
("
$path_snapshot
/
$name
",
"
$data_dir
");
}
...
...
@@ -2160,7 +2182,7 @@ sub report_failure_and_restart ($) {
if
(
$opt_force
)
{
# Restore the snapshot of the installed test db
restore_installed_db
();
restore_installed_db
(
$tinfo
->
{'
name
'}
);
print
"
Resuming Tests
\n\n
";
return
;
}
...
...
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