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

Unexpected error when executing non-transaction point get #45662

Closed
pcqz opened this issue Jul 28, 2023 · 2 comments
Closed

Unexpected error when executing non-transaction point get #45662

pcqz opened this issue Jul 28, 2023 · 2 comments
Labels
type/bug The issue is confirmed as a bug.

Comments

@pcqz
Copy link

pcqz commented Jul 28, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> begin;
Query OK, 0 rows affected (0.00 sec)

mysql> select k from sbtest1 where id=(select id from sbtest2 where id=100);
+------+
| k    |
+------+
| 4996 |
+------+
1 row in set (0.00 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> select k from sbtest1 where id=(select id from sbtest2 where id=101);
+------+
| k    |
+------+
| 5035 |
+------+
1 row in set (0.00 sec)

mysql> desc select k from sbtest1 where id=(select id from sbtest2 where id=101);
+--------------------+---------+------+---------------+-------------------+
| id                 | estRows | task | access object | operator info     |
+--------------------+---------+------+---------------+-------------------+
| Projection_11      | 1.00    | root |               | sbtest1.sbtest1.k |
| └─Point_Get_12     | 1.00    | root | table:sbtest1 | handle:101        |
+--------------------+---------+------+---------------+-------------------+
2 rows in set (0.01 sec)

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

No error log seen in TiDB log.

3. What did you see instead (Required)

[2023/07/28 17:32:29.638 +08:00] [ERROR] [optimistic.go:139] ["failed init txnStartTS with MaxUint64"] [error="cannot force prepare const start ts because txn is active"] [conn=4450607564958204317] [text="select k from sbtest1 where id=(select id from sbtest2 where id=101)"]

4. What is your TiDB version? (Required)

v6.5.1

@pcqz pcqz added the type/bug The issue is confirmed as a bug. label Jul 28, 2023
@lcwangchao
Copy link
Collaborator

This issue has been fixed by: #40197 though this PR is not intended to do this...

@lcwangchao
Copy link
Collaborator

#40197 has been cherry-pick to release-6.5: #44092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants