mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
Compare index names lc but save them in their original case.
This commit is contained in:
@@ -28,7 +28,7 @@ elsif ( !$slave_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox slave';
|
||||
}
|
||||
else {
|
||||
plan tests => 19;
|
||||
plan tests => 21;
|
||||
}
|
||||
|
||||
$sb->wipe_clean($master_dbh);
|
||||
@@ -198,6 +198,41 @@ is(
|
||||
"Synced diff (bug 911996)"
|
||||
);
|
||||
|
||||
# Fix bug 927771.
|
||||
$sb->load_file('master', 't/pt-table-sync/samples/bug_927771.sql');
|
||||
PerconaTest::wait_for_table($slave_dbh, "test.t", "c='j'");
|
||||
|
||||
$slave_dbh->do("update test.t set c='z' where id>8");
|
||||
|
||||
`$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox --max-load '' --lock-wait 3 --chunk-size 2 -t test.t --quiet`;
|
||||
|
||||
PerconaTest::wait_for_table($slave_dbh, "percona.checksums", "db='test' and tbl='t' and chunk=4");
|
||||
|
||||
$output = output(
|
||||
sub {
|
||||
pt_table_sync::main('h=127.1,P=12345,u=msandbox,p=msandbox',
|
||||
qw(--print --execute --replicate percona.checksums),
|
||||
qw(--no-foreign-key-checks))
|
||||
},
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/REPLACE INTO `test`.`t`\(`id`, `c`\) VALUES \('9', 'i'\)/,
|
||||
"--replicate with uc index (bug 927771)"
|
||||
);
|
||||
|
||||
my $rows = $slave_dbh->selectall_arrayref("select id, c from test.t where id>8 order by id");
|
||||
is_deeply(
|
||||
$rows,
|
||||
[
|
||||
[9, 'i'],
|
||||
[10, 'j'],
|
||||
],
|
||||
"Synced slaved (bug 927771)"
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
18
t/pt-table-sync/samples/bug_927771.sql
Normal file
18
t/pt-table-sync/samples/bug_927771.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
drop database if exists test;
|
||||
create database test;
|
||||
use test;
|
||||
create table t (
|
||||
id int auto_increment not null primary key,
|
||||
c varchar(8) not null
|
||||
) engine=innodb;
|
||||
insert into test.t values
|
||||
(null, 'a'),
|
||||
(null, 'b'),
|
||||
(null, 'c'),
|
||||
(null, 'd'),
|
||||
(null, 'e'),
|
||||
(null, 'f'),
|
||||
(null, 'g'),
|
||||
(null, 'h'),
|
||||
(null, 'i'),
|
||||
(null, 'j');
|
Reference in New Issue
Block a user