#At file:///home/ksm/oracle/QA/nuts/ based on revid:serge.kozlov@stripped
388 Serge Kozlov 2011-01-26
WL#5440, WL#5493. Added engine to combinations for rep_func::crash_safe_master
modified:
lib/My/Nuts/Library/DataSource.pm
suites/rep_func/crash_safe_master.pm
=== modified file 'lib/My/Nuts/Library/DataSource.pm'
--- a/lib/My/Nuts/Library/DataSource.pm 2010-08-17 20:30:52 +0000
+++ b/lib/My/Nuts/Library/DataSource.pm 2011-01-26 20:13:29 +0000
@@ -38,6 +38,12 @@ sub get_data_from_source
}
my $data_source= $class->new();
$queries= $data_source->get_data_from_source();
+ # Store generated queries into log directory
+ my $dumpname= File::Spec->catfile($Parameters::work_dir, "log", "DataSource_" . $Parameters::data_source . ".sql");
+ $dumpfile= new IO::File($dumpname, "w")
+ or die("Cannot open dump file " . $dumpname);
+ print $dumpfile join(";\n", @$queries);
+ $dumpfile= undef;
}
# Store generated queries to a dump file
if (defined $Parameters::data_source_save_dump)
=== modified file 'suites/rep_func/crash_safe_master.pm'
--- a/suites/rep_func/crash_safe_master.pm 2011-01-19 22:37:05 +0000
+++ b/suites/rep_func/crash_safe_master.pm 2011-01-26 20:13:29 +0000
@@ -26,16 +26,22 @@ my @crash_points = (
"half_binlogged_transaction"
);
+my @engines = ("myisam", "innodb");
+
sub combinations
{
my @combinations = ();
foreach my $binlog_format ( ("row", "mixed", "stmt") )
{
- my $idx= 0;
- foreach my $crash_point ( @crash_points )
+ foreach my $engine ( @engines )
{
- push (@combinations, $binlog_format . "-crashpoint" . $idx);
- $idx++;
+ my $idx= -1;
+ foreach my $crash_point ( @crash_points )
+ {
+ $idx++;
+ next if ($engine =~ m/myisam/i && $crash_point !~ m/half/i);
+ push (@combinations, $binlog_format . "-$engine-crashpoint" . $idx);
+ }
}
}
return @combinations;
@@ -60,16 +66,18 @@ sub fire
my $timeout= 30;
# Decode combination
- my ($binlog_format, $crash_point) = split(/\-crashpoint/, get_combination($test));
+ my ($binlog_format, $engine, $crash_point) = split(/\-/, get_combination($test));
$binlog_format = uc $binlog_format;
+ $engine = uc $engine;
$binlog_format = "STATEMENT" if ($binlog_format eq "STMT");
+ $crash_point =~ s/[a-z\_]+//ig;
$crash_point = $crash_points[$crash_point];
# Read list of statements from data source
my $data = get_data_from_source();
# Set number of subtests
- my $subtests = 14;
+ my $subtests = 16;
# Skip test if servers compiled withot debug support
SKIP:
@@ -91,10 +99,12 @@ sub fire
# Set number of subtests
plan tests => $subtests;
- # Setup topology, binlog format, prepare test db
+ # Setup topology, binlog format, default engine, prepare test db
ok_sql ( $master, "SET GLOBAL BINLOG_FORMAT='$binlog_format'");
ok_sql ( $master, "SET SESSION BINLOG_FORMAT='$binlog_format'");
+ ok_sql ( $master, "SET STORAGE_ENGINE='$engine'");
ok_sql ( $slave, "SET GLOBAL BINLOG_FORMAT='$binlog_format'");
+ ok_sql ( $slave, "SET STORAGE_ENGINE='$engine'");
ok_attach ( $master, $slave );
ok_synchronize ( $master, $slave );
ok_sql ( $master, "CREATE DATABASE IF NOT EXISTS $dbname");
Attachment: [text/bzr-bundle] bzr/serge.kozlov@oracle.com-20110126201329-4gkr6h4lse9gc5ov.bundle
| Thread |
|---|
| • bzr commit into nuts branch (Serge.Kozlov:388) WL#5440 WL#5493 | Serge Kozlov | 26 Jan |