pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.39k stars 5.85k forks source link

Unknown column 'resource_group' in 'where clause' #55256

Open circle006 opened 3 months ago

circle006 commented 3 months ago
  1. Bug Report When clicking on the PD dashboard, an error message will appear: common.bad_request。 ["command dispatched failed"] [conn=1027959809086849523] [connInfo="id:1027959809086849523, addr:10.2.103.78:30840 status:10, collation:utf8mb4_general_ci, user:root"] [command=Prepare] [status="inTxn:0, autocommit:1"] [sql="SELECT Digest, Query, Conn_ID, (UNIX_TIMESTAMP(Time) + 0E0) AS timestamp, Query_time, Mem_max FROM INFORMATION_SCHEMA.CLUSTER_SLOW_QUERY WHERE (Time BETWEEN FROM_UNIXTIME(?) AND FROM_UNIXTIME(?)) AND RESOURCE_GROUP IN (?) ORDER BY Time DESC LIMIT 100"] [txn_mode=PESSIMISTIC] [timestamp=0] [err="[planner:1054]Unknown column 'resource_group' in 'where clause'。

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

  3. What did you see instead (Required)

    image
  4. What is your TiDB version? (Required) mysql> select tidb_version(); +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tidb_version() | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Release Version: v7.1.5 Edition: Enterprise Git Commit Hash: caa60c0917a886933a525d25e17057faac5b4da2 Git Branch: HEAD UTC Build Time: 2024-04-24 11:10:49 GoVersion: go1.20.10 Race Enabled: false TiKV Min Version: 6.2.0-alpha Check Table Before Drop: false Store: tikv Enterprise Extension Commit Hash: 245fe7cff8c8e30b70adbf49dc8ce0f19edcf282 | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)

nolouch commented 1 week ago

7.1.5 did not add this filed in CLUSTER_SLOW_QUERY, I think it's mistake that tidb-dashboard picked some pr from 7.5 above