Bug #59700 | executable in odd place for Windows builds - cannot use --basedir to find mysqld | ||
---|---|---|---|
Submitted: | 24 Jan 2011 16:37 | Modified: | 15 Mar 2011 11:30 |
Reporter: | Chuck Bell | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Tools: MTR / mysql-test-run | Severity: | S3 (Non-critical) |
Version: | OS: | Windows | |
Assigned to: | Bjørn Munch | CPU Architecture: | Any |
[24 Jan 2011 16:37]
Chuck Bell
[24 Jan 2011 19:05]
Peter Laursen
"Unfortunately, either a task with that ID does not exist, or it is not a publicly available Worklog entry."
[25 Jan 2011 9:19]
Bjørn Munch
It's not clear to me what the problem is. Where IS your mysqld.exe? If the problem is that mysqld.exe is not in ./sql but in a subdirectory, that's a build issue. If the problem is that mtr can't find it, you may try using --vs-config=<subdir>. If the problem is that the *tool* can't find mysqld.exe you probably have to fix the tool to look in alternative directories.
[25 Jan 2011 9:59]
Bjørn Munch
Ah, I think I get it. You need to be able to pass the correct --basedir to the tool from within an mtr test? This code snippet might help, after running this in a test, the variable $BASEDIR should be set to the value you need: ------ perl; use File::Basename; my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD}; my $dirn= dirname($mysqld); open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/dirn.inc") or die; print FILE "let \$BASEDIR= $dirn;\n"; close FILE; EOF source $MYSQL_TMP_DIR/dirn.inc; remove_file $MYSQL_TMP_DIR/dirn.inc; ----- This is a modified version of code used in another test that needed the executable name, I added a call to dirname().
[25 Jan 2011 13:27]
Chuck Bell
Bundle with mysql_plugin code.
Attachment: 5710_ready.bundle (application/octet-stream, text), 31.00 KiB.
[25 Jan 2011 14:07]
Bjørn Munch
OK, that's what I thought, you'd need to add the --basedir option, please see my previous comment for a solution. I think this should work. Also, I would strongly suggest you use the new mechanism for adding plugins done in Bug #58841, see include/plugin.defs. This avoids having to hard code the settings in mtr.pl.
[26 Jan 2011 10:11]
Bjørn Munch
MTR cannot "fix" the different path to the executable on Windows, the test needs to do something along the lines of my suggestion to get the information it needs. Setting to "!Bg", could as an alternative define this as a test bug (as it currently can't run on Windows)