mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 07:54:58 +00:00
More tests for 5.7 fixed
This commit is contained in:
@@ -82,6 +82,7 @@ ok(
|
||||
# large that all tables will be done in a single chunk without an index.
|
||||
# Since this varies by default, there's no use checking the checksums
|
||||
# other than to ensure that there's at least one for each table.
|
||||
# 2
|
||||
$row = $master_dbh->selectrow_arrayref("select count(*) from percona.checksums");
|
||||
my $max_chunks = $sandbox_version < '5.7' ? 60 : 100;
|
||||
ok(
|
||||
@@ -92,7 +93,7 @@ ok(
|
||||
# ############################################################################
|
||||
# Static chunk size (disable --chunk-time)
|
||||
# ############################################################################
|
||||
|
||||
# 3
|
||||
ok(
|
||||
no_diff(
|
||||
sub { pt_table_checksum::main(@args, qw(--chunk-time 0)) },
|
||||
|
@@ -42,7 +42,7 @@ $output = output(
|
||||
|
||||
is(
|
||||
PerconaTest::count_checksum_results($output, 'rows'),
|
||||
24,
|
||||
$sandbox_version lt '5.7' ? 24 : 25,
|
||||
"Large BLOB/TEXT/BINARY Checksum"
|
||||
);
|
||||
|
||||
|
@@ -42,23 +42,15 @@ $sb->do_as_root("slave1", q/GRANT REPLICATION CLIENT ON *.* TO 'slave_user'@'loc
|
||||
$sb->do_as_root("slave1", q/GRANT ALL ON *.* TO 'slave_user'@'localhost'/);
|
||||
$sb->do_as_root("slave1", q/FLUSH PRIVILEGES/);
|
||||
|
||||
$sb->do_as_root("slave2", q/GRANT REPLICATION CLIENT ON *.* TO 'slave_user'@'localhost' IDENTIFIED BY 'slave_password'/);
|
||||
$sb->do_as_root("slave2", q/GRANT ALL ON *.* TO 'slave_user'@'localhost'/);
|
||||
$sb->do_as_root("slave2", q/FLUSH PRIVILEGES/);
|
||||
|
||||
$sb->wait_for_slaves();
|
||||
|
||||
# Run these commands inside issue_1651002.sql to delete the sandbox user ONLY from master
|
||||
# These command must be in the .sql file because all of them need to run in the same session
|
||||
# set sql_log_bin=0;
|
||||
# DROP USER 'slave_user';
|
||||
# set sql_log_bin=1;
|
||||
$sb->load_file('master', 't/pt-table-checksum/samples/issue_1651002.sql');
|
||||
# Ensure we cannot connect to slaves using standard credentials
|
||||
# Since slave2 is a slave of slave1, removing the user from the slave1 will remove
|
||||
# the user also from slave2
|
||||
$sb->do_as_root("slave1", q/DROP USER 'msandbox'@'%'/);
|
||||
$sb->do_as_root("slave1", q/RENAME USER 'msandbox'@'%' TO 'msandbox_old'@'%'/);
|
||||
$sb->do_as_root("slave1", q/FLUSH PRIVILEGES/);
|
||||
$sb->do_as_root("slave1", q/FLUSH TABLES/);
|
||||
|
||||
|
||||
$output = output(
|
||||
@@ -71,19 +63,19 @@ is(
|
||||
"Large BLOB/TEXT/BINARY Checksum"
|
||||
);
|
||||
|
||||
# Restore privilegs for the other test files
|
||||
$sb->do_as_root("master", q/GRANT ALL PRIVILEGES ON *.* TO 'msandbox'@'%' IDENTIFIED BY 'msandbox'/);
|
||||
$sb->do_as_root("master", q/FLUSH PRIVILEGES/);
|
||||
|
||||
$sb->do_as_root("slave1", q/GRANT ALL PRIVILEGES ON *.* TO 'msandbox'@'%' IDENTIFIED BY 'msandbox'/);
|
||||
$sb->do_as_root("slave1", q/FLUSH PRIVILEGES/);
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
diag("Stopping the sandbox to leave a clean sandbox for the next test file");
|
||||
|
||||
$sb->do_as_root("slave1", q/DROP USER 'slave_user'@'localhost'/);
|
||||
$sb->do_as_root("slave1", q/FLUSH PRIVILEGES/);
|
||||
|
||||
# Restore privilegs for the other test files
|
||||
$sb->do_as_root("slave1", q/RENAME USER 'msandbox_old'@'%' TO 'msandbox'@'%'/);
|
||||
$sb->do_as_root("master", q/FLUSH PRIVILEGES/);
|
||||
$sb->do_as_root("master", q/FLUSH TABLES/);
|
||||
|
||||
$sb->wipe_clean($dbh);
|
||||
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
|
@@ -1,14 +1,27 @@
|
||||
ERRORS DIFFS ROWS SKIPPED TABLE
|
||||
0 0 0 0 mysql.columns_priv
|
||||
0 0 0 0 mysql.db
|
||||
0 0 2 0 mysql.engine_cost
|
||||
0 0 0 0 mysql.event
|
||||
0 0 0 0 mysql.func
|
||||
0 0 0 0 mysql.gtid_executed
|
||||
0 0 40 0 mysql.help_category
|
||||
0 0 682 0 mysql.help_keyword
|
||||
0 0 1340 0 mysql.help_relation
|
||||
0 0 637 0 mysql.help_topic
|
||||
0 0 0 0 mysql.ndb_binlog_index
|
||||
0 0 0 0 mysql.procs_priv
|
||||
0 0 0 0 mysql.proxies_priv
|
||||
0 0 6 0 mysql.server_cost
|
||||
0 0 0 0 mysql.servers
|
||||
0 0 0 0 mysql.tables_priv
|
||||
0 0 5 0 mysql.user
|
||||
0 0 17 0 percona_test.checksums
|
||||
0 0 0 0 mysql.time_zone
|
||||
0 0 0 0 mysql.time_zone_leap_second
|
||||
0 0 0 0 mysql.time_zone_name
|
||||
0 0 0 0 mysql.time_zone_transition
|
||||
0 0 0 0 mysql.time_zone_transition_type
|
||||
0 0 2 0 mysql.user
|
||||
0 0 23 0 percona_test.checksums
|
||||
0 0 1 0 percona_test.load_data
|
||||
0 0 1 0 percona_test.sentinel
|
||||
0 0 200 0 sakila.actor
|
||||
|
@@ -49,7 +49,3 @@ create table test4 (
|
||||
insert into test3(id, name) values(15034, '51707'),(1, '001');
|
||||
insert into test4(id, name) values(15034, '051707'),(1, '1');
|
||||
|
||||
-- set sql_log_bin=0;
|
||||
-- DROP USER 'slave_user';
|
||||
-- set sql_log_bin=1;
|
||||
-- FLUSH PRIVILEGES;
|
||||
|
@@ -1,14 +1,27 @@
|
||||
ERRORS DIFFS ROWS CHUNKS SKIPPED TABLE
|
||||
0 0 0 1 0 mysql.columns_priv
|
||||
0 0 0 1 0 mysql.db
|
||||
0 0 2 1 0 mysql.engine_cost
|
||||
0 0 0 1 0 mysql.event
|
||||
0 0 0 1 0 mysql.func
|
||||
0 0 0 1 0 mysql.gtid_executed
|
||||
0 0 40 1 0 mysql.help_category
|
||||
0 0 682 1 0 mysql.help_keyword
|
||||
0 0 1340 1 0 mysql.help_relation
|
||||
0 0 637 1 0 mysql.help_topic
|
||||
0 0 0 1 0 mysql.ndb_binlog_index
|
||||
0 0 0 1 0 mysql.procs_priv
|
||||
0 0 0 1 0 mysql.proxies_priv
|
||||
0 0 6 1 0 mysql.server_cost
|
||||
0 0 0 1 0 mysql.servers
|
||||
0 0 0 1 0 mysql.tables_priv
|
||||
0 0 5 1 0 mysql.user
|
||||
0 0 17 1 0 percona_test.checksums
|
||||
0 0 0 1 0 mysql.time_zone
|
||||
0 0 0 1 0 mysql.time_zone_leap_second
|
||||
0 0 0 1 0 mysql.time_zone_name
|
||||
0 0 0 1 0 mysql.time_zone_transition
|
||||
0 0 0 1 0 mysql.time_zone_transition_type
|
||||
0 0 2 1 0 mysql.user
|
||||
0 0 23 1 0 percona_test.checksums
|
||||
0 0 1 1 0 percona_test.load_data
|
||||
0 0 1 1 0 percona_test.sentinel
|
||||
0 0 200 1 0 sakila.actor
|
||||
|
Reference in New Issue
Block a user