Undo previous fix, it is not reliable
Drop setting $MYSQL_LIBDIR, mtr can't be sure anyway
Test is set to override plugin-dir to some known existing dir
This patch adds a new client utility that enables or disables plugin
features. The utility disables or enables a plugin using values (name,
soname, and symbols) provided via a configuration file by the same name.
For example, to ENABLE the daemon_example plugin, the utility will read
the daemon_example.ini configuration file and use the values contained to
enable or disable the plugin.
Issue:
------
New test case mysql_embedded.test was failing on pb2.
Description:
------------
To run this test case executable libmysqld/examples/mysql_embedded is required.
But as per /libmysqld/examples/cmake_install.cmake this executable doesn't get
copied to <install_dir> when mysql is installed at <install_dir>.That is the
reason it was passing in my local branch and failed on pb2 when pushed.
Solution;
---------
Added code in mysql-test-run.pl, which will try to see if this file exists.If
It doesn't exist, test case will be skipped with a skip message. New code in
mysql-test-run.pl looks only for directory libmysqld/examples/mysql_embedded
because this is the only place where this file could/does exist.
mysql-test/mysql-test-run.pl:
Added new variable for mysql_embedded executable.
mysql-test/t/disabled.def:
enabled mysql_embedded.test which was disabled earlier.
mysql-test/t/mysql_embedded.test:
Modified test case to first verify if mysql_embedded executable exists. If
it does not, skip the test.
Added --result-file option, which will produce var/mtr-results.txt
Output has a simple format:
<tag> : <value> for general info on test run
{
<tag> : <value>
....
} for each test
Output from failed tests are included but may be truncated.
See WL for more details.
Make a qualified guess: if $basedir/lib does not exist but $basedir/lib64
does, then the latter is the proper value for $MYSQL_LIBDIR
Tested on the RPMS of 5.5.12.
Produce a pseudo test valgrind_reports.
Reports are generated by each worker, don't want one test for each.
Send message 'VALGREP' if report was found, master thread will pick this up
With this combination, outoput was directed to .trace but not all
parts of MTR was aware of this.
Replace .err with .trace at the earliest possible place
Fix for --vs-config applied
Find.pm incorrectly tested an unitialized local variable instead
of the global, corrected.
Find.pm is also wrong in 5.5: uses a non-existent global variable. Fix when
merging up.
Forgot that the main thread would be idle while waiting for tests
Added sub mark_time_idle() so ignore time spent waiting
Also added a new time category 'admin' to take some of 'init'
Added necessary options and variables
Added dbx_arguments() similar to gdb_arguments()
Unlike gdb, cannot use init file but must provide commands and args as
command line argument to dbx
Also simplified debugger behavior to always start with a breakpoint in main()
Added code to call 'ctest' if the needed cmake file is present
Will do so unless tests/suited named on mtr command line
Also add option to turn on/off
Will be made to look like a test 'unit-test' which counts towards total
Extracts summary report and any test failures from ctest output
Addendum: added override to turn off in PB, add back in selected invocations
post-push fix: make it work in out-of-source builds.
mysql-test/mysql-test-run.pl:
Set MYSQL_BINDIR, to be used by tests.
mysql-test/t/file_contents.test:
Use MYSQL_BINDIR, which is different from MYSQL_LIBDIR for out-of-source builds.
Added --debug-server and use $opt_debug_server where appropriate
Let --debug imply --debug-server
When merging to 5.5, must adapt fix for 59148
Oops, set debug => debug-server too late, fixed
Do as mysqld_safe: if running mysqld-debug, plugins are in debug subdirs
NB mtr --debug won't work in this context until 47141 is fixed
Also moved read_plugin_defs; no point running this in all worker threads
Added --mysqld-env option, propagate via safe_process
Simplified: should be safe to set in parent safe_process after it's started
Addendum: catch cases of --mysqld-env w/o value, assume env.var
name never begins with "--"
Race condition may occur: mtr sees the .expect file but it's empty
Fix: wait and try again if file is empty
Addendum: try again if line isn't 'wait' or 'restart'
Also added verbose printout of extra restart options
- Make it possible to use MTR_MAXNDB to set the upper limit of number of
parallel ndb test to run.
- Very useful on machines with many cores and lots of RAM