Bug 268113 - databases/mariadb106-client command prompt does not accept new line character \n in my.cnf
Summary: databases/mariadb106-client command prompt does not accept new line character...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-02 02:21 UTC by Miroslav Lachman
Modified: 2022-12-02 02:21 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2022-12-02 02:21:38 UTC
We upgraded some of our machines from 10.3 to 10.6 and noticed that mysql client / mariadb client command prompt looks different in 10.6 because it does not accept newline character \n

\n is documented in https://mariadb.com/kb/en/mysql-command-line-client/

In 10.3 we had

[mysql]
prompt = \u @ \h [\d]:\nmysql>\_

The prompt looks like this:

root @ localhost [(mydatabase)]:
mysql>

With the same settings in MariaDB 10.6 the prompt looks like this:

root @ localhost [(mydatabase)]:mysql>

The prompt is not wrapped to 2 lines.


I already reported this issue to MariaDB Jira https://jira.mariadb.org/browse/MDEV-30018
The resolution of this issue is that it is not a bug in MariaDB client but libedit vs readline issue.


Sergei Golubchik wrote:
10.3 client doesn't have libedit.so.0, so it's indeed readline vs libedit issue. 10.3 is linked with a budled readline, while 10.6 uses system libedit.

Use

make CMAKE_ON=WITH_READLINE=bundled

to get 10.3-like build



Can we get back the right behavior of mariadb CLI?