RQG Extensions for MariaDB Features
Most of the components described below have been merged into the Main RQG tree on Launchpad. Most recent changes, and some patches which were not accepted to the main tree, can be found in our work tree.
SlaveCrashRecovery Reporter
The reporter can be used to test crash-safety of replication, specifically it was created to test crash-safety of MariaDB GTID implementation, but can be used to test the old-style replication as well, as long as it's expected to be crash-safe.
It is a periodic reporter, every 30 seconds it kills the slave server using SIGKILL
, and immediately restarts it on the old data directory, with the same parameters as before. On server restart, the reporter checks that the server itself and the replication started all right.
The reporter itself does not check consistency of the data, but it can be used together with ReplicationConsistency
reporter.
It is supposed to be used with runall-new.pl
, so that the server is started without MTR involvement.
LimitRowsExamined Transformer
The transformer was developed for testing new LIMIT ROWS EXAMINED functionality added in MariaDB 5.5. It can be used in the usual way, by providing its name in the --transformers
list.
The transformer checks whether the original query already contains a ROWS EXAMINED clause. If it does not, it adds the clause either after the LIMIT clause, or at the end of the query. In any case (even if ROWS EXAMINED was already there), the transformer returns the following sequence of statements:
FLUSH STATUS
- <the query with ROWS EXAMINED>
- <a query which sums up status variables related to examined rows>
The result of the main query is checked to be a subset of the original query's result set. The sum of status variables is checked to be not greater than the limit provided in the ROWS EXAMINED clause, plus a margin. The margin is configured in the transformer.
If the result of the transformed query appears not to be a subset of the original result set, STATUS_LENGTH_MISMATCH is returned.
If the sum of status variables is greater than the maximum allowed value, STATUS_REQUIREMENT_UNMET is returned.
Note: Status values STATUS_REQUIREMENT_UNMET and STATUS_REQUIREMENT_UNMET_SELECT were added to Constants.pm.
ShowExplain Validator
The validator was developed for testing the new functionality SHOW EXPLAIN introduced in MariaDB 10.0.
The validator checks that the output of SHOW EXPLAIN
correlates with the output of traditional EXPLAIN
executed for the same query. It also tries to filter out known expected mismatches between the produced plans.