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

Improve TiDB compatibility #1014

Merged
merged 1 commit into from
Dec 24, 2021
Merged

Improve TiDB compatibility #1014

merged 1 commit into from
Dec 24, 2021

Conversation

dveeden
Copy link
Contributor

@dveeden dveeden commented Nov 15, 2021

Description

When connected to https://github.com/pingcap/tidb, the status command didn't work.

This PR together with pingcap/tidb#29790 fixes that:

  • An 'Uptime' status variable is added to TiDB
  • Change the status command in mycli so that it won't fail if Threads_connected etc don't exist.
MySQL root@127.1:mysql> status
--------------
mycli 1.24.1, running on CPython 3.10.0

+----------------------+------------------------------------------------------------------------------------------------------------------------+
|                      |                                                                                                                        |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Connection id:       | 15                                                                                                                     |
| Current database:    | mysql                                                                                                                  |
| Current user:        | root@127.0.0.1                                                                                                         |
| Current pager:       | System default                                                                                                         |
| Server version:      | 5.7.25-TiDB-v5.4.0-alpha-110-g4b295081e-dirty TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible |
| Protocol version:    | 10                                                                                                                     |
| Connection:          | 127.1 via TCP/IP                                                                                                       |
| Server characterset: | utf8mb4                                                                                                                |
| Db characterset:     | utf8mb4                                                                                                                |
| Client characterset: | utf8                                                                                                                   |
| Conn. characterset:  | utf8                                                                                                                   |
| TCP port:            | 4000                                                                                                                   |
| Uptime:              | 10 min 52 sec                                                                                                          |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
--------------
Time: 0.016s
MySQL root@127.1:mysql>     

Checklist

  • I've added this contribution to the changelog.md.
  • I've added my name to the AUTHORS file (or it's already there).

@dveeden
Copy link
Contributor Author

dveeden commented Nov 18, 2021

The check for "linux (3.6)" seems to be a false positive

@dveeden
Copy link
Contributor Author

dveeden commented Dec 21, 2021

cc @amjith @pasenor

@amjith
Copy link
Member

amjith commented Dec 24, 2021

Thanks for the PR Daniël. I don't get to use TiDB but the change seems harmless to mysql. Merging.

@amjith amjith merged commit 2af459d into dbcli:master Dec 24, 2021
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

Successfully merging this pull request may close these issues.

2 participants