forked from hanchuanchuan/inception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmysql-test-run.pl.1
2567 lines (2567 loc) · 57.3 KB
/
mysql-test-run.pl.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
'\" t
.\" Title: \fBmysql-test-run.pl\fR
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
.\" Date: 01/20/2013
.\" Manual: MySQL Database System
.\" Source: MySQL
.\" Language: English
.\"
.TH "\FBMYSQL\-TEST\-RUN\" "1" "01/20/2013" "MySQL" "MySQL Database System"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.\" mysql-test-run.pl
.SH "NAME"
mysql-test-run.pl \- run MySQL test suite
.SH "SYNOPSIS"
.HP \w'\fBmysql\-test\-run\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
The
\fBmysql\-test\-run\&.pl\fR
Perl script is the main application used to run the MySQL test suite\&. It invokes
\fBmysqltest\fR
to run individual test cases\&.
.PP
Invoke
\fBmysql\-test\-run\&.pl\fR
in the
mysql\-test
directory like this:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
.fi
.if n \{\
.RE
.\}
.PP
Each
\fItest_name\fR
argument names a test case\&. The test case file that corresponds to the test name is
t/\fItest_name\fR\&.test\&.
.PP
For each
\fItest_name\fR
argument,
\fBmysql\-test\-run\&.pl\fR
runs the named test case\&. With no
\fItest_name\fR
arguments,
\fBmysql\-test\-run\&.pl\fR
runs all
\&.test
files in the
t
subdirectory\&.
.PP
If no suffix is given for the test name, a suffix of
\&.test
is assumed\&. Any leading path name is ignored\&. These commands are equivalent:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBmysql\-test\-run\&.pl mytest\fR
shell> \fBmysql\-test\-run\&.pl mytest\&.test\fR
shell> \fBmysql\-test\-run\&.pl t/mytest\&.test\fR
.fi
.if n \{\
.RE
.\}
.PP
A suite name can be given as part of the test name\&. That is, the syntax for naming a test is:
.sp
.if n \{\
.RS 4
.\}
.nf
[\fIsuite_name\fR\&.]\fItest_name\fR[\&.\fIsuffix\fR]
.fi
.if n \{\
.RE
.\}
.PP
If a suite name is given,
\fBmysql\-test\-run\&.pl\fR
looks in that suite for the test\&. The test file corresponding to a test named
\fIsuite_name\&.test_name\fR
is found in
suite/\fIsuite_name\fR/t/\fItest_name\fR\&.test\&. There is also an implicit suite name
main
for the tests in the top
t
directory\&. With no suite name,
\fBmysql\-test\-run\&.pl\fR
looks in the default list of suites for a match and runs the test in any suites where it finds the test\&. Suppose that the default suite list is
main,
binlog,
rpl, and that a test
mytest\&.test
exists in the
main
and
rpl
suites\&. With an argument of
mytest
or
mytest\&.test,
\fBmysql\-test\-run\&.pl\fR
will run
mytest\&.test
from the
main
and
rpl
suites\&.
.PP
To run a family of test cases for which the names share a common prefix, use the
\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR
option\&. For example,
\fB\-\-do\-test=rpl\fR
runs the replication tests (test cases that have names beginning with
rpl)\&.
\fB\-\-skip\-test\fR
has the opposite effect of skipping test cases for which the names share a common prefix\&.
.PP
The argument for the
\fB\-\-do\-test\fR
and
\fB\-\-skip\-test\fR
options also allows more flexible specification of which tests to perform or skip\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example,
\fB\-\-do\-test=testa\fR
matches tests that begin with
testa,
\fB\-\-do\-test=main\&.testa\fR
matches tests in the
main
test suite that begin with
testa, and
\fB\-\-do\-test=main\&.*testa\fR
matches test names that contain
main
followed by
testa
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
xmainytesta\&.
.PP
To perform setup prior to running tests,
\fBmysql\-test\-run\&.pl\fR
needs to invoke
\fBmysqld\fR
with the
\fB\-\-bootstrap\fR
and
\fB\-\-skip\-grant\-tables\fR
options\&. If MySQL was configured with the
\fB\-\-disable\-grant\-options\fR
option (only MySQL 5\&.1) or with the compiler flag
\fB\-DDISABLE_GRANT_OPTIONS\fR, then
\fB\-\-bootstrap\fR,
\fB\-\-skip\-grant\-tables\fR, and
\fB\-\-init\-file\fR
will be disabled\&. To handle this, set the
MYSQLD_BOOTSTRAP
environment variable to the full path name of a server that has all options enabled\&.
\fBmysql\-test\-run\&.pl\fR
will use that server to perform setup; it is not used to run the tests\&.
.PP
The
init_file
test will fail if
\fB\-\-init\-file\fR
is disabled\&. This is an expected failure in this case\&.
.PP
To run
\fBmysql\-test\-run\&.pl\fR
on Windows, you\*(Aqll need either Cygwin or ActiveState Perl to run it\&. You may also need to install the modules required by the script\&. To run the test script, change location into the
mysql\-test
directory, set the
MTR_VS_CONFIG
environment variable to the configuration you selected earlier (or use the
\fB\-\-vs\-config\fR
option), and invoke
\fBmysql\-test\-run\&.pl\fR\&. For example (using Cygwin and the
\fBbash\fR
shell):
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBcd mysql\-test\fR
shell> \fBexport MTR_VS_CONFIG=debug\fR
shell> \fB\&./mysqltest\-run\&.pl \-\-force \-\-timer\fR
shell> \fB\&./mysqltest\-run\&.pl \-\-force \-\-timer \-\-ps\-protocol\fR
.fi
.if n \{\
.RE
.\}
.PP
\fBmysql\-test\-run\&.pl\fR
uses several environment variables\&. Some of them are listed in the following table\&. Some of these are set from the outside and used by
\fBmysql\-test\-run\&.pl\fR, others are set by
\fBmysql\-test\-run\&.pl\fR
instead, and may be referred to in tests\&.
.TS
allbox tab(:);
lB lB.
T{
Variable
T}:T{
Meaning
T}
.T&
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l
l l.
T{
MTR_VERSION
T}:T{
If set to 1, will run the older version 1 of
\fBmysql\-test\-run\&.pl\fR\&. This will affect
what functionailty is available and what command line
options are supported\&.
T}
T{
MTR_MEM
T}:T{
If set to anything, will run tests with files in "memory" using tmpfs or
ramdisk\&. Not available on Windows\&. Same as
\fB\-\-mem\fR option
T}
T{
MTR_PARALLEL
T}:T{
If set, defines number of parallel threads executing tests\&. Same as
\fB\-\-parallel\fR option
T}
T{
MTR_BUILD_THREAD
T}:T{
If set, defines which port number range is used for the server
T}
T{
MTR_PORT_BASE
T}:T{
If set, defines which port number range is used for the server
T}
T{
MTR_\fINAME\fR_TIMEOUT
T}:T{
Setting of a timeout in minutes or seconds, corresponding to command
line option
\fB\-\-\fR\fB\fIname\fR\fR\fB\-timeout\fR\&.
Avaliable timeout names are TESTCASE,
SUITE (both in minutes) and
START, SHUTDOWN
(both in seconds)\&. These variables are supported from
MySQL 5\&.1\&.44\&.
T}
T{
MYSQL_CONFIG_EDITOR
T}:T{
Path name to \fBmysql_config_editor\fR binary\&. Supported as
of MySQL 5\&.6\&.6\&.
T}
T{
MYSQL_TEST
T}:T{
Path name to \fBmysqltest\fR binary
T}
T{
MYSQL_TEST_LOGIN_FILE
T}:T{
Path name to login file used by \fBmysql_config_editor\fR\&.
If not set, the default is
$HOME/\&.mylogin\&.cnf, or
%APPDATA%\eMySQL\e\&.mylogin\&.cnf on
Windows\&. Supported as of MySQL 5\&.6\&.6\&.
T}
T{
MYSQLD_BOOTSTRAP
T}:T{
Full path name to \fBmysqld\fR that has all options enabled
T}
T{
MYSQLD_BOOTSTRAP_CMD
T}:T{
Full command line used for initial database setup for this test batch
T}
T{
MYSQLD
T}:T{
Full path to server executable used in tests\&. Supported as of MySQL
5\&.5\&.17\&.
T}
T{
MYSQLD_CMD
T}:T{
Command line for starting server as used in tests, with the minimum set
of required arguments\&. Supported as of MySQL 5\&.5\&.17\&.
T}
T{
MYSQLTEST_VARDIR
T}:T{
Path name to the var directory that is used for
logs, temporary files, and so forth
T}
T{
MYSQL_TEST_DIR
T}:T{
Full path to the mysql\-test directory where tests
are being run from
T}
T{
MYSQL_TMP_DIR
T}:T{
Path to temp directory used for temporary files during tests
T}
.TE
.sp 1
.PP
The variable
MTR_PORT_BASE
was added in MySQL 5\&.1\&.45 as a more logical replacement for
MTR_BUILD_THREAD\&. It gives the actual port number directly (will be rounded down to a multiple of 10)\&. If you use
MTR_BUILD_THREAD, the port number is found by multiplying this by 10 and adding 10000\&.
.PP
Tests sometimes rely on certain environment variables being defined\&. For example, certain tests assume that
MYSQL_TEST
is defined so that
\fBmysqltest\fR
can invoke itself with
exec $MYSQL_TEST\&.
.PP
Other tests may refer to the last three variables listed in the preceding table, to locate files to read or write\&. For example, tests that need to create files will typically put them in
$MYSQL_TMP_DIR/\fIfile_name\fR\&.
.PP
The variable
$MYSQLD_CMD
will include any server options added with the
\fB\-\-mysqld\fR
option to
\fBmysql\-test\-run\&.pl\fR, but will not include server options added specifically for the currently running test\&.
.PP
If you are running
\fBmysql\-test\-run\&.pl\fR
version 1 by setting
MTR_VERSION, note that this only affects the test driver, not the test client (and its language) or the tests themselves\&.
.PP
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
lib/v1/incompatible\&.tests\&. This feature is available from MySQL 5\&.1\&.40\&.
.PP
\fBmysql\-test\-run\&.pl\fR
supports the options in the following list\&. An argument of
\fB\-\-\fR
tells
\fBmysql\-test\-run\&.pl\fR
not to process any following arguments as options\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: help option
.\" help option: mysql-test-run.pl
\fB\-\-help\fR,
\fB\-h\fR
.sp
Display a help message and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: big-test option
.\" big-test option: mysql-test-run.pl
\fB\-\-big\-test\fR
.sp
Allow tests marked as "big" to run\&. Tests can be thus marked by including the line
\-\-source include/big_test\&.inc, and they will only be run if this option is given, or if the environment variable
BIG_TEST
is set to 1\&.
.sp
This is typically done for tests that take very long to run, or that use very much resources, so that they are not suitable for running as part of a normal test suite run\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: boot-dbx option
.\" boot-dbx option: mysql-test-run.pl
\fB\-\-boot\-dbx\fR
.sp
Run the
\fBmysqld\fR
server used for bootstrapping the database through the
\fBdbx\fR
debugger\&. This option is available from MySQL 5\&.5\&.17\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: boot-ddd option
.\" boot-ddd option: mysql-test-run.pl
\fB\-\-boot\-ddd\fR
.sp
Run the
\fBmysqld\fR
server used for bootstrapping the database through the
\fBddd\fR
debugger\&. This option is available from MySQL 5\&.5\&.17\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: boot-gdb option
.\" boot-gdb option: mysql-test-run.pl
\fB\-\-boot\-gdb\fR
.sp
Run the
\fBmysqld\fR
server used for bootstrapping the database through the
\fBgdb\fR
debugger\&. This option is available from MySQL 5\&.5\&.17\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: build-thread option
.\" build-thread option: mysql-test-run.pl
\fB\-\-build\-thread=\fR\fB\fInumber\fR\fR
.sp
Specify a number to calculate port numbers from\&. The formula is 10 *
\fIbuild_thread\fR
+ 10000\&. Instead of a number, it can be set to
auto, which is also the default value, in which case
\fBmysql\-test\-run\&.pl\fR
will allocate a number unique to this host\&.
.sp
The value (number or
auto) can also be set with the
MTR_BUILD_THREAD
environment variable\&.
.sp
From MySQL 5\&.1\&.45, the more logical
\fB\-\-port\-base\fR
is supported as an alternative\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: callgrind option
.\" callgrind option: mysql-test-run.pl
\fB\-\-callgrind\fR
.sp
Instructs
\fBvalgrind\fR
to use
\fBcallgrind\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: check-testcases option
.\" check-testcases option: mysql-test-run.pl
\fB\-\-check\-testcases\fR
.sp
Check test cases for side effects\&. This is done by checking system state before and after each test case; if there is any difference, a warning to that effect will be written, but the test case will not be marked as failed because of it\&. This check is enabled by default\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: clean-vardir option
.\" clean-vardir option: mysql-test-run.pl
\fB\-\-clean\-vardir\fR
.sp
Clean up the
var
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
\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\&.
.sp
The
\fB\-\-clean\-vardir\fR
option is available from MySQL 5\&.5\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: client-bindir option
.\" client-bindir option: mysql-test-run.pl
\fB\-\-client\-bindir=\fR\fB\fIpath\fR\fR
.sp
The path to the directory where client binaries are located\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: client-dbx option
.\" client-dbx option: mysql-test-run.pl
\fB\-\-client\-dbx\fR
.sp
Start
\fBmysqltest\fR
in the
\fBdbx\fR
debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: client-ddd option
.\" client-ddd option: mysql-test-run.pl
\fB\-\-client\-ddd\fR
.sp
Start
\fBmysqltest\fR
in the
\fBddd\fR
debugger\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: client-debugger option
.\" client-debugger option: mysql-test-run.pl
\fB\-\-client\-debugger=\fR\fB\fIdebugger\fR\fR
.sp
Start
\fBmysqltest\fR
in the named debugger\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: client-gdb option
.\" client-gdb option: mysql-test-run.pl
\fB\-\-client\-gdb\fR
.sp
Start
\fBmysqltest\fR
in the
\fBgdb\fR
debugger\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: client-libdir option
.\" client-libdir option: mysql-test-run.pl
\fB\-\-client\-libdir=\fR\fB\fIpath\fR\fR
.sp
The path to the directory where client libraries are located\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: combination option
.\" combination option: mysql-test-run.pl
\fB\-\-combination=\fR\fB\fIvalue\fR\fR
.sp
Extra option to pass to
\fBmysqld\fR\&. The value should consist of a single
\fBmysqld\fR
option including dashes\&. This option is similar to
\fB\-\-mysqld\fR
but has a different effect\&.
\fBmysql\-test\-run\&.pl\fR
executes multiple test runs, using the options for each instance of
\fB\-\-combination\fR
in successive runs\&. If
\fB\-\-combination\fR
is given only once, it has no effect\&. For test runs specific to a given test suite, an alternative to the use of
\fB\-\-combination\fR
is to create a
combinations
file in the suite directory\&. The file should contain a section of options for each test run\&. See
Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltest\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: comment option
.\" comment option: mysql-test-run.pl
\fB\-\-comment=\fR\fB\fIstr\fR\fR
.sp
Write
\fIstr\fR
to the output within lines filled with
#, as a form of banner\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: compress option
.\" compress option: mysql-test-run.pl
\fB\-\-compress\fR
.sp
Compress all information sent between the client and the server if both support compression\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: cursor-protocol option
.\" cursor-protocol option: mysql-test-run.pl
\fB\-\-cursor\-protocol\fR
.sp
Pass the
\fB\-\-cursor\-protocol\fR
option to
\fBmysqltest\fR
(implies
\fB\-\-ps\-protocol\fR)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: dbx option
.\" gdb option: mysql-test-run.pl
\fB\-\-dbx\fR
.sp
Start
\fBmysqld\fR
in the
\fBdbx\fR
debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: ddd option
.\" ddd option: mysql-test-run.pl
\fB\-\-ddd\fR
.sp
Start
\fBmysqld\fR
in the
\fBddd\fR
debugger\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: debug option
.\" debug option: mysql-test-run.pl
\fB\-\-debug\fR
.sp
Dump trace output for all clients and servers\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: debugger option
.\" debugger option: mysql-test-run.pl
\fB\-\-debugger=\fR\fB\fIdebugger\fR\fR
.sp
Start
\fBmysqld\fR
using the named debugger\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: debug-server option
.\" debug-server option: mysql-test-run.pl
\fB\-\-debug\-server\fR
.sp
Runs
mysqld\&.debug
(if available) instead of
mysqld
as server\&. If it does find
mysqld\&.debug, it will search for plugin libraries in a subdirectory
debug
under the directory where it\*(Aqs normally located\&. This option does not turn on trace output and is independent of the
\fBdebug\fR
option\&.
.sp
The
\fBdebug\-server\fR
option was added in MySQL 5\&.1\&.56 and 5\&.5\&.10\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: debug-sync-timeout option
.\" debug-sync-timeout option: mysql-test-run.pl
\fB\-\-debug\-sync\-timeout=\fR\fB\fIN\fR\fR
.sp
Controls whether the Debug Sync facility for testing and debugging is enabled\&. The option value is a timeout in seconds\&. The default value is 300\&. A value of 0 disables Debug Sync\&. The value of this option also becomes the default timeout for individual synchronization points\&.
.sp
\fBmysql\-test\-run\&.pl\fR
passes
\fB\-\-loose\-debug\-sync\-timeout=\fR\fB\fIN\fR\fR
to
\fBmysqld\fR\&. The
\fB\-\-loose\fR
prefix is used so that
\fBmysqld\fR
does not fail if Debug Sync is not compiled in\&.
.sp
For information about using the Debug Sync facility for testing, see
Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&.
.sp
This option was added in MySQL 5\&.1\&.41\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: default-myisam option
.\" default-myisam option: mysql-test-run.pl
\fB\-\-default\-myisam\fR
.sp
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
\fB\-\-nodefault\-myisam\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: defaults-file option
.\" default-file option: mysql-test-run.pl
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR
.sp
Use the named file as fixed config file template for all tests\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: defaults_extra_file option
.\" default_extra_file option: mysql-test-run.pl
\fB\-\-defaults_extra_file=\fR\fB\fIfile_name\fR\fR
.sp
Add setting from the named file to all generated configs\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: do-test option
.\" do-test option: mysql-test-run.pl
\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR
.sp
Run all test cases having a name that begins with the given
\fIprefix\fR
value\&. This option provides a convenient way to run a family of similarly named tests\&.
.sp
The argument for the
\fB\-\-do\-test\fR
option also allows more flexible specification of which tests to perform\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example,
\fB\-\-do\-test=testa\fR
matches tests that begin with
testa,
\fB\-\-do\-test=main\&.testa\fR
matches tests in the
main
test suite that begin with
testa, and
\fB\-\-do\-test=main\&.*testa\fR
matches test names that contain
main
followed by
testa
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
xmainytestz\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: embedded-server option
.\" embedded-server option: mysql-test-run.pl
\fB\-\-embedded\-server\fR
.sp
Use a version of
\fBmysqltest\fR
built with the embedded server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: enable-disabled option
.\" enable-disabled option: mysql-test-run.pl
\fB\-\-enable\-disabled\fR
.sp
Ignore any