Bug #3031 mysql-test-run doesn't work after installation
Submitted: 2 Mar 2004 0:57 Modified: 11 Mar 2004 1:51
Reporter: Victor Vagin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:4.0 OS:Linux (Linux Suse 7.2)
Assigned to: Michael Widenius CPU Architecture:Any

[2 Mar 2004 0:57] Victor Vagin
Description:
vva@eagle:/tmp/mysql-test-bug/mysql-test > ./mysql-test-run
Installing Test Databases
Removing Stale Files
Installing Master Databases
mysqld is missing - looked in ../bin
Error:  Could not install master test DBs

How to repeat:
cd <directory with your sources of mysql-4.0>
./BUILD/compile-pentium-debug
./configure --prefix=/tmp/mysql-test-bug/
./make
./make install
cd /tmp/mysql-test-bug/mysql-test/
./mysql-test-run

Suggested fix:
===== mysql-test/install_test_db.sh 1.23 vs edited =====
*** /tmp/install_test_db.sh-1.23-16862  Mon Sep 16 17:55:15 2002
--- edited/mysql-test/install_test_db.sh        Tue Mar  2 16:36:05 2004
***************
*** 7,13 ****

  if [ x$1 = x"-bin" ]; then
   shift 1
!  execdir=../bin
   bindir=../bin
   BINARY_DIST=1
   fix_bin=mysql-test
--- 7,13 ----

  if [ x$1 = x"-bin" ]; then
   shift 1
!  execdir=../libexec
   bindir=../bin
   BINARY_DIST=1
   fix_bin=mysql-test
[11 Mar 2004 1:51] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The propsed fix worked for make install but not for a distribution made with
'make_binary_distribution'

I have now made a fix that works with both cases. Fix will be in 4.0.19 and 4.1.2

==== mysql-test/install_test_db.sh 1.24 vs edited =====
10c10,17
<  execdir=../bin
---
>
> # Check if it's a binary distribution or a 'make install'
> if test -x ../libexec/mysqld
>  then
>    execdir=../libexec
>  else
>    execdir=../bin
> fi