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

Cleaning up show status unused fields #51376

Closed
Tracked by #51048
zimulala opened this issue Feb 28, 2024 · 0 comments · Fixed by #51378
Closed
Tracked by #51048

Cleaning up show status unused fields #51376

zimulala opened this issue Feb 28, 2024 · 0 comments · Fixed by #51378
Assignees

Comments

@zimulala
Copy link
Contributor

zimulala commented Feb 28, 2024

In https://docs.pingcap.com/tidb/stable/sql-statement-show-status#examples the show status results only the following fields:

mysql> SHOW SESSION STATUS;
+-------------------------------+--------------------------------------+
| Variable_name                 | Value                                |
+-------------------------------+--------------------------------------+
| Ssl_cipher                    |                                      |
| Ssl_cipher_list               |                                      |
| Ssl_server_not_after          |                                      |
| Ssl_server_not_before         |                                      |
| Ssl_verify_mode               | 0                                    |
| Ssl_version                   |                                      |
| Uptime                        | 1409                                 |
| ddl_schema_version            | 116                                  |
| last_plan_binding_update_time | 0000-00-00 00:00:00                  |
| server_id                     | 61160e73-ab80-40ff-8f33-27d55d475fd1 |
+-------------------------------+--------------------------------------+

However, when there is a running DDL job, the job information is displayed.

tidb> show status;
+-------------------------------+--------------------------------------+
| Variable_name                 | Value                                |
+-------------------------------+--------------------------------------+
| Ssl_cipher                    |                                      |
| Ssl_cipher_list               |                                      |
| Ssl_server_not_after          |                                      |
| Ssl_server_not_before         |                                      |
| Ssl_verify_mode               | 0                                    |
| Ssl_version                   |                                      |
| Uptime                        | 34                                   |
| ddl_job_action                | create table                         |
| ddl_job_args                  | []                                   |
| ddl_job_error                 |                                      |
| ddl_job_id                    | 109                                  |
| ddl_job_reorg_handle          |                                      |
| ddl_job_row_count             | 0                                    |
| ddl_job_schema_id             | 2                                    |
| ddl_job_schema_state          | none                                 |
| ddl_job_snapshot_ver          | 0                                    |
| ddl_job_start_ts              | 448028215742300161                   |
| ddl_job_state                 | queueing                             |
| ddl_job_table_id              | 108                                  |
| ddl_schema_version            | 52                                   |
| last_plan_binding_update_time | 0000-00-00 00:00:00                  |
| server_id                     | 9cda270d-107f-4ced-a837-edd86583c899 |
+-------------------------------+--------------------------------------+

We will remove DDL job information that is not described in the documentation. Besides, if we want get the DDL job information, we can replace it with admin show ddl;, admin show ddl jobs; or select * from mysql.tidb_ddl_job limit 1;.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant