On 24/11 14.20, Mats Kindahl wrote:
> #At file:///home/bzr/mkindahl/testing-trunk-bugfixing/ based on
> revid:sergey.glukhov@stripped
>
> 3388 Mats Kindahl 2010-11-24
> Bug #58455
> Starting mysqld with defaults file without
> extension cause segmentation fault
.....
> It also adds MYSQLD as enviroment variable to
> tests to be able to create a test that does not
> pass bootstrapping parameters, which seems to
> prevent the crash somehow.
Since this is a very special need by that test I don't like having to
add this to the general framework. The test can in fact get the path
to mysqld without argument with the help of this code snippet:
-------------------------
perl;
my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD};
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
print FILE "let \$MYSQLD= $mysqld;\n";
close FILE;
EOF
source $MYSQL_TMP_DIR/mysqld.inc;
remove_file $MYSQL_TMP_DIR/mysqld.inc;
-------------------------
After this, $MYSQLD will be path to the executable with args stripped
off. OK it's more complex but it's also more localized to where it's used.
- Bjorn