6
use GenTest::SimPipe::Testcase;
7
use GenTest::SimPipe::Oracle::FullScan;
9
use GenTest::Constants;
10
use GenTest::Executor::MySQL;
14
my $dsn = 'dbi:mysql:port=9306:user=root:host=127.0.0.1:database=test';
15
my $oracle = GenTest::SimPipe::Oracle::FullScan->new( dsn => $dsn , basedir => '/home/philips/bzr/maria-5.3' );
17
my $dbh = DBI->connect($dsn, undef, undef, { mysql_multi_statements => 1, RaiseError => 1 });
20
SELECT alias2.col_datetime_key AS field1 , alias2.pk AS field2
21
FROM t1 AS alias1 JOIN t1 AS alias2 ON alias2.pk = alias1.col_int_key AND alias2.pk != alias1.col_varchar_key
22
GROUP BY field1 , field2
23
ORDER BY alias1.col_int_key , field2;";
27
my $test = '/home/philips/bzr/randgen-simpipe/case.test';
28
open (Q, $test) or die $!;
29
read (Q, my $sql, -s $test);
32
my $testcase = GenTest::SimPipe::Testcase->newFromDBH($dbh, [ $query ]);
34
my $new_testcase = $testcase->simplify($oracle);
36
print $new_testcase->toString();