Skip to content

TiDB doesn't support primary key using pkishandle in the isolation read engines(value: 'tiflash') #61231

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

Open
lilinghai opened this issue May 21, 2025 · 0 comments · May be fixed by #61234
Open
Assignees
Labels
severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@lilinghai
Copy link
Contributor

lilinghai commented May 21, 2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE t (
  a bigint NOT NULL ,
  b int DEFAULT NULL,
  c varchar(100) NOT NULL,
  PRIMARY KEY (a) /*T![clustered_index] CLUSTERED */);
alter table t set tiflash replica 1;
set @@tidb_isolation_read_engines = 'tiflash';
select /*+ use_index(t,PRIMARY) */ count(*) from t;

2. What did you expect to see? (Required)

mysql> select /*+ use_index(t,PRIMARY) */ count(*) from t;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set, 1 warning (0.07 sec)

mysql> show warnings;
+---------+------+--------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                              |
+---------+------+--------------------------------------------------------------------------------------+
| Warning | 1105 | TiDB doesn't support index 'PRIMARY' in the isolation read engines(value: 'tiflash') |
+---------+------+--------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

ERROR 1815 (HY000): Internal : No access path for table 't' is found with 'tidb_isolation_read_engines' = 'tiflash', valid values can be 'tikv'. Please check tiflash replica.

4. What is your TiDB version? (Required)

master
6b11bda

@lilinghai lilinghai added type/bug The issue is confirmed as a bug. severity/moderate labels May 21, 2025
@lilinghai lilinghai self-assigned this May 21, 2025
@jebter jebter added the sig/planner SIG: Planner label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants