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

"select * from information_schema.tidb_trx" error #57916

Closed
tiancaiamao opened this issue Dec 3, 2024 · 2 comments
Closed

"select * from information_schema.tidb_trx" error #57916

tiancaiamao opened this issue Dec 3, 2024 · 2 comments

Comments

@tiancaiamao
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

In a 1M tables environment, I run two mysql clients.

MySQL1:

mysql> select count(tidb_table_id) from information_schema.tables;
ERROR 8175 (HY000): Your query has been cancelled due to exceeding the allowed memory limit for a single SQL query. P
lease try narrowing your query scope or increase the tidb_mem_quota_query limit and try again.[conn=920649734]
mysql> 

During the execution of this query, execute "select * from information_schema.tidb_trx" several times.

MySQL2:

mysql> select * from tidb_trx;
ERROR 1105 (HY000): transaction future is not set
mysql> select * from tidb_trx;
^[[A+--------------------+----------------------------+--------------------+-------------------------+-------+------
--------------+-----------------+------------------+------------+------+--------------------+-----------------------
-----------------------------------------------+-------------------+--------------+
| ID                 | START_TIME                 | CURRENT_SQL_DIGEST | CURRENT_SQL_DIGEST_TEXT | STATE | WAITING_S
TART_TIME | MEM_BUFFER_KEYS | MEM_BUFFER_BYTES | SESSION_ID | USER | DB                 | ALL_SQL_DIGESTS           
                                           | RELATED_TABLE_IDS | WAITING_TIME |
+--------------------+----------------------------+--------------------+-------------------------+-------+----------
----------+-----------------+------------------+------------+------+--------------------+---------------------------
-------------------------------------------+-------------------+--------------+
| 454351137991819275 | 2024-12-03 15:47:23.731000 | NULL               | NULL                    | Idle  | NULL     
          |               0 |                0 |  920649734 | root |                    | ["a78636cadcc28711c100b1bd
9ef4ba6e9d7bb5dd5fc7cd7a1e3d21d44b11c824"] |                   |         NULL |
| 454351139630219265 | 2024-12-03 15:47:29.981000 | NULL               | NULL                    | Idle  | NULL     
          |               0 |                0 |  920649736 | root | information_schema | ["0cc25a9680ab3ad417f220fc
5500d21c46e5b1bc2630fb10eb3ada50b5c9b844"] |                   |         NULL |
+--------------------+----------------------------+--------------------+-------------------------+-------+----------
----------+-----------------+------------------+------------+------+--------------------+---------------------------
-------------------------------------------+-------------------+--------------+
2 rows in set (0.80 sec)

mysql> select * from tidb_trx;
ERROR 1105 (HY000): transaction future is not set
mysql> select * from tidb_trx;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

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

No error such as "ERROR 1105 (HY000): transaction future is not set"
No error such as "ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference"

3. What did you see instead (Required)

error

4. What is your TiDB version? (Required)

master 5598c11

@tiancaiamao tiancaiamao added type/bug The issue is confirmed as a bug. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor labels Dec 3, 2024
@tiancaiamao
Copy link
Contributor Author

During I test #57937, I found the query on information_schema.tidb_trx is not expected.

@tiancaiamao
Copy link
Contributor Author

Cannot reproduce it.
It seems to by caused by my changes in #57937

@tiancaiamao tiancaiamao removed type/bug The issue is confirmed as a bug. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor labels Dec 4, 2024
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

1 participant