Skip to content

Improve TiDB compatibility#1014

Merged
amjith merged 1 commit intodbcli:masterfrom
dveeden:tidb
Dec 24, 2021
Merged

Improve TiDB compatibility#1014
amjith merged 1 commit intodbcli:masterfrom
dveeden:tidb

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