Bug #55414 Segmentation fault for mysql/bin/mysql
Submitted: 20 Jul 2010 19:39 Modified: 27 Apr 2018 13:03
Reporter: Mike Carter Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1.48 OS:Linux (Oracle Enterprise)
Assigned to: CPU Architecture:Any
Tags: MySQL, segmentation fault

[20 Jul 2010 19:39] Mike Carter
Description:
After compiling and installing mysql from source into a non-standard location, I am able to start the mysqld daemon, but launching mysql binary results in the following:

-bash-3.2$ ./mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.48 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Segmentation fault

I had to compile ncurses 5.7 (and later 5.6, just to check) locally to provide for static compilation.

Configure is:

configure --prefix=/ngs/app/drepd --with-tcp-port=3307 --enable-assembler --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-mysqld-user=drepd --with-unix-socket-path=/ngs/app/drepd/mysql/tmp/mysql.sock --localstatedir=/ngs/app/drepd/mysql/data --with-named-curses-libs=/ngs/app/drepd/lib/libncurses.a

no gdb available.

How to repeat:
Only call to bin/mysql results in segfault.

Is this the only binary relying on ncurses libraries?
[20 Jul 2010 21:49] Hartmut Holzgraefe
You probably had the ncurses shared library package installed, but not the ncurses-dev package?

Problem is that you compiled against termcap headers then which defines the same data structures as ncurses, but with different members ... and this mismatch makes the command line client crash when using libncurses.so with the wrong structure implementation ...
[21 Aug 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[27 Apr 2018 13:03] Yngve Svendsen
Posted by developer:
 
Seems safe to assume that this wasn't a bug.