dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.

Home Page:http://mycli.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

-e does not honor \G in MySQL

kolinkorr839 opened this issue · comments

When I run this, I get this output (I have intentionally truncated the result so that it will be easier to compare). Notice how the output does not seem to respect "\G" (vertical output).

$ mycli local -e 'show engine innodb status\G'
Type	Name	Status
InnoDB		\n=====================================\n2023-04-12 23:37:35 280942319360 INNODB MONITOR OUTPUT\n=====================================\nPer second averages calculated from the last 3 seconds\n-----------------\nBACKGROUND

Compare it to this which is what I am hoping to see from the above.

[tmp]$ mycli local
127.0.0.1> show engine innodb status\G
***************************[ 1. row ]***************************
Type   | InnoDB
Name   |
Status |
=====================================
2023-04-12 23:38:42 279730820864 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 6 seconds
-----------------

The closest output that I can get is by using the --csv option so something like this which is okay but doesn't seem intuitive to me.

[tmp]$ mycli local -e 'show engine innodb status' --csv
"Type","Name","Status"
"InnoDB","","
=====================================
2023-04-12 23:41:38 280942024448 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 9 seconds

So how do I get -e with \G to show the proper vertical output?

Hi! Good point!