-
Notifications
You must be signed in to change notification settings - Fork 687
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
mysql-compatibility: correct performance_schema statement #19737
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@mjonss: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@@ -137,7 +137,7 @@ As shown, because of the shared allocator, the `id` increments by 2 each time. T | |||
|
|||
<CustomContent platform="tidb"> | |||
|
|||
TiDB utilizes a combination of [Prometheus and Grafana](/tidb-monitoring-api.md) for storing and querying performance monitoring metrics. In TiDB, performance schema tables do not return any results. | |||
TiDB utilizes a combination of [Prometheus and Grafana](/tidb-monitoring-api.md) for storing and querying performance monitoring metrics. In TiDB, most [performance schema tables](/performance-schema/performance-schema.md) do not return any results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this update also apply to the custom content for TiDB Cloud?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
mysql-5.7.28-TiDB-Serverless> TABLE performance_schema.session_variables LIMIT 5;
+-----------------------------------+----------------+
| VARIABLE_NAME | VARIABLE_VALUE |
+-----------------------------------+----------------+
| innodb_io_capacity_max | 2000 |
| tidb_non_prepared_plan_cache_size | 100 |
| version_compile_os | linux |
| net_retry_count | 10 |
| tidb_current_ts | 0 |
+-----------------------------------+----------------+
5 rows in set (0.04 sec)
mysql-5.7.28-TiDB-Serverless> SELECT TIDB_VERSION()\G
*************************** 1. row ***************************
TIDB_VERSION(): Release Version: v7.1.3-serverless
Edition: Community
Git Commit Hash: 2e8be50b073c26b8979c6988a3888ce57b5cec99
Git Branch: release-7.1-serverless
UTC Build Time: 2024-11-22 15:30:17
GoVersion: go1.21.11
Race Enabled: false
TiKV Min Version: 6.1.0
Check Table Before Drop: false
Store: tikv
1 row in set (0.02 sec)
So performance_schema.session_variables
is not empty.
performance_schema.session_connect_attrs
doesn't exist on TiDB Cloud Serverless, which is because v7.1.3 doesn't yet have this table. TiDB v7.5 does have this table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like session_variables
was introduced in v6.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On TiDB Cloud Serverless this is the only table with data.
$ mysqldump -u '4BFMphWRTf5tr4V.root' -h gateway01.eu-central-1.prod.aws.tidbcloud.com -P 4000 -pXXXXXXXXXX --skip-lock-tables --no-create-info performance_schema | awk '/^INSERT/ { print substr($0,0,100) }'
mysqldump: [Warning] Using a password on the command line interface can be insecure.
-- Warning: column statistics not supported by the server.
INSERT INTO `session_variables` VALUES ('tidb_build_stats_concurrency','4'),('tidb_opt_skew_distinct
On TiDB Cloud Dedicated there are most likely more.
What is changed, added or deleted? (Required)
The
session_connect_attrs
table is not empty and thepd%
,tidb%
andtikv%
tables are also not empty.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?