Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
Q3/2026 Server Development
Description
We got the feature request to provide a new output format for the command line client which allows copy/paste of SQL statements created via SQL, controlled via an SQL statement option like \G. A requirement is that it also works on Windows, using a pager is therefor not an option
Example:
select concat('analyze table ', table_name, ';') from information_schema.tables where table_schema='test';
|
generates
+-------------------------------------------+
|
| concat('analyze table ', table_name, ';') |
|
+-------------------------------------------+
|
| analyze table t_auto; |
|
| analyze table t2; |
|
| analyze table t1; |
|
+-------------------------------------------+
|
The request is an output like:
analyze table t_auto;
|
analyze table t2;
|
analyze table t1;
|
The output can be generated using the mariadb command line client with options, but not when using the command line client in the interactive mode.
mariadb -u root -pPassword123! -N -B -e "select concat('analyze table ', table_name, ';') from information_schema.tables where table_schema='test'"
|
- the command line option -B could be added as \B behaving like the command line option and would also not show the column names