white attemting to prepare the sql-bench suite that is installed with mysql's docs i encountered a syntax error in sql-bench's environment variables that locate perl modules in @INC Reproducible: Always Steps to Reproduce: 1. emerge mysql 2. perl /usr/share/mysql-{packageversion}/sql-bench/run-all-tests 3. observe the path that run-all-tests looks for @INC 4. Installing the dependant scripts in an accepted @INC path will not satisfy perl due to the syntax of $pwd and the cwd() function attempting to find bench-init.pl at /root/bench-init.pl Actual Results: gateway ~ # perl /usr/share/mysql/sql-bench/run-all-tests Can't locate /root/bench-init.pl in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i686-linux .) at /usr/share/mysql/sql-bench/run-all-tests line 43. Expected Results: usable mysql benchmarking suite for gentoo linux I'm quite positive that the following section of the script is responsible for the error. specifically the path variable in the $dir variable @ORG_ARGV=@ARGV; $pwd = cwd(); $pwd = "." if ($pwd eq ''); require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; $opt_silent=0; $perl=$^X; $machine=machine(); $redirect= !($machine =~ /windows/i || $machine =~ "^NT\s") ? "2>&1" : ""; $dir= ($pwd =~ /\\/) ? '\\' : '/'; # directory symbol for shell
Read the upstream documentation: http://dev.mysql.com/doc/mysql/en/MySQL_Benchmarks.html You must change to the /usr/share/mysql/sql-bench/ directory to run the tests.