-
Notifications
You must be signed in to change notification settings - Fork 20
RandomQueryGeneratorQuickStart
The Random Query Generator is a tool for testing the MySQL server by means of randomly generated data and queries. Both the data and the queries are highly configurable and various different scenarios can be tested. More information is available here.
Linux, Solaris, Windows (ActiveState Perl and Cygwin) and OS X are known to work.
- * Download page
- From Launchpad using Bazaar:
$ bzr branch lp:randgen
Fedora/RedHat:
$ sudo yum install perl-DBD-mysql
Ubuntu:
http://packages.ubuntu.com/jaunty/libdbd-mysql-perl
Linux generic / OS X (to install CPAN first, see CPAN instructions in point 3 below):
$ perl -MCPAN -e 'install DBD::mysql'
OS X with MacPorts:
$ sudo port install DBD::mysql NOTE: This will likely result in 2 versions of perl on your system - one in /opt/local which can cause problem. <br>The CPAN install method works well and should be recommended if you don't want to use MacPorts (or similar software)
ActiveState Perl 5.6
c:\>ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/DBD-mysql.ppd
ActiveState Perl 5.8
c:\>ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd
ActiveState Perl 5.10
c:\>ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/DBD-mysql.ppd
Fedora/RedHat:
$ sudo yum install cpan
$ perl -MCPAN -e 'install Test::More'
$ perl -MCPAN -e 'install Digest::MD5'
Only required if you want the RQG to generate XML reports from your test runs (option --xml-output=your_filename).
The module has no extra non-core dependencies and can be installed via CPAN or ppm.
$ perl -MCPAN -e 'install XML::Writer'
Only required for automatic bug simplification, such as the util/simplify* scripts and the ResultsetComparatorSimplify Validator
perl -MCPAN -e 'install DBIx::MyParsePP'
Only required if you want to use the ExecutionTimeComparator validator with extended statistical qualification of results.
If the module is not installed, the validator will still work, but possibly with reduced functionality (depending on settings). Default settings do not require this module.
perl -MCPAN -e 'install Statistics::Descriptive'
Only required if you want to use the OptimizerTraceParser validator, which grabs JSON-formatted text from MySQL, validates the syntax and makes a Perl datastructure out of it.
perl -MCPAN -e 'install JSON'
Only required to run RQG unit tests (testing the RQG itself). See the file unit/README for details.
perl -MCPAN -e 'install Test::Unit'
- Against an already running server:
$ perl gentest.pl \ --dsn=dbi:mysql:host=127.0.0.1:port=3306:user=root:database=test \ --gendata=conf/example.zz \ --grammar=conf/example.yy
- Against a source or binary distribution:
$ perl runall.pl \ --basedir=/path/to/mysql/distribution --gendata=conf/example.zz \ --grammar=conf/example.yy
More information is available here