Closed Leavrth closed 2 years ago
[REVIEW NOTIFICATION]
This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer
in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer
in the comment to help you merge this pull request.
The full list of commands accepted by this bot can be found here.
mysql> select _tidb_rowid from db_test.t1 limit 1;
ERROR 1054 (42S22): Unknown column '_tidb_rowid' in 'field list'
$ ./sync_diff_inspector --config config1.toml
debug: show table `db_test`.`t1`'s create table info:
CREATE TABLE `t1` (
`id` bigint(20) NOT NULL,
`term` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
A total of 1 tables need to be compared
debug: show table `db_test`.`t1`'s create table info:
CREATE TABLE `t1` (
`id` bigint(20) NOT NULL,
`term` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */
Comparing the table structure of ``db_test`.`t1`` ... equivalent
Comparing the table data of ``db_test`.`t1`` ... equivalent
_____________________________________________________________________________
Progress [============================================================>] 100% 0/0
A total of 1 table have been compared and all are equal.
You can view the comparision details through '/tmp/sync-diff.output.2022-09-23T12.36.47+0800/sync_diff.log'
mysql> select _tidb_rowid from db_test.t1 limit 0;
Empty set (0.00 sec)
mysql> select _tidb_rowid from db_test.t0 limit 0; Empty set (0.00 sec)
$ ./sync_diff_inspector --config config1.toml
debug: show table db_test
.t0
's create table info:
CREATE TABLE t0
(
id
bigint(20) NOT NULL,
term
varchar(100) DEFAULT NULL,
PRIMARY KEY (id
) /T![clustered_index] NONCLUSTERED /
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin/!90000 SHARD_ROW_ID_BITS=2 /
debug: show table db_test
.t1
's create table info:
CREATE TABLE t1
(
id
bigint(20) NOT NULL,
term
varchar(100) DEFAULT NULL,
PRIMARY KEY (id
) /T![clustered_index] NONCLUSTERED /
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
A total of 2 tables need to be compared
debug: show table db_test
.t1
's create table info:
CREATE TABLE t1
(
id
bigint(20) NOT NULL,
term
varchar(100) DEFAULT NULL,
PRIMARY KEY (id
) /T![clustered_index] NONCLUSTERED /
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
Progress [>------------------------------------------------------------] 0% 0/0
debug: show table db_test
.t0
's create table info:
CREATE TABLE t0
(
id
bigint(20) NOT NULL,
term
varchar(100) DEFAULT NULL,
PRIMARY KEY (id
) /T![clustered_index] NONCLUSTERED /
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin/!90000 SHARD_ROW_ID_BITS=2 /
Comparing the table structure of db_test`.`t1
... equivalent
Comparing the table structure of db_test`.`t0
... equivalent
Comparing the table data of db_test`.`t1
... equivalent
Comparing the table data of db_test`.`t0
... equivalent
Progress [============================================================>] 100% 0/0 A total of 2 table have been compared and all are equal. You can view the comparision details through '/tmp/sync-diff.output.2022-09-23T12.41.47+0800/sync_diff.log'
@jackysp: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.
/merge
This pull request has been accepted and is ready to merge.
Signed-off-by: Leavrth jianjun.liao@outlook.com
What problem does this PR solve?
Issue Number: close #678
What is changed and how it works?
for version < 5, regard primary key as nonclustered. so we can add annotation for create table info, if there is no annotation about clustered.
Check List
Tests