Commit c10c2a3 Add atomic host tests with experimental tests.yml file to see if the CI job can drive the tests properly and we get logs.

484 files Merged and Committed by mgahagan 7 months ago
Add atomic host tests with experimental tests.yml file to see if the CI job can drive the tests properly and we get logs.

    
 1 @@ -0,0 +1,45 @@
 2 + ### Submitting Issues
 3 + 
 4 + Please feel free to submit a new issue to highlight a problem with the tests
 5 + or to start a discussion about a feature or test you would like to add.  We
 6 + don't want to waste anyone's time, so these early discussions can be useful
 7 + to figuring out the right approach for a new feature or test.
 8 + 
 9 + When submitting an issue about a problem with the tests, please be specific
10 + about the circumstances of the problem.  Verbose output from a playbook run
11 + is usually most helpful.  You can include the relevant snippet in the issue
12 + and link to the full logs on a pastebin service such as https://fpaste.org
13 + 
14 + ### Submitting Patches
15 + 
16 + We welcome PRs to this project.  Please have a look at `git log` and try
17 + to match the commit log style.  (Note: we aren't strict about style, but
18 + it would be nice if the commit messages were well constructed and
19 + informative.)  The [7 Rules of a great Git commit message](https://chris.beams.io/posts/git-commit/#seven-rules) are a great set of guidlines to follow.
20 + 
21 + Before submitting any PRs, you should verify that the changes you have
22 + made will successfully run on CentOS Atomic Host, Fedora Atomic Host, and
23 + RHEL Atomic Host.  If you don't have access to RHEL Atomic Host, please
24 + note it in a comment to your PR.
25 + 
26 + During the PR review process, please use separate commits when making
27 + requested changes to your outstanding PR.  It is useful to preserve the
28 + history of the changes to a PR during the review process.  Please don't
29 + force-push a new commit on your PR unless absolutely necessary.  The use
30 + of `git commit --fixup` is encouraged as it can make squashing commits
31 + easier.
32 + 
33 + For more details about contributing to the repo, please see [How To Contribute](/docs/howto_contribute.md).
34 + 
35 + ### Reviewing Patches
36 + 
37 + In addition to welcoming PRs to this project, we also encourage users to
38 + review incoming PRs as a way to become more familiar with the project
39 + itself.
40 + 
41 + ### Coding Style
42 + 
43 + We try to follow the same best-practices and style guidelines from the
44 + OpenShift Ansible team:
45 +   - [Ansible Best Practices](https://github.com/openshift/openshift-ansible/blob/master/docs/best_practices_guide.adoc#ansible)
46 +   - [Ansible Style Guide](https://github.com/openshift/openshift-ansible/blob/master/docs/style_guide.adoc#ansible)
  1 @@ -0,0 +1,674 @@
  2 +                     GNU GENERAL PUBLIC LICENSE
  3 +                        Version 3, 29 June 2007
  4 + 
  5 +  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
  6 +  Everyone is permitted to copy and distribute verbatim copies
  7 +  of this license document, but changing it is not allowed.
  8 + 
  9 +                             Preamble
 10 + 
 11 +   The GNU General Public License is a free, copyleft license for
 12 + software and other kinds of works.
 13 + 
 14 +   The licenses for most software and other practical works are designed
 15 + to take away your freedom to share and change the works.  By contrast,
 16 + the GNU General Public License is intended to guarantee your freedom to
 17 + share and change all versions of a program--to make sure it remains free
 18 + software for all its users.  We, the Free Software Foundation, use the
 19 + GNU General Public License for most of our software; it applies also to
 20 + any other work released this way by its authors.  You can apply it to
 21 + your programs, too.
 22 + 
 23 +   When we speak of free software, we are referring to freedom, not
 24 + price.  Our General Public Licenses are designed to make sure that you
 25 + have the freedom to distribute copies of free software (and charge for
 26 + them if you wish), that you receive source code or can get it if you
 27 + want it, that you can change the software or use pieces of it in new
 28 + free programs, and that you know you can do these things.
 29 + 
 30 +   To protect your rights, we need to prevent others from denying you
 31 + these rights or asking you to surrender the rights.  Therefore, you have
 32 + certain responsibilities if you distribute copies of the software, or if
 33 + you modify it: responsibilities to respect the freedom of others.
 34 + 
 35 +   For example, if you distribute copies of such a program, whether
 36 + gratis or for a fee, you must pass on to the recipients the same
 37 + freedoms that you received.  You must make sure that they, too, receive
 38 + or can get the source code.  And you must show them these terms so they
 39 + know their rights.
 40 + 
 41 +   Developers that use the GNU GPL protect your rights with two steps:
 42 + (1) assert copyright on the software, and (2) offer you this License
 43 + giving you legal permission to copy, distribute and/or modify it.
 44 + 
 45 +   For the developers' and authors' protection, the GPL clearly explains
 46 + that there is no warranty for this free software.  For both users' and
 47 + authors' sake, the GPL requires that modified versions be marked as
 48 + changed, so that their problems will not be attributed erroneously to
 49 + authors of previous versions.
 50 + 
 51 +   Some devices are designed to deny users access to install or run
 52 + modified versions of the software inside them, although the manufacturer
 53 + can do so.  This is fundamentally incompatible with the aim of
 54 + protecting users' freedom to change the software.  The systematic
 55 + pattern of such abuse occurs in the area of products for individuals to
 56 + use, which is precisely where it is most unacceptable.  Therefore, we
 57 + have designed this version of the GPL to prohibit the practice for those
 58 + products.  If such problems arise substantially in other domains, we
 59 + stand ready to extend this provision to those domains in future versions
 60 + of the GPL, as needed to protect the freedom of users.
 61 + 
 62 +   Finally, every program is threatened constantly by software patents.
 63 + States should not allow patents to restrict development and use of
 64 + software on general-purpose computers, but in those that do, we wish to
 65 + avoid the special danger that patents applied to a free program could
 66 + make it effectively proprietary.  To prevent this, the GPL assures that
 67 + patents cannot be used to render the program non-free.
 68 + 
 69 +   The precise terms and conditions for copying, distribution and
 70 + modification follow.
 71 + 
 72 +                        TERMS AND CONDITIONS
 73 + 
 74 +   0. Definitions.
 75 + 
 76 +   "This License" refers to version 3 of the GNU General Public License.
 77 + 
 78 +   "Copyright" also means copyright-like laws that apply to other kinds of
 79 + works, such as semiconductor masks.
 80 + 
 81 +   "The Program" refers to any copyrightable work licensed under this
 82 + License.  Each licensee is addressed as "you".  "Licensees" and
 83 + "recipients" may be individuals or organizations.
 84 + 
 85 +   To "modify" a work means to copy from or adapt all or part of the work
 86 + in a fashion requiring copyright permission, other than the making of an
 87 + exact copy.  The resulting work is called a "modified version" of the
 88 + earlier work or a work "based on" the earlier work.
 89 + 
 90 +   A "covered work" means either the unmodified Program or a work based
 91 + on the Program.
 92 + 
 93 +   To "propagate" a work means to do anything with it that, without
 94 + permission, would make you directly or secondarily liable for
 95 + infringement under applicable copyright law, except executing it on a
 96 + computer or modifying a private copy.  Propagation includes copying,
 97 + distribution (with or without modification), making available to the
 98 + public, and in some countries other activities as well.
 99 + 
100 +   To "convey" a work means any kind of propagation that enables other
101 + parties to make or receive copies.  Mere interaction with a user through
102 + a computer network, with no transfer of a copy, is not conveying.
103 + 
104 +   An interactive user interface displays "Appropriate Legal Notices"
105 + to the extent that it includes a convenient and prominently visible
106 + feature that (1) displays an appropriate copyright notice, and (2)
107 + tells the user that there is no warranty for the work (except to the
108 + extent that warranties are provided), that licensees may convey the
109 + work under this License, and how to view a copy of this License.  If
110 + the interface presents a list of user commands or options, such as a
111 + menu, a prominent item in the list meets this criterion.
112 + 
113 +   1. Source Code.
114 + 
115 +   The "source code" for a work means the preferred form of the work
116 + for making modifications to it.  "Object code" means any non-source
117 + form of a work.
118 + 
119 +   A "Standard Interface" means an interface that either is an official
120 + standard defined by a recognized standards body, or, in the case of
121 + interfaces specified for a particular programming language, one that
122 + is widely used among developers working in that language.
123 + 
124 +   The "System Libraries" of an executable work include anything, other
125 + than the work as a whole, that (a) is included in the normal form of
126 + packaging a Major Component, but which is not part of that Major
127 + Component, and (b) serves only to enable use of the work with that
128 + Major Component, or to implement a Standard Interface for which an
129 + implementation is available to the public in source code form.  A
130 + "Major Component", in this context, means a major essential component
131 + (kernel, window system, and so on) of the specific operating system
132 + (if any) on which the executable work runs, or a compiler used to
133 + produce the work, or an object code interpreter used to run it.
134 + 
135 +   The "Corresponding Source" for a work in object code form means all
136 + the source code needed to generate, install, and (for an executable
137 + work) run the object code and to modify the work, including scripts to
138 + control those activities.  However, it does not include the work's
139 + System Libraries, or general-purpose tools or generally available free
140 + programs which are used unmodified in performing those activities but
141 + which are not part of the work.  For example, Corresponding Source
142 + includes interface definition files associated with source files for
143 + the work, and the source code for shared libraries and dynamically
144 + linked subprograms that the work is specifically designed to require,
145 + such as by intimate data communication or control flow between those
146 + subprograms and other parts of the work.
147 + 
148 +   The Corresponding Source need not include anything that users
149 + can regenerate automatically from other parts of the Corresponding
150 + Source.
151 + 
152 +   The Corresponding Source for a work in source code form is that
153 + same work.
154 + 
155 +   2. Basic Permissions.
156 + 
157 +   All rights granted under this License are granted for the term of
158 + copyright on the Program, and are irrevocable provided the stated
159 + conditions are met.  This License explicitly affirms your unlimited
160 + permission to run the unmodified Program.  The output from running a
161 + covered work is covered by this License only if the output, given its
162 + content, constitutes a covered work.  This License acknowledges your
163 + rights of fair use or other equivalent, as provided by copyright law.
164 + 
165 +   You may make, run and propagate covered works that you do not
166 + convey, without conditions so long as your license otherwise remains
167 + in force.  You may convey covered works to others for the sole purpose
168 + of having them make modifications exclusively for you, or provide you
169 + with facilities for running those works, provided that you comply with
170 + the terms of this License in conveying all material for which you do
171 + not control copyright.  Those thus making or running the covered works
172 + for you must do so exclusively on your behalf, under your direction
173 + and control, on terms that prohibit them from making any copies of
174 + your copyrighted material outside their relationship with you.
175 + 
176 +   Conveying under any other circumstances is permitted solely under
177 + the conditions stated below.  Sublicensing is not allowed; section 10
178 + makes it unnecessary.
179 + 
180 +   3. Protecting Users' Legal Rights From Anti-Circumvention Law.
181 + 
182 +   No covered work shall be deemed part of an effective technological
183 + measure under any applicable law fulfilling obligations under article
184 + 11 of the WIPO copyright treaty adopted on 20 December 1996, or
185 + similar laws prohibiting or restricting circumvention of such
186 + measures.
187 + 
188 +   When you convey a covered work, you waive any legal power to forbid
189 + circumvention of technological measures to the extent such circumvention
190 + is effected by exercising rights under this License with respect to
191 + the covered work, and you disclaim any intention to limit operation or
192 + modification of the work as a means of enforcing, against the work's
193 + users, your or third parties' legal rights to forbid circumvention of
194 + technological measures.
195 + 
196 +   4. Conveying Verbatim Copies.
197 + 
198 +   You may convey verbatim copies of the Program's source code as you
199 + receive it, in any medium, provided that you conspicuously and
200 + appropriately publish on each copy an appropriate copyright notice;
201 + keep intact all notices stating that this License and any
202 + non-permissive terms added in accord with section 7 apply to the code;
203 + keep intact all notices of the absence of any warranty; and give all
204 + recipients a copy of this License along with the Program.
205 + 
206 +   You may charge any price or no price for each copy that you convey,
207 + and you may offer support or warranty protection for a fee.
208 + 
209 +   5. Conveying Modified Source Versions.
210 + 
211 +   You may convey a work based on the Program, or the modifications to
212 + produce it from the Program, in the form of source code under the
213 + terms of section 4, provided that you also meet all of these conditions:
214 + 
215 +     a) The work must carry prominent notices stating that you modified
216 +     it, and giving a relevant date.
217 + 
218 +     b) The work must carry prominent notices stating that it is
219 +     released under this License and any conditions added under section
220 +     7.  This requirement modifies the requirement in section 4 to
221 +     "keep intact all notices".
222 + 
223 +     c) You must license the entire work, as a whole, under this
224 +     License to anyone who comes into possession of a copy.  This
225 +     License will therefore apply, along with any applicable section 7
226 +     additional terms, to the whole of the work, and all its parts,
227 +     regardless of how they are packaged.  This License gives no
228 +     permission to license the work in any other way, but it does not
229 +     invalidate such permission if you have separately received it.
230 + 
231 +     d) If the work has interactive user interfaces, each must display
232 +     Appropriate Legal Notices; however, if the Program has interactive
233 +     interfaces that do not display Appropriate Legal Notices, your
234 +     work need not make them do so.
235 + 
236 +   A compilation of a covered work with other separate and independent
237 + works, which are not by their nature extensions of the covered work,
238 + and which are not combined with it such as to form a larger program,
239 + in or on a volume of a storage or distribution medium, is called an
240 + "aggregate" if the compilation and its resulting copyright are not
241 + used to limit the access or legal rights of the compilation's users
242 + beyond what the individual works permit.  Inclusion of a covered work
243 + in an aggregate does not cause this License to apply to the other
244 + parts of the aggregate.
245 + 
246 +   6. Conveying Non-Source Forms.
247 + 
248 +   You may convey a covered work in object code form under the terms
249 + of sections 4 and 5, provided that you also convey the
250 + machine-readable Corresponding Source under the terms of this License,
251 + in one of these ways:
252 + 
253 +     a) Convey the object code in, or embodied in, a physical product
254 +     (including a physical distribution medium), accompanied by the
255 +     Corresponding Source fixed on a durable physical medium
256 +     customarily used for software interchange.
257 + 
258 +     b) Convey the object code in, or embodied in, a physical product
259 +     (including a physical distribution medium), accompanied by a
260 +     written offer, valid for at least three years and valid for as
261 +     long as you offer spare parts or customer support for that product
262 +     model, to give anyone who possesses the object code either (1) a
263 +     copy of the Corresponding Source for all the software in the
264 +     product that is covered by this License, on a durable physical
265 +     medium customarily used for software interchange, for a price no
266 +     more than your reasonable cost of physically performing this
267 +     conveying of source, or (2) access to copy the
268 +     Corresponding Source from a network server at no charge.
269 + 
270 +     c) Convey individual copies of the object code with a copy of the
271 +     written offer to provide the Corresponding Source.  This
272 +     alternative is allowed only occasionally and noncommercially, and
273 +     only if you received the object code with such an offer, in accord
274 +     with subsection 6b.
275 + 
276 +     d) Convey the object code by offering access from a designated
277 +     place (gratis or for a charge), and offer equivalent access to the
278 +     Corresponding Source in the same way through the same place at no
279 +     further charge.  You need not require recipients to copy the
280 +     Corresponding Source along with the object code.  If the place to
281 +     copy the object code is a network server, the Corresponding Source
282 +     may be on a different server (operated by you or a third party)
283 +     that supports equivalent copying facilities, provided you maintain
284 +     clear directions next to the object code saying where to find the
285 +     Corresponding Source.  Regardless of what server hosts the
286 +     Corresponding Source, you remain obligated to ensure that it is
287 +     available for as long as needed to satisfy these requirements.
288 + 
289 +     e) Convey the object code using peer-to-peer transmission, provided
290 +     you inform other peers where the object code and Corresponding
291 +     Source of the work are being offered to the general public at no
292 +     charge under subsection 6d.
293 + 
294 +   A separable portion of the object code, whose source code is excluded
295 + from the Corresponding Source as a System Library, need not be
296 + included in conveying the object code work.
297 + 
298 +   A "User Product" is either (1) a "consumer product", which means any
299 + tangible personal property which is normally used for personal, family,
300 + or household purposes, or (2) anything designed or sold for incorporation
301 + into a dwelling.  In determining whether a product is a consumer product,
302 + doubtful cases shall be resolved in favor of coverage.  For a particular
303 + product received by a particular user, "normally used" refers to a
304 + typical or common use of that class of product, regardless of the status
305 + of the particular user or of the way in which the particular user
306 + actually uses, or expects or is expected to use, the product.  A product
307 + is a consumer product regardless of whether the product has substantial
308 + commercial, industrial or non-consumer uses, unless such uses represent
309 + the only significant mode of use of the product.
310 + 
311 +   "Installation Information" for a User Product means any methods,
312 + procedures, authorization keys, or other information required to install
313 + and execute modified versions of a covered work in that User Product from
314 + a modified version of its Corresponding Source.  The information must
315 + suffice to ensure that the continued functioning of the modified object
316 + code is in no case prevented or interfered with solely because
317 + modification has been made.
318 + 
319 +   If you convey an object code work under this section in, or with, or
320 + specifically for use in, a User Product, and the conveying occurs as
321 + part of a transaction in which the right of possession and use of the
322 + User Product is transferred to the recipient in perpetuity or for a
323 + fixed term (regardless of how the transaction is characterized), the
324 + Corresponding Source conveyed under this section must be accompanied
325 + by the Installation Information.  But this requirement does not apply
326 + if neither you nor any third party retains the ability to install
327 + modified object code on the User Product (for example, the work has
328 + been installed in ROM).
329 + 
330 +   The requirement to provide Installation Information does not include a
331 + requirement to continue to provide support service, warranty, or updates
332 + for a work that has been modified or installed by the recipient, or for
333 + the User Product in which it has been modified or installed.  Access to a
334 + network may be denied when the modification itself materially and
335 + adversely affects the operation of the network or violates the rules and
336 + protocols for communication across the network.
337 + 
338 +   Corresponding Source conveyed, and Installation Information provided,
339 + in accord with this section must be in a format that is publicly
340 + documented (and with an implementation available to the public in
341 + source code form), and must require no special password or key for
342 + unpacking, reading or copying.
343 + 
344 +   7. Additional Terms.
345 + 
346 +   "Additional permissions" are terms that supplement the terms of this
347 + License by making exceptions from one or more of its conditions.
348 + Additional permissions that are applicable to the entire Program shall
349 + be treated as though they were included in this License, to the extent
350 + that they are valid under applicable law.  If additional permissions
351 + apply only to part of the Program, that part may be used separately
352 + under those permissions, but the entire Program remains governed by
353 + this License without regard to the additional permissions.
354 + 
355 +   When you convey a copy of a covered work, you may at your option
356 + remove any additional permissions from that copy, or from any part of
357 + it.  (Additional permissions may be written to require their own
358 + removal in certain cases when you modify the work.)  You may place
359 + additional permissions on material, added by you to a covered work,
360 + for which you have or can give appropriate copyright permission.
361 + 
362 +   Notwithstanding any other provision of this License, for material you
363 + add to a covered work, you may (if authorized by the copyright holders of
364 + that material) supplement the terms of this License with terms:
365 + 
366 +     a) Disclaiming warranty or limiting liability differently from the
367 +     terms of sections 15 and 16 of this License; or
368 + 
369 +     b) Requiring preservation of specified reasonable legal notices or
370 +     author attributions in that material or in the Appropriate Legal
371 +     Notices displayed by works containing it; or
372 + 
373 +     c) Prohibiting misrepresentation of the origin of that material, or
374 +     requiring that modified versions of such material be marked in
375 +     reasonable ways as different from the original version; or
376 + 
377 +     d) Limiting the use for publicity purposes of names of licensors or
378 +     authors of the material; or
379 + 
380 +     e) Declining to grant rights under trademark law for use of some
381 +     trade names, trademarks, or service marks; or
382 + 
383 +     f) Requiring indemnification of licensors and authors of that
384 +     material by anyone who conveys the material (or modified versions of
385 +     it) with contractual assumptions of liability to the recipient, for
386 +     any liability that these contractual assumptions directly impose on
387 +     those licensors and authors.
388 + 
389 +   All other non-permissive additional terms are considered "further
390 + restrictions" within the meaning of section 10.  If the Program as you
391 + received it, or any part of it, contains a notice stating that it is
392 + governed by this License along with a term that is a further
393 + restriction, you may remove that term.  If a license document contains
394 + a further restriction but permits relicensing or conveying under this
395 + License, you may add to a covered work material governed by the terms
396 + of that license document, provided that the further restriction does
397 + not survive such relicensing or conveying.
398 + 
399 +   If you add terms to a covered work in accord with this section, you
400 + must place, in the relevant source files, a statement of the
401 + additional terms that apply to those files, or a notice indicating
402 + where to find the applicable terms.
403 + 
404 +   Additional terms, permissive or non-permissive, may be stated in the
405 + form of a separately written license, or stated as exceptions;
406 + the above requirements apply either way.
407 + 
408 +   8. Termination.
409 + 
410 +   You may not propagate or modify a covered work except as expressly
411 + provided under this License.  Any attempt otherwise to propagate or
412 + modify it is void, and will automatically terminate your rights under
413 + this License (including any patent licenses granted under the third
414 + paragraph of section 11).
415 + 
416 +   However, if you cease all violation of this License, then your
417 + license from a particular copyright holder is reinstated (a)
418 + provisionally, unless and until the copyright holder explicitly and
419 + finally terminates your license, and (b) permanently, if the copyright
420 + holder fails to notify you of the violation by some reasonable means
421 + prior to 60 days after the cessation.
422 + 
423 +   Moreover, your license from a particular copyright holder is
424 + reinstated permanently if the copyright holder notifies you of the
425 + violation by some reasonable means, this is the first time you have
426 + received notice of violation of this License (for any work) from that
427 + copyright holder, and you cure the violation prior to 30 days after
428 + your receipt of the notice.
429 + 
430 +   Termination of your rights under this section does not terminate the
431 + licenses of parties who have received copies or rights from you under
432 + this License.  If your rights have been terminated and not permanently
433 + reinstated, you do not qualify to receive new licenses for the same
434 + material under section 10.
435 + 
436 +   9. Acceptance Not Required for Having Copies.
437 + 
438 +   You are not required to accept this License in order to receive or
439 + run a copy of the Program.  Ancillary propagation of a covered work
440 + occurring solely as a consequence of using peer-to-peer transmission
441 + to receive a copy likewise does not require acceptance.  However,
442 + nothing other than this License grants you permission to propagate or
443 + modify any covered work.  These actions infringe copyright if you do
444 + not accept this License.  Therefore, by modifying or propagating a
445 + covered work, you indicate your acceptance of this License to do so.
446 + 
447 +   10. Automatic Licensing of Downstream Recipients.
448 + 
449 +   Each time you convey a covered work, the recipient automatically
450 + receives a license from the original licensors, to run, modify and
451 + propagate that work, subject to this License.  You are not responsible
452 + for enforcing compliance by third parties with this License.
453 + 
454 +   An "entity transaction" is a transaction transferring control of an
455 + organization, or substantially all assets of one, or subdividing an
456 + organization, or merging organizations.  If propagation of a covered
457 + work results from an entity transaction, each party to that
458 + transaction who receives a copy of the work also receives whatever
459 + licenses to the work the party's predecessor in interest had or could
460 + give under the previous paragraph, plus a right to possession of the
461 + Corresponding Source of the work from the predecessor in interest, if
462 + the predecessor has it or can get it with reasonable efforts.
463 + 
464 +   You may not impose any further restrictions on the exercise of the
465 + rights granted or affirmed under this License.  For example, you may
466 + not impose a license fee, royalty, or other charge for exercise of
467 + rights granted under this License, and you may not initiate litigation
468 + (including a cross-claim or counterclaim in a lawsuit) alleging that
469 + any patent claim is infringed by making, using, selling, offering for
470 + sale, or importing the Program or any portion of it.
471 + 
472 +   11. Patents.
473 + 
474 +   A "contributor" is a copyright holder who authorizes use under this
475 + License of the Program or a work on which the Program is based.  The
476 + work thus licensed is called the contributor's "contributor version".
477 + 
478 +   A contributor's "essential patent claims" are all patent claims
479 + owned or controlled by the contributor, whether already acquired or
480 + hereafter acquired, that would be infringed by some manner, permitted
481 + by this License, of making, using, or selling its contributor version,
482 + but do not include claims that would be infringed only as a
483 + consequence of further modification of the contributor version.  For
484 + purposes of this definition, "control" includes the right to grant
485 + patent sublicenses in a manner consistent with the requirements of
486 + this License.
487 + 
488 +   Each contributor grants you a non-exclusive, worldwide, royalty-free
489 + patent license under the contributor's essential patent claims, to
490 + make, use, sell, offer for sale, import and otherwise run, modify and
491 + propagate the contents of its contributor version.
492 + 
493 +   In the following three paragraphs, a "patent license" is any express
494 + agreement or commitment, however denominated, not to enforce a patent
495 + (such as an express permission to practice a patent or covenant not to
496 + sue for patent infringement).  To "grant" such a patent license to a
497 + party means to make such an agreement or commitment not to enforce a
498 + patent against the party.
499 + 
500 +   If you convey a covered work, knowingly relying on a patent license,
501 + and the Corresponding Source of the work is not available for anyone
502 + to copy, free of charge and under the terms of this License, through a
503 + publicly available network server or other readily accessible means,
504 + then you must either (1) cause the Corresponding Source to be so
505 + available, or (2) arrange to deprive yourself of the benefit of the
506 + patent license for this particular work, or (3) arrange, in a manner
507 + consistent with the requirements of this License, to extend the patent
508 + license to downstream recipients.  "Knowingly relying" means you have
509 + actual knowledge that, but for the patent license, your conveying the
510 + covered work in a country, or your recipient's use of the covered work
511 + in a country, would infringe one or more identifiable patents in that
512 + country that you have reason to believe are valid.
513 + 
514 +   If, pursuant to or in connection with a single transaction or
515 + arrangement, you convey, or propagate by procuring conveyance of, a
516 + covered work, and grant a patent license to some of the parties
517 + receiving the covered work authorizing them to use, propagate, modify
518 + or convey a specific copy of the covered work, then the patent license
519 + you grant is automatically extended to all recipients of the covered
520 + work and works based on it.
521 + 
522 +   A patent license is "discriminatory" if it does not include within
523 + the scope of its coverage, prohibits the exercise of, or is
524 + conditioned on the non-exercise of one or more of the rights that are
525 + specifically granted under this License.  You may not convey a covered
526 + work if you are a party to an arrangement with a third party that is
527 + in the business of distributing software, under which you make payment
528 + to the third party based on the extent of your activity of conveying
529 + the work, and under which the third party grants, to any of the
530 + parties who would receive the covered work from you, a discriminatory
531 + patent license (a) in connection with copies of the covered work
532 + conveyed by you (or copies made from those copies), or (b) primarily
533 + for and in connection with specific products or compilations that
534 + contain the covered work, unless you entered into that arrangement,
535 + or that patent license was granted, prior to 28 March 2007.
536 + 
537 +   Nothing in this License shall be construed as excluding or limiting
538 + any implied license or other defenses to infringement that may
539 + otherwise be available to you under applicable patent law.
540 + 
541 +   12. No Surrender of Others' Freedom.
542 + 
543 +   If conditions are imposed on you (whether by court order, agreement or
544 + otherwise) that contradict the conditions of this License, they do not
545 + excuse you from the conditions of this License.  If you cannot convey a
546 + covered work so as to satisfy simultaneously your obligations under this
547 + License and any other pertinent obligations, then as a consequence you may
548 + not convey it at all.  For example, if you agree to terms that obligate you
549 + to collect a royalty for further conveying from those to whom you convey
550 + the Program, the only way you could satisfy both those terms and this
551 + License would be to refrain entirely from conveying the Program.
552 + 
553 +   13. Use with the GNU Affero General Public License.
554 + 
555 +   Notwithstanding any other provision of this License, you have
556 + permission to link or combine any covered work with a work licensed
557 + under version 3 of the GNU Affero General Public License into a single
558 + combined work, and to convey the resulting work.  The terms of this
559 + License will continue to apply to the part which is the covered work,
560 + but the special requirements of the GNU Affero General Public License,
561 + section 13, concerning interaction through a network will apply to the
562 + combination as such.
563 + 
564 +   14. Revised Versions of this License.
565 + 
566 +   The Free Software Foundation may publish revised and/or new versions of
567 + the GNU General Public License from time to time.  Such new versions will
568 + be similar in spirit to the present version, but may differ in detail to
569 + address new problems or concerns.
570 + 
571 +   Each version is given a distinguishing version number.  If the
572 + Program specifies that a certain numbered version of the GNU General
573 + Public License "or any later version" applies to it, you have the
574 + option of following the terms and conditions either of that numbered
575 + version or of any later version published by the Free Software
576 + Foundation.  If the Program does not specify a version number of the
577 + GNU General Public License, you may choose any version ever published
578 + by the Free Software Foundation.
579 + 
580 +   If the Program specifies that a proxy can decide which future
581 + versions of the GNU General Public License can be used, that proxy's
582 + public statement of acceptance of a version permanently authorizes you
583 + to choose that version for the Program.
584 + 
585 +   Later license versions may give you additional or different
586 + permissions.  However, no additional obligations are imposed on any
587 + author or copyright holder as a result of your choosing to follow a
588 + later version.
589 + 
590 +   15. Disclaimer of Warranty.
591 + 
592 +   THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
593 + APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
594 + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
595 + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
596 + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
597 + PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
598 + IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
599 + ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
600 + 
601 +   16. Limitation of Liability.
602 + 
603 +   IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
604 + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
605 + THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
606 + GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
607 + USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
608 + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
609 + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
610 + EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
611 + SUCH DAMAGES.
612 + 
613 +   17. Interpretation of Sections 15 and 16.
614 + 
615 +   If the disclaimer of warranty and limitation of liability provided
616 + above cannot be given local legal effect according to their terms,
617 + reviewing courts shall apply local law that most closely approximates
618 + an absolute waiver of all civil liability in connection with the
619 + Program, unless a warranty or assumption of liability accompanies a
620 + copy of the Program in return for a fee.
621 + 
622 +                      END OF TERMS AND CONDITIONS
623 + 
624 +             How to Apply These Terms to Your New Programs
625 + 
626 +   If you develop a new program, and you want it to be of the greatest
627 + possible use to the public, the best way to achieve this is to make it
628 + free software which everyone can redistribute and change under these terms.
629 + 
630 +   To do so, attach the following notices to the program.  It is safest
631 + to attach them to the start of each source file to most effectively
632 + state the exclusion of warranty; and each file should have at least
633 + the "copyright" line and a pointer to where the full notice is found.
634 + 
635 +     {one line to give the program's name and a brief idea of what it does.}
636 +     Copyright (C) {year}  {name of author}
637 + 
638 +     This program is free software: you can redistribute it and/or modify
639 +     it under the terms of the GNU General Public License as published by
640 +     the Free Software Foundation, either version 3 of the License, or
641 +     (at your option) any later version.
642 + 
643 +     This program is distributed in the hope that it will be useful,
644 +     but WITHOUT ANY WARRANTY; without even the implied warranty of
645 +     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
646 +     GNU General Public License for more details.
647 + 
648 +     You should have received a copy of the GNU General Public License
649 +     along with this program.  If not, see <http://www.gnu.org/licenses/>.
650 + 
651 + Also add information on how to contact you by electronic and paper mail.
652 + 
653 +   If the program does terminal interaction, make it output a short
654 + notice like this when it starts in an interactive mode:
655 + 
656 +     {project}  Copyright (C) {year}  {fullname}
657 +     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
658 +     This is free software, and you are welcome to redistribute it
659 +     under certain conditions; type `show c' for details.
660 + 
661 + The hypothetical commands `show w' and `show c' should show the appropriate
662 + parts of the General Public License.  Of course, your program's commands
663 + might be different; for a GUI interface, you would use an "about box".
664 + 
665 +   You should also get your employer (if you work as a programmer) or school,
666 + if any, to sign a "copyright disclaimer" for the program, if necessary.
667 + For more information on this, and how to apply and follow the GNU GPL, see
668 + <http://www.gnu.org/licenses/>.
669 + 
670 +   The GNU General Public License does not permit incorporating your program
671 + into proprietary programs.  If your program is a subroutine library, you
672 + may consider it more useful to permit linking proprietary applications with
673 + the library.  If this is what you want to do, use the GNU Lesser General
674 + Public License instead of this License.  But first, please read
675 + <http://www.gnu.org/philosophy/why-not-lgpl.html>.
  1 @@ -0,0 +1,255 @@
  2 + # Atomic Host Tests
  3 + This repo contains a number of Ansible playbooks that can be used to run
  4 + tests against an Atomic Host.
  5 + 
  6 + The intent is to have a collection of tests that can be used to test the
  7 + CentOS, Fedora, and RHEL versions of Atomic Host.
  8 + 
  9 + Currently, these tests fall into the category of single host, integration tests.
 10 + 
 11 + **NOTE**:  This repo only provides playbooks/tests and does not currently
 12 + provide any way for provisioning test resources/infrastructure.
 13 + 
 14 + Interested in more information about this project?  You can click through the results
 15 + to [more information](#moreinfo).
 16 + 
 17 + ## Sanity Test Results
 18 + 
 19 + The table below shows the latest results of running the `improved-sanity-test` against
 20 + each of the referenced streams.  You can see the version that was tested and a link to
 21 + the log file containing the results.
 22 + 
 23 + Stream | Version/Status | Log File
 24 + :--- | :---: | :---:
 25 + CentOS Atomic Host Continuous | ![cahc status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/cahc/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/cahc/latest/improved-sanity-test.log)
 26 + CentOS Atomic Host | ![centosah status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/centosah/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/centosah/latest/improved-sanity-test.log)
 27 + Fedora 27 Atomic Host Continuous | ![fahc status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fahc/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fahc/latest/improved-sanity-test.log)
 28 + Fedora 27 Atomic Host | ![fedora 27 atomic status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-27-atomic/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-27-atomic/latest/improved-sanity-test.log)
 29 + Fedora 27 Atomic Testing | ![fedora 27 atomic testing status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-27-atomic-testing/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-27-atomic-testing/latest/improved-sanity-test.log)
 30 + Fedora 27 Atomic Updates | ![fedora 27 atomic updates status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-27-atomic-updates/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-27-atomic-updates/latest/improved-sanity-test.log)
 31 + Fedora 28 Atomic Host | ![fedora 28 atomic status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-28-atomic/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-28-atomic/latest/improved-sanity-test.log)
 32 + Fedora 28 Atomic Testing | ![fedora 28 atomic testing status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-28-atomic-testing/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-28-atomic-testing/latest/improved-sanity-test.log)
 33 + Fedora 28 Atomic Updates| ![fedora 28 atomic updates status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-28-atomic-updates/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-28-atomic-updates/latest/improved-sanity-test.log)
 34 + Fedora Rawhide Atomic Host | ![fedora rawhide atomic status](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-rawhide/latest/status.png) | [log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/improved-sanity-test/fedora-rawhide/latest/improved-sanity-test.log)
 35 + 
 36 + ## Next Tier Results
 37 + After a successful sanity test result, we run a select set of 'next' tier tests against
 38 + the version that passed.  These results are tracked in the tables below.
 39 + 
 40 + You can click on the pass/fail badge to get taken to the log of the results.
 41 + 
 42 + | CentOS Atomic Host Continuous | Result | CentOS Atomic Host | Result |
 43 + |---|---|---|---|
 44 + | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/cahc/latest/admin-unlock.log) | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/centosah/latest/admin-unlock.log) |
 45 + | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/cahc/latest/atomic.log) | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/centosah/latest/atomic.log) |
 46 + | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/cahc/latest/docker.log) | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/centosah/latest/docker.log) |
 47 + | docker-build-httpd | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/cahc/latest/docker-build-httpd.log) | docker-build-http | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/centosah/latest/docker-build-httpd.log) |
 48 + | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/cahc/latest/docker-swarm.log) | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/centosah/latest/docker-swarm.log) |
 49 + | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/cahc/latest/k8-cluster.log) | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/centosah/latest/k8-cluster.log) |
 50 + | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/cahc/latest/pkg-layering.log) | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/centosah/latest/pkg-layering.log) |
 51 + | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/cahc/latest/rpm-ostree.log) | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/centosah/latest/rpm-ostree.log) |
 52 + | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/cahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/cahc/latest/system-containers.log) | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/centosah/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/centosah/latest/system-containers.log) |
 53 + |||||
 54 + | **Fedora 27 Atomic Host Continuous** | **Result** | **Fedora 27 Atomic Host** | **Result** |
 55 + | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fahc/latest/admin-unlock.log) | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-27-atomic/latest/admin-unlock.log) |
 56 + | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fahc/latest/atomic.log) | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-27-atomic/latest/atomic.log) |
 57 + | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fahc/latest/docker.log) | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-27-atomic/latest/docker.log) |
 58 + | docker-build-httpd | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fahc/latest/docker-build-httpd.log) | docker-build-http | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-27-atomic/latest/docker-build-httpd.log) |
 59 + | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fahc/latest/docker-swarm.log) | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-27-atomic/latest/docker-swarm.log) |
 60 + | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fahc/latest/k8-cluster.log) | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-27-atomic/latest/k8-cluster.log) |
 61 + | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fahc/latest/pkg-layering.log) | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-27-atomic/latest/pkg-layering.log) |
 62 + | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fahc/latest/rpm-ostree.log) | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-27-atomic/latest/rpm-ostree.log) |
 63 + | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fahc/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fahc/latest/system-containers.log) | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-27-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-27-atomic/latest/system-containers.log) |
 64 + |||||
 65 + | **Fedora 27 Atomic Testing** | **Result** | **Fedora 27 Atomic Updates** | **Result** |
 66 + | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-27-atomic-testing/latest/admin-unlock.log) | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-27-atomic-updates/latest/admin-unlock.log) |
 67 + | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-27-atomic-testing/latest/atomic.log) | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-27-atomic-updates/latest/atomic.log) |
 68 + | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-27-atomic-testing/latest/docker.log) | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-27-atomic-updates/latest/docker.log) |
 69 + | docker-build-httpd | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-27-atomic-testing/latest/docker-build-httpd.log) | docker-build-http | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-27-atomic-updates/latest/docker-build-httpd.log) |
 70 + | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-27-atomic-testing/latest/docker-swarm.log) | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-27-atomic-updates/latest/docker-swarm.log) |
 71 + | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-27-atomic-testing/latest/k8-cluster.log) | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-27-atomic-updates/latest/k8-cluster.log) |
 72 + | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-27-atomic-testing/latest/pkg-layering.log) | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-27-atomic-updates/latest/pkg-layering.log) |
 73 + | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-27-atomic-testing/latest/rpm-ostree.log) | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-27-atomic-updates/latest/rpm-ostree.log) |
 74 + | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-27-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-27-atomic-testing/latest/system-containers.log) | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-27-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-27-atomic-updates/latest/system-containers.log) |
 75 + |||||
 76 + | **Fedora 28 Atomic Host** | **Result** | **Fedora 28 Atomic Testing** | **Result** |
 77 + | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-28-atomic/latest/admin-unlock.log) | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-28-atomic-testing/latest/admin-unlock.log) |
 78 + | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-28-atomic/latest/atomic.log) | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-28-atomic-testing/latest/atomic.log) |
 79 + | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-28-atomic/latest/docker.log) | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-28-atomic-testing/latest/docker.log) |
 80 + | docker-build-httpd | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-28-atomic/latest/docker-build-httpd.log) | docker-build-http | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-28-atomic-testing/latest/docker-build-httpd.log) |
 81 + | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-28-atomic/latest/docker-swarm.log) | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-28-atomic-testing/latest/docker-swarm.log) |
 82 + | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-28-atomic/latest/k8-cluster.log) | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-28-atomic-testing/latest/k8-cluster.log) |
 83 + | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-28-atomic/latest/pkg-layering.log) | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-28-atomic-testing/latest/pkg-layering.log) |
 84 + | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-28-atomic/latest/rpm-ostree.log) | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-28-atomic-testing/latest/rpm-ostree.log) |
 85 + | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-28-atomic/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-28-atomic/latest/system-containers.log) | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-28-atomic-testing/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-28-atomic-testing/latest/system-containers.log) |
 86 + |||||
 87 + | **Fedora 28 Atomic Updates** | **Result** | **Fedora Rawhide Atomic Host** | **Result** |
 88 + | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-28-atomic-updates/latest/admin-unlock.log) | admin-unlock | [![admin-unlock log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/admin-unlock/fedora-rawhide/latest/admin-unlock.log) |
 89 + | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-28-atomic-updates/latest/atomic.log) | atomic | [![atomic log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/atomic/fedora-rawhide/latest/atomic.log) |
 90 + | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-28-atomic-updates/latest/docker.log) | docker | [![docker log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker/fedora-rawhide/latest/docker.log) |
 91 + | docker-build-httpd | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-28-atomic-updates/latest/docker-build-httpd.log) | docker-build-httpd | [![docker-build-httpd log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-build-httpd/fedora-rawhide/latest/docker-build-httpd.log) |
 92 + | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-28-atomic-updates/latest/docker-swarm.log) | docker-swarm | [![docker-swarm log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/docker-swarm/fedora-rawhide/latest/docker-swarm.log) |
 93 + | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-28-atomic-updates/latest/k8-cluster.log) | k8-cluster | [![k8-cluster log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/k8-cluster/fedora-rawhide/latest/k8-cluster.log) |
 94 + | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-28-atomic-updates/latest/pkg-layering.log) | pkg-layering | [![pkg-layering](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/pkg-layering/fedora-rawhide/latest/pkg-layering.log) |
 95 + | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-28-atomic-updates/latest/rpm-ostree.log) | rpm-ostree | [![rpm-ostree log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/rpm-ostree/fedora-rawhide/latest/rpm-ostree.log) |
 96 + | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-28-atomic-updates/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-28-atomic-updates/latest/system-containers.log) | system-containers | [![system-containers log](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-rawhide/latest/status.png)](https://s3.amazonaws.com/aos-ci/atomic-host-tests/system-containers/fedora-rawhide/latest/system-containers.log) |
 97 + 
 98 + ---
 99 + <a name="moreinfo"></a>
100 + ### Supported Test Suites
101 + The following test suites are available and supported.  Any other playbooks
102 + found in the repo are currently unmaintained and may not work correctly.
103 + 
104 + - [ostree admin unlock](tests/admin-unlock/main.yml)
105 +   - Verifies the ability to install packages using `ostree admin unlock`
106 + - [Docker Build httpd](tests/docker-build-httpd/main.yml)
107 +   - Attempts to build a `httpd` container using various base images
108 + - [Docker Swarm](tests/docker-swarm/main.yml)
109 +   - Covers the basic functionality of the `docker swarm` commands
110 + - [Docker/Docker Latest](tests/docker/main.yml)
111 +   - Validates basic `docker` operations using either `docker` or `docker-latest`
112 + - [CVE Scanner](tests/images_cve_scanner/main.yml)
113 +   - Performs `atomic scan` on a number of RHEL containers
114 + - [Improved Sanity Test](tests/improved-sanity-test/main.yml)
115 +   - A test suite aimed at providing smoketest-like coverage of an entire
116 +     Atomic Host
117 + - [Kubernetes ](tests/k8-cluster/main.yml)
118 +   - Validates standing up a single-node Kubernetes cluster and deploying a
119 +     simple web+DB application
120 + - [OpenShift Ansible](tests/openshift-ansible-test/main.yml)
121 +   - Validates the OpenShfit Ansible installer against AH streams
122 + - [Package Layering](tests/pkg-layering/main.yml)
123 +   - Validates the package layering functionality of `rpm-ostree`
124 + - [System Containers](tests/system-containers/main.yml)
125 +   - Verifies the basic usage of system containers on Atomic Host
126 + 
127 + ### Why Ansible?
128 + The reasons for choosing Ansible playbooks are mainly 1) ease of use, 2)
129 + portability, and 3) simplicity.
130 + 
131 + 1. Ansible is a well-known tool and there is plenty of documentation
132 + available for users to rely on.
133 + 
134 + 1. Ansible requires only a small amount of functionality on the system
135 + under test (basically Python and SSH), so playbooks can be used across multiple
136 + platforms with little changes necessary.
137 + 
138 + 1. Fail fast and early.  When a task in Ansible fails, the whole playbook
139 + fails (for the most part).  Thus, if something fails during the execution,
140 + that is a good indication that something broke.
141 + 
142 + 
143 + ### Virtual Environment
144 + The preferred environment to run the playbooks is using a virtual environment.
145 + This will ensure the correct version of Ansible is installed and will not
146 + interfere with your current workspace.
147 + 
148 + To setup a virtualenv, follow the steps below after cloning atomic-host-tests:
149 + 
150 + ```
151 + virtualenv my_env
152 + source my_env/bin/activate
153 + pip install -r requirements.txt
154 + ```
155 + 
156 + The above instructions assume you have some existing tooling installed on your
157 + workstation.  For example, on a Fedora 27 system the following packages need
158 + to be installed ahead of time:
159 + 
160 + `# dnf -y install gcc git python2-virtualenv redhat-rpm-config rsync sshpass`
161 + 
162 + Your package requirements may be different on your distribution.
163 + 
164 + 
165 + ### Running Playbooks
166 + All the playbooks should be able to be run without any extra options on the
167 + command line.  Like so:
168 + 
169 + `# ansible-playbook -i inventory tests/improved-sanity-test/main.yml`
170 + 
171 + However, some tests do accept extra arguments that can change how the test is
172 + run; please see the README for each test for details.
173 + 
174 + Additionally, certain variables are required to be configured for each test and
175 + the required variables can vary between tests.  There are sensible defaults
176 + provided, but it is up to the user to configure them as they see fit.
177 + 
178 + **NOTE**:  Playbooks are developed and tested using Ansible 2.2.  Older versions
179 + will not work.
180 + 
181 + ### Log Options
182 + By default Ansible logs to stdout.  Atomic host tests has a custom callback
183 + plugin that makes the output more human readable.  In addition there are a few
184 + custom log options described below.
185 + 
186 + #### Capture failure details
187 + 
188 + If the environment variable AHT_RESULT_FILE is set, Ansible will save the
189 + details of the failed task into file named after the value of the environment
190 + variable in the current working directory.
191 + 
192 + ```
193 + export AHT_RESULT_FILE=my_failure_file
194 + ```
195 + 
196 + In this example the failure details will be saved to ./my_failure_file
197 + 
198 + #### Capture journal on failure
199 + 
200 + Ansible handlers are used to capture the journal on failure.  This feature can
201 + be enabled using a role or an include which must be called in every block of
202 + pre_tasks, post_tasks, tasks, roles, or plays.  Force_handlers must be set to
203 + true regardless of which method is used.
204 + 
205 + ```
206 + force_handlers: true
207 + ```
208 + 
209 + ##### To use journal capture as role:
210 + ```
211 + - role: handler_notify_on_failure
212 +   handler_name: h_get_journal
213 + ```
214 + 
215 + ##### To use journal capture as include:
216 + ```
217 + - include: 'atomic-host-tests/roles/handler_notify_on_failure/task/main.yml'
218 +   handler_name: h_get_journal
219 + ```
220 + 
221 + In addition, the handler must be included since using include doesn't automatically
222 + pull in the handler.  This is typically done at the end of the block.
223 + 
224 + ```
225 + handlers:
226 +   - include: 'atomic-host-tests/roles/handler_notify_on_failure/handlers/main.yml'
227 + ```
228 + **NOTE** The path should be relative to the path of the playbook
229 + 
230 + ### Vagrant
231 + 
232 + You can see how the playbooks would run by using the supplied
233 + Vagrantfile which defines multiple boxes to test with.
234 + 
235 + You should be able to choose a CentOS AH box, a Fedora 27 AH box,
236 + or a CentOS AH Continuous (CAHC) box.
237 + 
238 + ```
239 + $ vagrant up centos
240 + 
241 + or
242 + 
243 + $ vagrant up fedora27
244 + 
245 + or
246 + 
247 + $ vagrant up cahc
248 + ```
249 + 
250 + By default, the Vagrantfile will run the `tests/improved-sanity-test/main.yml`.
251 + The playbook which is run can be changed by setting the environment variable
252 + `PLAYBOOK_FILE` to point to a playbook in the repo.
253 + 
254 + ```
255 + $ PLAYBOOK_FILE=tests/docker-swarm/main.yml vagrant up cahc
256 + ```
 1 @@ -0,0 +1,95 @@
 2 + # -*- mode: ruby -*-
 3 + # vi: set ft=ruby :
 4 + 
 5 + # !!!NOTE!!!! This Vagrantfile requires the 'vagrant-reload' plugin
 6 + # https://github.com/aidanns/vagrant-reload
 7 + 
 8 + # This Vagrantfile defines multiple boxes that are tooled to test/run the
 9 + # sanity playbook in 'tests/improved-sanity-test/main.yml'. As part of the
10 + # provisioning step, the box will be updated to the latest commit available
11 + # on the stream it is tracking.  Unfortunately, the box will always reboot
12 + # regardless if it has been updated or not.
13 + #
14 + # The playbook is configurable using the $playbook_file variable right before
15 + # the 'Vagrant.configure()' stanza.
16 + 
17 + # These scripts are used to bring the box up to date with the latest commit
18 + # available on the stream.
19 + #
20 + $cahc = <<CAHC
21 + #!/bin/bash
22 + set -xeuo pipefail
23 + local=$(ostree rev-parse centos-atomic-host/7/x86_64/devel/continuous)
24 + sudo ostree pull --commit-metadata-only --depth=1 centos-atomic-continuous:centos-atomic-host/7/x86_64/devel/continuous
25 + remote=$(ostree rev-parse centos-atomic-host/7/x86_64/devel/continuous)
26 + if [ "$local" != "$remote" ]; then
27 +     sudo rpm-ostree deploy $remote
28 + fi
29 + CAHC
30 + 
31 + $centos = <<CENTOS
32 + #!/bin/bash
33 + set -xeuo pipefail
34 + local=$(ostree rev-parse centos-atomic-host/7/x86_64/standard)
35 + sudo ostree pull --commit-metadata-only --depth=1 centos-atomic-host:centos-atomic-host/7/x86_64/standard
36 + remote=$(ostree rev-parse centos-atomic-host/7/x86_64/standard)
37 + if [ "$local" != "$remote" ]; then
38 +     sudo rpm-ostree deploy $remote
39 + fi
40 + CENTOS
41 + 
42 + $fedora27 = <<FEDORA27
43 + #!/bin/bash
44 + set -xeuo pipefail
45 + local=$(ostree rev-parse fedora/27/x86_64/atomic-host)
46 + sudo ostree pull --commit-metadata-only --depth=1 fedora-atomic:fedora/27/x86_64/atomic-host
47 + remote=$(ostree rev-parse fedora/27/x86_64/atomic-host)
48 + if [ "$local" != "$remote" ]; then
49 +     sudo rpm-ostree deploy $remote
50 + fi
51 + FEDORA27
52 + 
53 + # Define the Ansible playbook you want to run here
54 + # Alternately, you can set the 'PLAYBOOK_FILE' environment variable to
55 + # override this value
56 + $playbook_file = ENV['PLAYBOOK_FILE'] || "tests/improved-sanity-test/main.yml"
57 + 
58 + Vagrant.configure(2) do |config|
59 +     config.vm.define "cahc", autostart: false do |cahc|
60 +         cahc.vm.box = "centos/7/atomic/continuous"
61 +         cahc.vm.box_url = "https://ci.centos.org/artifacts/sig-atomic/centos-continuous/images/cloud/latest/images/centos-atomic-host-7-vagrant-libvirt.box"
62 +         cahc.vm.hostname = "cahc-dev"
63 +         cahc.vm.provision "shell", inline: $cahc
64 +         cahc.vm.provision :reload
65 +         # Because Vagrant enforces outside-in ordering with the provisioner
66 +         # we have to specify the same playbook in multiple places
67 +         cahc.vm.provision "ansible" do |ansible|
68 +             ansible.playbook = $playbook_file
69 +         end
70 +     end
71 + 
72 +     config.vm.define "centos" do |centos|
73 +         centos.vm.box = "centos/atomic-host"
74 +         centos.vm.hostname = "centosah-dev"
75 +         centos.vm.provision "shell", inline: $centos
76 +         centos.vm.provision :reload
77 +         # Because Vagrant enforces outside-in ordering with the provisioner
78 +         # we have to specify the same playbook in multiple places
79 +         centos.vm.provision "ansible" do |ansible|
80 +             ansible.playbook = $playbook_file
81 +         end
82 +     end
83 + 
84 + 
85 +     config.vm.define "fedora27", autostart: false do |fedora27|
86 +         fedora27.vm.box = "fedora/27-atomic-host"
87 +         fedora27.vm.hostname = "fedora27ah-dev"
88 +         fedora27.vm.provision "shell", inline: $fedora27
89 +         fedora27.vm.provision :reload
90 +         # Because Vagrant enforces outside-in ordering with the provisioner
91 +         # we have to specify the same playbook in multiple places
92 +         fedora27.vm.provision "ansible" do |ansible|
93 +             ansible.playbook = $playbook_file
94 +         end
95 +     end
96 + end
  1 @@ -0,0 +1,159 @@
  2 + '''Plugin to override the default output logic.'''
  3 + 
  4 + # upstream: https://gist.github.com/cliffano/9868180
  5 + 
  6 + # This program is free software: you can redistribute it and/or modify
  7 + # it under the terms of the GNU General Public License as published by
  8 + # the Free Software Foundation, either version 3 of the License, or
  9 + # (at your option) any later version.
 10 + #
 11 + # This program is distributed in the hope that it will be useful,
 12 + # but WITHOUT ANY WARRANTY; without even the implied warranty of
 13 + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14 + # GNU General Public License for more details.
 15 + #
 16 + # You should have received a copy of the GNU General Public License
 17 + # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 18 + 
 19 + 
 20 + # For some reason this has to be done
 21 + import imp
 22 + import os
 23 + 
 24 + ANSIBLE_PATH = imp.find_module('ansible')[1]
 25 + DEFAULT_PATH = os.path.join(ANSIBLE_PATH, 'plugins/callback/default.py')
 26 + DEFAULT_MODULE = imp.load_source(
 27 +     'ansible.plugins.callback.default',
 28 +     DEFAULT_PATH
 29 + )
 30 + 
 31 + try:
 32 +     from ansible.plugins.callback import CallbackBase
 33 +     BASECLASS = CallbackBase
 34 + except ImportError: # < ansible 2.1
 35 +     BASECLASS = DEFAULT_MODULE.CallbackModule
 36 + 
 37 + 
 38 + class CallbackModule(DEFAULT_MODULE.CallbackModule):  # pylint: disable=too-few-public-methods,no-init
 39 +     '''
 40 +     Override for the default callback module.
 41 + 
 42 +     Render std err/out outside of the rest of the result which it prints with
 43 +     indentation.
 44 +     '''
 45 +     CALLBACK_VERSION = 2.0
 46 +     CALLBACK_TYPE = 'stdout'
 47 +     CALLBACK_NAME = 'default'
 48 + 
 49 +     def __init__(self, *args, **kwargs):
 50 +         # pylint: disable=non-parent-init-called
 51 +         BASECLASS.__init__(self, *args, **kwargs)
 52 +         self.failed_task = []
 53 +         self.result_file = os.environ.get('AHT_RESULT_FILE')
 54 + 
 55 +     def _dump_results(self, result):
 56 +         '''Return the text to output for a result.'''
 57 +         result['_ansible_verbose_always'] = True
 58 + 
 59 +         if '_ansible_no_log' not in result.keys():
 60 +             result['_ansible_no_log'] = False
 61 + 
 62 +         save = {}
 63 +         for key in ['stdout', 'stdout_lines', 'stderr', 'stderr_lines', 'msg']:
 64 +             if key in result:
 65 +                 save[key] = result.pop(key)
 66 + 
 67 +         output = BASECLASS._dump_results(self, result)  # pylint: disable=protected-access
 68 + 
 69 +         for key in ['stdout', 'stderr', 'msg']:
 70 +             if key in save and save[key] and result['_ansible_no_log'] is False:
 71 +                 output += '\n\n%s:\n---\n%s\n---' % (key.upper(), save[key])
 72 + 
 73 +         for key, value in save.items():
 74 +             result[key] = value
 75 + 
 76 +         return output
 77 + 
 78 +     def v2_runner_on_unreachable(self, result):
 79 +         self.failed_task = result
 80 + 
 81 +         if self._play.strategy == 'free' and self._last_task_banner != result._task._uuid:
 82 +             self._print_task_banner(result._task)
 83 + 
 84 +         delegated_vars = result._result.get('_ansible_delegated_vars', None)
 85 +         if delegated_vars:
 86 +             self._display.display("fatal: [%s -> %s]: UNREACHABLE! => %s" % (result._host.get_name(), delegated_vars['ansible_host'], self._dump_results(result._result)), color=C.COLOR_UNREACHABLE)
 87 +         else:
 88 +             self._display.display("fatal: [%s]: UNREACHABLE! => %s" % (result._host.get_name(), self._dump_results(result._result)), color=C.COLOR_UNREACHABLE)
 89 + 
 90 +     def v2_runner_on_failed(self,result, ignore_errors=False):
 91 +         if ignore_errors is not True:
 92 +             # Sets environment variable for test failures for use in playboks.
 93 +             # Handlers tasks can conditionalize themselves using this variable
 94 +             # to run only on failure.
 95 +             os.environ["AHT_FAILURE"] = "1"
 96 + 
 97 +             # Save last failure
 98 +             self.failed_task = result
 99 + 
100 +         if self._play.strategy == 'free' and self._last_task_banner != result._task._uuid:
101 +             self._print_task_banner(result._task)
102 + 
103 +         delegated_vars = result._result.get('_ansible_delegated_vars', None)
104 +         if 'exception' in result._result:
105 +             if self._display.verbosity < 3:
106 +                 # extract just the actual error message from the exception text
107 +                 error = result._result['exception'].strip().split('\n')[-1]
108 +                 msg = "An exception occurred during task execution. To see the full traceback, use -vvv. The error was: %s" % error
109 +             else:
110 +                 msg = "An exception occurred during task execution. The full traceback is:\n" + result._result['exception']
111 + 
112 +             self._display.display(msg, color=C.COLOR_ERROR)
113 + 
114 +         if result._task.loop and 'results' in result._result:
115 +             self._process_items(result)
116 + 
117 +         else:
118 +             if delegated_vars:
119 +                 self._display.display("fatal: [%s -> %s]: FAILED! => %s" % (result._host.get_name(), delegated_vars['ansible_host'], self._dump_results(result._result)), color=C.COLOR_ERROR)
120 +             else:
121 +                 self._display.display("fatal: [%s]: FAILED! => %s" % (result._host.get_name(), self._dump_results(result._result)), color=C.COLOR_ERROR)
122 + 
123 +         if ignore_errors:
124 +             self._display.display("...ignoring", color=C.COLOR_SKIP)
125 + 
126 +     def v2_playbook_on_stats(self, stats):
127 +         self._display.banner("PLAY RECAP")
128 + 
129 +         hosts = sorted(stats.processed.keys())
130 +         for h in hosts:
131 +             t = stats.summarize(h)
132 + 
133 +             self._display.display(u"%s : %s %s %s %s" % (
134 +                 hostcolor(h, t),
135 +                 colorize(u'ok', t['ok'], C.COLOR_OK),
136 +                 colorize(u'changed', t['changed'], C.COLOR_CHANGED),
137 +                 colorize(u'unreachable', t['unreachable'], C.COLOR_UNREACHABLE),
138 +                 colorize(u'failed', t['failures'], C.COLOR_ERROR)),
139 +                 screen_only=True
140 +             )
141 + 
142 +             self._display.display(u"%s : %s %s %s %s" % (
143 +                 hostcolor(h, t, False),
144 +                 colorize(u'ok', t['ok'], None),
145 +                 colorize(u'changed', t['changed'], None),
146 +                 colorize(u'unreachable', t['unreachable'], None),
147 +                 colorize(u'failed', t['failures'], None)),
148 +                 log_only=True
149 +             )
150 + 
151 +         self._display.display("", screen_only=True)
152 +         # Save result to file if environment variable exists
153 +         if self.result_file is not None:
154 +             if self.failed_task:
155 +                 with open(self.result_file, 'w') as f:
156 +                     f.write("PLAY: %s\n%s\n%s" % (self._play, \
157 +                                                   self.failed_task._task, \
158 +                                                   self._dump_results(self.failed_task._result)))
159 +             else:
160 +                 open(self.result_file, 'w').close()
  1 @@ -0,0 +1,338 @@
  2 + ### Before We Get Started...
  3 + 
  4 + This document assumes that you have some basic familiarity with the following
  5 + topics:
  6 + 
  7 +   - general `git` usage
  8 +   - submitting and reviewing pull requests (PRs) on GitHub
  9 +   - general Ansible usage (tasks, roles, playbooks)
 10 +   - have previously read though [CONTRIBUTING.md](https://github.com/projectatomic/atomic-host-tests/blob/master/CONTRIBUTING.md)
 11 + 
 12 + The intention is for the repo to not have any exotic requirements and be
 13 + relatively easy to use and to contribute to.  If you feel this is not the
 14 + case, feel free to open an [issue](https://github.com/projectatomic/atomic-host-tests/issues/new) to discuss how it can be improved.
 15 + 
 16 + ### A Brief Introduction to the Repo
 17 + 
 18 + At the top-level of the repository, we have five directories.  Of these five
 19 + directories, the `roles` and `tests` directories are where the majority of
 20 + the development happens.
 21 + 
 22 + The `callback_plugins` directory is where we have a single plugin that
 23 + provides improved output formatting from the Ansible playbooks.  It also
 24 + provides some functionality that allows the tests to collect the journal
 25 + from a system after a failure.
 26 + 
 27 + The `common` directory contains pieces of Ansible playbooks/roles that did
 28 + not fit in with the other roles and tests that exist, but are still used
 29 + in parts of the repository.
 30 + 
 31 + The `docs` directory contains documentation important to using the repo
 32 + and developing for the repo.
 33 + 
 34 + The `roles` directory is the traditional `roles` directory that is often
 35 + used in Ansible playbooks.  We have placed the directory at the top-level
 36 + of the repo, so that we can re-use the roles across multiple tests.
 37 + 
 38 + The `tests` directory contains playbooks which execute tests using a mix
 39 + of roles and tasks.
 40 + 
 41 + ### Setting up your Environment/Tools
 42 + 
 43 + As stated in the opening of this doc, the repo does not have any exotic
 44 + requirements and should be easy to use and develop for.
 45 + 
 46 + You are free to use any code editor that you are most familiar with, as long
 47 + as it does not cause any breakage in the roles/tests or distrupts the overall
 48 + style of the repo.
 49 + 
 50 + That being said, `vim` users would probably be interested in the the
 51 + [Ansible plugin](https://github.com/pearofducks/ansible-vim) which enables syntax highlighting.
 52 + This `vim` plugin is also why many of the `.yml` files in the repo have the
 53 + following comment at the head of file:
 54 + 
 55 + `# vim: set ft=ansible:`
 56 + 
 57 + ### Writing Your First Role
 58 + 
 59 + The main goal when writing a new role for the repo is to create something
 60 + that is generic enough that can be used by other users.  This means that
 61 + the role should have a limited scope in terms of what is intends to do and
 62 + is not unique to your particular test.
 63 + 
 64 + As an example, there is a role defined below that verifies the `docker build`
 65 + operation is successful.
 66 + 
 67 + 
 68 + ```yaml
 69 + ---
 70 + - name: Fail if required variables are not set
 71 +   fail:
 72 +     msg: "The required variables are not set."
 73 +   when: image_name is not defined or
 74 +         build_path is not defined or
 75 +         dockerfile_name is not defined
 76 + 
 77 + - name: Build Docker image
 78 +   command: "docker build -t {{ image_name }} -f {{ build_path }}/{{ dockerfile_name }} {{ build_path }}"
 79 + 
 80 + - name: Verify Docker image was built
 81 +   command: docker images
 82 +   register: docker_images
 83 +   failed_when: image_name not in docker_images.stdout
 84 + ```
 85 + 
 86 + This role is very flexible as it allows users the ability to define the
 87 + location of the Dockerfile, the name of the Dockerfile, and the name of the
 88 + image being built.  Other roles or tasks will need to be used to land the
 89 + Dockerfile on the host, which allows this role to stay simple in its
 90 + definition.
 91 + 
 92 + ### Writing Your First Test
 93 + 
 94 + Now you have a new role created, let's put it to use in a new test playbook.
 95 + 
 96 + #### Directory Setup
 97 + 
 98 + Firstly, you will have to create a new sub-directory under `tests` and create
 99 + symlinks to the top-level `callback_plugins` and `roles` directories.  This
100 + allows the test to reference the available roles and have its output nicely
101 + formatted by the callback plugin.  In this example, we are going to pretend we
102 + are creating a test playbook for the `docker build` command.
103 + 
104 + ```bash
105 + $ mkdir -p tests/docker-build/
106 + $ ln -s ../../callback_plugins/ tests/docker-build/callback_plugins
107 + $ ln -s ../../roles/ tests/docker-build/roles
108 + ```
109 + 
110 + Additional directories such as `files`, `templates` or `vars` may be required
111 + for your test.  Please reference the [Ansible documentation](http://docs.ansible.com/ansible/playbooks_best_practices.html#content-organization) about
112 + content organization about when and how to use these directories.
113 + 
114 + During this phase, it would be wise to setup any RHEL subscription data under
115 + `/roles/redhat_subscription/files`.  The `redhat_subscription` role defaults
116 + to looking for subscription data in the `/roles/redhat_subscription/files/subscription_data.csv`
117 + file.  You can use the sample data in [subscription_data.csv.sample](/roles/redhat_subscription/files/subscription_data.csv.sample) to see how
118 + the file is structured.
119 + 
120 + #### Playbook Structure + System State
121 + 
122 + Now we can start developing the actual playbook.  When running an Ansible
123 + playbook, the operations are mostly executed in serial, so there is a sense
124 + of state of the host under test.  This means you can structure your playbook
125 + to assume certain conditions of the host during the execution of the playbook.
126 + 
127 + A simple playbook will have a list of tasks or roles defined in a single file
128 + and that is all that will be required.  Sometimes, it is desirable to create
129 + multiple playbooks in a single file for the purposes of providing delineation
130 + between certain features being tested.  This can be seen in [tests/admin-unlock](/tests/admin-unlock/main.yml)
131 + where each set of features is separated into their own playbooks.
132 + 
133 + For our example, we will use the simple case of a single playbook in a single
134 + file.
135 + 
136 + #### Playbook Sections
137 + 
138 + All of the playbooks should start with a `name`, `hosts`, and `become`
139 + declaration.
140 + 
141 + The `name` is up to the test developer, but should be somewhat descriptive
142 + of what the test is doing.
143 + 
144 + For the `host` value, we recommend the following:
145 + 
146 + `- hosts: "{{ testnodes | default('all') }}"`
147 + 
148 + This allows users to supply simple inventory data to `ansible-playbook`, but
149 + retains the flexibility to support multi-node tests in the future.
150 + (Almost all of the tests in the repo are single-node tests.)
151 + 
152 + Since most of our test operations require root privileges, the `become: yes`
153 + declaration ensures that we have those privileges.
154 + 
155 + The playbook should be tagged via a `tag` value.  This allows the test
156 + executor the ability to skip the entire playbook, if they were to try to run
157 + multiple playbooks via a script or other framework.  Typically, this value
158 + is the name of the test being run.
159 + 
160 + If the playbook requires additional variables to be defined, they can be
161 + specified via the `vars_files` or `vars` declaration.
162 + 
163 + The bulk of your test will then be constructed using the various roles that
164 + are available in the `roles` directory.  Remember to tag each role with its
165 + name to allow users running your test to skip roles if they choose to.  (If
166 + you are re-using the roles multiple times in the same test, you should tag
167 + each role with a unique value.)
168 + 
169 + #### Example Playbook
170 + 
171 + In the example playbook, we are going to copy a couple of Dockerfiles to the
172 + host and the use our `docker_build` role to build Docker images with those
173 + Dockerfiles.  Afterwards, we will remove the Docker images that have been
174 + built.
175 + 
176 + Before we start to write out any YAML, it is helpful to start by documenting
177 + your test in a README.md file.  In addtion to providing useful information to
178 + users running the tests, it can also help to provide a general structure to
179 + the test you want to write.
180 + 
181 + We require new tests to minimally include a README.md that covers which kind
182 + of testing the playbook will perform, any kind of prerequisites for running
183 + the playbook, and an example invocation of the playbook.  You can reference
184 + the [README.md](/tests/improved-sanity-test/README.md) from the `improved-sanity-test`
185 + as an example.
186 + 
187 + Since we are going to be copying multiple Dockerfiles, we will need to create
188 + a `files` directory to hold them.  See below for the directory structure and
189 + some simple example Dockerfiles.
190 + 
191 + ```bash
192 + $ mkdir -p tests/docker-build/files/
193 + $ cat tests/docker-build/files/centos-httpd-Dockerfile
194 + FROM registry.centos.org/centos/centos:7
195 + RUN yum -y install httpd
196 + 
197 + $ cat tests/docker-build/files/fedora-httpd-Dockerfile
198 + FROM registry.fedoraproject.org/fedora:25
199 + RUN dnf -y install httpd
200 + ```
201 + 
202 + With the files in place, we can edit our playbook at `tests/docker-build/main.yml`.
203 + While it is not required to use the name `main.yml`, it is the standard file name
204 + we have used thusfar.
205 + 
206 + ```yaml
207 + ---
208 + - name: Docker Build
209 +   hosts: all
210 +   become: yes
211 + 
212 +   tags:
213 +     - docker_build
214 + 
215 +   pre_tasks:
216 +     - name: Make temp directory to hold Dockerfiles
217 +       command: mktemp -d
218 +       register: temp_dir
219 + 
220 +     - name: Copy Dockerfiles to temp directory
221 +       synchronize:
222 +         src: files/
223 +         dest: "{{ temp_dir.stdout }}/"
224 +         recursive: yes
225 + 
226 +   roles:
227 +     - role: ansible_version_check
228 +       tags:
229 +         - ansible_version_check
230 + 
231 +     - role: docker_build
232 +       build_path: "{{ temp_dir.stdout }}"
233 +       dockerfile_name: "centos-httpd-Dockerfile"
234 +       image_name: "centos-httpd"
235 +       tags:
236 +         - centos_docker_build
237 + 
238 +     - role: docker_build
239 +       build_path: "{{ temp_dir.stdout }}"
240 +       dockerfile_name: "fedora-httpd-Dockerfile"
241 +       image_name: "fedora-httpd"
242 +       tags:
243 +         - fedora_docker_build
244 + 
245 +   post_tasks:
246 +     - name: Remove all docker images
247 +       shell: docker rmi -f $(docker images -qa)
248 + ```
249 + 
250 + Here we've made a temporary directory, copied the Dockerfiles to the directory,
251 + built the images using the `docker_build` role from the earlier example, and
252 + then cleaned up after the test.
253 + 
254 + Note, we used the `ansible_version_check` role to verify that the version of
255 + Ansible being used to execute the playbook is what we currently support.  This
256 + is suggested for all playbooks.
257 + 
258 + Each role is tagged in the same way the whole playbook is tagged - to enable
259 + users to skip certain roles during test execution.
260 + 
261 + Additionally, it is good practice to clean up any artifacts from the test
262 + which may interfere with other tests that are run afterwards.
263 + 
264 + ### Testing Your Playbook
265 + 
266 + After you have finished with your playbook, it is important to test that it can
267 + successfully run against the Atomic Host variant of CentOS, Fedora, and RHEL.
268 + If one of those platforms does not run successfully, you'll need to make the
269 + necessary adjustments before submitting a pull request with your changes.
270 + 
271 + ### Following Established Style
272 + 
273 + The [CONTRIBUTING.md](https://github.com/projectatomic/atomic-host-tests/blob/master/CONTRIBUTING.md) doc points out that the members of the repo try to follow the best
274 + practices and style guidelines that are used by the [openshift-ansible](https://github.com/openshift/openshift-ansible) project.
275 + The are noted here again:
276 + 
277 +   - [OpenShift Ansible Best Practices](https://github.com/openshift/openshift-ansible/blob/master/docs/best_practices_guide.adoc#ansible)
278 +   - [OpenShift Ansible Style Guide](https://github.com/openshift/openshift-ansible/blob/master/docs/style_guide.adoc#ansible)
279 + 
280 + You should familiarize yourself with these practices and rules, and try to
281 + follow them as you work on your own changes.
282 + 
283 + The enforcement of these best practices and rules is not stringent, but be
284 + aware that changes may be requested to comply where it makes sense.
285 + 
286 + Generally, the YAML structure used in the repo favors the 'multi-line' approach
287 + when writing out tasks or roles:
288 + 
289 + ```yaml
290 + - name: my task
291 +   module_name:
292 +     arg1: "val1"
293 +     arg2: "val2"
294 +   when: something == "foobar"
295 +   register: output_var
296 + ```
297 + 
298 + If you need to run a command that has multiple arguments, you can break them
299 + across multiple lines:
300 + 
301 + ```yaml
302 + - name: long command
303 +   command: >
304 +     long_foobar -v
305 +     --arg1 val1
306 +     --arg2 val2
307 +     --arg3 val3
308 +     some_file_name
309 + ```
310 + 
311 + Finally, on the subject of tabs vs. spaces, the repo uses spaces throughout.
312 + 
313 + ### Asking for Feedback
314 + 
315 + There are two ways to solicit feedback about your work.  First, you can open
316 + an issue in the repo to discuss how you would like to test a certain feature
317 + or to discuss some changes you would like to make to a repo/test. This allows
318 + other contributors to weigh in on the proposed changes and provide some
319 + feedback on how to best accomplish your goals.
320 + 
321 + If you feel your work is ready to be reviewed, you can submit your changes
322 + as a pull request and wait for feedback from the contributors.
323 + 
324 + #### PR Submission Checklist
325 + 
326 + If your pull request makes any changes to the roles or tests of the repo, the
327 + following checklist may be useful to follow in order to minimize any extra
328 + changes that may be requested:
329 + 
330 + - [ ] role/test has successfully run against the following platforms
331 +   - [ ] Fedora 27 Atomic Host
332 +   - [ ] CentOS 7 Atomic Host
333 +   - [ ] [CentOS AH Continuous](https://wiki.centos.org/SpecialInterestGroup/Atomic/Devel) or [Fedora AH Continuous](https://pagure.io/fedora-atomic-host-continuous)
334 +   - [ ] RHEL 7 Atomic Host (if available)
335 + - [ ] best effort was made to make changes meet [best practices](https://github.com/openshift/openshift-ansible/blob/master/docs/best_practices_guide.adoc#ansible) and [style guidelines](https://github.com/openshift/openshift-ansible/blob/master/docs/style_guide.adoc#ansible)
336 + - [ ] commit message clearly explains changes and rationale for changes
337 + 
338 + The members of this repo strive to be friendly and helpful with contributors,
339 + so do not be afraid to ask for help or guidance at any point during the process.
1 @@ -0,0 +1,2 @@
2 + ansible >2.3,<2.5
3 + jmespath
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,18 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + - name: Fail if avc_major is not defined
 6 +   when: avc_major is undefined
 7 +   fail:
 8 +     msg: "The avc_major variable is undefined"
 9 + 
10 + - name: Fail if avc_minor is not defined
11 +   when: avc_minor is undefined
12 +   fail:
13 +     msg: "The avc_minor variable is undefined"
14 + 
15 + - name: Check if Ansible is the correct version (or newer)
16 +   assert:
17 +     that:
18 +       - "ansible_version.major >= {{ avc_major }}"
19 +       - "ansible_version.minor >= {{ avc_minor }}"
1 @@ -0,0 +1,3 @@
2 + ---
3 + avc_major: '2'
4 + avc_minor: '4'
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,10 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + - name: Fail if acd_container is undefined
 6 +   when: acd_container is undefined
 7 +   fail:
 8 +     msg: "acd_container is undefined"
 9 + 
10 + - name: Remove container {{ acd_container }}
11 +   command: atomic --assumeyes containers delete {{ acd_container }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,12 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # list containers and save to json
 6 + #
 7 + - name: List images with --json
 8 +   command: atomic containers list --json
 9 +   register: acl
10 + 
11 + - name: Save JSON to variable
12 +   set_fact:
13 +     acl_json: "{{ acl.stdout | from_json }}"
1 @@ -0,0 +1,7 @@
2 + ---
3 + # vim: set ft=ansible:
4 + #
5 + dependencies:
6 +   - role: atomic_containers_list
7 + 
8 + allow_duplicates: true
 1 @@ -0,0 +1,55 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # This role verifies the values of an image from atomic containers list by
 6 + # comparing the expected_values dictionary.  The unique identifier for the
 7 + # containers is image name
 8 + #
 9 + # Example calling this role:
10 + #   - role: atomic_containers_list_verify
11 + #     expected_values:
12 + #       repo: docker.io/httpd
13 + #       id: 21340928304932
14 + #
15 + - name: Fail if expected_values or expected_values['image_name'] is undefined
16 +   when: expected_values is undefined or
17 +         expected_values['image_name'] is undefined
18 +   fail:
19 +     msg: "expected_values or expected_values['image_name'] is undefined"
20 + 
21 + - name: Set role facts
22 +   set_fact:
23 +     aclv_expected: "{{ expected_values }}"
24 +     aclv_em: "{{ expect_missing | default(false) | bool }}"
25 +     aclv_acl_jq_match: ""
26 + 
27 + # acl_json comes from the atomic_containers_list role which is a dependency
28 + # of this role in the meta directory
29 + - name: Get matching list entry
30 +   set_fact:
31 +     aclv_acl_jq_match: "{{ item }}"
32 +   with_items: "{{ acl_json | json_query(query) }}"
33 +   vars:
34 +     query: "[?image_name=='{{ aclv_expected['image_name'] }}']"
35 + 
36 + - name: Fail if no matching image entry
37 +   when: (aclv_acl_jq_match == "" and not aclv_em) or
38 +         (aclv_acl_jq_match != "" and aclv_em)
39 +   fail:
40 +     msg: "No matching container or container is in list when it is not supposed to be"
41 + 
42 + # There is no way to skip the comparison in the next step if the container
43 + # is expected to not be in the containers list except setting the expected
44 + # dictionary to empty
45 + 
46 + - name: Set expected for expected missing case
47 +   when: aclv_em
48 +   set_fact:
49 +     aclv_expected: {}
50 + 
51 + - name: Fail if values are incorrect
52 +   when: aclv_acl_jq_match[item.key] is undefined or
53 +         item.value not in aclv_acl_jq_match[item.key]
54 +   fail:
55 +     msg: "{{ item.key }} is incorrect or does not exist."
56 +   with_dict: "{{ aclv_expected }}"
1 @@ -0,0 +1,5 @@
2 + ---
3 + allow_duplicates: true
4 + 
5 + dependencies:
6 +   - role: set_is_atomic
 1 @@ -0,0 +1,11 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # Dumb role to verify that hosts under tests are actually Atomic Hosts
 6 + #
 7 + # Depends on 'set_is_atomic' role
 8 + #
 9 + - name: Fail if system is not an Atomic Host
10 +   when: not g_is_atomic
11 +   fail:
12 +     msg: "The system is not an Atomic Host"
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,26 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + - name: Optionally stop the rpm-ostree daemon
 6 +   when:
 7 +     - stop_daemon is defined
 8 +     - stop_daemon
 9 +   service:
10 +     name: rpm-ostreed
11 +     state: stopped
12 + 
13 + - name: Run atomic host status
14 +   command: atomic host status
15 +   register: ahs
16 + 
17 + - name: Run rpm-ostree status
18 +   command: rpm-ostree status
19 +   register: ros
20 + 
21 + - name: Fail if output is not identical
22 +   when: ahs.stdout != ros.stdout
23 +   fail:
24 +     msg: |
25 +       The output of atomic host status and rpm-ostree status are not the same.
26 +       atomic host status: {{ ahs.stdout }}
27 +       rpm-ostree status: {{ ros.stdout }}
1 @@ -0,0 +1,6 @@
2 + ---
3 + ahv_rpms:
4 +   - atomic
5 +   - docker
6 +   - ostree
7 +   - rpm-ostree-client
1 @@ -0,0 +1,7 @@
2 + ---
3 + allow_duplicates: true
4 + 
5 + dependencies:
6 +   # rv_rpms comes from the defaults directory in this role
7 +   - role: rpm_version
8 +     rv_rpms: "{{ ahv_rpms }}"
 1 @@ -0,0 +1,54 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # Parameters:
 6 + #  ahv_rpms: (optional) list of rpms
 7 + #   Example:
 8 + #     ahv_rpms
 9 + #       - atomic
10 + #       - docker
11 + #
12 + #  ahv_requirements: dictionary with key:value pair of rpm:expected version
13 + #    Example:
14 + #      ahv_requirements:
15 + #        docker: 1.12
16 + #        rpm-ostree: 2017.9
17 + #
18 + # This role, with no parameters, will store version information for the list of
19 + # rpms in ahv_rpms to a dictionary named g_atomic_host.  ahv_rpms has default
20 + # values in the defaults directory of this role.
21 + #
22 + # Optionally, ahv_rpms can be passed into this role to override the defaults.
23 + # The g_atomic_host dictionary is useful for conditional statements when
24 + # functionality is different between older/newer version of a package. Use the
25 + # version_compare filter for these conditionals.
26 + #
27 + # Another optional parameter is a dictionary named ahv_requirements which should
28 + # contain a key / value pair (rpm:  minimum version).  This role should fail if
29 + # the minimum version is not met.
30 + #
31 + - name: Set requirements
32 +   set_fact:
33 +     ahv_requirements: "{{ ahv_requirements | default({}) }}"
34 + 
35 + # Get set of rpms that were not alreayd retrieved when this role was called
36 + - name: Get set of of missing rpms
37 +   set_fact:
38 +     ahv_missing_rpms: "{{ ahv_requirements.keys() | difference(ahv_rpms) }}"
39 + 
40 + - name: Get versions if they were not retrieved
41 +   when: ahv_missing_rpms|length > 0
42 +   import_role:
43 +     name: rpm_version
44 +   vars:
45 +     rv_rpms: "{{ ahv_missing_rpms }}"
46 + 
47 + - name: Fail if version requirement is not met
48 +   when:
49 +     - g_atomic_host[item.key] | version_compare(item.value, '<')
50 +     - g_atomic_host[item.key] is defined
51 +   fail:
52 +     msg: |
53 +       Expected: {{ item.key }} is running version {{ ahv_requirements[item.key] }}
54 +       Actual: {{ item.key }} is running {{ g_atomic_host[item.key] }}
55 +   with_dict: "{{ ahv_requirements }}"
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,14 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + - name: Fail if aid_image is undefined
 6 +   when: aid_image is undefined
 7 +   fail:
 8 +     msg: "aid_image is undefined"
 9 + 
10 + - name: Set options
11 +   set_fact:
12 +     del_options: "{{ aid_options | default() }}"
13 + 
14 + - name: Remove {{ aid_image }}
15 +   command: atomic --assumeyes images delete {{ aid_image }} {{ del_options }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,18 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + - name: Remove all containers
 6 +   command: atomic --assumeyes containers delete --all --force
 7 +   ignore_errors: yes
 8 + 
 9 + - name: Remove all images
10 +   command: atomic --assumeyes images delete --all --force
11 +   ignore_errors: yes
12 + 
13 + - name: Prune images
14 +   command: atomic images prune
15 + 
16 + - name: Verify no images exist
17 +   command: atomic images list -q
18 +   register: ail
19 +   failed_when: ail.stdout_lines|length > 0
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,16 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # list images and save to json
 6 + #
 7 + - name: Set options
 8 +   set_fact:
 9 +     images_list_options: "{{ ail_options | default() }}"
10 + 
11 + - name: List images with --json
12 +   command: atomic images list {{ images_list_options }} --json
13 +   register: ail
14 + 
15 + - name: Save JSON to variable
16 +   set_fact:
17 +     ail_json: "{{ ail.stdout | from_json }}"
1 @@ -0,0 +1,7 @@
2 + ---
3 + # vim: set ft=ansible:
4 + #
5 + dependencies:
6 +   - role: atomic_images_list
7 + 
8 + allow_duplicates: true
 1 @@ -0,0 +1,61 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # This role verifies the values of an image from atomic images list by
 6 + # comparing the expected_values dictionary.  The entry in the list of
 7 + # images is determined by the repo property.  This role will assume the
 8 + # latest tag unless a tag is passed to this role.
 9 + #
10 + # Example calling this role:
11 + #   - role: atomic_images_list_verify
12 + #     expected:
13 + #       repo: docker.io/httpd
14 + #
15 + - name: Fail if expected_values or expected_values['repo'] is undefined
16 +   when: expected_values is undefined or
17 +         expected_values['repo'] is undefined
18 +   fail:
19 +     msg: "expected_values or expected_values['repo'] is undefined"
20 + 
21 + - name: Set facts for role
22 +   set_fact:
23 +     ailv_expected: "{{ expected_values }}"
24 +     ailv_em: "{{ expect_missing | default(false) | bool }}"
25 +     ailv_ail_jq_match: ""
26 +     ailv_tag: "{{ expected_values['tag'] | default('latest') }}"
27 + 
28 + - name: Setup queries
29 +   set_fact:
30 +     ailv_repo_query: "[?repo=='{{ ailv_expected['repo'] }}']"
31 +     ailv_tag_query: "[?tag=='{{ ailv_tag }}']|[0]"
32 + 
33 + - name: Get matching list entry
34 +   set_fact:
35 +     ailv_ail_jq_match: "{{ ail_json | json_query(ailv_repo_query) }}"
36 + 
37 + - name: Check for tag in list of images that match the repo
38 +   set_fact:
39 +     ailv_match: "{{ ailv_ail_jq_match | json_query(ailv_tag_query) }}"
40 + 
41 + - name: Fail if no matching image entry
42 +   when: (ailv_match == True and ailv_em == True) or
43 +         (ailv_match == False and ailv_em == False)
44 +   fail:
45 +     msg: "No matching image entry or image is in list when it is not supposed to be"
46 + 
47 + # There is no way to skip the comparison in the next step if the container
48 + # is expected to not be in the containers list except setting the expected
49 + # dictionary to empty
50 + - name: Set expected for expected missing case
51 +   when: ailv_em
52 +   set_fact:
53 +     ailv_expected: {}
54 + 
55 + - name: Fail if values are incorrect
56 +   when: ailv_match[item.key] is undefined or
57 +         item.value != ailv_match[item.key]
58 +   fail:
59 +     msg: |
60 +       Expected: {{ item.key }}:{{ item.value }}
61 +       Actual: {{ item.key }}:{{ ailv_match[item.key]}}
62 +   with_dict: "{{ ailv_expected }}"
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,16 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # installs image with atomic cli
 6 + #
 7 + - name: Fail if ai_image is undefined
 8 +   when: ai_image is undefined
 9 +   fail:
10 +     msg: "ai_image is not defined"
11 + 
12 + - name: Set options
13 +   set_fact:
14 +     ai_options: "{{ ai_options | default() }}"
15 + 
16 + - name: Install image
17 +   command: atomic install {{ ai_image }} {{ ai_options }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
  1 @@ -0,0 +1,121 @@
  2 + ---
  3 + # vim: set ft=ansible:
  4 + #
  5 + #   This role verifies the atomic installation functionality through
  6 + #   the installation of cockpit container.  The cockpit container will
  7 + #   create a file /etc/pam.d/cockpit  when installed and will
  8 + #   remove the file when uninstalled.  This criteria will be used to
  9 + #   validate the install/uninstall.
 10 + #
 11 + #   Commands tested:
 12 + #   - atomic install
 13 + #   - atomic run
 14 + #   - atomic uninstall
 15 + #
 16 + - name: Set cockpit container name for RHELAH
 17 +   when: ansible_distribution == "RedHat"
 18 +   set_fact:
 19 +     cockpit_cname: "registry.access.redhat.com/rhel7/cockpit-ws"
 20 + 
 21 + - name: Set cockpit container name for Fedora/CentOS
 22 +   when: "'CentOS' in ansible_distribution or ansible_distribution == 'Fedora'"
 23 +   set_fact:
 24 +     cockpit_cname: "registry.fedoraproject.org/f27/cockpit"
 25 + 
 26 + - name: Install cockpit container with tag
 27 +   command: "atomic install {{ cockpit_cname }}:latest"
 28 +   register: aic
 29 +   retries: 5
 30 +   delay: 60
 31 +   until: aic|success
 32 + 
 33 + - name: Check for /etc/pam.d/cockpit
 34 +   stat:
 35 +     path: /etc/pam.d/cockpit
 36 +   register: install_file
 37 + 
 38 + - name: Fail if /etc/pam.d/cockpit file is not found
 39 +   when: install_file.stat.exists == False
 40 +   fail:
 41 +     msg: "Cockpit installation failed"
 42 + 
 43 + - name: Run cockpit container with tag
 44 +   command: "atomic run {{ cockpit_cname }}:latest"
 45 + 
 46 + - name: Verify port 9090 is open
 47 +   wait_for:
 48 +     port: 9090
 49 +     timeout: 30
 50 + 
 51 + - name: Verify cockpit webpage is up
 52 +   shell: curl -k "https://localhost:9090" | grep "Log in"
 53 + 
 54 + - name: Get cockpit container ID
 55 +   command: docker ps -q
 56 +   register: cockpit_cid
 57 + 
 58 + - name: Stop the cockpit container
 59 +   command: "atomic stop {{ cockpit_cid.stdout }}"
 60 + 
 61 + - name: Delete the cockpit container
 62 +   command: atomic --assumeyes containers delete {{ cockpit_cid.stdout }}
 63 + 
 64 + - name: Uninstall cockpit container
 65 +   shell: atomic uninstall {{ cockpit_cname }}
 66 + 
 67 + - name: Check for /etc/pam.d/cockpit file
 68 +   stat:
 69 +     path: /etc/pam.d/cockpit
 70 +   register: uninstall_file
 71 + 
 72 + - name: Fail if /etc/pam.d/cockpit file is found
 73 +   when: uninstall_file.stat.exists == True
 74 +   fail:
 75 +     msg: "Cockpit uninstall failed"
 76 + 
 77 + - name: Install cockpit container without tag
 78 +   command: atomic install {{ cockpit_cname }}
 79 + 
 80 + - name: Check for /etc/pam.d/cockpit
 81 +   stat:
 82 +     path: /etc/pam.d/cockpit
 83 +   register: install_file
 84 + 
 85 + - name: Fail if /etc/pam.d/cockpit file is not found
 86 +   when: install_file.stat.exists == False
 87 +   fail:
 88 +     msg: "Cockpit installation failed"
 89 + 
 90 + - name: Run cockpit container without tag
 91 +   command: "atomic run {{ cockpit_cname }}"
 92 + 
 93 + - name: Verify port 9090 is open
 94 +   wait_for:
 95 +     port: 9090
 96 +     timeout: 30
 97 + 
 98 + - name: Verify cockpit webpage is up
 99 +   shell: curl -k "https://localhost:9090" | grep "Log in"
100 + 
101 + - name: Get cockpit container ID
102 +   command: docker ps -q
103 +   register: cockpit_cid
104 + 
105 + - name: Stop the cockpit container
106 +   command: "atomic stop {{ cockpit_cid.stdout }}"
107 + 
108 + - name: Delete container
109 +   command: atomic --assumeyes containers delete {{ cockpit_cid.stdout }}
110 + 
111 + - name: Uninstall cockpit container without tag
112 +   shell: atomic uninstall {{ cockpit_cname }}
113 + 
114 + - name: Check for /etc/pam.d/cockpit file
115 +   stat:
116 +     path: /etc/pam.d/cockpit
117 +   register: uninstall_file
118 + 
119 + - name: Fail if /etc/pam.d/cockpit file is found
120 +   when: uninstall_file.stat.exists == True
121 +   fail:
122 +     msg: "Cockpit uninstall failed"
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,26 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # pulls image with atomic cli
 6 + #
 7 + # Required variables:
 8 + #  - apl_image: name of image to be pulled (string)
 9 + #
10 + # Optional variables:
11 + #  - apl_options: options to be passed to 'atomic pull' (string)
12 + #
13 + - name: Fail if apl_image is undefined
14 +   when: apl_image is undefined
15 +   fail:
16 +     msg: "apl_image is not defined"
17 + 
18 + - name: Set options
19 +   set_fact:
20 +     pull_options: "{{ apl_options | default() }}"
21 + 
22 + - name: Pull image
23 +   command: atomic pull {{ apl_image }} {{ pull_options }}
24 +   register: pull
25 +   retries: 6
26 +   delay: 10
27 +   until: pull|success
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,28 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #   This role verifies the atomic pull, run, and stop commands.  The validation
 6 + #   of the atomic commands is done against docker.
 7 + #
 8 + #   Commands:
 9 + #   - atomic pull
10 + #   - atomic run
11 + #   - atomic stop
12 + #
13 + - name: Pull busybox
14 +   command: atomic pull busybox
15 +   register: apb
16 +   retries: 5
17 +   delay: 60
18 +   until: apb|success
19 + 
20 + - name: Get atomic images
21 +   command: atomic images list
22 +   register: aio
23 + 
24 + - name: Fail if busybox is not in atomic images output
25 +   when: "'busybox' not in aio.stdout"
26 +   fail:
27 +     msg: |
28 +       Expected: busybox is not in atomic images output
29 +       Actual: {{ aio.stdout }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,16 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # Push image with atomic cli
 6 + #
 7 + - name: Fail if apsh_image is undefined
 8 +   when: apsh_image is undefined
 9 +   fail:
10 +     msg: "apsh_image is not defined"
11 + 
12 + - name: Set options
13 +   set_fact:
14 +     push_options: "{{ apsh_options | default() }}"
15 + 
16 + - name: Push image
17 +   command: atomic push {{ apsh_image }} {{ push_options }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,12 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # runs container with atomic cli
 6 + #
 7 + - name: Fail if ar_image is undefined
 8 +   when: ar_image is undefined
 9 +   fail:
10 +     msg: "ar_image is not defined"
11 + 
12 + - name: Run {{ ar_image }}
13 +   command: atomic run {{ ar_image }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,27 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #   This role verifies the atomic run command.  This role requires no other
 6 + #   containers to be running besides the one being run.
 7 + #
 8 + #   Commands:
 9 + #   - atomic run
10 + #
11 + - name: Fail if container is undefined
12 +   when: container is undefined
13 +   fail:
14 +     msg: "No container specified"
15 + 
16 + - name: atomic run {{ container }}
17 +   command: atomic run {{ container }}
18 + 
19 + - name: Verify container is running
20 +   command: docker ps -a
21 +   register: dps
22 + 
23 + - name: Fail if container is not running
24 +   when: (dps.stdout.find("Up") == -1 and dps.stdout.find("Created") == -1)
25 +   fail:
26 +     msg: |
27 +       Expected: Container is Up or Created in docker ps -a output
28 +       Actual: {{ dps.stdout }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,35 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #   This role verifies whether container image doesn't exist CVEs.
 6 + #
 7 + - name: Fail if image is undefined
 8 +   when: image is undefined
 9 +   fail:
10 +     msg: "Image is undefined"
11 + 
12 + - name: Set scanner image (RHEL)
13 +   set_fact:
14 +     scanner_image: "registry.access.redhat.com/rhel7/openscap"
15 + 
16 + - name: Install openscap
17 +   command: atomic --debug install {{ scanner_image }}
18 +   register: result
19 + 
20 + - name: Check installation of openscap
21 +   when: "'Installation complete' not in result.stdout"
22 +   fail:
23 +     msg: "Atomic install was unsuccessful"
24 + 
25 + - name: Run atomic scan
26 +   command: atomic --debug scan --verbose {{ image }}
27 +   register: aio
28 + 
29 + - name: append command output into a list
30 +   set_fact:
31 +     result_list: '{{result_list + [aio.stdout]}}'
32 + 
33 + - name: Catch atomic scan failures
34 +   when: "'The following issues were found' in aio.stdout"
35 +   fail:
36 +     msg: "Found new CVEs."
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,63 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #   This role verifies the atomic scan command.  It validates the command by
 6 + #   checking the output of the command and looking for the log file generated
 7 + #   by the scan command.
 8 + #
 9 + #   Commands:
10 + #   - atomic install
11 + #   - atomic scan
12 + #
13 + - name: Set scanner image (RHEL)
14 +   set_fact:
15 +     scanner_image: "registry.access.redhat.com/rhel7/openscap"
16 +     scanner_type: "openscap"
17 + 
18 + - name: Set scanner target
19 +   set_fact:
20 +     scanner_target: "registry.access.redhat.com/rhel7"
21 + 
22 + - name: Install openscap
23 +   command: atomic install {{ scanner_image }}
24 +   register: result
25 +   retries: 5
26 +   delay: 60
27 +   until: result|success
28 + 
29 + - name: Check installation of openscap
30 +   when: "'Installation complete' not in result.stdout"
31 +   fail:
32 +     msg: "Atomic install was unsuccessful"
33 + 
34 +   # Use 'docker pull' for now; maybe switch to 'atomic pull' once all the
35 +   # streams have support for v1 schema manifests
36 + - name: Pull scanner target
37 +   command: docker pull {{ scanner_target }}
38 +   register: dps
39 +   retries: 5
40 +   delay: 60
41 +   until: dps|success
42 + 
43 + - name: Run atomic scan
44 +   command: atomic --debug scan --scanner {{ scanner_type }} {{ scanner_target }}
45 +   register: atomic_output
46 + 
47 + - name: Catch atomic scan failures
48 +   when: "'Files associated' not in atomic_output.stdout"
49 +   fail:
50 +     msg: "Atomic scan failed"
51 + 
52 + - name: Get scanner result directory
53 +   shell: echo {{ atomic_output.stdout | quote }} | awk '/^Files associated/{print $8}' | sed "s/\.[\']*//"
54 +   register: dir
55 + 
56 + - name: Verify scanner result directory exists
57 +   stat:
58 +     path={{ dir.stdout }}
59 +   register: scan_dir
60 + 
61 + - name: Fail if result directory does not exist
62 +   when: scan_dir.stat.exists == False
63 +   fail:
64 +     msg: "Scanner result directory does not exist."
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,12 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # stops running container with atomic cli
 6 + #
 7 + - name: Fail if as_container is undefined
 8 +   when: as_container is undefined
 9 +   fail:
10 +     msg: "as_container is not defined"
11 + 
12 + - name: Stop {{ as_container }}
13 +   command: atomic stop {{ as_container }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,29 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #   This role verifies the atomic stop command.  It takes one parameter which
 6 + #   is the container name and will check that the status is exited. This role
 7 + #   requires atomic_run_verify to be run before and that there are no other
 8 + #   containers running prior to that.
 9 + #
10 + #   Commands:
11 + #   - atomic stop
12 + #
13 + - name: Fail if container is undefined
14 +   when: container is undefined
15 +   fail:
16 +     msg: "No container specified"
17 + 
18 + - name: atomic stop {{ container }}
19 +   command: atomic stop {{ container }}
20 + 
21 + - name: Verify container is stopped
22 +   command: docker ps -a
23 +   register: dps
24 + 
25 + - name: Fail if {{ container }} status is not exited
26 +   when: dps.stdout.find("Exited") == -1
27 +   fail:
28 +     msg: |
29 +       Expected: Container has exited status
30 +       Actual: {{ dps.stdout }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,17 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #  This role installs a system container through the atomic install --system
 6 + #    command
 7 + #
 8 + - name: Fail if asi_image is undefined
 9 +   when: asi_image is undefined
10 +   fail:
11 +     msg: "asi_image is undefined"
12 + 
13 + - name: Install system container
14 +   command: "atomic install --system {{ asi_image }}"
15 +   register: ais
16 +   retries: 5
17 +   delay: 60
18 +   until: ais|success
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,21 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #  This role checks that the specified image is in the atomic containers
 6 + #   list output
 7 + #
 8 + - name: Fail if asiv_image is undefined
 9 +   when: asiv_image is undefined
10 +   fail:
11 +     msg: "asiv_image is undefined"
12 + 
13 + - name: Get atomic containers list output
14 +   command: atomic containers list --all --no-trunc
15 +   register: acl_output
16 + 
17 + - name: Fail if asiv_image is not in list output
18 +   when: asiv_image not in acl_output.stdout
19 +   fail:
20 +     msg: |
21 +       Expected: {{ asiv_image }} is in atomic containers list output
22 +       Actual: {{ acl_output.stdout }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,13 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #  This role uninstalls a system container (by name) through the atomic install
 6 + #    command
 7 + #
 8 + - name: Fail if asu_name is undefined
 9 +   when: asu_name is undefined
10 +   fail:
11 +     msg: "asu_name is undefined"
12 + 
13 + - name: Uninstall system container
14 +   command: atomic uninstall {{ asu_name }}
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,19 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #  This role verifies the specified container is not in the atomic containers
 6 + #   list output
 7 + #
 8 + - name: Fail if asuv_image is undefined
 9 +   when: asuv_image is undefined
10 +   fail:
11 +     msg: "asuv_image is undefined"
12 + 
13 + - name: Get atomic containers list output
14 +   command: atomic containers list --all --no-trunc
15 +   register: acl_output
16 + 
17 + - name: Fail if asuv_image is in list output
18 +   when: asuv_image in acl_output.stdout
19 +   fail:
20 +     msg: "{{ asuv_image }} is in list output"
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,16 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # uninstalls image with atomic cli
 6 + #
 7 + - name: Fail if au_image is undefined
 8 +   when: au_image is undefined
 9 +   fail:
10 +     msg: "au_image is not defined"
11 + 
12 + - name: Set options
13 +   set_fact:
14 +     au_options: "{{ au_options | default() }}"
15 + 
16 + - name: Uninstall image
17 +   command: atomic uninstall {{ au_image }} {{ au_options }}
1 @@ -0,0 +1,6 @@
2 + ---
3 + allow_duplicates: true
4 + 
5 + dependencies:
6 +   - role: docker_pull
7 +     dp_image: docker.io/miabbott/aht-tools:latest
 1 @@ -0,0 +1,47 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + #  This role sets facts for the current booted deployment
 6 + #
 7 + #  Optionally, you can archive the values to an YAML file that will drop into
 8 + #  the current playbook directory.
 9 + #
10 + - name: Set archive value
11 +   set_fact:
12 +     bdsf_archive: "{{ archive | default('false') }}"
13 +     bdsf_ansible_host: "{{ ansible_host }}"
14 + 
15 + # This role provides the following variables:
16 + #  - ros: result of 'rpm-ostree status --json'
17 + #  - ros_json: ros.stdout piped through the from_json filter
18 + #  - ros_num_deployments:  number of deployments on host
19 + #  - ros_booted: JSON object of the booted deployment
20 + #  - ros_not_booted: JSON object of the not booted deployment
21 + - name: Get rpm-ostree status output
22 +   import_role:
23 +     name: rpm_ostree_status
24 + 
25 + - name: Save refspec and checksum
26 +   set_fact:
27 +     bdsf_saved_checksum: "{{ ros_booted['base-checksum'] if 'base-checksum' in ros_booted else ros_booted['checksum'] }}"
28 +     # If the host is on a local branch, we have to skip splitting the 'origin'
29 +     # because there is no remote portion
30 +     bdsf_saved_refspec: "{{ ros_booted['origin'].split(':')[1] if ':' in ros_booted['origin'] else ros_booted['origin'] }}"
31 +     bdsf_saved_remote_name: "{{ ros_booted['origin'].split(':')[0] if ':' in ros_booted['origin'] else '' }}"
32 + 
33 + # If 'bdsf_archve' is true, we setup the following global variables in a YAML
34 + # file:
35 + #  - g_archive_checksum
36 + #  - g_archive_refspec
37 + #  - g_archive_remote_name
38 + - block:
39 +   - name: Remove existing archive file
40 +     local_action:
41 +       file path="{{ playbook_dir }}/{{ bdsf_ansible_host }}_bdsf_archive.yml" state=absent
42 +     become: false
43 + 
44 +   - name: Archive refspec and checksum
45 +     local_action:
46 +       template src=bdsf_archive.j2 dest="{{ playbook_dir }}/{{ bdsf_ansible_host }}_bdsf_archive.yml"
47 +     become: false
48 +   when: bdsf_archive
1 @@ -0,0 +1,4 @@
2 + ---
3 + g_archive_checksum: {{ bdsf_saved_checksum }}
4 + g_archive_refspec: {{ bdsf_saved_refspec }}
5 + g_archive_remote_name: {{ bdsf_saved_remote_name }}
1 @@ -0,0 +1,4 @@
2 + ---
3 + # vim: set ft=ansible:
4 + #
5 + allow_duplicates: true
 1 @@ -0,0 +1,30 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # Simple role to check if a port is open and optionally use
 6 + # 'curl' to retrieve a URL
 7 + #
 8 + # Required variables:
 9 + #  - cop_port: port number
10 + #
11 + # Optional variables:
12 + #  - cop_url:  URL to try to retrieve
13 + #  - cop_timeout: timeout to wait for open port (default 30)
14 + #
15 + - name: Fail if the cop_port is not defined
16 +   when: cop_port is not defined
17 +   fail:
18 +     msg: 'The cop_port variable must be defined'
19 + 
20 + - name: Wait for port to open
21 +   wait_for:
22 +     port: "{{ cop_port }}"
23 +     timeout: "{{ cop_timeout | default(30) }}"
24 + 
25 + - name: Retrieve URL
26 +   when: cop_url is defined
27 +   command: "curl {{ cop_url }}"
28 +   register: curl
29 +   until: curl|success
30 +   retries: 6
31 +   delay: 10
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,25 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # Runs a command and optionally checks stdout output
 6 + #
 7 + # Parameters:
 8 + #   cmd (string) - command to run
 9 + #   output (string) - optional substring to check for in stdout
10 + #                     use caution as it is a substring search
11 + #
12 + 
13 + - name: Fail if cmd is not defined
14 +   when: cmd is undefined
15 +   fail:
16 +     msg: "cmd is undefined"
17 + 
18 + - name: Run command
19 +   command: "{{ cmd }}"
20 +   register: cmd_output
21 + 
22 + - name: Verify output
23 +   when: output is defined and
24 +         output not in cmd_output.stdout
25 +   fail:
26 +     msg: "{{ output }} is not in command output"
1 @@ -0,0 +1,2 @@
2 + ---
3 + allow_duplicates: true
 1 @@ -0,0 +1,22 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + # role: command_privilege_verify
 5 + #
 6 + # This role verifies that a <cmd> is can/cannot executed
 7 + #   running as <usr> based on <expect_failure>
 8 + #
 9 + # Parameters:
10 + #  cmd (string) - simple shell command
11 + #  user (string) - user that runs the command
12 + #  expect_failure (boolean) - expect failure or not
13 + - name: Fail if cmd, user, or expect_failure is undefined
14 +   when: cmd is undefined or
15 +         user is undefined or
16 +         expect_failure is undefined
17 +   fail:
18 +     msg: "cmd, user, or expect_failure undefined"
19 + 
20 + - name: Run {{ cmd }} as {{ user }}
21 +   command: runuser -u {{ user }} {{ cmd }}
22 +   register: cmd_output
23 +   failed_when: (cmd_output.rc == 0 and expect_failure) or (cmd_output.rc != 0 and not expect_failure)
1 @@ -0,0 +1,5 @@
2 + ---
3 + dependencies:
4 +   - { role: atomic_pull, image: "{{ image }}" }
5 +   - { role: atomic_scan, image: "{{ image }}" }
6 +   - { role: atomic_images_delete, image: "{{ image }}" }
 1 @@ -0,0 +1,19 @@
 2 + FROM registry.centos.org/centos/centos:latest
 3 + MAINTAINER Micah Abbott <micah@redhat.com>
 4 + 
 5 + LABEL Version=1.2
 6 + LABEL RUN="docker run -d --name NAME -p 80:80 IMAGE"
 7 + 
 8 + ENV container docker
 9 + 
10 + ADD makecache.sh /
11 + 
12 + RUN /makecache.sh && \
13 +     yum -y install httpd && \
14 +     yum clean all
15 + 
16 + RUN echo "SUCCESS centos_httpd" > /var/www/html/index.html
17 + EXPOSE 80
18 + 
19 + ENTRYPOINT [ "/usr/sbin/httpd" ]
20 + CMD [ "-D", "FOREGROUND" ]
 1 @@ -0,0 +1,10 @@
 2 + #!/bin/bash
 3 + set -xeou pipefail
 4 + retries=5
 5 + while [ $retries -gt 0 ]; do
 6 + »       if yum makecache; then
 7 + »       »       break
 8 + »       fi
 9 + »       retries=$((retries - 1))
10 + done
11 + 
 1 @@ -0,0 +1,17 @@
 2 + FROM registry.centos.org/centos/centos:latest
 3 + LABEL maintainer="Micah Abbott <miabbott@redhat.com>" \
 4 +       version=1.0
 5 + 
 6 + ENV container docker
 7 + 
 8 + ADD makecache.sh /
 9 + 
10 + RUN /makecache.sh && \
11 +     yum -y install httpd && \
12 +     yum clean all && \
13 +     systemctl enable httpd
14 + 
15 + STOPSIGNAL SIGRTMIN+3
16 + EXPOSE 80
17 + 
18 + ENTRYPOINT [ "/sbin/init" ]
 1 @@ -0,0 +1,10 @@
 2 + #!/bin/bash
 3 + set -xeou pipefail
 4 + retries=5
 5 + while [ $retries -gt 0 ]; do
 6 + »       if yum makecache; then
 7 + »       »       break
 8 + »       fi
 9 + »       retries=$((retries - 1))
10 + done
11 + 
 1 @@ -0,0 +1,19 @@
 2 + FROM registry.fedoraproject.org/fedora:latest
 3 + MAINTAINER Micah Abbott <micah@redhat.com>
 4 + 
 5 + LABEL Version=1.2
 6 + LABEL RUN="docker run -d --name NAME -p 80:80 IMAGE"
 7 + 
 8 + ENV container docker
 9 + 
10 + ADD makecache.sh /
11 + 
12 + RUN /makecache.sh && \
13 +     dnf -y install httpd && \
14 +     dnf clean all
15 + 
16 + RUN echo "SUCCESS fedora_httpd" > /var/www/html/index.html
17 + EXPOSE 80
18 + 
19 + ENTRYPOINT [ "/usr/sbin/httpd" ]
20 + CMD [ "-D", "FOREGROUND" ]
 1 @@ -0,0 +1,10 @@
 2 + #!/bin/bash
 3 + set -xeou pipefail
 4 + retries=5
 5 + while [ $retries -gt 0 ]; do
 6 + »       if yum makecache; then
 7 + »       »       break
 8 + »       fi
 9 + »       retries=$((retries - 1))
10 + done
11 + 
 1 @@ -0,0 +1,17 @@
 2 + FROM registry.fedoraproject.org/fedora:latest
 3 + LABEL maintainer="Micah Abbott <miabbott@redhat.com>" \
 4 +       version=1.0
 5 + 
 6 + ENV container docker
 7 + 
 8 + ADD makecache.sh /
 9 + 
10 + RUN /makecache.sh && \
11 +     dnf -y install httpd && \
12 +     dnf clean all && \
13 +     systemctl enable httpd
14 + 
15 + STOPSIGNAL SIGRTMIN+3
16 + EXPOSE 80
17 + 
18 + ENTRYPOINT [ "/sbin/init" ]
 1 @@ -0,0 +1,10 @@
 2 + #!/bin/bash
 3 + set -xeou pipefail
 4 + retries=5
 5 + while [ $retries -gt 0 ]; do
 6 + »       if yum makecache; then
 7 + »       »       break
 8 + »       fi
 9 + »       retries=$((retries - 1))
10 + done
11 + 
 1 @@ -0,0 +1,22 @@
 2 + FROM registry.access.redhat.com/rhel7:latest
 3 + MAINTAINER Micah Abbott <micah@redhat.com>
 4 + 
 5 + LABEL Version=1.3
 6 + LABEL RUN="docker run -d --name NAME -p 80:80 IMAGE"
 7 + 
 8 + ENV container docker
 9 + 
10 + ADD makecache.sh /
11 + 
12 + RUN /makecache.sh && \
13 +     yum install --disablerepo=\* \
14 +                 --enablerepo=rhel-7-server-rpms \
15 +                 -y httpd && \
16 +     yum clean all
17 + 
18 + RUN echo "SUCCESS rhel7_httpd" > /var/www/html/index.html
19 + 
20 + EXPOSE 80
21 + 
22 + ENTRYPOINT [ "/usr/sbin/httpd" ]
23 + CMD [ "-D", "FOREGROUND" ]
 1 @@ -0,0 +1,10 @@
 2 + #!/bin/bash
 3 + set -xeou pipefail
 4 + retries=5
 5 + while [ $retries -gt 0 ]; do
 6 + »       if yum --disablerepo=\* --enablerepo=rhel-7-server-rpms makecache; then
 7 + »       »       break
 8 + »       fi
 9 + »       retries=$((retries - 1))
10 + done
11 + 
 1 @@ -0,0 +1,19 @@
 2 + FROM registry.access.redhat.com/rhel7:latest
 3 + LABEL maintainer="Micah Abbott <miabbott@redhat.com>" \
 4 +       version=1.0
 5 + 
 6 + ENV container docker
 7 + 
 8 + ADD makecache.sh /
 9 + 
10 + RUN /makecache.sh && \
11 +     yum install --disablerepo=\* \
12 +                 --enablerepo=rhel-7-server-rpms \
13 +                 -y httpd && \
14 +     yum clean all && \
15 +     systemctl enable httpd
16 + 
17 + STOPSIGNAL SIGRTMIN+3
18 + EXPOSE 80
19 + 
20 + ENTRYPOINT [ "/sbin/init" ]
 1 @@ -0,0 +1,10 @@
 2 + #!/bin/bash
 3 + set -xeou pipefail
 4 + retries=5
 5 + while [ $retries -gt 0 ]; do
 6 + »       if yum --disablerepo=\* --enablerepo=rhel-7-server-rpms makecache; then
 7 + »       »       break
 8 + »       fi
 9 + »       retries=$((retries - 1))
10 + done
11 + 
1 @@ -0,0 +1,5 @@
2 + ---
3 + allow_duplicates: true
4 + 
5 + dependencies:
6 +   - role: osname_set_fact
 1 @@ -0,0 +1,52 @@
 2 + ---
 3 + # vim: set ft=ansible:
 4 + #
 5 + # This is a generic role to handle the building of docker images when a
 6 + # Dockerfile is provided.  You need to provide the location of the
 7 + # Dockerfile (presumably in the repo) and the name you wish to call your
 8 + # newly built image.
 9 + #
10 + # NOTE:  the role uses the `synchronize` module to copy files to the host
11 + #        under test, so special attention is needed when providing the
12 + #        location of the Dockerfile
13 + #
14 + # Required variables:
15 + #   db_src:  path to the Dockerfile
16 + #   db_image_name:  name of the newly built docker image
17 + #
18 + - name: Fail if variables are not defined
19 +   when:
20 +     - db_src is not defined
21 +     - db_image_name is not defined
22 +   fail:
23 +     msg: |
24 +       The variables 'db_src' and 'db_image_name' must be defined.
25 + 
26 + - name: Create temp directory for building
27 +   command: mktemp -d
28 +   register: m
29 + 
30 + - name: Set build_dir fact
31 +   set_fact:
32 +     build_dir: "{{ m.stdout }}"
33 + 
34 + - name: Copy files to host
35 +   synchronize:
36 +     src: "{{ db_src }}"
37 +     dest: "{{ build_dir }}"
38 + 
39 + - name: "Build {{ db_image_name }} image"
40 +   command: "docker build -t {{ db_image_name }} -f {{ build_dir }}/Dockerfile {{ build_dir }}"
41 +   register: db
42 +   retries: 5
43 +   delay: 60
44 +   until: db|success
45 + 
46 + - name: Get docker images after build
47 +   command: docker images
48 +   register: build_images
49 + 
50 + - name: "Fail if {{ db_image_name }} image not present"
51 +   when: db_image_name not in build_images.stdout
52 +   fail:
53 +     msg: "The {{ db_image_name }} image is not present"
 1 @@ -0,0 +1,29 @@
 2 + # Pull the rhel image from the local repository
 3 + FROM registry.centos.org/centos/centos:latest
 4 + USER root
 5 + 
 6 + MAINTAINER Maintainer_Name
 7 + 
 8 + # Update image
 9 + RUN yum update -y
10 + 
11 + # Add Mariahdb software
12 + RUN yum -y install mariadb-server
13 + 
14 + # Set up Mariahdb database
15 + ADD gss_db.sql /tmp/gss_db.sql
16 + ADD mariadb-prepare-db-dir /usr/libexec/mariadb-prepare-db-dir
17 + RUN /usr/libexec/mariadb-prepare-db-dir
18 + RUN /usr/bin/mysqld_safe --basedir=/usr & \
19 +     sleep 10s && \
20 +     /usr/bin/mysqladmin -u root password 'redhat' && \
21 +     mysql --user=root --password=redhat < /tmp/gss_db.sql && \
22 +     mysqladmin shutdown --password=redhat
23 + 
24 + # Expose Mysql port 3306
25 + EXPOSE 3306
26 + 
27 + # Start the service
28 + CMD ["--basedir=/usr"]
29 + ENTRYPOINT ["/usr/bin/mysqld_safe"]
30 + 
  1 @@ -0,0 +1,785 @@
  2 + -- MySQL dump 10.14  Distrib 5.5.40-MariaDB, for Linux (x86_64)
  3 + --
  4 + -- Host: localhost    Database: 
  5 + -- ------------------------------------------------------
  6 + -- Server version»       5.5.40-MariaDB
  7 + 
  8 + /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  9 + /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
 10 + /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
 11 + /*!40101 SET NAMES utf8 */;
 12 + /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
 13 + /*!40103 SET TIME_ZONE='+00:00' */;
 14 + /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
 15 + /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
 16 + /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
 17 + /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 18 + 
 19 + --
 20 + -- Current Database: `gss`
 21 + --
 22 + 
 23 + CREATE DATABASE /*!32312 IF NOT EXISTS*/ `gss` /*!40100 DEFAULT CHARACTER SET latin1 */;
 24 + 
 25 + USE `gss`;
 26 + 
 27 + --
 28 + -- Table structure for table `atomic_training`
 29 + --
 30 + 
 31 + DROP TABLE IF EXISTS `atomic_training`;
 32 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
 33 + /*!40101 SET character_set_client = utf8 */;
 34 + CREATE TABLE `atomic_training` (
 35 +   `LINE_NUM` int(11) NOT NULL DEFAULT '0',
 36 +   `MESSAGE` varchar(1000) DEFAULT NULL,
 37 +   PRIMARY KEY (`LINE_NUM`)
 38 + ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 39 + /*!40101 SET character_set_client = @saved_cs_client */;
 40 + 
 41 + --
 42 + -- Dumping data for table `atomic_training`
 43 + --
 44 + 
 45 + LOCK TABLES `atomic_training` WRITE;
 46 + /*!40000 ALTER TABLE `atomic_training` DISABLE KEYS */;
 47 + INSERT INTO `atomic_training` VALUES (1,'RedHat rocks'),(2,'Success');
 48 + /*!40000 ALTER TABLE `atomic_training` ENABLE KEYS */;
 49 + UNLOCK TABLES;
 50 + 
 51 + --
 52 + -- Current Database: `mysql`
 53 + --
 54 + 
 55 + CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */;
 56 + 
 57 + USE `mysql`;
 58 + 
 59 + --
 60 + -- Table structure for table `columns_priv`
 61 + --
 62 + 
 63 + DROP TABLE IF EXISTS `columns_priv`;
 64 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
 65 + /*!40101 SET character_set_client = utf8 */;
 66 + CREATE TABLE `columns_priv` (
 67 +   `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
 68 +   `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
 69 +   `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
 70 +   `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
 71 +   `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
 72 +   `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 73 +   `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
 74 +   PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
 75 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
 76 + /*!40101 SET character_set_client = @saved_cs_client */;
 77 + 
 78 + --
 79 + -- Dumping data for table `columns_priv`
 80 + --
 81 + 
 82 + LOCK TABLES `columns_priv` WRITE;
 83 + /*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
 84 + /*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
 85 + UNLOCK TABLES;
 86 + 
 87 + --
 88 + -- Table structure for table `db`
 89 + --
 90 + 
 91 + DROP TABLE IF EXISTS `db`;
 92 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
 93 + /*!40101 SET character_set_client = utf8 */;
 94 + CREATE TABLE `db` (
 95 +   `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
 96 +   `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
 97 +   `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
 98 +   `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
 99 +   `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
100 +   `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
101 +   `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
102 +   `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
103 +   `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
104 +   `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
105 +   `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
106 +   `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
107 +   `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
108 +   `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
109 +   `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
110 +   `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
111 +   `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
112 +   `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
113 +   `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
114 +   `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
115 +   `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
116 +   `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
117 +   PRIMARY KEY (`Host`,`Db`,`User`),
118 +   KEY `User` (`User`)
119 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
120 + /*!40101 SET character_set_client = @saved_cs_client */;
121 + 
122 + --
123 + -- Dumping data for table `db`
124 + --
125 + 
126 + LOCK TABLES `db` WRITE;
127 + /*!40000 ALTER TABLE `db` DISABLE KEYS */;
128 + INSERT INTO `db` VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'),('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
129 + /*!40000 ALTER TABLE `db` ENABLE KEYS */;
130 + UNLOCK TABLES;
131 + 
132 + --
133 + -- Table structure for table `event`
134 + --
135 + 
136 + DROP TABLE IF EXISTS `event`;
137 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
138 + /*!40101 SET character_set_client = utf8 */;
139 + CREATE TABLE `event` (
140 +   `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
141 +   `name` char(64) NOT NULL DEFAULT '',
142 +   `body` longblob NOT NULL,
143 +   `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
144 +   `execute_at` datetime DEFAULT NULL,
145 +   `interval_value` int(11) DEFAULT NULL,
146 +   `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
147 +   `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
148 +   `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
149 +   `last_executed` datetime DEFAULT NULL,
150 +   `starts` datetime DEFAULT NULL,
151 +   `ends` datetime DEFAULT NULL,
152 +   `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
153 +   `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
154 +   `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
155 +   `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
156 +   `originator` int(10) unsigned NOT NULL,
157 +   `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
158 +   `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
159 +   `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
160 +   `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
161 +   `body_utf8` longblob,
162 +   PRIMARY KEY (`db`,`name`)
163 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
164 + /*!40101 SET character_set_client = @saved_cs_client */;
165 + 
166 + --
167 + -- Table structure for table `func`
168 + --
169 + 
170 + DROP TABLE IF EXISTS `func`;
171 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
172 + /*!40101 SET character_set_client = utf8 */;
173 + CREATE TABLE `func` (
174 +   `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
175 +   `ret` tinyint(1) NOT NULL DEFAULT '0',
176 +   `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
177 +   `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
178 +   PRIMARY KEY (`name`)
179 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
180 + /*!40101 SET character_set_client = @saved_cs_client */;
181 + 
182 + --
183 + -- Dumping data for table `func`
184 + --
185 + 
186 + LOCK TABLES `func` WRITE;
187 + /*!40000 ALTER TABLE `func` DISABLE KEYS */;
188 + /*!40000 ALTER TABLE `func` ENABLE KEYS */;
189 + UNLOCK TABLES;
190 + 
191 + --
192 + -- Table structure for table `help_category`
193 + --
194 + 
195 + DROP TABLE IF EXISTS `help_category`;
196 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
197 + /*!40101 SET character_set_client = utf8 */;
198 + CREATE TABLE `help_category` (
199 +   `help_category_id` smallint(5) unsigned NOT NULL,
200 +   `name` char(64) NOT NULL,
201 +   `parent_category_id` smallint(5) unsigned DEFAULT NULL,
202 +   `url` text NOT NULL,
203 +   PRIMARY KEY (`help_category_id`),
204 +   UNIQUE KEY `name` (`name`)
205 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
206 + /*!40101 SET character_set_client = @saved_cs_client */;
207 + 
208 + --
209 + -- Dumping data for table `help_category`
210 + --
211 + 
212 + LOCK TABLES `help_category` WRITE;
213 + /*!40000 ALTER TABLE `help_category` DISABLE KEYS */;
214 + INSERT INTO `help_category` VALUES (1,'Geographic',0,''),(2,'Polygon properties',34,''),(3,'WKT',34,''),(4,'Numeric Functions',38,''),(5,'Plugins',35,''),(6,'MBR',34,''),(7,'Control flow functions',38,''),(8,'Transactions',35,''),(9,'Help Metadata',35,''),(10,'Account Management',35,''),(11,'Point properties',34,''),(12,'Encryption Functions',38,''),(13,'LineString properties',34,''),(14,'Miscellaneous Functions',38,''),(15,'Logical operators',38,''),(16,'Functions and Modifiers for Use with GROUP BY',35,''),(17,'Information Functions',38,''),(18,'Comparison operators',38,''),(19,'Bit Functions',38,''),(20,'Table Maintenance',35,''),(21,'User-Defined Functions',35,''),(22,'Data Types',35,''),(23,'Compound Statements',35,''),(24,'Geometry constructors',34,''),(25,'GeometryCollection properties',1,''),(26,'Administration',35,''),(27,'Data Manipulation',35,''),(28,'Utility',35,''),(29,'Language Structure',35,''),(30,'Geometry relations',34,''),(31,'Date and Time Functions',38,''),(32,'WKB',34,''),(33,'Procedures',35,''),(34,'Geographic Features',35,''),(35,'Contents',0,''),(36,'Geometry properties',34,''),(37,'String Functions',38,''),(38,'Functions',35,''),(39,'Data Definition',35,'');
215 + /*!40000 ALTER TABLE `help_category` ENABLE KEYS */;
216 + UNLOCK TABLES;
217 + 
218 + --
219 + -- Table structure for table `help_keyword`
220 + --
221 + 
222 + DROP TABLE IF EXISTS `help_keyword`;
223 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
224 + /*!40101 SET character_set_client = utf8 */;
225 + CREATE TABLE `help_keyword` (
226 +   `help_keyword_id` int(10) unsigned NOT NULL,
227 +   `name` char(64) NOT NULL,
228 +   PRIMARY KEY (`help_keyword_id`),
229 +   UNIQUE KEY `name` (`name`)
230 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
231 + /*!40101 SET character_set_client = @saved_cs_client */;
232 + 
233 + --
234 + -- Dumping data for table `help_keyword`
235 + --
236 + 
237 + LOCK TABLES `help_keyword` WRITE;
238 + /*!40000 ALTER TABLE `help_keyword` DISABLE KEYS */;
239 + INSERT INTO `help_keyword` VALUES (0,'JOIN'),(1,'HOST'),(2,'REPEAT'),(3,'SERIALIZABLE'),(4,'REPLACE'),(5,'AT'),(6,'SCHEDULE'),(7,'RETURNS'),(8,'STARTS'),(9,'MASTER_SSL_CA'),(10,'NCHAR'),(11,'COLUMNS'),(12,'COMPLETION'),(13,'WORK'),(14,'DATETIME'),(15,'MODE'),(16,'OPEN'),(17,'INTEGER'),(18,'ESCAPE'),(19,'VALUE'),(20,'MASTER_SSL_VERIFY_SERVER_CERT'),(21,'SQL_BIG_RESULT'),(22,'DROP'),(23,'GEOMETRYCOLLECTIONFROMWKB'),(24,'EVENTS'),(25,'MONTH'),(26,'PROFILES'),(27,'DUPLICATE'),(28,'REPLICATION'),(29,'UNLOCK'),(30,'INNODB'),(31,'YEAR_MONTH'),(32,'SUBJECT'),(33,'PREPARE'),(34,'LOCK'),(35,'NDB'),(36,'CHECK'),(37,'FULL'),(38,'INT4'),(39,'BY'),(40,'NO'),(41,'MINUTE'),(42,'PARTITION'),(43,'DATA'),(44,'DAY'),(45,'SHARE'),(46,'REAL'),(47,'SEPARATOR'),(48,'MESSAGE_TEXT'),(49,'MASTER_HEARTBEAT_PERIOD'),(50,'DELETE'),(51,'ON'),(52,'COLUMN_NAME'),(53,'CONNECTION'),(54,'CLOSE'),(55,'X509'),(56,'USE'),(57,'SUBCLASS_ORIGIN'),(58,'WHERE'),(59,'PRIVILEGES'),(60,'SPATIAL'),(61,'EVENT'),(62,'SUPER'),(63,'SQL_BUFFER_RESULT'),(64,'IGNORE'),(65,'SHA2'),(66,'QUICK'),(67,'SIGNED'),(68,'OFFLINE'),(69,'SECURITY'),(70,'AUTOEXTEND_SIZE'),(71,'NDBCLUSTER'),(72,'POLYGONFROMWKB'),(73,'FALSE'),(74,'LEVEL'),(75,'FORCE'),(76,'BINARY'),(77,'TO'),(78,'CHANGE'),(79,'CURRENT_USER'),(80,'HOUR_MINUTE'),(81,'UPDATE'),(82,'PRESERVE'),(83,'TABLE_NAME'),(84,'INTO'),(85,'FEDERATED'),(86,'VARYING'),(87,'MAX_SIZE'),(88,'HOUR_SECOND'),(89,'VARIABLE'),(90,'ROLLBACK'),(91,'PROCEDURE'),(92,'TIMESTAMP'),(93,'IMPORT'),(94,'AGAINST'),(95,'CHECKSUM'),(96,'COUNT'),(97,'LONGBINARY'),(98,'THEN'),(99,'INSERT'),(100,'ENGINES'),(101,'HANDLER'),(102,'PORT'),(103,'DAY_SECOND'),(104,'EXISTS'),(105,'MUTEX'),(106,'HELP_DATE'),(107,'RELEASE'),(108,'BOOLEAN'),(109,'MOD'),(110,'DEFAULT'),(111,'TYPE'),(112,'NO_WRITE_TO_BINLOG'),(113,'OPTIMIZE'),(114,'SQLSTATE'),(115,'RESET'),(116,'CLASS_ORIGIN'),(117,'INSTALL'),(118,'ITERATE'),(119,'DO'),(120,'BIGINT'),(121,'SET'),(122,'ISSUER'),(123,'DATE'),(124,'STATUS'),(125,'FULLTEXT'),(126,'COMMENT'),(127,'MASTER_CONNECT_RETRY'),(128,'INNER'),(129,'RELAYLOG'),(130,'STOP'),(131,'MASTER_LOG_FILE'),(132,'MRG_MYISAM'),(133,'PRECISION'),(134,'REQUIRE'),(135,'TRAILING'),(136,'PARTITIONS'),(137,'LONG'),(138,'OPTION'),(139,'REORGANIZE'),(140,'ELSE'),(141,'DEALLOCATE'),(142,'IO_THREAD'),(143,'CASE'),(144,'CIPHER'),(145,'CONTINUE'),(146,'FROM'),(147,'READ'),(148,'LEFT'),(149,'ELSEIF'),(150,'MINUTE_SECOND'),(151,'COMPACT'),(152,'DEC'),(153,'FOR'),(154,'WARNINGS'),(155,'MIN_ROWS'),(156,'STRING'),(157,'CONDITION'),(158,'ENCLOSED'),(159,'FUNCTION'),(160,'AGGREGATE'),(161,'FIELDS'),(162,'INT3'),(163,'ARCHIVE'),(164,'AVG_ROW_LENGTH'),(165,'ADD'),(166,'KILL'),(167,'FLOAT4'),(168,'TABLESPACE'),(169,'VIEW'),(170,'REPEATABLE'),(171,'INFILE'),(172,'HELP_VERSION'),(173,'ORDER'),(174,'USING'),(175,'CONSTRAINT_CATALOG'),(176,'MIDDLEINT'),(177,'GRANT'),(178,'UNSIGNED'),(179,'DECIMAL'),(180,'GEOMETRYFROMTEXT'),(181,'INDEXES'),(182,'FOREIGN'),(183,'CACHE'),(184,'HOSTS'),(185,'MYSQL_ERRNO'),(186,'COMMIT'),(187,'SCHEMAS'),(188,'LEADING'),(189,'SNAPSHOT'),(190,'CONSTRAINT_NAME'),(191,'DECLARE'),(192,'LOAD'),(193,'SQL_CACHE'),(194,'CONVERT'),(195,'DYNAMIC'),(196,'COLLATE'),(197,'POLYGONFROMTEXT'),(198,'BYTE'),(199,'GLOBAL'),(200,'LINESTRINGFROMWKB'),(201,'WHEN'),(202,'HAVING'),(203,'AS'),(204,'STARTING'),(205,'RELOAD'),(206,'AUTOCOMMIT'),(207,'REVOKE'),(208,'GRANTS'),(209,'OUTER'),(210,'CURSOR_NAME'),(211,'FLOOR'),(212,'EXPLAIN'),(213,'WITH'),(214,'AFTER'),(215,'STD'),(216,'CSV'),(217,'DISABLE'),(218,'UNINSTALL'),(219,'OUTFILE'),(220,'LOW_PRIORITY'),(221,'FILE'),(222,'NODEGROUP'),(223,'SCHEMA'),(224,'SONAME'),(225,'POW'),(226,'DUAL'),(227,'MULTIPOINTFROMWKB'),(228,'INDEX'),(229,'MULTIPOINTFROMTEXT'),(230,'DEFINER'),(231,'MASTER_BIND'),(232,'REMOVE'),(233,'EXTENDED'),(234,'MULTILINESTRINGFROMWKB'),(235,'CROSS'),(236,'CONTRIBUTORS'),(237,'NATIONAL'),(238,'GROUP'),(239,'SHA'),(240,'ONLINE'),(241,'UNDO'),(242,'IGNORE_SERVER_IDS'),(243,'ZEROFILL'),(244,'CLIENT'),(245,'MASTER_PASSWORD'),(246,'OWNER'),(247,'RELAY_LOG_FILE'),(248,'TRUE'),(249,'CHARACTER'),(250,'MASTER_USER'),(251,'SCHEMA_NAME'),(252,'TABLE'),(253,'ENGINE'),(254,'INSERT_METHOD'),(255,'CASCADE'),(256,'RELAY_LOG_POS'),(257,'SQL_CALC_FOUND_ROWS'),(258,'UNION'),(259,'MYISAM'),(260,'LEAVE'),(261,'MODIFY'),(262,'MATCH'),(263,'MASTER_LOG_POS'),(264,'DISTINCTROW'),(265,'DESC'),(266,'TIME'),(267,'NUMERIC'),(268,'EXPANSION'),(269,'CODE'),(270,'CURSOR'),(271,'GEOMETRYCOLLECTIONFROMTEXT'),(272,'CHAIN'),(273,'LOGFILE'),(274,'FLUSH'),(275,'CREATE'),(276,'DESCRIBE'),(277,'EXTENT_SIZE'),(278,'MAX_UPDATES_PER_HOUR'),(279,'INT2'),(280,'PROCESSLIST'),(281,'ENDS'),(282,'LOGS'),(283,'DISCARD'),(284,'HEAP'),(285,'SOUNDS'),(286,'BETWEEN'),(287,'MULTILINESTRINGFROMTEXT'),(288,'REPAIR'),(289,'PACK_KEYS'),(290,'FAST'),(291,'VALUES'),(292,'CALL'),(293,'LOOP'),(294,'VARCHARACTER'),(295,'BEFORE'),(296,'TRUNCATE'),(297,'SHOW'),(298,'ALL'),(299,'REDUNDANT'),(300,'USER_RESOURCES'),(301,'PARTIAL'),(302,'BINLOG'),(303,'END'),(304,'SECOND'),(305,'AND'),(306,'FLOAT8'),(307,'PREV'),(308,'HOUR'),(309,'SELECT'),(310,'DATABASES'),(311,'OR'),(312,'IDENTIFIED'),(313,'WRAPPER'),(314,'MASTER_SSL_CIPHER'),(315,'SQL_SLAVE_SKIP_COUNTER'),(316,'BOTH'),(317,'BOOL'),(318,'YEAR'),(319,'MASTER_PORT'),(320,'CONCURRENT'),(321,'HELP'),(322,'UNIQUE'),(323,'TRIGGERS'),(324,'PROCESS'),(325,'OPTIONS'),(326,'RESIGNAL'),(327,'CONSISTENT'),(328,'MASTER_SSL'),(329,'DATE_ADD'),(330,'MAX_CONNECTIONS_PER_HOUR'),(331,'LIKE'),(332,'PLUGIN'),(333,'FETCH'),(334,'IN'),(335,'COLUMN'),(336,'DUMPFILE'),(337,'USAGE'),(338,'EXECUTE'),(339,'MEMORY'),(340,'CEIL'),(341,'QUERY'),(342,'MASTER_HOST'),(343,'LINES'),(344,'SQL_THREAD'),(345,'SERVER'),(346,'MAX_QUERIES_PER_HOUR'),(347,'MASTER_SSL_CERT'),(348,'MULTIPOLYGONFROMWKB'),(349,'TRANSACTION'),(350,'DAY_MINUTE'),(351,'STDDEV'),(352,'DATE_SUB'),(353,'REBUILD'),(354,'GEOMETRYFROMWKB'),(355,'INT1'),(356,'RENAME'),(357,'PARSER'),(358,'RIGHT'),(359,'ALTER'),(360,'MAX_ROWS'),(361,'SOCKET'),(362,'STRAIGHT_JOIN'),(363,'NATURAL'),(364,'VARIABLES'),(365,'ESCAPED'),(366,'SHA1'),(367,'KEY_BLOCK_SIZE'),(368,'PASSWORD'),(369,'OFFSET'),(370,'CHAR'),(371,'NEXT'),(372,'ERRORS'),(373,'SQL_LOG_BIN'),(374,'TEMPORARY'),(375,'COMMITTED'),(376,'SQL_SMALL_RESULT'),(377,'UPGRADE'),(378,'BEGIN'),(379,'DELAY_KEY_WRITE'),(380,'PROFILE'),(381,'MEDIUM'),(382,'INTERVAL'),(383,'SSL'),(384,'DAY_HOUR'),(385,'NAME'),(386,'REFERENCES'),(387,'AES_ENCRYPT'),(388,'STORAGE'),(389,'ISOLATION'),(390,'CEILING'),(391,'EVERY'),(392,'INT8'),(393,'AUTHORS'),(394,'RESTRICT'),(395,'UNCOMMITTED'),(396,'LINESTRINGFROMTEXT'),(397,'IS'),(398,'NOT'),(399,'ANALYSE'),(400,'DATAFILE'),(401,'DES_KEY_FILE'),(402,'SIGNAL'),(403,'COMPRESSED'),(404,'START'),(405,'PLUGINS'),(406,'SAVEPOINT'),(407,'IF'),(408,'ROWS'),(409,'PRIMARY'),(410,'PURGE'),(411,'LAST'),(412,'USER'),(413,'EXIT'),(414,'KEYS'),(415,'LIMIT'),(416,'KEY'),(417,'MERGE'),(418,'UNTIL'),(419,'SQL_NO_CACHE'),(420,'DELAYED'),(421,'CONSTRAINT_SCHEMA'),(422,'ANALYZE'),(423,'CONSTRAINT'),(424,'SERIAL'),(425,'ACTION'),(426,'WRITE'),(427,'INITIAL_SIZE'),(428,'SESSION'),(429,'DATABASE'),(430,'NULL'),(431,'POWER'),(432,'USE_FRM'),(433,'TERMINATED'),(434,'SLAVE'),(435,'NVARCHAR'),(436,'ASC'),(437,'RETURN'),(438,'OPTIONALLY'),(439,'ENABLE'),(440,'DIRECTORY'),(441,'MAX_USER_CONNECTIONS'),(442,'WHILE'),(443,'LOCAL'),(444,'DISTINCT'),(445,'AES_DECRYPT'),(446,'MASTER_SSL_KEY'),(447,'NONE'),(448,'TABLES'),(449,'<>'),(450,'RLIKE'),(451,'TRIGGER'),(452,'COLLATION'),(453,'SHUTDOWN'),(454,'HIGH_PRIORITY'),(455,'BTREE'),(456,'FIRST'),(457,'COALESCE'),(458,'WAIT'),(459,'CATALOG_NAME'),(460,'MASTER'),(461,'FIXED'),(462,'MULTIPOLYGONFROMTEXT'),(463,'ROW_FORMAT');
240 + /*!40000 ALTER TABLE `help_keyword` ENABLE KEYS */;
241 + UNLOCK TABLES;
242 + 
243 + --
244 + -- Table structure for table `help_relation`
245 + --
246 + 
247 + DROP TABLE IF EXISTS `help_relation`;
248 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
249 + /*!40101 SET character_set_client = utf8 */;
250 + CREATE TABLE `help_relation` (
251 +   `help_topic_id` int(10) unsigned NOT NULL,
252 +   `help_keyword_id` int(10) unsigned NOT NULL,
253 +   PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
254 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
255 + /*!40101 SET character_set_client = @saved_cs_client */;
256 + 
257 + --
258 + -- Dumping data for table `help_relation`
259 + --
260 + 
261 + LOCK TABLES `help_relation` WRITE;
262 + /*!40000 ALTER TABLE `help_relation` DISABLE KEYS */;
263 + INSERT INTO `help_relation` VALUES (1,0),(356,0),(473,1),(232,2),(447,3),(3,4),(130,4),(421,4),(89,5),(89,6),(406,6),(97,7),(89,8),(185,9),(430,10),(21,11),(347,11),(421,11),(463,11),(468,11),(89,12),(406,12),(146,13),(230,14),(88,15),(356,15),(18,16),(106,16),(134,16),(347,16),(97,17),(500,17),(380,18),(3,19),(104,19),(243,19),(374,19),(459,19),(185,20),(356,21),(9,22),(30,22),(34,22),(87,22),(186,22),(237,22),(263,22),(276,22),(300,22),(331,22),(405,22),(415,22),(416,22),(463,22),(478,22),(108,23),(122,24),(170,24),(424,24),(376,25),(82,26),(104,27),(199,28),(36,29),(347,30),(468,30),(376,31),(199,32),(35,33),(237,33),(36,34),(356,34),(468,35),(417,36),(463,36),(468,36),(21,37),(294,37),(347,37),(451,37),(468,37),(500,38),(48,39),(77,39),(83,39),(130,39),(199,39),(356,39),(361,39),(421,39),(463,39),(468,39),(468,40),(472,40),(376,41),(463,42),(468,42),(212,43),(421,43),(468,43),(473,43),(376,44),(356,45),(97,46),(314,46),(361,47),(374,48),(459,48),(185,49),(48,50),(468,50),(472,50),(1,51),(89,51),(406,51),(472,51),(374,52),(459,52),(176,53),(468,53),(51,54),(106,54),(199,55),(1,56),(55,56),(194,56),(374,57),(459,57),(48,58),(83,58),(106,58),(193,59),(199,59),(249,59),(210,60),(463,60),(89,61),(300,61),(358,61),(406,61),(199,62),(356,63),(1,64),(83,64),(104,64),(130,64),(356,64),(421,64),(463,64),(66,65),(48,66),(417,66),(466,66),(230,67),(87,68),(210,68),(463,68),(199,69),(194,70),(468,71),(91,72),(482,72),(385,73),(447,74),(1,75),(39,76),(230,76),(269,76),(185,77),(269,77),(460,77),(185,78),(463,78),(89,79),(406,79),(376,80),(83,81),(104,81),(356,81),(472,81),(89,82),(406,82),(374,83),(459,83),(3,84),(104,84),(304,84),(356,84),(468,85),(257,86),(194,87),(376,88),(129,89),(146,90),(460,90),(17,91),(189,91),(302,91),(328,91),(347,91),(356,91),(416,91),(439,91),(488,91),(99,92),(188,92),(421,93),(463,93),(88,94),(401,95),(468,95),(69,96),(330,96),(433,96),(285,97),(28,98),(57,98),(85,98),(104,99),(195,99),(301,99),(486,99),(282,100),(347,100),(106,101),(313,101),(473,102),(376,103),(9,104),(30,104),(89,104),(155,104),(186,104),(276,104),(300,104),(347,105),(365,105),(109,106),(146,107),(460,107),(24,108),(88,108),(113,109),(174,109),(3,110),(104,110),(155,110),(200,110),(212,110),(243,110),(463,110),(468,110),(463,111),(115,112),(326,112),(466,112),(470,112),(115,113),(463,113),(374,114),(459,114),(38,115),(119,115),(151,115),(264,115),(374,116),(459,116),(419,117),(124,118),(89,119),(125,119),(406,119),(496,119),(221,120),(3,121),(83,121),(104,121),(129,121),(130,121),(146,121),(155,121),(182,121),(212,121),(333,121),(347,121),(356,121),(374,121),(421,121),(459,121),(463,121),(468,121),(472,121),(477,121),(494,121),(199,122),(132,123),(230,123),(262,123),(376,123),(58,124),(137,124),(215,124),(223,124),(328,124),(336,124),(347,124),(365,124),(210,125),(463,125),(468,125),(89,126),(194,126),(210,126),(406,126),(468,126),(185,127),(1,128),(424,129),(52,130),(185,131),(468,132),(314,133),(199,134),(455,135),(255,136),(285,137),(199,138),(249,138),(463,139),(57,140),(85,140),(237,141),(52,142),(324,142),(57,143),(85,143),(199,144),(313,145),(48,146),(122,146),(347,146),(356,146),(424,146),(455,146),(36,147),(106,147),(447,147),(1,148),(28,149),(376,150),(468,151),(209,152),(180,153),(313,153),(347,153),(356,153),(420,153),(330,154),(347,154),(468,155),(97,156),(180,157),(421,158),(34,159),(68,159),(97,159),(211,159),(233,159),(302,159),(336,159),(347,159),(393,159),(405,159),(416,159),(97,160),(347,161),(421,161),(252,162),(468,163),(463,164),(468,164),(60,165),(194,165),(463,165),(478,165),(176,166),(168,167),(194,168),(415,168),(463,168),(478,168),(30,169),(159,169),(454,169),(447,170),(130,171),(421,171),(190,172),(48,173),(83,173),(356,173),(361,173),(463,173),(1,174),(48,174),(86,174),(374,175),(459,175),(252,176),(199,177),(249,177),(24,178),(128,178),(168,178),(209,178),(230,178),(314,178),(500,178),(97,179),(156,179),(230,179),(411,180),(347,181),(463,182),(468,182),(472,182),(473,182),(101,183),(151,183),(304,183),(145,184),(347,184),(374,185),(459,185),(146,186),(160,187),(347,187),(455,188),(146,189),(374,190),(459,190),(180,191),(200,191),(313,191),(420,191),(304,192),(421,192),(356,193),(230,194),(377,194),(468,195),(155,196),(212,196),(468,196),(395,197),(465,198),(129,199),(137,199),(182,199),(349,199),(447,199),(452,200),(57,201),(85,201),(356,202),(1,203),(36,203),(356,203),(421,204),(199,205),(146,206),(249,207),(192,208),(347,208),(1,209),(374,210),(459,210),(221,211),(255,212),(88,213),(199,213),(210,213),(463,213),(468,213),(463,214),(260,215),(421,216),(468,216),(89,217),(406,217),(463,217),(291,218),(356,219),(3,220),(36,220),(48,220),(83,220),(104,220),(130,220),(421,220),(199,221),(194,222),(155,223),(186,223),(212,223),(309,223),(347,223),(97,224),(277,225),(279,226),(464,227),(1,228),(60,228),(87,228),(101,228),(210,228),(304,228),(308,228),(347,228),(463,228),(468,228),(425,229),(89,230),(406,230),(185,231),(463,232),(255,233),(466,233),(272,234),(1,235),(7,236),(347,236),(257,237),(430,237),(194,238),(226,238),(356,238),(427,239),(87,240),(210,240),(463,240),(313,241),(185,242),(24,243),(128,243),(168,243),(209,243),(314,243),(500,243),(199,244),(185,245),(473,246),(185,247),(385,248),(130,249),(155,249),(212,249),(257,249),(333,249),(347,249),(356,249),(421,249),(430,249),(468,249),(185,250),(374,251),(459,251),(60,252),(110,252),(115,252),(215,252),(276,252),(278,252),(321,252),(347,252),(401,252),(417,252),(463,252),(466,252),(468,252),(470,252),(194,253),(347,253),(365,253),(415,253),(463,253),(468,253),(478,253),(468,254),(30,255),(276,255),(468,255),(472,255),(185,256),(356,257),(305,258),(468,259),(310,260),(463,261),(88,262),(185,263),(356,264),(329,265),(356,265),(361,265),(230,266),(315,266),(375,266),(209,267),(88,268),(68,269),(488,269),(420,270),(246,271),(146,272),(194,273),(226,273),(151,274),(326,274),(17,275),(22,275),(60,275),(77,275),(89,275),(97,275),(155,275),(194,275),(210,275),(211,275),(278,275),(302,275),(309,275),(347,275),(358,275),(393,275),(454,275),(468,275),(473,275),(329,276),(194,277),(199,278),(234,279),(347,280),(451,280),(89,281),(39,282),(269,282),(347,282),(463,283),(468,284),(378,285),(147,286),(107,287),(463,288),(466,288),(468,289),(417,290),(3,291),(104,291),(339,292),(344,293),(257,294),(269,295),(321,296),(463,296),(7,297),(10,297),(17,297),(21,297),(25,297),(33,297),(39,297),(58,297),(68,297),(69,297),(82,297),(122,297),(134,297),(137,297),(145,297),(160,297),(170,297),(192,297),(193,297),(215,297),(223,297),(278,297),(282,297),(294,297),(308,297),(309,297),(328,297),(330,297),(333,297),(336,297),(347,297),(349,297),(358,297),(365,297),(393,297),(424,297),(451,297),(487,297),(488,297),(492,297),(38,298),(199,298),(249,298),(305,298),(356,298),(468,299),(326,300),(468,301),(122,302),(350,302),(28,303),(57,303),(85,303),(232,303),(327,303),(344,303),(496,303),(376,304),(147,305),(316,305),(314,306),(106,307),(376,308),(3,309),(104,309),(255,309),(301,309),(356,309),(160,310),(347,310),(141,311),(77,312),(130,312),(199,312),(473,313),(185,314),(182,315),(455,316),(24,317),(111,317),(376,318),(185,319),(130,320),(421,320),(118,321),(390,321),(463,322),(25,323),(347,323),(199,324),(373,325),(473,325),(374,326),(146,327),(185,328),(376,329),(199,330),(347,331),(378,331),(291,332),(347,332),(419,332),(383,333),(88,334),(122,334),(356,334),(424,334),(463,335),(356,336),(199,337),(86,338),(199,338),(356,339),(397,340),(88,341),(151,341),(176,341),(185,342),(130,343),(421,343),(52,344),(324,344),(9,345),(373,345),(473,345),(199,346),(185,347),(123,348),(146,349),(447,349),(376,350),(407,351),(376,352),(463,353),(144,354),(24,355),(110,356),(222,356),(406,356),(463,356),(210,357),(463,357),(468,357),(1,358),(60,359),(159,359),(199,359),(212,359),(226,359),(233,359),(373,359),(406,359),(439,359),(463,359),(478,359),(463,360),(468,360),(473,361),(1,362),(356,362),(1,363),(347,364),(349,364),(421,365),(427,366),(468,367),(77,368),(199,368),(473,368),(477,368),(356,369),(230,370),(465,370),(106,371),(69,372),(347,372),(494,373),(276,374),(447,375),(356,376),(212,377),(417,377),(146,378),(327,378),(468,379),(487,380),(417,381),(89,382),(376,382),(199,383),(376,384),(212,385),(199,386),(468,386),(472,386),(443,387),(282,388),(447,389),(448,390),(89,391),(128,392),(10,393),(347,393),(30,394),(276,394),(472,394),(447,395),(56,396),(84,397),(206,397),(368,397),(456,397),(84,398),(89,398),(155,398),(206,398),(312,398),(189,399),(194,400),(478,400),(326,401),(459,402),(468,403),(146,404),(324,404),(33,405),(460,406),(9,407),(28,407),(30,407),(89,407),(155,407),(186,407),(276,407),(300,407),(479,407),(130,408),(463,409),(269,410),(106,411),(77,412),(222,412),(331,412),(473,412),(313,413),(308,414),(347,414),(463,414),(48,415),(83,415),(106,415),(122,415),(356,415),(424,415),(60,416),(104,416),(463,416),(468,416),(472,416),(468,417),(232,418),(356,419),(3,420),(104,420),(486,420),(374,421),(459,421),(463,422),(470,422),(463,423),(468,423),(243,424),(468,424),(468,425),(472,425),(36,426),(194,427),(478,427),(129,428),(137,428),(349,428),(447,428),(155,429),(186,429),(212,429),(309,429),(347,429),(473,429),(84,430),(368,430),(472,430),(483,431),(466,432),(421,433),(38,434),(52,434),(89,434),(145,434),(223,434),(324,434),(406,434),(257,435),(356,436),(361,436),(491,437),(421,438),(89,439),(406,439),(463,439),(212,440),(468,440),(199,441),(496,442),(36,443),(115,443),(130,443),(326,443),(421,443),(466,443),(470,443),(0,444),(96,444),(288,444),(305,444),(356,444),(361,444),(384,444),(433,444),(497,445),(185,446),(199,447),(36,448),(134,448),(294,448),(347,448),(495,449),(27,450),(22,451),(263,451),(347,451),(347,452),(492,452),(199,453),(104,454),(356,454),(210,455),(106,456),(463,456),(468,456),(463,457),(194,458),(478,458),(374,459),(459,459),(39,460),(58,460),(185,460),(264,460),(269,460),(209,461),(468,461),(201,462),(468,463);
264 + /*!40000 ALTER TABLE `help_relation` ENABLE KEYS */;
265 + UNLOCK TABLES;
266 + 
267 + --
268 + -- Table structure for table `help_topic`
269 + --
270 + 
271 + DROP TABLE IF EXISTS `help_topic`;
272 + /*!40101 SET @saved_cs_client     = @@character_set_client */;
273 + /*!40101 SET character_set_client = utf8 */;
274 + CREATE TABLE `help_topic` (
275 +   `help_topic_id` int(10) unsigned NOT NULL,
276 +   `name` char(64) NOT NULL,
277 +   `help_category_id` smallint(5) unsigned NOT NULL,
278 +   `description` text NOT NULL,
279 +   `example` text NOT NULL,
280 +   `url` text NOT NULL,
281 +   PRIMARY KEY (`help_topic_id`),
282 +   UNIQUE KEY `name` (`name`)
283 + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
284 + /*!40101 SET character_set_client = @saved_cs_client */;
285 + 
286 + --
287 + -- Dumping data for table `help_topic`
288 + --
289 + 
290 + LOCK TABLES `help_topic` WRITE;
291 + /*!40000 ALTER TABLE `help_topic` DISABLE KEYS */;
292 + INSERT INTO `help_topic` VALUES (0,'MIN',16,'Syntax:\nMIN([DISTINCT] expr)\n\nReturns the minimum value of expr. MIN() may take a string argument; in\nsuch cases, it returns the minimum string value. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html. The DISTINCT\nkeyword can be used to find the minimum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMIN() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student_name, MIN(test_score), MAX(test_score)\n    ->        FROM student\n    ->        GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(1,'JOIN',27,'MySQL supports the following JOIN syntaxes for the table_references\npart of SELECT statements and multiple-table DELETE and UPDATE\nstatements:\n\ntable_references:\n    table_reference [, table_reference] ...\n\ntable_reference:\n    table_factor\n  | join_table\n\ntable_factor:\n    tbl_name [[AS] alias] [index_hint_list]\n  | table_subquery [AS] alias\n  | ( table_references )\n  | { OJ table_reference LEFT OUTER JOIN table_reference\n        ON conditional_expr }\n\njoin_table:\n    table_reference [INNER | CROSS] JOIN table_factor [join_condition]\n  | table_reference STRAIGHT_JOIN table_factor\n  | table_reference STRAIGHT_JOIN table_factor ON conditional_expr\n  | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition\n  | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN table_factor\n\njoin_condition:\n    ON conditional_expr\n  | USING (column_list)\n\nindex_hint_list:\n    index_hint [, index_hint] ...\n\nindex_hint:\n    USE {INDEX|KEY}\n      [FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])\n  | IGNORE {INDEX|KEY}\n      [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n  | FORCE {INDEX|KEY}\n      [FOR {JOIN|ORDER BY|GROUP BY}] (index_list)\n\nindex_list:\n    index_name [, index_name] ...\n\nA table reference is also known as a join expression.\n\nThe syntax of table_factor is extended in comparison with the SQL\nStandard. The latter accepts only table_reference, not a list of them\ninside a pair of parentheses.\n\nThis is a conservative extension if we consider each comma in a list of\ntable_reference items as equivalent to an inner join. For example:\n\nSELECT * FROM t1 LEFT JOIN (t2, t3, t4)\n                 ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nis equivalent to:\n\nSELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)\n                 ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)\n\nIn MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents\n(they can replace each other). In standard SQL, they are not\nequivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used\notherwise.\n\nIn general, parentheses can be ignored in join expressions containing\nonly inner join operations. MySQL also supports nested joins (see\nhttp://dev.mysql.com/doc/refman/5.5/en/nested-join-optimization.html).\n\nIndex hints can be specified to affect how the MySQL optimizer makes\nuse of indexes. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/index-hints.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/join.html\n\n','SELECT left_tbl.*\n  FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id = right_tbl.id\n  WHERE right_tbl.id IS NULL;\n','http://dev.mysql.com/doc/refman/5.5/en/join.html'),(2,'HEX',37,'Syntax:\nHEX(str), HEX(N)\n\nFor a string argument str, HEX() returns a hexadecimal string\nrepresentation of str where each character in str is converted to two\nhexadecimal digits. The inverse of this operation is performed by the\nUNHEX() function.\n\nFor a numeric argument N, HEX() returns a hexadecimal string\nrepresentation of the value of N treated as a longlong (BIGINT) number.\nThis is equivalent to CONV(N,10,16). The inverse of this operation is\nperformed by CONV(HEX(N),16,10).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT 0x616263, HEX(\'abc\'), UNHEX(HEX(\'abc\'));\n        -> \'abc\', 616263, \'abc\'\nmysql> SELECT HEX(255), CONV(HEX(255),16,10);\n        -> \'FF\', 255\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(3,'REPLACE',27,'Syntax:\nREPLACE [LOW_PRIORITY | DELAYED]\n    [INTO] tbl_name [(col_name,...)]\n    {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n    [INTO] tbl_name\n    SET col_name={expr | DEFAULT}, ...\n\nOr:\n\nREPLACE [LOW_PRIORITY | DELAYED]\n    [INTO] tbl_name [(col_name,...)]\n    SELECT ...\n\nREPLACE works exactly like INSERT, except that if an old row in the\ntable has the same value as a new row for a PRIMARY KEY or a UNIQUE\nindex, the old row is deleted before the new row is inserted. See [HELP\nINSERT].\n\nREPLACE is a MySQL extension to the SQL standard. It either inserts, or\ndeletes and inserts. For another MySQL extension to standard SQL---that\neither inserts or updates---see\nhttp://dev.mysql.com/doc/refman/5.5/en/insert-on-duplicate.html.\n\nNote that unless the table has a PRIMARY KEY or UNIQUE index, using a\nREPLACE statement makes no sense. It becomes equivalent to INSERT,\nbecause there is no index to be used to determine whether a new row\nduplicates another.\n\nValues for all columns are taken from the values specified in the\nREPLACE statement. Any missing columns are set to their default values,\njust as happens for INSERT. You cannot refer to values from the current\nrow and use them in the new row. If you use an assignment such as SET\ncol_name = col_name + 1, the reference to the column name on the right\nhand side is treated as DEFAULT(col_name), so the assignment is\nequivalent to SET col_name = DEFAULT(col_name) + 1.\n\nTo use REPLACE, you must have both the INSERT and DELETE privileges for\nthe table.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/replace.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/replace.html'),(4,'CONTAINS',30,'Contains(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 completely contains g2. This\ntests the opposite relationship as Within().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(5,'SRID',36,'SRID(g)\n\nReturns an integer indicating the Spatial Reference System ID for the\ngeometry value g.\n\nIn MySQL, the SRID value is just an integer associated with the\ngeometry value. All calculations are done assuming Euclidean (planar)\ngeometry.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','mysql> SELECT SRID(GeomFromText(\'LineString(1 1,2 2)\',101));\n+-----------------------------------------------+\n| SRID(GeomFromText(\'LineString(1 1,2 2)\',101)) |\n+-----------------------------------------------+\n|                                           101 |\n+-----------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(6,'CURRENT_TIMESTAMP',31,'Syntax:\nCURRENT_TIMESTAMP, CURRENT_TIMESTAMP()\n\nCURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for NOW().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(7,'SHOW CONTRIBUTORS',26,'Syntax:\nSHOW CONTRIBUTORS\n\nThe SHOW CONTRIBUTORS statement displays information about the people\nwho contribute to MySQL source or to causes that we support. For each\ncontributor, it displays Name, Location, and Comment values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-contributors.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-contributors.html'),(8,'VARIANCE',16,'Syntax:\nVARIANCE(expr)\n\nReturns the population standard variance of expr. This is an extension\nto standard SQL. The standard SQL function VAR_POP() can be used\ninstead.\n\nVARIANCE() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(9,'DROP SERVER',39,'Syntax:\nDROP SERVER [ IF EXISTS ] server_name\n\nDrops the server definition for the server named server_name. The\ncorresponding row within the mysql.servers table will be deleted. This\nstatement requires the SUPER privilege.\n\nDropping a server for a table does not affect any FEDERATED tables that\nused this connection information when they were created. See [HELP\nCREATE SERVER].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-server.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-server.html'),(10,'SHOW AUTHORS',26,'Syntax:\nSHOW AUTHORS\n\nThe SHOW AUTHORS statement displays information about the people who\nwork on MySQL. For each author, it displays Name, Location, and Comment\nvalues.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-authors.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-authors.html'),(11,'VAR_SAMP',16,'Syntax:\nVAR_SAMP(expr)\n\nReturns the sample variance of expr. That is, the denominator is the\nnumber of rows minus one.\n\nVAR_SAMP() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(12,'CONCAT',37,'Syntax:\nCONCAT(str1,str2,...)\n\nReturns the string that results from concatenating the arguments. May\nhave one or more arguments. If all arguments are nonbinary strings, the\nresult is a nonbinary string. If the arguments include any binary\nstrings, the result is a binary string. A numeric argument is converted\nto its equivalent string form. This is a nonbinary string as of MySQL\n5.5.3. Before 5.5.3, it is a binary string; to to avoid that and\nproduce a nonbinary string, you can use an explicit type cast, as in\nthis example:\n\nSELECT CONCAT(CAST(int_col AS CHAR), char_col);\n\nCONCAT() returns NULL if any argument is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT CONCAT(\'My\', \'S\', \'QL\');\n        -> \'MySQL\'\nmysql> SELECT CONCAT(\'My\', NULL, \'QL\');\n        -> NULL\nmysql> SELECT CONCAT(14.3);\n        -> \'14.3\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(13,'GEOMETRY HIERARCHY',34,'Geometry is the base class. It is an abstract class. The instantiable\nsubclasses of Geometry are restricted to zero-, one-, and\ntwo-dimensional geometric objects that exist in two-dimensional\ncoordinate space. All instantiable geometry classes are defined so that\nvalid instances of a geometry class are topologically closed (that is,\nall defined geometries include their boundary).\n\nThe base Geometry class has subclasses for Point, Curve, Surface, and\nGeometryCollection:\n\no Point represents zero-dimensional objects.\n\no Curve represents one-dimensional objects, and has subclass\n  LineString, with sub-subclasses Line and LinearRing.\n\no Surface is designed for two-dimensional objects and has subclass\n  Polygon.\n\no GeometryCollection has specialized zero-, one-, and two-dimensional\n  collection classes named MultiPoint, MultiLineString, and\n  MultiPolygon for modeling geometries corresponding to collections of\n  Points, LineStrings, and Polygons, respectively. MultiCurve and\n  MultiSurface are introduced as abstract superclasses that generalize\n  the collection interfaces to handle Curves and Surfaces.\n\nGeometry, Curve, Surface, MultiCurve, and MultiSurface are defined as\nnoninstantiable classes. They define a common set of methods for their\nsubclasses and are included for extensibility.\n\nPoint, LineString, Polygon, GeometryCollection, MultiPoint,\nMultiLineString, and MultiPolygon are instantiable classes.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/gis-geometry-class-hierarchy.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/gis-geometry-class-hierarchy.html'),(14,'CHAR FUNCTION',37,'Syntax:\nCHAR(N,... [USING charset_name])\n\nCHAR() interprets each argument N as an integer and returns a string\nconsisting of the characters given by the code values of those\nintegers. NULL values are skipped.\nBy default, CHAR() returns a binary string. To produce a string in a\ngiven character set, use the optional USING clause:\n\nmysql> SELECT CHARSET(CHAR(0x65)), CHARSET(CHAR(0x65 USING utf8));\n+---------------------+--------------------------------+\n| CHARSET(CHAR(0x65)) | CHARSET(CHAR(0x65 USING utf8)) |\n+---------------------+--------------------------------+\n| binary              | utf8                           |\n+---------------------+--------------------------------+\n\nIf USING is given and the result string is illegal for the given\ncharacter set, a warning is issued. Also, if strict SQL mode is\nenabled, the result from CHAR() becomes NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT CHAR(77,121,83,81,\'76\');\n        -> \'MySQL\'\nmysql> SELECT CHAR(77,77.3,\'77.3\');\n        -> \'MMM\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(15,'DATETIME',22,'DATETIME\n\nA date and time combination. The supported range is \'1000-01-01\n00:00:00\' to \'9999-12-31 23:59:59\'. MySQL displays DATETIME values in\n\'YYYY-MM-DD HH:MM:SS\' format, but permits assignment of values to\nDATETIME columns using either strings or numbers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(16,'SHOW CREATE TRIGGER',26,'Syntax:\nSHOW CREATE TRIGGER trigger_name\n\nThis statement shows a CREATE TRIGGER statement that creates the given\ntrigger.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-trigger.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-create-trigger.html'),(17,'SHOW CREATE PROCEDURE',26,'Syntax:\nSHOW CREATE PROCEDURE proc_name\n\nThis statement is a MySQL extension. It returns the exact string that\ncan be used to re-create the named stored procedure. A similar\nstatement, SHOW CREATE FUNCTION, displays information about stored\nfunctions (see [HELP SHOW CREATE FUNCTION]).\n\nBoth statements require that you be the owner of the routine or have\nSELECT access to the mysql.proc table. If you do not have privileges\nfor the routine itself, the value displayed for the Create Procedure or\nCreate Function field will be NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-procedure.html\n\n','mysql> SHOW CREATE PROCEDURE test.simpleproc\\G\n*************************** 1. row ***************************\n           Procedure: simpleproc\n            sql_mode:\n    Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)\n                      BEGIN\n                      SELECT COUNT(*) INTO param1 FROM t;\n                      END\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n\nmysql> SHOW CREATE FUNCTION test.hello\\G\n*************************** 1. row ***************************\n            Function: hello\n            sql_mode:\n     Create Function: CREATE FUNCTION `hello`(s CHAR(20))\n                      RETURNS CHAR(50)\n                      RETURN CONCAT(\'Hello, \',s,\'!\')\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n','http://dev.mysql.com/doc/refman/5.5/en/show-create-procedure.html'),(18,'OPEN',23,'Syntax:\nOPEN cursor_name\n\nThis statement opens a previously declared cursor. For an example, see\nhttp://dev.mysql.com/doc/refman/5.5/en/cursors.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/open.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/open.html'),(19,'INTEGER',22,'INTEGER[(M)] [UNSIGNED] [ZEROFILL]\n\nThis type is a synonym for INT.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(20,'LOWER',37,'Syntax:\nLOWER(str)\n\nReturns the string str with all characters changed to lowercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nmysql> SELECT LOWER(\'QUADRATICALLY\');\n        -> \'quadratically\'\n\nLOWER() (and UPPER()) are ineffective when applied to binary strings\n(BINARY, VARBINARY, BLOB). To perform lettercase conversion, convert\nthe string to a nonbinary string:\n\nmysql> SET @str = BINARY \'New York\';\nmysql> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));\n+-------------+-----------------------------------+\n| LOWER(@str) | LOWER(CONVERT(@str USING latin1)) |\n+-------------+-----------------------------------+\n| New York    | new york                          |\n+-------------+-----------------------------------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(21,'SHOW COLUMNS',26,'Syntax:\nSHOW [FULL] COLUMNS {FROM | IN} tbl_name [{FROM | IN} db_name]\n    [LIKE \'pattern\' | WHERE expr]\n\nSHOW COLUMNS displays information about the columns in a given table.\nIt also works for views. The LIKE clause, if present, indicates which\ncolumn names to match. The WHERE clause can be given to select rows\nusing more general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nSHOW COLUMNS displays information only for those columns for which you\nhave some privilege.\n\nmysql> SHOW COLUMNS FROM City;\n+------------+----------+------+-----+---------+----------------+\n| Field      | Type     | Null | Key | Default | Extra          |\n+------------+----------+------+-----+---------+----------------+\n| Id         | int(11)  | NO   | PRI | NULL    | auto_increment |\n| Name       | char(35) | NO   |     |         |                |\n| Country    | char(3)  | NO   | UNI |         |                |\n| District   | char(20) | YES  | MUL |         |                |\n| Population | int(11)  | NO   |     | 0       |                |\n+------------+----------+------+-----+---------+----------------+\n5 rows in set (0.00 sec)\n\nIf the data types differ from what you expect them to be based on a\nCREATE TABLE statement, note that MySQL sometimes changes data types\nwhen you create or alter a table. The conditions under which this\noccurs are described in\nhttp://dev.mysql.com/doc/refman/5.5/en/silent-column-changes.html.\n\nThe FULL keyword causes the output to include the column collation and\ncomments, as well as the privileges you have for each column.\n\nYou can use db_name.tbl_name as an alternative to the tbl_name FROM\ndb_name syntax. In other words, these two statements are equivalent:\n\nmysql> SHOW COLUMNS FROM mytable FROM mydb;\nmysql> SHOW COLUMNS FROM mydb.mytable;\n\nSHOW COLUMNS displays the following values for each table column:\n\nField indicates the column name.\n\nType indicates the column data type.\n\nCollation indicates the collation for nonbinary string columns, or NULL\nfor other columns. This value is displayed only if you use the FULL\nkeyword.\n\nThe Null field contains YES if NULL values can be stored in the column,\nNO if not.\n\nThe Key field indicates whether the column is indexed:\n\no If Key is empty, the column either is not indexed or is indexed only\n  as a secondary column in a multiple-column, nonunique index.\n\no If Key is PRI, the column is a PRIMARY KEY or is one of the columns\n  in a multiple-column PRIMARY KEY.\n\no If Key is UNI, the column is the first column of a UNIQUE index. (A\n  UNIQUE index permits multiple NULL values, but you can tell whether\n  the column permits NULL by checking the Null field.)\n\no If Key is MUL, the column is the first column of a nonunique index in\n  which multiple occurrences of a given value are permitted within the\n  column.\n\nIf more than one of the Key values applies to a given column of a\ntable, Key displays the one with the highest priority, in the order\nPRI, UNI, MUL.\n\nA UNIQUE index may be displayed as PRI if it cannot contain NULL values\nand there is no PRIMARY KEY in the table. A UNIQUE index may display as\nMUL if several columns form a composite UNIQUE index; although the\ncombination of the columns is unique, each column can still hold\nmultiple occurrences of a given value.\n\nThe Default field indicates the default value that is assigned to the\ncolumn. This is NULL if the column has an explicit default of NULL, or\nif the column definition has no DEFAULT clause.\n\nThe Extra field contains any additional information that is available\nabout a given column. The value is nonempty in these cases:\nauto_increment for columns that have the AUTO_INCREMENT attribute; on\nupdate CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE\nCURRENT_TIMESTAMP attribute.\n\nPrivileges indicates the privileges you have for the column. This value\nis displayed only if you use the FULL keyword.\n\nComment indicates any comment the column has. This value is displayed\nonly if you use the FULL keyword.\n\nSHOW FIELDS is a synonym for SHOW COLUMNS. You can also list a table\'s\ncolumns with the mysqlshow db_name tbl_name command.\n\nThe DESCRIBE statement provides information similar to SHOW COLUMNS.\nSee [HELP DESCRIBE].\n\nThe SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX statements\nalso provide information about tables. See [HELP SHOW].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-columns.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-columns.html'),(22,'CREATE TRIGGER',39,'Syntax:\nCREATE\n    [DEFINER = { user | CURRENT_USER }]\n    TRIGGER trigger_name trigger_time trigger_event\n    ON tbl_name FOR EACH ROW trigger_body\n\nThis statement creates a new trigger. A trigger is a named database\nobject that is associated with a table, and that activates when a\nparticular event occurs for the table. The trigger becomes associated\nwith the table named tbl_name, which must refer to a permanent table.\nYou cannot associate a trigger with a TEMPORARY table or a view.\n\nCREATE TRIGGER requires the TRIGGER privilege for the table associated\nwith the trigger. The statement might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section. If\nbinary logging is enabled, CREATE TRIGGER might require the SUPER\nprivilege, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-logging.html.\n\nThe DEFINER clause determines the security context to be used when\nchecking access privileges at trigger activation time. See later in\nthis section for more information.\n\ntrigger_time is the trigger action time. It can be BEFORE or AFTER to\nindicate that the trigger activates before or after each row to be\nmodified.\n\ntrigger_event indicates the kind of statement that activates the\ntrigger. The trigger_event can be one of the following:\n\no INSERT: The trigger is activated whenever a new row is inserted into\n  the table; for example, through INSERT, LOAD DATA, and REPLACE\n  statements.\n\no UPDATE: The trigger is activated whenever a row is modified; for\n  example, through UPDATE statements.\n\no DELETE: The trigger is activated whenever a row is deleted from the\n  table; for example, through DELETE and REPLACE statements. However,\n  DROP TABLE and TRUNCATE TABLE statements on the table do not activate\n  this trigger, because they do not use DELETE. Dropping a partition\n  does not activate DELETE triggers, either. See [HELP TRUNCATE TABLE].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-trigger.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-trigger.html'),(23,'MONTH',31,'Syntax:\nMONTH(date)\n\nReturns the month for date, in the range 1 to 12 for January to\nDecember, or 0 for dates such as \'0000-00-00\' or \'2008-00-00\' that have\na zero month part.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MONTH(\'2008-02-03\');\n        -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(24,'TINYINT',22,'TINYINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA very small integer. The signed range is -128 to 127. The unsigned\nrange is 0 to 255.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(25,'SHOW TRIGGERS',26,'Syntax:\nSHOW TRIGGERS [{FROM | IN} db_name]\n    [LIKE \'pattern\' | WHERE expr]\n\nSHOW TRIGGERS lists the triggers currently defined for tables in a\ndatabase (the default database unless a FROM clause is given). This\nstatement returns results only for databases and tables for which you\nhave the TRIGGER privilege. The LIKE clause, if present, indicates\nwhich table names to match and causes the statement to display triggers\nfor those tables. The WHERE clause can be given to select rows using\nmore general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nFor the trigger ins_sum as defined in\nhttp://dev.mysql.com/doc/refman/5.5/en/triggers.html, the output of\nthis statement is as shown here:\n\nmysql> SHOW TRIGGERS LIKE \'acc%\'\\G\n*************************** 1. row ***************************\n             Trigger: ins_sum\n               Event: INSERT\n               Table: account\n           Statement: SET @sum = @sum + NEW.amount\n              Timing: BEFORE\n             Created: NULL\n            sql_mode:\n             Definer: myname@localhost\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n\ncharacter_set_client is the session value of the character_set_client\nsystem variable when the trigger was created. collation_connection is\nthe session value of the collation_connection system variable when the\ntrigger was created. Database Collation is the collation of the\ndatabase with which the trigger is associated.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-triggers.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-triggers.html'),(26,'MASTER_POS_WAIT',14,'Syntax:\nMASTER_POS_WAIT(log_name,log_pos[,timeout])\n\nThis function is useful for control of master/slave synchronization. It\nblocks until the slave has read and applied all updates up to the\nspecified position in the master log. The return value is the number of\nlog events the slave had to wait for to advance to the specified\nposition. The function returns NULL if the slave SQL thread is not\nstarted, the slave\'s master information is not initialized, the\narguments are incorrect, or an error occurs. It returns -1 if the\ntimeout has been exceeded. If the slave SQL thread stops while\nMASTER_POS_WAIT() is waiting, the function returns NULL. If the slave\nis past the specified position, the function returns immediately.\n\nIf a timeout value is specified, MASTER_POS_WAIT() stops waiting when\ntimeout seconds have elapsed. timeout must be greater than 0; a zero or\nnegative timeout means no timeout.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(27,'REGEXP',37,'Syntax:\nexpr REGEXP pat, expr RLIKE pat\n\nPerforms a pattern match of a string expression expr against a pattern\npat. The pattern can be an extended regular expression. The syntax for\nregular expressions is discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/regexp.html. Returns 1 if expr\nmatches pat; otherwise it returns 0. If either expr or pat is NULL, the\nresult is NULL. RLIKE is a synonym for REGEXP, provided for mSQL\ncompatibility.\n\nThe pattern need not be a literal string. For example, it can be\nspecified as a string expression or table column.\n\n*Note*: Because MySQL uses the C escape syntax in strings (for example,\n\"\\n\" to represent the newline character), you must double any \"\\\" that\nyou use in your REGEXP strings.\n\nREGEXP is not case sensitive, except when used with binary strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/regexp.html\n\n','mysql> SELECT \'Monty!\' REGEXP \'.*\';\n        -> 1\nmysql> SELECT \'new*\\n*line\' REGEXP \'new\\\\*.\\\\*line\';\n        -> 1\nmysql> SELECT \'a\' REGEXP \'A\', \'a\' REGEXP BINARY \'A\';\n        -> 1  0\nmysql> SELECT \'a\' REGEXP \'^[a-d]\';\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/regexp.html'),(28,'IF STATEMENT',23,'Syntax:\nIF search_condition THEN statement_list\n    [ELSEIF search_condition THEN statement_list] ...\n    [ELSE statement_list]\nEND IF\n\nThe IF statement for stored programs implements a basic conditional\nconstruct.\n\n*Note*: There is also an IF() function, which differs from the IF\nstatement described here. See\nhttp://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html. The\nIF statement can have THEN, ELSE, and ELSEIF clauses, and it is\nterminated with END IF.\n\nIf the search_condition evaluates to true, the corresponding THEN or\nELSEIF clause statement_list executes. If no search_condition matches,\nthe ELSE clause statement_list executes.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/if.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/if.html'),(29,'^',19,'Syntax:\n^\n\nBitwise XOR:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 1 ^ 1;\n        -> 0\nmysql> SELECT 1 ^ 0;\n        -> 1\nmysql> SELECT 11 ^ 3;\n        -> 8\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(30,'DROP VIEW',39,'Syntax:\nDROP VIEW [IF EXISTS]\n    view_name [, view_name] ...\n    [RESTRICT | CASCADE]\n\nDROP VIEW removes one or more views. You must have the DROP privilege\nfor each view. If any of the views named in the argument list do not\nexist, MySQL returns an error indicating by name which nonexisting\nviews it was unable to drop, but it also drops all of the views in the\nlist that do exist.\n\nThe IF EXISTS clause prevents an error from occurring for views that\ndon\'t exist. When this clause is given, a NOTE is generated for each\nnonexistent view. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE, if given, are parsed and ignored.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-view.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-view.html'),(31,'WITHIN',30,'Within(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially within g2. This\ntests the opposite relationship as Contains().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(32,'WEEK',31,'Syntax:\nWEEK(date[,mode])\n\nThis function returns the week number for date. The two-argument form\nof WEEK() enables you to specify whether the week starts on Sunday or\nMonday and whether the return value should be in the range from 0 to 53\nor from 1 to 53. If the mode argument is omitted, the value of the\ndefault_week_format system variable is used. See\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT WEEK(\'2008-02-20\');\n        -> 7\nmysql> SELECT WEEK(\'2008-02-20\',0);\n        -> 7\nmysql> SELECT WEEK(\'2008-02-20\',1);\n        -> 8\nmysql> SELECT WEEK(\'2008-12-31\',1);\n        -> 53\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(33,'SHOW PLUGINS',26,'Syntax:\nSHOW PLUGINS\n\nSHOW PLUGINS displays information about server plugins. Plugin\ninformation is also available in the INFORMATION_SCHEMA.PLUGINS table.\nSee http://dev.mysql.com/doc/refman/5.5/en/plugins-table.html.\n\nExample of SHOW PLUGINS output:\n\nmysql> SHOW PLUGINS\\G\n*************************** 1. row ***************************\n   Name: binlog\n Status: ACTIVE\n   Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 2. row ***************************\n   Name: CSV\n Status: ACTIVE\n   Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 3. row ***************************\n   Name: MEMORY\n Status: ACTIVE\n   Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n*************************** 4. row ***************************\n   Name: MyISAM\n Status: ACTIVE\n   Type: STORAGE ENGINE\nLibrary: NULL\nLicense: GPL\n...\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-plugins.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-plugins.html'),(34,'DROP FUNCTION UDF',21,'Syntax:\nDROP FUNCTION function_name\n\nThis statement drops the user-defined function (UDF) named\nfunction_name.\n\nTo drop a function, you must have the DELETE privilege for the mysql\ndatabase. This is because DROP FUNCTION removes a row from the\nmysql.func system table that records the function\'s name, type, and\nshared library name.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-function-udf.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-function-udf.html'),(35,'PREPARE',8,'Syntax:\nPREPARE stmt_name FROM preparable_stmt\n\nThe PREPARE statement prepares a statement and assigns it a name,\nstmt_name, by which to refer to the statement later. Statement names\nare not case sensitive. preparable_stmt is either a string literal or a\nuser variable that contains the text of the statement. The text must\nrepresent a single SQL statement, not multiple statements. Within the\nstatement, \"?\" characters can be used as parameter markers to indicate\nwhere data values are to be bound to the query later when you execute\nit. The \"?\" characters should not be enclosed within quotation marks,\neven if you intend to bind them to string values. Parameter markers can\nbe used only where data values should appear, not for SQL keywords,\nidentifiers, and so forth.\n\nIf a prepared statement with the given name already exists, it is\ndeallocated implicitly before the new statement is prepared. This means\nthat if the new statement contains an error and cannot be prepared, an\nerror is returned and no statement with the given name exists.\n\nA prepared statement is executed with EXECUTE and released with\nDEALLOCATE PREPARE.\n\nThe scope of a prepared statement is the session within which it is\ncreated. Other sessions cannot see it.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/prepare.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/prepare.html'),(36,'LOCK',8,'Syntax:\nLOCK TABLES\n    tbl_name [[AS] alias] lock_type\n    [, tbl_name [[AS] alias] lock_type] ...\n\nlock_type:\n    READ [LOCAL]\n  | [LOW_PRIORITY] WRITE\n\nUNLOCK TABLES\n\nMySQL enables client sessions to acquire table locks explicitly for the\npurpose of cooperating with other sessions for access to tables, or to\nprevent other sessions from modifying tables during periods when a\nsession requires exclusive access to them. A session can acquire or\nrelease locks only for itself. One session cannot acquire locks for\nanother session or release locks held by another session.\n\nLocks may be used to emulate transactions or to get more speed when\nupdating tables. This is explained in more detail later in this\nsection.\n\nLOCK TABLES explicitly acquires table locks for the current client\nsession. Table locks can be acquired for base tables or views. You must\nhave the LOCK TABLES privilege, and the SELECT privilege for each\nobject to be locked.\n\nFor view locking, LOCK TABLES adds all base tables used in the view to\nthe set of tables to be locked and locks them automatically. If you\nlock a table explicitly with LOCK TABLES, any tables used in triggers\nare also locked implicitly, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/lock-tables-and-triggers.html.\n\nUNLOCK TABLES explicitly releases any table locks held by the current\nsession. LOCK TABLES implicitly releases any table locks held by the\ncurrent session before acquiring new locks.\n\nAnother use for UNLOCK TABLES is to release the global read lock\nacquired with the FLUSH TABLES WITH READ LOCK statement, which enables\nyou to lock all tables in all databases. See [HELP FLUSH]. (This is a\nvery convenient way to get backups if you have a file system such as\nVeritas that can take snapshots in time.)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/lock-tables.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/lock-tables.html'),(37,'UPDATEXML',37,'Syntax:\nUpdateXML(xml_target, xpath_expr, new_xml)\n\nThis function replaces a single portion of a given fragment of XML\nmarkup xml_target with a new XML fragment new_xml, and then returns the\nchanged XML. The portion of xml_target that is replaced matches an\nXPath expression xpath_expr supplied by the user. In MySQL 5.5, the\nXPath expression can contain at most 127 characters. (This limitation\nis lifted in MySQL 5.6.)\n\nIf no expression matching xpath_expr is found, or if multiple matches\nare found, the function returns the original xml_target XML fragment.\nAll three arguments should be strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html\n\n','mysql> SELECT\n    ->   UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a\', \'<e>fff</e>\') AS val1,\n    ->   UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/b\', \'<e>fff</e>\') AS val2,\n    ->   UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'//b\', \'<e>fff</e>\') AS val3,\n    ->   UpdateXML(\'<a><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val4,\n    ->   UpdateXML(\'<a><d></d><b>ccc</b><d></d></a>\', \'/a/d\', \'<e>fff</e>\') AS val5\n    -> \\G\n\n*************************** 1. row ***************************\nval1: <e>fff</e>\nval2: <a><b>ccc</b><d></d></a>\nval3: <a><e>fff</e><d></d></a>\nval4: <a><b>ccc</b><e>fff</e></a>\nval5: <a><d></d><b>ccc</b><d></d></a>\n','http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html'),(38,'RESET SLAVE',8,'Syntax:\nRESET SLAVE [ALL]\n\nRESET SLAVE makes the slave forget its replication position in the\nmaster\'s binary log. This statement is meant to be used for a clean\nstart: It deletes the master.info and relay-log.info files, all the\nrelay log files, and starts a new relay log file. To use RESET SLAVE,\nthe slave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\n*Note*: All relay log files are deleted, even if they have not been\ncompletely executed by the slave SQL thread. (This is a condition\nlikely to exist on a replication slave if you have issued a STOP SLAVE\nstatement or if the slave is highly loaded.)\n\nIn MySQL 5.5 (unlike the case in MySQL 5.1 and earlier), RESET SLAVE\ndoes not change any replication connection parameters such as master\nhost, master port, master user, or master password, which are retained\nin memory. This means that START SLAVE can be issued without requiring\na CHANGE MASTER TO statement following RESET SLAVE.\n\nIn MySQL 5.5.16 and later, you can use RESET SLAVE ALL to reset these\nconnection parameters (Bug #11809016). Connection parameters are also\nreset if the slave mysqld is shut down.\n\nIf the slave SQL thread was in the middle of replicating temporary\ntables when it was stopped, and RESET SLAVE is issued, these replicated\ntemporary tables are deleted on the slave.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/reset-slave.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/reset-slave.html'),(39,'SHOW BINARY LOGS',26,'Syntax:\nSHOW BINARY LOGS\nSHOW MASTER LOGS\n\nLists the binary log files on the server. This statement is used as\npart of the procedure described in [HELP PURGE BINARY LOGS], that shows\nhow to determine which logs can be purged.\n\nmysql> SHOW BINARY LOGS;\n+---------------+-----------+\n| Log_name      | File_size |\n+---------------+-----------+\n| binlog.000015 |    724935 |\n| binlog.000016 |    733481 |\n+---------------+-----------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-binary-logs.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-binary-logs.html'),(40,'POLYGON',24,'Polygon(ls1,ls2,...)\n\nConstructs a Polygon value from a number of LineString or WKB\nLineString arguments. If any argument does not represent a LinearRing\n(that is, not a closed and simple LineString), the return value is\nNULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(41,'MINUTE',31,'Syntax:\nMINUTE(time)\n\nReturns the minute for time, in the range 0 to 59.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MINUTE(\'2008-02-03 10:05:03\');\n        -> 5\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(42,'DAY',31,'Syntax:\nDAY(date)\n\nDAY() is a synonym for DAYOFMONTH().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(43,'MID',37,'Syntax:\nMID(str,pos,len)\n\nMID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(44,'UUID',14,'Syntax:\nUUID()\n\nReturns a Universal Unique Identifier (UUID) generated according to\n\"DCE 1.1: Remote Procedure Call\" (Appendix A) CAE (Common Applications\nEnvironment) Specifications published by The Open Group in October 1997\n(Document Number C706,\nhttp://www.opengroup.org/public/pubs/catalog/c706.htm).\n\nA UUID is designed as a number that is globally unique in space and\ntime. Two calls to UUID() are expected to generate two different\nvalues, even if these calls are performed on two separate computers\nthat are not connected to each other.\n\nA UUID is a 128-bit number represented by a utf8 string of five\nhexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:\n\no The first three numbers are generated from a timestamp.\n\no The fourth number preserves temporal uniqueness in case the timestamp\n  value loses monotonicity (for example, due to daylight saving time).\n\no The fifth number is an IEEE 802 node number that provides spatial\n  uniqueness. A random number is substituted if the latter is not\n  available (for example, because the host computer has no Ethernet\n  card, or we do not know how to find the hardware address of an\n  interface on your operating system). In this case, spatial uniqueness\n  cannot be guaranteed. Nevertheless, a collision should have very low\n  probability.\n\n  Currently, the MAC address of an interface is taken into account only\n  on FreeBSD and Linux. On other operating systems, MySQL uses a\n  randomly generated 48-bit number.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT UUID();\n        -> \'6ccd780c-baba-1026-9564-0040f4311e29\'\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(45,'LINESTRING',24,'LineString(pt1,pt2,...)\n\nConstructs a LineString value from a number of Point or WKB Point\narguments. If the number of arguments is less than two, the return\nvalue is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(46,'SLEEP',14,'Syntax:\nSLEEP(duration)\n\nSleeps (pauses) for the number of seconds given by the duration\nargument, then returns 0. If SLEEP() is interrupted, it returns 1. The\nduration may have a fractional part given in microseconds.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(47,'CONNECTION_ID',17,'Syntax:\nCONNECTION_ID()\n\nReturns the connection ID (thread ID) for the connection. Every\nconnection has an ID that is unique among the set of currently\nconnected clients.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT CONNECTION_ID();\n        -> 23786\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(48,'DELETE',27,'Syntax:\nSingle-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name\n    [WHERE where_condition]\n    [ORDER BY ...]\n    [LIMIT row_count]\n\nMultiple-table syntax:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n    tbl_name[.*] [, tbl_name[.*]] ...\n    FROM table_references\n    [WHERE where_condition]\n\nOr:\n\nDELETE [LOW_PRIORITY] [QUICK] [IGNORE]\n    FROM tbl_name[.*] [, tbl_name[.*]] ...\n    USING table_references\n    [WHERE where_condition]\n\nFor the single-table syntax, the DELETE statement deletes rows from\ntbl_name and returns a count of the number of deleted rows. This count\ncan be obtained by calling the ROW_COUNT() function (see\nhttp://dev.mysql.com/doc/refman/5.5/en/information-functions.html). The\nWHERE clause, if given, specifies the conditions that identify which\nrows to delete. With no WHERE clause, all rows are deleted. If the\nORDER BY clause is specified, the rows are deleted in the order that is\nspecified. The LIMIT clause places a limit on the number of rows that\ncan be deleted.\n\nFor the multiple-table syntax, DELETE deletes from each tbl_name the\nrows that satisfy the conditions. In this case, ORDER BY and LIMIT\ncannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe deleted. It is specified as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/select.html.\n\nCurrently, you cannot delete from a table and select from the same\ntable in a subquery.\n\nYou need the DELETE privilege on a table to delete rows from it. You\nneed only the SELECT privilege for any columns that are only read, such\nas those named in the WHERE clause.\n\nAs stated, a DELETE statement with no WHERE clause deletes all rows. A\nfaster way to do this, when you do not need to know the number of\ndeleted rows, is to use TRUNCATE TABLE. However, within a transaction\nor if you have a lock on the table, TRUNCATE TABLE cannot be used\nwhereas DELETE can. See [HELP TRUNCATE TABLE], and [HELP LOCK].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/delete.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/delete.html'),(49,'ROUND',4,'Syntax:\nROUND(X), ROUND(X,D)\n\nRounds the argument X to D decimal places. The rounding algorithm\ndepends on the data type of X. D defaults to 0 if not specified. D can\nbe negative to cause D digits left of the decimal point of the value X\nto become zero.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ROUND(-1.23);\n        -> -1\nmysql> SELECT ROUND(-1.58);\n        -> -2\nmysql> SELECT ROUND(1.58);\n        -> 2\nmysql> SELECT ROUND(1.298, 1);\n        -> 1.3\nmysql> SELECT ROUND(1.298, 0);\n        -> 1\nmysql> SELECT ROUND(23.298, -1);\n        -> 20\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(50,'NULLIF',7,'Syntax:\nNULLIF(expr1,expr2)\n\nReturns NULL if expr1 = expr2 is true, otherwise returns expr1. This is\nthe same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html\n\n','mysql> SELECT NULLIF(1,1);\n        -> NULL\nmysql> SELECT NULLIF(1,2);\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html'),(51,'CLOSE',23,'Syntax:\nCLOSE cursor_name\n\nThis statement closes a previously opened cursor. For an example, see\nhttp://dev.mysql.com/doc/refman/5.5/en/cursors.html.\n\nAn error occurs if the cursor is not open.\n\nIf not closed explicitly, a cursor is closed at the end of the BEGIN\n... END block in which it was declared.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/close.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/close.html'),(52,'STOP SLAVE',8,'Syntax:\nSTOP SLAVE [thread_types]\n\nthread_types:\n    [thread_type [, thread_type] ... ]\n\nthread_type: IO_THREAD | SQL_THREAD\n\nStops the slave threads. STOP SLAVE requires the SUPER privilege.\nRecommended best practice is to execute STOP SLAVE on the slave before\nstopping the slave server (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-shutdown.html, for more\ninformation).\n\nWhen using the row-based logging format: You should execute STOP SLAVE\non the slave prior to shutting down the slave server if you are\nreplicating any tables that use a nontransactional storage engine (see\nthe Note later in this section). In MySQL 5.5.9 and later, you can also\nuse STOP SLAVE SQL_THREAD for this purpose.\n\nLike START SLAVE, this statement may be used with the IO_THREAD and\nSQL_THREAD options to name the thread or threads to be stopped.\n\n*Note*: In MySQL 5.5, STOP SLAVE waits until the current replication\nevent group affecting one or more non-transactional tables has finished\nexecuting (if there is any such replication group), or until the user\nissues a KILL QUERY or KILL CONNECTION statement. (Bug #319, Bug\n#38205)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/stop-slave.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/stop-slave.html'),(53,'TIMEDIFF',31,'Syntax:\nTIMEDIFF(expr1,expr2)\n\nTIMEDIFF() returns expr1 - expr2 expressed as a time value. expr1 and\nexpr2 are time or date-and-time expressions, but both must be of the\nsame type.\n\nThe result returned by TIMEDIFF() is limited to the range allowed for\nTIME values. Alternatively, you can use either of the functions\nTIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIMEDIFF(\'2000:01:01 00:00:00\',\n    ->                 \'2000:01:01 00:00:00.000001\');\n        -> \'-00:00:00.000001\'\nmysql> SELECT TIMEDIFF(\'2008-12-31 23:59:59.000001\',\n    ->                 \'2008-12-30 01:01:01.000002\');\n        -> \'46:58:57.999999\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(54,'REPLACE FUNCTION',37,'Syntax:\nREPLACE(str,from_str,to_str)\n\nReturns the string str with all occurrences of the string from_str\nreplaced by the string to_str. REPLACE() performs a case-sensitive\nmatch when searching for from_str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT REPLACE(\'www.mysql.com\', \'w\', \'Ww\');\n        -> \'WwWwWw.mysql.com\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(55,'USE',28,'Syntax:\nUSE db_name\n\nThe USE db_name statement tells MySQL to use the db_name database as\nthe default (current) database for subsequent statements. The database\nremains the default until the end of the session or another USE\nstatement is issued:\n\nUSE db1;\nSELECT COUNT(*) FROM mytable;   # selects from db1.mytable\nUSE db2;\nSELECT COUNT(*) FROM mytable;   # selects from db2.mytable\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/use.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/use.html'),(56,'LINEFROMTEXT',3,'LineFromText(wkt[,srid]), LineStringFromText(wkt[,srid])\n\nConstructs a LINESTRING value using its WKT representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(57,'CASE OPERATOR',7,'Syntax:\nCASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN\nresult ...] [ELSE result] END\n\nCASE WHEN [condition] THEN result [WHEN [condition] THEN result ...]\n[ELSE result] END\n\nThe first version returns the result where value=compare_value. The\nsecond version returns the result for the first condition that is true.\nIf there was no matching result value, the result after ELSE is\nreturned, or NULL if there is no ELSE part.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html\n\n','mysql> SELECT CASE 1 WHEN 1 THEN \'one\'\n    ->     WHEN 2 THEN \'two\' ELSE \'more\' END;\n        -> \'one\'\nmysql> SELECT CASE WHEN 1>0 THEN \'true\' ELSE \'false\' END;\n        -> \'true\'\nmysql> SELECT CASE BINARY \'B\'\n    ->     WHEN \'a\' THEN 1 WHEN \'b\' THEN 2 END;\n        -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html'),(58,'SHOW MASTER STATUS',26,'Syntax:\nSHOW MASTER STATUS\n\nThis statement provides status information about the binary log files\nof the master. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nExample:\n\nmysql> SHOW MASTER STATUS;\n+---------------+----------+--------------+------------------+\n| File          | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+---------------+----------+--------------+------------------+\n| mysql-bin.003 | 73       | test         | manual,mysql     |\n+---------------+----------+--------------+------------------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-master-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-master-status.html'),(59,'ADDTIME',31,'Syntax:\nADDTIME(expr1,expr2)\n\nADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time\nor datetime expression, and expr2 is a time expression.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT ADDTIME(\'2007-12-31 23:59:59.999999\', \'1 1:1:1.000002\');\n        -> \'2008-01-02 01:01:01.000001\'\nmysql> SELECT ADDTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n        -> \'03:00:01.999997\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(60,'SPATIAL',34,'For MyISAM tables, MySQL can create spatial indexes using syntax\nsimilar to that for creating regular indexes, but extended with the\nSPATIAL keyword. Currently, columns in spatial indexes must be declared\nNOT NULL. The following examples demonstrate how to create spatial\nindexes:\n\no With CREATE TABLE:\n\nCREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;\n\no With ALTER TABLE:\n\nALTER TABLE geom ADD SPATIAL INDEX(g);\n\no With CREATE INDEX:\n\nCREATE SPATIAL INDEX sp_index ON geom (g);\n\nFor MyISAM tables, SPATIAL INDEX creates an R-tree index. For storage\nengines that support nonspatial indexing of spatial columns, the engine\ncreates a B-tree index. A B-tree index on spatial values will be useful\nfor exact-value lookups, but not for range scans.\n\nFor more information on indexing spatial columns, see [HELP CREATE\nINDEX].\n\nTo drop spatial indexes, use ALTER TABLE or DROP INDEX:\n\no With ALTER TABLE:\n\nALTER TABLE geom DROP INDEX g;\n\no With DROP INDEX:\n\nDROP INDEX sp_index ON geom;\n\nExample: Suppose that a table geom contains more than 32,000\ngeometries, which are stored in the column g of type GEOMETRY. The\ntable also has an AUTO_INCREMENT column fid for storing object ID\nvalues.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-indexes.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-indexes.html'),(61,'TO_SECONDS',31,'Syntax:\nTO_SECONDS(expr)\n\nGiven a date or datetime expr, returns a the number of seconds since\nthe year 0. If expr is not a valid date or datetime value, returns\nNULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TO_SECONDS(950501);\n        -> 62966505600\nmysql> SELECT TO_SECONDS(\'2009-11-29\');\n        -> 63426672000\nmysql> SELECT TO_SECONDS(\'2009-11-29 13:43:32\');\n        -> 63426721412\nmysql> SELECT TO_SECONDS( NOW() );\n        -> 63426721458\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(62,'TIMESTAMPDIFF',31,'Syntax:\nTIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2)\n\nReturns datetime_expr2 - datetime_expr1, where datetime_expr1 and\ndatetime_expr2 are date or datetime expressions. One expression may be\na date and the other a datetime; a date value is treated as a datetime\nhaving the time part \'00:00:00\' where necessary. The unit for the\nresult (an integer) is given by the unit argument. The legal values for\nunit are the same as those listed in the description of the\nTIMESTAMPADD() function.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIMESTAMPDIFF(MONTH,\'2003-02-01\',\'2003-05-01\');\n        -> 3\nmysql> SELECT TIMESTAMPDIFF(YEAR,\'2002-05-01\',\'2001-01-01\');\n        -> -1\nmysql> SELECT TIMESTAMPDIFF(MINUTE,\'2003-02-01\',\'2003-05-01 12:05:55\');\n        -> 128885\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(63,'UPPER',37,'Syntax:\nUPPER(str)\n\nReturns the string str with all characters changed to uppercase\naccording to the current character set mapping. The default is latin1\n(cp1252 West European).\n\nmysql> SELECT UPPER(\'Hej\');\n        -> \'HEJ\'\n\nSee the description of LOWER() for information that also applies to\nUPPER(), such as information about how to perform lettercase conversion\nof binary strings (BINARY, VARBINARY, BLOB) for which these functions\nare ineffective.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(64,'FROM_UNIXTIME',31,'Syntax:\nFROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp,format)\n\nReturns a representation of the unix_timestamp argument as a value in\n\'YYYY-MM-DD HH:MM:SS\' or YYYYMMDDHHMMSS.uuuuuu format, depending on\nwhether the function is used in a string or numeric context. The value\nis expressed in the current time zone. unix_timestamp is an internal\ntimestamp value such as is produced by the UNIX_TIMESTAMP() function.\n\nIf format is given, the result is formatted according to the format\nstring, which is used the same way as listed in the entry for the\nDATE_FORMAT() function.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT FROM_UNIXTIME(1196440219);\n        -> \'2007-11-30 10:30:19\'\nmysql> SELECT FROM_UNIXTIME(1196440219) + 0;\n        -> 20071130103019.000000\nmysql> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),\n    ->                      \'%Y %D %M %h:%i:%s %x\');\n        -> \'2007 30th November 10:30:59 2007\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(65,'MEDIUMBLOB',22,'MEDIUMBLOB\n\nA BLOB column with a maximum length of 16,777,215 (224 - 1) bytes. Each\nMEDIUMBLOB value is stored using a 3-byte length prefix that indicates\nthe number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(66,'SHA2',12,'Syntax:\nSHA2(str, hash_length)\n\nCalculates the SHA-2 family of hash functions (SHA-224, SHA-256,\nSHA-384, and SHA-512). The first argument is the cleartext string to be\nhashed. The second argument indicates the desired bit length of the\nresult, which must have a value of 224, 256, 384, 512, or 0 (which is\nequivalent to 256). If either argument is NULL or the hash length is\nnot one of the permitted values, the return value is NULL. Otherwise,\nthe function result is a hash value containing the desired number of\nbits. See the notes at the beginning of this section about storing hash\nvalues efficiently.\n\nAs of MySQL 5.5.6, the return value is a nonbinary string in the\nconnection character set. Before 5.5.6, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT SHA2(\'abc\', 224);\n        -> \'23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7\'\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(67,'IFNULL',7,'Syntax:\nIFNULL(expr1,expr2)\n\nIf expr1 is not NULL, IFNULL() returns expr1; otherwise it returns\nexpr2. IFNULL() returns a numeric or string value, depending on the\ncontext in which it is used.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html\n\n','mysql> SELECT IFNULL(1,0);\n        -> 1\nmysql> SELECT IFNULL(NULL,10);\n        -> 10\nmysql> SELECT IFNULL(1/0,10);\n        -> 10\nmysql> SELECT IFNULL(1/0,\'yes\');\n        -> \'yes\'\n','http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html'),(68,'SHOW FUNCTION CODE',26,'Syntax:\nSHOW FUNCTION CODE func_name\n\nThis statement is similar to SHOW PROCEDURE CODE but for stored\nfunctions. See [HELP SHOW PROCEDURE CODE].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-function-code.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-function-code.html'),(69,'SHOW ERRORS',26,'Syntax:\nSHOW ERRORS [LIMIT [offset,] row_count]\nSHOW COUNT(*) ERRORS\n\nThis statement is similar to SHOW WARNINGS, except that it displays\ninformation only for errors, rather than for errors, warnings, and\nnotes.\n\nThe LIMIT clause has the same syntax as for the SELECT statement. See\nhttp://dev.mysql.com/doc/refman/5.5/en/select.html.\n\nThe SHOW COUNT(*) ERRORS statement displays the number of errors. You\ncan also retrieve this number from the error_count variable:\n\nSHOW COUNT(*) ERRORS;\nSELECT @@error_count;\n\nSHOW ERRORS and error_count apply only to errors, not warnings or\nnotes. In other respects, they are similar to SHOW WARNINGS and\nwarning_count. In particular, SHOW ERRORS cannot display information\nfor more than max_error_count messages, and error_count can exceed the\nvalue of max_error_count if the number of errors exceeds\nmax_error_count.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-errors.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-errors.html'),(70,'LEAST',18,'Syntax:\nLEAST(value1,value2,...)\n\nWith two or more arguments, returns the smallest (minimum-valued)\nargument. The arguments are compared using the following rules:\n\no If any argument is NULL, the result is NULL. No comparison is needed.\n\no If the return value is used in an INTEGER context or all arguments\n  are integer-valued, they are compared as integers.\n\no If the return value is used in a REAL context or all arguments are\n  real-valued, they are compared as reals.\n\no If the arguments comprise a mix of numbers and strings, they are\n  compared as numbers.\n\no If any argument is a nonbinary (character) string, the arguments are\n  compared as nonbinary strings.\n\no In all other cases, the arguments are compared as binary strings.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT LEAST(2,0);\n        -> 0\nmysql> SELECT LEAST(34.0,3.0,5.0,767.0);\n        -> 3.0\nmysql> SELECT LEAST(\'B\',\'A\',\'C\');\n        -> \'A\'\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(71,'=',18,'=\n\nEqual:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 = 0;\n        -> 0\nmysql> SELECT \'0\' = 0;\n        -> 1\nmysql> SELECT \'0.0\' = 0;\n        -> 1\nmysql> SELECT \'0.01\' = 0;\n        -> 0\nmysql> SELECT \'.01\' = 0.01;\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(72,'REVERSE',37,'Syntax:\nREVERSE(str)\n\nReturns the string str with the order of the characters reversed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT REVERSE(\'abc\');\n        -> \'cba\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(73,'ISNULL',18,'Syntax:\nISNULL(expr)\n\nIf expr is NULL, ISNULL() returns 1, otherwise it returns 0.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT ISNULL(1+1);\n        -> 0\nmysql> SELECT ISNULL(1/0);\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(74,'BINARY',22,'BINARY(M)\n\nThe BINARY type is similar to the CHAR type, but stores binary byte\nstrings rather than nonbinary character strings. M represents the\ncolumn length in bytes.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(75,'BLOB DATA TYPE',22,'A BLOB is a binary large object that can hold a variable amount of\ndata. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB.\nThese differ only in the maximum length of the values they can hold.\nThe four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These\ncorrespond to the four BLOB types and have the same maximum lengths and\nstorage requirements. See\nhttp://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/blob.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/blob.html'),(76,'BOUNDARY',36,'Boundary(g)\n\nReturns a geometry that is the closure of the combinatorial boundary of\nthe geometry value g.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(77,'CREATE USER',10,'Syntax:\nCREATE USER user_specification\n    [, user_specification] ...\n\nuser_specification:\n    user\n    [\n        IDENTIFIED BY [PASSWORD] \'password\'\n      | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n    ]\n\nThe CREATE USER statement creates new MySQL accounts. To use it, you\nmust have the global CREATE USER privilege or the INSERT privilege for\nthe mysql database. For each account, CREATE USER creates a new row in\nthe mysql.user table and assigns the account no privileges. An error\noccurs if the account already exists.\n\nEach account name uses the format described in\nhttp://dev.mysql.com/doc/refman/5.5/en/account-names.html. For example:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nThe user specification may indicate how the user should authenticate\nwhen connecting to the server:\n\no To enable the user to connect with no password (which is insecure),\n  include no IDENTIFIED BY clause:\n\nCREATE USER \'jeffrey\'@\'localhost\';\n\n  In this case, the account uses built-in authentication and clients\n  must provide no password.\n\no To assign a password, use IDENTIFIED BY with the literal plaintext\n  password value:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\n\n  The account uses built-in authentication and clients must match the\n  given password.\n\no To avoid specifying the plaintext password if you know its hash value\n  (the value that PASSWORD() would return for the password), specify\n  the hash value preceded by the keyword PASSWORD:\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED BY PASSWORD \'*90E462C37378CED12064BB3388827D2BA3A9B689\';\n\n  The account uses built-in authentication and clients must match the\n  given password.\n\no To authenticate the account using a specific authentication plugin,\n  use IDENTIFIED WITH, where auth_plugin is the plugin name. It can be\n  an unquoted name or a quoted string literal. \'auth_string\' is an\n  optional quoted string literal to pass to the plugin. The plugin\n  interprets the meaning of the string, so its format is plugin\n  specific. Consult the documentation for a given plugin for\n  information about the authentication string values it accepts.\n\nCREATE USER \'jeffrey\'@\'localhost\'\nIDENTIFIED WITH my_auth_plugin;\n\n  For connections that use this account, the server invokes the named\n  plugin and clients must provide credentials as required for the\n  authentication method that the plugin implements. If the server\n  cannot find the plugin, either at account-creation time or connect\n  time, an error occurs. IDENTIFIED WITH can be used as of MySQL 5.5.7.\n\nThe IDENTIFIED BY and IDENTIFIED WITH clauses are mutually exclusive,\nso at most one of them can be specified for a given user.\n\nFor additional information about setting passwords, see\nhttp://dev.mysql.com/doc/refman/5.5/en/assigning-passwords.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-user.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-user.html'),(78,'POINT',24,'Point(x,y)\n\nConstructs a Point using its coordinates.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(79,'CURRENT_USER',17,'Syntax:\nCURRENT_USER, CURRENT_USER()\n\nReturns the user name and host name combination for the MySQL account\nthat the server used to authenticate the current client. This account\ndetermines your access privileges. The return value is a string in the\nutf8 character set.\n\nThe value of CURRENT_USER() can differ from the value of USER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT USER();\n        -> \'davida@localhost\'\nmysql> SELECT * FROM mysql.user;\nERROR 1044: Access denied for user \'\'@\'localhost\' to\ndatabase \'mysql\'\nmysql> SELECT CURRENT_USER();\n        -> \'@localhost\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(80,'LCASE',37,'Syntax:\nLCASE(str)\n\nLCASE() is a synonym for LOWER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(81,'<=',18,'Syntax:\n<=\n\nLess than or equal:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 0.1 <= 2;\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(82,'SHOW PROFILES',26,'Syntax:\nSHOW PROFILES\n\nThe SHOW PROFILES statement, together with SHOW PROFILE, displays\nprofiling information that indicates resource usage for statements\nexecuted during the course of the current session. For more\ninformation, see [HELP SHOW PROFILE].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-profiles.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-profiles.html'),(83,'UPDATE',27,'Syntax:\nSingle-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_reference\n    SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n    [WHERE where_condition]\n    [ORDER BY ...]\n    [LIMIT row_count]\n\nMultiple-table syntax:\n\nUPDATE [LOW_PRIORITY] [IGNORE] table_references\n    SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...\n    [WHERE where_condition]\n\nFor the single-table syntax, the UPDATE statement updates columns of\nexisting rows in the named table with new values. The SET clause\nindicates which columns to modify and the values they should be given.\nEach value can be given as an expression, or the keyword DEFAULT to set\na column explicitly to its default value. The WHERE clause, if given,\nspecifies the conditions that identify which rows to update. With no\nWHERE clause, all rows are updated. If the ORDER BY clause is\nspecified, the rows are updated in the order that is specified. The\nLIMIT clause places a limit on the number of rows that can be updated.\n\nFor the multiple-table syntax, UPDATE updates rows in each table named\nin table_references that satisfy the conditions. In this case, ORDER BY\nand LIMIT cannot be used.\n\nwhere_condition is an expression that evaluates to true for each row to\nbe updated. For expression syntax, see\nhttp://dev.mysql.com/doc/refman/5.5/en/expressions.html.\n\ntable_references and where_condition are is specified as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/select.html.\n\nYou need the UPDATE privilege only for columns referenced in an UPDATE\nthat are actually updated. You need only the SELECT privilege for any\ncolumns that are read but not modified.\n\nThe UPDATE statement supports the following modifiers:\n\no With the LOW_PRIORITY keyword, execution of the UPDATE is delayed\n  until no other clients are reading from the table. This affects only\n  storage engines that use only table-level locking (such as MyISAM,\n  MEMORY, and MERGE).\n\no With the IGNORE keyword, the update statement does not abort even if\n  errors occur during the update. Rows for which duplicate-key\n  conflicts occur are not updated. Rows for which columns are updated\n  to values that would cause data conversion errors are updated to the\n  closest valid values instead.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/update.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/update.html'),(84,'IS NOT NULL',18,'Syntax:\nIS NOT NULL\n\nTests whether a value is not NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;\n        -> 1, 1, 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(85,'CASE STATEMENT',23,'Syntax:\nCASE case_value\n    WHEN when_value THEN statement_list\n    [WHEN when_value THEN statement_list] ...\n    [ELSE statement_list]\nEND CASE\n\nOr:\n\nCASE\n    WHEN search_condition THEN statement_list\n    [WHEN search_condition THEN statement_list] ...\n    [ELSE statement_list]\nEND CASE\n\nThe CASE statement for stored programs implements a complex conditional\nconstruct.\n\n*Note*: There is also a CASE expression, which differs from the CASE\nstatement described here. See\nhttp://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html. The\nCASE statement cannot have an ELSE NULL clause, and it is terminated\nwith END CASE instead of END.\n\nFor the first syntax, case_value is an expression. This value is\ncompared to the when_value expression in each WHEN clause until one of\nthem is equal. When an equal when_value is found, the corresponding\nTHEN clause statement_list executes. If no when_value is equal, the\nELSE clause statement_list executes, if there is one.\n\nThis syntax cannot be used to test for equality with NULL because NULL\n= NULL is false. See\nhttp://dev.mysql.com/doc/refman/5.5/en/working-with-null.html.\n\nFor the second syntax, each WHEN clause search_condition expression is\nevaluated until one is true, at which point its corresponding THEN\nclause statement_list executes. If no search_condition is equal, the\nELSE clause statement_list executes, if there is one.\n\nIf no when_value or search_condition matches the value tested and the\nCASE statement contains no ELSE clause, a Case not found for CASE\nstatement error results.\n\nEach statement_list consists of one or more SQL statements; an empty\nstatement_list is not permitted.\n\nTo handle situations where no value is matched by any WHEN clause, use\nan ELSE containing an empty BEGIN ... END block, as shown in this\nexample. (The indentation used here in the ELSE clause is for purposes\nof clarity only, and is not otherwise significant.)\n\nDELIMITER |\n\nCREATE PROCEDURE p()\n  BEGIN\n    DECLARE v INT DEFAULT 1;\n\n    CASE v\n      WHEN 2 THEN SELECT v;\n      WHEN 3 THEN SELECT 0;\n      ELSE\n        BEGIN\n        END;\n    END CASE;\n  END;\n  |\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/case.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/case.html'),(86,'EXECUTE STATEMENT',8,'Syntax:\nEXECUTE stmt_name\n    [USING @var_name [, @var_name] ...]\n\nAfter preparing a statement with PREPARE, you execute it with an\nEXECUTE statement that refers to the prepared statement name. If the\nprepared statement contains any parameter markers, you must supply a\nUSING clause that lists user variables containing the values to be\nbound to the parameters. Parameter values can be supplied only by user\nvariables, and the USING clause must name exactly as many variables as\nthe number of parameter markers in the statement.\n\nYou can execute a given prepared statement multiple times, passing\ndifferent variables to it or setting the variables to different values\nbefore each execution.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/execute.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/execute.html'),(87,'DROP INDEX',39,'Syntax:\nDROP [ONLINE|OFFLINE] INDEX index_name ON tbl_name\n\nDROP INDEX drops the index named index_name from the table tbl_name.\nThis statement is mapped to an ALTER TABLE statement to drop the index.\nSee [HELP ALTER TABLE].\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-index.html'),(88,'MATCH AGAINST',37,'Syntax:\nMATCH (col1,col2,...) AGAINST (expr [search_modifier])\n\nMySQL has support for full-text indexing and searching:\n\no A full-text index in MySQL is an index of type FULLTEXT.\n\no Full-text indexes can be used only with MyISAM tables, and can be\n  created only for CHAR, VARCHAR, or TEXT columns.\n\no A FULLTEXT index definition can be given in the CREATE TABLE\n  statement when a table is created, or added later using ALTER TABLE\n  or CREATE INDEX.\n\no For large data sets, it is much faster to load your data into a table\n  that has no FULLTEXT index and then create the index after that, than\n  to load data into a table that has an existing FULLTEXT index.\n\nFull-text searching is performed using MATCH() ... AGAINST syntax.\nMATCH() takes a comma-separated list that names the columns to be\nsearched. AGAINST takes a string to search for, and an optional\nmodifier that indicates what type of search to perform. The search\nstring must be a literal string, not a variable or a column name. There\nare three types of full-text searches:\n\no A natural language search interprets the search string as a phrase in\n  natural human language (a phrase in free text). There are no special\n  operators. The stopword list applies. In addition, words that are\n  present in 50% or more of the rows are considered common and do not\n  match.\n\n  Full-text searches are natural language searches if the IN NATURAL\n  LANGUAGE MODE modifier is given or if no modifier is given. For more\n  information, see\n  http://dev.mysql.com/doc/refman/5.5/en/fulltext-natural-language.html\n  .\n\no A boolean search interprets the search string using the rules of a\n  special query language. The string contains the words to search for.\n  It can also contain operators that specify requirements such that a\n  word must be present or absent in matching rows, or that it should be\n  weighted higher or lower than usual. Common words such as \"some\" or\n  \"then\" are stopwords and do not match if present in the search\n  string. The IN BOOLEAN MODE modifier specifies a boolean search. For\n  more information, see\n  http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html.\n\no A query expansion search is a modification of a natural language\n  search. The search string is used to perform a natural language\n  search. Then words from the most relevant rows returned by the search\n  are added to the search string and the search is done again. The\n  query returns the rows from the second search. The IN NATURAL\n  LANGUAGE MODE WITH QUERY EXPANSION or WITH QUERY EXPANSION modifier\n  specifies a query expansion search. For more information, see\n  http://dev.mysql.com/doc/refman/5.5/en/fulltext-query-expansion.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html\n\n','mysql> SELECT id, body, MATCH (title,body) AGAINST\n    -> (\'Security implications of running MySQL as root\'\n    -> IN NATURAL LANGUAGE MODE) AS score\n    -> FROM articles WHERE MATCH (title,body) AGAINST\n    -> (\'Security implications of running MySQL as root\'\n    -> IN NATURAL LANGUAGE MODE);\n+----+-------------------------------------+-----------------+\n| id | body                                | score           |\n+----+-------------------------------------+-----------------+\n|  4 | 1. Never run mysqld as root. 2. ... | 1.5219271183014 |\n|  6 | When configured properly, MySQL ... | 1.3114095926285 |\n+----+-------------------------------------+-----------------+\n2 rows in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html'),(89,'CREATE EVENT',39,'Syntax:\nCREATE\n    [DEFINER = { user | CURRENT_USER }]\n    EVENT\n    [IF NOT EXISTS]\n    event_name\n    ON SCHEDULE schedule\n    [ON COMPLETION [NOT] PRESERVE]\n    [ENABLE | DISABLE | DISABLE ON SLAVE]\n    [COMMENT \'comment\']\n    DO event_body;\n\nschedule:\n    AT timestamp [+ INTERVAL interval] ...\n  | EVERY interval\n    [STARTS timestamp [+ INTERVAL interval] ...]\n    [ENDS timestamp [+ INTERVAL interval] ...]\n\ninterval:\n    quantity {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |\n              WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |\n              DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}\n\nThis statement creates and schedules a new event. The event will not\nrun unless the Event Scheduler is enabled. For information about\nchecking Event Scheduler status and enabling it if necessary, see\nhttp://dev.mysql.com/doc/refman/5.5/en/events-configuration.html.\n\nCREATE EVENT requires the EVENT privilege for the schema in which the\nevent is to be created. It might also require the SUPER privilege,\ndepending on the DEFINER value, as described later in this section.\n\nThe minimum requirements for a valid CREATE EVENT statement are as\nfollows:\n\no The keywords CREATE EVENT plus an event name, which uniquely\n  identifies the event in a database schema.\n\no An ON SCHEDULE clause, which determines when and how often the event\n  executes.\n\no A DO clause, which contains the SQL statement to be executed by an\n  event.\n\nThis is an example of a minimal CREATE EVENT statement:\n\nCREATE EVENT myevent\n    ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR\n    DO\n      UPDATE myschema.mytable SET mycol = mycol + 1;\n\nThe previous statement creates an event named myevent. This event\nexecutes once---one hour following its creation---by running an SQL\nstatement that increments the value of the myschema.mytable table\'s\nmycol column by 1.\n\nThe event_name must be a valid MySQL identifier with a maximum length\nof 64 characters. Event names are not case sensitive, so you cannot\nhave two events named myevent and MyEvent in the same schema. In\ngeneral, the rules governing event names are the same as those for\nnames of stored routines. See\nhttp://dev.mysql.com/doc/refman/5.5/en/identifiers.html.\n\nAn event is associated with a schema. If no schema is indicated as part\nof event_name, the default (current) schema is assumed. To create an\nevent in a specific schema, qualify the event name with a schema using\nschema_name.event_name syntax.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-event.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-event.html'),(90,'ABS',4,'Syntax:\nABS(X)\n\nReturns the absolute value of X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ABS(2);\n        -> 2\nmysql> SELECT ABS(-32);\n        -> 32\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(91,'POLYFROMWKB',32,'PolyFromWKB(wkb[,srid]), PolygonFromWKB(wkb[,srid])\n\nConstructs a POLYGON value using its WKB representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(92,'NOT LIKE',37,'Syntax:\nexpr NOT LIKE pat [ESCAPE \'escape_char\']\n\nThis is the same as NOT (expr LIKE pat [ESCAPE \'escape_char\']).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-comparison-functions.html'),(93,'SPACE',37,'Syntax:\nSPACE(N)\n\nReturns a string consisting of N space characters.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT SPACE(6);\n        -> \'      \'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(94,'MBR DEFINITION',6,'Its MBR (Minimum Bounding Rectangle), or Envelope. This is the bounding\ngeometry, formed by the minimum and maximum (X,Y) coordinates:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/gis-class-geometry.html\n\n','((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n','http://dev.mysql.com/doc/refman/5.5/en/gis-class-geometry.html'),(95,'GEOMETRYCOLLECTION',24,'GeometryCollection(g1,g2,...)\n\nConstructs a GeometryCollection.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(96,'MAX',16,'Syntax:\nMAX([DISTINCT] expr)\n\nReturns the maximum value of expr. MAX() may take a string argument; in\nsuch cases, it returns the maximum string value. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html. The DISTINCT\nkeyword can be used to find the maximum of the distinct values of expr,\nhowever, this produces the same result as omitting DISTINCT.\n\nMAX() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student_name, MIN(test_score), MAX(test_score)\n    ->        FROM student\n    ->        GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(97,'CREATE FUNCTION UDF',21,'Syntax:\nCREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL|DECIMAL}\n    SONAME shared_library_name\n\nA user-defined function (UDF) is a way to extend MySQL with a new\nfunction that works like a native (built-in) MySQL function such as\nABS() or CONCAT().\n\nfunction_name is the name that should be used in SQL statements to\ninvoke the function. The RETURNS clause indicates the type of the\nfunction\'s return value. DECIMAL is a legal value after RETURNS, but\ncurrently DECIMAL functions return string values and should be written\nlike STRING functions.\n\nshared_library_name is the basename of the shared object file that\ncontains the code that implements the function. The file must be\nlocated in the plugin directory. This directory is given by the value\nof the plugin_dir system variable. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/udf-compiling.html.\n\nTo create a function, you must have the INSERT privilege for the mysql\ndatabase. This is necessary because CREATE FUNCTION adds a row to the\nmysql.func system table that records the function\'s name, type, and\nshared library name. If you do not have this table, you should run the\nmysql_upgrade command to create it. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-upgrade.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-function-udf.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-function-udf.html'),(98,'*',4,'Syntax:\n*\n\nMultiplication:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 3*5;\n        -> 15\nmysql> SELECT 18014398509481984*18014398509481984.0;\n        -> 324518553658426726783156020576256.0\nmysql> SELECT 18014398509481984*18014398509481984;\n        -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(99,'TIMESTAMP',22,'TIMESTAMP\n\nA timestamp. The range is \'1970-01-01 00:00:01\' UTC to \'2038-01-19\n03:14:07\' UTC. TIMESTAMP values are stored as the number of seconds\nsince the epoch (\'1970-01-01 00:00:00\' UTC). A TIMESTAMP cannot\nrepresent the value \'1970-01-01 00:00:00\' because that is equivalent to\n0 seconds from the epoch and the value 0 is reserved for representing\n\'0000-00-00 00:00:00\', the \"zero\" TIMESTAMP value.\n\nUnless specified otherwise, the first TIMESTAMP column in a table is\ndefined to be automatically set to the date and time of the most recent\nmodification if not explicitly assigned a value. This makes TIMESTAMP\nuseful for recording the timestamp of an INSERT or UPDATE operation.\nYou can also set any TIMESTAMP column to the current date and time by\nassigning it a NULL value, unless it has been defined with the NULL\nattribute to permit NULL values. The automatic initialization and\nupdating to the current date and time can be specified using DEFAULT\nCURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, as described\nin\nhttp://dev.mysql.com/doc/refman/5.5/en/timestamp-initialization.html.\n\n*Note*: The TIMESTAMP format that was used prior to MySQL 4.1 is not\nsupported in MySQL 5.5; see MySQL 3.23, 4.0, 4.1 Reference Manual for\ninformation regarding the old format.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(100,'DES_DECRYPT',12,'Syntax:\nDES_DECRYPT(crypt_str[,key_str])\n\nDecrypts a string encrypted with DES_ENCRYPT(). If an error occurs,\nthis function returns NULL.\n\nThis function works only if MySQL has been configured with SSL support.\nSee http://dev.mysql.com/doc/refman/5.5/en/ssl-connections.html.\n\nIf no key_str argument is given, DES_DECRYPT() examines the first byte\nof the encrypted string to determine the DES key number that was used\nto encrypt the original string, and then reads the key from the DES key\nfile to decrypt the message. For this to work, the user must have the\nSUPER privilege. The key file can be specified with the --des-key-file\nserver option.\n\nIf you pass this function a key_str argument, that string is used as\nthe key for decrypting the message.\n\nIf the crypt_str argument does not appear to be an encrypted string,\nMySQL returns the given crypt_str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(101,'CACHE INDEX',26,'Syntax:\nCACHE INDEX\n  tbl_index_list [, tbl_index_list] ...\n  [PARTITION (partition_list | ALL)]\n  IN key_cache_name\n\ntbl_index_list:\n  tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]\n\npartition_list:\n  partition_name[, partition_name][, ...]\n\nThe CACHE INDEX statement assigns table indexes to a specific key\ncache. It is used only for MyISAM tables. After the indexes have been\nassigned, they can be preloaded into the cache if desired with LOAD\nINDEX INTO CACHE.\n\nThe following statement assigns indexes from the tables t1, t2, and t3\nto the key cache named hot_cache:\n\nmysql> CACHE INDEX t1, t2, t3 IN hot_cache;\n+---------+--------------------+----------+----------+\n| Table   | Op                 | Msg_type | Msg_text |\n+---------+--------------------+----------+----------+\n| test.t1 | assign_to_keycache | status   | OK       |\n| test.t2 | assign_to_keycache | status   | OK       |\n| test.t3 | assign_to_keycache | status   | OK       |\n+---------+--------------------+----------+----------+\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/cache-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/cache-index.html'),(102,'ENDPOINT',13,'EndPoint(ls)\n\nReturns the Point that is the endpoint of the LineString value ls.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(EndPoint(GeomFromText(@ls)));\n+-------------------------------------+\n| AsText(EndPoint(GeomFromText(@ls))) |\n+-------------------------------------+\n| POINT(3 3)                          |\n+-------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(103,'COMPRESS',12,'Syntax:\nCOMPRESS(string_to_compress)\n\nCompresses a string and returns the result as a binary string. This\nfunction requires MySQL to have been compiled with a compression\nlibrary such as zlib. Otherwise, the return value is always NULL. The\ncompressed string can be uncompressed with UNCOMPRESS().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT LENGTH(COMPRESS(REPEAT(\'a\',1000)));\n        -> 21\nmysql> SELECT LENGTH(COMPRESS(\'\'));\n        -> 0\nmysql> SELECT LENGTH(COMPRESS(\'a\'));\n        -> 13\nmysql> SELECT LENGTH(COMPRESS(REPEAT(\'a\',16)));\n        -> 15\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(104,'INSERT',27,'Syntax:\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n    [INTO] tbl_name [(col_name,...)]\n    {VALUES | VALUE} ({expr | DEFAULT},...),(...),...\n    [ ON DUPLICATE KEY UPDATE\n      col_name=expr\n        [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]\n    [INTO] tbl_name\n    SET col_name={expr | DEFAULT}, ...\n    [ ON DUPLICATE KEY UPDATE\n      col_name=expr\n        [, col_name=expr] ... ]\n\nOr:\n\nINSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]\n    [INTO] tbl_name [(col_name,...)]\n    SELECT ...\n    [ ON DUPLICATE KEY UPDATE\n      col_name=expr\n        [, col_name=expr] ... ]\n\nINSERT inserts new rows into an existing table. The INSERT ... VALUES\nand INSERT ... SET forms of the statement insert rows based on\nexplicitly specified values. The INSERT ... SELECT form inserts rows\nselected from another table or tables. INSERT ... SELECT is discussed\nfurther in [HELP INSERT SELECT].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/insert.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/insert.html'),(105,'COUNT',16,'Syntax:\nCOUNT(expr)\n\nReturns a count of the number of non-NULL values of expr in the rows\nretrieved by a SELECT statement. The result is a BIGINT value.\n\nCOUNT() returns 0 if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','mysql> SELECT student.student_name,COUNT(*)\n    ->        FROM student,course\n    ->        WHERE student.student_id=course.student_id\n    ->        GROUP BY student_name;\n','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(106,'HANDLER',27,'Syntax:\nHANDLER tbl_name OPEN [ [AS] alias]\n\nHANDLER tbl_name READ index_name { = | <= | >= | < | > } (value1,value2,...)\n    [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }\n    [ WHERE where_condition ] [LIMIT ... ]\nHANDLER tbl_name READ { FIRST | NEXT }\n    [ WHERE where_condition ] [LIMIT ... ]\n\nHANDLER tbl_name CLOSE\n\nThe HANDLER statement provides direct access to table storage engine\ninterfaces. It is available for MyISAM and InnoDB tables.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/handler.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/handler.html'),(107,'MLINEFROMTEXT',3,'MLineFromText(wkt[,srid]), MultiLineStringFromText(wkt[,srid])\n\nConstructs a MULTILINESTRING value using its WKT representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(108,'GEOMCOLLFROMWKB',32,'GeomCollFromWKB(wkb[,srid]), GeometryCollectionFromWKB(wkb[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKB representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(109,'HELP_DATE',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25\n','',''),(110,'RENAME TABLE',39,'Syntax:\nRENAME TABLE tbl_name TO new_tbl_name\n    [, tbl_name2 TO new_tbl_name2] ...\n\nThis statement renames one or more tables.\n\nThe rename operation is done atomically, which means that no other\nsession can access any of the tables while the rename is running. For\nexample, if you have an existing table old_table, you can create\nanother table new_table that has the same structure but is empty, and\nthen replace the existing table with the empty one as follows (assuming\nthat backup_table does not already exist):\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/rename-table.html\n\n','CREATE TABLE new_table (...);\nRENAME TABLE old_table TO backup_table, new_table TO old_table;\n','http://dev.mysql.com/doc/refman/5.5/en/rename-table.html'),(111,'BOOLEAN',22,'BOOL, BOOLEAN\n\nThese types are synonyms for TINYINT(1). A value of zero is considered\nfalse. Nonzero values are considered true:\n\nmysql> SELECT IF(0, \'true\', \'false\');\n+------------------------+\n| IF(0, \'true\', \'false\') |\n+------------------------+\n| false                  |\n+------------------------+\n\nmysql> SELECT IF(1, \'true\', \'false\');\n+------------------------+\n| IF(1, \'true\', \'false\') |\n+------------------------+\n| true                   |\n+------------------------+\n\nmysql> SELECT IF(2, \'true\', \'false\');\n+------------------------+\n| IF(2, \'true\', \'false\') |\n+------------------------+\n| true                   |\n+------------------------+\n\nHowever, the values TRUE and FALSE are merely aliases for 1 and 0,\nrespectively, as shown here:\n\nmysql> SELECT IF(0 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(0 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| true                           |\n+--------------------------------+\n\nmysql> SELECT IF(1 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(1 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| true                          |\n+-------------------------------+\n\nmysql> SELECT IF(2 = TRUE, \'true\', \'false\');\n+-------------------------------+\n| IF(2 = TRUE, \'true\', \'false\') |\n+-------------------------------+\n| false                         |\n+-------------------------------+\n\nmysql> SELECT IF(2 = FALSE, \'true\', \'false\');\n+--------------------------------+\n| IF(2 = FALSE, \'true\', \'false\') |\n+--------------------------------+\n| false                          |\n+--------------------------------+\n\nThe last two statements display the results shown because 2 is equal to\nneither 1 nor 0.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(112,'DEFAULT',14,'Syntax:\nDEFAULT(col_name)\n\nReturns the default value for a table column. An error results if the\ncolumn has no default value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(113,'MOD',4,'Syntax:\nMOD(N,M), N % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT MOD(234, 10);\n        -> 4\nmysql> SELECT 253 % 7;\n        -> 1\nmysql> SELECT MOD(29,9);\n        -> 2\nmysql> SELECT 29 MOD 9;\n        -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(114,'TINYTEXT',22,'TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 255 (28 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TINYTEXT value is stored using a 1-byte length prefix\nthat indicates the number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(115,'OPTIMIZE TABLE',20,'Syntax:\nOPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n    tbl_name [, tbl_name] ...\n\nOPTIMIZE TABLE should be used if you have deleted a large part of a\ntable or if you have made many changes to a table with variable-length\nrows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns).\nDeleted rows are maintained in a linked list and subsequent INSERT\noperations reuse old row positions. You can use OPTIMIZE TABLE to\nreclaim the unused space and to defragment the data file. After\nextensive changes to a table, this statement may also improve\nperformance of statements that use the table, sometimes significantly.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nOPTIMIZE TABLE is supported for partitioned tables, and you can use\nALTER TABLE ... OPTIMIZE PARTITION to optimize one or more partitions;\nfor more information, see [HELP ALTER TABLE], and\nhttp://dev.mysql.com/doc/refman/5.5/en/partitioning-maintenance.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/optimize-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/optimize-table.html'),(116,'DECODE',12,'Syntax:\nDECODE(crypt_str,pass_str)\n\nDecrypts the encrypted string crypt_str using pass_str as the password.\ncrypt_str should be a string returned from ENCODE().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(117,'<=>',18,'Syntax:\n<=>\n\nNULL-safe equal. This operator performs an equality comparison like the\n= operator, but returns 1 rather than NULL if both operands are NULL,\nand 0 rather than NULL if one operand is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;\n        -> 1, 1, 0\nmysql> SELECT 1 = 1, NULL = NULL, 1 = NULL;\n        -> 1, NULL, NULL\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(118,'HELP STATEMENT',28,'Syntax:\nHELP \'search_string\'\n\nThe HELP statement returns online information from the MySQL Reference\nmanual. Its proper operation requires that the help tables in the mysql\ndatabase be initialized with help topic information (see\nhttp://dev.mysql.com/doc/refman/5.5/en/server-side-help-support.html).\n\nThe HELP statement searches the help tables for the given search string\nand displays the result of the search. The search string is not case\nsensitive.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/help.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/help.html'),(119,'RESET',26,'Syntax:\nRESET reset_option [, reset_option] ...\n\nThe RESET statement is used to clear the state of various server\noperations. You must have the RELOAD privilege to execute RESET.\n\nRESET acts as a stronger version of the FLUSH statement. See [HELP\nFLUSH].\n\nThe RESET statement causes an implicit commit. See\nhttp://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/reset.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/reset.html'),(120,'GET_LOCK',14,'Syntax:\nGET_LOCK(str,timeout)\n\nTries to obtain a lock with a name given by the string str, using a\ntimeout of timeout seconds. Returns 1 if the lock was obtained\nsuccessfully, 0 if the attempt timed out (for example, because another\nclient has previously locked the name), or NULL if an error occurred\n(such as running out of memory or the thread was killed with mysqladmin\nkill). If you have a lock obtained with GET_LOCK(), it is released when\nyou execute RELEASE_LOCK(), execute a new GET_LOCK(), or your\nconnection terminates (either normally or abnormally). Locks obtained\nwith GET_LOCK() do not interact with transactions. That is, committing\na transaction does not release any such locks obtained during the\ntransaction.\n\nThis function can be used to implement application locks or to simulate\nrecord locks. Names are locked on a server-wide basis. If a name has\nbeen locked by one client, GET_LOCK() blocks any request by another\nclient for a lock with the same name. This enables clients that agree\non a given lock name to use the name to perform cooperative advisory\nlocking. But be aware that it also enables a client that is not among\nthe set of cooperating clients to lock a name, either inadvertently or\ndeliberately, and thus prevent any of the cooperating clients from\nlocking that name. One way to reduce the likelihood of this is to use\nlock names that are database-specific or application-specific. For\nexample, use lock names of the form db_name.str or app_name.str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT GET_LOCK(\'lock1\',10);\n        -> 1\nmysql> SELECT IS_FREE_LOCK(\'lock2\');\n        -> 1\nmysql> SELECT GET_LOCK(\'lock2\',10);\n        -> 1\nmysql> SELECT RELEASE_LOCK(\'lock2\');\n        -> 1\nmysql> SELECT RELEASE_LOCK(\'lock1\');\n        -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(121,'UCASE',37,'Syntax:\nUCASE(str)\n\nUCASE() is a synonym for UPPER().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(122,'SHOW BINLOG EVENTS',26,'Syntax:\nSHOW BINLOG EVENTS\n   [IN \'log_name\'] [FROM pos] [LIMIT [offset,] row_count]\n\nShows the events in the binary log. If you do not specify \'log_name\',\nthe first binary log is displayed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-binlog-events.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-binlog-events.html'),(123,'MPOLYFROMWKB',32,'MPolyFromWKB(wkb[,srid]), MultiPolygonFromWKB(wkb[,srid])\n\nConstructs a MULTIPOLYGON value using its WKB representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(124,'ITERATE',23,'Syntax:\nITERATE label\n\nITERATE can appear only within LOOP, REPEAT, and WHILE statements.\nITERATE means \"start the loop again.\"\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/iterate.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/iterate.html'),(125,'DO',27,'Syntax:\nDO expr [, expr] ...\n\nDO executes the expressions but does not return any results. In most\nrespects, DO is shorthand for SELECT expr, ..., but has the advantage\nthat it is slightly faster when you do not care about the result.\n\nDO is useful primarily with functions that have side effects, such as\nRELEASE_LOCK().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/do.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/do.html'),(126,'CURTIME',31,'Syntax:\nCURTIME()\n\nReturns the current time as a value in \'HH:MM:SS\' or HHMMSS.uuuuuu\nformat, depending on whether the function is used in a string or\nnumeric context. The value is expressed in the current time zone.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT CURTIME();\n        -> \'23:50:26\'\nmysql> SELECT CURTIME() + 0;\n        -> 235026.000000\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(127,'CHAR_LENGTH',37,'Syntax:\nCHAR_LENGTH(str)\n\nReturns the length of the string str, measured in characters. A\nmulti-byte character counts as a single character. This means that for\na string containing five 2-byte characters, LENGTH() returns 10,\nwhereas CHAR_LENGTH() returns 5.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(128,'BIGINT',22,'BIGINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA large integer. The signed range is -9223372036854775808 to\n9223372036854775807. The unsigned range is 0 to 18446744073709551615.\n\nSERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(129,'SET',26,'Syntax:\nSET variable_assignment [, variable_assignment] ...\n\nvariable_assignment:\n      user_var_name = expr\n    | [GLOBAL | SESSION] system_var_name = expr\n    | [@@global. | @@session. | @@]system_var_name = expr\n\nThe SET statement assigns values to different types of variables that\naffect the operation of the server or your client. Older versions of\nMySQL employed SET OPTION, but this syntax is deprecated in favor of\nSET without OPTION.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/set-statement.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/set-statement.html'),(130,'LOAD XML',27,'Syntax:\nLOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE \'file_name\'\n    [REPLACE | IGNORE]\n    INTO TABLE [db_name.]tbl_name\n    [CHARACTER SET charset_name]\n    [ROWS IDENTIFIED BY \'<tagname>\']\n    [IGNORE number {LINES | ROWS}]\n    [(column_or_user_var,...)]\n    [SET col_name = expr,...]\n\nThe LOAD XML statement reads data from an XML file into a table. The\nfile_name must be given as a literal string. The tagname in the\noptional ROWS IDENTIFIED BY clause must also be given as a literal\nstring, and must be surrounded by angle brackets (< and >).\n\nLOAD XML acts as the complement of running the mysql client in XML\noutput mode (that is, starting the client with the --xml option). To\nwrite data from a table to an XML file, use a command such as the\nfollowing one from the system shell:\n\nshell> mysql --xml -e \'SELECT * FROM mytable\' > file.xml\n\nTo read the file back into a table, use LOAD XML INFILE. By default,\nthe <row> element is considered to be the equivalent of a database\ntable row; this can be changed using the ROWS IDENTIFIED BY clause.\n\nThis statement supports three different XML formats:\n\no Column names as attributes and column values as attribute values:\n\n<row column1=\"value1\" column2=\"value2\" .../>\n\no Column names as tags and column values as the content of these tags:\n\n<row>\n  <column1>value1</column1>\n  <column2>value2</column2>\n</row>\n\no Column names are the name attributes of <field> tags, and values are\n  the contents of these tags:\n\n<row>\n  <field name=\'column1\'>value1</field>\n  <field name=\'column2\'>value2</field>\n</row>\n\n  This is the format used by other MySQL tools, such as mysqldump.\n\nAll 3 formats can be used in the same XML file; the import routine\nautomatically detects the format for each row and interprets it\ncorrectly. Tags are matched based on the tag or attribute name and the\ncolumn name.\n\nThe following clauses work essentially the same way for LOAD XML as\nthey do for LOAD DATA:\n\no LOW_PRIORITY or CONCURRENT\n\no LOCAL\n\no REPLACE or IGNORE\n\no CHARACTER SET\n\no (column_or_user_var,...)\n\no SET\n\nSee [HELP LOAD DATA], for more information about these clauses.\n\nThe IGNORE number LINES or IGNORE number ROWS clause causes the first\nnumber rows in the XML file to be skipped. It is analogous to the LOAD\nDATA statement\'s IGNORE ... LINES clause.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/load-xml.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/load-xml.html'),(131,'CONV',4,'Syntax:\nCONV(N,from_base,to_base)\n\nConverts numbers between different number bases. Returns a string\nrepresentation of the number N, converted from base from_base to base\nto_base. Returns NULL if any argument is NULL. The argument N is\ninterpreted as an integer, but may be specified as an integer or a\nstring. The minimum base is 2 and the maximum base is 36. If to_base is\na negative number, N is regarded as a signed number. Otherwise, N is\ntreated as unsigned. CONV() works with 64-bit precision.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT CONV(\'a\',16,2);\n        -> \'1010\'\nmysql> SELECT CONV(\'6E\',18,8);\n        -> \'172\'\nmysql> SELECT CONV(-17,10,-18);\n        -> \'-H\'\nmysql> SELECT CONV(10+\'10\'+\'10\'+0xa,10,10);\n        -> \'40\'\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(132,'DATE',22,'DATE\n\nA date. The supported range is \'1000-01-01\' to \'9999-12-31\'. MySQL\ndisplays DATE values in \'YYYY-MM-DD\' format, but permits assignment of\nvalues to DATE columns using either strings or numbers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(133,'ASSIGN-VALUE',15,'Syntax:\n:=\n\nAssignment operator. Causes the user variable on the left hand side of\nthe operator to take on the value to its right. The value on the right\nhand side may be a literal value, another variable storing a value, or\nany legal expression that yields a scalar value, including the result\nof a query (provided that this value is a scalar value). You can\nperform multiple assignments in the same SET statement. You can perform\nmultiple assignments in the same statement-\n\nUnlike =, the := operator is never interpreted as a comparison\noperator. This means you can use := in any valid SQL statement (not\njust in SET statements) to assign a value to a variable.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html\n\n','mysql> SELECT @var1, @var2;\n        -> NULL, NULL\nmysql> SELECT @var1 := 1, @var2;\n        -> 1, NULL\nmysql> SELECT @var1, @var2;\n        -> 1, NULL\nmysql> SELECT @var1, @var2 := @var1;\n        -> 1, 1\nmysql> SELECT @var1, @var2;\n        -> 1, 1\n\nmysql> SELECT @var1:=COUNT(*) FROM t1;\n        -> 4\nmysql> SELECT @var1;\n        -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html'),(134,'SHOW OPEN TABLES',26,'Syntax:\nSHOW OPEN TABLES [{FROM | IN} db_name]\n    [LIKE \'pattern\' | WHERE expr]\n\nSHOW OPEN TABLES lists the non-TEMPORARY tables that are currently open\nin the table cache. See\nhttp://dev.mysql.com/doc/refman/5.5/en/table-cache.html. The FROM\nclause, if present, restricts the tables shown to those present in the\ndb_name database. The LIKE clause, if present, indicates which table\nnames to match. The WHERE clause can be given to select rows using more\ngeneral conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-open-tables.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-open-tables.html'),(135,'EXTRACT',31,'Syntax:\nEXTRACT(unit FROM date)\n\nThe EXTRACT() function uses the same kinds of unit specifiers as\nDATE_ADD() or DATE_SUB(), but extracts parts from the date rather than\nperforming date arithmetic.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT EXTRACT(YEAR FROM \'2009-07-02\');\n       -> 2009\nmysql> SELECT EXTRACT(YEAR_MONTH FROM \'2009-07-02 01:02:03\');\n       -> 200907\nmysql> SELECT EXTRACT(DAY_MINUTE FROM \'2009-07-02 01:02:03\');\n       -> 20102\nmysql> SELECT EXTRACT(MICROSECOND\n    ->                FROM \'2003-01-02 10:30:00.000123\');\n        -> 123\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(136,'ENCRYPT',12,'Syntax:\nENCRYPT(str[,salt])\n\nEncrypts str using the Unix crypt() system call and returns a binary\nstring. The salt argument must be a string with at least two characters\nor the result will be NULL. If no salt argument is given, a random\nvalue is used.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT ENCRYPT(\'hello\');\n        -> \'VxuFAJXVARROc\'\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(137,'SHOW STATUS',26,'Syntax:\nSHOW [GLOBAL | SESSION] STATUS\n    [LIKE \'pattern\' | WHERE expr]\n\nSHOW STATUS provides server status information. This information also\ncan be obtained using the mysqladmin extended-status command. The LIKE\nclause, if present, indicates which variable names to match. The WHERE\nclause can be given to select rows using more general conditions, as\ndiscussed in http://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\nThis statement does not require any privilege. It requires only the\nability to connect to the server.\nWith a LIKE clause, the statement displays only rows for those\nvariables with names that match the pattern:\n\nmysql> SHOW STATUS LIKE \'Key%\';\n+--------------------+----------+\n| Variable_name      | Value    |\n+--------------------+----------+\n| Key_blocks_used    | 14955    |\n| Key_read_requests  | 96854827 |\n| Key_reads          | 162040   |\n| Key_write_requests | 7589728  |\n| Key_writes         | 3813196  |\n+--------------------+----------+\n\nWith the GLOBAL modifier, SHOW STATUS displays the status values for\nall connections to MySQL. With SESSION, it displays the status values\nfor the current connection. If no modifier is present, the default is\nSESSION. LOCAL is a synonym for SESSION.\n\nSome status variables have only a global value. For these, you get the\nsame value for both GLOBAL and SESSION. The scope for each status\nvariable is listed at\nhttp://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html.\n\nEach invocation of the SHOW STATUS statement uses an internal temporary\ntable and increments the global Created_tmp_tables value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-status.html'),(138,'EXTRACTVALUE',37,'Syntax:\nExtractValue(xml_frag, xpath_expr)\n\nExtractValue() takes two string arguments, a fragment of XML markup\nxml_frag and an XPath expression xpath_expr (also known as a locator);\nit returns the text (CDATA) of the first text node which is a child of\nthe elements or elements matched by the XPath expression. In MySQL 5.5,\nthe XPath expression can contain at most 127 characters. (This\nlimitation is lifted in MySQL 5.6.)\n\nUsing this function is the equivalent of performing a match using the\nxpath_expr after appending /text(). In other words,\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b\') and\nExtractValue(\'<a><b>Sakila</b></a>\', \'/a/b/text()\') produce the same\nresult.\n\nIf multiple matches are found, the content of the first child text node\nof each matching element is returned (in the order matched) as a\nsingle, space-delimited string.\n\nIf no matching text node is found for the expression (including the\nimplicit /text())---for whatever reason, as long as xpath_expr is\nvalid, and xml_frag consists of elements which are properly nested and\nclosed---an empty string is returned. No distinction is made between a\nmatch on an empty element and no match at all. This is by design.\n\nIf you need to determine whether no matching element was found in\nxml_frag or such an element was found but contained no child text\nnodes, you should test the result of an expression that uses the XPath\ncount() function. For example, both of these statements return an empty\nstring, as shown here:\n\nmysql> SELECT ExtractValue(\'<a><b/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'/a/b\') |\n+-------------------------------------+\n|                                     |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nmysql> SELECT ExtractValue(\'<a><c/></a>\', \'/a/b\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'/a/b\') |\n+-------------------------------------+\n|                                     |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nHowever, you can determine whether there was actually a matching\nelement using the following:\n\nmysql> SELECT ExtractValue(\'<a><b/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><b/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 1                                   |\n+-------------------------------------+\n1 row in set (0.00 sec)\n\nmysql> SELECT ExtractValue(\'<a><c/></a>\', \'count(/a/b)\');\n+-------------------------------------+\n| ExtractValue(\'<a><c/></a>\', \'count(/a/b)\') |\n+-------------------------------------+\n| 0                                   |\n+-------------------------------------+\n1 row in set (0.01 sec)\n\n*Important*: ExtractValue() returns only CDATA, and does not return any\ntags that might be contained within a matching tag, nor any of their\ncontent (see the result returned as val1 in the following example).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html\n\n','mysql> SELECT\n    ->   ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a\') AS val1,\n    ->   ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/a/b\') AS val2,\n    ->   ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'//b\') AS val3,\n    ->   ExtractValue(\'<a>ccc<b>ddd</b></a>\', \'/b\') AS val4,\n    ->   ExtractValue(\'<a>ccc<b>ddd</b><b>eee</b></a>\', \'//b\') AS val5;\n\n+------+------+------+------+---------+\n| val1 | val2 | val3 | val4 | val5    |\n+------+------+------+------+---------+\n| ccc  | ddd  | ddd  |      | ddd eee |\n+------+------+------+------+---------+\n','http://dev.mysql.com/doc/refman/5.5/en/xml-functions.html'),(139,'OLD_PASSWORD',12,'Syntax:\nOLD_PASSWORD(str)\n\nOLD_PASSWORD() was added when the implementation of PASSWORD() was\nchanged in MySQL 4.1 to improve security. OLD_PASSWORD() returns the\nvalue of the pre-4.1 implementation of PASSWORD() as a string, and is\nintended to permit you to reset passwords for any pre-4.1 clients that\nneed to connect to your version 5.5 MySQL server without locking them\nout. See http://dev.mysql.com/doc/refman/5.5/en/password-hashing.html.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(140,'FORMAT',37,'Syntax:\nFORMAT(X,D[,locale])\n\nFormats the number X to a format like \'#,###,###.##\', rounded to D\ndecimal places, and returns the result as a string. If D is 0, the\nresult has no decimal point or fractional part.\n\nThe optional third parameter enables a locale to be specified to be\nused for the result number\'s decimal point, thousands separator, and\ngrouping between separators. Permissible locale values are the same as\nthe legal values for the lc_time_names system variable (see\nhttp://dev.mysql.com/doc/refman/5.5/en/locale-support.html). If no\nlocale is specified, the default is \'en_US\'.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT FORMAT(12332.123456, 4);\n        -> \'12,332.1235\'\nmysql> SELECT FORMAT(12332.1,4);\n        -> \'12,332.1000\'\nmysql> SELECT FORMAT(12332.2,0);\n        -> \'12,332\'\nmysql> SELECT FORMAT(12332.2,2,\'de_DE\');\n        -> \'12.332,20\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(141,'||',15,'Syntax:\nOR, ||\n\nLogical OR. When both operands are non-NULL, the result is 1 if any\noperand is nonzero, and 0 otherwise. With a NULL operand, the result is\n1 if the other operand is nonzero, and NULL otherwise. If both operands\nare NULL, the result is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html\n\n','mysql> SELECT 1 || 1;\n        -> 1\nmysql> SELECT 1 || 0;\n        -> 1\nmysql> SELECT 0 || 0;\n        -> 0\nmysql> SELECT 0 || NULL;\n        -> NULL\nmysql> SELECT 1 || NULL;\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html'),(142,'BIT_LENGTH',37,'Syntax:\nBIT_LENGTH(str)\n\nReturns the length of the string str in bits.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT BIT_LENGTH(\'text\');\n        -> 32\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(143,'EXTERIORRING',2,'ExteriorRing(poly)\n\nReturns the exterior ring of the Polygon value poly as a LineString.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions\n\n','mysql> SET @poly =\n    -> \'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))\';\nmysql> SELECT AsText(ExteriorRing(GeomFromText(@poly)));\n+-------------------------------------------+\n| AsText(ExteriorRing(GeomFromText(@poly))) |\n+-------------------------------------------+\n| LINESTRING(0 0,0 3,3 3,3 0,0 0)           |\n+-------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#polygon-property-functions'),(144,'GEOMFROMWKB',32,'GeomFromWKB(wkb[,srid]), GeometryFromWKB(wkb[,srid])\n\nConstructs a geometry value of any type using its WKB representation\nand SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(145,'SHOW SLAVE HOSTS',26,'Syntax:\nSHOW SLAVE HOSTS\n\nDisplays a list of replication slaves currently registered with the\nmaster. (Before MySQL 5.5.3, only slaves started with the\n--report-host=host_name option are visible in this list.)\n\nThe list is displayed on any server (not just the master server). The\noutput looks like this:\n\nmysql> SHOW SLAVE HOSTS;\n+------------+-----------+------+-----------+\n| Server_id  | Host      | Port | Master_id |\n+------------+-----------+------+-----------+\n|  192168010 | iconnect2 | 3306 | 192168011 |\n| 1921680101 | athena    | 3306 | 192168011 |\n+------------+-----------+------+-----------+\n\no Server_id: The unique server ID of the slave server, as configured in\n  the server\'s option file, or on the command line with\n  --server-id=value.\n\no Host: The host name of the slave server, as configured in the\n  server\'s option file, or on the command line with\n  --report-host=host_name. Note that this can differ from the machine\n  name as configured in the operating system.\n\no Port: The port the slave server is listening on.\n\n  In MySQL 5.5.23 and later, a zero in this column means that the slave\n  port (--report-port) was not set. Prior to MySQL 5.5.23, 3306 was\n  used as the default in such cases (Bug #13333431).\n\no Master_id: The unique server ID of the master server that the slave\n  server is replicating from.\n\nSome MySQL versions report another variable, Rpl_recovery_rank. This\nvariable was never used, and was removed in MySQL 5.5.3. (Bug #13963)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-slave-hosts.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-slave-hosts.html'),(146,'START TRANSACTION',8,'Syntax:\nSTART TRANSACTION [WITH CONSISTENT SNAPSHOT]\nBEGIN [WORK]\nCOMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]\nSET autocommit = {0 | 1}\n\nThese statements provide control over use of transactions:\n\no START TRANSACTION or BEGIN start a new transaction.\n\no COMMIT commits the current transaction, making its changes permanent.\n\no ROLLBACK rolls back the current transaction, canceling its changes.\n\no SET autocommit disables or enables the default autocommit mode for\n  the current session.\n\nBy default, MySQL runs with autocommit mode enabled. This means that as\nsoon as you execute a statement that updates (modifies) a table, MySQL\nstores the update on disk to make it permanent. The change cannot be\nrolled back.\n\nTo disable autocommit mode implicitly for a single series of\nstatements, use the START TRANSACTION statement:\n\nSTART TRANSACTION;\nSELECT @A:=SUM(salary) FROM table1 WHERE type=1;\nUPDATE table2 SET summary=@A WHERE type=1;\nCOMMIT;\n\nWith START TRANSACTION, autocommit remains disabled until you end the\ntransaction with COMMIT or ROLLBACK. The autocommit mode then reverts\nto its previous state.\n\nYou can also begin a transaction like this:\n\nSTART TRANSACTION WITH CONSISTENT SNAPSHOT;\n\nThe WITH CONSISTENT SNAPSHOT option starts a consistent read for\nstorage engines that are capable of it. This applies only to InnoDB.\nThe effect is the same as issuing a START TRANSACTION followed by a\nSELECT from any InnoDB table. See\nhttp://dev.mysql.com/doc/refman/5.5/en/innodb-consistent-read.html. The\nWITH CONSISTENT SNAPSHOT option does not change the current transaction\nisolation level, so it provides a consistent snapshot only if the\ncurrent isolation level is one that permits consistent read (REPEATABLE\nREAD or SERIALIZABLE).\n\n*Important*: Many APIs used for writing MySQL client applications (such\nas JDBC) provide their own methods for starting transactions that can\n(and sometimes should) be used instead of sending a START TRANSACTION\nstatement from the client. See\nhttp://dev.mysql.com/doc/refman/5.5/en/connectors-apis.html, or the\ndocumentation for your API, for more information.\n\nTo disable autocommit mode explicitly, use the following statement:\n\nSET autocommit=0;\n\nAfter disabling autocommit mode by setting the autocommit variable to\nzero, changes to transaction-safe tables (such as those for InnoDB or\nNDBCLUSTER) are not made permanent immediately. You must use COMMIT to\nstore your changes to disk or ROLLBACK to ignore the changes.\n\nautocommit is a session variable and must be set for each session. To\ndisable autocommit mode for each new connection, see the description of\nthe autocommit system variable at\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nBEGIN and BEGIN WORK are supported as aliases of START TRANSACTION for\ninitiating a transaction. START TRANSACTION is standard SQL syntax and\nis the recommended way to start an ad-hoc transaction.\n\nThe BEGIN statement differs from the use of the BEGIN keyword that\nstarts a BEGIN ... END compound statement. The latter does not begin a\ntransaction. See [HELP BEGIN END].\n\n*Note*: Within all stored programs (stored procedures and functions,\ntriggers, and events), the parser treats BEGIN [WORK] as the beginning\nof a BEGIN ... END block. Begin a transaction in this context with\nSTART TRANSACTION instead.\n\nThe optional WORK keyword is supported for COMMIT and ROLLBACK, as are\nthe CHAIN and RELEASE clauses. CHAIN and RELEASE can be used for\nadditional control over transaction completion. The value of the\ncompletion_type system variable determines the default completion\nbehavior. See\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nThe AND CHAIN clause causes a new transaction to begin as soon as the\ncurrent one ends, and the new transaction has the same isolation level\nas the just-terminated transaction. The RELEASE clause causes the\nserver to disconnect the current client session after terminating the\ncurrent transaction. Including the NO keyword suppresses CHAIN or\nRELEASE completion, which can be useful if the completion_type system\nvariable is set to cause chaining or release completion by default.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/commit.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/commit.html'),(147,'BETWEEN AND',18,'Syntax:\nexpr BETWEEN min AND max\n\nIf expr is greater than or equal to min and expr is less than or equal\nto max, BETWEEN returns 1, otherwise it returns 0. This is equivalent\nto the expression (min <= expr AND expr <= max) if all the arguments\nare of the same type. Otherwise type conversion takes place according\nto the rules described in\nhttp://dev.mysql.com/doc/refman/5.5/en/type-conversion.html, but\napplied to all the three arguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 BETWEEN 1 AND 3, 2 BETWEEN 3 and 1;\n        -> 1, 0\nmysql> SELECT 1 BETWEEN 2 AND 3;\n        -> 0\nmysql> SELECT \'b\' BETWEEN \'a\' AND \'c\';\n        -> 1\nmysql> SELECT 2 BETWEEN 2 AND \'3\';\n        -> 1\nmysql> SELECT 2 BETWEEN 2 AND \'x-3\';\n        -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(148,'MULTIPOLYGON',24,'MultiPolygon(poly1,poly2,...)\n\nConstructs a MultiPolygon value from a set of Polygon or WKB Polygon\narguments.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-mysql-specific-functions'),(149,'TIME_FORMAT',31,'Syntax:\nTIME_FORMAT(time,format)\n\nThis is used like the DATE_FORMAT() function, but the format string may\ncontain format specifiers only for hours, minutes, seconds, and\nmicroseconds. Other specifiers produce a NULL value or 0.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIME_FORMAT(\'100:00:00\', \'%H %k %h %I %l\');\n        -> \'100 100 04 04 4\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(150,'LEFT',37,'Syntax:\nLEFT(str,len)\n\nReturns the leftmost len characters from the string str, or NULL if any\nargument is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LEFT(\'foobarbar\', 5);\n        -> \'fooba\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(151,'FLUSH QUERY CACHE',26,'You can defragment the query cache to better utilize its memory with\nthe FLUSH QUERY CACHE statement. The statement does not remove any\nqueries from the cache.\n\nThe RESET QUERY CACHE statement removes all query results from the\nquery cache. The FLUSH TABLES statement also does this.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/query-cache-status-and-maintenance.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/query-cache-status-and-maintenance.html'),(152,'SET DATA TYPE',22,'SET(\'value1\',\'value2\',...) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA set. A string object that can have zero or more values, each of which\nmust be chosen from the list of values \'value1\', \'value2\', ... A SET\ncolumn can have a maximum of 64 members. SET values are represented\ninternally as integers.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(153,'RAND',4,'Syntax:\nRAND(), RAND(N)\n\nReturns a random floating-point value v in the range 0 <= v < 1.0. If a\nconstant integer argument N is specified, it is used as the seed value,\nwhich produces a repeatable sequence of column values. In the following\nexample, note that the sequences of values produced by RAND(3) is the\nsame both places where it occurs.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> CREATE TABLE t (i INT);\nQuery OK, 0 rows affected (0.42 sec)\n\nmysql> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3  Duplicates: 0  Warnings: 0\n\nmysql> SELECT i, RAND() FROM t;\n+------+------------------+\n| i    | RAND()           |\n+------+------------------+\n|    1 | 0.61914388706828 |\n|    2 | 0.93845168309142 |\n|    3 | 0.83482678498591 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nmysql> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i    | RAND(3)          |\n+------+------------------+\n|    1 | 0.90576975597606 |\n|    2 | 0.37307905813035 |\n|    3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nmysql> SELECT i, RAND() FROM t;\n+------+------------------+\n| i    | RAND()           |\n+------+------------------+\n|    1 | 0.35877890638893 |\n|    2 | 0.28941420772058 |\n|    3 | 0.37073435016976 |\n+------+------------------+\n3 rows in set (0.00 sec)\n\nmysql> SELECT i, RAND(3) FROM t;\n+------+------------------+\n| i    | RAND(3)          |\n+------+------------------+\n|    1 | 0.90576975597606 |\n|    2 | 0.37307905813035 |\n|    3 | 0.14808605345719 |\n+------+------------------+\n3 rows in set (0.01 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(154,'RPAD',37,'Syntax:\nRPAD(str,len,padstr)\n\nReturns the string str, right-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT RPAD(\'hi\',5,\'?\');\n        -> \'hi???\'\nmysql> SELECT RPAD(\'hi\',1,\'?\');\n        -> \'h\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(155,'CREATE DATABASE',39,'Syntax:\nCREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name\n    [create_specification] ...\n\ncreate_specification:\n    [DEFAULT] CHARACTER SET [=] charset_name\n  | [DEFAULT] COLLATE [=] collation_name\n\nCREATE DATABASE creates a database with the given name. To use this\nstatement, you need the CREATE privilege for the database. CREATE\nSCHEMA is a synonym for CREATE DATABASE.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-database.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-database.html'),(156,'DEC',22,'DEC[(M[,D])] [UNSIGNED] [ZEROFILL], NUMERIC[(M[,D])] [UNSIGNED]\n[ZEROFILL], FIXED[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nThese types are synonyms for DECIMAL. The FIXED synonym is available\nfor compatibility with other database systems.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(157,'VAR_POP',16,'Syntax:\nVAR_POP(expr)\n\nReturns the population standard variance of expr. It considers rows as\nthe whole population, not as a sample, so it has the number of rows as\nthe denominator. You can also use VARIANCE(), which is equivalent but\nis not standard SQL.\n\nVAR_POP() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(158,'ELT',37,'Syntax:\nELT(N,str1,str2,str3,...)\n\nReturns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is\nless than 1 or greater than the number of arguments. ELT() is the\ncomplement of FIELD().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT ELT(1, \'ej\', \'Heja\', \'hej\', \'foo\');\n        -> \'ej\'\nmysql> SELECT ELT(4, \'ej\', \'Heja\', \'hej\', \'foo\');\n        -> \'foo\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(159,'ALTER VIEW',39,'Syntax:\nALTER\n    [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]\n    [DEFINER = { user | CURRENT_USER }]\n    [SQL SECURITY { DEFINER | INVOKER }]\n    VIEW view_name [(column_list)]\n    AS select_statement\n    [WITH [CASCADED | LOCAL] CHECK OPTION]\n\nThis statement changes the definition of a view, which must exist. The\nsyntax is similar to that for CREATE VIEW and the effect is the same as\nfor CREATE OR REPLACE VIEW. See [HELP CREATE VIEW]. This statement\nrequires the CREATE VIEW and DROP privileges for the view, and some\nprivilege for each column referred to in the SELECT statement. ALTER\nVIEW is permitted only to the definer or users with the SUPER\nprivilege.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-view.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-view.html'),(160,'SHOW DATABASES',26,'Syntax:\nSHOW {DATABASES | SCHEMAS}\n    [LIKE \'pattern\' | WHERE expr]\n\nSHOW DATABASES lists the databases on the MySQL server host. SHOW\nSCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present,\nindicates which database names to match. The WHERE clause can be given\nto select rows using more general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nYou see only those databases for which you have some kind of privilege,\nunless you have the global SHOW DATABASES privilege. You can also get\nthis list using the mysqlshow command.\n\nIf the server was started with the --skip-show-database option, you\ncannot use this statement at all unless you have the SHOW DATABASES\nprivilege.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-databases.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-databases.html'),(161,'~',19,'Syntax:\n~\n\nInvert all bits.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 5 & ~1;\n        -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(162,'TEXT',22,'TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 65,535 (216 - 1) characters. The\neffective maximum length is less if the value contains multi-byte\ncharacters. Each TEXT value is stored using a 2-byte length prefix that\nindicates the number of bytes in the value.\n\nAn optional length M can be given for this type. If this is done, MySQL\ncreates the column as the smallest TEXT type large enough to hold\nvalues M characters long.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(163,'CONCAT_WS',37,'Syntax:\nCONCAT_WS(separator,str1,str2,...)\n\nCONCAT_WS() stands for Concatenate With Separator and is a special form\nof CONCAT(). The first argument is the separator for the rest of the\narguments. The separator is added between the strings to be\nconcatenated. The separator can be a string, as can the rest of the\narguments. If the separator is NULL, the result is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT CONCAT_WS(\',\',\'First name\',\'Second name\',\'Last Name\');\n        -> \'First name,Second name,Last Name\'\nmysql> SELECT CONCAT_WS(\',\',\'First name\',NULL,\'Last Name\');\n        -> \'First name,Last Name\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(164,'ROW_COUNT',17,'Syntax:\nROW_COUNT()\n\nBefore MySQL 5.5.5, ROW_COUNT() returns the number of rows changed,\ndeleted, or inserted by the last statement if it was an UPDATE, DELETE,\nor INSERT. For other statements, the value may not be meaningful.\n\nAs of MySQL 5.5.5, ROW_COUNT() returns a value as follows:\n\no DDL statements: 0. This applies to statements such as CREATE TABLE or\n  DROP TABLE.\n\no DML statements other than SELECT: The number of affected rows. This\n  applies to statements such as UPDATE, INSERT, or DELETE (as before),\n  but now also to statements such as ALTER TABLE and LOAD DATA INFILE.\n\no SELECT: -1 if the statement returns a result set, or the number of\n  rows \"affected\" if it does not. For example, for SELECT * FROM t1,\n  ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE\n  \'file_name\', ROW_COUNT() returns the number of rows written to the\n  file.\n\no SIGNAL statements: 0.\n\nFor UPDATE statements, the affected-rows value by default is the number\nof rows actually changed. If you specify the CLIENT_FOUND_ROWS flag to\nmysql_real_connect() when connecting to mysqld, the affected-rows value\nis the number of rows \"found\"; that is, matched by the WHERE clause.\n\nFor REPLACE statements, the affected-rows value is 2 if the new row\nreplaced an old row, because in this case, one row was inserted after\nthe duplicate was deleted.\n\nFor INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows\nvalue is 1 if the row is inserted as a new row and 2 if an existing row\nis updated.\n\nThe ROW_COUNT() value is similar to the value from the\nmysql_affected_rows() C API function and the row count that the mysql\nclient displays following statement execution.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> INSERT INTO t VALUES(1),(2),(3);\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3  Duplicates: 0  Warnings: 0\n\nmysql> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n|           3 |\n+-------------+\n1 row in set (0.00 sec)\n\nmysql> DELETE FROM t WHERE i IN(1,2);\nQuery OK, 2 rows affected (0.00 sec)\n\nmysql> SELECT ROW_COUNT();\n+-------------+\n| ROW_COUNT() |\n+-------------+\n|           2 |\n+-------------+\n1 row in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(165,'ASIN',4,'Syntax:\nASIN(X)\n\nReturns the arc sine of X, that is, the value whose sine is X. Returns\nNULL if X is not in the range -1 to 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT ASIN(0.2);\n        -> 0.20135792079033\nmysql> SELECT ASIN(\'foo\');\n\n+-------------+\n| ASIN(\'foo\') |\n+-------------+\n|           0 |\n+-------------+\n1 row in set, 1 warning (0.00 sec)\n\nmysql> SHOW WARNINGS;\n+---------+------+-----------------------------------------+\n| Level   | Code | Message                                 |\n+---------+------+-----------------------------------------+\n| Warning | 1292 | Truncated incorrect DOUBLE value: \'foo\' |\n+---------+------+-----------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(166,'SIGN',4,'Syntax:\nSIGN(X)\n\nReturns the sign of the argument as -1, 0, or 1, depending on whether X\nis negative, zero, or positive.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT SIGN(-32);\n        -> -1\nmysql> SELECT SIGN(0);\n        -> 0\nmysql> SELECT SIGN(234);\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(167,'SEC_TO_TIME',31,'Syntax:\nSEC_TO_TIME(seconds)\n\nReturns the seconds argument, converted to hours, minutes, and seconds,\nas a TIME value. The range of the result is constrained to that of the\nTIME data type. A warning occurs if the argument corresponds to a value\noutside that range.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT SEC_TO_TIME(2378);\n        -> \'00:39:38\'\nmysql> SELECT SEC_TO_TIME(2378) + 0;\n        -> 3938\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(168,'FLOAT',22,'FLOAT[(M,D)] [UNSIGNED] [ZEROFILL]\n\nA small (single-precision) floating-point number. Permissible values\nare -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to\n3.402823466E+38. These are the theoretical limits, based on the IEEE\nstandard. The actual range might be slightly smaller depending on your\nhardware or operating system.\n\nM is the total number of digits and D is the number of digits following\nthe decimal point. If M and D are omitted, values are stored to the\nlimits permitted by the hardware. A single-precision floating-point\nnumber is accurate to approximately 7 decimal places.\n\nUNSIGNED, if specified, disallows negative values.\n\nUsing FLOAT might give you some unexpected problems because all\ncalculations in MySQL are done with double precision. See\nhttp://dev.mysql.com/doc/refman/5.5/en/no-matching-rows.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(169,'LOCATE',37,'Syntax:\nLOCATE(substr,str), LOCATE(substr,str,pos)\n\nThe first syntax returns the position of the first occurrence of\nsubstring substr in string str. The second syntax returns the position\nof the first occurrence of substring substr in string str, starting at\nposition pos. Returns 0 if substr is not in str.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LOCATE(\'bar\', \'foobarbar\');\n        -> 4\nmysql> SELECT LOCATE(\'xbar\', \'foobar\');\n        -> 0\nmysql> SELECT LOCATE(\'bar\', \'foobarbar\', 5);\n        -> 7\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(170,'SHOW EVENTS',26,'Syntax:\nSHOW EVENTS [{FROM | IN} schema_name]\n    [LIKE \'pattern\' | WHERE expr]\n\nThis statement displays information about Event Manager events. It\nrequires the EVENT privilege for the database from which the events are\nto be shown.\n\nIn its simplest form, SHOW EVENTS lists all of the events in the\ncurrent schema:\n\nmysql> SELECT CURRENT_USER(), SCHEMA();\n+----------------+----------+\n| CURRENT_USER() | SCHEMA() |\n+----------------+----------+\n| jon@ghidora    | myschema |\n+----------------+----------+\n1 row in set (0.00 sec)\n\nmysql> SHOW EVENTS\\G\n*************************** 1. row ***************************\n                  Db: myschema\n                Name: e_daily\n             Definer: jon@ghidora\n           Time zone: SYSTEM\n                Type: RECURRING\n          Execute at: NULL\n      Interval value: 10\n      Interval field: SECOND\n              Starts: 2006-02-09 10:41:23\n                Ends: NULL\n              Status: ENABLED\n          Originator: 0\ncharacter_set_client: latin1\ncollation_connection: latin1_swedish_ci\n  Database Collation: latin1_swedish_ci\n\nTo see events for a specific schema, use the FROM clause. For example,\nto see events for the test schema, use the following statement:\n\nSHOW EVENTS FROM test;\n\nThe LIKE clause, if present, indicates which event names to match. The\nWHERE clause can be given to select rows using more general conditions,\nas discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-events.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-events.html'),(171,'CHARSET',17,'Syntax:\nCHARSET(str)\n\nReturns the character set of the string argument.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','mysql> SELECT CHARSET(\'abc\');\n        -> \'latin1\'\nmysql> SELECT CHARSET(CONVERT(\'abc\' USING utf8));\n        -> \'utf8\'\nmysql> SELECT CHARSET(USER());\n        -> \'utf8\'\n','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(172,'SUBDATE',31,'Syntax:\nSUBDATE(date,INTERVAL expr unit), SUBDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, SUBDATE()\nis a synonym for DATE_SUB(). For information on the INTERVAL unit\nargument, see the discussion for DATE_ADD().\n\nmysql> SELECT DATE_SUB(\'2008-01-02\', INTERVAL 31 DAY);\n        -> \'2007-12-02\'\nmysql> SELECT SUBDATE(\'2008-01-02\', INTERVAL 31 DAY);\n        -> \'2007-12-02\'\n\nThe second form enables the use of an integer value for days. In such\ncases, it is interpreted as the number of days to be subtracted from\nthe date or datetime expression expr.\n\nmysql> SELECT SUBDATE(\'2008-01-02 12:00:00\', 31);\n        -> \'2007-12-02 12:00:00\'\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(173,'DAYOFYEAR',31,'Syntax:\nDAYOFYEAR(date)\n\nReturns the day of the year for date, in the range 1 to 366.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DAYOFYEAR(\'2007-02-03\');\n        -> 34\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(174,'%',4,'Syntax:\nN % M, N MOD M\n\nModulo operation. Returns the remainder of N divided by M. For more\ninformation, see the description for the MOD() function in\nhttp://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(175,'LONGTEXT',22,'LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]\n\nA TEXT column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\ncharacters. The effective maximum length is less if the value contains\nmulti-byte characters. The effective maximum length of LONGTEXT columns\nalso depends on the configured maximum packet size in the client/server\nprotocol and available memory. Each LONGTEXT value is stored using a\n4-byte length prefix that indicates the number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(176,'KILL',26,'Syntax:\nKILL [CONNECTION | QUERY] thread_id\n\nEach connection to mysqld runs in a separate thread. You can see which\nthreads are running with the SHOW PROCESSLIST statement and kill a\nthread with the KILL thread_id statement.\n\nKILL permits an optional CONNECTION or QUERY modifier:\n\no KILL CONNECTION is the same as KILL with no modifier: It terminates\n  the connection associated with the given thread_id.\n\no KILL QUERY terminates the statement that the connection is currently\n  executing, but leaves the connection itself intact.\n\nIf you have the PROCESS privilege, you can see all threads. If you have\nthe SUPER privilege, you can kill all threads and statements.\nOtherwise, you can see and kill only your own threads and statements.\n\nYou can also use the mysqladmin processlist and mysqladmin kill\ncommands to examine and kill threads.\n\n*Note*: You cannot use KILL with the Embedded MySQL Server library\nbecause the embedded server merely runs inside the threads of the host\napplication. It does not create any connection threads of its own.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/kill.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/kill.html'),(177,'DISJOINT',30,'Disjoint(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 is spatially disjoint from (does\nnot intersect) g2.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(178,'ASTEXT',3,'AsText(g), AsWKT(g)\n\nConverts a value in internal geometry format to its WKT representation\nand returns the string result.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-to-convert-geometries-between-formats.html\n\n','mysql> SET @g = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(GeomFromText(@g));\n+--------------------------+\n| AsText(GeomFromText(@g)) |\n+--------------------------+\n| LINESTRING(1 1,2 2,3 3)  |\n+--------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/functions-to-convert-geometries-between-formats.html'),(179,'LPAD',37,'Syntax:\nLPAD(str,len,padstr)\n\nReturns the string str, left-padded with the string padstr to a length\nof len characters. If str is longer than len, the return value is\nshortened to len characters.\n\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT LPAD(\'hi\',4,\'??\');\n        -> \'??hi\'\nmysql> SELECT LPAD(\'hi\',1,\'??\');\n        -> \'h\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(180,'DECLARE CONDITION',23,'Syntax:\nDECLARE condition_name CONDITION FOR condition_value\n\ncondition_value:\n    mysql_error_code\n  | SQLSTATE [VALUE] sqlstate_value\n\nThe DECLARE ... CONDITION statement declares a named error condition,\nassociating a name with a condition that needs specific handling. The\nname can be referred to in a subsequent DECLARE ... HANDLER statement\n(see [HELP DECLARE HANDLER]).\n\nCondition declarations must appear before cursor or handler\ndeclarations.\n\nThe condition_value for DECLARE ... CONDITION can be a MySQL error code\n(a number) or an SQLSTATE value (a 5-character string literal). You\nshould not use MySQL error code 0 or SQLSTATE values that begin with\n\'00\', because those indicate success rather than an error condition.\nFor a list of MySQL error codes and SQLSTATE values, see\nhttp://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/declare-condition.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/declare-condition.html'),(181,'OVERLAPS',30,'Overlaps(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially overlaps g2. The term\nspatially overlaps is used if two geometries intersect and their\nintersection results in a geometry of the same dimension but not equal\nto either of the given geometries.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(182,'SET GLOBAL SQL_SLAVE_SKIP_COUNTER',8,'Syntax:\nSET GLOBAL sql_slave_skip_counter = N\n\nThis statement skips the next N events from the master. This is useful\nfor recovering from replication stops caused by a statement.\n\nThis statement is valid only when the slave threads are not running.\nOtherwise, it produces an error.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/set-global-sql-slave-skip-counter.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/set-global-sql-slave-skip-counter.html'),(183,'NUMGEOMETRIES',25,'NumGeometries(gc)\n\nReturns the number of geometries in the GeometryCollection value gc.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions\n\n','mysql> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nmysql> SELECT NumGeometries(GeomFromText(@gc));\n+----------------------------------+\n| NumGeometries(GeomFromText(@gc)) |\n+----------------------------------+\n|                                2 |\n+----------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions'),(184,'MONTHNAME',31,'Syntax:\nMONTHNAME(date)\n\nReturns the full name of the month for date. The language used for the\nname is controlled by the value of the lc_time_names system variable\n(http://dev.mysql.com/doc/refman/5.5/en/locale-support.html).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT MONTHNAME(\'2008-02-03\');\n        -> \'February\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(185,'CHANGE MASTER TO',8,'Syntax:\nCHANGE MASTER TO option [, option] ...\n\noption:\n    MASTER_BIND = \'interface_name\'\n  | MASTER_HOST = \'host_name\'\n  | MASTER_USER = \'user_name\'\n  | MASTER_PASSWORD = \'password\'\n  | MASTER_PORT = port_num\n  | MASTER_CONNECT_RETRY = interval\n  | MASTER_HEARTBEAT_PERIOD = interval\n  | MASTER_LOG_FILE = \'master_log_name\'\n  | MASTER_LOG_POS = master_log_pos\n  | RELAY_LOG_FILE = \'relay_log_name\'\n  | RELAY_LOG_POS = relay_log_pos\n  | MASTER_SSL = {0|1}\n  | MASTER_SSL_CA = \'ca_file_name\'\n  | MASTER_SSL_CAPATH = \'ca_directory_name\'\n  | MASTER_SSL_CERT = \'cert_file_name\'\n  | MASTER_SSL_KEY = \'key_file_name\'\n  | MASTER_SSL_CIPHER = \'cipher_list\'\n  | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}\n  | IGNORE_SERVER_IDS = (server_id_list)\n\nserver_id_list:\n    [server_id [, server_id] ... ]\n\nCHANGE MASTER TO changes the parameters that the slave server uses for\nconnecting to the master server, for reading the master binary log, and\nreading the slave relay log. It also updates the contents of the\nmaster.info and relay-log.info files. To use CHANGE MASTER TO, the\nslave replication threads must be stopped (use STOP SLAVE if\nnecessary).\n\nOptions not specified retain their value, except as indicated in the\nfollowing discussion. Thus, in most cases, there is no need to specify\noptions that do not change. For example, if the password to connect to\nyour MySQL master has changed, you just need to issue these statements\nto tell the slave about the new password:\n\nSTOP SLAVE; -- if replication was running\nCHANGE MASTER TO MASTER_PASSWORD=\'new3cret\';\nSTART SLAVE; -- if you want to restart replication\n\nMASTER_HOST, MASTER_USER, MASTER_PASSWORD, and MASTER_PORT provide\ninformation to the slave about how to connect to its master:\n\no MASTER_HOST and MASTER_PORT are the host name (or IP address) of the\n  master host and its TCP/IP port.\n\n  *Note*: Replication cannot use Unix socket files. You must be able to\n  connect to the master MySQL server using TCP/IP.\n\n  If you specify the MASTER_HOST or MASTER_PORT option, the slave\n  assumes that the master server is different from before (even if the\n  option value is the same as its current value.) In this case, the old\n  values for the master binary log file name and position are\n  considered no longer applicable, so if you do not specify\n  MASTER_LOG_FILE and MASTER_LOG_POS in the statement,\n  MASTER_LOG_FILE=\'\' and MASTER_LOG_POS=4 are silently appended to it.\n\n  Setting MASTER_HOST=\'\' (that is, setting its value explicitly to an\n  empty string) is not the same as not setting MASTER_HOST at all.\n  Beginning with MySQL 5.5, trying to set MASTER_HOST to an empty\n  string fails with an error. Previously, setting MASTER_HOST to an\n  empty string caused START SLAVE subsequently to fail. (Bug #28796)\n\no MASTER_USER and MASTER_PASSWORD are the user name and password of the\n  account to use for connecting to the master.\n\n  In MySQL 5.5.20 and later, MASTER_USER cannot be made empty; setting\n  MASTER_USER = \'\' or leaving it unset when setting a value for for\n  MASTER_PASSWORD causes an error (Bug #13427949).\n\n  Currently, a password used for a replication slave account is\n  effectively limited to 32 characters in length; the password can be\n  longer, but any excess characters are truncated. This is not due to\n  any limit imposed by the MySQL Server generally, but rather is an\n  issue specific to MySQL Replication. (For more information, see Bug\n  #43439.)\n\n  The text of a running CHANGE MASTER TO statement, including values\n  for MASTER_USER and MASTER_PASSWORD, can be seen in the output of a\n  concurrent SHOW PROCESSLIST statement.\n\nThe MASTER_SSL_xxx options provide information about using SSL for the\nconnection. They correspond to the --ssl-xxx options described in\nhttp://dev.mysql.com/doc/refman/5.5/en/ssl-options.html, and\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-solutions-ssl.html.\nThese options can be changed even on slaves that are compiled without\nSSL support. They are saved to the master.info file, but are ignored if\nthe slave does not have SSL support enabled.\n\nMASTER_CONNECT_RETRY specifies how many seconds to wait between connect\nretries. The default is 60. The number of reconnection attempts is\nlimited by the --master-retry-count server option; for more\ninformation, see\nhttp://dev.mysql.com/doc/refman/5.5/en/replication-options.html.\n\nThe MASTER_BIND option is available in MySQL Cluster NDB 7.2 and later,\nbut is not supported in mainline MySQL 5.5.\n\nMASTER_BIND is for use on replication slaves having multiple network\ninterfaces, and determines which of the slave\'s network interfaces is\nchosen for connecting to the master.\n\nMASTER_HEARTBEAT_PERIOD sets the interval in seconds between\nreplication heartbeats. Whenever the master\'s binary log is updated\nwith an event, the waiting period for the next heartbeat is reset.\ninterval is a decimal value having the range 0 to 4294967 seconds and a\nresolution in milliseconds; the smallest nonzero value is 0.001.\nHeartbeats are sent by the master only if there are no unsent events in\nthe binary log file for a period longer than interval.\n\nSetting interval to 0 disables heartbeats altogether. The default value\nfor interval is equal to the value of slave_net_timeout divided by 2.\n\nSetting @@global.slave_net_timeout to a value less than that of the\ncurrent heartbeat interval results in a warning being issued. The\neffect of issuing RESET SLAVE on the heartbeat interval is to reset it\nto the default value.\n\nMASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the\nslave I/O thread should begin reading from the master the next time the\nthread starts. RELAY_LOG_FILE and RELAY_LOG_POS are the coordinates at\nwhich the slave SQL thread should begin reading from the relay log the\nnext time the thread starts. If you specify either of MASTER_LOG_FILE\nor MASTER_LOG_POS, you cannot specify RELAY_LOG_FILE or RELAY_LOG_POS.\nIf neither of MASTER_LOG_FILE or MASTER_LOG_POS is specified, the slave\nuses the last coordinates of the slave SQL thread before CHANGE MASTER\nTO was issued. This ensures that there is no discontinuity in\nreplication, even if the slave SQL thread was late compared to the\nslave I/O thread, when you merely want to change, say, the password to\nuse.\n\nCHANGE MASTER TO deletes all relay log files and starts a new one,\nunless you specify RELAY_LOG_FILE or RELAY_LOG_POS. In that case, relay\nlog files are kept; the relay_log_purge global variable is set silently\nto 0.\n\nPrior to MySQL 5.5, RELAY_LOG_FILE required an absolute path. In MySQL\n5.5, the path can be relative, in which case the path is assumed to be\nrelative to the slave\'s data directory. (Bug #12190)\n\nIGNORE_SERVER_IDS was added in MySQL 5.5. This option takes a\ncomma-separated list of 0 or more server IDs. Events originating from\nthe corresponding servers are ignored, with the exception of log\nrotation and deletion events, which are still recorded in the relay\nlog.\n\nIn circular replication, the originating server normally acts as the\nterminator of its own events, so that they are not applied more than\nonce. Thus, this option is useful in circular replication when one of\nthe servers in the circle is removed. Suppose that you have a circular\nreplication setup with 4 servers, having server IDs 1, 2, 3, and 4, and\nserver 3 fails. When bridging the gap by starting replication from\nserver 2 to server 4, you can include IGNORE_SERVER_IDS = (3) in the\nCHANGE MASTER TO statement that you issue on server 4 to tell it to use\nserver 2 as its master instead of server 3. Doing so causes it to\nignore and not to propagate any statements that originated with the\nserver that is no longer in use.\n\nIf a CHANGE MASTER TO statement is issued without any IGNORE_SERVER_IDS\noption, any existing list is preserved; RESET SLAVE also has no effect\non the server ID list. To clear the list of ignored servers, it is\nnecessary to use the option with an empty list:\n\nCHANGE MASTER TO IGNORE_SERVER_IDS = ();\n\nIf IGNORE_SERVER_IDS contains the server\'s own ID and the server was\nstarted with the --replicate-same-server-id option enabled, an error\nresults.\n\nAlso beginning with MySQL 5.5, the master.info file and the output of\nSHOW SLAVE STATUS are extended to provide the list of servers that are\ncurrently ignored. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/slave-logs-status.html, and\n[HELP SHOW SLAVE STATUS].\n\nBeginning with MySQL 5.5.5, invoking CHANGE MASTER TO causes the\nprevious values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and\nMASTER_LOG_POS to be written to the error log, along with other\ninformation about the slave\'s state prior to execution.\n\nCHANGE MASTER TO is useful for setting up a slave when you have the\nsnapshot of the master and have recorded the master binary log\ncoordinates corresponding to the time of the snapshot. After loading\nthe snapshot into the slave to synchronize it to the slave, you can run\nCHANGE MASTER TO MASTER_LOG_FILE=\'log_name\', MASTER_LOG_POS=log_pos on\nthe slave to specify the coordinates at which the slave should begin\nreading the master binary log.\n\nThe following example changes the master server the slave uses and\nestablishes the master binary log coordinates from which the slave\nbegins reading. This is used when you want to set up the slave to\nreplicate the master:\n\nCHANGE MASTER TO\n  MASTER_HOST=\'master2.mycompany.com\',\n  MASTER_USER=\'replication\',\n  MASTER_PASSWORD=\'bigs3cret\',\n  MASTER_PORT=3306,\n  MASTER_LOG_FILE=\'master2-bin.001\',\n  MASTER_LOG_POS=4,\n  MASTER_CONNECT_RETRY=10;\n\nThe next example shows an operation that is less frequently employed.\nIt is used when the slave has relay log files that you want it to\nexecute again for some reason. To do this, the master need not be\nreachable. You need only use CHANGE MASTER TO and start the SQL thread\n(START SLAVE SQL_THREAD):\n\nCHANGE MASTER TO\n  RELAY_LOG_FILE=\'slave-relay-bin.006\',\n  RELAY_LOG_POS=4025;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/change-master-to.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/change-master-to.html'),(186,'DROP DATABASE',39,'Syntax:\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDROP DATABASE drops all tables in the database and deletes the\ndatabase. Be very careful with this statement! To use DROP DATABASE,\nyou need the DROP privilege on the database. DROP SCHEMA is a synonym\nfor DROP DATABASE.\n\n*Important*: When a database is dropped, user privileges on the\ndatabase are not automatically dropped. See [HELP GRANT].\n\nIF EXISTS is used to prevent an error from occurring if the database\ndoes not exist.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-database.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-database.html'),(187,'MBREQUAL',6,'MBREqual(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 are the same.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(188,'TIMESTAMP FUNCTION',31,'Syntax:\nTIMESTAMP(expr), TIMESTAMP(expr1,expr2)\n\nWith a single argument, this function returns the date or datetime\nexpression expr as a datetime value. With two arguments, it adds the\ntime expression expr2 to the date or datetime expression expr1 and\nreturns the result as a datetime value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT TIMESTAMP(\'2003-12-31\');\n        -> \'2003-12-31 00:00:00\'\nmysql> SELECT TIMESTAMP(\'2003-12-31 12:00:00\',\'12:00:00\');\n        -> \'2004-01-01 00:00:00\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(189,'PROCEDURE ANALYSE',33,'Syntax:\nANALYSE([max_elements[,max_memory]])\n\nANALYSE() examines the result from a query and returns an analysis of\nthe results that suggests optimal data types for each column that may\nhelp reduce table sizes. To obtain this analysis, append PROCEDURE\nANALYSE to the end of a SELECT statement:\n\nSELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max_elements,[max_memory]])\n\nFor example:\n\nSELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);\n\nThe results show some statistics for the values returned by the query,\nand propose an optimal data type for the columns. This can be helpful\nfor checking your existing tables, or after importing new data. You may\nneed to try different settings for the arguments so that PROCEDURE\nANALYSE() does not suggest the ENUM data type when it is not\nappropriate.\n\nThe arguments are optional and are used as follows:\n\no max_elements (default 256) is the maximum number of distinct values\n  that ANALYSE() notices per column. This is used by ANALYSE() to check\n  whether the optimal data type should be of type ENUM; if there are\n  more than max_elements distinct values, then ENUM is not a suggested\n  type.\n\no max_memory (default 8192) is the maximum amount of memory that\n  ANALYSE() should allocate per column while trying to find all\n  distinct values.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/procedure-analyse.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/procedure-analyse.html'),(190,'HELP_VERSION',9,'This help information was generated from the MySQL 5.5 Reference Manual\non: 2012-08-25 (revision: 31914)\n\nThis information applies to MySQL 5.5 through 5.5.29.\n','',''),(191,'CHARACTER_LENGTH',37,'Syntax:\nCHARACTER_LENGTH(str)\n\nCHARACTER_LENGTH() is a synonym for CHAR_LENGTH().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(192,'SHOW GRANTS',26,'Syntax:\nSHOW GRANTS [FOR user]\n\nThis statement lists the GRANT statement or statements that must be\nissued to duplicate the privileges that are granted to a MySQL user\naccount. The account is named using the same format as for the GRANT\nstatement; for example, \'jeffrey\'@\'localhost\'. If you specify only the\nuser name part of the account name, a host name part of \'%\' is used.\nFor additional information about specifying account names, see [HELP\nGRANT].\n\nmysql> SHOW GRANTS FOR \'root\'@\'localhost\';\n+---------------------------------------------------------------------+\n| Grants for root@localhost                                           |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON *.* TO \'root\'@\'localhost\' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n\nTo list the privileges granted to the account that you are using to\nconnect to the server, you can use any of the following statements:\n\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is\nused in DEFINER context, such as within a stored procedure that is\ndefined with SQL SECURITY DEFINER), the grants displayed are those of\nthe definer and not the invoker.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-grants.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-grants.html'),(193,'SHOW PRIVILEGES',26,'Syntax:\nSHOW PRIVILEGES\n\nSHOW PRIVILEGES shows the list of system privileges that the MySQL\nserver supports. The exact list of privileges depends on the version of\nyour server.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-privileges.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-privileges.html'),(194,'CREATE TABLESPACE',39,'Syntax:\nCREATE TABLESPACE tablespace_name\n    ADD DATAFILE \'file_name\'\n    USE LOGFILE GROUP logfile_group\n    [EXTENT_SIZE [=] extent_size]\n    [INITIAL_SIZE [=] initial_size]\n    [AUTOEXTEND_SIZE [=] autoextend_size]\n    [MAX_SIZE [=] max_size]\n    [NODEGROUP [=] nodegroup_id]\n    [WAIT]\n    [COMMENT [=] comment_text]\n    ENGINE [=] engine_name\n\nThis statement is used to create a tablespace, which can contain one or\nmore data files, providing storage space for tables. One data file is\ncreated and added to the tablespace using this statement. Additional\ndata files may be added to the tablespace by using the ALTER TABLESPACE\nstatement (see [HELP ALTER TABLESPACE]). For rules covering the naming\nof tablespaces, see\nhttp://dev.mysql.com/doc/refman/5.5/en/identifiers.html.\n\n*Note*: All MySQL Cluster Disk Data objects share the same namespace.\nThis means that each Disk Data object must be uniquely named (and not\nmerely each Disk Data object of a given type). For example, you cannot\nhave a tablespace and a log file group with the same name, or a\ntablespace and a data file with the same name.\n\nA log file group of one or more UNDO log files must be assigned to the\ntablespace to be created with the USE LOGFILE GROUP clause.\nlogfile_group must be an existing log file group created with CREATE\nLOGFILE GROUP (see\nhttp://dev.mysql.com/doc/refman/5.5/en/create-logfile-group.html).\nMultiple tablespaces may use the same log file group for UNDO logging.\n\nThe EXTENT_SIZE sets the size, in bytes, of the extents used by any\nfiles belonging to the tablespace. The default value is 1M. The minimum\nsize is 32K, and theoretical maximum is 2G, although the practical\nmaximum size depends on a number of factors. In most cases, changing\nthe extent size does not have any measurable effect on performance, and\nthe default value is recommended for all but the most unusual\nsituations.\n\nAn extent is a unit of disk space allocation. One extent is filled with\nas much data as that extent can contain before another extent is used.\nIn theory, up to 65,535 (64K) extents may used per data file; however,\nthe recommended maximum is 32,768 (32K). The recommended maximum size\nfor a single data file is 32G---that is, 32K extents x 1 MB per extent.\nIn addition, once an extent is allocated to a given partition, it\ncannot be used to store data from a different partition; an extent\ncannot store data from more than one partition. This means, for example\nthat a tablespace having a single datafile whose INITIAL_SIZE is 256 MB\nand whose EXTENT_SIZE is 128M has just two extents, and so can be used\nto store data from at most two different disk data table partitions.\n\nYou can see how many extents remain free in a given data file by\nquerying the INFORMATION_SCHEMA.FILES table, and so derive an estimate\nfor how much space remains free in the file. For further discussion and\nexamples, see http://dev.mysql.com/doc/refman/5.5/en/files-table.html.\n\nThe INITIAL_SIZE parameter sets the data file\'s total size in bytes.\nOnce the file has been created, its size cannot be changed; however,\nyou can add more data files to the tablespace using ALTER TABLESPACE\n... ADD DATAFILE. See [HELP ALTER TABLESPACE].\n\nINITIAL_SIZE is optional; its default value is 128M.\n\nOn 32-bit systems, the maximum supported value for INITIAL_SIZE is 4G.\n(Bug #29186)\n\nWhen setting EXTENT_SIZE or INITIAL_SIZE (either or both), you may\noptionally follow the number with a one-letter abbreviation for an\norder of magnitude, similar to those used in my.cnf. Generally, this is\none of the letters M (for megabytes) or G (for gigabytes).\n\nINITIAL_SIZE, EXTENT_SIZE, and UNDO_BUFFER_SIZE are subject to rounding\nas follows:\n\no EXTENT_SIZE and UNDO_BUFFER_SIZE are each rounded up to the nearest\n  whole multiple of 32K.\n\no INITIAL_SIZE is rounded down to the nearest whole multiple of 32K.\n\n  For data files, INITIAL_SIZE is subject to further rounding; the\n  result just obtained is rounded up to the nearest whole multiple of\n  EXTENT_SIZE (after any rounding).\n\nThe rounding just described is done explicitly, and a warning is issued\nby the MySQL Server when any such rounding is performed. The rounded\nvalues are also used by the NDB kernel for calculating\nINFORMATION_SCHEMA.FILES column values and other purposes. However, to\navoid an unexpected result, we suggest that you always use whole\nmultiples of 32K in specifying these options.\n\nAUTOEXTEND_SIZE, MAX_SIZE, NODEGROUP, WAIT, and COMMENT are parsed but\nignored, and so currently have no effect. These options are intended\nfor future expansion.\n\nThe ENGINE parameter determines the storage engine which uses this\ntablespace, with engine_name being the name of the storage engine.\nCurrently, engine_name must be one of the values NDB or NDBCLUSTER.\n\nWhen CREATE TABLESPACE is used with ENGINE = NDB, a tablespace and\nassociated data file are created on each Cluster data node. You can\nverify that the data files were created and obtain information about\nthem by querying the INFORMATION_SCHEMA.FILES table. For example:\n\nmysql> SELECT LOGFILE_GROUP_NAME, FILE_NAME, EXTRA\n    -> FROM INFORMATION_SCHEMA.FILES\n    -> WHERE TABLESPACE_NAME = \'newts\' AND FILE_TYPE = \'DATAFILE\';\n+--------------------+-------------+----------------+\n| LOGFILE_GROUP_NAME | FILE_NAME   | EXTRA          |\n+--------------------+-------------+----------------+\n| lg_3               | newdata.dat | CLUSTER_NODE=3 |\n| lg_3               | newdata.dat | CLUSTER_NODE=4 |\n+--------------------+-------------+----------------+\n2 rows in set (0.01 sec)\n\n(See http://dev.mysql.com/doc/refman/5.5/en/files-table.html.)\n\nCREATE TABLESPACE is useful only with Disk Data storage for MySQL\nCluster. See\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-disk-data.html.\n\nTo drop a primary key, the index name is always PRIMARY, which must be\nspecified as a quoted identifier because PRIMARY is a reserved word:\n\nDROP INDEX `PRIMARY` ON t;\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-tablespace.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-tablespace.html'),(195,'INSERT FUNCTION',37,'Syntax:\nINSERT(str,pos,len,newstr)\n\nReturns the string str, with the substring beginning at position pos\nand len characters long replaced by the string newstr. Returns the\noriginal string if pos is not within the length of the string. Replaces\nthe rest of the string from position pos if len is not within the\nlength of the rest of the string. Returns NULL if any argument is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT INSERT(\'Quadratic\', 3, 4, \'What\');\n        -> \'QuWhattic\'\nmysql> SELECT INSERT(\'Quadratic\', -1, 4, \'What\');\n        -> \'Quadratic\'\nmysql> SELECT INSERT(\'Quadratic\', 3, 100, \'What\');\n        -> \'QuWhat\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(196,'CRC32',4,'Syntax:\nCRC32(expr)\n\nComputes a cyclic redundancy check value and returns a 32-bit unsigned\nvalue. The result is NULL if the argument is NULL. The argument is\nexpected to be a string and (if possible) is treated as one if it is\nnot.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT CRC32(\'MySQL\');\n        -> 3259397556\nmysql> SELECT CRC32(\'mysql\');\n        -> 2501908538\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(197,'XOR',15,'Syntax:\nXOR\n\nLogical XOR. Returns NULL if either operand is NULL. For non-NULL\noperands, evaluates to 1 if an odd number of operands is nonzero,\notherwise 0 is returned.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html\n\n','mysql> SELECT 1 XOR 1;\n        -> 0\nmysql> SELECT 1 XOR 0;\n        -> 1\nmysql> SELECT 1 XOR NULL;\n        -> NULL\nmysql> SELECT 1 XOR 1 XOR 1;\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/logical-operators.html'),(198,'STARTPOINT',13,'StartPoint(ls)\n\nReturns the Point that is the start point of the LineString value ls.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(StartPoint(GeomFromText(@ls)));\n+---------------------------------------+\n| AsText(StartPoint(GeomFromText(@ls))) |\n+---------------------------------------+\n| POINT(1 1)                            |\n+---------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(199,'GRANT',10,'Syntax:\nGRANT\n    priv_type [(column_list)]\n      [, priv_type [(column_list)]] ...\n    ON [object_type] priv_level\n    TO user_specification [, user_specification] ...\n    [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]\n    [WITH with_option ...]\n\nGRANT PROXY ON user_specification\n    TO user_specification [, user_specification] ...\n    [WITH GRANT OPTION]\n\nobject_type:\n    TABLE\n  | FUNCTION\n  | PROCEDURE\n\npriv_level:\n    *\n  | *.*\n  | db_name.*\n  | db_name.tbl_name\n  | tbl_name\n  | db_name.routine_name\n\nuser_specification:\n    user\n    [\n        IDENTIFIED BY [PASSWORD] \'password\'\n      | IDENTIFIED WITH auth_plugin [AS \'auth_string\']\n    ]\n\nssl_option:\n    SSL\n  | X509\n  | CIPHER \'cipher\'\n  | ISSUER \'issuer\'\n  | SUBJECT \'subject\'\n\nwith_option:\n    GRANT OPTION\n  | MAX_QUERIES_PER_HOUR count\n  | MAX_UPDATES_PER_HOUR count\n  | MAX_CONNECTIONS_PER_HOUR count\n  | MAX_USER_CONNECTIONS count\n\nThe GRANT statement grants privileges to MySQL user accounts. GRANT\nalso serves to specify other account characteristics such as use of\nsecure connections and limits on access to server resources. To use\nGRANT, you must have the GRANT OPTION privilege, and you must have the\nprivileges that you are granting.\n\nNormally, a database administrator first uses CREATE USER to create an\naccount, then GRANT to define its privileges and characteristics. For\nexample:\n\nCREATE USER \'jeffrey\'@\'localhost\' IDENTIFIED BY \'mypass\';\nGRANT ALL ON db1.* TO \'jeffrey\'@\'localhost\';\nGRANT SELECT ON db2.invoice TO \'jeffrey\'@\'localhost\';\nGRANT USAGE ON *.* TO \'jeffrey\'@\'localhost\' WITH MAX_QUERIES_PER_HOUR 90;\n\nHowever, if an account named in a GRANT statement does not already\nexist, GRANT may create it under the conditions described later in the\ndiscussion of the NO_AUTO_CREATE_USER SQL mode.\n\nThe REVOKE statement is related to GRANT and enables administrators to\nremove account privileges. See [HELP REVOKE].\n\nWhen successfully executed from the mysql program, GRANT responds with\nQuery OK, 0 rows affected. To determine what privileges result from the\noperation, use SHOW GRANTS. See [HELP SHOW GRANTS].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/grant.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/grant.html'),(200,'DECLARE VARIABLE',23,'Syntax:\nDECLARE var_name [, var_name] ... type [DEFAULT value]\n\nThis statement declares local variables within stored programs. To\nprovide a default value for a variable, include a DEFAULT clause. The\nvalue can be specified as an expression; it need not be a constant. If\nthe DEFAULT clause is missing, the initial value is NULL.\n\nLocal variables are treated like stored routine parameters with respect\nto data type and overflow checking. See [HELP CREATE PROCEDURE].\n\nVariable declarations must appear before cursor or handler\ndeclarations.\n\nLocal variable names are not case sensitive. Permissible characters and\nquoting rules are the same as for other identifiers, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/identifiers.html.\n\nThe scope of a local variable is the BEGIN ... END block within which\nit is declared. The variable can be referred to in blocks nested within\nthe declaring block, except those blocks that declare a variable with\nthe same name.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/declare-local-variable.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/declare-local-variable.html'),(201,'MPOLYFROMTEXT',3,'MPolyFromText(wkt[,srid]), MultiPolygonFromText(wkt[,srid])\n\nConstructs a MULTIPOLYGON value using its WKT representation and SRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(202,'MBRINTERSECTS',6,'MBRIntersects(g1,g2)\n\nReturns 1 or 0 to indicate whether the Minimum Bounding Rectangles of\nthe two geometries g1 and g2 intersect.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#relations-on-geometry-mbr'),(203,'BIT_OR',16,'Syntax:\nBIT_OR(expr)\n\nReturns the bitwise OR of all bits in expr. The calculation is\nperformed with 64-bit (BIGINT) precision.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(204,'YEARWEEK',31,'Syntax:\nYEARWEEK(date), YEARWEEK(date,mode)\n\nReturns year and week for a date. The mode argument works exactly like\nthe mode argument to WEEK(). The year in the result may be different\nfrom the year in the date argument for the first and the last week of\nthe year.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT YEARWEEK(\'1987-01-01\');\n        -> 198653\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(205,'NOT BETWEEN',18,'Syntax:\nexpr NOT BETWEEN min AND max\n\nThis is the same as NOT (expr BETWEEN min AND max).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(206,'IS NOT',18,'Syntax:\nIS NOT boolean_value\n\nTests a value against a boolean value, where boolean_value can be TRUE,\nFALSE, or UNKNOWN.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;\n        -> 1, 1, 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(207,'LOG10',4,'Syntax:\nLOG10(X)\n\nReturns the base-10 logarithm of X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT LOG10(2);\n        -> 0.30102999566398\nmysql> SELECT LOG10(100);\n        -> 2\nmysql> SELECT LOG10(-100);\n        -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(208,'SQRT',4,'Syntax:\nSQRT(X)\n\nReturns the square root of a nonnegative number X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT SQRT(4);\n        -> 2\nmysql> SELECT SQRT(20);\n        -> 4.4721359549996\nmysql> SELECT SQRT(-16);\n        -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(209,'DECIMAL',22,'DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]\n\nA packed \"exact\" fixed-point number. M is the total number of digits\n(the precision) and D is the number of digits after the decimal point\n(the scale). The decimal point and (for negative numbers) the \"-\" sign\nare not counted in M. If D is 0, values have no decimal point or\nfractional part. The maximum number of digits (M) for DECIMAL is 65.\nThe maximum number of supported decimals (D) is 30. If D is omitted,\nthe default is 0. If M is omitted, the default is 10.\n\nUNSIGNED, if specified, disallows negative values.\n\nAll basic calculations (+, -, *, /) with DECIMAL columns are done with\na precision of 65 digits.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(210,'CREATE INDEX',39,'Syntax:\nCREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name\n    [index_type]\n    ON tbl_name (index_col_name,...)\n    [index_option] ...\n\nindex_col_name:\n    col_name [(length)] [ASC | DESC]\n\nindex_type:\n    USING {BTREE | HASH}\n\nindex_option:\n    KEY_BLOCK_SIZE [=] value\n  | index_type\n  | WITH PARSER parser_name\n  | COMMENT \'string\'\n\nCREATE INDEX is mapped to an ALTER TABLE statement to create indexes.\nSee [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY\nKEY; use ALTER TABLE instead. For more information about indexes, see\nhttp://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-index.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-index.html'),(211,'CREATE FUNCTION',39,'The CREATE FUNCTION statement is used to create stored functions and\nuser-defined functions (UDFs):\n\no For information about creating stored functions, see [HELP CREATE\n  PROCEDURE].\n\no For information about creating user-defined functions, see [HELP\n  CREATE FUNCTION UDF].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/create-function.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/create-function.html'),(212,'ALTER DATABASE',39,'Syntax:\nALTER {DATABASE | SCHEMA} [db_name]\n    alter_specification ...\nALTER {DATABASE | SCHEMA} db_name\n    UPGRADE DATA DIRECTORY NAME\n\nalter_specification:\n    [DEFAULT] CHARACTER SET [=] charset_name\n  | [DEFAULT] COLLATE [=] collation_name\n\nALTER DATABASE enables you to change the overall characteristics of a\ndatabase. These characteristics are stored in the db.opt file in the\ndatabase directory. To use ALTER DATABASE, you need the ALTER privilege\non the database. ALTER SCHEMA is a synonym for ALTER DATABASE.\n\nThe database name can be omitted from the first syntax, in which case\nthe statement applies to the default database.\n\nNational Language Characteristics\n\nThe CHARACTER SET clause changes the default database character set.\nThe COLLATE clause changes the default database collation.\nhttp://dev.mysql.com/doc/refman/5.5/en/charset.html, discusses\ncharacter set and collation names.\n\nYou can see what character sets and collations are available using,\nrespectively, the SHOW CHARACTER SET and SHOW COLLATION statements. See\n[HELP SHOW CHARACTER SET], and [HELP SHOW COLLATION], for more\ninformation.\n\nIf you change the default character set or collation for a database,\nstored routines that use the database defaults must be dropped and\nrecreated so that they use the new defaults. (In a stored routine,\nvariables with character data types use the database defaults if the\ncharacter set or collation are not specified explicitly. See [HELP\nCREATE PROCEDURE].)\n\nUpgrading from Versions Older than MySQL 5.1\n\nThe syntax that includes the UPGRADE DATA DIRECTORY NAME clause updates\nthe name of the directory associated with the database to use the\nencoding implemented in MySQL 5.1 for mapping database names to\ndatabase directory names (see\nhttp://dev.mysql.com/doc/refman/5.5/en/identifier-mapping.html). This\nclause is for use under these conditions:\n\no It is intended when upgrading MySQL to 5.1 or later from older\n  versions.\n\no It is intended to update a database directory name to the current\n  encoding format if the name contains special characters that need\n  encoding.\n\no The statement is used by mysqlcheck (as invoked by mysql_upgrade).\n\nFor example, if a database in MySQL 5.0 has the name a-b-c, the name\ncontains instances of the - (dash) character. In MySQL 5.0, the\ndatabase directory is also named a-b-c, which is not necessarily safe\nfor all file systems. In MySQL 5.1 and later, the same database name is\nencoded as a@002db@002dc to produce a file system-neutral directory\nname.\n\nWhen a MySQL installation is upgraded to MySQL 5.1 or later from an\nolder version,the server displays a name such as a-b-c (which is in the\nold format) as #mysql50#a-b-c, and you must refer to the name using the\n#mysql50# prefix. Use UPGRADE DATA DIRECTORY NAME in this case to\nexplicitly tell the server to re-encode the database directory name to\nthe current encoding format:\n\nALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;\n\nAfter executing this statement, you can refer to the database as a-b-c\nwithout the special #mysql50# prefix.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-database.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-database.html'),(213,'GEOMETRYN',25,'GeometryN(gc,N)\n\nReturns the N-th geometry in the GeometryCollection value gc.\nGeometries are numbered beginning with 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions\n\n','mysql> SET @gc = \'GeometryCollection(Point(1 1),LineString(2 2, 3 3))\';\nmysql> SELECT AsText(GeometryN(GeomFromText(@gc),1));\n+----------------------------------------+\n| AsText(GeometryN(GeomFromText(@gc),1)) |\n+----------------------------------------+\n| POINT(1 1)                             |\n+----------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#geometrycollection-property-functions'),(214,'<<',19,'Syntax:\n<<\n\nShifts a longlong (BIGINT) number to the left.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 1 << 2;\n        -> 4\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(215,'SHOW TABLE STATUS',26,'Syntax:\nSHOW TABLE STATUS [{FROM | IN} db_name]\n    [LIKE \'pattern\' | WHERE expr]\n\nSHOW TABLE STATUS works likes SHOW TABLES, but provides a lot of\ninformation about each non-TEMPORARY table. You can also get this list\nusing the mysqlshow --status db_name command. The LIKE clause, if\npresent, indicates which table names to match. The WHERE clause can be\ngiven to select rows using more general conditions, as discussed in\nhttp://dev.mysql.com/doc/refman/5.5/en/extended-show.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html'),(216,'MD5',12,'Syntax:\nMD5(str)\n\nCalculates an MD5 128-bit checksum for the string. The value is\nreturned as a string of 32 hex digits, or NULL if the argument was\nNULL. The return value can, for example, be used as a hash key. See the\nnotes at the beginning of this section about storing hash values\nefficiently.\n\nAs of MySQL 5.5.3, the return value is a nonbinary string in the\nconnection character set. Before 5.5.3, the return value is a binary\nstring; see the notes at the beginning of this section about using the\nvalue as a nonbinary string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT MD5(\'testing\');\n        -> \'ae2b1fca515949e5d54fb22b8ed95575\'\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(217,'<',18,'Syntax:\n<\n\nLess than:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 < 2;\n        -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(218,'UNIX_TIMESTAMP',31,'Syntax:\nUNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)\n\nIf called with no argument, returns a Unix timestamp (seconds since\n\'1970-01-01 00:00:00\' UTC) as an unsigned integer. If UNIX_TIMESTAMP()\nis called with a date argument, it returns the value of the argument as\nseconds since \'1970-01-01 00:00:00\' UTC. date may be a DATE string, a\nDATETIME string, a TIMESTAMP, or a number in the format YYMMDD or\nYYYYMMDD. The server interprets date as a value in the current time\nzone and converts it to an internal value in UTC. Clients can set their\ntime zone as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT UNIX_TIMESTAMP();\n        -> 1196440210\nmysql> SELECT UNIX_TIMESTAMP(\'2007-11-30 10:30:19\');\n        -> 1196440219\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(219,'DAYOFMONTH',31,'Syntax:\nDAYOFMONTH(date)\n\nReturns the day of the month for date, in the range 1 to 31, or 0 for\ndates such as \'0000-00-00\' or \'2008-00-00\' that have a zero day part.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DAYOFMONTH(\'2007-02-03\');\n        -> 3\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(220,'ASCII',37,'Syntax:\nASCII(str)\n\nReturns the numeric value of the leftmost character of the string str.\nReturns 0 if str is the empty string. Returns NULL if str is NULL.\nASCII() works for 8-bit characters.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT ASCII(\'2\');\n        -> 50\nmysql> SELECT ASCII(2);\n        -> 50\nmysql> SELECT ASCII(\'dx\');\n        -> 100\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(221,'DIV',4,'Syntax:\nDIV\n\nInteger division. Similar to FLOOR(), but is safe with BIGINT values.\n\nAs of MySQL 5.5.3, if either operand has a noninteger type, the\noperands are converted to DECIMAL and divided using DECIMAL arithmetic\nbefore converting the result to BIGINT. If the result exceeds BIGINT\nrange, an error occurs. Before MySQL 5.5.3, incorrect results may occur\nfor noninteger operands that exceed BIGINT range.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 5 DIV 2;\n        -> 2\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(222,'RENAME USER',10,'Syntax:\nRENAME USER old_user TO new_user\n    [, old_user TO new_user] ...\n\nThe RENAME USER statement renames existing MySQL accounts. To use it,\nyou must have the global CREATE USER privilege or the UPDATE privilege\nfor the mysql database. An error occurs if any old account does not\nexist or any new account exists. Each account name uses the format\ndescribed in http://dev.mysql.com/doc/refman/5.5/en/account-names.html.\nFor example:\n\nRENAME USER \'jeffrey\'@\'localhost\' TO \'jeff\'@\'127.0.0.1\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nRENAME USER causes the privileges held by the old user to be those held\nby the new user. However, RENAME USER does not automatically drop or\ninvalidate databases or objects within them that the old user created.\nThis includes stored programs or views for which the DEFINER attribute\nnames the old user. Attempts to access such objects may produce an\nerror if they execute in definer security context. (For information\nabout security context, see\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-security.html.)\n\nThe privilege changes take effect as indicated in\nhttp://dev.mysql.com/doc/refman/5.5/en/privilege-changes.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/rename-user.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/rename-user.html'),(223,'SHOW SLAVE STATUS',26,'Syntax:\nSHOW SLAVE STATUS\n\nThis statement provides status information on essential parameters of\nthe slave threads. It requires either the SUPER or REPLICATION CLIENT\nprivilege.\n\nIf you issue this statement using the mysql client, you can use a \\G\nstatement terminator rather than a semicolon to obtain a more readable\nvertical layout:\n\nmysql> SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n               Slave_IO_State: Waiting for master to send event\n                  Master_Host: localhost\n                  Master_User: root\n                  Master_Port: 3306\n                Connect_Retry: 3\n              Master_Log_File: gbichot-bin.005\n          Read_Master_Log_Pos: 79\n               Relay_Log_File: gbichot-relay-bin.005\n                Relay_Log_Pos: 548\n        Relay_Master_Log_File: gbichot-bin.005\n             Slave_IO_Running: Yes\n            Slave_SQL_Running: Yes\n              Replicate_Do_DB:\n          Replicate_Ignore_DB:\n           Replicate_Do_Table:\n       Replicate_Ignore_Table:\n      Replicate_Wild_Do_Table:\n  Replicate_Wild_Ignore_Table:\n                   Last_Errno: 0\n                   Last_Error:\n                 Skip_Counter: 0\n          Exec_Master_Log_Pos: 79\n              Relay_Log_Space: 552\n              Until_Condition: None\n               Until_Log_File:\n                Until_Log_Pos: 0\n           Master_SSL_Allowed: No\n           Master_SSL_CA_File:\n           Master_SSL_CA_Path:\n              Master_SSL_Cert:\n            Master_SSL_Cipher:\n               Master_SSL_Key:\n        Seconds_Behind_Master: 8\nMaster_SSL_Verify_Server_Cert: No\n                Last_IO_Errno: 0\n                Last_IO_Error:\n               Last_SQL_Errno: 0\n               Last_SQL_Error:\n  Replicate_Ignore_Server_Ids: 0\n             Master_Server_Id: 1\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-slave-status.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-slave-status.html'),(224,'GEOMETRY',34,'MySQL provides a standard way of creating spatial columns for geometry\ntypes, for example, with CREATE TABLE or ALTER TABLE. Currently,\nspatial columns are supported for MyISAM, InnoDB, NDB, and ARCHIVE\ntables. See also the annotations about spatial indexes under [HELP\nSPATIAL].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-columns.html\n\n','CREATE TABLE geom (g GEOMETRY);\n','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-columns.html'),(225,'NUMPOINTS',13,'NumPoints(ls)\n\nReturns the number of Point objects in the LineString value ls.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT NumPoints(GeomFromText(@ls));\n+------------------------------+\n| NumPoints(GeomFromText(@ls)) |\n+------------------------------+\n|                            3 |\n+------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(226,'ALTER LOGFILE GROUP',39,'Syntax:\nALTER LOGFILE GROUP logfile_group\n    ADD UNDOFILE \'file_name\'\n    [INITIAL_SIZE [=] size]\n    [WAIT]\n    ENGINE [=] engine_name\n\nThis statement adds an UNDO file named \'file_name\' to an existing log\nfile group logfile_group. An ALTER LOGFILE GROUP statement has one and\nonly one ADD UNDOFILE clause. No DROP UNDOFILE clause is currently\nsupported.\n\n*Note*: All MySQL Cluster Disk Data objects share the same namespace.\nThis means that each Disk Data object must be uniquely named (and not\nmerely each Disk Data object of a given type). For example, you cannot\nhave a tablespace and an undo log file with the same name, or an undo\nlog file and a data file with the same name.\n\nThe optional INITIAL_SIZE parameter sets the UNDO file\'s initial size\nin bytes; if not specified, the initial size default to 128M (128\nmegabytes). You may optionally follow size with a one-letter\nabbreviation for an order of magnitude, similar to those used in\nmy.cnf. Generally, this is one of the letters M (for megabytes) or G\n(for gigabytes).\n\nOn 32-bit systems, the maximum supported value for INITIAL_SIZE is 4G.\n(Bug #29186)\n\nThe minimum permitted value for INITIAL_SIZE is 1M. (Bug #29574)\n\n*Note*: WAIT is parsed but otherwise ignored. This keyword currently\nhas no effect, and is intended for future expansion.\n\nThe ENGINE parameter (required) determines the storage engine which is\nused by this log file group, with engine_name being the name of the\nstorage engine. Currently, the only accepted values for engine_name are\n\"NDBCLUSTER\" and \"NDB\". The two values are equivalent.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-logfile-group.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-logfile-group.html'),(227,'&',19,'Syntax:\n&\n\nBitwise AND:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html\n\n','mysql> SELECT 29 & 15;\n        -> 13\n','http://dev.mysql.com/doc/refman/5.5/en/bit-functions.html'),(228,'LOCALTIMESTAMP',31,'Syntax:\nLOCALTIMESTAMP, LOCALTIMESTAMP()\n\nLOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(229,'ASSIGN-EQUAL',15,'Syntax:\n=\n\nThis operator is used to perform value assignments in two cases,\ndescribed in the next two paragraphs.\n\nWithin a SET statement, = is treated as an assignment operator that\ncauses the user variable on the left hand side of the operator to take\non the value to its right. (In other words, when used in a SET\nstatement, = is treated identically to :=.) The value on the right hand\nside may be a literal value, another variable storing a value, or any\nlegal expression that yields a scalar value, including the result of a\nquery (provided that this value is a scalar value). You can perform\nmultiple assignments in the same SET statement.\n\nIn the SET clause of an UPDATE statement, = also acts as an assignment\noperator; in this case, however, it causes the column named on the left\nhand side of the operator to assume the value given to the right,\nprovided any WHERE conditions that are part of the UPDATE are met. You\ncan make multiple assignments in the same SET clause of an UPDATE\nstatement.\n\nIn any other context, = is treated as a comparison operator.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html\n\n','mysql> SELECT @var1, @var2;\n        -> NULL, NULL\nmysql> SELECT @var1 := 1, @var2;\n        -> 1, NULL\nmysql> SELECT @var1, @var2;\n        -> 1, NULL\nmysql> SELECT @var1, @var2 := @var1;\n        -> 1, 1\nmysql> SELECT @var1, @var2;\n        -> 1, 1\n','http://dev.mysql.com/doc/refman/5.5/en/assignment-operators.html'),(230,'CONVERT',37,'Syntax:\nCONVERT(expr,type), CONVERT(expr USING transcoding_name)\n\nThe CONVERT() and CAST() functions take an expression of any type and\nproduce a result value of a specified type.\n\nThe type for the result can be one of the following values:\n\no BINARY[(N)]\n\no CHAR[(N)]\n\no DATE\n\no DATETIME\n\no DECIMAL[(M[,D])]\n\no SIGNED [INTEGER]\n\no TIME\n\no UNSIGNED [INTEGER]\n\nBINARY produces a string with the BINARY data type. See\nhttp://dev.mysql.com/doc/refman/5.5/en/binary-varbinary.html for a\ndescription of how this affects comparisons. If the optional length N\nis given, BINARY(N) causes the cast to use no more than N bytes of the\nargument. Values shorter than N bytes are padded with 0x00 bytes to a\nlength of N.\n\nCHAR(N) causes the cast to use no more than N characters of the\nargument.\n\nCAST() and CONVERT(... USING ...) are standard SQL syntax. The\nnon-USING form of CONVERT() is ODBC syntax.\n\nCONVERT() with USING is used to convert data between different\ncharacter sets. In MySQL, transcoding names are the same as the\ncorresponding character set names. For example, this statement converts\nthe string \'abc\' in the default character set to the corresponding\nstring in the utf8 character set:\n\nSELECT CONVERT(\'abc\' USING utf8);\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html\n\n','SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);\n','http://dev.mysql.com/doc/refman/5.5/en/cast-functions.html'),(231,'ADDDATE',31,'Syntax:\nADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)\n\nWhen invoked with the INTERVAL form of the second argument, ADDDATE()\nis a synonym for DATE_ADD(). The related function SUBDATE() is a\nsynonym for DATE_SUB(). For information on the INTERVAL unit argument,\nsee the discussion for DATE_ADD().\n\nmysql> SELECT DATE_ADD(\'2008-01-02\', INTERVAL 31 DAY);\n        -> \'2008-02-02\'\nmysql> SELECT ADDDATE(\'2008-01-02\', INTERVAL 31 DAY);\n        -> \'2008-02-02\'\n\nWhen invoked with the days form of the second argument, MySQL treats it\nas an integer number of days to be added to expr.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT ADDDATE(\'2008-01-02\', 31);\n        -> \'2008-02-02\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(232,'REPEAT LOOP',23,'Syntax:\n[begin_label:] REPEAT\n    statement_list\nUNTIL search_condition\nEND REPEAT [end_label]\n\nThe statement list within a REPEAT statement is repeated until the\nsearch_condition expression is true. Thus, a REPEAT always enters the\nloop at least once. statement_list consists of one or more statements,\neach terminated by a semicolon (;) statement delimiter.\n\nA REPEAT statement can be labeled. For the rules regarding label use,\nsee [HELP labels].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/repeat.html\n\n','mysql> delimiter //\n\nmysql> CREATE PROCEDURE dorepeat(p1 INT)\n    -> BEGIN\n    ->   SET @x = 0;\n    ->   REPEAT\n    ->     SET @x = @x + 1;\n    ->   UNTIL @x > p1 END REPEAT;\n    -> END\n    -> //\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> CALL dorepeat(1000)//\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> SELECT @x//\n+------+\n| @x   |\n+------+\n| 1001 |\n+------+\n1 row in set (0.00 sec)\n','http://dev.mysql.com/doc/refman/5.5/en/repeat.html'),(233,'ALTER FUNCTION',39,'Syntax:\nALTER FUNCTION func_name [characteristic ...]\n\ncharacteristic:\n    COMMENT \'string\'\n  | LANGUAGE SQL\n  | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n  | SQL SECURITY { DEFINER | INVOKER }\n\nThis statement can be used to change the characteristics of a stored\nfunction. More than one change may be specified in an ALTER FUNCTION\nstatement. However, you cannot change the parameters or body of a\nstored function using this statement; to make such changes, you must\ndrop and re-create the function using DROP FUNCTION and CREATE\nFUNCTION.\n\nYou must have the ALTER ROUTINE privilege for the function. (That\nprivilege is granted automatically to the function creator.) If binary\nlogging is enabled, the ALTER FUNCTION statement might also require the\nSUPER privilege, as described in\nhttp://dev.mysql.com/doc/refman/5.5/en/stored-programs-logging.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/alter-function.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/alter-function.html'),(234,'SMALLINT',22,'SMALLINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA small integer. The signed range is -32768 to 32767. The unsigned\nrange is 0 to 65535.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(235,'DOUBLE PRECISION',22,'DOUBLE PRECISION[(M,D)] [UNSIGNED] [ZEROFILL], REAL[(M,D)] [UNSIGNED]\n[ZEROFILL]\n\nThese types are synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT\nSQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(236,'ORD',37,'Syntax:\nORD(str)\n\nIf the leftmost character of the string str is a multi-byte character,\nreturns the code for that character, calculated from the numeric values\nof its constituent bytes using this formula:\n\n  (1st byte code)\n+ (2nd byte code * 256)\n+ (3rd byte code * 2562) ...\n\nIf the leftmost character is not a multi-byte character, ORD() returns\nthe same value as the ASCII() function.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT ORD(\'2\');\n        -> 50\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(237,'DEALLOCATE PREPARE',8,'Syntax:\n{DEALLOCATE | DROP} PREPARE stmt_name\n\nTo deallocate a prepared statement produced with PREPARE, use a\nDEALLOCATE PREPARE statement that refers to the prepared statement\nname. Attempting to execute a prepared statement after deallocating it\nresults in an error.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/deallocate-prepare.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/deallocate-prepare.html'),(238,'ENVELOPE',36,'Envelope(g)\n\nReturns the Minimum Bounding Rectangle (MBR) for the geometry value g.\nThe result is returned as a Polygon value.\n\nThe polygon is defined by the corner points of the bounding box:\n\nPOLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','mysql> SELECT AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\')));\n+-------------------------------------------------------+\n| AsText(Envelope(GeomFromText(\'LineString(1 1,2 2)\'))) |\n+-------------------------------------------------------+\n| POLYGON((1 1,2 1,2 2,1 2,1 1))                        |\n+-------------------------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(239,'IS_FREE_LOCK',14,'Syntax:\nIS_FREE_LOCK(str)\n\nChecks whether the lock named str is free to use (that is, not locked).\nReturns 1 if the lock is free (no one is using the lock), 0 if the lock\nis in use, and NULL if an error occurs (such as an incorrect argument).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(240,'TOUCHES',30,'Touches(g1,g2)\n\nReturns 1 or 0 to indicate whether g1 spatially touches g2. Two\ngeometries spatially touch if the interiors of the geometries do not\nintersect, but the boundary of one of the geometries intersects either\nthe boundary or the interior of the other.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries\n\n','','http://dev.mysql.com/doc/refman/5.5/en/functions-for-testing-spatial-relations-between-geometric-objects.html#functions-that-test-spatial-relationships-between-geometries'),(241,'INET_ATON',14,'Syntax:\nINET_ATON(expr)\n\nGiven the dotted-quad representation of an IPv4 network address as a\nstring, returns an integer that represents the numeric value of the\naddress in network byte order (big endian). INET_ATON() returns NULL if\nit does not understand its argument.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html\n\n','mysql> SELECT INET_ATON(\'10.0.5.9\');\n        -> 167773449\n','http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html'),(242,'UNCOMPRESS',12,'Syntax:\nUNCOMPRESS(string_to_uncompress)\n\nUncompresses a string compressed by the COMPRESS() function. If the\nargument is not a compressed value, the result is NULL. This function\nrequires MySQL to have been compiled with a compression library such as\nzlib. Otherwise, the return value is always NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT UNCOMPRESS(COMPRESS(\'any string\'));\n        -> \'any string\'\nmysql> SELECT UNCOMPRESS(\'any string\');\n        -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(243,'AUTO_INCREMENT',22,'The AUTO_INCREMENT attribute can be used to generate a unique identity\nfor new rows:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html\n\n','CREATE TABLE animals (\n     id MEDIUMINT NOT NULL AUTO_INCREMENT,\n     name CHAR(30) NOT NULL,\n     PRIMARY KEY (id)\n);\n\nINSERT INTO animals (name) VALUES\n    (\'dog\'),(\'cat\'),(\'penguin\'),\n    (\'lax\'),(\'whale\'),(\'ostrich\');\n\nSELECT * FROM animals;\n','http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html'),(244,'ISSIMPLE',36,'IsSimple(g)\n\nCurrently, this function is a placeholder and should not be used. If\nimplemented, its behavior will be as described in the next paragraph.\n\nReturns 1 if the geometry value g has no anomalous geometric points,\nsuch as self-intersection or self-tangency. IsSimple() returns 0 if the\nargument is not simple, and -1 if it is NULL.\n\nThe description of each instantiable geometric class given earlier in\nthe chapter includes the specific conditions that cause an instance of\nthat class to be classified as not simple. (See [HELP Geometry\nhierarchy].)\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#general-geometry-property-functions'),(245,'- BINARY',4,'Syntax:\n-\n\nSubtraction:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 3-5;\n        -> -2\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(246,'GEOMCOLLFROMTEXT',3,'GeomCollFromText(wkt[,srid]), GeometryCollectionFromText(wkt[,srid])\n\nConstructs a GEOMETRYCOLLECTION value using its WKT representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkt-functions'),(247,'WKT DEFINITION',3,'The Well-Known Text (WKT) representation of Geometry is designed to\nexchange geometry data in ASCII form. For a Backus-Naur grammar that\nspecifies the formal production rules for writing WKT values, see the\nOpenGIS specification document referenced in\nhttp://dev.mysql.com/doc/refman/5.5/en/spatial-extensions.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/gis-wkt-format.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/gis-wkt-format.html'),(248,'CURRENT_TIME',31,'Syntax:\nCURRENT_TIME, CURRENT_TIME()\n\nCURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(249,'REVOKE',10,'Syntax:\nREVOKE\n    priv_type [(column_list)]\n      [, priv_type [(column_list)]] ...\n    ON [object_type] priv_level\n    FROM user [, user] ...\n\nREVOKE ALL PRIVILEGES, GRANT OPTION\n    FROM user [, user] ...\n\nREVOKE PROXY ON user\n    FROM user [, user] ...\n\nThe REVOKE statement enables system administrators to revoke privileges\nfrom MySQL accounts. Each account name uses the format described in\nhttp://dev.mysql.com/doc/refman/5.5/en/account-names.html. For example:\n\nREVOKE INSERT ON *.* FROM \'jeffrey\'@\'localhost\';\n\nIf you specify only the user name part of the account name, a host name\npart of \'%\' is used.\n\nFor details on the levels at which privileges exist, the permissible\npriv_type and priv_level values, and the syntax for specifying users\nand passwords, see [HELP GRANT]\n\nTo use the first REVOKE syntax, you must have the GRANT OPTION\nprivilege, and you must have the privileges that you are revoking.\n\nTo revoke all privileges, use the second syntax, which drops all\nglobal, database, table, column, and routine privileges for the named\nuser or users:\n\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...\n\nTo use this REVOKE syntax, you must have the global CREATE USER\nprivilege or the UPDATE privilege for the mysql database.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/revoke.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/revoke.html'),(250,'LAST_INSERT_ID',17,'Syntax:\nLAST_INSERT_ID(), LAST_INSERT_ID(expr)\n\nLAST_INSERT_ID() (with no argument) returns a BIGINT (64-bit) value\nrepresenting the first automatically generated value successfully\ninserted for an AUTO_INCREMENT column as a result of the most recently\nexecuted INSERT statement. The value of LAST_INSERT_ID() remains\nunchanged if no rows are successfully inserted.\n\nFor example, after inserting a row that generates an AUTO_INCREMENT\nvalue, you can get the value like this:\n\nmysql> SELECT LAST_INSERT_ID();\n        -> 195\n\nThe currently executing statement does not affect the value of\nLAST_INSERT_ID(). Suppose that you generate an AUTO_INCREMENT value\nwith one statement, and then refer to LAST_INSERT_ID() in a\nmultiple-row INSERT statement that inserts rows into a table with its\nown AUTO_INCREMENT column. The value of LAST_INSERT_ID() will remain\nstable in the second statement; its value for the second and later rows\nis not affected by the earlier row insertions. (However, if you mix\nreferences to LAST_INSERT_ID() and LAST_INSERT_ID(expr), the effect is\nundefined.)\n\nIf the previous statement returned an error, the value of\nLAST_INSERT_ID() is undefined. For transactional tables, if the\nstatement is rolled back due to an error, the value of LAST_INSERT_ID()\nis left undefined. For manual ROLLBACK, the value of LAST_INSERT_ID()\nis not restored to that before the transaction; it remains as it was at\nthe point of the ROLLBACK.\n\nWithin the body of a stored routine (procedure or function) or a\ntrigger, the value of LAST_INSERT_ID() changes the same way as for\nstatements executed outside the body of these kinds of objects. The\neffect of a stored routine or trigger upon the value of\nLAST_INSERT_ID() that is seen by following statements depends on the\nkind of routine:\n\no If a stored procedure executes statements that change the value of\n  LAST_INSERT_ID(), the changed value is seen by statements that follow\n  the procedure call.\n\no For stored functions and triggers that change the value, the value is\n  restored when the function or trigger ends, so following statements\n  will not see a changed value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(251,'LAST_DAY',31,'Syntax:\nLAST_DAY(date)\n\nTakes a date or datetime value and returns the corresponding value for\nthe last day of the month. Returns NULL if the argument is invalid.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT LAST_DAY(\'2003-02-05\');\n        -> \'2003-02-28\'\nmysql> SELECT LAST_DAY(\'2004-02-05\');\n        -> \'2004-02-29\'\nmysql> SELECT LAST_DAY(\'2004-01-01 01:01:01\');\n        -> \'2004-01-31\'\nmysql> SELECT LAST_DAY(\'2003-03-32\');\n        -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(252,'MEDIUMINT',22,'MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]\n\nA medium-sized integer. The signed range is -8388608 to 8388607. The\nunsigned range is 0 to 16777215.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html'),(253,'FLOOR',4,'Syntax:\nFLOOR(X)\n\nReturns the largest integer value not greater than X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT FLOOR(1.23);\n        -> 1\nmysql> SELECT FLOOR(-1.23);\n        -> -2\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(254,'RTRIM',37,'Syntax:\nRTRIM(str)\n\nReturns the string str with trailing space characters removed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT RTRIM(\'barbar   \');\n        -> \'barbar\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(255,'EXPLAIN',28,'Syntax:\nEXPLAIN [explain_type] SELECT select_options\n\nexplain_type:\n    EXTENDED\n  | PARTITIONS\n\nOr:\n\nEXPLAIN tbl_name\n\nThe EXPLAIN statement can be used either as a way to obtain information\nabout how MySQL executes a statement, or as a synonym for DESCRIBE:\n\no When you precede a SELECT statement with the keyword EXPLAIN, MySQL\n  displays information from the optimizer about the query execution\n  plan. That is, MySQL explains how it would process the statement,\n  including information about how tables are joined and in which order.\n  EXPLAIN EXTENDED can be used to obtain additional information.\n\n  For information about using EXPLAIN and EXPLAIN EXTENDED to obtain\n  query execution plan information, see\n  http://dev.mysql.com/doc/refman/5.5/en/using-explain.html.\n\no EXPLAIN PARTITIONS is useful only when examining queries involving\n  partitioned tables. For details, see\n  http://dev.mysql.com/doc/refman/5.5/en/partitioning-info.html.\n\no EXPLAIN tbl_name is synonymous with DESCRIBE tbl_name or SHOW COLUMNS\n  FROM tbl_name. For information about DESCRIBE and SHOW COLUMNS, see\n  [HELP DESCRIBE], and [HELP SHOW COLUMNS].\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/explain.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/explain.html'),(256,'DEGREES',4,'Syntax:\nDEGREES(X)\n\nReturns the argument X, converted from radians to degrees.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT DEGREES(PI());\n        -> 180\nmysql> SELECT DEGREES(PI() / 2);\n        -> 90\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(257,'VARCHAR',22,'[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE\ncollation_name]\n\nA variable-length string. M represents the maximum column length in\ncharacters. The range of M is 0 to 65,535. The effective maximum length\nof a VARCHAR is subject to the maximum row size (65,535 bytes, which is\nshared among all columns) and the character set used. For example, utf8\ncharacters can require up to three bytes per character, so a VARCHAR\ncolumn that uses the utf8 character set can be declared to be a maximum\nof 21,844 characters. See\nhttp://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.\n\nMySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus\ndata. The length prefix indicates the number of bytes in the value. A\nVARCHAR column uses one length byte if values require no more than 255\nbytes, two length bytes if values may require more than 255 bytes.\n\n*Note*: MySQL 5.5 follows the standard SQL specification, and does not\nremove trailing spaces from VARCHAR values.\n\nVARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the\nstandard SQL way to define that a VARCHAR column should use some\npredefined character set. MySQL 4.1 and up uses utf8 as this predefined\ncharacter set.\nhttp://dev.mysql.com/doc/refman/5.5/en/charset-national.html. NVARCHAR\nis shorthand for NATIONAL VARCHAR.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(258,'UNHEX',37,'Syntax:\n\nUNHEX(str)\n\nFor a string argument str, UNHEX(str) performs the inverse operation of\nHEX(str). That is, it interprets each pair of characters in the\nargument as a hexadecimal number and converts it to the character\nrepresented by the number. The return value is a binary string.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT UNHEX(\'4D7953514C\');\n        -> \'MySQL\'\nmysql> SELECT 0x4D7953514C;\n        -> \'MySQL\'\nmysql> SELECT UNHEX(HEX(\'string\'));\n        -> \'string\'\nmysql> SELECT HEX(UNHEX(\'1267\'));\n        -> \'1267\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(259,'- UNARY',4,'Syntax:\n-\n\nUnary minus. This operator changes the sign of the operand.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT - 2;\n        -> -2\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(260,'STD',16,'Syntax:\nSTD(expr)\n\nReturns the population standard deviation of expr. This is an extension\nto standard SQL. The standard SQL function STDDEV_POP() can be used\ninstead.\n\nThis function returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(261,'COS',4,'Syntax:\nCOS(X)\n\nReturns the cosine of X, where X is given in radians.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT COS(PI());\n        -> -1\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(262,'DATE FUNCTION',31,'Syntax:\nDATE(expr)\n\nExtracts the date part of the date or datetime expression expr.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT DATE(\'2003-12-31 01:02:03\');\n        -> \'2003-12-31\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(263,'DROP TRIGGER',39,'Syntax:\nDROP TRIGGER [IF EXISTS] [schema_name.]trigger_name\n\nThis statement drops a trigger. The schema (database) name is optional.\nIf the schema is omitted, the trigger is dropped from the default\nschema. DROP TRIGGER requires the TRIGGER privilege for the table\nassociated with the trigger.\n\nUse IF EXISTS to prevent an error from occurring for a trigger that\ndoes not exist. A NOTE is generated for a nonexistent trigger when\nusing IF EXISTS. See [HELP SHOW WARNINGS].\n\nTriggers for a table are also dropped if you drop the table.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-trigger.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-trigger.html'),(264,'RESET MASTER',8,'Syntax:\nRESET MASTER\n\nDeletes all binary log files listed in the index file, resets the\nbinary log index file to be empty, and creates a new binary log file.\nThis statement is intended to be used only when the master is started\nfor the first time.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/reset-master.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/reset-master.html'),(265,'TAN',4,'Syntax:\nTAN(X)\n\nReturns the tangent of X, where X is given in radians.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT TAN(PI());\n        -> -1.2246063538224e-16\nmysql> SELECT TAN(PI()+1);\n        -> 1.5574077246549\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(266,'PI',4,'Syntax:\nPI()\n\nReturns the value of π (pi). The default number of decimal places\ndisplayed is seven, but MySQL uses the full double-precision value\ninternally.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT PI();\n        -> 3.141593\nmysql> SELECT PI()+0.000000000000000000;\n        -> 3.141592653589793116\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(267,'WEEKOFYEAR',31,'Syntax:\nWEEKOFYEAR(date)\n\nReturns the calendar week of the date as a number in the range from 1\nto 53. WEEKOFYEAR() is a compatibility function that is equivalent to\nWEEK(date,3).\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT WEEKOFYEAR(\'2008-02-20\');\n        -> 8\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(268,'/',4,'Syntax:\n/\n\nDivision:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html\n\n','mysql> SELECT 3/5;\n        -> 0.60\n','http://dev.mysql.com/doc/refman/5.5/en/arithmetic-functions.html'),(269,'PURGE BINARY LOGS',8,'Syntax:\nPURGE { BINARY | MASTER } LOGS\n    { TO \'log_name\' | BEFORE datetime_expr }\n\nThe binary log is a set of files that contain information about data\nmodifications made by the MySQL server. The log consists of a set of\nbinary log files, plus an index file (see\nhttp://dev.mysql.com/doc/refman/5.5/en/binary-log.html).\n\nThe PURGE BINARY LOGS statement deletes all the binary log files listed\nin the log index file prior to the specified log file name or date.\nBINARY and MASTER are synonyms. Deleted log files also are removed from\nthe list recorded in the index file, so that the given log file becomes\nthe first in the list.\n\nThis statement has no effect if the server was not started with the\n--log-bin option to enable binary logging.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/purge-binary-logs.html\n\n','PURGE BINARY LOGS TO \'mysql-bin.010\';\nPURGE BINARY LOGS BEFORE \'2008-04-02 22:46:26\';\n','http://dev.mysql.com/doc/refman/5.5/en/purge-binary-logs.html'),(270,'STDDEV_SAMP',16,'Syntax:\nSTDDEV_SAMP(expr)\n\nReturns the sample standard deviation of expr (the square root of\nVAR_SAMP().\n\nSTDDEV_SAMP() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(271,'SCHEMA',17,'Syntax:\nSCHEMA()\n\nThis function is a synonym for DATABASE().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/information-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/information-functions.html'),(272,'MLINEFROMWKB',32,'MLineFromWKB(wkb[,srid]), MultiLineStringFromWKB(wkb[,srid])\n\nConstructs a MULTILINESTRING value using its WKB representation and\nSRID.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions\n\n','','http://dev.mysql.com/doc/refman/5.5/en/creating-spatial-values.html#gis-wkb-functions'),(273,'LOG2',4,'Syntax:\nLOG2(X)\n\nReturns the base-2 logarithm of X.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT LOG2(65536);\n        -> 16\nmysql> SELECT LOG2(-100);\n        -> NULL\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(274,'SUBTIME',31,'Syntax:\nSUBTIME(expr1,expr2)\n\nSUBTIME() returns expr1 - expr2 expressed as a value in the same format\nas expr1. expr1 is a time or datetime expression, and expr2 is a time\nexpression.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT SUBTIME(\'2007-12-31 23:59:59.999999\',\'1 1:1:1.000002\');\n        -> \'2007-12-30 22:58:58.999997\'\nmysql> SELECT SUBTIME(\'01:00:00.999999\', \'02:00:00.999998\');\n        -> \'-00:59:59.999999\'\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(275,'UNCOMPRESSED_LENGTH',12,'Syntax:\nUNCOMPRESSED_LENGTH(compressed_string)\n\nReturns the length that the compressed string had before being\ncompressed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html\n\n','mysql> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT(\'a\',30)));\n        -> 30\n','http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html'),(276,'DROP TABLE',39,'Syntax:\nDROP [TEMPORARY] TABLE [IF EXISTS]\n    tbl_name [, tbl_name] ...\n    [RESTRICT | CASCADE]\n\nDROP TABLE removes one or more tables. You must have the DROP privilege\nfor each table. All table data and the table definition are removed, so\nbe careful with this statement! If any of the tables named in the\nargument list do not exist, MySQL returns an error indicating by name\nwhich nonexisting tables it was unable to drop, but it also drops all\nof the tables in the list that do exist.\n\n*Important*: When a table is dropped, user privileges on the table are\nnot automatically dropped. See [HELP GRANT].\n\nNote that for a partitioned table, DROP TABLE permanently removes the\ntable definition, all of its partitions, and all of the data which was\nstored in those partitions. It also removes the partitioning definition\n(.par) file associated with the dropped table.\n\nUse IF EXISTS to prevent an error from occurring for tables that do not\nexist. A NOTE is generated for each nonexistent table when using IF\nEXISTS. See [HELP SHOW WARNINGS].\n\nRESTRICT and CASCADE are permitted to make porting easier. In MySQL\n5.5, they do nothing.\n\n*Note*: DROP TABLE automatically commits the current active\ntransaction, unless you use the TEMPORARY keyword.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/drop-table.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/drop-table.html'),(277,'POW',4,'Syntax:\nPOW(X,Y)\n\nReturns the value of X raised to the power of Y.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT POW(2,2);\n        -> 4\nmysql> SELECT POW(2,-2);\n        -> 0.25\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(278,'SHOW CREATE TABLE',26,'Syntax:\nSHOW CREATE TABLE tbl_name\n\nShows the CREATE TABLE statement that creates the given table. To use\nthis statement, you must have some privilege for the table. This\nstatement also works with views.\nSHOW CREATE TABLE quotes table and column names according to the value\nof the sql_quote_show_create option. See\nhttp://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-create-table.html\n\n','mysql> SHOW CREATE TABLE t\\G\n*************************** 1. row ***************************\n       Table: t\nCreate Table: CREATE TABLE t (\n  id INT(11) default NULL auto_increment,\n  s char(60) default NULL,\n  PRIMARY KEY (id)\n) ENGINE=MyISAM\n','http://dev.mysql.com/doc/refman/5.5/en/show-create-table.html'),(279,'DUAL',27,'You are permitted to specify DUAL as a dummy table name in situations\nwhere no tables are referenced:\n\nmysql> SELECT 1 + 1 FROM DUAL;\n        -> 2\n\nDUAL is purely for the convenience of people who require that all\nSELECT statements should have FROM and possibly other clauses. MySQL\nmay ignore the clauses. MySQL does not require FROM DUAL if no tables\nare referenced.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/select.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/select.html'),(280,'INSTR',37,'Syntax:\nINSTR(str,substr)\n\nReturns the position of the first occurrence of substring substr in\nstring str. This is the same as the two-argument form of LOCATE(),\nexcept that the order of the arguments is reversed.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT INSTR(\'foobarbar\', \'bar\');\n        -> 4\nmysql> SELECT INSTR(\'xbar\', \'foobar\');\n        -> 0\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(281,'NOW',31,'Syntax:\nNOW()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context. The value is expressed in the\ncurrent time zone.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html\n\n','mysql> SELECT NOW();\n        -> \'2007-12-15 23:50:26\'\nmysql> SELECT NOW() + 0;\n        -> 20071215235026.000000\n','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html'),(282,'SHOW ENGINES',26,'Syntax:\nSHOW [STORAGE] ENGINES\n\nSHOW ENGINES displays status information about the server\'s storage\nengines. This is particularly useful for checking whether a storage\nengine is supported, or to see what the default engine is.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/show-engines.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/show-engines.html'),(283,'>=',18,'Syntax:\n>=\n\nGreater than or equal:\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html\n\n','mysql> SELECT 2 >= 2;\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html'),(284,'EXP',4,'Syntax:\nEXP(X)\n\nReturns the value of e (the base of natural logarithms) raised to the\npower of X. The inverse of this function is LOG() (using a single\nargument only) or LN().\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html\n\n','mysql> SELECT EXP(2);\n        -> 7.3890560989307\nmysql> SELECT EXP(-2);\n        -> 0.13533528323661\nmysql> SELECT EXP(0);\n        -> 1\n','http://dev.mysql.com/doc/refman/5.5/en/mathematical-functions.html'),(285,'LONGBLOB',22,'LONGBLOB\n\nA BLOB column with a maximum length of 4,294,967,295 or 4GB (232 - 1)\nbytes. The effective maximum length of LONGBLOB columns depends on the\nconfigured maximum packet size in the client/server protocol and\navailable memory. Each LONGBLOB value is stored using a 4-byte length\nprefix that indicates the number of bytes in the value.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html'),(286,'POINTN',13,'PointN(ls,N)\n\nReturns the N-th Point in the Linestring value ls. Points are numbered\nbeginning with 1.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions\n\n','mysql> SET @ls = \'LineString(1 1,2 2,3 3)\';\nmysql> SELECT AsText(PointN(GeomFromText(@ls),2));\n+-------------------------------------+\n| AsText(PointN(GeomFromText(@ls),2)) |\n+-------------------------------------+\n| POINT(2 2)                          |\n+-------------------------------------+\n','http://dev.mysql.com/doc/refman/5.5/en/geometry-property-functions.html#linestring-property-functions'),(287,'YEAR DATA TYPE',22,'YEAR[(2|4)]\n\nA year in two-digit or four-digit format. The default is four-digit\nformat. YEAR(2) or YEAR(4) differ in display format, but have the same\nrange of values. In four-digit format, values display as 1901 to 2155,\nand 0000. In two-digit format, values display as 70 to 69, representing\nyears from 1970 to 2069. MySQL displays YEAR values in YYYY or\nYYformat, but permits assignment of values to YEAR columns using either\nstrings or numbers.\n\n*Note*: The YEAR(2) data type has certain issues that you should\nconsider before choosing to use it. As of MySQL 5.5.27, YEAR(2) is\ndeprecated. For more information, see\nhttp://dev.mysql.com/doc/refman/5.5/en/migrating-to-year4.html.\n\nFor additional information about YEAR display format and inerpretation\nof input values, see http://dev.mysql.com/doc/refman/5.5/en/year.html.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.html'),(288,'SUM',16,'Syntax:\nSUM([DISTINCT] expr)\n\nReturns the sum of expr. If the return set has no rows, SUM() returns\nNULL. The DISTINCT keyword can be used to sum only the distinct values\nof expr.\n\nSUM() returns NULL if there were no matching rows.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html\n\n','','http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html'),(289,'OCT',37,'Syntax:\nOCT(N)\n\nReturns a string representation of the octal value of N, where N is a\nlonglong (BIGINT) number. This is equivalent to CONV(N,10,8). Returns\nNULL if N is NULL.\n\nURL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html\n\n','mysql> SELECT OCT(12);\n        -> \'14\'\n','http://dev.mysql.com/doc/refman/5.5/en/string-functions.html'),(290,'SYSDATE',31,'Syntax:\nSYSDATE()\n\nReturns the current date and time as a value in \'YYYY-MM-DD HH:MM:SS\'\nor YYYYMMDDHHMMSS.uuuuuu format, depending on whether the function is\nused in a string or numeric context.\n\nSYSDATE() return