I just upgraded from an old MySQL client to mariadb-clients-10.0.21-3 on Arch Linux. After the upgrade, I no longer see a prompt when using Emacs's sql-mysql
function.
It seems mysql
is buffering the prompt, because it shows up in the first line of output:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 19662
Server version: 4.1.11-standard-log
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
show tables;
MySQL [dbname]> +---------------------------------------------------------+
| Tables_in_dbname |
+---------------------------------------------------------+
...
+---------------------------------------------------------+
80 rows in set (0.02 sec)
help
MySQL [dbname]>
General information about MariaDB can be found at
http://mariadb.org
List of all MySQL commands:
...
For server side help, type 'help contents'
?
MySQL [dbname]>
General information about MariaDB can be found at
http://mariadb.org
List of all MySQL commands:
...
For server side help, type 'help contents'
exit
MySQL [dbname]> Bye
In all cases, the line before "MySQL [dbname]>
" is what I typed. (...
indicates output I omitted.)
How can I get the prompt to display properly? I've tried the -n
option of mysql
; it had no effect. If I run mysql
in a terminal, it works fine.