Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2102 06/03/22 22:34:48 msvensson@neptunus.(none) +1 -0
Save core files before removing the data_dir
mysql-test/mysql-test-run.pl
1.80 06/03/22 22:34:43 msvensson@neptunus.(none) +24 -2
Save core files before removing the data_dir
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/mysql-5.0
--- 1.79/mysql-test/mysql-test-run.pl 2006-03-20 21:34:54 +01:00
+++ 1.80/mysql-test/mysql-test-run.pl 2006-03-22 22:34:43 +01:00
@@ -2118,11 +2118,32 @@
}
}
+
+#
+# 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 @@
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 @@
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;
}
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2102) | msvensson | 22 Mar |