Release Notes for MariaDB Shell 23.03.2
This page is part of MariaDB's MariaDB Documentation.
The parent of this page is: Release Notes for MariaDB Shell 23.03
Topics on this page:
Overview
MariaDB Shell is a command-line tool that unifies troubleshooting and administration for MariaDB database products.
MariaDB Shell 23.03.2 was released on 2023-05-05. This release is a Technical Preview and should not be used in production environments.
Notable Changes
The
-N
and--skip-column-names
command-line options can be used to remove column names from output for all output formats. (TENT-320)Starting with this release, a command-line containing this parameter will remove column names from output:
$ mariadb-shell --skip-column-names
The
--delimiter
command-line option can be used to set the delimiter. (TENT-301)Starting with this release, you can set the delimiter by doing the following:
$ mariadb-shell --delimiter '|'
By default, the delimiter is
;
The pager can be set to
grep STRING
. (TENT-310)Starting with this release, you can set the pager to
grep STRING
using thepager
sub-command:MariaDB (No Database) » pager grep STRING
Or you can set the pager using the
--pager
command-line option:$ mariadb-shell --pager 'grep STRING'
The
warm
sub-command supports multiple tables. (TENT-256)Starting with this release, when a database is selected, multiple tables can be warmed using the following syntax:
MariaDB (No Database) » warm tab1 tab2 tab3
And when a database is not selected, multiple tables can be warmed using the following syntax:
MariaDB (No Database) » warm db1.tab1 db1.tab2 db1.tab3
DSNs can be specified without specifying a database. (TENT-217)
Starting with this release, the
--dsn
and--url
command-line options can be set to a DSN without a database:$ mariadb-shell --dsn mariadb://USER:PASSWORD@HOST:PORT/
Numeric values are right-aligned in tabular output formats. (TENT-305)
Issues Fixed
Can Result in Hang or Crash
When the
--generate-defaults
command-line option is specified, MariaDB Shell crashes. (TENT-324, TENT-311)In previous releases, MariaDB Shell crashes with the following error messages in this scenario:
This will overwrite /home/USER/.msh.cnf with defaults. Continue? [y]|n: y Traceback (most recent call last): File "/root/.pyenv/versions/3.10.4/lib/python3.10/site-packages/cx_Freeze/initscripts/__startup__.py", line 131, in run File "/root/.pyenv/versions/3.10.4/lib/python3.10/site-packages/cx_Freeze/initscripts/console.py", line 16, in run File "/sealion/sealion/__main__.py", line 23, in <module> File "/sealion/sealion/app.py", line 196, in main File "/sealion/sealion/defaults.py", line 89, in populate FileNotFoundError: [Errno 2] No such file or directory: 'msh_resources/template.cnf' SL00 (9999) - MariaDB Shell has crashed! For more information see: https://r.mariadb.com/shell/SL009999
Starting with this release, MariaDB Shell does not crash, and a configuration file is generated.
When the
fish help dump
sub-command is executed, MariaDB Shell crashes. (TENT-329)Starting with this release, MariaDB Shell does not crash, and the help output is shown.
Can Result in Unexpected Behavior
When the
fish collector
sub-command is executed, execution of the collector is prevented. (TENT-328)Starting with this release, the collector executes properly.
When the
--output
command-line option is set toclassic
,modern
, ormysql
, an error is raised. (TENT-320)In previous releases, the following error is raised:
SLDB (0101) - 'bool' object is not subscriptable
Starting with this release, no error is raised, and the output format is set.
When the output format is set, query execution time is printed in a manner that does not conform to the output format. (TENT-320)
Starting with this release, query execution time is not printed for most output formats.
When the output format is
json pretty
, the output is not formatted properly. (TENT-319)In previous releases, the output is not pretty-printed.
Starting with this release, the output is pretty-printed.
When the
grants
sub-command is executed for a user without privileges, an error is raised. (TENT-169)In previous releases, the following error is raised:
-- SLDB (1142) - ERROR 1142 (42000): SELECT command denied to user 'USER'@'HOST' for table `mysql`.`global_priv`
Starting with this release, no error is raised, but the following message is printed:
Grants for USER USER has no grants
When the
fish dump
sub-command is executed in non-interactive mode, an error is raised. (TENT-316)Starting with this release, no error is raised.
When the
fish report
sub-command is executed, no report is created. (TENT-314)Starting with this release, the report is created.
When the
max help
sub-command is executed, an inaccurate message is printed in the help output. (TENT-313)In previous releases, the help output includes the following inaccurate message:
Help not available for this command.
Starting with this release, the inaccurate message is not printed in the help output.
Binary values are printed in a manner that is inconsistent with MariaDB Client's behavior. (TENT-309)
In previous releases, binary values are printed in Python's default format for binary data.
Starting with this release, binary values are printed as strings, which is consistent with MariaDB Client's behavior.
NULL
values are binary values are formatted inconsistently in different output formats. (TENT-308)Starting with this release,
NULL
values and binary values are formatted consistently.
In Windows installations, MariaDB Shell is listed as "msh" in the install dialogs and the list of installed programs. (TENT-307)
Starting with this release, MariaDB Shell is listed as "mariadb-shell".
When a query is executed non-interactively using the
-e
or--execute
command-line options, if the query fails, the exit code does not reflect the failure. (TENT-300)In previous releases, the exit code is
0
in this scenario, which indicates successful execution.Starting with this release, the exit code is a non-zero value in this scenario, which indicates unsuccessful execution.
When MariaDB Shell's output is piped to a program that fails, MariaDB Shell raises an error. (TENT-299)
In previous releases, this issue can cause failures like the following:
$ mariadb-shell --help | grep -i "-D"
grep: option requires an argument -- D usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]] [-e pattern] [-f file] [--binary-files=value] [--color=when] [--context[=num]] [--directories=action] [--label] [--line-buffered] [--null] [pattern] [file ...] Traceback (most recent call last): File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/cx_Freeze/initscripts/__startup__.py", line 131, in run File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/cx_Freeze/initscripts/console.py", line 16, in run File "sealion/__main__.py", line 23, in <module> File "/Users/cheat117/Documents/scripting/GitHub/sealion/sealion/app.py", line 193, in main File "/Users/cheat117/Documents/scripting/GitHub/sealion/sealion/args.py", line 345, in help File "/Users/cheat117/.pyenv/versions/3.10.7/lib/python3.10/argparse.py", line 2556, in print_help File "/Users/cheat117/.pyenv/versions/3.10.7/lib/python3.10/argparse.py", line 2562, in _print_message File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 41, in write File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 162, in write File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 195, in write_plain_text File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 41, in write File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 162, in write File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert File "/Users/cheat117/Documents/scripting/GitHub/sealion/venv/lib/python3.10/site-packages/colorama/ansitowin32.py", line 196, in write_plain_text BrokenPipeError: [Errno 32] Broken pipe Exception ignored in: <colorama.ansitowin32.StreamWrapper object at 0x102a91e70> BrokenPipeError: [Errno 32] Broken pipe
Starting with this release, MariaDB Shell does not raise an error.
When the output format is
json
, values raise an error. (TENT-273)In previous releases, the following error is raised:
SLOU (0101) - Object of type Decimal is not JSON serializable For more information see: https://r.mariadb.com/shell/SLOU0101
Starting with this release, the type is formatted without raising an error.
The description for the
--generate-defaults
command-line option in the help output refers to the wrong configuration file. (TENT-266)In previous releases, it refers to
~/.my.cnf
Starting with this release, it refers to
~/.msh.cnf
When the
connect
sub-command fails to form a connection, MariaDB Shell's behavior is inconsistent between different types of failures. (TENT-264)In previous releases, certain types of failures in this scenario would cause MariaDB Shell to abort, but other types of errors would cause the user to be returned to the interactive shell after raising an error message.
Starting with this release, connection failures in this scenario should cause the user to be returned to the interactive shell after raising an error message.
When a tabular output format is selected and a column contains tab characters (
\t
), the tab character breaks the format. (TENT-242)In previous releases, MariaDB Shell prints each tab character as-is in the output.
Starting with this release, MariaDB Shell converts each tab character to 4 space characters in the output.
When the
disconnect
sub-command is executed, MariaDB Shell quits. (TENT-195)Starting with this release, MariaDB Shell closes the connection and remains running without a connection in this scenario.
When input is redirected to MariaDB Shell, MariaDB Shell still outputs the message of the day, headers, and prompts. (TENT-132)
Starting with this release, MariaDB Shell's output is more similar to MariaDB Client in this scenario.
When a stored procedure is executed without a database selected, MariaDB Shell can raise confusing error messages. (TENT-130, TENT-155)
In previous releases, error messages like the following can be raised:
MariaDB (No Database) » call whatever(); SLHE (21243) - Unknown prepared statement handler (4294967295) given to mysqld_stmt_execute For more information see: https://docs.mariadb.com/mariadb-shell/SLHE21243
Starting with this release, the following error message is raised:
You must select a database before attempting to run a procedure.
When output contains tab characters (
\t
) and thetsv
output format is used, tab characters are not escaped. (TENT-34)Starting with this release, tab characters are escaped in this scenario.
Known Issues
When a macOS user connected by SSH to CentOS 7 executes MariaDB Shell, MariaDB Shell fails with errors related to character encoding. (TENT-323)
This issue can result in the following error messages:
Traceback (most recent call last): File "/sealion/sealion/commands.py", line 179, in execute File "/sealion/sealion/commands.py", line 837, in execute_internal File "/sealion/sealion/formatter.py", line 625, in format_output File "/sealion/sealion/formatter.py", line 287, in stream_results File "/sealion/sealion/formatter.py", line 486, in stream_mariadb_results File "/sealion/sealion/formatter.py", line 339, in stream_modern_mariadb File "/sealion/sealion/formatter.py", line 574, in print_row File "/sealion/sealion/messages.py", line 116, in console File "/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/termcolor.py", line 124, in cprint UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-21: ordinal not in range(128) None SLDB (0101) - 'ascii' codec can't encode characters in position 0-21: ordinal not in range(128) For more information see: https://r.mariadb.com/shell/SLDB0101
To prevent this issue from occurring, set the
LC_ALL
environment variable before starting MariaDB Shell:$ export LC_ALL="en_US.UTF-8"
Platforms
MariaDB Shell 23.03.2 is provided for:
Apple macOS (x86_
64, M1) CentOS 7 (x86_
64) Debian 10 (x86_
64) Debian 11 (x86_
64) Microsoft Windows (x86_
64) Red Hat Enterprise Linux 7 (x86_
64) Red Hat Enterprise Linux 8 (x86_
64) Red Hat Enterprise Linux 9 (x86_
64) Rocky Linux 8 (x86_
64) Rocky Linux 9 (x86_
64) Ubuntu 18.04 (x86_
64) Ubuntu 20.04 (x86_
64) Ubuntu 22.04 (x86_
64)