Bug #86431 readline support broken in 5.6.36
Submitted: 23 May 2017 13:42 Modified: 11 Jul 2017 8:34
Reporter: Nils Fahldieck Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.6.36 OS:Debian (8)
Assigned to: CPU Architecture:Any
Tags: cmake, readline

[23 May 2017 13:42] Nils Fahldieck
Description:
mysql 5.6.36 won't compile with our debian/rules file. We used the same file for 5.6.35 and prior versions. READLINE support seems broken.

The returned error is:

...
/build/mysql-5/client/mysql.cc:2771:80: error: 'completion_matches' was not declared in this scope
     return completion_matches((char *)text, (CPFunction *)new_command_generator);
...

Our cmake command is:

            cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5 \
                -DSYSCONFDIR=/etc/mysql5 \
                -DCMAKE_EXE_LINKER_FLAGS="-ljemalloc" -DWITH_SAFEMALLOC=OFF \
                -DCMAKE_VERBOSE_MAKEFILE=ON \
                -DWITH_PIC=On \
                -DOPTIMIZER_TRACE=0 \
                -DENABLED_PROFILING=0 \
                -DWITH_PERFSCHEMA_STORAGE_ENGINE=0 \
                -DMYSQL_UNIX_ADDR=/home/tmp/mysql5.sock \
                -DCMAKE_BUILD_TYPE=RelWithDebInfo \
                -DWITH_LIBWRAP=ON \
                -DWITH_ZLIB=system \
                -DWITH_SSL=bundled \
                -DMYSQL_TCP_PORT=3307 \
                -DMYSQL_USER=mysql5 \
                -DWITH_READLINE=system \
                -DENABLED_LOCAL_INFILE=ON \
                -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \
                -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
                -DSYSTEM_TYPE="debian-linux-gnu" \
                -DINSTALL_LAYOUT=RPM \
                -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
                -DINSTALL_PLUGINDIR=lib/mysql/plugin \
                -DINSTALL_SECURE_FILE_PRIVDIR=/var/lib/mysql5-files \
                -DWITH_EMBEDDED_SERVER=ON \
                -DHAVE_EMBEDDED_PRIVILEGE_CONTROL=ON \
                -DWITH_ARCHIVE_STORAGE_ENGINE=ON \
                -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
                -DWITH_FEDERATED_STORAGE_ENGINE=ON \
                -DCONNECTION_CONTROL_PLUGIN=0 \
                -DWITHOUT_CONNECTION_CONTROL=1 \
                -DWITH_CONNECTION_CONTROL_PLUGIN=0 \
                -DWITH_EXTRA_CHARSETS=all ..'

Thanks!

How to repeat:
Build v 5.6.36 with our cmake command.
[14 Jun 2017 13:39] MySQL Verification Team
Thank you for the report.
Could you please provide exact OS details, readline library details and unaltered cmake output? Thank you!

regards,
umesh
[15 Jun 2017 13:00] Nils Fahldieck
Cmake Output

Attachment: cmake.out (application/octet-stream, text), 27.93 KiB.

[15 Jun 2017 13:00] Nils Fahldieck
OS Information:

Linux debian-build 4.4.70 #1 SMP Sun Jun 4 22:13:00 UTC 2017 x86_64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"

Readline Information:

# apt-cache policy libreadline6 libreadline6-dev
libreadline6:
  Installed: 6.3-8+b3
  Candidate: 6.3-8+b3
  Version table:
 *** 6.3-8+b3 0
        500 http://ftp.de.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status
libreadline6-dev:
  Installed: 6.3-8+b3
  Candidate: 6.3-8+b3
  Version table:
 *** 6.3-8+b3 0
        500 http://ftp.de.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status

Cmake Command:

PATH=/bin:/usr/bin CC=x86_64-linux-gnu-gcc CXX=x86_64-linux-gnu-g++ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5 -DSYSCONFDIR=/etc/mysql5 -DCMAKE_EXE_LINKER_FLAGS=-ljemalloc -DWITH_SAFEMALLOC=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DOPTIMIZER_TRACE=0 -DENABLED_PROFILING=0 -DWITH_PERFSCHEMA_STORAGE_ENGINE=0 -DMYSQL_UNIX_ADDR=/home/tmp/mysql5.sock -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_LIBWRAP=ON -DWITH_ZLIB=system -DWITH_SSL=bundled -DMYSQL_TCP_PORT=3307 -DMYSQL_USER=mysql5 -DWITH_READLINE=system -DENABLED_LOCAL_INFILE=ON -DCOMPILATION_COMMENT="(Debian)" -DMYSQL_SERVER_SUFFIX=-1 -DSYSTEM_TYPE=debian-linux-gnu -DINSTALL_LAYOUT=RPM -DINSTALL_LIBDIR=lib/x86_64-linux-gnu -DINSTALL_PLUGINDIR=lib/mysql/plugin -DINSTALL_SECURE_FILE_PRIVDIR=/var/lib/mysql5-files -DWITH_EMBEDDED_SERVER=ON -DHAVE_EMBEDDED_PRIVILEGE_CONTROL=ON -DWITH_ARCHIVE_STORAGE_ENGINE=ON -DWITH_BLACKHOLE_STORAGE_ENGINE=ON -DWITH_FEDERATED_STORAGE_ENGINE=ON -DCONNECTION_CONTROL_PLUGIN=0 -DWITHOUT_CONNECTION_CONTROL=1 -DWITH_CONNECTION_CONTROL_PLUGIN=0 -DWITH_EXTRA_CHARSETS=all ..

Cmake Output:

Please see attached file "cmake.out".

Thank you!
[11 Jul 2017 8:34] MySQL Verification Team
Hello Nils Fahldieck,

Thank you for the report.
Discussed internally with development and confirmed that you will have to install  libedit-dev package and use  -DWITH_EDITLINE=system instead of -DWITH_READLINE. Quoting from our manual  "MySQL distributions no longer include the GPL readline input-editing library. This results in simpler maintenance and support, and simplifies licensing considerations" - https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-5.html

Also, if you see - cmake complains and confirms this as well:

-- 5.6.35/5.6.36 

CMake Warning:
  Manually-specified variables were not used by the project: WITH_READLINE

Thanks,
Umesh