[MDEV-6468] MYSQL_PS1 no longer handles "\n" correctly Created: 2014-07-21  Updated: 2014-09-05  Due: 2014-09-05  Resolved: 2014-09-05

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.1.67, 5.2.14, 5.3.12
Fix Version/s: 5.1.73, 5.2.15, 5.3.13

Type: Bug Priority: Minor
Reporter: Eric W. Bates Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

FreeBSD 10.0-RELEASE-p3
FreeBSD 9.x-RELEASE
FreeBSD 8.x-RELEASE



 Description   

As of the first release of MariaDB, the '\n' char no longer results in a CR/LF in the mysql prompt when it is included in MYSQL_PS1. This does not appear to be a problem in any of the mysql releases I have used (e.g. 5.1.6).

e.g: my prompt:

 ** root@hazel ** ~ ** Mon Jul 21 15:49:06
# set | grep -i mysql
MYSQL_PS1=' \u ** \d ** \D\nsql> '

results in:

 ** root@hazel ** ~ ** Mon Jul 21 15:49:21
# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2649
Server version: 5.3.12-MariaDB-log Source distribution
 
Copyright (c) 2000, 2012, Oracle, Monty Program Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
 ericx ** (none) ** Mon Jul 21 15:49:30 201sql> 

Should have reported this a long time ago...
Thanks for your time.



 Comments   
Comment by Sergei Golubchik [ 2014-08-05 ]

I cannot repeat it. How did you build MariaDB?

Comment by Sergei Golubchik [ 2014-08-05 ]

To clarify: cannot repeat using mariadb-5.5.38 built on freebsd 9.2 from ports.

Comment by Eric W. Bates [ 2014-08-08 ]

um... Let me gather them..

On FreeBSD 10.0-RELEASE-p3:

  1. This file is auto-generated by 'make config'.
  2. Options for mariadb-client-5.3.7
    _OPTIONS_READ=mariadb-client-5.3.7
    _FILE_COMPLETE_OPTIONS_LIST= THREADSAFE STATIC SSL OPENSSL
    OPTIONS_FILE_SET+=THREADSAFE
    OPTIONS_FILE_UNSET+=STATIC
    OPTIONS_FILE_SET+=SSL
    OPTIONS_FILE_UNSET+=OPENSSL

Actual build is currently 5.3.12

On FreeBSD 9.1-STABLE:

  1. This file is auto-generated by 'make config'.
  2. Options for mariadb-client-5.3.12
    _OPTIONS_READ=mariadb-client-5.3.12
    _FILE_COMPLETE_OPTIONS_LIST=OPENSSL SSL STATIC THREADSAFE
    OPTIONS_FILE_SET+=OPENSSL
    OPTIONS_FILE_SET+=SSL
    OPTIONS_FILE_UNSET+=STATIC
    OPTIONS_FILE_SET+=THREADSAFE

Actual build is 5.3.12_3

On FreeBSD 9.1-RELEASE:

  1. This file is auto-generated by 'make config'.
  2. Options for mariadb-client-5.3.7
    _OPTIONS_READ=mariadb-client-5.3.7
    _FILE_COMPLETE_OPTIONS_LIST= THREADSAFE STATIC SSL OPENSSL
    OPTIONS_FILE_SET+=THREADSAFE
    OPTIONS_FILE_UNSET+=STATIC
    OPTIONS_FILE_SET+=SSL
    OPTIONS_FILE_UNSET+=OPENSSL

Actual build is currently 5.3.11

I can probably find a few more if needed; but I suspect the build
options are all the same.

I will attempt upgrading to 5.5.x and report.


Eric W. Bates
ericx@ericx.net
508/243-8341

Comment by Eric W. Bates [ 2014-08-09 ]

I can confirm that the problem is gone in 5.5.38 on FreeBSD
10-RELEASE-p5. I'm happy to know that it's been fixed and my servers can
wait for the upgrade.

I think it is worth pointing out that the port maintainer for MariaDB
still has 5.3.x as the default build (don't know why) and I, for one,
found the upgrade to be difficult.

Thank you.


Eric W. Bates
ericx@ericx.net
508/243-8341

Comment by Sergei Golubchik [ 2014-09-05 ]

Already fixed in 5.5, we won't backport the fix to 5.1—5.3

Generated at Thu Feb 08 07:12:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.