~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to man/mysql-test-run.pl.1

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-07-21 07:09:29 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20150721070929-mg4dpqkgg3it1ajf
Tags: upstream-5.6.25
ImportĀ upstreamĀ versionĀ 5.6.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
.\"     Title: \fBmysql-test-run.pl\fR
3
3
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
4
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5
 
.\"      Date: 03/16/2015
 
5
.\"      Date: 05/05/2015
6
6
.\"    Manual: MySQL Database System
7
7
.\"    Source: MySQL
8
8
.\"  Language: English
9
9
.\"
10
 
.TH "\FBMYSQL\-TEST\-RUN\" "1" "03/16/2015" "MySQL" "MySQL Database System"
 
10
.TH "\FBMYSQL\-TEST\-RUN\" "1" "05/05/2015" "MySQL" "MySQL Database System"
11
11
.\" -----------------------------------------------------------------
12
12
.\" * Define some portability stuff
13
13
.\" -----------------------------------------------------------------
167
167
with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as
168
168
xmainytesta\&.
169
169
.PP
 
170
From MySQL 5\&.7 it is possible to put a list of test names in a file and have
 
171
\fBmysql\-test\-run\&.pl\fR
 
172
run those tests, using the option
 
173
\fB\-\-do\-test\-list=\fR\fB\fIfile\fR\fR\&. The tests should be listed one per line in the file, using the fully qualified name
 
174
\fIsuite\fR\&.\fItest\fR\&. A space may be used in place of the period\&. A line beginning with
 
175
#
 
176
indicates a comment and is ignored\&.
 
177
.PP
170
178
To perform setup prior to running tests,
171
179
\fBmysql\-test\-run\&.pl\fR
172
180
needs to invoke
175
183
\fB\-\-bootstrap\fR
176
184
and
177
185
\fB\-\-skip\-grant\-tables\fR
178
 
options\&. If MySQL was configured with the
179
 
\fB\-\-disable\-grant\-options\fR
180
 
option (only MySQL 5\&.1) or with the compiler flag
 
186
options\&. If MySQL was built with the compiler flag
181
187
\fB\-DDISABLE_GRANT_OPTIONS\fR, then
182
188
\fB\-\-bootstrap\fR,
183
189
\fB\-\-skip\-grant\-tables\fR, and
248
254
l l
249
255
l l
250
256
l l
251
 
l l
252
257
l l.
253
258
T{
254
 
MTR_VERSION
255
 
T}:T{
256
 
If set to 1, will run the older version 1 of
257
 
                \fBmysql\-test\-run\&.pl\fR\&. This will affect
258
 
                what functionailty is available and what command line
259
 
                options are supported\&.
260
 
T}
261
 
T{
262
259
MTR_MEM
263
260
T}:T{
264
261
If set to anything, will run tests with files in "memory" using tmpfs or
290
287
                Avaliable timeout names are TESTCASE,
291
288
                SUITE (both in minutes) and
292
289
                START, SHUTDOWN
293
 
                (both in seconds)\&. These variables are supported from
294
 
                MySQL 5\&.1\&.44\&.
 
290
                (both in seconds)\&.
295
291
T}
296
292
T{
297
293
MYSQL_CONFIG_EDITOR
357
353
.PP
358
354
The variable
359
355
MTR_PORT_BASE
360
 
was added in MySQL 5\&.1\&.45 as a more logical replacement for
 
356
is a more logical replacement for the original variable
361
357
MTR_BUILD_THREAD\&. It gives the actual port number directly (will be rounded down to a multiple of 10)\&. If you use
362
358
MTR_BUILD_THREAD, the port number is found by multiplying this by 10 and adding 10000\&.
363
359
.PP
378
374
option to
379
375
\fBmysql\-test\-run\&.pl\fR, but will not include server options added specifically for the currently running test\&.
380
376
.PP
381
 
If you are running
382
 
\fBmysql\-test\-run\&.pl\fR
383
 
version 1 by setting
384
 
MTR_VERSION, note that this only affects the test driver, not the test client (and its language) or the tests themselves\&.
385
 
.PP
386
 
A few tests might not run with version 1 because they depend on some feature of version 2\&. You may have those tests skipped by adding the test name to the file
387
 
lib/v1/incompatible\&.tests\&. This feature is available from MySQL 5\&.1\&.40\&.
388
 
.PP
389
377
\fBmysql\-test\-run\&.pl\fR
390
378
supports the options in the following list\&. An argument of
391
379
\fB\-\-\fR
510
498
MTR_BUILD_THREAD
511
499
environment variable\&.
512
500
.sp
513
 
From MySQL 5\&.1\&.45, the more logical
 
501
This option is kept for backward compatibility\&. The more logical
514
502
\fB\-\-port\-base\fR
515
 
is supported as an alternative\&.
 
503
is recommended instead\&.
516
504
.RE
517
505
.sp
518
506
.RS 4
564
552
var
565
553
directory with logs and test results etc\&. after the test run, but only if there were no test failures\&. This option only has effect if also running with option
566
554
\fB\-\-mem\fR\&. The intent is to alleviate the problem of using up memory for test results, in cases where many different test runs are being done on the same host\&.
567
 
.sp
568
 
The
569
 
\fB\-\-clean\-vardir\fR
570
 
option is available from MySQL 5\&.5\&.
571
555
.RE
572
556
.sp
573
557
.RS 4
836
820
.sp -1
837
821
.IP \(bu 2.3
838
822
.\}
 
823
.\" mysql-test-run.pl: debug-common option
 
824
.\" debug-common option: mysql-test-run.pl
 
825
\fB\-\-debug\-common\fR
 
826
.sp
 
827
This option works similar to
 
828
\-\-debug
 
829
but turns on debug only for the debug macro keywords
 
830
query, info, error, enter, exit
 
831
which are considered the most commonly used\&.
 
832
.RE
 
833
.sp
 
834
.RS 4
 
835
.ie n \{\
 
836
\h'-04'\(bu\h'+03'\c
 
837
.\}
 
838
.el \{\
 
839
.sp -1
 
840
.IP \(bu 2.3
 
841
.\}
839
842
.\" mysql-test-run.pl: debug-server option
840
843
.\" debug-server option: mysql-test-run.pl
841
844
\fB\-\-debug\-server\fR
850
853
under the directory where it\*(Aqs normally located\&. This option does not turn on trace output and is independent of the
851
854
\fBdebug\fR
852
855
option\&.
853
 
.sp
854
 
The
855
 
\fBdebug\-server\fR
856
 
option was added in MySQL 5\&.1\&.56 and 5\&.5\&.10\&.
857
856
.RE
858
857
.sp
859
858
.RS 4
882
881
.sp
883
882
For information about using the Debug Sync facility for testing, see
884
883
Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&.
885
 
.sp
886
 
This option was added in MySQL 5\&.1\&.41\&.
887
884
.RE
888
885
.sp
889
886
.RS 4
898
895
.\" default-myisam option: mysql-test-run.pl
899
896
\fB\-\-default\-myisam\fR
900
897
.sp
901
 
Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option was added in MySQL 5\&.5 and is on by default\&. It may be changed to off by default in a later release\&. See also
 
898
Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6 but it off by default from MySQL 5\&.7\&. See also
902
899
\fB\-\-nodefault\-myisam\fR\&.
903
900
.RE
904
901
.sp
976
973
.sp -1
977
974
.IP \(bu 2.3
978
975
.\}
 
976
.\" mysql-test-run.pl: do-test-list option
 
977
.\" do-test-list option: mysql-test-run.pl
 
978
\fB\-\-do\-testlist=\fR\fB\fIfile\fR\fR
 
979
.sp
 
980
Run all tests listed in the file
 
981
\fIfile\fR\&. In this file, tests should be listed one per line in the form
 
982
\fIsuite\fR\&.\fItest\fR
 
983
or alternatively, with a space instead of the period\&. A line beginning with
 
984
#
 
985
will be ignored and can be used for comments\&.
 
986
.sp
 
987
The
 
988
\fB\-\-do\-test\-list\fR
 
989
option is available from MySQL 5\&.7\&.
 
990
.RE
 
991
.sp
 
992
.RS 4
 
993
.ie n \{\
 
994
\h'-04'\(bu\h'+03'\c
 
995
.\}
 
996
.el \{\
 
997
.sp -1
 
998
.IP \(bu 2.3
 
999
.\}
979
1000
.\" mysql-test-run.pl: embedded-server option
980
1001
.\" embedded-server option: mysql-test-run.pl
981
1002
\fB\-\-embedded\-server\fR
1018
1039
[ exp\-fail ]
1019
1040
code rather than
1020
1041
[ fail ]
1021
 
if they fail\&. This option was added in MySQL 5\&.1\&.33\&.
 
1042
if they fail\&.
1022
1043
.sp
1023
1044
For an example of a file that might be specified using this option, see
1024
1045
mysql\-test/collections/default\&.experimental\&.
1025
1046
.sp
1026
 
From MySQL 5\&.1\&.51, it\*(Aqs possible to supply more than one
 
1047
It is also possible to supply more than one
1027
1048
\fB\-\-experimental\fR, test cases listed in all the files will be treated as experimental\&.
1028
1049
.RE
1029
1050
.sp
1035
1056
.sp -1
1036
1057
.IP \(bu 2.3
1037
1058
.\}
 
1059
.\" mysql-test-run.pl: explain-protocol option
 
1060
.\" explain-protocol option: mysql-test-run.pl
 
1061
\fB\-\-explain\-protocol\fR,
 
1062
.sp
 
1063
Run
 
1064
EXPLAIN EXTENDED
 
1065
on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&.
 
1066
.RE
 
1067
.sp
 
1068
.RS 4
 
1069
.ie n \{\
 
1070
\h'-04'\(bu\h'+03'\c
 
1071
.\}
 
1072
.el \{\
 
1073
.sp -1
 
1074
.IP \(bu 2.3
 
1075
.\}
1038
1076
.\" mysql-test-run.pl: extern option
1039
1077
.\" extern option: mysql-test-run.pl
1040
1078
\fB\-\-extern\fR
1111
1149
\fB\-\-force\-restart\fR
1112
1150
.sp
1113
1151
Always restart the server(s) between each tast case, whether it\*(Aqs needed or not\&. Will also restart between repeated runs of the same test case\&. This may be useful e\&.g\&. when looking for the source of a memory leak, as there will only have been one test run before the server exits\&.
1114
 
.sp
1115
 
The
1116
 
\fB\-\-force\-restart\fR
1117
 
option was added in MySQL version 5\&.1\&.52\&.
1118
1152
.RE
1119
1153
.sp
1120
1154
.RS 4
1168
1202
Run tests with the
1169
1203
\fBgprof\fR
1170
1204
profiling tool\&.
1171
 
\fB\-\-gprof\fR
1172
 
was added in 5\&.1\&.45\&.
1173
1205
.RE
1174
1206
.sp
1175
1207
.RS 4
1187
1219
.\" include-ndb option: mysql-test-run.pl
1188
1220
\fB\-\-include\-ndb\fR
1189
1221
.sp
1190
 
Run also tests that need Cluster\&. This is the default behavior up to MySQL 5\&.1\&.51\&. From MySQL 5\&.1\&.52 this option has been added to re\-enable running Cluster tests\&.
 
1222
Run also tests that need Cluster\&.
 
1223
.RE
 
1224
.sp
 
1225
.RS 4
 
1226
.ie n \{\
 
1227
\h'-04'\(bu\h'+03'\c
 
1228
.\}
 
1229
.el \{\
 
1230
.sp -1
 
1231
.IP \(bu 2.3
 
1232
.\}
 
1233
.\" mysql-test-run.pl: json-explain-protocol option
 
1234
.\" json-explain-protocol option: mysql-test-run.pl
 
1235
\fB\-\-json\-explain\-protocol\fR,
 
1236
.sp
 
1237
Run
 
1238
EXPLAIN FORMAT=JSON
 
1239
on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. The
 
1240
json\-explain\-protocol
 
1241
option is available from MySQL 5\&.6\&.
1191
1242
.RE
1192
1243
.sp
1193
1244
.RS 4
1286
1337
.sp
1287
1338
The maximum number of simultaneous server connections that may be used per test\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. Corresponds to the same option for
1288
1339
\fBmysqltest\fR\&.
1289
 
.sp
1290
 
This option is available from MySQL 5\&.1\&.45\&.
1291
1340
.RE
1292
1341
.sp
1293
1342
.RS 4
1414
1463
\fBmysqld\fR, but there may be cases where you want a setting just for a single run, or you may not want the setting to affect other programs\&. You may use additional
1415
1464
\fB\-\-mysqld\-env\fR
1416
1465
options to set more than one variable\&.
1417
 
.sp
1418
 
The
1419
 
\fB\-\-mysqld\-env\fR
1420
 
option is available from MySQL 5\&.5\&.10\&.
1421
1466
.RE
1422
1467
.sp
1423
1468
.RS 4
1468
1513
.\" nodefault-myisam option: mysql-test-run.pl
1469
1514
\fB\-\-nodefault\-myisam\fR
1470
1515
.sp
1471
 
Do not override the build\-in default engine to use MyISAM instead for non\-InnoDB tests\&. This option was added in MySQL 5\&.5\&. Since the existing collection of tests were originally adapted for MyISAM as default, many tests will fail when this option is used, because the test behaves differently or produces different output when the engine switches to InnoDB\&.
 
1516
For MySQL 5\&.5 or 5\&.6, do not override the build\-in default engine to use MyISAM instead for non\-InnoDB tests\&. Since the existing collection of tests were originally adapted for MyISAM as default, many tests will fail when this option is used, because the test behaves differently or produces different output when the engine switches to InnoDB\&.
 
1517
.sp
 
1518
From MySQL 5\&.7, the default engine for tests has been changed to InnoDB and this option will have no effect\&.
1472
1519
.RE
1473
1520
.sp
1474
1521
.RS 4
1554
1601
parallel threads\&. By default, 1 thread is used\&. Use
1555
1602
\fB\-\-parallel=auto\fR
1556
1603
for auto\-setting of
1557
 
\fIN\fR\&. The auto value was added in MySQL 5\&.1\&.36\&.
 
1604
\fIN\fR\&.
1558
1605
.RE
1559
1606
.sp
1560
1607
.RS 4
1797
1844
.\" skip-ndb option: mysql-test-run.pl
1798
1845
\fB\-\-skip\-ndb\fR
1799
1846
.sp
1800
 
Do not start NDB Cluster; skip Cluster test cases\&. From MySQL 5\&.1\&.52, this is the default and so this option does not do anything but is kept for backward compatibility\&.
 
1847
Do not start NDB Cluster; skip Cluster test cases\&. This option only has effect if you do have NDB, if not it will have no effect as it cannot run those tests anyway\&.
1801
1848
.RE
1802
1849
.sp
1803
1850
.RS 4
2020
2067
\fB\-\-start\fR, but
2021
2068
\fBmysql\-test\-run\&.pl\fR
2022
2069
terminates once the server has been started, leaving just the server process running\&.
2023
 
.sp
2024
 
Tha
2025
 
\fB\-\-start\-and\-exit\fR
2026
 
was available with version 1 of
2027
 
\fBmysql\-test\-run\&.pl\fR
2028
 
(unlike
2029
 
\fB\-\-start\fR
2030
 
which came with version 2), and is again supported in version 2 from MySQL 5\&.1\&.51\&.
2031
2070
.RE
2032
2071
.sp
2033
2072
.RS 4
2279
2318
.sp -1
2280
2319
.IP \(bu 2.3
2281
2320
.\}
 
2321
.\" mysql-test-run.pl: unit-tests-report option
 
2322
.\" unit-tests-report option: mysql-test-run.pl
 
2323
\fB\-\-unit\-tests\-report\fR
 
2324
.sp
 
2325
Extend the unit test run by also outputting the log from the test run, independently of whether it succeeded or not\&. This option implies
 
2326
\fB\-\-unit\-tests\fR
 
2327
so it is not necessary to specify both\&. The
 
2328
\fB\-\-unit\-tests\-report\fR
 
2329
option is available in MySQL 5\&.5 from version 5\&.5\&.44, in 5\&.6 from version 5\&.6\&.25 as well as in MySQL 5\&.7\&.
 
2330
.RE
 
2331
.sp
 
2332
.RS 4
 
2333
.ie n \{\
 
2334
\h'-04'\(bu\h'+03'\c
 
2335
.\}
 
2336
.el \{\
 
2337
.sp -1
 
2338
.IP \(bu 2.3
 
2339
.\}
2282
2340
.\" mysql-test-run.pl: user option
2283
2341
.\" user option: mysql-test-run.pl
2284
2342
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
2307
2365
\fB\-\-start\-and\-exit\fR
2308
2366
or
2309
2367
\fB\-\-start\-dirty\fR, and only if no test name is given\&.
2310
 
.sp
2311
 
The
2312
 
\fB\-\-user\-args\fR
2313
 
option was added in MySQL 5\&.1\&.51\&.
2314
2368
.RE
2315
2369
.sp
2316
2370
.RS 4
2336
2390
\fBvalgrind\fR
2337
2391
support\&.
2338
2392
.sp
2339
 
When the server is run with valgrind, an extra pass over the server log file(s) will be performed after all tests are run, and any report with problems that have been reported at server shutdown will be extracted and printed\&. The most common warnings are memory leaks\&. With each report will also be listed all tests that were run since previous server restart; one of these is likely to have caused the problem\&. This reporting was added in MySQL 5\&.1\&.45\&.
 
2393
When the server is run with valgrind, an extra pass over the server log file(s) will be performed after all tests are run, and any report with problems that have been reported at server shutdown will be extracted and printed\&. The most common warnings are memory leaks\&. With each report will also be listed all tests that were run since previous server restart; one of these is likely to have caused the problem\&.
2340
2394
.sp
2341
2395
From MySQL 5\&.5\&.13, a final "pseudo" test named
2342
2396
valgrind_report
2512
2566
or
2513
2567
\fB\-\-start\-dirty\fR
2514
2568
is used, wait for all servers to exit before termination\&. Otherise, it will terminate if one (of several) servers is restarted\&.
2515
 
.sp
2516
 
This option was added in MySQL 5\&.1\&.36\&.
2517
2569
.RE
2518
2570
.sp
2519
2571
.RS 4