Bug #54466 client 5.5 built from source lacks "pager" support
Submitted: 13 Jun 2010 12:41 Modified: 2 Sep 2010 15:57
Reporter: Giuseppe Maxia Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.5.4, 5.5.99, 5.6.99 OS:Any (Linux and OSX)
Assigned to: Alexey Botchkov CPU Architecture:Any
Tags: build, client, compiling, pager, regression

[13 Jun 2010 12:41] Giuseppe Maxia
Description:
When compiling MySQL 5.5 from source, the resulting client lacks support for pager.

How to repeat:
Compile MySQL with default options both on 5.1.48 and 5.5.4.

5.1.48:    ./BUILD/compile-pentium-max
        or ./BUILD/compile-amd64-max

5.5.4 :    ./BUILD/compile-amd64-max
        or ./cmake . && make 

On 5.1.48 the client can do "pager". On 5.5.4, it cannot.
[14 Jun 2010 7:31] Daniel Fischer
It seems that we now define THREAD for the entire build, which causes mysql.cc to not support a pager. There is no way to turn this off.
[14 Jun 2010 8:03] Daniel Fischer
Additional note: This is a regression going from autofoo to cmake; building 5.5 with autofoo still enables the pager command.

I don't know what we should do. We could
1) define MYSQL_CLIENT_NO_THREADS in the client build with cmake 
2) remove the condition that has been there since 2003; popen() from a thread shouldn't be a problem these days
[25 Jul 2010 21:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/114303

3133 Alexey Botchkov	2010-07-25
      Bug#54466      client 5.5 built from source lacks "pager" support
              some applications in the client/ directory should be compiled
              with -DMYSQL_CLIENT_NO_THREADS. That particularly does #undef THREAD and
              thus enables the --pager option for the mysql client.
              I copied the defines from client/Makefile.am to the client/CMakeLists.txt
      
      per-file comments:
        client/CMakeLists.txt
      Bug#54466      client 5.5 built from source lacks "pager" support
              compile with -DMYSQL_CLIENT_NO_THREADS, and undef it for some other applications
        mysql-test/r/mysql.result
      Bug#54466      client 5.5 built from source lacks "pager" support
              result updated.
        mysql-test/t/mysql.test
      Bug#54466      client 5.5 built from source lacks "pager" support
              test case added.
[4 Aug 2010 22:40] Davi Arnaut
Bug#55751 was closed as a duplicate.
[20 Aug 2010 12:17] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/116386

3193 Alexey Botchkov	2010-08-19
      Bug#54466      client 5.5 built from source lacks "pager" support
                    #ifdef THREAD removed from mysql.cc.
                     No reason was found for this limitation to persist.
      
      per-file comments:
        client/mysql.cc
      Bug#54466      client 5.5 built from source lacks "pager" support
              now we have USE_POPEN always if not __WIN__
        mysql-test/r/mysql.result
      Bug#54466      client 5.5 built from source lacks "pager" support
              result updated.
        mysql-test/t/mysql.test
      Bug#54466      client 5.5 built from source lacks "pager" support
              test case added.
[20 Aug 2010 13:17] Alexey Botchkov
pushed into 5.5-bugfixing.
[25 Aug 2010 9:23] Bugs System
Pushed into mysql-5.5 5.5.6-m3 (revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (version source revid:alik@ibmvm-20100825092002-2yvkb3iwu43ycpnm) (merge vers: 5.5.6-m3) (pib:20)
[26 Aug 2010 2:07] Paul DuBois
Noted in 5.5.6 changelog.

For distributions built with cmake rather than the GNU autotools,
mysql lacked pager support. 

Setting report to Need Merge pending push to 5.6.x.
[30 Aug 2010 8:31] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (version source revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (merge vers: 5.6.1-m4) (pib:21)
[30 Aug 2010 8:34] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (version source revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (pib:21)
[30 Aug 2010 18:22] Paul DuBois
Noted in 5.6.1 changelog.