MySQL ===== COMMENTS -------- There are two versions of DBT2(TPC-C) test: - pure C based version of the test(nonSP) - server side SP based version of the test(default) It is possible to run C based(nonSP) test with any version of MySQL server. To run test you have to build test with includes and libraries from MySQL 5.0 or higher. See examples/mysql/mysql-dbt2.cnf for example MySQL defaults file. MULTI-TIER TESTING ------------------ - Enable 'PermitUserEnvironment' in sshd_config. - Set DBT2DATADIR in the database system user's '.ssh/environment' file: DBT2DATADIR=/tmp/mydbt2 - Enalbe tcp/ip listening in the defaults file (see example from above). This binds to all network interfaces:: bind-address = 0.0.0.0 - The build scripts automatically grants remote access to DB_USER (default root) for everything from any ip address. If there are other users that require access, the grant will have to be done manually: grant all on *.* to ${DB_USER}@'%'; PREPARATION FOR TEST -------------------- 0. Build test binaries NOTE: If you want to compile with MySQL support, you must either make sure that path to 'mysql_config' is listed in your PATH environment variable. :: cmake CMakeLists.txt -DDBMS=mysql make make install 1. How to generate data files for test? One has to specify:: -w - number of warehouses (example: -w 3) -d - output path for data files (example: -d /tmp/dbt2-w3) - mode (example: --mysql) datagen -w 3 -d /tmp/dbt2-w3 --mysql Please note that output directory for data file should exist. 2. How to load test database? You should run shell script which will create database scheme and will load all data files. :: dbt2-mysql-build-db -d dbt2 -f /tmp/dbt2-w3 -v -w 2 -s /tmp/mydbt2.sock usage: dbt2-mysql-build-db [options] options:: -d -f -m -c -s -h -u -p -e -l -v Example: dbt2-mysql-build-db -d dbt2 -f /tmp/dbt2-w3 -s /tmp/mysql.sock -p ~/src/dbt2/examples/mysql/mysql-dbt2.cnf 3. How to load SP procedures? dbt2-mysql-load-stored-procs usage: dbt2-mysql-load-sp [options] options:: -d -f -h -s -u -p -t Example: dbt2-mysql-load-stored-procs -d dbt2 -f ~/src/dbt2/storedproc/mysql/ -s /tmp/mysql.sock RUN TEST -------- dbt2-run usage: dbt2-run -a mysql -c -t -w other options:: -D -h -l -S -u -x -s -t -z -n -v -o -p some of the usefull log files:: results/client/${HOSTNAME}.*/error.log - errors from backend C|SP based results/driver/${HOSTNAME}.*/error.log - errors from terminals(driver) results/mix.log - info about performed transactions r esults/report.txt - results of the test