Bug #24735 libedit using wrong termcap/terminfo interface on HPUX
Submitted: 30 Nov 2006 21:01 Modified: 13 May 2011 12:37
Reporter: Kolbe Kegel Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.22, 5.0.30 OS:HP/UX (HPUX 11.00)
Assigned to: CPU Architecture:Any
Tags: bfsm_2006_12_07, hpux, libedit, termcap, terminfo

[30 Nov 2006 21:01] Kolbe Kegel
Description:
Starting the non-GPL client on HPUX gives some termcap/terminfo-related errors regardless of the value of the TERM environment variable.

How to repeat:
1. Obtain non-GPL .tar.gz package for HPUX
2. Unzip/tar package
3. Run scripts/mysql_install_db
4. Start the server
5. Start the client

kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ export TERM=xterm
kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ ./bin/mysql --socket=./data/mysql.sock 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.30-enterprise MySQL Enterprise Server (Commercial)

No entry for terminal type "xterm";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql 5.0.30-enterprise (root) "test"> Bye
kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ export TERM=ansi 
kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ ./bin/mysql --socket=./data/mysql.sock 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.30-enterprise MySQL Enterprise Server (Commercial)

No entry for terminal type "ansi";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql 5.0.30-enterprise (root) "test"> Bye
kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ export TERM=dumb
kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ ./bin/mysql --socket=./data/mysql.sock 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.30-enterprise MySQL Enterprise Server (Commercial)

No entry for terminal type "dumb";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql 5.0.30-enterprise (root) "test"> Bye

kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ export TERM=v1   
kkegel@hp3750 mysql-enterprise-5.0.30-hpux11.00-hppa2.0w-64bit $ ./bin/mysql --socket=./data/mysql.sock 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.30-enterprise MySQL Enterprise Server (Commercial)

Cannot read termcap database;
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Suggested fix:
Perhaps the libedit being built is not properly configured to read the HPUX terminfo/termcap database?

A function such as tigetflag() or setupterm() might yield better results?
[13 May 2011 12:38] Davi Arnaut
The bug is triaged to be fixed in trunk, but given that HP-UX is no longer a supported platform, there's nothing to fix. Closing the bug as "Won't fix".
[13 May 2011 13:18] Davi Arnaut
Incidentally, one might wish to report this issue upstream so that it gets fixed eventually.