mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 14:18:32 +00:00
pt-t-c changed text of warnings and docs. Minor tweak of test for Ubuntu 14
This commit is contained in:
@@ -10976,18 +10976,15 @@ sub check_repl_table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $o->get('binary-key') ) {
|
if ( $o->get('binary-index') ) {
|
||||||
PTDEBUG && _d('--binary-key : checking if replicate table has binary type columns');
|
PTDEBUG && _d('--binary-index : checking if replicate table has binary type columns');
|
||||||
my $create_table = $tp->get_create_table( $dbh, $db, $tbl );
|
my $create_table = $tp->get_create_table( $dbh, $db, $tbl );
|
||||||
if ( $create_table !~ /lower_boundary`?\s+blob/si
|
if ( $create_table !~ /lower_boundary`?\s+BLOB/si
|
||||||
|| $create_table !~ /upper_boundary`?\s+blob/si )
|
|| $create_table !~ /upper_boundary`?\s+BLOB/si )
|
||||||
{
|
{
|
||||||
die "--binary-key was specified but current replicate table "
|
die "--binary-index was specified but the current checksum table ($db.$tbl) uses"
|
||||||
. "has text datatype boundary columns.\n"
|
." TEXT columns. To use BLOB columns, drop the current checksum table, then recreate"
|
||||||
. "You need to drop the current table and recreate it using "
|
." it by specifying --create-replicate-table --binary-index.";
|
||||||
. "both --create-replicate-table and --binary-key\n"
|
|
||||||
. "Alternatively you can manually create the replicate table "
|
|
||||||
. "as specified in the docs. See --binary-key usage\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11149,9 +11146,9 @@ sub create_repl_table {
|
|||||||
my $sql = $o->read_para_after(__FILE__, qr/MAGIC_create_replicate/);
|
my $sql = $o->read_para_after(__FILE__, qr/MAGIC_create_replicate/);
|
||||||
$sql =~ s/CREATE TABLE checksums/CREATE TABLE IF NOT EXISTS $repl_table/;
|
$sql =~ s/CREATE TABLE checksums/CREATE TABLE IF NOT EXISTS $repl_table/;
|
||||||
$sql =~ s/;$//;
|
$sql =~ s/;$//;
|
||||||
if ( $o->get('binary-key') ) {
|
if ( $o->get('binary-index') ) {
|
||||||
$sql =~ s/`?lower_boundary`?\s+text/`lower_boundary` blob/s;
|
$sql =~ s/`?lower_boundary`?\s+TEXT/`lower_boundary` BLOB/is;
|
||||||
$sql =~ s/`?upper_boundary`?\s+text/`upper_boundary` blob/s;
|
$sql =~ s/`?upper_boundary`?\s+TEXT/`upper_boundary` BLOB/is;
|
||||||
}
|
}
|
||||||
PTDEBUG && _d($dbh, $sql);
|
PTDEBUG && _d($dbh, $sql);
|
||||||
eval {
|
eval {
|
||||||
@@ -11829,10 +11826,10 @@ Check that the C<binlog_format> is the same on all servers.
|
|||||||
|
|
||||||
See "Replicas using row-based replication" under L<"LIMITATIONS">.
|
See "Replicas using row-based replication" under L<"LIMITATIONS">.
|
||||||
|
|
||||||
=item --binary-key
|
=item --binary-index
|
||||||
|
|
||||||
This option modifies the behavior of L<"--create-replicate-table"> such that the
|
This option modifies the behavior of L<"--create-replicate-table"> such that the
|
||||||
replicate table's upper and lower boundary columns are created with binary (blob)
|
replicate table's upper and lower boundary columns are created with the BLOB
|
||||||
datatype.
|
datatype.
|
||||||
This is useful in cases where you have trouble checksuming tables with keys that
|
This is useful in cases where you have trouble checksuming tables with keys that
|
||||||
include a binary datatype or that have non-standard character sets.
|
include a binary datatype or that have non-standard character sets.
|
||||||
@@ -12372,24 +12369,23 @@ Write checksum results to this table. The replicate table must have this
|
|||||||
structure (MAGIC_create_replicate):
|
structure (MAGIC_create_replicate):
|
||||||
|
|
||||||
CREATE TABLE checksums (
|
CREATE TABLE checksums (
|
||||||
db char(64) NOT NULL,
|
db CHAR(64) NOT NULL,
|
||||||
tbl char(64) NOT NULL,
|
tbl CHAR(64) NOT NULL,
|
||||||
chunk int NOT NULL,
|
chunk INT NOT NULL,
|
||||||
chunk_time float NULL,
|
chunk_time FLOAT NULL,
|
||||||
chunk_index varchar(200) NULL,
|
chunk_index VARCHAR(200) NULL,
|
||||||
lower_boundary text NULL,
|
lower_boundary TEXT NULL,
|
||||||
upper_boundary text NULL,
|
upper_boundary TEXT NULL,
|
||||||
this_crc char(40) NOT NULL,
|
this_crc CHAR(40) NOT NULL,
|
||||||
this_cnt int NOT NULL,
|
this_cnt INT NOT NULL,
|
||||||
master_crc char(40) NULL,
|
master_crc CHAR(40) NULL,
|
||||||
master_cnt int NULL,
|
master_cnt INT NULL,
|
||||||
ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (db, tbl, chunk),
|
PRIMARY KEY (db, tbl, chunk),
|
||||||
INDEX ts_db_tbl (ts, db, tbl)
|
INDEX ts_db_tbl (ts, db, tbl)
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
Note: lower_boundary and upper_boundary datatype can also be set to blob.
|
Note: lower_boundary and upper_boundary data type can be BLOB. See L<"--binary-index">.
|
||||||
See L<"--binary-key">
|
|
||||||
|
|
||||||
By default, L<"--[no]create-replicate-table"> is true, so the database and
|
By default, L<"--[no]create-replicate-table"> is true, so the database and
|
||||||
the table specified by this option are created automatically if they do not
|
the table specified by this option are created automatically if they do not
|
||||||
|
@@ -68,7 +68,7 @@ $sb->wait_for_slaves();
|
|||||||
# then starts it again.
|
# then starts it again.
|
||||||
# TEST_WISHLIST PLUGIN_WISHLIST: do this with a plugin to the tool itself,
|
# TEST_WISHLIST PLUGIN_WISHLIST: do this with a plugin to the tool itself,
|
||||||
# not in this unreliable fashion.
|
# not in this unreliable fashion.
|
||||||
system("$trunk/util/wait-to-exec '$scripts/wait-for-chunk.sh 12345 sakila city 1' '$scripts/exec-wait-exec.sh 12347 \"stop slave sql_thread\" 2 \"start slave sql_thread\"' 3 >/dev/null &");
|
system("$trunk/util/wait-to-exec '$scripts/wait-for-chunk.sh 12345 sakila city 1' '$scripts/exec-wait-exec.sh 12347 \"stop slave sql_thread\" 2 \"start slave sql_thread\"' 4 >/dev/null &");
|
||||||
|
|
||||||
$output = output(
|
$output = output(
|
||||||
sub { pt_table_checksum::main(@args, qw(-d sakila)); },
|
sub { pt_table_checksum::main(@args, qw(-d sakila)); },
|
||||||
|
Reference in New Issue
Block a user