dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.5k stars 664 forks source link

Improve TiDB compatibility #1014

Closed dveeden closed 2 years ago

dveeden commented 3 years ago

Description

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

This PR together with https://github.com/pingcap/tidb/pull/29790 fixes that:

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

dveeden commented 3 years ago

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

dveeden commented 2 years ago

cc @amjith @pasenor

amjith commented 2 years ago

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