Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The clustered table will report an error #21

Open
Chad20N13 opened this issue Jul 11, 2023 · 1 comment
Open

The clustered table will report an error #21

Chad20N13 opened this issue Jul 11, 2023 · 1 comment

Comments

@Chad20N13
Copy link

Chad20N13 commented Jul 11, 2023


[tidb@pingcap143 bin]$./tiflash-ctl check consistency --user root --password --database test --table ta --tidb_ip 
 xxx --tidb_port xxx > check_test_ta.log
Error: Error 1054: Unknown column '_tidb_rowid' in ''

MySQL [test]> show create table ta\G
*************************** 1. row ***************************
       Table: ta
Create Table: CREATE TABLE `ta` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(20) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=30002
1 row in set (0.00 sec)

MySQL [test]> 
MySQL [test]> select count(*) from ta;
+----------+
| count(*) |
+----------+
|    10000 |
+----------+
1 row in set (0.01 sec)

**MySQL [test]> select id,_tidb_rowid from ta;
ERROR 1054 (42S22): Unknown column '_tidb_rowid' in 'field list'**

MySQL [test]> select id from ta limit 10;
+----+
| id |
+----+
|  1 |
|  2 |
|  3 |
|  4 |
|  5 |
|  6 |
|  7 |
|  8 |
|  9 |
| 10 |
+----+
10 rows in set (0.01 sec)
@JaySon-Huang
Copy link
Owner

JaySon-Huang commented Jul 12, 2023

@Chad20N13 As the primary key id in your table schema is int, you can try to specify the "--row_id_col_name"

./tiflash-ctl check consistency --row_id_col_name id --user root --password --database test --table ta --tidb_ip xxx --tidb_port xxx > check_test_ta.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants