MARIADB-TEST(1)
β¨ MARIADB-TEST(1) β¨
okay bestie, welcome to the MariaDB Database System corner of the man pages π this is the mariadb-test page and it is A LOT, so grab a snack π
πΈ NAME πΈ
mariadb-test β program to run test cases (mariadb-test is now a symlink to mariadb-test)
mariadb-test-embedded β program to run embedded test cases
π¦ SYNOPSIS π¦
mariadb-test [options] [db_name]
mariadb-test-embedded [options] [db_name]
π DESCRIPTION π
So. The mariadb-test program runs a test case against a MariaDB server, and optionally it compares the output with a result file. It reads input written in a special test language, no cap. Typically you invoke mariadb-test via mariadb-test-run.pl rather than invoking it directly β that's just how the girlies do it. π«Ά
mariadb-test-embedded is similar but it's built with support for the libmariadbd embedded server.
π Features of mariadb-test
- Can send SQL statements to MariaDB servers for execution
- Can execute external shell commands
- Can test whether the result from an SQL statement or shell command is as expected
- Can connect to one or more standalone
mariadbdservers and switch between connections - Can connect to an embedded server (
libmariadbd), if MariaDB is compiled with support forlibmariadbd. (In this case, the executable is namedmariadb-test-embeddedrather thanmariadb-test.)
By default, mariadb-test reads the test case on the standard input. To run mariadb-test this way, you normally invoke it like this:
shell> mariadb-test [options] [db_name] < test_file
You can also name the test case file with a --test-file=file_name option.
The exit value from mariadb-test 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). bestie, those numbers MATTER, ok? π
mariadb-test supports the following options:
β¨ OPTIONS β¨
--help,-?β Display a help message and exit.--basedir=dir_name,-b dir_nameβ The base directory for tests.--character-sets-dir=pathβ The directory where character sets are installed.--compress,-Cβ Compress all information sent between the client and the server if both support compression.--connect-timeout=numβ This can be used to set theMYSQL_OPT_CONNECT_TIMEOUTparameter ofmysql_optionsto change the number of seconds before an unsuccessful connection attempt times out.--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. literally the "keep going bestie" option π«Ά--cursor-protocolβ Use cursors for prepared statements.--database=db_name,-D db_nameβ The default database to use.--debug[=debug_options],-#[debug_options]β Write a debugging log if MariaDB is built with debugging support. The defaultdebug_optionsvalue is'd:t:S:i:O,/tmp/mariadb-test.trace'.--debug-checkβ Print some debugging information when the program exits.--debug-infoβ Print debugging information and memory and CPU usage statistics when the program exits.--host=host_name,-h host_nameβ Connect to the MariaDB server on the given host.--logdir=dir_nameβ The directory to use for log files.--mark-progressβ Write the line number and elapsed time totest_file.progress.--max-connect-retries=numβ The maximum number of connection attempts when connecting to server.--max-connections=numβ The maximum number of simultaneous server connections per client (that is, per test). If not set, the maximum is128. Minimum allowed limit is8, maximum is5120.--no-defaultsβ Do not read default options from any option files. If used, this must be the first option. (first. bestie. don't fight it.)--non-blocking-apiβ Use the non-blocking client API for communication.--overlay-dir=dir_nameβ Overlay directory.--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--passwordor-poption on the command line, you are prompted for one. π--plugin-dir=dir_nameβ Directory for client-side plugins.--port=port_num,-P port_numβ The TCP/IP port number to use for the connection or0for default to, in order of preference,my.cnf,$MYSQL_TCP_PORT,/etc/services, built-in default (3306).--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 othermariadb-testtest files. This option has the same effect as putting a--source file_namecommand as the first line of the test file.--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.--ps-protocolβ Use the prepared-statement protocol for communication.--quietβ Suppress all normal output. This is a synonym for--silent.--record,-rβ Record the output that results from running the test file into the file named by the--result-fileoption, if that option is given. It is an error to use this option without also using--result-file. π¨--result-file=file_name,-R file_nameβ This option specifies the file for test case expected results.--result-file, together with--record, determines howmariadb-testtreats the test actual and expected results for a test case:- If the test produces no results,
mariadb-testexits with an error message to that effect, unless--result-fileis given and the named file is an empty file. - Otherwise, if
--result-fileis not given,mariadb-testsends test results to the standard output. - With
--result-filebut not--record,mariadb-testreads the expected results from the given file and compares them with the actual results. If the results do not match,mariadb-testwrites a.rejectfile in the same directory as the result file, outputs a diff of the two files, and exits with an error. - With both
--result-fileand--record,mariadb-testupdates the given file by writing the actual test results to it.
- If the test produces no results,
--result-format-version=#β Version of the result file format to use.--server-arg=value,-A valueβ Pass the argument as an argument to the embedded server. For example,--server-arg=--tmpdir=/tmpor--server-arg=--core. Up to64arguments can be given.--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.--silent,-sβ Suppress all normal output.--sleep=num,-T numβ Cause allsleepcommands in the test case file to sleepnumseconds. This option does not affectreal_sleepcommands.- An option value of
0can be used, which effectively disablessleepcommands in the test case.
- An option value of
--socket=path,-S pathβ The socket file to use when connecting tolocalhost(which is the default host).--sp-protocolβ Execute DML statements within a stored procedure. For every DML statement,mariadb-testcreates and invokes a stored procedure that executes the statement rather than executing the statement directly.--sslβ Enable SSL for connection (automatically enabled with other flags). Disable with--skip-ssl.--ssl-ca=nameβ CA file in PEM format (check OpenSSL docs, implies--ssl).--ssl-capath=nameβ CA directory (check OpenSSL docs, implies--ssl).--ssl-cert=nameβ X509 cert in PEM format (check OpenSSL docs, implies--ssl).--ssl-cipher=nameβ SSL cipher to use (check OpenSSL docs, implies--ssl).--ssl-key=nameβ X509 key in PEM format (check OpenSSL docs, implies--ssl).--ssl-crl=nameβ Certificate revocation list (check OpenSSL docs, implies--ssl).--ssl-crlpath=nameβ Certificate revocation list path (check OpenSSL docs, implies--ssl).--ssl-verify-server-certβ Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.--suite-dir=dir_nameβ Suite directory.--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 is0, meaning no lines of result printed.--test-file=file_name,-x file_nameβ Read test input from this file. The default is to read from the standard input.--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 bymariadb-test-run.plfor its reporting.--tmpdir=dir_name,-t dir_nameβ The temporary directory where socket files are created.--user=user_name,-u user_nameβ The MariaDB user name to use when connecting to the server.--verbose,-vβ Verbose mode. Print out more information about what the program does.--version,-Vβ Display version information and exit.--view-protocolβ EverySELECTstatement is wrapped inside a view.
π COPYRIGHT π
Copyright Β© 2007, 2010, Oracle and/or its affiliates, 2010-2025 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-1335 USA or see http://www.gnu.org/licenses/.
π SEE ALSO π
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
β¨ AUTHOR β¨
Okay bestie, who even made this masterpiece? π
- MariaDB Foundation β literally the icons behind all of this π«Ά
Want to slide into their DMs / vibe with the whole org? The link is right here, no cap:
http://www.mariadb.org/
That's it. That's the author. The MariaDB Foundation said "we'll build an entire testing toolkit and just casually document it" and honestly? Ate. π
And that's the whole page, bestie!! π You made it to the end, so here's your lil' sign-off crown π β this gorgeous thing lives in MariaDB 11.8, and it was dated 5 March 2025. Go forth and test something, fr fr. πΈβ¨π¦
π¦ where this page comes from
- alpine 3.24: mariadb-doc 11.8.9-r0 Β· GPL-2.0-only
- arch rolling: mariadb 13.0.2-2 Β· GPL-2.0-only
- arch rolling: mariadb-lts 12.3.3-2 Β· GPL-2.0-only
- centos-stream 10: mariadb11.8-test 3:11.8.8-1.el10 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- centos-stream 9: mariadb-test 3:11.8.8-1.module_el9+1370+ec5ecc2e Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- debian trixie: mariadb-test 1:11.8.6-0+deb13u1 Β· GPL-2.0-only
- fedora 43: mariadb11.8-test 3:11.8.8-1.fc43 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 43: mariadb12.3-test 3:12.3.2-2.fc43 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 44: mariadb-test 3:11.8.6-2.fc44 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 44: mariadb-test 3:11.8.8-3.fc44 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 44: mariadb12.3-test 3:12.3.2-2.fc44 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- nixpkgs unstable: mariadb-server 11.8.8
- opensuse-leap 16.0: mariadb-test 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- opensuse-leap 16.0: mariadb-test 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- opensuse-leap 16.0: mariadb-test 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- opensuse-leap 16.0: mariadb-test 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- ubuntu resolute: mariadb-test 1:11.8.6-5 Β· GPL-2.0-only
- ubuntu resolute: mariadb-test 1:11.8.6-5ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: mariadb-test 1:11.8.9+ds-4ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms