You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

342 lines
8.0 KiB

  1. '\" t
  2. .\" Title: \fBmysql_client_test\fR
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
  5. .\" Date: 03/31/2010
  6. .\" Manual: MySQL Database System
  7. .\" Source: MySQL
  8. .\" Language: English
  9. .\"
  10. .TH "\FBMYSQL_CLIENT_TEST" "1" "03/31/2010" "MySQL" "MySQL Database System"
  11. .\" -----------------------------------------------------------------
  12. .\" * set default formatting
  13. .\" -----------------------------------------------------------------
  14. .\" disable hyphenation
  15. .nh
  16. .\" disable justification (adjust text to left margin only)
  17. .ad l
  18. .\" -----------------------------------------------------------------
  19. .\" * MAIN CONTENT STARTS HERE *
  20. .\" -----------------------------------------------------------------
  21. .\" mysql_client_test
  22. .\" mysql_client_test_embedded
  23. .SH "NAME"
  24. mysql_client_test \- test client API
  25. .br
  26. mysql_client_test_embedded \- test client API for embedded server
  27. .SH "SYNOPSIS"
  28. .HP \w'\fBmysql_client_test\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
  29. \fBmysql_client_test [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
  30. .HP \w'\fBmysql_client_test_embedded\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
  31. \fBmysql_client_test_embedded [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
  32. .SH "DESCRIPTION"
  33. .PP
  34. The
  35. \fBmysql_client_test\fR
  36. program is used for testing aspects of the MySQL client API that cannot be tested using
  37. \fBmysqltest\fR
  38. and its test language\&.
  39. \fBmysql_client_test_embedded\fR
  40. is similar but used for testing the embedded server\&. Both programs are run as part of the test suite\&.
  41. .PP
  42. The source code for the programs can be found in in
  43. tests/mysql_client_test\&.c
  44. in a source distribution\&. The program serves as a good source of examples illustrating how to use various features of the client API\&.
  45. .PP
  46. \fBmysql_client_test\fR
  47. is used in a test by the same name in the main tests suite of
  48. \fBmysql\-test\-run\&.pl\fR
  49. 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\&.
  50. .PP
  51. \fBmysql_client_test\fR
  52. supports the following options:
  53. .sp
  54. .RS 4
  55. .ie n \{\
  56. \h'-04'\(bu\h'+03'\c
  57. .\}
  58. .el \{\
  59. .sp -1
  60. .IP \(bu 2.3
  61. .\}
  62. .\" mysql_client_test: help option
  63. .\" help option: mysql_client_test
  64. \fB\-\-help\fR,
  65. \fB\-?\fR
  66. .sp
  67. Display a help message and exit\&.
  68. .RE
  69. .sp
  70. .RS 4
  71. .ie n \{\
  72. \h'-04'\(bu\h'+03'\c
  73. .\}
  74. .el \{\
  75. .sp -1
  76. .IP \(bu 2.3
  77. .\}
  78. \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR,
  79. .\" mysql_client_test: basedir option
  80. .\" basedir option: mysql_client_test
  81. \fB\-b \fR\fB\fIdir_name\fR\fR
  82. .sp
  83. The base directory for the tests\&.
  84. .RE
  85. .sp
  86. .RS 4
  87. .ie n \{\
  88. \h'-04'\(bu\h'+03'\c
  89. .\}
  90. .el \{\
  91. .sp -1
  92. .IP \(bu 2.3
  93. .\}
  94. \fB\-\-count=\fR\fB\fIcount\fR\fR,
  95. .\" mysql_client_test: count option
  96. .\" count option: mysql_client_test
  97. \fB\-t \fR\fB\fIcount\fR\fR
  98. .sp
  99. The number of times to execute the tests\&.
  100. .RE
  101. .sp
  102. .RS 4
  103. .ie n \{\
  104. \h'-04'\(bu\h'+03'\c
  105. .\}
  106. .el \{\
  107. .sp -1
  108. .IP \(bu 2.3
  109. .\}
  110. .\" mysql_client_test: database option
  111. .\" database option: mysql_client_test
  112. \fB\-\-database=\fR\fB\fIdb_name\fR\fR,
  113. \fB\-D \fR\fB\fIdb_name\fR\fR
  114. .sp
  115. The database to use\&.
  116. .RE
  117. .sp
  118. .RS 4
  119. .ie n \{\
  120. \h'-04'\(bu\h'+03'\c
  121. .\}
  122. .el \{\
  123. .sp -1
  124. .IP \(bu 2.3
  125. .\}
  126. .\" mysql_client_test: debug option
  127. .\" debug option: mysql_client_test
  128. \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
  129. \fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR
  130. .sp
  131. Write a debugging log if MySQL is built with debugging support\&. The default
  132. \fIdebug_options\fR
  133. value is
  134. \'d:t:o,/tmp/mysql_client_test\&.trace\'\&.
  135. .RE
  136. .sp
  137. .RS 4
  138. .ie n \{\
  139. \h'-04'\(bu\h'+03'\c
  140. .\}
  141. .el \{\
  142. .sp -1
  143. .IP \(bu 2.3
  144. .\}
  145. \fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR,
  146. .\" mysql_client_test: getopt-ll-test option
  147. .\" getopt-ll-test option: mysql_client_test
  148. \fB\-g \fR\fB\fIoption\fR\fR
  149. .sp
  150. Option to use for testing bugs in the
  151. getopt
  152. library\&.
  153. .RE
  154. .sp
  155. .RS 4
  156. .ie n \{\
  157. \h'-04'\(bu\h'+03'\c
  158. .\}
  159. .el \{\
  160. .sp -1
  161. .IP \(bu 2.3
  162. .\}
  163. .\" mysql_client_test: host option
  164. .\" host option: mysql_client_test
  165. \fB\-\-host=\fR\fB\fIhost_name\fR\fR,
  166. \fB\-h \fR\fB\fIhost_name\fR\fR
  167. .sp
  168. Connect to the MySQL server on the given host\&.
  169. .RE
  170. .sp
  171. .RS 4
  172. .ie n \{\
  173. \h'-04'\(bu\h'+03'\c
  174. .\}
  175. .el \{\
  176. .sp -1
  177. .IP \(bu 2.3
  178. .\}
  179. .\" mysql_client_test: password option
  180. .\" password option: mysql_client_test
  181. \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
  182. \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
  183. .sp
  184. The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
  185. \fIcannot\fR
  186. have a space between the option and the password\&. If you omit the
  187. \fIpassword\fR
  188. value following the
  189. .\" mysql_client_test: password option
  190. .\" password option: mysql_client_test
  191. \fB\-\-password\fR
  192. or
  193. \fB\-p\fR
  194. option on the command line, you are prompted for one\&.
  195. .RE
  196. .sp
  197. .RS 4
  198. .ie n \{\
  199. \h'-04'\(bu\h'+03'\c
  200. .\}
  201. .el \{\
  202. .sp -1
  203. .IP \(bu 2.3
  204. .\}
  205. .\" mysql_client_test: port option
  206. .\" port option: mysql_client_test
  207. \fB\-\-port=\fR\fB\fIport_num\fR\fR,
  208. \fB\-P \fR\fB\fIport_num\fR\fR
  209. .sp
  210. The TCP/IP port number to use for the connection\&.
  211. .RE
  212. .sp
  213. .RS 4
  214. .ie n \{\
  215. \h'-04'\(bu\h'+03'\c
  216. .\}
  217. .el \{\
  218. .sp -1
  219. .IP \(bu 2.3
  220. .\}
  221. \fB\-\-server\-arg=\fR\fB\fIarg\fR\fR,
  222. .\" mysql_client_test: server-arg option
  223. .\" server-arg option: mysql_client_test
  224. \fB\-A \fR\fB\fIarg\fR\fR
  225. .sp
  226. Argument to send to the embedded server\&.
  227. .RE
  228. .sp
  229. .RS 4
  230. .ie n \{\
  231. \h'-04'\(bu\h'+03'\c
  232. .\}
  233. .el \{\
  234. .sp -1
  235. .IP \(bu 2.3
  236. .\}
  237. \fB\-\-show\-tests\fR,
  238. \fB\-T\fR
  239. .sp
  240. Show all test names\&.
  241. .RE
  242. .sp
  243. .RS 4
  244. .ie n \{\
  245. \h'-04'\(bu\h'+03'\c
  246. .\}
  247. .el \{\
  248. .sp -1
  249. .IP \(bu 2.3
  250. .\}
  251. .\" mysql_client_test: silent option
  252. .\" silent option: mysql_client_test
  253. \fB\-\-silent\fR,
  254. \fB\-s\fR
  255. .sp
  256. Be more silent\&.
  257. .RE
  258. .sp
  259. .RS 4
  260. .ie n \{\
  261. \h'-04'\(bu\h'+03'\c
  262. .\}
  263. .el \{\
  264. .sp -1
  265. .IP \(bu 2.3
  266. .\}
  267. .\" mysql_client_test: socket option
  268. .\" socket option: mysql_client_test
  269. \fB\-\-socket=\fR\fB\fIpath\fR\fR,
  270. \fB\-S \fR\fB\fIpath\fR\fR
  271. .sp
  272. The socket file to use when connecting to
  273. localhost
  274. (which is the default host)\&.
  275. .RE
  276. .sp
  277. .RS 4
  278. .ie n \{\
  279. \h'-04'\(bu\h'+03'\c
  280. .\}
  281. .el \{\
  282. .sp -1
  283. .IP \(bu 2.3
  284. .\}
  285. \fB\-\-testcase\fR,
  286. \fB\-c\fR
  287. .sp
  288. The option is used when called from
  289. \fBmysql\-test\-run\&.pl\fR, so that
  290. \fBmysql_client_test\fR
  291. 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\&.
  292. .RE
  293. .sp
  294. .RS 4
  295. .ie n \{\
  296. \h'-04'\(bu\h'+03'\c
  297. .\}
  298. .el \{\
  299. .sp -1
  300. .IP \(bu 2.3
  301. .\}
  302. .\" mysql_client_test: user option
  303. .\" user option: mysql_client_test
  304. \fB\-\-user=\fR\fB\fIuser_name\fR\fR,
  305. \fB\-u \fR\fB\fIuser_name\fR\fR
  306. .sp
  307. The MySQL user name to use when connecting to the server\&.
  308. .RE
  309. .sp
  310. .RS 4
  311. .ie n \{\
  312. \h'-04'\(bu\h'+03'\c
  313. .\}
  314. .el \{\
  315. .sp -1
  316. .IP \(bu 2.3
  317. .\}
  318. \fB\-v \fR\fB\fIdir_name\fR\fR,
  319. .\" mysql_client_test: vardir option
  320. .\" vardir option: mysql_client_test
  321. \fB\-\-vardir=\fR\fB\fIdir_name\fR\fR
  322. .sp
  323. The data directory for tests\&. The default is
  324. mysql\-test/var\&.
  325. .RE
  326. .SH "COPYRIGHT"
  327. .br
  328. .PP
  329. Copyright \(co 2007, 2010, Oracle and/or its affiliates
  330. .PP
  331. 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.
  332. .PP
  333. 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.
  334. .PP
  335. 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/.
  336. .sp
  337. .SH "SEE ALSO"
  338. For more information, please refer to the MySQL Reference Manual,
  339. which may already be installed locally and which is also available
  340. online at http://dev.mysql.com/doc/.
  341. .SH AUTHOR
  342. Sun Microsystems, Inc. (http://www.mysql.com/).