summaryrefslogtreecommitdiff
path: root/man/mysql_client_test.1
blob: 9b29f595c4d63958d98475917bc253dae333913a (plain)
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
'\" t
.\"
.TH "\FBMYSQL_CLIENT_TEST" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.\" mysql_client_test
.\" mysql_client_test_embedded
.SH "NAME"
mysql_client_test \- test client API
.br
mysql_client_test_embedded \- test client API for embedded server
.SH "SYNOPSIS"
.HP \w'\fBmysql_client_test\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
\fBmysql_client_test [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
.HP \w'\fBmysql_client_test_embedded\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
\fBmysql_client_test_embedded [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
.SH "DESCRIPTION"
.PP
The
\fBmysql_client_test\fR
program is used for testing aspects of the MariaDB client API that cannot be tested using
\fBmysqltest\fR
and its test language\&.
\fBmysql_client_test_embedded\fR
is similar but used for testing the embedded server\&. Both programs are run as part of the test suite\&.
.PP
The source code for the programs can be found in in
tests/mysql_client_test\&.c
in a source distribution\&. The program serves as a good source of examples illustrating how to use various features of the client API\&.
.PP
\fBmysql_client_test\fR
is used in a test by the same name in the main tests suite of
\fBmysql\-test\-run\&.pl\fR
but may also be run directly\&. Unlike the other programs listed here, it does not read an external description of what tests to run\&. Instead, all tests are coded into the program, which is written to cover all aspects of the C language API\&.
.PP
\fBmysql_client_test\fR
supports the following options:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: help option
.\" help option: mysql_client_test
\fB\-\-help\fR,
\fB\-?\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
.\}
\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR,
.\" mysql_client_test: basedir option
.\" basedir option: mysql_client_test
\fB\-b \fR\fB\fIdir_name\fR\fR
.sp
The base directory for the tests\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-count=\fR\fB\fIcount\fR\fR,
.\" mysql_client_test: count option
.\" count option: mysql_client_test
\fB\-t \fR\fB\fIcount\fR\fR
.sp
The number of times to execute the tests\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: database option
.\" database option: mysql_client_test
\fB\-\-database=\fR\fB\fIdb_name\fR\fR,
\fB\-D \fR\fB\fIdb_name\fR\fR
.sp
The database to use\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: debug option
.\" debug option: mysql_client_test
\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
\fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR
.sp
Write a debugging log if MariaDB is built with debugging support\&. The default
\fIdebug_options\fR
value is
\'d:t:o,/tmp/mysql_client_test\&.trace\'\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR,
.\" mysql_client_test: getopt-ll-test option
.\" getopt-ll-test option: mysql_client_test
\fB\-g \fR\fB\fIoption\fR\fR
.sp
Option to use for testing bugs in the
getopt
library\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: host option
.\" host option: mysql_client_test
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: password option
.\" password option: mysql_client_test
\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
.sp
The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
\fIcannot\fR
have a space between the option and the password\&. If you omit the
\fIpassword\fR
value following the
.\" mysql_client_test: password option
.\" password option: mysql_client_test
\fB\-\-password\fR
or
\fB\-p\fR
option on the command line, you are prompted for one\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: port option
.\" port option: mysql_client_test
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
\fB\-P \fR\fB\fIport_num\fR\fR
.sp
The TCP/IP port number to use for the connection\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-server\-arg=\fR\fB\fIarg\fR\fR,
.\" mysql_client_test: server-arg option
.\" server-arg option: mysql_client_test
\fB\-A \fR\fB\fIarg\fR\fR
.sp
Argument to send to the embedded server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-show\-tests\fR,
\fB\-T\fR
.sp
Show all test names\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: silent option
.\" silent option: mysql_client_test
\fB\-\-silent\fR,
\fB\-s\fR
.sp
Be more silent\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: socket option
.\" socket option: mysql_client_test
\fB\-\-socket=\fR\fB\fIpath\fR\fR,
\fB\-S \fR\fB\fIpath\fR\fR
.sp
The socket file to use when connecting to
localhost
(which is the default host)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-testcase\fR,
\fB\-c\fR
.sp
The option is used when called from
\fBmysql\-test\-run\&.pl\fR, so that
\fBmysql_client_test\fR
may optionally behave in a different way than if called manually, for example by skipping some tests\&. Currently, there is no difference in behavior but the option is included in order to make this possible\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_client_test: user option
.\" user option: mysql_client_test
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-v \fR\fB\fIdir_name\fR\fR,
.\" mysql_client_test: vardir option
.\" vardir option: mysql_client_test
\fB\-\-vardir=\fR\fB\fIdir_name\fR\fR
.sp
The data directory for tests\&. The default is
mysql\-test/var\&.
.RE
.SH "COPYRIGHT"
.br
.PP
Copyright \(co 2007, 2010, Oracle and/or its affiliates, 2010-2015 MariaDB Foundation
.PP
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.
.PP
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.
.PP
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/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
MariaDB Foundation (http://www.mariadb.org/).