pt-table-checksum reports misleading error if comment contains '>' character
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
New
|
Undecided
|
Unassigned |
Bug Description
Hi all,
this is similar to https:/
I have tested it only for comments containing '>' character (2 of them). Probably, '<' could cause similar problem.
I have used same method to test, as in mentioned bug 1708749:
$ ./mtr --suite=rpl --start rpl_alter &
Logging: ./mtr --suite=rpl --start rpl_alter
MySQL Version 5.7.20
Checking supported features...
- SSL connections supported
Collecting tests...
Removing old var directory...
Creating var directory '/opt/MySQL/
Installing system database...
Using parallel: 1
=======
TEST RESULT TIME (ms) or COMMENT
-------
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
worker[1] mysql-test-run: WARNING: running this script as _root_ will cause some tests to be skipped
worker[1]
Started [mysqld.1 - pid: 28741, winpid: 28741] [mysqld.2 - pid: 28743, winpid: 28743]
worker[1] Using config for test rpl.rpl_alter
worker[1] Port and socket path for server(s):
worker[1] mysqld.1 13000 /opt/MySQL/
worker[1] mysqld.2 13001 /opt/MySQL/
worker[1] Waiting for server(s) to exit...
$ mysql --user root --socket=
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.20-log Source distribution
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database ptest;
Query OK, 1 row affected (0,00 sec)
mysql> use ptest
Database changed
mysql> create table tbl_test (id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The unique identifier of this table.', currency char(3) NOT NULL DEFAULT '' COMMENT 'currency (service charge) derived (C --> B --> C).', remark1 mediumtext COMMENT 'Generated from 1', remark2 mediumtext COMMENT 'Generated from 2', PRIMARY KEY (id)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 STATS_PERSISTENT=1;
Query OK, 0 rows affected (0,00 sec)
mysql> show create table tbl_test\G
*******
Table: tbl_test
Create Table: CREATE TABLE `tbl_test` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The unique identifier of this table.',
`currency` char(3) NOT NULL DEFAULT '' COMMENT 'currency (service charge) derived (C --> B --> C).',
`remark1` mediumtext COMMENT 'Generated from 1',
`remark2` mediumtext COMMENT 'Generated from 2',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=1
1 row in set (0,02 sec)
mysql> insert into tbl_test values (1, 'XYZ', 'blha, blah', 'foo bar');
Query OK, 1 row affected (0,00 sec)
mysql> ^DBye
$ mysql --user root --socket=
*******
Table: tbl_test
Create Table: CREATE TABLE `tbl_test` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The unique identifier of this table.',
`currency` char(3) NOT NULL DEFAULT '' COMMENT 'currency (service charge) derived (C --> B --> C).',
`remark1` mediumtext COMMENT 'Generated from 1',
`remark2` mediumtext COMMENT 'Generated from 2',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 STATS_PERSISTENT=1
$ pt-table-checksum --version
pt-table-checksum 3.0.5
$ pt-table-checksum h=127.0.
# A software update is available:
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
01-15T11:09:46 0 0 131 1 0 0.010 mtr.global_
01-15T11:09:46 0 0 0 1 0 0.007 mtr.test_
01-15T11:09:46 Skipping table ptest.tbl_test because it has problems on these replicas:
Table ptest.tbl_test on replica solarix is missing these columns: remark1, remark2
This can break replication. If you understand the risks, specify --no-check-
01-15T11:09:46 0 0 6 1 0 0.006 sys.sys_config
Two '>' characters caused "failure" (I guess that number of reported columns with error, corresponds to number of offending characters). Most likely '<' and few more legal comment characters can cause similar problem...
Definition from https:/
COMMENT:
* A comment for a column can be specified with the COMMENT option, up to 1024 characters long. The comment is displayed by the SHOW CREATE TABLE and SHOW FULL COLUMNS statements.
No limitation, just says: 'string'
Regards.
Created https:/ /jira.percona. com/browse/ PT-248 to track this issue.