Bug #37636 mysql-test-run.pl does not set up LD_LIBRARY_PATH properly
Submitted: 25 Jun 2008 15:54 Modified: 24 Mar 2009 13:41
Reporter: Daniel Fischer Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:5.0, 5.1, 6.0 OS:Any (unix, linux)
Assigned to: Bjørn Munch CPU Architecture:Any

[25 Jun 2008 15:54] Daniel Fischer
Description:
The test suite may not run in a UNIX binary package if the libaries it contains are not installed system-wide.

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

main.alias                     [ fail ]

ERROR: mysqltest returned unexpected code 127, it has probably crashed

Stopping All Servers
PATH/mysql-5.1.27-linux-x86_64-test/bin/mysqladmin: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
mtr_ping_with_timeout(): At least one server is alive.
mysql-test-run: WARNING: Forcing kill of process 18562
Restoring snapshot of databases
Resuming Tests

How to repeat:
Build a MySQL 5.1 binary package:
 
 $ ./configure
 $ make
 $ scripts/make_binary_distribution

Remove all traces of libmysqlclient.so* from your system, especially libraries installed system-wide.

Grab the package you created earlier, extract it, change to its mysql-test directory and run the test suite:

 $ perl mysql-test-run.pl alias

Suggested fix:
Set LD_LIBRARY_PATH in mysql-test-run.pl to include ../lib/mysql instead/in addition to ../lib.
[25 Jun 2008 19:02] Sveta Smirnova
Thank you for the report.

Verified as described using code analysis. Also I saw same error verifying bug reports. Probably workaround is export LD_LIBRARY_PATH=..., but I have environment now to test.
[30 Jun 2008 16:20] Daniel Fischer
This could be a different bug altogether, if we assume that the library is not supposed to end up in that place: bug#37697.
[24 Mar 2009 10: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/70158

2772 Bjorn Munch	2009-03-24
      Bug #37636 mysql-test-run.pl does not set up LD_LIBRARY_PATH properly
      Adds $basedir/lib/mysql for binary distribution
      modified:
        mysql-test/mysql-test-run.pl
[24 Mar 2009 13:41] Bjørn Munch
Duplicate of Bug #37697

Works if libraries are placed in lib instead of lib/mysql