4
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
5
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
6
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
10
use warnings FATAL => 'all';
11
use English qw(-no_match_vars);
12
use Test::More tests => 5;
25
sub { new TableSyncStream() },
29
my $t = new TableSyncStream(
33
my $ch = new ChangeHandler(
40
actions => [ sub { push @rows, $_[0] }, ],
55
"SELECT SQL_BUFFER_RESULT `a`, `b`, `c` FROM `test`.`foo` WHERE foo=1",
56
'Got SQL with SQL_BUFFER_RESULT OK',
70
"SELECT `a`, `b`, `c` FROM `test`.`foo` WHERE foo=1",
74
# Changed from undef to 0 due to r4802.
75
is( $t->done, 0, 'Not done yet' );
77
my $d = new RowDiff( dbh => 1 );
79
left_sth => new MockSth(
80
{ a => 1, b => 2, c => 3 },
81
{ a => 2, b => 2, c => 3 },
82
{ a => 3, b => 2, c => 3 },
83
# { a => 4, b => 2, c => 3 },
85
right_sth => new MockSth(
86
# { a => 1, b => 2, c => 3 },
87
{ a => 2, b => 2, c => 3 },
88
{ a => 3, b => 2, c => 3 },
89
{ a => 4, b => 2, c => 3 },
98
"INSERT INTO `test`.`foo`(`a`, `b`, `c`) VALUES ('1', '2', '3')",
99
"DELETE FROM `test`.`foo` WHERE `a`='4' AND `b`='2' AND `c`='3' LIMIT 1",