Skip to content

RandomQueryGeneratorValgrind

philip-stoev edited this page Jul 17, 2012 · 1 revision

Category:RandomQueryGenerator

Usage

1. Compile mysqld appropriately, either with a BUILD/compile*valgrind* script or with a BUILD/compile*debug* script (may show false positives).

2. Run the RQG with --valgrind or --valgrind-xml

The RQG provides two Valgrind options:

  • --valgrind will redirect the Valgrind warnings into the server error log. The MarkErrorLog Validator will be activated and it will dump each query into the error log after the query has been processed. This allows to associate each valgrind output (also dumped to the error log) with the particular query that caused it. Note that if this option is used, the RQG will not abort with a failure if a Valgrind warning is reported. You will need to manually check the server error log.
  • --valgrind-xml will redirect the Valgrind warnings into a separate log/valgrind.xml XML file. The ValgrindXMLErrors Reporter will be automatically activated and, at the end of the test it will read the XML file and abort the test with STATUS_VALGRIND_FAILURE if the file contains non-innodb/xtradb warnings. However, with this option it is not possible to figure out which query caused the particular Valgrind warning, so you may need to rerun the test again with --valgrind
The Shutdown reporter will cleanly shut down the server so that valgrind can report outcome.

At this time, the RQG can not abort the test immediately after the first Valgrind warning is detected. In the same train of thought, simplification for queries is not available, though you can cook one using one of the util/simplify* scripts.