Change in MTR made in scope of
MDEV-12042 allow it to rebootstrap the server between consequent tests, if a test's options are suspected to be not compatible with the original bootstrap. The list of such options is hardcoded:
There are some problems to fix and things to improve.
The above logic does not work well enough when InnoDB options depend on other server settings. For example, if we run
This is because rebootstrap here doesn't actually work. It attempts to start with innodb options which require encryption, but without the encryption plugin itself, because it only chooses InnoDB options from $extra_opts, while plugin-load-add is ignored; so InnoDB doesn't start at all, and hence the tables and log files don't get created upon bootstrap.
From the bootstrap log:
Every time re-bootstrap is issued, it re-creates bootstrap.sql file from scratch. It shouldn't take that much resources, but it is unnecessary; besides, we are having troubles on Windows, where tests sometimes fail upon re-bootsrap apparently because the bootstrap.sql file is locked when they want to re-create it. While we don't know root cause of the problem, it might well go away if we just stop re-creating it when it already exists. One catch is that currently it's located in var/tmp, which is removed between the tests; but we can store it in var/log instead, it might even be beneficial to keep it after test run when we want to analyze some obscure bootstrap problems.
Not directly related to
MDEV-12042, but rather to investigating problems upon re-bootstrap – Wlad requested adding --console to bootstrap, to get more useful log.