GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MYSQLTEST (1)

NAME

mysqltest - program to run test cases
mysqltest_embedded - program to run embedded test cases

CONTENTS

SYNOPSIS

mysqltest [options] [db_name]
mysqltest_embedded [options] [db_name]

DESCRIPTION

The mysqltest program runs a test case against a MariaDB server and optionally compares the output with a result file. This program reads input written in a special test language. Typically, you invoke mysqltest via mysql-test-run.pl rather than invoking it directly.

mysqltest_embedded is similar but is built with support for the libmysqld embedded server.

Features of mysqltest:

o

o Can send SQL statements to MariaDB servers for execution

o

o Can execute external shell commands

o

o Can test whether the result from an SQL statement or shell command is as expected

o

o Can connect to one or more standalone mysqld servers and switch between connections

o

o Can connect to an embedded server (libmysqld), if MariaDB is compiled with support for libmysqld. (In this case, the executable is named mysqltest_embedded rather than mysqltest.)

By default, mysqltest reads the test case on the standard input. To run mysqltest this way, you normally invoke it like this:

shell> mysqltest [options] [db_name] < test_file

You can also name the test case file with a --test-file=file_name option.

The exit value from mysqltest is 0 for success, 1 for failure, and 62 if it skips the test case (for example, if after checking some preconditions it decides not to run the test).

mysqltest supports the following options:

o

o --help, -?

Display a help message and exit.

o

o --basedir=dir_name, -b dir_name

The base directory for tests.

o

o --character-sets-dir=path

The directory where character sets are installed.

o

o --compress, -C

Compress all information sent between the client and the server if both support compression.

o

o --connect-timeout=num

This can be used to set the MYSQL_OPT_CONNECT_TIMEOUT parameter of mysql_options to change the number of seconds before an unsuccessful connection attempt times out.

o

o --continue-on-error

Continue test even if we got an error. This is mostly useful when testing a storage engine to see what from a test file it can execute, or to find all syntax errors in a newly created big test file.

o

o --cursor-protocol

Use cursors for prepared statements.

o

o --database=db_name, -D db_name

The default database to use.

o

o --debug[=debug_options], -#[debug_options]

Write a debugging log if MariaDB is built with debugging support. The default debug_options value is 'd:t:S:i:O,/tmp/mysqltest.trace'.

o

o --debug-check

Print some debugging information when the program exits.

o

o --debug-info

Print debugging information and memory and CPU usage statistics when the program exits.

o

o --host=host_name, -h host_name

Connect to the MariaDB server on the given host.

o

o --logdir=dir_name

The directory to use for log files.

o

o --mark-progress

Write the line number and elapsed time to test_file.progress.

o

o --max-connect-retries=num

The maximum number of connection attempts when connecting to server.

o

o --max-connections=num

The maximum number of simultaneous server connections per client (that is, per test). If not set, the maximum is 128. Minimum allowed limit is 8, maximum is 5120.

o

o --no-defaults

Do not read default options from any option files. If used, this must be the first option.

o

o --non-blocking-api

Use the non-blocking client API for communication.

o

o --overlay-dir=dir_name

Overlay directory.

o

o --password[=password], -p[password]

The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one.

o

o --plugin-dir=dir_name

Directory for client-side plugins.

o

o --port=port_num, -P port_num

The TCP/IP port number to use for the connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306).

o

o --prologue=name

Include the contents of the given file before processing the contents of the test file. The included file should have the same format as other mysqltest test files. This option has the same effect as putting a --source file_name command as the first line of the test file.

o

o --protocol={TCP|SOCKET|PIPE|MEMORY}

The connection protocol to use for connecting to the server. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want.

o

o --ps-protocol

Use the prepared-statement protocol for communication.

o

o --quiet

Suppress all normal output. This is a synonym for --silent.

o

o --record, -r

Record the output that results from running the test file into the file named by the --result-file option, if that option is given. It is an error to use this option without also using --result-file.

o

o --result-file=file_name, -R file_name

This option specifies the file for test case expected results. --result-file, together with --record, determines how mysqltest treats the test actual and expected results for a test case:

  o

o If the test produces no results, mysqltest exits with an error message to that effect, unless --result-file is given and the named file is an empty file.

  o

o Otherwise, if --result-file is not given, mysqltest sends test results to the standard output.

  o

o With --result-file but not --record, mysqltest reads the expected results from the given file and compares them with the actual results. If the results do not match, mysqltest writes a .reject file in the same directory as the result file, outputs a diff of the two files, and exits with an error.

  o

o With both --result-file and --record, mysqltest updates the given file by writing the actual test results to it.

o

o --result-format-version=#

Version of the result file format to use.

o

o --server-arg=value, -A value

Pass the argument as an argument to the embedded server. For example, --server-arg=--tmpdir=/tmp or --server-arg=--core. Up to 64 arguments can be given.

o

o --server-file=file_name, -F file_name

Read arguments for the embedded server from the given file. The file should contain one argument per line.

o

o --silent, -s

Suppress all normal output.

o

o --sleep=num, -T num

Cause all sleep commands in the test case file to sleep num seconds. This option does not affect real_sleep commands.

An option value of 0 can be used, which effectively disables sleep commands in the test case.

o

o --socket=path, -S path

The socket file to use when connecting to localhost (which is the default host).

o

o --sp-protocol

Execute DML statements within a stored procedure. For every DML statement, mysqltest creates and invokes a stored procedure that executes the statement rather than executing the statement directly.

o

o --ssl

Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.

o

o --ssl-ca=name

CA file in PEM format (check OpenSSL docs, implies --ssl).

o

o --ssl-capath=name

CA directory (check OpenSSL docs, implies --ssl).

o

o --ssl-cert=name

X509 cert in PEM format (check OpenSSL docs, implies --ssl).

o

o --ssl-cipher=name

SSL cipher to use (check OpenSSL docs, implies --ssl).

o

o --ssl-key=name

X509 key in PEM format (check OpenSSL docs, implies --ssl).

o

o --ssl-crl=name

Certificate revocation list (check OpenSSL docs, implies --ssl).

o

o --ssl-crlpath=name

Certificate revocation list path (check OpenSSL docs, implies --ssl).

o

o --ssl-verify-server-cert

Verify server’s "Common Name" in its cert against hostname used when connecting. This option is disabled by default.

o

o --suite-dir=dir_name

Suite directory.

o

o --tail-lines=nn

Specify how many lines of the result to include in the output if the test fails because an SQL statement fails. The default is 0, meaning no lines of result printed.

o

o --test-file=file_name, -x file_name

Read test input from this file. The default is to read from the standard input.

o

o --timer-file=file_name, -m file_name

If given, the number of microseconds spent running the test will be written to this file. This is used by mysql-test-run.pl for its reporting.

o

o --tmpdir=dir_name, -t dir_name

The temporary directory where socket files are created.

o

o --user=user_name, -u user_name

The MariaDB user name to use when connecting to the server.

o

o --verbose, -v

Verbose mode. Print out more information about what the program does.

o

o --version, -V

Display version information and exit.

o

o --view-protocol

Every SELECT statement is wrapped inside a view.

COPYRIGHT

Copyright © 2007, 2010, Oracle and/or its affiliates, 2010-2015 MariaDB Foundation

This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.

SEE ALSO

For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/

AUTHOR

MariaDB Foundation (http://www.mariadb.org/).
Search for    or go to Top of page |  Section 1 |  Main Index


MariaDB 10&.1 FBMYSQLTESTFR (1) 14/12/2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.