diff --git a/BuildTools/CommonDistFiles/GPLv3.txt b/BuildTools/CommonDistFiles/GPLv3.txt
new file mode 100644
index 000000000..10926e87f
--- /dev/null
+++ b/BuildTools/CommonDistFiles/GPLv3.txt
@@ -0,0 +1,675 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
+
diff --git a/BuildTools/CommonDistFiles/copyright.txt b/BuildTools/CommonDistFiles/copyright.txt
new file mode 100644
index 000000000..39552cae6
--- /dev/null
+++ b/BuildTools/CommonDistFiles/copyright.txt
@@ -0,0 +1,17 @@
+GeoDa TM, Copyright (C) 2011-2014 by Luc Anselin - all rights reserved
+
+This file is part of GeoDa.
+
+GeoDa is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GeoDa is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+
diff --git a/BuildTools/CommonDistFiles/geoda-logos/GeoDa-no-text-16x16.xpm b/BuildTools/CommonDistFiles/geoda-logos/GeoDa-no-text-16x16.xpm
new file mode 100755
index 000000000..d7c096fd9
--- /dev/null
+++ b/BuildTools/CommonDistFiles/geoda-logos/GeoDa-no-text-16x16.xpm
@@ -0,0 +1,96 @@
+/* XPM */
+static char * GeoDa_no_text_16x16_xpm[] = {
+"16 16 77 1",
+" c None",
+". c #E57216",
+"+ c #E67316",
+"@ c #AFE004",
+"# c #C7AF0C",
+"$ c #E47215",
+"% c #E57215",
+"& c #E67315",
+"* c #04E038",
+"= c #18DF31",
+"- c #CD9611",
+"; c #E67216",
+"> c #E57315",
+", c #04C9D1",
+"' c #4BDC35",
+") c #B6C00A",
+"! c #E57316",
+"~ c #2304E0",
+"{ c #107DA7",
+"] c #85DF10",
+"^ c #D2980F",
+"/ c #E67215",
+"( c #E47315",
+"_ c #1749DF",
+": c #04DC50",
+"< c #3DDF25",
+"[ c #AFE003",
+"} c #AEDE04",
+"| c #DD8013",
+"1 c #2304DF",
+"2 c #2204DF",
+"3 c #0C97AC",
+"4 c #04DF37",
+"5 c #2CDE2B",
+"6 c #96DF0B",
+"7 c #AEDF03",
+"8 c #C5B10B",
+"9 c #D39510",
+"0 c #E57314",
+"a c #1F19E0",
+"b c #04D09E",
+"c c #34DF28",
+"d c #ADDE03",
+"e c #AEE004",
+"f c #D78C11",
+"g c #E57214",
+"h c #1A35DF",
+"i c #03C8DF",
+"j c #04C9E0",
+"k c #04D19D",
+"l c #1DDD3B",
+"m c #77DF14",
+"n c #B7CE06",
+"o c #DF7E14",
+"p c #1C28DF",
+"q c #193CDF",
+"r c #03C4DF",
+"s c #03C5D5",
+"t c #04E037",
+"u c #0DDF35",
+"v c #7CDF13",
+"w c #ACDF04",
+"x c #C2B70A",
+"y c #DD8312",
+"z c #C8AB0C",
+"A c #1269DF",
+"B c #03C9E0",
+"C c #04D86C",
+"D c #72DF16",
+"E c #AEDF04",
+"F c #1845DF",
+"G c #04DA62",
+"H c #04DA63",
+"I c #2204E0",
+"J c #1556DF",
+"K c #04BEE0",
+"L c #04C8E0",
+" ",
+" .++++ ",
+" @#+$%.& ",
+" *=-;++>++ ",
+" ,')+!>%%.% ",
+" ~{*]^/(>$.+& ",
+" _:<[}|/(+%+& ",
+" 123456789/0.%& ",
+"12ab4*cdef/g>&+ ",
+"~1hijklm[no.&! ",
+" 1pqrstuvwxyz ",
+" ~2ABC44D[E ",
+" ~2~FBGH ",
+" ~IJKL ",
+" ",
+" "};
diff --git a/BuildTools/CommonDistFiles/geoda-logos/Watertank.ttf b/BuildTools/CommonDistFiles/geoda-logos/Watertank.ttf
new file mode 100755
index 000000000..0c1282ee3
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/Watertank.ttf differ
diff --git a/BuildTools/CommonDistFiles/geoda-logos/geodalogo-orig.xcf b/BuildTools/CommonDistFiles/geoda-logos/geodalogo-orig.xcf
new file mode 100755
index 000000000..619d96180
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/geodalogo-orig.xcf differ
diff --git a/BuildTools/CommonDistFiles/geoda-logos/geodalogo-template.xcf b/BuildTools/CommonDistFiles/geoda-logos/geodalogo-template.xcf
new file mode 100755
index 000000000..9dd362668
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/geodalogo-template.xcf differ
diff --git a/BuildTools/CommonDistFiles/geoda-logos/geodalogo.psd b/BuildTools/CommonDistFiles/geoda-logos/geodalogo.psd
new file mode 100755
index 000000000..fe740499f
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/geodalogo.psd differ
diff --git a/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-logo-1800.png b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-logo-1800.png
new file mode 100755
index 000000000..ea0a539d5
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-logo-1800.png differ
diff --git a/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-logo-900.xcf b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-logo-900.xcf
new file mode 100644
index 000000000..7fe1d759a
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-logo-900.xcf differ
diff --git a/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-watermark.png b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-watermark.png
new file mode 100644
index 000000000..b0cac5e2f
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-watermark.png differ
diff --git a/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-watermark.xcf b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-watermark.xcf
new file mode 100644
index 000000000..9128ec1fc
Binary files /dev/null and b/BuildTools/CommonDistFiles/geoda-logos/png-logos/GeoDa-watermark.xcf differ
diff --git a/BuildTools/CommonDistFiles/macosx/READ ME BEFORE USING.rtf b/BuildTools/CommonDistFiles/macosx/READ ME BEFORE USING.rtf
new file mode 100644
index 000000000..9d7f74d3b
--- /dev/null
+++ b/BuildTools/CommonDistFiles/macosx/READ ME BEFORE USING.rtf
@@ -0,0 +1,17 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\margl1440\margr1440\vieww10980\viewh11000\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
+
+\f0\fs28 \cf0 To install GeoDa for Mac OSX 10.6.8 or later simply drag the GeoDa application to the Applications folder on your hard drive. Do not attempt to run GeoDa from within the virtual drive.\
+\
+
+\b Attention Mountain Lion (10.8) and Mavericks (10.9) users.
+\b0 Please note that you will get a warning message about this program coming from an unknown developer the first time you try to open it. Use control-click and select open to open the program (instead of double click) and accept at the prompt. You will not be asked this again. However, in order for this to work, you need to set your Security & Privacy preferences to Mac App Store and identified developers; the default is Mac App store only, which will NOT WORK for GeoDa.\
+\
+\
+
+\b Note on Oracle and ESRI FileGDB databases
+\b0 \
+GeoDa supports many different file formats and databases natively for reading/writing data. However, certain databases such as Oracle and ESRI FileGDB require additional setup. Please refer to {\field{\*\fldinst{HYPERLINK "https://geodacenter.asu.edu/geoda/formats"}}{\fldrslt https://geodacenter.asu.edu/geoda/formats}} for additional instructions. A setup script for these databases is located in the scripts directory.}
\ No newline at end of file
diff --git a/BuildTools/centos/GNUmakefile b/BuildTools/centos/GNUmakefile
new file mode 100644
index 000000000..b9635c2b4
--- /dev/null
+++ b/BuildTools/centos/GNUmakefile
@@ -0,0 +1,85 @@
+ifndef GEODA_HOME
+$(error You have to setup GEODA_HOME variable e.g. export GEODA_HOME=PWD, or run build.sh)
+endif
+
+include ../../GeoDamake.opt
+
+GeoDa_OBJ = $(wildcard $(GeoDa_ROOT)/o/*.o)
+
+default: compile-geoda
+
+app: build-geoda-mac
+
+compile-geoda: dataviewer-target generic-target dialogtools-target \
+ explore-target knn-target regression-target\
+ shapeoperations-target resource-target geoda-target
+
+conf = `./libraries/bin/wx-config --libs`
+
+test1:
+ @echo test $(WX_HEADER) $(LIBS)
+
+resource-target:
+ (cd $(GeoDa_ROOT)/rc; $(MAKE) xrc; $(MAKE))
+
+dataviewer-target:
+ (cd $(GeoDa_ROOT)/DataViewer; $(MAKE))
+
+generic-target:
+ (cd $(GeoDa_ROOT)/Generic; $(MAKE))
+
+dialogtools-target:
+ (cd $(GeoDa_ROOT)/DialogTools; $(MAKE))
+
+explore-target:
+ (cd $(GeoDa_ROOT)/Explore; $(MAKE))
+
+knn-target:
+ (cd $(GeoDa_ROOT)/kNN; $(MAKE))
+
+regression-target:
+ (cd $(GeoDa_ROOT)/Regression; $(MAKE))
+
+shapeoperations-target:
+ (cd $(GeoDa_ROOT)/ShapeOperations; $(MAKE))
+
+geoda-target:
+ (cd $(GeoDa_ROOT); $(MAKE))
+
+build-geoda-mac:
+ rm -rf build
+ mkdir -p build
+ mkdir build/Resources
+ mkdir build/gdaldata
+ mkdir build/plugins
+ $(LD) $(LDFLAGS) $(GeoDa_OBJ) $(LIBS) -o build/GeoDa
+ cp run.sh build/run.sh
+ chmod +x build/run.sh
+ cp $(GeoDa_ROOT)/rc/data_viewer_dialogs.xrc build/Resources
+ cp $(GeoDa_ROOT)/rc/dialogs.xrc build/Resources
+ cp $(GeoDa_ROOT)/rc/GeoDa.icns build/Resources
+ cp $(GeoDa_ROOT)/rc/menus.xrc build/Resources
+ cp $(GeoDa_ROOT)/rc/toolbar.xrc build/Resources
+ cp $(GEODA_HOME)/libraries/lib/libgdal.so.1.16.2 build/plugins/libgdal.so.1
+ cp $(GEODA_HOME)/libraries/lib/libkmldom.so.0.0.0 build/plugins/libkmldom.so.0
+ cp $(GEODA_HOME)/libraries/lib/libkmlengine.so.0.0.0 build/plugins/libkmlengine.so.0
+ cp $(GEODA_HOME)/libraries/lib/libkmlbase.so.0.0.0 build/plugins/libkmlbase.so.0
+ cp $(GEODA_HOME)/libraries/lib/libkmlxsd.so.0.0.0 build/plugins/libkmlxsd.so.0
+ cp $(GEODA_HOME)/libraries/lib/libxerces-c-3.1.so build/plugins/libxerces-c-3.1.so
+ cp $(GEODA_HOME)/libraries/lib/libspatialite.so.5.0.1 build/plugins/libspatialite.so.5
+ cp $(GEODA_HOME)/libraries/lib/libfreexl.so.1.0.0 build/plugins/libfreexl.so.1
+ cp $(GEODA_HOME)/libraries/lib/libproj.so.0.7.0 build/plugins/libproj.so.0
+ cp $(GEODA_HOME)/libraries/lib/libgeos_c.so.1.7.8 build/plugins/libgeos_c.so.1
+ cp $(GEODA_HOME)/libraries/lib/libsqlite3.so.0.8.6 build/plugins/libsqlite3.so.0
+ cp $(GEODA_HOME)/libraries/lib/libiconv.so.2.5.0 build/plugins/libiconv.so.2
+ cp $(GEODA_HOME)/libraries/lib/libcharset.so.1.0.0 build/plugins/libcharset.so.1
+ chmod +x build/plugins/libiconv.so.2
+ cp $(GEODA_HOME)/libraries/lib/libminizip.so.0.0.0 build/plugins/libminizip.so.0
+ cp $(GEODA_HOME)/libraries/lib/liburiparser.so.1.0.5 build/plugins/liburiparser.so.1
+ cp $(GEODA_HOME)/libraries/lib/libgeos-3.3.8.so build/plugins/
+ cp $(GEODA_HOME)/plugins/x64/*.so build/plugins/
+ cp libraries/share/gdal/* build/gdaldata
+
+clean:
+ rm -f ../../o/*
+ rm -rf build
diff --git a/BuildTools/centos/build64.sh b/BuildTools/centos/build64.sh
new file mode 100755
index 000000000..75b3e1d7f
--- /dev/null
+++ b/BuildTools/centos/build64.sh
@@ -0,0 +1,463 @@
+#!/bin/bash
+#############################################################################
+# ./build.sh
+# ./build.sh [CPU]
+# ./build.sh 8 (with debug)
+# ./build.sh [CPU] [NODEBUG, true=1 false=0(default)]
+# ./build.sh 8 1 (no debug)
+#############################################################################
+CPUS=2
+NODEBUG=1
+
+if ! type "cmake" > /dev/null; then
+ echo "You need to install cmake to run this script."
+ #sudo apt-get install cmake
+fi
+
+if ! type "g++" > /dev/null; then
+ echo "You need to install g++ to run this script."
+ #sudo apt-get install g++
+fi
+
+if ! type "svn" > /dev/null; then
+ echo "You need to install SVN to run this script."
+ #sudo apt-get install subversion
+fi
+
+if ! type "curl" > /dev/null; then
+ echo "You need to install curl to run this script."
+ #sudo apt-get install curl
+fi
+
+read -p "Do you want to install pre-requisites (e.g. libreadline, zlib, libexpat, libcurl ...)?[y/n]" -n 1 -r
+echo
+#if [[ $REPLY =~ ^[Yy]$ ]]; then
+ #sudo apt-get install g++ libreadline6-dev zlib1g-dev libexpat1-dev dh-autoreconf libcurl4-gnutls-dev libgtk-3-dev freeglut3-dev libglu1-mesa-dev libgl1-mesa-dev libgtk2.0-dev
+#fi
+# yum install readline-devel, zlib-devel, autoreconf, libtool
+
+unset ORACLE_HOME
+export GEODA_HOME=$PWD
+PREFIX=$GEODA_HOME/libraries
+DOWNLOAD_HOME=$GEODA_HOME/temp
+echo $PREFIX
+
+MAKER="make -j $CPUS"
+export CFLAGS="-m64"
+export CXXFLAGS="-m64"
+#export LDFLAGS="-m64 -L/usr/lib/x86_64-linux-gnu"
+
+if ! [ -d $DOWNLOAD_HOME ]; then
+ mkdir $DOWNLOAD_HOME
+fi
+
+if ! [ -d $PREFIX ]; then
+ mkdir $PREFIX
+fi
+
+#########################################################################
+# install library function
+#########################################################################
+install_library()
+{
+ LIB_NAME=$1
+ LIB_URL=$2
+ LIB_CHECKER=$3
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ #./configure CFLAGS="-m64" CXXFLAGS="-m64" LDFLAGS="-m64 -L/usr/lib/x86_64-linux-gnu" --prefix=$PREFIX
+ ./configure --prefix=$PREFIX
+ $MAKER
+ make install
+ fi
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+#########################################################################
+# install libiConv
+#########################################################################
+{
+ LIB_NAME="libiconv-1.13"
+ LIB_URL="http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz"
+ LIB_CHECKER="libiconv.so"
+ LIB_FILENAME="libiconv-1.13.tar.gz"
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ ./configure --enable-static --prefix=$PREFIX
+ $MAKER
+ make install
+ fi
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install cURL
+#########################################################################
+install_library curl-7.30.0 http://curl.haxx.se/download/curl-7.30.0.tar.gz libcurl.a
+
+#########################################################################
+# install Xerces
+#########################################################################
+{
+ LIB_NAME="xerces-c-3.1.1"
+ LIB_URL="http://mirror.metrocast.net/apache//xerces/c/3/sources/xerces-c-3.1.1.tar.gz"
+ LIB_CHECKER="libxerces-c.a"
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ ./configure --prefix=$PREFIX
+ chmod +x config/pretty-make
+ $MAKER
+ make install
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install GEOS
+#########################################################################
+install_library geos-3.3.8 http://download.osgeo.org/geos/geos-3.3.8.tar.bz2 libgeos.a
+
+#########################################################################
+# install PROJ.4
+#########################################################################
+install_library proj-4.8.0 http://download.osgeo.org/proj/proj-4.8.0.tar.gz libproj.a
+
+#########################################################################
+# install FreeXL
+#########################################################################
+install_library freexl-1.0.0f http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-1.0.0f.tar.gz libfreexl.a
+
+#########################################################################
+# install SQLite
+#########################################################################
+install_library sqlite-autoconf-3071602 http://www.sqlite.org/2013/sqlite-autoconf-3071602.tar.gz libsqlite3.a
+
+#########################################################################
+# install PostgreSQL
+#########################################################################
+# libreadline, zlib
+echo "install libreadline, zlib"
+install_library postgresql-9.2.4 http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz2 libpq.a
+
+#########################################################################
+# install libjpeg
+#########################################################################
+install_library jpeg-8 http://www.ijg.org/files/jpegsrc.v8.tar.gz libjpeg.a
+
+#########################################################################
+# install libkml requires 1.3
+#########################################################################
+# libexpat,libcurl4-gnutls-dev
+#install_library libkml-1.2.0 https://libkml.googlecode.com/files/libkml-1.2.0.tar.gz libkmlbase.a
+{
+ LIB_NAME="libkml"
+ LIB_CHECKER="libkmlbase.a"
+ echo $LIB_NAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ svn checkout http://libkml.googlecode.com/svn/trunk/ libkml
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cp -rf ../dep/"$LIB_NAME" .
+ cd $LIB_NAME
+ ./autogen.sh
+ chmod +x configure
+ ./configure CXXFLAGS="-Wno-long-long" --prefix=$PREFIX
+ sed -i.old "/gtest-death-test.Plo/d" third_party/Makefile
+ sed -i.old "/gtest-filepath.Plo/d" third_party/Makefile
+ sed -i.old "/gtest-port.Plo/d" third_party/Makefile
+ sed -i.old "/gtest-test-part.Plo/d" third_party/Makefile
+ sed -i.old "/gtest-typed-test.Plo/d" third_party/Makefile
+ sed -i.old "/gtest-test.Plo/d" third_party/Makefile
+ sed -i.old "/gtest.Plo/d" third_party/Makefile
+ sed -i.old "/gtest_main.Plo/d" third_party/Makefile
+ sed -i.old "/UriCommon.Plo/d" third_party/Makefile
+ sed -i.old "/UriCompare.Plo/d" third_party/Makefile
+ sed -i.old "/UriEscape.Plo/d" third_party/Makefile
+ sed -i.old "/UriFile.Plo/d" third_party/Makefile
+ sed -i.old "/UriIp4.Plo/d" third_party/Makefile
+ sed -i.old "/UriIp4Base.Plo/d" third_party/Makefile
+ sed -i.old "/UriNormalize.Plo/d" third_party/Makefile
+ sed -i.old "/UriNormalizeBase.Plo/d" third_party/Makefile
+ sed -i.old "/UriParse.Plo/d" third_party/Makefile
+ sed -i.old "/UriParseBase.Plo/d" third_party/Makefile
+ sed -i.old "/UriQuery.Plo/d" third_party/Makefile
+ sed -i.old "/UriRecompose.Plo/d" third_party/Makefile
+ sed -i.old "/UriResolve.Plo/d" third_party/Makefile
+ sed -i.old "/UriShorten.Plo/d" third_party/Makefile
+ sed -i.old "/ioapi.Plo/d" third_party/Makefile
+ sed -i.old "/iomem_simple.Plo/d" third_party/Makefile
+ sed -i.old "/zip.Plo/d" third_party/Makefile
+ #$MAKER
+ sed -i.old "s/examples//g" Makefile
+ make third_party
+ make src
+ make testdata
+ make install
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ #exit
+ fi
+}
+
+#########################################################################
+# install SpatiaLite
+#########################################################################
+{
+ LIB_NAME=libspatialite-4.0.0
+ LIB_URL=http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.0.0.tar.gz
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ LIB_CHECKER=libspatialite.a
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ ./configure CFLAGS="-I$PREFIX/include" CXXFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib -liconv -lsqlite3" --prefix=$PREFIX --enable-geos --enable-iconv --enable-proj --with-geosconfig=$PREFIX/bin/geos-config
+ $MAKER
+ make install
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+#########################################################################
+# MySQL
+#########################################################################
+#cmake, curse
+{
+ LIB_NAME=mysql-5.6.14
+ LIB_URL=http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.14.tar.gz
+ LIB_CHECKER=libmysqlclient.a
+
+ echo $LIB_NAME
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_NAME.tar.gz
+ #cp $GEODA_HOME/dep/mysql/my_default.h $GEODA_HOME/temp/mysql-5.6.14/include/my_default.h
+ fi
+
+ if ! [ -f "$GEODA_HOME/temp/mysql-5.6.14/bld/libmysql/$LIB_CHECKER" ] ; then
+ echo "HERE"
+ cd $LIB_NAME
+ mkdir -p bld
+ cd bld
+ cmake -DCURSES_LIBRARY=/usr/lib/libncurses.so -DCURSES_INCLUDE_PATH=/usr/include ..
+ chmod +x bld/extra/comp_err
+ chmod +x bld/sql/gen_lex_hash
+ chmod +x storage/perfschema/gen_pfs_lex_token
+ $MAKER
+ fi
+
+ if ! [ -f "$GEODA_HOME/temp/$LIB_NAME/bld/libmysql/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install GDAL/OGR
+#########################################################################
+{
+ LIB_NAME=gdal-1.9.2
+ #LIB_URL=http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz
+ #LIB_NAME=gdal-1.10.1
+ #LIB_URL=http://download.osgeo.org/gdal/1.10.1/gdal-1.10.1.tar.gz
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ LIB_CHECKER=libgdal.a
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ svn co https://github.com/lixun910/gdal-1.9.2-work gdal-1.9.2
+ fi
+
+ cp -rf $GEODA_HOME/dep/$LIB_NAME .
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ chmod +x install-sh
+ ./configure
+ cp -rf $GEODA_HOME/dep/gdal-1.9.2/* .
+ #make clean
+ $MAKER
+ make install
+ #cd ogr/ogrsf_frmts/oci
+ #make plugin
+ #mv ogr_OCI.so ogr_OCI.dylib
+ #install_name_tool -change "/scratch/plebld/208/network/lib/libnnz10.dylib" "/Users/xun/Downloads/Oracle_10204Client_MAC_X86/ohome/lib/libnnz10.dylib" ogr_OCI.so
+ fi
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install boost library
+#########################################################################
+{
+ LIB_NAME=boost_1_54_0
+ LIB_URL=http://softlayer-dal.dl.sourceforge.net/project/boost/boost/1.54.0/boost_1_54_0.tar.bz2
+ LIB_FILENAME=boost_1_54_0.tar.bz2
+ LIB_CHECKER=libboost_thread.a
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ]; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$GEODA_HOME/temp/$LIB_NAME/stage/lib/$LIB_CHECKER" ] ; then
+ cd $PREFIX/include
+ rm boost
+ ln -s $DOWNLOAD_HOME/boost_1_54_0 boost
+ cd $DOWNLOAD_HOME/boost_1_54_0
+ chmod +x bootstrap.sh
+ chmod +x tools/build/v2/engine/build.sh
+ ./bootstrap.sh
+ chmod +x b2
+ ./b2 --with-thread --with-date_time --with-chrono --with-system link=static threading=multi stage
+ fi
+
+ if ! [ -f "$GEODA_HOME/temp/$LIB_NAME/stage/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+#########################################################################
+# install CLAPACK
+#########################################################################
+{
+ CLAPACK_NAME="CLAPACK-3.2.1"
+ LIB_CHECKER="libf2c.a"
+ echo $CLAPACK_NAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$CLAPACK_NAME" ]; then
+ curl -O http://www.netlib.org/clapack/clapack.tgz
+ tar -xvf clapack.tgz
+ fi
+
+ cp -rf $GEODA_HOME/dep/$CLAPACK_NAME .
+ cd $CLAPACK_NAME
+ if ! [ -f "libf2c.a" ] || ! [ -f "blas.a" ] || ! [ -f "lapack.a" ]; then
+ cp make.inc.example make.inc
+ $MAKER f2clib
+ cp F2CLIBS/libf2c.a .
+ $MAKER blaslib
+ cd INSTALL
+ $MAKER
+ cd ..
+ cd SRC
+ $MAKER
+ cd ..
+ $MAKER
+ mv -f blas_LINUX.a blas.a
+ mv -f lapack_LINUX.a lapack.a
+ mv -f tmglib_LINUX.a tmglib.a
+ cd ..
+ fi
+
+ if ! [ -f "$GEODA_HOME/temp/$CLAPACK_NAME/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install wxWidgets library
+#########################################################################
+# wxWidgets 2.9.2 doesn't compile on Ubuntu 13 64bit
+# sudo apt-get install libgtk2.0-dev libglu1-mesa-dev libgl1-mesa-dev
+{
+ LIB_NAME=wxWidgets-2.9.4
+ #LIB_URL=http://hivelocity.dl.sourceforge.net/project/wxwindows/2.9.2/wxWidgets-2.9.2.tar.bz2
+ LIB_URL=http://softlayer-dal.dl.sourceforge.net/project/wxwindows/2.9.4/wxWidgets-2.9.4.tar.bz2
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ LIB_CHECKER=wx-config
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/bin/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ chmod +x src/stc/gen_iface.py
+ ./configure --with-gtk=2 --enable-ascii --disable-shared --disable-monolithic --with-opengl --enable-postscript --without-libtiff --disable-debug --prefix=$PREFIX
+ $MAKER
+ make install
+ cd ..
+ fi
+
+ if ! [ -f "$PREFIX/bin/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+#########################################################################
+# build GeoDa
+#########################################################################
+{
+ cd $GEODA_HOME
+ cp ../../GeoDamake.ubuntu.opt ../../GeoDamake.opt
+ mkdir ../../o
+ $MAKER
+ make app
+}
diff --git a/BuildTools/centos/build_gdal_64.sh b/BuildTools/centos/build_gdal_64.sh
new file mode 100755
index 000000000..b24426652
--- /dev/null
+++ b/BuildTools/centos/build_gdal_64.sh
@@ -0,0 +1,279 @@
+#!/bin/bash
+#############################################################################
+# ./build.sh
+# ./build.sh [CPU]
+# ./build.sh 8 (with debug)
+# ./build.sh [CPU] [NODEBUG, true=1 false=0(default)]
+# ./build.sh 8 1 (no debug)
+#############################################################################
+CPUS=2
+NODEBUG=1
+
+if ! type "cmake" > /dev/null; then
+ echo "You need to install cmake to run this script."
+ #sudo apt-get install cmake
+fi
+
+if ! type "g++" > /dev/null; then
+ echo "You need to install g++ to run this script."
+ yum install gcc-c++
+fi
+
+if ! type "svn" > /dev/null; then
+ echo "You need to install SVN to run this script."
+ #sudo apt-get install subversion
+fi
+
+unset ORACLE_HOME
+export GEODA_HOME=$PWD
+PREFIX=/usr/local
+DOWNLOAD_HOME=$GEODA_HOME/temp
+echo $PREFIX
+
+MAKER="make -j $CPUS"
+export CFLAGS="-m64"
+export CXXFLAGS="-m64"
+#export LDFLAGS="-m64 -L/usr/lib/x86_64-linux-gnu"
+
+if ! [ -d $DOWNLOAD_HOME ]; then
+ mkdir $DOWNLOAD_HOME
+fi
+
+if ! [ -d $PREFIX ]; then
+ mkdir $PREFIX
+fi
+
+#########################################################################
+# install library function
+#########################################################################
+install_library()
+{
+ LIB_NAME=$1
+ LIB_URL=$2
+ LIB_CHECKER=$3
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ wget $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ #./configure CFLAGS="-m64" CXXFLAGS="-m64" LDFLAGS="-m64 -L/usr/lib/x86_64-linux-gnu" --prefix=$PREFIX
+ ./configure --prefix=$PREFIX
+ $MAKER
+ make install
+ fi
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+#########################################################################
+# install libiConv
+#########################################################################
+{
+ LIB_NAME="libiconv-1.13"
+ LIB_URL="http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz"
+ LIB_CHECKER="libiconv.so"
+ LIB_FILENAME="libiconv-1.13.tar.gz"
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ ./configure --enable-static --prefix=$PREFIX
+ $MAKER
+ make install
+ fi
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install cURL
+#########################################################################
+install_library curl-7.30.0 http://curl.haxx.se/download/curl-7.30.0.tar.gz libcurl.a
+
+#########################################################################
+# install Xerces
+#########################################################################
+{
+ LIB_NAME="xerces-c-3.1.1"
+ LIB_URL="http://mirror.metrocast.net/apache//xerces/c/3/sources/xerces-c-3.1.1.tar.gz"
+ LIB_CHECKER="libxerces-c.a"
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ ./configure --prefix=$PREFIX
+ chmod +x config/pretty-make
+ $MAKER
+ make install
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install GEOS
+#########################################################################
+install_library geos-3.3.8 http://download.osgeo.org/geos/geos-3.3.8.tar.bz2 libgeos.a
+
+#########################################################################
+# install PROJ.4
+#########################################################################
+install_library proj-4.8.0 http://download.osgeo.org/proj/proj-4.8.0.tar.gz libproj.a
+
+#########################################################################
+# install FreeXL
+#########################################################################
+install_library freexl-1.0.0f http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-1.0.0f.tar.gz libfreexl.a
+
+#########################################################################
+# install SQLite
+#########################################################################
+install_library sqlite-autoconf-3071602 http://www.sqlite.org/2013/sqlite-autoconf-3071602.tar.gz libsqlite3.a
+
+#########################################################################
+# install PostgreSQL
+#########################################################################
+# libreadline, zlib
+echo "install libreadline, zlib"
+install_library postgresql-9.2.4 http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz2 libpq.a
+
+#########################################################################
+# install libjpeg
+#########################################################################
+install_library jpeg-8 http://www.ijg.org/files/jpegsrc.v8.tar.gz libjpeg.a
+
+#########################################################################
+# install libkml requires 1.3
+#########################################################################
+# libexpat,libcurl4-gnutls-dev
+#########################################################################
+# install SpatiaLite
+#########################################################################
+{
+ LIB_NAME=libspatialite-4.0.0
+ LIB_URL=http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.0.0.tar.gz
+ LIB_FILENAME=$(basename "$LIB_URL" ".tar")
+ LIB_CHECKER=libspatialite.a
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_FILENAME
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ ./configure --host=i686-pc-linux-gnu CFLAGS="-I$PREFIX/include" CXXFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib -liconv -lsqlite3" --prefix=$PREFIX --enable-geos --enable-iconv --enable-proj --with-geosconfig=$PREFIX/bin/geos-config
+ $MAKER
+ make install
+ fi
+
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+#########################################################################
+# MySQL
+#########################################################################
+#cmake, curse
+{
+ LIB_NAME=mysql-5.6.14
+ LIB_URL=http://softlayer-dal.dl.sourceforge.net/project/mysql.mirror/MySQL%205.6.14/mysql-5.6.14.tar.gz
+ LIB_CHECKER=libmysqlclient.a
+
+ echo $LIB_NAME
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ curl -O $LIB_URL
+ tar -xf $LIB_NAME.tar.gz
+ #cp $GEODA_HOME/dep/mysql/my_default.h $GEODA_HOME/temp/mysql-5.6.14/include/my_default.h
+ fi
+
+ if ! [ -f "$GEODA_HOME/temp/mysql-5.6.14/bld/libmysql/$LIB_CHECKER" ] ; then
+ echo "HERE"
+ cd $LIB_NAME
+ mkdir -p bld
+ cd bld
+ cmake -DCURSES_LIBRARY=/usr/lib/libncurses.so -DCURSES_INCLUDE_PATH=/usr/include ..
+ chmod +x bld/extra/comp_err
+ chmod +x bld/sql/gen_lex_hash
+ chmod +x storage/perfschema/gen_pfs_lex_token
+ $MAKER
+ fi
+
+ if ! [ -f "$GEODA_HOME/temp/$LIB_NAME/bld/libmysql/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
+
+#########################################################################
+# install GDAL/OGR
+#########################################################################
+{
+ LIB_NAME=gdal-1.9.2
+ LIB_URL=https://codeload.github.com/lixun910/gdal-1.9.2-work/zip/master
+ LIB_FILENAME=master
+ LIB_CHECKER=libgdal.a
+ echo $LIB_FILENAME
+
+ cd $DOWNLOAD_HOME
+ if ! [ -d "$LIB_NAME" ] ; then
+ #svn co https://github.com/lixun910/gdal-1.9.2-work/trunk gdal-1.9.2
+ curl -k -O $LIB_URL
+ unzip $LIB_FILENAME
+ mv gdal-1.9.2-work-master gdal-1.9.2
+ fi
+
+ cp -rf $GEODA_HOME/dep/$LIB_NAME .
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ cd $LIB_NAME
+ chmod +x configure
+ chmod +x install-sh
+ ./configure
+ cp -rf $GEODA_HOME/dep/gdal-1.9.2/* .
+ cp GDALmake.opt.web GDALmake.opt
+ #make clean
+ $MAKER
+ make install
+ #cd ogr/ogrsf_frmts/oci
+ #make plugin
+ #mv ogr_OCI.so ogr_OCI.dylib
+ #install_name_tool -change "/scratch/plebld/208/network/lib/libnnz10.dylib" "/Users/xun/Downloads/Oracle_10204Client_MAC_X86/ohome/lib/libnnz10.dylib" ogr_OCI.so
+ fi
+ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
+ echo "Error! Exit"
+ exit
+ fi
+}
diff --git a/BuildTools/centos/dep/CLAPACK-3.2.1/F2CLIBS/libf2c/Makefile b/BuildTools/centos/dep/CLAPACK-3.2.1/F2CLIBS/libf2c/Makefile
new file mode 100644
index 000000000..64267b844
--- /dev/null
+++ b/BuildTools/centos/dep/CLAPACK-3.2.1/F2CLIBS/libf2c/Makefile
@@ -0,0 +1,218 @@
+TOPDIR=../..
+include $(TOPDIR)/make.inc
+
+# Unix makefile: see README.
+# For C++, first "make hadd".
+# If your compiler does not recognize ANSI C, add
+# -DKR_headers
+# to the CFLAGS = line below.
+# On Sun and other BSD systems that do not provide an ANSI sprintf, add
+# -DUSE_STRLEN
+# to the CFLAGS = line below.
+# On Linux systems, add
+# -DNON_UNIX_STDIO
+# to the CFLAGS = line below. For libf2c.so under Linux, also add
+# -fPIC
+# to the CFLAGS = line below.
+
+.SUFFIXES: .c .o
+
+# compile, then strip unnecessary symbols
+.c.o:
+ $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
+ ld -r -x -o $*.xxx $*.o
+ mv $*.xxx $*.o
+## Under Solaris (and other systems that do not understand ld -x),
+## omit -x in the ld line above.
+## If your system does not have the ld command, comment out
+## or remove both the ld and mv lines above.
+
+MISC = f77vers.o i77vers.o main.o s_rnge.o abort_.o exit_.o getarg_.o iargc_.o\
+ getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o ctype.o\
+ derf_.o derfc_.o erf_.o erfc_.o sig_die.o uninit.o
+POW = pow_ci.o pow_dd.o pow_di.o pow_hh.o pow_ii.o pow_ri.o pow_zi.o pow_zz.o
+CX = c_abs.o c_cos.o c_div.o c_exp.o c_log.o c_sin.o c_sqrt.o
+DCX = z_abs.o z_cos.o z_div.o z_exp.o z_log.o z_sin.o z_sqrt.o
+REAL = r_abs.o r_acos.o r_asin.o r_atan.o r_atn2.o r_cnjg.o r_cos.o\
+ r_cosh.o r_dim.o r_exp.o r_imag.o r_int.o\
+ r_lg10.o r_log.o r_mod.o r_nint.o r_sign.o\
+ r_sin.o r_sinh.o r_sqrt.o r_tan.o r_tanh.o
+DBL = d_abs.o d_acos.o d_asin.o d_atan.o d_atn2.o\
+ d_cnjg.o d_cos.o d_cosh.o d_dim.o d_exp.o\
+ d_imag.o d_int.o d_lg10.o d_log.o d_mod.o\
+ d_nint.o d_prod.o d_sign.o d_sin.o d_sinh.o\
+ d_sqrt.o d_tan.o d_tanh.o
+INT = i_abs.o i_dim.o i_dnnt.o i_indx.o i_len.o i_len_trim.o i_mod.o i_nint.o i_sign.o\
+ lbitbits.o lbitshft.o i_ceiling.o
+HALF = h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o h_nint.o h_sign.o
+CMP = l_ge.o l_gt.o l_le.o l_lt.o hl_ge.o hl_gt.o hl_le.o hl_lt.o
+EFL = ef1asc_.o ef1cmc_.o
+CHAR = f77_aloc.o s_cat.o s_cmp.o s_copy.o
+I77 = backspac.o close.o dfe.o dolio.o due.o endfile.o err.o\
+ fmt.o fmtlib.o ftell_.o iio.o ilnw.o inquire.o lread.o lwrite.o\
+ open.o rdfmt.o rewind.o rsfe.o rsli.o rsne.o sfe.o sue.o\
+ typesize.o uio.o util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o
+QINT = pow_qq.o qbitbits.o qbitshft.o ftell64_.o
+TIME = dtime_.o etime_.o
+
+# If you get an error compiling dtime_.c or etime_.c, try adding
+# -DUSE_CLOCK to the CFLAGS assignment above; if that does not work,
+# omit $(TIME) from OFILES = assignment below.
+
+# To get signed zeros in write statements on IEEE-arithmetic systems,
+# add -DSIGNED_ZEROS to the CFLAGS assignment below and add signbit.o
+# to the end of the OFILES = assignment below.
+
+# For INTEGER*8 support (which requires system-dependent adjustments to
+# f2c.h), add $(QINT) to the OFILES = assignment below...
+
+OFILES = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
+ $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
+
+all: f2c.h signal1.h sysdep1.h libf2c.a clapack_install
+
+libf2c.a: $(OFILES)
+ ar r libf2c.a $?
+ -ranlib libf2c.a
+
+## Shared-library variant: the following rule works on Linux
+## systems. Details are system-dependent. Under Linux, -fPIC
+## must appear in the CFLAGS assignment when making libf2c.so.
+## Under Solaris, use -Kpic in CFLAGS and use "ld -G" instead
+## of "cc -shared".
+
+libf2c.so: $(OFILES)
+ $(CC) -shared -o libf2c.so $(OFILES)
+
+### If your system lacks ranlib, you don't need it; see README.
+
+f77vers.o: f77vers.c
+ $(CC) -c f77vers.c
+
+i77vers.o: i77vers.c
+ $(CC) -c i77vers.c
+
+# To get an "f2c.h" for use with "f2c -C++", first "make hadd"
+hadd: f2c.h0 f2ch.add
+ cat f2c.h0 f2ch.add >f2c.h
+
+# For use with "f2c" and "f2c -A":
+f2c.h: f2c.h0
+ cp f2c.h0 f2c.h
+
+# You may need to adjust signal1.h and sysdep1.h suitably for your system...
+signal1.h: signal1.h0
+ cp signal1.h0 signal1.h
+
+sysdep1.h: sysdep1.h0
+ cp sysdep1.h0 sysdep1.h
+
+# If your system lacks onexit() and you are not using an
+# ANSI C compiler, then you should uncomment the following
+# two lines (for compiling main.o):
+#main.o: main.c
+# $(CC) -c -DNO_ONEXIT -DSkip_f2c_Undefs main.c
+# On at least some Sun systems, it is more appropriate to
+# uncomment the following two lines:
+#main.o: main.c
+# $(CC) -c -Donexit=on_exit -DSkip_f2c_Undefs main.c
+
+install: libf2c.a
+ cp libf2c.a $(LIBDIR)
+ -ranlib $(LIBDIR)/libf2c.a
+
+clapack_install: libf2c.a
+ mv libf2c.a ..
+
+clean:
+ rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
+
+backspac.o: fio.h
+close.o: fio.h
+dfe.o: fio.h
+dfe.o: fmt.h
+due.o: fio.h
+endfile.o: fio.h rawio.h
+err.o: fio.h rawio.h
+fmt.o: fio.h
+fmt.o: fmt.h
+iio.o: fio.h
+iio.o: fmt.h
+ilnw.o: fio.h
+ilnw.o: lio.h
+inquire.o: fio.h
+lread.o: fio.h
+lread.o: fmt.h
+lread.o: lio.h
+lread.o: fp.h
+lwrite.o: fio.h
+lwrite.o: fmt.h
+lwrite.o: lio.h
+open.o: fio.h rawio.h
+rdfmt.o: fio.h
+rdfmt.o: fmt.h
+rdfmt.o: fp.h
+rewind.o: fio.h
+rsfe.o: fio.h
+rsfe.o: fmt.h
+rsli.o: fio.h
+rsli.o: lio.h
+rsne.o: fio.h
+rsne.o: lio.h
+sfe.o: fio.h
+signbit.o: arith.h
+sue.o: fio.h
+uio.o: fio.h
+uninit.o: arith.h
+util.o: fio.h
+wref.o: fio.h
+wref.o: fmt.h
+wref.o: fp.h
+wrtfmt.o: fio.h
+wrtfmt.o: fmt.h
+wsfe.o: fio.h
+wsfe.o: fmt.h
+wsle.o: fio.h
+wsle.o: fmt.h
+wsle.o: lio.h
+wsne.o: fio.h
+wsne.o: lio.h
+xwsne.o: fio.h
+xwsne.o: lio.h
+xwsne.o: fmt.h
+
+arith.h: arithchk.c
+ $(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
+ $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
+ ./a.out >arith.h
+ rm -f a.out arithchk.o
+
+check:
+ xsum Notice README abort_.c arithchk.c backspac.c c_abs.c c_cos.c \
+ c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c close.c comptry.bat \
+ ctype.c ctype.h \
+ d_abs.c d_acos.c d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c \
+ d_dim.c d_exp.c d_imag.c d_int.c d_lg10.c d_log.c d_mod.c \
+ d_nint.c d_prod.c d_sign.c d_sin.c d_sinh.c d_sqrt.c d_tan.c \
+ d_tanh.c derf_.c derfc_.c dfe.c dolio.c dtime_.c due.c ef1asc_.c \
+ ef1cmc_.c endfile.c erf_.c erfc_.c err.c etime_.c exit_.c f2c.h0 \
+ f2ch.add f77_aloc.c f77vers.c fio.h fmt.c fmt.h fmtlib.c \
+ fp.h ftell_.c ftell64_.c i_ceiling.c \
+ getarg_.c getenv_.c h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c \
+ h_mod.c h_nint.c h_sign.c hl_ge.c hl_gt.c hl_le.c hl_lt.c \
+ i77vers.c i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_len_trim.c i_mod.c \
+ i_nint.c i_sign.c iargc_.c iio.c ilnw.c inquire.c l_ge.c l_gt.c \
+ l_le.c l_lt.c lbitbits.c lbitshft.c libf2c.lbc libf2c.sy lio.h \
+ lread.c lwrite.c main.c makefile.sy makefile.u makefile.vc \
+ makefile.wat math.hvc mkfile.plan9 open.c pow_ci.c pow_dd.c \
+ pow_di.c pow_hh.c pow_ii.c pow_qq.c pow_ri.c pow_zi.c pow_zz.c \
+ qbitbits.c qbitshft.c r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c \
+ r_cnjg.c r_cos.c r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c \
+ r_log.c r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c \
+ r_tan.c r_tanh.c rawio.h rdfmt.c rewind.c rsfe.c rsli.c rsne.c \
+ s_cat.c s_cmp.c s_copy.c s_paus.c s_rnge.c s_stop.c scomptry.bat sfe.c \
+ sig_die.c signal1.h0 signal_.c signbit.c sue.c sysdep1.h0 system_.c \
+ typesize.c \
+ uio.c uninit.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c xwsne.c \
+ z_abs.c z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c >xsum1.out
+ cmp xsum0.out xsum1.out && mv xsum1.out xsum.out || diff xsum[01].out
diff --git a/BuildTools/centos/dep/CLAPACK-3.2.1/make.inc b/BuildTools/centos/dep/CLAPACK-3.2.1/make.inc
new file mode 100644
index 000000000..198fa6683
--- /dev/null
+++ b/BuildTools/centos/dep/CLAPACK-3.2.1/make.inc
@@ -0,0 +1,79 @@
+# -*- Makefile -*-
+####################################################################
+# LAPACK make include file. #
+# LAPACK, Version 3.2.1 #
+# June 2009 #
+####################################################################
+#
+# See the INSTALL/ directory for more examples.
+#
+SHELL = /bin/sh
+#
+# The machine (platform) identifier to append to the library names
+#
+PLAT =
+#
+# Modify the FORTRAN and OPTS definitions to refer to the
+# compiler and desired compiler options for your machine. NOOPT
+# refers to the compiler options desired when NO OPTIMIZATION is
+# selected. Define LOADER and LOADOPTS to refer to the loader
+# and desired load options for your machine.
+#
+#######################################################
+# This is used to compile C libary
+CC = gcc
+# if no wrapping of the blas library is needed, uncomment next line
+#CC = gcc -DNO_BLAS_WRAP
+CFLAGS = -O3 -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/INCLUDE -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/
+LOADER = gcc
+LOADOPTS =
+NOOPT = -O0 -I$(GEODA_HOME)/temp/CLAPACK-3.2.1/INCLUDE
+DRVCFLAGS = $(CFLAGS)
+F2CCFLAGS = $(CFLAGS)
+#######################################################################
+
+#
+# Timer for the SECOND and DSECND routines
+#
+# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
+# TIMER = EXT_ETIME
+# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
+# TIMER = EXT_ETIME_
+# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
+# TIMER = INT_ETIME
+# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
+# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME
+TIMER = INT_CPU_TIME
+# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
+# TIMER = NONE
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If you system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS= cr
+RANLIB = ranlib
+#
+# The location of BLAS library for linking the testing programs.
+# The target's machine-specific, optimized BLAS library should be
+# used whenever possible.
+#
+BLASLIB = ../../blas$(PLAT).a
+#
+# Location of the extended-precision BLAS (XBLAS) Fortran library
+# used for building and testing extended-precision routines. The
+# relevant routines will be compiled and XBLAS will be linked only if
+# USEXBLAS is defined.
+#
+# USEXBLAS = Yes
+XBLASLIB =
+# XBLASLIB = -lxblas
+#
+# Names of generated libraries.
+#
+LAPACKLIB = lapack$(PLAT).a
+F2CLIB = ../../F2CLIBS/libf2c.a
+TMGLIB = tmglib$(PLAT).a
+EIGSRCLIB = eigsrc$(PLAT).a
+LINSRCLIB = linsrc$(PLAT).a
+F2CLIB = ../../F2CLIBS/libf2c.a
diff --git a/BuildTools/centos/dep/gdal-1.9.2/GDALmake.opt b/BuildTools/centos/dep/gdal-1.9.2/GDALmake.opt
new file mode 100644
index 000000000..04ba14d17
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/GDALmake.opt
@@ -0,0 +1,543 @@
+GDAL_ROOT = $(GEODA_HOME)/temp/gdal-1.9.2
+top_builddir = $(GDAL_ROOT)
+
+#
+# the library can be built by the native build or with the help of libtool
+#
+
+SHELL = /bin/bash
+HAVE_LIBTOOL = yes
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+ifeq ($(HAVE_LIBTOOL),yes)
+LIBTOOL_COMPILE_CC = $(LIBTOOL) --mode=compile --tag=CC
+LIBTOOL_COMPILE_CXX = $(LIBTOOL) --mode=compile --tag=CXX
+LIBTOOL_LINK = $(LIBTOOL) --mode=link
+LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
+LIBTOOL_FINISH = $(LIBTOOL) --mode=finish --silent
+LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
+OBJ_EXT = lo
+else
+LIBTOOL_FINISH = /bin/true
+OBJ_EXT = o
+endif
+
+CC = $(LIBTOOL_COMPILE_CC) gcc
+CXX = $(LIBTOOL_COMPILE_CXX) g++
+LD = $(LIBTOOL_LINK) g++
+RM = $(LIBTOOL_CLEAN) /bin/rm -f *.lo
+INSTALL = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c
+INSTALL_LIB = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c
+INSTALL_DATA = $(GDAL_ROOT)/install-sh -c -m 0644
+INSTALL_DIR = $(GDAL_ROOT)/install-sh -d
+
+# SDE_LIB needs to be first because it embeds zlib. We need to use its symbols instead of -lz's
+
+LIBS = $(SDE_LIB) -lidn -lexpat -lz -lpthread -lm -lrt -ldl $(GEODA_HOME)/libraries/lib/libpq.a -L$(GEODA_HOME)/libraries/lib -kmlbase -kmlconvenience -lkmldom -lkmlengine -lkmlregionator -lkmlxsd -lminizip -lgeos -lgeos_c -lproj -lfreexl -lxerces-c -lspatialite -lsqlite3 \
+ $(KAK_LIBS) $(DWG_LIBS) $(CURL_LIB) \
+ $(MRSID_LIBS) $(MRSID_LIDAR_LIBS) $(INGRES_LIB) \
+ $(PCIDSK_LIB) $(RASDAMAN_LIB) $(CHARLS_LIB) \
+ $(OPENCL_LIB) $(JVM_LIB) $(LIBICONV) $(FGDB_LIB)
+
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@ @NUMPY_FLAG@
+PYTHON =
+PYTHON_DEV = @PYTHON_DEV@
+PY_LD_SHARED = @PY_LD_SHARED@
+PY_SO_EXT = @PY_SO_EXT@
+PY_HAVE_SETUPTOOLS=
+
+# Next Generation SWIG bindings
+BINDINGS =
+
+HAVE_OGDI = no
+OGR_ENABLED = yes
+
+OSX_FRAMEWORK_PREFIX =
+OSX_VERSION_FRAMEWORK_PREFIX =
+
+prefix = $(GEODA_HOME)/libraries
+exec_prefix = ${prefix}
+INST_PREFIX = ${prefix}
+INST_INCLUDE = ${prefix}/include
+INST_DATA = ${prefix}/share/gdal
+INST_LIB = ${exec_prefix}/lib
+INST_BIN = ${exec_prefix}/bin
+INST_PYMOD =
+INST_DOCS = ${prefix}/doc
+INST_MAN = ${prefix}/share/gdal/man
+INST_HTML = $(HOME)/www/gdal
+
+CPPFLAGS = -I$(GDAL_ROOT)/port
+CFLAGS = -g -O2 -DDEBUG -Wall -Wdeclaration-after-statement $(USER_DEFS)
+CXXFLAGS = -g -O2 -DDEBUG -Wall $(USER_DEFS)
+LDFLAGS =
+
+RANLIB = ranlib
+SO_EXT =
+LD_SHARED =
+EXE =
+
+ifeq ($(notdir $(LD_SHARED)),true)
+HAVE_LD_SHARED = no
+else
+HAVE_LD_SHARED = yes
+endif
+
+GDAL_INCLUDE = -I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/gcore \
+ -I$(GDAL_ROOT)/alg \
+ -I$(GDAL_ROOT)/ogr -I$(GDAL_ROOT)/ogr/ogrsf_frmts
+
+# libtool targets and help variables
+LIBGDAL := libgdal.la
+LIBGDAL_CURRENT := 17
+LIBGDAL_REVISION := 2
+LIBGDAL_AGE := 16
+
+# native build targets and variables
+GDAL_VER = 1.9.2
+
+# version info
+GDAL_VERSION_MAJOR = 1
+GDAL_VERSION_MINOR = 9
+GDAL_VERSION_REV = 2
+
+GDAL_LIB = $(GDAL_ROOT)/libgdal.a
+GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT)
+GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal
+
+# Mac OS X Framework definition
+MACOSX_FRAMEWORK =
+
+#
+# GDAL/OGR PostgreSQL support.
+#
+HAVE_OGR_PG = yes
+HAVE_POSTGISRASTER = yes
+PG_INC = -I$(GEODA_HOME)/libraries/include -I$(GEODA_HOME)/libraries/include/postgresql/server -DPG_HAS_PQESCAPESTRINGCONN
+
+#
+# INGRES
+#
+II_SYSTEM =
+HAVE_INGRES = no
+INGRES_LIB =
+INGRES_INC =
+
+#
+# MySQL support.
+#
+HAVE_MYSQL = yes
+MYSQL_LIB = $(GEODA_HOME)/temp/mysql-5.6.14/bld/libmysql/libmysqlclient.a -lpthread
+MYSQL_INC = -I$(GEODA_HOME)/temp/mysql-5.6.14/include -I$(GEODA_HOME)/temp/mysql-5.6.14/bld/include
+LIBS += $(MYSQL_LIB)
+
+#
+# HDF4 Support.
+#
+HAVE_HDF4 = no
+HDF4_INCLUDE = -I$(GDAL_ROOT)/ogr
+
+#
+# HDF5 Support.
+#
+HAVE_HDF5 = no
+HDF5_INCLUDE =
+
+#
+# NetCDF Support.
+#
+NETCDF_ROOT =
+NETCDF_HAS_NC4 =
+NETCDF_HAS_HDF4 =
+
+#
+# DODS Include file location
+#
+DODS_INC =
+ifeq ($(DODS_INC),)
+HAVE_DODS = no
+else
+HAVE_DODS = yes
+endif
+
+#
+# SQLite
+#
+SQLITE_INC = -I$(GEODA_HOME)/libraries/include
+HAVE_SQLITE = yes
+HAVE_SPATIALITE = yes
+SPATIALITE_INC = -I$(GEODA_HOME)/libraries/include
+SPATIALITE_AMALGAMATION = no
+
+#
+# JPEG2000 via Kakadu Support.
+#
+KAKDIR =
+
+ifneq ($(KAKDIR),)
+ifeq ($(HAVE_LIBTOOL),yes)
+include $(GDAL_ROOT)/frmts/jp2kak/jp2kak.lst
+KAK_LIBS = $(KAK_OBJ)
+endif
+endif
+
+#
+# JPEG-2000 Support via JasPer library.
+#
+HAVE_JASPER = no
+JASPER_FLAGS =
+
+#
+# JPEG-2000 Support via OpenJPEG library.
+#
+HAVE_OPENJPEG = no
+
+#
+# MrSID support via LizardTech's DSDK
+#
+MRSID_FLAGS =
+MRSID_INCLUDE =
+MRSID_LIBS =
+
+#
+#
+# MrSID/MG4 support via LizardTech LiDAR SDK
+#
+MRSID_LIDAR_INCLUDE =
+MRSID_LIDAR_LIBS =
+
+# Xerces C++ XML Parser for GML and ILI
+#
+HAVE_XERCES = yes
+XERCES_INCLUDE = -I$(GEODA_HOME)/libraries/include -I$(GEODA_HOME)/libraries/include/xercesc
+
+#
+# Enable NAS format
+#
+HAVE_NAS = yes
+
+#
+# Expat XML Parser for KML, GPX, GeoRSS (and GML if no Xerces C++)
+#
+HAVE_EXPAT = yes
+EXPAT_INCLUDE = -I/usr/include
+
+#
+# Google libkml for the new OGR KML driver written by Brian Case
+#
+HAVE_LIBKML = yes
+LIBKML_INCLUDE = -I$(GEODA_HOME)/libraries/include -I$(GEODA_HOME)/libraries/include/kml -I$(GEODA_HOME)/libraries/include/kml/third_party/boost_1_34_1
+
+#
+# Oracle Spatial Support
+#
+HAVE_OCI = no
+OCI_INCLUDE =
+
+# GEOS Support
+
+HAVE_GEOS = yes
+GEOS_CFLAGS = -I$(GEODA_HOME)/libraries/include
+
+# GRASS Support
+
+GRASS_SETTING = no
+GRASS_INCLUDE =
+GRASS_GISBASE =
+HAVE_GRASS = no
+
+#
+# SDE
+#
+HAVE_SDE = no
+SDE_LIB =
+SDE_INC =
+
+#
+# FileGDB
+#
+HAVE_FGDB =
+FGDB_LIB =
+FGDB_INC =
+
+#
+# ArcObjects
+#
+HAVE_ARCOBJECTS = @ARCOBJECTS_ENABLED@
+ARCOBJECTS_LIB = @ARCOBJECTS_LIB@
+ARCOBJECTS_INC = @ARCOBJECTS_INC@
+
+
+#
+# VFK
+#
+HAVE_VFK = yes
+
+#
+# Curl
+#
+CURL_SETTING = yes
+CURL_LIB = $(GEODA_HOME)/libraries/lib/libcurl.a -lldap -lz
+CURL_INC = -I$(GEODA_HOME)/libraries/include
+
+#
+# OpenCL support
+#
+OPENCL_LIB =
+OPENCL_FLAGS =
+
+#
+# PCIDSK SDK
+#
+PCIDSK_SETTING = internal
+PCIDSK_LIB =
+PCIDSK_INCLUDE =
+
+#
+# Iconv
+#
+LIBICONV = -L$(GEODA_HOME)/libraries/lib -liconv
+
+#
+# DWGdirect Library
+#
+DWGDIRECT =
+DWG_PLT =
+
+ifneq ($(DWGDIRECT),)
+DWG_LIBDIR = $(DWGDIRECT)/lib/$(DWG_PLT)
+DWG_LIBS = $(DWG_LIBDIR)/DD_$(DWG_PLT)_ModelerGeometry.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_AcisRenderer.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Br.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_AcisBuilder.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Db.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Gs.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_SpatialIndex.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Gi.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Ge.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Root.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_FT.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Alloc.a
+HAVE_DWGDIRECT = yes
+else
+DWG_LIBS =
+HAVE_DWGDIRECT = no
+endif
+
+#
+# Informix DataBlade support
+#
+HAVE_IDB = no
+IDB_INC =
+IDB_LIB =
+ifeq ($(HAVE_IDB),yes)
+LIBS += $(IDB_LIB)
+endif
+
+#
+# FMEObjects
+#
+ifeq (,)
+HAVE_FME = no
+FME_INCLUDE =
+else
+HAVE_FME = yes
+FME_INCLUDE = -I/fmeobjects/cpp
+endif
+
+# PCRaster support
+PCRASTER_SETTING = internal
+
+OGDI_INCLUDE =
+
+PNG_SETTING = internal
+JPEG_SETTING = internal
+JPEG12_ENABLED = yes
+TIFF_SETTING = internal
+TIFF_OPTS = -DBIGTIFF_SUPPORT
+RENAME_INTERNAL_LIBTIFF_SYMBOLS = no
+GEOTIFF_SETTING = internal
+GEOTIFF_INCLUDE =
+RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS = no
+GIF_SETTING = internal
+FITS_SETTING = no
+OGDI_SETTING = no
+ODBC_SETTING = no
+# PGeo driver is built-in when ODBC is available
+PGEO_SETTING = no
+MSSQLSPATIAL_SETTING = no
+GEOMEDIA_SETTING = no
+NETCDF_SETTING = no
+LIBZ_SETTING = external
+LIBLZMA_SETTING = no
+
+#
+# Rasdaman stuff
+#
+RASDAMAN_ENABLED = no
+RASDAMAN_INC =
+RASDAMAN_LIB =
+
+#
+# Poppler stuff
+#
+
+HAVE_POPPLER = no
+POPPLER_HAS_OPTCONTENT = no
+POPPLER_BASE_STREAM_HAS_TWO_ARGS = no
+POPPLER_0_20_OR_LATER = no
+POPPLER_INC =
+
+#
+# Podofo stuff
+#
+
+HAVE_PODOFO = no
+PODOFO_INC =
+
+#
+# CharLs stuff
+# Uncomment and adapt paths to enable JPEGLS driver
+#
+#HAVE_CHARLS = yes
+#CHARLS_INC = -I/path/to/charls_include
+#CHARLS_LIB = -L/path/to/charls_lib -lCharLS
+
+#
+# PROJ.4 stuff
+#
+PROJ_STATIC = yes
+ifeq ($(PROJ_STATIC),yes)
+PROJ_FLAGS = -DPROJ_STATIC
+endif
+PROJ_INCLUDE = -I$(GEODA_HOME)/libraries/include
+
+PAM_SETTING = -DPAM_ENABLED
+
+ifeq ($(OGR_ENABLED),yes)
+GDAL_LIBS := $(GDAL_LIB) $(OCI_LIB) $(GDAL_LIBS)
+CPPFLAGS := -DOGR_ENABLED $(CPPFLAGS)
+else
+GDAL_LIBS = $(GDAL_LIB)
+endif
+
+#
+# Java stuff
+#
+JAVA_INC =
+JVM_LIB =
+
+MDB_ENABLED = no
+
+HAVE_ARMADILLO = no
+
+#
+# freexl stuff
+#
+
+HAVE_FREEXL = yes
+FREEXL_INCLUDE = -I$(GEODA_HOME)/libraries/include
+
+#
+# Note these codes have to exactly match the format directory names,
+# and their uppercase form should be the format portion of the
+# format registration entry point. eg. gdb -> GDALRegister_GDB().
+#
+GDAL_FORMATS = gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm \
+ sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b \
+ nitf bmp pcidsk airsar rs2 ilwis rmf leveller sgi srtmhgt \
+ idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg \
+ coasp tsx terragen blx msgn til r northwood saga xyz hf2 \
+ kmlsuperoverlay ozi ctg e00grid zmap ngsgeoid \
+ wcs wms grib bsb gif jpeg png pcraster
+
+
+ifneq ($(LIBZ_SETTING),no)
+GDAL_FORMATS := $(GDAL_FORMATS) rik
+endif
+
+ifeq ($(OGR_ENABLED),yes)
+ifeq ($(HAVE_SQLITE),yes)
+GDAL_FORMATS := $(GDAL_FORMATS) rasterlite
+endif
+endif
+
+ifeq ($(HAVE_POSTGISRASTER),yes)
+GDAL_FORMATS := $(GDAL_FORMATS) postgisraster
+endif
+
+ifeq ($(HAVE_CHARLS),yes)
+GDAL_FORMATS := $(GDAL_FORMATS) jpegls
+endif
+
+#
+# CONFIG_LIBS is what local program should link against, and CONFIG_LIBS_INS
+# is what will be emitted into the gdal-config script that is installed
+# globally.
+#
+
+ifeq ($(HAVE_LIBTOOL), yes)
+
+CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL)
+ifeq ($(MACOSX_FRAMEWORK),yes)
+CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal
+else
+CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal
+endif # MACOSX_FRAMEWORK
+
+EXE_DEP_LIBS = $(GDAL_ROOT)/$(LIBGDAL)
+SO_EXT = la
+
+else # HAVE_LIBTOOL
+
+ifeq ($(HAVE_LD_SHARED),yes)
+CONFIG_LIBS = $(GDAL_SLIB_LINK) $(LIBS)
+ifeq ($(MACOSX_FRAMEWORK),yes)
+CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal
+else
+CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal
+endif
+EXE_DEP_LIBS = $(GDAL_SLIB)
+else
+CONFIG_LIBS = $(GDAL_LIBS) $(LIBS)
+CONFIG_LIBS_INS = $(foreach LF,$(GDAL_LIBS),$(INST_LIB)/$(notdir $(LF)))\
+ $(LIBS)
+EXE_DEP_LIBS = $(GDAL_LIB)
+endif
+
+endif # HAVE_LIBTOOL
+
+
+#
+# generic library rules
+#
+
+#
+# gdal and ogr low level drivers use the following default rules in order to
+# populate the ../o/ directory with all object and library object files
+#
+
+O_OBJ = $(foreach file,$(OBJ),../o/$(file))
+
+../o/%.$(OBJ_EXT): %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+../o/%.$(OBJ_EXT): %.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+%.$(OBJ_EXT): %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+%.$(OBJ_EXT): %.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+#
+# default rules for handling subdirectories
+#
+
+%-target:
+ $(MAKE) -C $*
+
+%-clean:
+ $(MAKE) -C $* clean
diff --git a/BuildTools/centos/dep/gdal-1.9.2/GDALmake.opt.web b/BuildTools/centos/dep/gdal-1.9.2/GDALmake.opt.web
new file mode 100644
index 000000000..03a438990
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/GDALmake.opt.web
@@ -0,0 +1,543 @@
+GDAL_ROOT = $(GEODA_HOME)/temp/gdal-1.9.2
+top_builddir = $(GDAL_ROOT)
+
+#
+# the library can be built by the native build or with the help of libtool
+#
+
+SHELL = /bin/bash
+HAVE_LIBTOOL = yes
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+ifeq ($(HAVE_LIBTOOL),yes)
+LIBTOOL_COMPILE_CC = $(LIBTOOL) --mode=compile --tag=CC
+LIBTOOL_COMPILE_CXX = $(LIBTOOL) --mode=compile --tag=CXX
+LIBTOOL_LINK = $(LIBTOOL) --mode=link
+LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
+LIBTOOL_FINISH = $(LIBTOOL) --mode=finish --silent
+LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
+OBJ_EXT = lo
+else
+LIBTOOL_FINISH = /bin/true
+OBJ_EXT = o
+endif
+
+CC = $(LIBTOOL_COMPILE_CC) gcc
+CXX = $(LIBTOOL_COMPILE_CXX) g++
+LD = $(LIBTOOL_LINK) g++
+RM = $(LIBTOOL_CLEAN) /bin/rm -f *.lo
+INSTALL = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c
+INSTALL_LIB = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c
+INSTALL_DATA = $(GDAL_ROOT)/install-sh -c -m 0644
+INSTALL_DIR = $(GDAL_ROOT)/install-sh -d
+
+# SDE_LIB needs to be first because it embeds zlib. We need to use its symbols instead of -lz's
+
+LIBS = $(SDE_LIB) -lidn -lexpat -lz -lpthread -lm -lrt -ldl $(GEODA_HOME)/libraries/lib/libpq.a -L$(GEODA_HOME)/libraries/lib -lgeos -lgeos_c -lproj -lfreexl -lxerces-c -lspatialite -lsqlite3 \
+ $(KAK_LIBS) $(DWG_LIBS) $(CURL_LIB) \
+ $(MRSID_LIBS) $(MRSID_LIDAR_LIBS) $(INGRES_LIB) \
+ $(PCIDSK_LIB) $(RASDAMAN_LIB) $(CHARLS_LIB) \
+ $(OPENCL_LIB) $(JVM_LIB) $(LIBICONV) $(FGDB_LIB)
+
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_CFLAGS = @PYTHON_CFLAGS@ @NUMPY_FLAG@
+PYTHON = python
+PYTHON_DEV = @PYTHON_DEV@
+PY_LD_SHARED = @PY_LD_SHARED@
+PY_SO_EXT = @PY_SO_EXT@
+PY_HAVE_SETUPTOOLS=1
+
+# Next Generation SWIG bindings
+BINDINGS = python
+
+HAVE_OGDI = no
+OGR_ENABLED = yes
+
+OSX_FRAMEWORK_PREFIX =
+OSX_VERSION_FRAMEWORK_PREFIX =
+
+prefix = /usr/local
+exec_prefix = ${prefix}
+INST_PREFIX = ${prefix}
+INST_INCLUDE = ${prefix}/include
+INST_DATA = ${prefix}/share/gdal
+INST_LIB = ${exec_prefix}/lib
+INST_BIN = ${exec_prefix}/bin
+INST_PYMOD = /usr/lib64/python2.6/site-packages
+INST_DOCS = ${prefix}/doc
+INST_MAN = ${prefix}/share/gdal/man
+INST_HTML = $(HOME)/www/gdal
+
+CPPFLAGS = -I$(GDAL_ROOT)/port
+CFLAGS = -g -O2 -DDEBUG -Wall -Wdeclaration-after-statement $(USER_DEFS)
+CXXFLAGS = -g -O2 -DDEBUG -Wall $(USER_DEFS)
+LDFLAGS =
+
+RANLIB = ranlib
+SO_EXT =
+LD_SHARED =
+EXE =
+
+ifeq ($(notdir $(LD_SHARED)),true)
+HAVE_LD_SHARED = no
+else
+HAVE_LD_SHARED = yes
+endif
+
+GDAL_INCLUDE = -I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/gcore \
+ -I$(GDAL_ROOT)/alg \
+ -I$(GDAL_ROOT)/ogr -I$(GDAL_ROOT)/ogr/ogrsf_frmts
+
+# libtool targets and help variables
+LIBGDAL := libgdal.la
+LIBGDAL_CURRENT := 17
+LIBGDAL_REVISION := 2
+LIBGDAL_AGE := 16
+
+# native build targets and variables
+GDAL_VER = 1.9.2
+
+# version info
+GDAL_VERSION_MAJOR = 1
+GDAL_VERSION_MINOR = 9
+GDAL_VERSION_REV = 2
+
+GDAL_LIB = $(GDAL_ROOT)/libgdal.a
+GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT)
+GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal
+
+# Mac OS X Framework definition
+MACOSX_FRAMEWORK =
+
+#
+# GDAL/OGR PostgreSQL support.
+#
+HAVE_OGR_PG = yes
+HAVE_POSTGISRASTER = yes
+PG_INC = -I$(GEODA_HOME)/libraries/include -I$(GEODA_HOME)/libraries/include/postgresql/server -DPG_HAS_PQESCAPESTRINGCONN
+
+#
+# INGRES
+#
+II_SYSTEM =
+HAVE_INGRES = no
+INGRES_LIB =
+INGRES_INC =
+
+#
+# MySQL support.
+#
+HAVE_MYSQL = yes
+MYSQL_LIB = $(GEODA_HOME)/temp/mysql-5.6.14/bld/libmysql/libmysqlclient.a -lpthread
+MYSQL_INC = -I$(GEODA_HOME)/temp/mysql-5.6.14/include -I$(GEODA_HOME)/temp/mysql-5.6.14/bld/include
+LIBS += $(MYSQL_LIB)
+
+#
+# HDF4 Support.
+#
+HAVE_HDF4 = no
+HDF4_INCLUDE = -I$(GDAL_ROOT)/ogr
+
+#
+# HDF5 Support.
+#
+HAVE_HDF5 = no
+HDF5_INCLUDE =
+
+#
+# NetCDF Support.
+#
+NETCDF_ROOT =
+NETCDF_HAS_NC4 =
+NETCDF_HAS_HDF4 =
+
+#
+# DODS Include file location
+#
+DODS_INC =
+ifeq ($(DODS_INC),)
+HAVE_DODS = no
+else
+HAVE_DODS = yes
+endif
+
+#
+# SQLite
+#
+SQLITE_INC = -I$(GEODA_HOME)/libraries/include
+HAVE_SQLITE = yes
+HAVE_SPATIALITE = yes
+SPATIALITE_INC = -I$(GEODA_HOME)/libraries/include
+SPATIALITE_AMALGAMATION = no
+
+#
+# JPEG2000 via Kakadu Support.
+#
+KAKDIR =
+
+ifneq ($(KAKDIR),)
+ifeq ($(HAVE_LIBTOOL),yes)
+include $(GDAL_ROOT)/frmts/jp2kak/jp2kak.lst
+KAK_LIBS = $(KAK_OBJ)
+endif
+endif
+
+#
+# JPEG-2000 Support via JasPer library.
+#
+HAVE_JASPER = no
+JASPER_FLAGS =
+
+#
+# JPEG-2000 Support via OpenJPEG library.
+#
+HAVE_OPENJPEG = no
+
+#
+# MrSID support via LizardTech's DSDK
+#
+MRSID_FLAGS =
+MRSID_INCLUDE =
+MRSID_LIBS =
+
+#
+#
+# MrSID/MG4 support via LizardTech LiDAR SDK
+#
+MRSID_LIDAR_INCLUDE =
+MRSID_LIDAR_LIBS =
+
+# Xerces C++ XML Parser for GML and ILI
+#
+HAVE_XERCES = yes
+XERCES_INCLUDE = -I$(GEODA_HOME)/libraries/include -I$(GEODA_HOME)/libraries/include/xercesc
+
+#
+# Enable NAS format
+#
+HAVE_NAS = yes
+
+#
+# Expat XML Parser for KML, GPX, GeoRSS (and GML if no Xerces C++)
+#
+HAVE_EXPAT = yes
+EXPAT_INCLUDE = -I/usr/include
+
+#
+# Google libkml for the new OGR KML driver written by Brian Case
+#
+HAVE_LIBKML = no
+LIBKML_INCLUDE = -I$(GEODA_HOME)/libraries/include -I$(GEODA_HOME)/libraries/include/kml -I$(GEODA_HOME)/libraries/include/kml/third_party/boost_1_34_1
+
+#
+# Oracle Spatial Support
+#
+HAVE_OCI = no
+OCI_INCLUDE =
+
+# GEOS Support
+
+HAVE_GEOS = yes
+GEOS_CFLAGS = -I$(GEODA_HOME)/libraries/include
+
+# GRASS Support
+
+GRASS_SETTING = no
+GRASS_INCLUDE =
+GRASS_GISBASE =
+HAVE_GRASS = no
+
+#
+# SDE
+#
+HAVE_SDE = no
+SDE_LIB =
+SDE_INC =
+
+#
+# FileGDB
+#
+HAVE_FGDB =
+FGDB_LIB =
+FGDB_INC =
+
+#
+# ArcObjects
+#
+HAVE_ARCOBJECTS = @ARCOBJECTS_ENABLED@
+ARCOBJECTS_LIB = @ARCOBJECTS_LIB@
+ARCOBJECTS_INC = @ARCOBJECTS_INC@
+
+
+#
+# VFK
+#
+HAVE_VFK = yes
+
+#
+# Curl
+#
+CURL_SETTING = yes
+CURL_LIB = $(GEODA_HOME)/libraries/lib/libcurl.a -lldap -lz
+CURL_INC = -I$(GEODA_HOME)/libraries/include
+
+#
+# OpenCL support
+#
+OPENCL_LIB =
+OPENCL_FLAGS =
+
+#
+# PCIDSK SDK
+#
+PCIDSK_SETTING = internal
+PCIDSK_LIB =
+PCIDSK_INCLUDE =
+
+#
+# Iconv
+#
+LIBICONV = -L$(GEODA_HOME)/libraries/lib -liconv
+
+#
+# DWGdirect Library
+#
+DWGDIRECT =
+DWG_PLT =
+
+ifneq ($(DWGDIRECT),)
+DWG_LIBDIR = $(DWGDIRECT)/lib/$(DWG_PLT)
+DWG_LIBS = $(DWG_LIBDIR)/DD_$(DWG_PLT)_ModelerGeometry.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_AcisRenderer.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Br.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_AcisBuilder.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Db.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Gs.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_SpatialIndex.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Gi.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Ge.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Root.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_FT.a \
+ $(DWG_LIBDIR)/DD_$(DWG_PLT)_Alloc.a
+HAVE_DWGDIRECT = yes
+else
+DWG_LIBS =
+HAVE_DWGDIRECT = no
+endif
+
+#
+# Informix DataBlade support
+#
+HAVE_IDB = no
+IDB_INC =
+IDB_LIB =
+ifeq ($(HAVE_IDB),yes)
+LIBS += $(IDB_LIB)
+endif
+
+#
+# FMEObjects
+#
+ifeq (,)
+HAVE_FME = no
+FME_INCLUDE =
+else
+HAVE_FME = yes
+FME_INCLUDE = -I/fmeobjects/cpp
+endif
+
+# PCRaster support
+PCRASTER_SETTING = internal
+
+OGDI_INCLUDE =
+
+PNG_SETTING = internal
+JPEG_SETTING = internal
+JPEG12_ENABLED = yes
+TIFF_SETTING = internal
+TIFF_OPTS = -DBIGTIFF_SUPPORT
+RENAME_INTERNAL_LIBTIFF_SYMBOLS = no
+GEOTIFF_SETTING = internal
+GEOTIFF_INCLUDE =
+RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS = no
+GIF_SETTING = internal
+FITS_SETTING = no
+OGDI_SETTING = no
+ODBC_SETTING = no
+# PGeo driver is built-in when ODBC is available
+PGEO_SETTING = no
+MSSQLSPATIAL_SETTING = no
+GEOMEDIA_SETTING = no
+NETCDF_SETTING = no
+LIBZ_SETTING = external
+LIBLZMA_SETTING = no
+
+#
+# Rasdaman stuff
+#
+RASDAMAN_ENABLED = no
+RASDAMAN_INC =
+RASDAMAN_LIB =
+
+#
+# Poppler stuff
+#
+
+HAVE_POPPLER = no
+POPPLER_HAS_OPTCONTENT = no
+POPPLER_BASE_STREAM_HAS_TWO_ARGS = no
+POPPLER_0_20_OR_LATER = no
+POPPLER_INC =
+
+#
+# Podofo stuff
+#
+
+HAVE_PODOFO = no
+PODOFO_INC =
+
+#
+# CharLs stuff
+# Uncomment and adapt paths to enable JPEGLS driver
+#
+#HAVE_CHARLS = yes
+#CHARLS_INC = -I/path/to/charls_include
+#CHARLS_LIB = -L/path/to/charls_lib -lCharLS
+
+#
+# PROJ.4 stuff
+#
+PROJ_STATIC = yes
+ifeq ($(PROJ_STATIC),yes)
+PROJ_FLAGS = -DPROJ_STATIC
+endif
+PROJ_INCLUDE = -I$(GEODA_HOME)/libraries/include
+
+PAM_SETTING = -DPAM_ENABLED
+
+ifeq ($(OGR_ENABLED),yes)
+GDAL_LIBS := $(GDAL_LIB) $(OCI_LIB) $(GDAL_LIBS)
+CPPFLAGS := -DOGR_ENABLED $(CPPFLAGS)
+else
+GDAL_LIBS = $(GDAL_LIB)
+endif
+
+#
+# Java stuff
+#
+JAVA_INC =
+JVM_LIB =
+
+MDB_ENABLED = no
+
+HAVE_ARMADILLO = no
+
+#
+# freexl stuff
+#
+
+HAVE_FREEXL = yes
+FREEXL_INCLUDE = -I$(GEODA_HOME)/libraries/include
+
+#
+# Note these codes have to exactly match the format directory names,
+# and their uppercase form should be the format portion of the
+# format registration entry point. eg. gdb -> GDALRegister_GDB().
+#
+GDAL_FORMATS = gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm \
+ sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b \
+ nitf bmp pcidsk airsar rs2 ilwis rmf leveller sgi srtmhgt \
+ idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg \
+ coasp tsx terragen blx msgn til r northwood saga xyz hf2 \
+ kmlsuperoverlay ozi ctg e00grid zmap ngsgeoid \
+ wcs wms grib bsb gif jpeg png pcraster
+
+
+ifneq ($(LIBZ_SETTING),no)
+GDAL_FORMATS := $(GDAL_FORMATS) rik
+endif
+
+ifeq ($(OGR_ENABLED),yes)
+ifeq ($(HAVE_SQLITE),yes)
+GDAL_FORMATS := $(GDAL_FORMATS) rasterlite
+endif
+endif
+
+ifeq ($(HAVE_POSTGISRASTER),yes)
+GDAL_FORMATS := $(GDAL_FORMATS) postgisraster
+endif
+
+ifeq ($(HAVE_CHARLS),yes)
+GDAL_FORMATS := $(GDAL_FORMATS) jpegls
+endif
+
+#
+# CONFIG_LIBS is what local program should link against, and CONFIG_LIBS_INS
+# is what will be emitted into the gdal-config script that is installed
+# globally.
+#
+
+ifeq ($(HAVE_LIBTOOL), yes)
+
+CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL)
+ifeq ($(MACOSX_FRAMEWORK),yes)
+CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal
+else
+CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal
+endif # MACOSX_FRAMEWORK
+
+EXE_DEP_LIBS = $(GDAL_ROOT)/$(LIBGDAL)
+SO_EXT = la
+
+else # HAVE_LIBTOOL
+
+ifeq ($(HAVE_LD_SHARED),yes)
+CONFIG_LIBS = $(GDAL_SLIB_LINK) $(LIBS)
+ifeq ($(MACOSX_FRAMEWORK),yes)
+CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal
+else
+CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal
+endif
+EXE_DEP_LIBS = $(GDAL_SLIB)
+else
+CONFIG_LIBS = $(GDAL_LIBS) $(LIBS)
+CONFIG_LIBS_INS = $(foreach LF,$(GDAL_LIBS),$(INST_LIB)/$(notdir $(LF)))\
+ $(LIBS)
+EXE_DEP_LIBS = $(GDAL_LIB)
+endif
+
+endif # HAVE_LIBTOOL
+
+
+#
+# generic library rules
+#
+
+#
+# gdal and ogr low level drivers use the following default rules in order to
+# populate the ../o/ directory with all object and library object files
+#
+
+O_OBJ = $(foreach file,$(OBJ),../o/$(file))
+
+../o/%.$(OBJ_EXT): %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+../o/%.$(OBJ_EXT): %.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+%.$(OBJ_EXT): %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+%.$(OBJ_EXT): %.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+#
+# default rules for handling subdirectories
+#
+
+%-target:
+ $(MAKE) -C $*
+
+%-clean:
+ $(MAKE) -C $* clean
diff --git a/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrfeature.cpp b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrfeature.cpp
new file mode 100644
index 000000000..e68cf2a93
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrfeature.cpp
@@ -0,0 +1,3483 @@
+/******************************************************************************
+ * $Id: ogrfeature.cpp 25049 2012-10-04 11:27:54Z rcoup $
+ *
+ * Project: OpenGIS Simple Features Reference Implementation
+ * Purpose: The OGRFeature class implementation.
+ * Author: Frank Warmerdam, warmerda@home.com
+ *
+ ******************************************************************************
+ * Copyright (c) 1999, Les Technologies SoftMap Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#include "ogr_feature.h"
+#include "ogr_api.h"
+#include "ogr_p.h"
+#include
+
+CPL_CVSID("$Id: ogrfeature.cpp 25049 2012-10-04 11:27:54Z rcoup $");
+
+/************************************************************************/
+/* OGRFeature() */
+/************************************************************************/
+
+/**
+ * \brief Constructor
+ *
+ * Note that the OGRFeature will increment the reference count of it's
+ * defining OGRFeatureDefn. Destruction of the OGRFeatureDefn before
+ * destruction of all OGRFeatures that depend on it is likely to result in
+ * a crash.
+ *
+ * This method is the same as the C function OGR_F_Create().
+ *
+ * @param poDefnIn feature class (layer) definition to which the feature will
+ * adhere.
+ */
+
+OGRFeature::OGRFeature( OGRFeatureDefn * poDefnIn )
+
+{
+ m_pszStyleString = NULL;
+ m_poStyleTable = NULL;
+ m_pszTmpFieldValue = NULL;
+ poDefnIn->Reference();
+ poDefn = poDefnIn;
+
+ nFID = OGRNullFID;
+
+ poGeometry = NULL;
+
+ // we should likely be initializing from the defaults, but this will
+ // usually be a waste.
+ pauFields = (OGRField *) CPLCalloc( poDefn->GetFieldCount(),
+ sizeof(OGRField) );
+
+ for( int i = 0; i < poDefn->GetFieldCount(); i++ )
+ {
+ pauFields[i].Set.nMarker1 = OGRUnsetMarker;
+ pauFields[i].Set.nMarker2 = OGRUnsetMarker;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_Create() */
+/************************************************************************/
+/**
+ * \brief Feature factory.
+ *
+ * Note that the OGRFeature will increment the reference count of it's
+ * defining OGRFeatureDefn. Destruction of the OGRFeatureDefn before
+ * destruction of all OGRFeatures that depend on it is likely to result in
+ * a crash.
+ *
+ * This function is the same as the C++ method OGRFeature::OGRFeature().
+ *
+ * @param hDefn handle to the feature class (layer) definition to
+ * which the feature will adhere.
+ *
+ * @return an handle to the new feature object with null fields and
+ * no geometry.
+ */
+
+OGRFeatureH OGR_F_Create( OGRFeatureDefnH hDefn )
+
+{
+ VALIDATE_POINTER1( hDefn, "OGR_F_Create", NULL );
+
+ return (OGRFeatureH) new OGRFeature( (OGRFeatureDefn *) hDefn );
+}
+
+/************************************************************************/
+/* ~OGRFeature() */
+/************************************************************************/
+
+OGRFeature::~OGRFeature()
+
+{
+ if( poGeometry != NULL )
+ delete poGeometry;
+
+ for( int i = 0; i < poDefn->GetFieldCount(); i++ )
+ {
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn(i);
+
+ if( !IsFieldSet(i) )
+ continue;
+
+ switch( poFDefn->GetType() )
+ {
+ case OFTString:
+ if( pauFields[i].String != NULL )
+ VSIFree( pauFields[i].String );
+ break;
+
+ case OFTBinary:
+ if( pauFields[i].Binary.paData != NULL )
+ VSIFree( pauFields[i].Binary.paData );
+ break;
+
+ case OFTStringList:
+ CSLDestroy( pauFields[i].StringList.paList );
+ break;
+
+ case OFTIntegerList:
+ case OFTRealList:
+ CPLFree( pauFields[i].IntegerList.paList );
+ break;
+
+ default:
+ // should add support for wide strings.
+ break;
+ }
+ }
+
+ poDefn->Release();
+
+ CPLFree( pauFields );
+ CPLFree(m_pszStyleString);
+ CPLFree(m_pszTmpFieldValue);
+}
+
+/************************************************************************/
+/* OGR_F_Destroy() */
+/************************************************************************/
+/**
+ * \brief Destroy feature
+ *
+ * The feature is deleted, but within the context of the GDAL/OGR heap.
+ * This is necessary when higher level applications use GDAL/OGR from a
+ * DLL and they want to delete a feature created within the DLL. If the
+ * delete is done in the calling application the memory will be freed onto
+ * the application heap which is inappropriate.
+ *
+ * This function is the same as the C++ method OGRFeature::DestroyFeature().
+ *
+ * @param hFeat handle to the feature to destroy.
+ */
+
+void OGR_F_Destroy( OGRFeatureH hFeat )
+
+{
+ delete (OGRFeature *) hFeat;
+}
+
+/************************************************************************/
+/* CreateFeature() */
+/************************************************************************/
+
+/**
+ * \brief Feature factory.
+ *
+ * This is essentially a feature factory, useful for
+ * applications creating features but wanting to ensure they
+ * are created out of the OGR/GDAL heap.
+ *
+ * This method is the same as the C function OGR_F_Create().
+ *
+ * @param poDefn Feature definition defining schema.
+ *
+ * @return new feature object with null fields and no geometry. May be
+ * deleted with delete.
+ */
+
+OGRFeature *OGRFeature::CreateFeature( OGRFeatureDefn *poDefn )
+
+{
+ return new OGRFeature( poDefn );
+}
+
+/************************************************************************/
+/* DestroyFeature() */
+/************************************************************************/
+
+/**
+ * \brief Destroy feature
+ *
+ * The feature is deleted, but within the context of the GDAL/OGR heap.
+ * This is necessary when higher level applications use GDAL/OGR from a
+ * DLL and they want to delete a feature created within the DLL. If the
+ * delete is done in the calling application the memory will be freed onto
+ * the application heap which is inappropriate.
+ *
+ * This method is the same as the C function OGR_F_Destroy().
+ *
+ * @param poFeature the feature to delete.
+ */
+
+void OGRFeature::DestroyFeature( OGRFeature *poFeature )
+
+{
+ delete poFeature;
+}
+
+/************************************************************************/
+/* GetDefnRef() */
+/************************************************************************/
+
+/**
+ * \fn OGRFeatureDefn *OGRFeature::GetDefnRef();
+ *
+ * \brief Fetch feature definition.
+ *
+ * This method is the same as the C function OGR_F_GetDefnRef().
+ *
+ * @return a reference to the feature definition object.
+ */
+
+/************************************************************************/
+/* OGR_F_GetDefnRef() */
+/************************************************************************/
+
+/**
+ * \brief Fetch feature definition.
+ *
+ * This function is the same as the C++ method OGRFeature::GetDefnRef().
+ *
+ * @param hFeat handle to the feature to get the feature definition from.
+ *
+ * @return an handle to the feature definition object on which feature
+ * depends.
+ */
+
+OGRFeatureDefnH OGR_F_GetDefnRef( OGRFeatureH hFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetDefnRef", NULL );
+
+ return (OGRFeatureDefnH) ((OGRFeature *) hFeat)->GetDefnRef();
+}
+
+/************************************************************************/
+/* SetGeometryDirectly() */
+/************************************************************************/
+
+/**
+ * \brief Set feature geometry.
+ *
+ * This method updates the features geometry, and operate exactly as
+ * SetGeometry(), except that this method assumes ownership of the
+ * passed geometry.
+ *
+ * This method is the same as the C function OGR_F_SetGeometryDirectly().
+ *
+ * @param poGeomIn new geometry to apply to feature. Passing NULL value here
+ * is correct and it will result in deallocation of currently assigned geometry
+ * without assigning new one.
+ *
+ * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
+ * the geometry type is illegal for the OGRFeatureDefn (checking not yet
+ * implemented).
+ */
+
+OGRErr OGRFeature::SetGeometryDirectly( OGRGeometry * poGeomIn )
+
+{
+ delete poGeometry;
+ poGeometry = poGeomIn;
+
+ // I should be verifying that the geometry matches the defn's type.
+
+ return OGRERR_NONE;
+}
+
+/************************************************************************/
+/* OGR_F_SetGeometryDirectly() */
+/************************************************************************/
+
+/**
+ * \brief Set feature geometry.
+ *
+ * This function updates the features geometry, and operate exactly as
+ * SetGeometry(), except that this function assumes ownership of the
+ * passed geometry.
+ *
+ * This function is the same as the C++ method
+ * OGRFeature::SetGeometryDirectly.
+ *
+ * @param hFeat handle to the feature on which to apply the geometry.
+ * @param hGeom handle to the new geometry to apply to feature.
+ *
+ * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
+ * the geometry type is illegal for the OGRFeatureDefn (checking not yet
+ * implemented).
+ */
+
+OGRErr OGR_F_SetGeometryDirectly( OGRFeatureH hFeat, OGRGeometryH hGeom )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_SetGeometryDirectly", CE_Failure );
+
+ return ((OGRFeature *) hFeat)->SetGeometryDirectly((OGRGeometry *) hGeom);
+}
+
+/************************************************************************/
+/* SetGeometry() */
+/************************************************************************/
+
+/**
+ * \brief Set feature geometry.
+ *
+ * This method updates the features geometry, and operate exactly as
+ * SetGeometryDirectly(), except that this method does not assume ownership
+ * of the passed geometry, but instead makes a copy of it.
+ *
+ * This method is the same as the C function OGR_F_SetGeometry().
+ *
+ * @param poGeomIn new geometry to apply to feature. Passing NULL value here
+ * is correct and it will result in deallocation of currently assigned geometry
+ * without assigning new one.
+ *
+ * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
+ * the geometry type is illegal for the OGRFeatureDefn (checking not yet
+ * implemented).
+ */
+
+OGRErr OGRFeature::SetGeometry( OGRGeometry * poGeomIn )
+
+{
+ delete poGeometry;
+
+ if( poGeomIn != NULL )
+ poGeometry = poGeomIn->clone();
+ else
+ poGeometry = NULL;
+
+ // I should be verifying that the geometry matches the defn's type.
+
+ return OGRERR_NONE;
+}
+
+/************************************************************************/
+/* OGR_F_SetGeometry() */
+/************************************************************************/
+
+/**
+ * \brief Set feature geometry.
+ *
+ * This function updates the features geometry, and operate exactly as
+ * SetGeometryDirectly(), except that this function does not assume ownership
+ * of the passed geometry, but instead makes a copy of it.
+ *
+ * This function is the same as the C++ OGRFeature::SetGeometry().
+ *
+ * @param hFeat handle to the feature on which new geometry is applied to.
+ * @param hGeom handle to the new geometry to apply to feature.
+ *
+ * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
+ * the geometry type is illegal for the OGRFeatureDefn (checking not yet
+ * implemented).
+ */
+
+OGRErr OGR_F_SetGeometry( OGRFeatureH hFeat, OGRGeometryH hGeom )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_SetGeometry", CE_Failure );
+
+ return ((OGRFeature *) hFeat)->SetGeometry((OGRGeometry *) hGeom);
+}
+
+/************************************************************************/
+/* StealGeometry() */
+/************************************************************************/
+
+/**
+ * \brief Take away ownership of geometry.
+ *
+ * Fetch the geometry from this feature, and clear the reference to the
+ * geometry on the feature. This is a mechanism for the application to
+ * take over ownship of the geometry from the feature without copying.
+ * Sort of an inverse to SetGeometryDirectly().
+ *
+ * After this call the OGRFeature will have a NULL geometry.
+ *
+ * @return the pointer to the geometry.
+ */
+
+OGRGeometry *OGRFeature::StealGeometry()
+
+{
+ OGRGeometry *poReturn = poGeometry;
+ poGeometry = NULL;
+ return poReturn;
+}
+
+/************************************************************************/
+/* OGR_F_StealGeometry() */
+/************************************************************************/
+
+/**
+ * \brief Take away ownership of geometry.
+ *
+ * Fetch the geometry from this feature, and clear the reference to the
+ * geometry on the feature. This is a mechanism for the application to
+ * take over ownship of the geometry from the feature without copying.
+ * Sort of an inverse to OGR_FSetGeometryDirectly().
+ *
+ * After this call the OGRFeature will have a NULL geometry.
+ *
+ * @return the pointer to the geometry.
+ */
+
+OGRGeometryH OGR_F_StealGeometry( OGRFeatureH hFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_StealGeometry", NULL );
+
+ return (OGRGeometryH) ((OGRFeature *) hFeat)->StealGeometry();
+}
+
+/************************************************************************/
+/* GetGeometryRef() */
+/************************************************************************/
+
+/**
+ * \fn OGRGeometry *OGRFeature::GetGeometryRef();
+ *
+ * \brief Fetch pointer to feature geometry.
+ *
+ * This method is the same as the C function OGR_F_GetGeometryRef().
+ *
+ * @return pointer to internal feature geometry. This object should
+ * not be modified.
+ */
+
+/************************************************************************/
+/* OGR_F_GetGeometryRef() */
+/************************************************************************/
+
+/**
+ * \brief Fetch an handle to feature geometry.
+ *
+ * This function is the same as the C++ method OGRFeature::GetGeometryRef().
+ *
+ * @param hFeat handle to the feature to get geometry from.
+ * @return an handle to internal feature geometry. This object should
+ * not be modified.
+ */
+
+OGRGeometryH OGR_F_GetGeometryRef( OGRFeatureH hFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetGeometryRef", NULL );
+
+ return (OGRGeometryH) ((OGRFeature *) hFeat)->GetGeometryRef();
+}
+
+/************************************************************************/
+/* Clone() */
+/************************************************************************/
+
+/**
+ * \brief Duplicate feature.
+ *
+ * The newly created feature is owned by the caller, and will have it's own
+ * reference to the OGRFeatureDefn.
+ *
+ * This method is the same as the C function OGR_F_Clone().
+ *
+ * @return new feature, exactly matching this feature.
+ */
+
+OGRFeature *OGRFeature::Clone()
+
+{
+ OGRFeature *poNew = new OGRFeature( poDefn );
+
+ poNew->SetGeometry( poGeometry );
+
+ for( int i = 0; i < poDefn->GetFieldCount(); i++ )
+ {
+ poNew->SetField( i, pauFields + i );
+ }
+
+ if( GetStyleString() != NULL )
+ poNew->SetStyleString(GetStyleString());
+
+ poNew->SetFID( GetFID() );
+
+ return poNew;
+}
+
+/************************************************************************/
+/* OGR_F_Clone() */
+/************************************************************************/
+
+/**
+ * \brief Duplicate feature.
+ *
+ * The newly created feature is owned by the caller, and will have it's own
+ * reference to the OGRFeatureDefn.
+ *
+ * This function is the same as the C++ method OGRFeature::Clone().
+ *
+ * @param hFeat handle to the feature to clone.
+ * @return an handle to the new feature, exactly matching this feature.
+ */
+
+OGRFeatureH OGR_F_Clone( OGRFeatureH hFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_Clone", NULL );
+
+ return (OGRFeatureH) ((OGRFeature *) hFeat)->Clone();
+}
+
+/************************************************************************/
+/* GetFieldCount() */
+/************************************************************************/
+
+/**
+ * \fn int OGRFeature::GetFieldCount();
+ *
+ * \brief Fetch number of fields on this feature.
+ * This will always be the same
+ * as the field count for the OGRFeatureDefn.
+ *
+ * This method is the same as the C function OGR_F_GetFieldCount().
+ *
+ * @return count of fields.
+ */
+
+/************************************************************************/
+/* OGR_F_GetFieldCount() */
+/************************************************************************/
+
+/**
+ * \brief Fetch number of fields on this feature
+ * This will always be the same
+ * as the field count for the OGRFeatureDefn.
+ *
+ * This function is the same as the C++ method OGRFeature::GetFieldCount().
+ *
+ * @param hFeat handle to the feature to get the fields count from.
+ * @return count of fields.
+ */
+
+int OGR_F_GetFieldCount( OGRFeatureH hFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldCount", 0 );
+
+ return ((OGRFeature *) hFeat)->GetFieldCount();
+}
+
+/************************************************************************/
+/* GetFieldDefnRef() */
+/************************************************************************/
+
+/**
+ * \fn OGRFieldDefn *OGRFeature::GetFieldDefnRef( int iField );
+ *
+ * \brief Fetch definition for this field.
+ *
+ * This method is the same as the C function OGR_F_GetFieldDefnRef().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field definition (from the OGRFeatureDefn). This is an
+ * internal reference, and should not be deleted or modified.
+ */
+
+/************************************************************************/
+/* OGR_F_GetFieldDefnRef() */
+/************************************************************************/
+
+/**
+ * \brief Fetch definition for this field.
+ *
+ * This function is the same as the C++ method OGRFeature::GetFieldDefnRef().
+ *
+ * @param hFeat handle to the feature on which the field is found.
+ * @param i the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return an handle to the field definition (from the OGRFeatureDefn).
+ * This is an internal reference, and should not be deleted or modified.
+ */
+
+OGRFieldDefnH OGR_F_GetFieldDefnRef( OGRFeatureH hFeat, int i )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldDefnRef", NULL );
+
+ return (OGRFieldDefnH) ((OGRFeature *) hFeat)->GetFieldDefnRef(i);
+}
+
+/************************************************************************/
+/* GetFieldIndex() */
+/************************************************************************/
+
+/**
+ * \fn int OGRFeature::GetFieldIndex( const char * pszName );
+ *
+ * \brief Fetch the field index given field name.
+ *
+ * This is a cover for the OGRFeatureDefn::GetFieldIndex() method.
+ *
+ * This method is the same as the C function OGR_F_GetFieldIndex().
+ *
+ * @param pszName the name of the field to search for.
+ *
+ * @return the field index, or -1 if no matching field is found.
+ */
+
+/************************************************************************/
+/* OGR_F_GetFieldIndex() */
+/************************************************************************/
+
+/**
+ * \brief Fetch the field index given field name.
+ *
+ * This is a cover for the OGRFeatureDefn::GetFieldIndex() method.
+ *
+ * This function is the same as the C++ method OGRFeature::GetFieldIndex().
+ *
+ * @param hFeat handle to the feature on which the field is found.
+ * @param pszName the name of the field to search for.
+ *
+ * @return the field index, or -1 if no matching field is found.
+ */
+
+int OGR_F_GetFieldIndex( OGRFeatureH hFeat, const char *pszName )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldIndex", 0 );
+
+ return ((OGRFeature *) hFeat)->GetFieldIndex( pszName );
+}
+
+/************************************************************************/
+/* IsFieldSet() */
+/************************************************************************/
+
+/**
+ * \fn int OGRFeature::IsFieldSet( int iField ) const;
+ *
+ * \brief Test if a field has ever been assigned a value or not.
+ *
+ * This method is the same as the C function OGR_F_IsFieldSet().
+ *
+ * @param iField the field to test.
+ *
+ * @return TRUE if the field has been set, otherwise false.
+ */
+
+int OGRFeature::IsFieldSet( int iField ) const
+
+{
+ int iSpecialField = iField - poDefn->GetFieldCount();
+ if (iSpecialField >= 0)
+ {
+ // special field value accessors
+ switch (iSpecialField)
+ {
+ case SPF_FID:
+ return ((OGRFeature *)this)->GetFID() != OGRNullFID;
+
+ case SPF_OGR_GEOM_WKT:
+ case SPF_OGR_GEOMETRY:
+ return poGeometry != NULL;
+
+ case SPF_OGR_STYLE:
+ return ((OGRFeature *)this)->GetStyleString() != NULL;
+
+ case SPF_OGR_GEOM_AREA:
+ if( poGeometry == NULL )
+ return FALSE;
+
+ return OGR_G_GetArea((OGRGeometryH)poGeometry) != 0.0;
+
+ default:
+ return FALSE;
+ }
+ }
+ else
+ {
+ return pauFields[iField].Set.nMarker1 != OGRUnsetMarker
+ || pauFields[iField].Set.nMarker2 != OGRUnsetMarker;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_IsFieldSet() */
+/************************************************************************/
+
+/**
+ * \brief Test if a field has ever been assigned a value or not.
+ *
+ * This function is the same as the C++ method OGRFeature::IsFieldSet().
+ *
+ * @param hFeat handle to the feature on which the field is.
+ * @param iField the field to test.
+ *
+ * @return TRUE if the field has been set, otherwise false.
+ */
+
+int OGR_F_IsFieldSet( OGRFeatureH hFeat, int iField )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_IsFieldSet", 0 );
+
+ OGRFeature* poFeature = (OGRFeature* )hFeat;
+
+ if (iField < 0 || iField >= poFeature->GetFieldCount())
+ {
+ CPLError(CE_Failure, CPLE_AppDefined, "Invalid index : %d", iField);
+ return FALSE;
+ }
+
+ return poFeature->IsFieldSet( iField );
+}
+
+/************************************************************************/
+/* UnsetField() */
+/************************************************************************/
+
+/**
+ * \brief Clear a field, marking it as unset.
+ *
+ * This method is the same as the C function OGR_F_UnsetField().
+ *
+ * @param iField the field to unset.
+ */
+
+void OGRFeature::UnsetField( int iField )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL || !IsFieldSet(iField) )
+ return;
+
+ switch( poFDefn->GetType() )
+ {
+ case OFTRealList:
+ case OFTIntegerList:
+ CPLFree( pauFields[iField].IntegerList.paList );
+ break;
+
+ case OFTStringList:
+ CSLDestroy( pauFields[iField].StringList.paList );
+ break;
+
+ case OFTString:
+ CPLFree( pauFields[iField].String );
+ break;
+
+ case OFTBinary:
+ CPLFree( pauFields[iField].Binary.paData );
+ break;
+
+ default:
+ break;
+ }
+
+ pauFields[iField].Set.nMarker1 = OGRUnsetMarker;
+ pauFields[iField].Set.nMarker2 = OGRUnsetMarker;
+}
+
+/************************************************************************/
+/* OGR_F_UnsetField() */
+/************************************************************************/
+
+/**
+ * \brief Clear a field, marking it as unset.
+ *
+ * This function is the same as the C++ method OGRFeature::UnsetField().
+ *
+ * @param hFeat handle to the feature on which the field is.
+ * @param iField the field to unset.
+ */
+
+void OGR_F_UnsetField( OGRFeatureH hFeat, int iField )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_UnsetField" );
+
+ ((OGRFeature *) hFeat)->UnsetField( iField );
+}
+
+/************************************************************************/
+/* GetRawFieldRef() */
+/************************************************************************/
+
+/**
+ * \fn OGRField *OGRFeature::GetRawFieldRef( int iField );
+ *
+ * \brief Fetch a pointer to the internal field value given the index.
+ *
+ * This method is the same as the C function OGR_F_GetRawFieldRef().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the returned pointer is to an internal data structure, and should
+ * not be freed, or modified.
+ */
+
+/************************************************************************/
+/* OGR_F_GetRawFieldRef() */
+/************************************************************************/
+
+/**
+ * \brief Fetch an handle to the internal field value given the index.
+ *
+ * This function is the same as the C++ method OGRFeature::GetRawFieldRef().
+ *
+ * @param hFeat handle to the feature on which field is found.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the returned handle is to an internal data structure, and should
+ * not be freed, or modified.
+ */
+
+OGRField *OGR_F_GetRawFieldRef( OGRFeatureH hFeat, int iField )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetRawFieldRef", NULL );
+
+ return ((OGRFeature *)hFeat)->GetRawFieldRef( iField );
+}
+
+/************************************************************************/
+/* GetFieldAsInteger() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as integer.
+ *
+ * OFTString features will be translated using atoi(). OFTReal fields
+ * will be cast to integer. Other field types, or errors will result in
+ * a return value of zero.
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsInteger().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value.
+ */
+
+int OGRFeature::GetFieldAsInteger( int iField )
+
+{
+ int iSpecialField = iField - poDefn->GetFieldCount();
+ if (iSpecialField >= 0)
+ {
+ // special field value accessors
+ switch (iSpecialField)
+ {
+ case SPF_FID:
+ return GetFID();
+
+ case SPF_OGR_GEOM_AREA:
+ if( poGeometry == NULL )
+ return 0;
+ return (int)OGR_G_GetArea((OGRGeometryH)poGeometry);
+
+ default:
+ return 0;
+ }
+ }
+
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return 0;
+
+ if( !IsFieldSet(iField) )
+ return 0;
+
+ if( poFDefn->GetType() == OFTInteger )
+ return pauFields[iField].Integer;
+ else if( poFDefn->GetType() == OFTReal )
+ return (int) pauFields[iField].Real;
+ else if( poFDefn->GetType() == OFTString )
+ {
+ if( pauFields[iField].String == NULL )
+ return 0;
+ else
+ return atoi(pauFields[iField].String);
+ }
+ else
+ return 0;
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsInteger() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as integer.
+ *
+ * OFTString features will be translated using atoi(). OFTReal fields
+ * will be cast to integer. Other field types, or errors will result in
+ * a return value of zero.
+ *
+ * This function is the same as the C++ method OGRFeature::GetFieldAsInteger().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value.
+ */
+
+int OGR_F_GetFieldAsInteger( OGRFeatureH hFeat, int iField )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsInteger", 0 );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsInteger(iField);
+}
+
+/************************************************************************/
+/* GetFieldAsDouble() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a double.
+ *
+ * OFTString features will be translated using atof(). OFTInteger fields
+ * will be cast to double. Other field types, or errors will result in
+ * a return value of zero.
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsDouble().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value.
+ */
+
+double OGRFeature::GetFieldAsDouble( int iField )
+
+{
+ int iSpecialField = iField - poDefn->GetFieldCount();
+ if (iSpecialField >= 0)
+ {
+ // special field value accessors
+ switch (iSpecialField)
+ {
+ case SPF_FID:
+ return GetFID();
+
+ case SPF_OGR_GEOM_AREA:
+ if( poGeometry == NULL )
+ return 0.0;
+ return OGR_G_GetArea((OGRGeometryH)poGeometry);
+
+ default:
+ return 0.0;
+ }
+ }
+
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return 0.0;
+
+ if( !IsFieldSet(iField) )
+ return 0.0;
+
+ if( poFDefn->GetType() == OFTReal )
+ return pauFields[iField].Real;
+ else if( poFDefn->GetType() == OFTInteger )
+ return pauFields[iField].Integer;
+ else if( poFDefn->GetType() == OFTString )
+ {
+ if( pauFields[iField].String == NULL )
+ return 0;
+ else
+ return atof(pauFields[iField].String);
+ }
+ else
+ return 0.0;
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsDouble() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a double.
+ *
+ * OFTString features will be translated using atof(). OFTInteger fields
+ * will be cast to double. Other field types, or errors will result in
+ * a return value of zero.
+ *
+ * This function is the same as the C++ method OGRFeature::GetFieldAsDouble().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value.
+ */
+
+double OGR_F_GetFieldAsDouble( OGRFeatureH hFeat, int iField )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsDouble", 0 );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsDouble(iField);
+}
+
+/************************************************************************/
+/* GetFieldAsString() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a string.
+ *
+ * OFTReal and OFTInteger fields will be translated to string using
+ * sprintf(), but not necessarily using the established formatting rules.
+ * Other field types, or errors will result in a return value of zero.
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsString().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value. This string is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief.
+ */
+
+const char *OGRFeature::GetFieldAsString( int iField )
+
+{
+#define TEMP_BUFFER_SIZE 80
+ char szTempBuffer[TEMP_BUFFER_SIZE];
+
+ CPLFree(m_pszTmpFieldValue);
+ m_pszTmpFieldValue = NULL;
+
+ int iSpecialField = iField - poDefn->GetFieldCount();
+ if (iSpecialField >= 0)
+ {
+ // special field value accessors
+ switch (iSpecialField)
+ {
+ case SPF_FID:
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE, "%ld", GetFID() );
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+
+ case SPF_OGR_GEOMETRY:
+ if( poGeometry )
+ return poGeometry->getGeometryName();
+ else
+ return "";
+
+ case SPF_OGR_STYLE:
+ if( GetStyleString() == NULL )
+ return "";
+ else
+ return GetStyleString();
+
+ case SPF_OGR_GEOM_WKT:
+ {
+ if( poGeometry == NULL )
+ return "";
+
+ if (poGeometry->exportToWkt( &m_pszTmpFieldValue ) == OGRERR_NONE )
+ return m_pszTmpFieldValue;
+ else
+ return "";
+ }
+
+ case SPF_OGR_GEOM_AREA:
+ if( poGeometry == NULL )
+ return "";
+
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE, "%.16g",
+ OGR_G_GetArea((OGRGeometryH)poGeometry) );
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+
+ default:
+ return "";
+ }
+ }
+
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return "";
+
+ if( !IsFieldSet(iField) )
+ return "";
+
+ if( poFDefn->GetType() == OFTString )
+ {
+ if( pauFields[iField].String == NULL )
+ return "";
+ else
+ return pauFields[iField].String;
+ }
+ else if( poFDefn->GetType() == OFTInteger )
+ {
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE,
+ "%d", pauFields[iField].Integer );
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTReal )
+ {
+ char szFormat[64];
+
+ if( poFDefn->GetWidth() != 0 )
+ {
+ snprintf( szFormat, sizeof(szFormat), "%%%d.%df",
+ poFDefn->GetWidth(), poFDefn->GetPrecision() );
+ }
+ else
+ strcpy( szFormat, "%.15g" );
+
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE,
+ szFormat, pauFields[iField].Real );
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTDateTime )
+ {
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE,
+ "%04d/%02d/%02d %2d:%02d:%02d",
+ pauFields[iField].Date.Year,
+ pauFields[iField].Date.Month,
+ pauFields[iField].Date.Day,
+ pauFields[iField].Date.Hour,
+ pauFields[iField].Date.Minute,
+ pauFields[iField].Date.Second );
+
+ if( pauFields[iField].Date.TZFlag > 1 )
+ {
+ int nOffset = (pauFields[iField].Date.TZFlag - 100) * 15;
+ int nHours = (int) (nOffset / 60); // round towards zero
+ int nMinutes = ABS(nOffset - nHours * 60);
+
+ if( nOffset < 0 )
+ {
+ strcat( szTempBuffer, "-" );
+ nHours = ABS(nHours);
+ }
+ else
+ strcat( szTempBuffer, "+" );
+
+ if( nMinutes == 0 )
+ snprintf( szTempBuffer+strlen(szTempBuffer),
+ TEMP_BUFFER_SIZE-strlen(szTempBuffer), "%02d", nHours );
+ else
+ snprintf( szTempBuffer+strlen(szTempBuffer),
+ TEMP_BUFFER_SIZE-strlen(szTempBuffer), "%02d%02d", nHours, nMinutes );
+ }
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTDate )
+ {
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE, "%04d/%02d/%02d",
+ pauFields[iField].Date.Year,
+ pauFields[iField].Date.Month,
+ pauFields[iField].Date.Day );
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTTime )
+ {
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE, "%2d:%02d:%02d",
+ pauFields[iField].Date.Hour,
+ pauFields[iField].Date.Minute,
+ pauFields[iField].Date.Second );
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTIntegerList )
+ {
+ char szItem[32];
+ int i, nCount = pauFields[iField].IntegerList.nCount;
+
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE, "(%d:", nCount );
+ for( i = 0; i < nCount; i++ )
+ {
+ snprintf( szItem, sizeof(szItem), "%d",
+ pauFields[iField].IntegerList.paList[i] );
+ if( strlen(szTempBuffer) + strlen(szItem) + 6
+ >= sizeof(szTempBuffer) )
+ {
+ break;
+ }
+
+ if( i > 0 )
+ strcat( szTempBuffer, "," );
+
+ strcat( szTempBuffer, szItem );
+ }
+
+ if( i < nCount )
+ strcat( szTempBuffer, ",...)" );
+ else
+ strcat( szTempBuffer, ")" );
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTRealList )
+ {
+ char szItem[40];
+ char szFormat[64];
+ int i, nCount = pauFields[iField].RealList.nCount;
+
+ if( poFDefn->GetWidth() != 0 )
+ {
+ snprintf( szFormat, sizeof(szFormat), "%%%d.%df",
+ poFDefn->GetWidth(), poFDefn->GetPrecision() );
+ }
+ else
+ strcpy( szFormat, "%.16g" );
+
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE, "(%d:", nCount );
+ for( i = 0; i < nCount; i++ )
+ {
+ snprintf( szItem, sizeof(szItem), szFormat,
+ pauFields[iField].RealList.paList[i] );
+ if( strlen(szTempBuffer) + strlen(szItem) + 6
+ >= sizeof(szTempBuffer) )
+ {
+ break;
+ }
+
+ if( i > 0 )
+ strcat( szTempBuffer, "," );
+
+ strcat( szTempBuffer, szItem );
+ }
+
+ if( i < nCount )
+ strcat( szTempBuffer, ",...)" );
+ else
+ strcat( szTempBuffer, ")" );
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTStringList )
+ {
+ int i, nCount = pauFields[iField].StringList.nCount;
+
+ snprintf( szTempBuffer, TEMP_BUFFER_SIZE, "(%d:", nCount );
+ for( i = 0; i < nCount; i++ )
+ {
+ const char *pszItem = pauFields[iField].StringList.paList[i];
+
+ if( strlen(szTempBuffer) + strlen(pszItem) + 6
+ >= sizeof(szTempBuffer) )
+ {
+ break;
+ }
+
+ if( i > 0 )
+ strcat( szTempBuffer, "," );
+
+ strcat( szTempBuffer, pszItem );
+ }
+
+ if( i < nCount )
+ strcat( szTempBuffer, ",...)" );
+ else
+ strcat( szTempBuffer, ")" );
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else if( poFDefn->GetType() == OFTBinary )
+ {
+ int nCount = pauFields[iField].Binary.nCount;
+ char *pszHex;
+
+ if( nCount > (int) sizeof(szTempBuffer) / 2 - 4 )
+ nCount = sizeof(szTempBuffer) / 2 - 4;
+
+ pszHex = CPLBinaryToHex( nCount, pauFields[iField].Binary.paData );
+
+ memcpy( szTempBuffer, pszHex, 2 * nCount );
+ szTempBuffer[nCount*2] = '\0';
+ if( nCount < pauFields[iField].Binary.nCount )
+ strcat( szTempBuffer, "..." );
+
+ CPLFree( pszHex );
+
+ return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );
+ }
+ else
+ return "";
+#undef TEMP_BUFFER_SIZE
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsString() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a string.
+ *
+ * OFTReal and OFTInteger fields will be translated to string using
+ * sprintf(), but not necessarily using the established formatting rules.
+ * Other field types, or errors will result in a return value of zero.
+ *
+ * This function is the same as the C++ method OGRFeature::GetFieldAsString().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value. This string is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief.
+ */
+
+const char *OGR_F_GetFieldAsString( OGRFeatureH hFeat, int iField )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsString", NULL );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsString(iField);
+}
+
+/************************************************************************/
+/* GetFieldAsIntegerList() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a list of integers.
+ *
+ * Currently this method only works for OFTIntegerList fields.
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsIntegerList().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnCount an integer to put the list count (number of integers) into.
+ *
+ * @return the field value. This list is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief. If *pnCount is zero
+ * on return the returned pointer may be NULL or non-NULL.
+ */
+
+const int *OGRFeature::GetFieldAsIntegerList( int iField, int *pnCount )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn != NULL && IsFieldSet(iField) &&
+ poFDefn->GetType() == OFTIntegerList )
+ {
+ if( pnCount != NULL )
+ *pnCount = pauFields[iField].IntegerList.nCount;
+
+ return pauFields[iField].IntegerList.paList;
+ }
+ else
+ {
+ if( pnCount != NULL )
+ *pnCount = 0;
+
+ return NULL;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsIntegerList() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a list of integers.
+ *
+ * Currently this function only works for OFTIntegerList fields.
+ *
+ * This function is the same as the C++ method
+ * OGRFeature::GetFieldAsIntegerList().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnCount an integer to put the list count (number of integers) into.
+ *
+ * @return the field value. This list is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief. If *pnCount is zero
+ * on return the returned pointer may be NULL or non-NULL.
+ */
+
+const int *OGR_F_GetFieldAsIntegerList( OGRFeatureH hFeat, int iField,
+ int *pnCount )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsIntegerList", NULL );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsIntegerList(iField, pnCount);
+}
+
+/************************************************************************/
+/* GetFieldAsDoubleList() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a list of doubles.
+ *
+ * Currently this method only works for OFTRealList fields.
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsDoubleList().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnCount an integer to put the list count (number of doubles) into.
+ *
+ * @return the field value. This list is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief. If *pnCount is zero
+ * on return the returned pointer may be NULL or non-NULL.
+ */
+
+const double *OGRFeature::GetFieldAsDoubleList( int iField, int *pnCount )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn != NULL && IsFieldSet(iField) &&
+ poFDefn->GetType() == OFTRealList )
+ {
+ if( pnCount != NULL )
+ *pnCount = pauFields[iField].RealList.nCount;
+
+ return pauFields[iField].RealList.paList;
+ }
+ else
+ {
+ if( pnCount != NULL )
+ *pnCount = 0;
+
+ return NULL;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsDoubleList() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a list of doubles.
+ *
+ * Currently this function only works for OFTRealList fields.
+ *
+ * This function is the same as the C++ method
+ * OGRFeature::GetFieldAsDoubleList().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnCount an integer to put the list count (number of doubles) into.
+ *
+ * @return the field value. This list is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief. If *pnCount is zero
+ * on return the returned pointer may be NULL or non-NULL.
+ */
+
+const double *OGR_F_GetFieldAsDoubleList( OGRFeatureH hFeat, int iField,
+ int *pnCount )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsDoubleList", NULL );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsDoubleList(iField, pnCount);
+}
+
+/************************************************************************/
+/* GetFieldAsStringList() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a list of strings.
+ *
+ * Currently this method only works for OFTStringList fields.
+ *
+ * The returned list is terminated by a NULL pointer. The number of
+ * elements can also be calculated using CSLCount().
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsStringList().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value. This list is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief.
+ */
+
+char **OGRFeature::GetFieldAsStringList( int iField ) const
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return NULL;
+
+ if( !IsFieldSet(iField) )
+ return NULL;
+
+ if( poFDefn->GetType() == OFTStringList )
+ {
+ return pauFields[iField].StringList.paList;
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsStringList() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as a list of strings.
+ *
+ * Currently this method only works for OFTStringList fields.
+ *
+ * The returned list is terminated by a NULL pointer. The number of
+ * elements can also be calculated using CSLCount().
+ *
+ * This function is the same as the C++ method
+ * OGRFeature::GetFieldAsStringList().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ *
+ * @return the field value. This list is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief.
+ */
+
+char **OGR_F_GetFieldAsStringList( OGRFeatureH hFeat, int iField )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsStringList", NULL );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsStringList(iField);
+}
+
+/************************************************************************/
+/* GetFieldAsBinary() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as binary data.
+ *
+ * Currently this method only works for OFTBinary fields.
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsBinary().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnBytes location to put the number of bytes returned.
+ *
+ * @return the field value. This data is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief.
+ */
+
+GByte *OGRFeature::GetFieldAsBinary( int iField, int *pnBytes )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ *pnBytes = 0;
+
+ if( poFDefn == NULL )
+ return NULL;
+
+ if( !IsFieldSet(iField) )
+ return NULL;
+
+ if( poFDefn->GetType() == OFTBinary )
+ {
+ *pnBytes = pauFields[iField].Binary.nCount;
+ return pauFields[iField].Binary.paData;
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsBinary() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as binary.
+ *
+ * Currently this method only works for OFTBinary fields.
+ *
+ * This function is the same as the C++ method
+ * OGRFeature::GetFieldAsBinary().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnBytes location to place count of bytes returned.
+ *
+ * @return the field value. This list is internal, and should not be
+ * modified, or freed. Its lifetime may be very brief.
+ */
+
+GByte *OGR_F_GetFieldAsBinary( OGRFeatureH hFeat, int iField, int *pnBytes )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsBinary", NULL );
+ VALIDATE_POINTER1( pnBytes, "OGR_F_GetFieldAsBinary", NULL );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsBinary(iField,pnBytes);
+}
+
+/************************************************************************/
+/* GetFieldAsDateTime() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as date and time.
+ *
+ * Currently this method only works for OFTDate, OFTTime and OFTDateTime fields.
+ *
+ * This method is the same as the C function OGR_F_GetFieldAsDateTime().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnYear (including century)
+ * @param pnMonth (1-12)
+ * @param pnDay (1-31)
+ * @param pnHour (0-23)
+ * @param pnMinute (0-59)
+ * @param pnSecond (0-59)
+ * @param pnTZFlag (0=unknown, 1=localtime, 100=GMT, see data model for details)
+ *
+ * @return TRUE on success or FALSE on failure.
+ */
+
+int OGRFeature::GetFieldAsDateTime( int iField,
+ int *pnYear, int *pnMonth, int *pnDay,
+ int *pnHour, int *pnMinute, int *pnSecond,
+ int *pnTZFlag )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return FALSE;
+
+ if( !IsFieldSet(iField) )
+ return FALSE;
+
+ if( poFDefn->GetType() == OFTDate
+ || poFDefn->GetType() == OFTTime
+ || poFDefn->GetType() == OFTDateTime )
+
+ {
+ if( pnYear )
+ *pnYear = pauFields[iField].Date.Year;
+ if( pnMonth )
+ *pnMonth = pauFields[iField].Date.Month;
+ if( pnDay )
+ *pnDay = pauFields[iField].Date.Day;
+ if( pnHour )
+ *pnHour = pauFields[iField].Date.Hour;
+ if( pnMinute )
+ *pnMinute = pauFields[iField].Date.Minute;
+ if( pnSecond )
+ *pnSecond = pauFields[iField].Date.Second;
+ if( pnTZFlag )
+ *pnTZFlag = pauFields[iField].Date.TZFlag;
+
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_GetFieldAsDateTime() */
+/************************************************************************/
+
+/**
+ * \brief Fetch field value as date and time.
+ *
+ * Currently this method only works for OFTDate, OFTTime and OFTDateTime fields.
+ *
+ * This function is the same as the C++ method
+ * OGRFeature::GetFieldAsDateTime().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pnYear (including century)
+ * @param pnMonth (1-12)
+ * @param pnDay (1-31)
+ * @param pnHour (0-23)
+ * @param pnMinute (0-59)
+ * @param pnSecond (0-59)
+ * @param pnTZFlag (0=unknown, 1=localtime, 100=GMT, see data model for details)
+ *
+ * @return TRUE on success or FALSE on failure.
+ */
+
+int OGR_F_GetFieldAsDateTime( OGRFeatureH hFeat, int iField,
+ int *pnYear, int *pnMonth, int *pnDay,
+ int *pnHour, int *pnMinute, int *pnSecond,
+ int *pnTZFlag )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFieldAsDateTime", 0 );
+
+ return ((OGRFeature *)hFeat)->GetFieldAsDateTime( iField,
+ pnYear, pnMonth, pnDay,
+ pnHour, pnMinute,pnSecond,
+ pnTZFlag );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to integer value.
+ *
+ * OFTInteger and OFTReal fields will be set directly. OFTString fields
+ * will be assigned a string representation of the value, but not necessarily
+ * taking into account formatting constraints on this field. Other field
+ * types may be unaffected.
+ *
+ * This method is the same as the C function OGR_F_SetFieldInteger().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param nValue the value to assign.
+ */
+
+void OGRFeature::SetField( int iField, int nValue )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTInteger )
+ {
+ pauFields[iField].Integer = nValue;
+ pauFields[iField].Set.nMarker2 = 0;
+ }
+ else if( poFDefn->GetType() == OFTReal )
+ {
+ pauFields[iField].Real = nValue;
+ }
+ else if( poFDefn->GetType() == OFTIntegerList )
+ {
+ SetField( iField, 1, &nValue );
+ }
+ else if( poFDefn->GetType() == OFTRealList )
+ {
+ double dfValue = nValue;
+ SetField( iField, 1, &dfValue );
+ }
+ else if( poFDefn->GetType() == OFTString )
+ {
+ char szTempBuffer[64];
+
+ sprintf( szTempBuffer, "%d", nValue );
+
+ if( IsFieldSet( iField) )
+ CPLFree( pauFields[iField].String );
+
+ pauFields[iField].String = CPLStrdup( szTempBuffer );
+ }
+ else
+ /* do nothing for other field types */;
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldInteger() */
+/************************************************************************/
+
+/**
+ * \brief Set field to integer value.
+ *
+ * OFTInteger and OFTReal fields will be set directly. OFTString fields
+ * will be assigned a string representation of the value, but not necessarily
+ * taking into account formatting constraints on this field. Other field
+ * types may be unaffected.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param nValue the value to assign.
+ */
+
+void OGR_F_SetFieldInteger( OGRFeatureH hFeat, int iField, int nValue )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldInteger" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, nValue );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to double value.
+ *
+ * OFTInteger and OFTReal fields will be set directly. OFTString fields
+ * will be assigned a string representation of the value, but not necessarily
+ * taking into account formatting constraints on this field. Other field
+ * types may be unaffected.
+ *
+ * This method is the same as the C function OGR_F_SetFieldDouble().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param dfValue the value to assign.
+ */
+
+void OGRFeature::SetField( int iField, double dfValue )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTReal )
+ {
+ pauFields[iField].Real = dfValue;
+ }
+ else if( poFDefn->GetType() == OFTInteger )
+ {
+ pauFields[iField].Integer = (int) dfValue;
+ pauFields[iField].Set.nMarker2 = 0;
+ }
+ else if( poFDefn->GetType() == OFTRealList )
+ {
+ SetField( iField, 1, &dfValue );
+ }
+ else if( poFDefn->GetType() == OFTIntegerList )
+ {
+ int nValue = (int) dfValue;
+ SetField( iField, 1, &nValue );
+ }
+ else if( poFDefn->GetType() == OFTString )
+ {
+ char szTempBuffer[128];
+
+ sprintf( szTempBuffer, "%.16g", dfValue );
+
+ if( IsFieldSet( iField) )
+ CPLFree( pauFields[iField].String );
+
+ pauFields[iField].String = CPLStrdup( szTempBuffer );
+ }
+ else
+ /* do nothing for other field types */;
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldDouble() */
+/************************************************************************/
+
+/**
+ * \brief Set field to double value.
+ *
+ * OFTInteger and OFTReal fields will be set directly. OFTString fields
+ * will be assigned a string representation of the value, but not necessarily
+ * taking into account formatting constraints on this field. Other field
+ * types may be unaffected.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param dfValue the value to assign.
+ */
+
+void OGR_F_SetFieldDouble( OGRFeatureH hFeat, int iField, double dfValue )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldDouble" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, dfValue );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to string value.
+ *
+ * OFTInteger fields will be set based on an atoi() conversion of the string.
+ * OFTReal fields will be set based on an atof() conversion of the string.
+ * Other field types may be unaffected.
+ *
+ * This method is the same as the C function OGR_F_SetFieldString().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pszValue the value to assign.
+ */
+
+void OGRFeature::SetField( int iField, const char * pszValue )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTString )
+ {
+ // todo potential memory leak xun
+ //if( IsFieldSet(iField) )
+ // CPLFree( pauFields[iField].String );
+
+ pauFields[iField].String = CPLStrdup( pszValue );
+ }
+ else if( poFDefn->GetType() == OFTInteger )
+ {
+ pauFields[iField].Integer = atoi(pszValue);
+ pauFields[iField].Set.nMarker2 = OGRUnsetMarker;
+ }
+ else if( poFDefn->GetType() == OFTReal )
+ {
+ pauFields[iField].Real = atof(pszValue);
+ }
+ else if( poFDefn->GetType() == OFTDate
+ || poFDefn->GetType() == OFTTime
+ || poFDefn->GetType() == OFTDateTime )
+ {
+ OGRField sWrkField;
+
+ if( OGRParseDate( pszValue, &sWrkField, 0 ) )
+ memcpy( pauFields+iField, &sWrkField, sizeof(sWrkField));
+ }
+ else if( poFDefn->GetType() == OFTIntegerList
+ || poFDefn->GetType() == OFTRealList )
+ {
+ char **papszValueList = NULL;
+
+ if( pszValue[0] == '(' && strchr(pszValue,':') != NULL )
+ {
+ papszValueList = CSLTokenizeString2(
+ pszValue, ",:()", 0 );
+ }
+
+ if( CSLCount(papszValueList) == 0
+ || atoi(papszValueList[0]) != CSLCount(papszValueList)-1 )
+ {
+ /* do nothing - the count does not match entries */
+ }
+ else if( poFDefn->GetType() == OFTIntegerList )
+ {
+ int i, nCount = atoi(papszValueList[0]);
+ std::vector anValues;
+
+ for( i=0; i < nCount; i++ )
+ anValues.push_back( atoi(papszValueList[i+1]) );
+ SetField( iField, nCount, &(anValues[0]) );
+ }
+ else if( poFDefn->GetType() == OFTRealList )
+ {
+ int i, nCount = atoi(papszValueList[0]);
+ std::vector adfValues;
+
+ for( i=0; i < nCount; i++ )
+ adfValues.push_back( atof(papszValueList[i+1]) );
+ SetField( iField, nCount, &(adfValues[0]) );
+ }
+
+ CSLDestroy(papszValueList);
+ }
+ else
+ /* do nothing for other field types */;
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldString() */
+/************************************************************************/
+
+/**
+ * \brief Set field to string value.
+ *
+ * OFTInteger fields will be set based on an atoi() conversion of the string.
+ * OFTReal fields will be set based on an atof() conversion of the string.
+ * Other field types may be unaffected.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param pszValue the value to assign.
+ */
+
+void OGR_F_SetFieldString( OGRFeatureH hFeat, int iField, const char *pszValue)
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldString" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, pszValue );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to list of integers value.
+ *
+ * This method currently on has an effect of OFTIntegerList fields.
+ *
+ * This method is the same as the C function OGR_F_SetFieldIntegerList().
+ *
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nCount the number of values in the list being assigned.
+ * @param panValues the values to assign.
+ */
+
+void OGRFeature::SetField( int iField, int nCount, int *panValues )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTIntegerList )
+ {
+ OGRField uField;
+
+ uField.IntegerList.nCount = nCount;
+ uField.Set.nMarker2 = 0;
+ uField.IntegerList.paList = panValues;
+
+ SetField( iField, &uField );
+ }
+ else if( poFDefn->GetType() == OFTRealList )
+ {
+ std::vector adfValues;
+
+ for( int i=0; i < nCount; i++ )
+ adfValues.push_back( (double) panValues[i] );
+
+ SetField( iField, nCount, &adfValues[0] );
+ }
+ else if( (poFDefn->GetType() == OFTInteger || poFDefn->GetType() == OFTReal)
+ && nCount == 1 )
+ {
+ SetField( iField, panValues[0] );
+ }
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldIntegerList() */
+/************************************************************************/
+
+/**
+ * \brief Set field to list of integers value.
+ *
+ * This function currently on has an effect of OFTIntegerList fields.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nCount the number of values in the list being assigned.
+ * @param panValues the values to assign.
+ */
+
+void OGR_F_SetFieldIntegerList( OGRFeatureH hFeat, int iField,
+ int nCount, int *panValues )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldIntegerList" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, nCount, panValues );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to list of doubles value.
+ *
+ * This method currently on has an effect of OFTRealList fields.
+ *
+ * This method is the same as the C function OGR_F_SetFieldDoubleList().
+ *
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nCount the number of values in the list being assigned.
+ * @param padfValues the values to assign.
+ */
+
+void OGRFeature::SetField( int iField, int nCount, double * padfValues )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTRealList )
+ {
+ OGRField uField;
+
+ uField.RealList.nCount = nCount;
+ uField.Set.nMarker2 = 0;
+ uField.RealList.paList = padfValues;
+
+ SetField( iField, &uField );
+ }
+ else if( poFDefn->GetType() == OFTIntegerList )
+ {
+ std::vector anValues;
+
+ for( int i=0; i < nCount; i++ )
+ anValues.push_back( (int) padfValues[i] );
+
+ SetField( iField, nCount, &anValues[0] );
+ }
+ else if( (poFDefn->GetType() == OFTInteger || poFDefn->GetType() == OFTReal)
+ && nCount == 1 )
+ {
+ SetField( iField, padfValues[0] );
+ }
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldDoubleList() */
+/************************************************************************/
+
+/**
+ * \brief Set field to list of doubles value.
+ *
+ * This function currently on has an effect of OFTRealList fields.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nCount the number of values in the list being assigned.
+ * @param padfValues the values to assign.
+ */
+
+void OGR_F_SetFieldDoubleList( OGRFeatureH hFeat, int iField,
+ int nCount, double *padfValues )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldDoubleList" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, nCount, padfValues );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to list of strings value.
+ *
+ * This method currently on has an effect of OFTStringList fields.
+ *
+ * This method is the same as the C function OGR_F_SetFieldStringList().
+ *
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param papszValues the values to assign.
+ */
+
+void OGRFeature::SetField( int iField, char ** papszValues )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTStringList )
+ {
+ OGRField uField;
+
+ uField.StringList.nCount = CSLCount(papszValues);
+ uField.Set.nMarker2 = 0;
+ uField.StringList.paList = papszValues;
+
+ SetField( iField, &uField );
+ }
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldStringList() */
+/************************************************************************/
+
+/**
+ * \brief Set field to list of strings value.
+ *
+ * This function currently on has an effect of OFTStringList fields.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param papszValues the values to assign.
+ */
+
+void OGR_F_SetFieldStringList( OGRFeatureH hFeat, int iField,
+ char ** papszValues )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldStringList" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, papszValues );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to binary data.
+ *
+ * This method currently on has an effect of OFTBinary fields.
+ *
+ * This method is the same as the C function OGR_F_SetFieldBinary().
+ *
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nBytes bytes of data being set.
+ * @param pabyData the raw data being applied.
+ */
+
+void OGRFeature::SetField( int iField, int nBytes, GByte *pabyData )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTBinary )
+ {
+ OGRField uField;
+
+ uField.Binary.nCount = nBytes;
+ uField.Set.nMarker2 = 0;
+ uField.Binary.paData = pabyData;
+
+ SetField( iField, &uField );
+ }
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldBinary() */
+/************************************************************************/
+
+/**
+ * \brief Set field to binary data.
+ *
+ * This function currently on has an effect of OFTBinary fields.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nBytes the number of bytes in pabyData array.
+ * @param pabyData the data to apply.
+ */
+
+void OGR_F_SetFieldBinary( OGRFeatureH hFeat, int iField,
+ int nBytes, GByte *pabyData )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldBinary" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, nBytes, pabyData );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field to date.
+ *
+ * This method currently only has an effect for OFTDate, OFTTime and OFTDateTime
+ * fields.
+ *
+ * This method is the same as the C function OGR_F_SetFieldDateTime().
+ *
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nYear (including century)
+ * @param nMonth (1-12)
+ * @param nDay (1-31)
+ * @param nHour (0-23)
+ * @param nMinute (0-59)
+ * @param nSecond (0-59)
+ * @param nTZFlag (0=unknown, 1=localtime, 100=GMT, see data model for details)
+ */
+
+void OGRFeature::SetField( int iField, int nYear, int nMonth, int nDay,
+ int nHour, int nMinute, int nSecond,
+ int nTZFlag )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTDate
+ || poFDefn->GetType() == OFTTime
+ || poFDefn->GetType() == OFTDateTime )
+ {
+ pauFields[iField].Date.Year = (GInt16)nYear;
+ pauFields[iField].Date.Month = (GByte)nMonth;
+ pauFields[iField].Date.Day = (GByte)nDay;
+ pauFields[iField].Date.Hour = (GByte)nHour;
+ pauFields[iField].Date.Minute = (GByte)nMinute;
+ pauFields[iField].Date.Second = (GByte)nSecond;
+ pauFields[iField].Date.TZFlag = (GByte)nTZFlag;
+ }
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldDateTime() */
+/************************************************************************/
+
+/**
+ * \brief Set field to datetime.
+ *
+ * This method currently only has an effect for OFTDate, OFTTime and OFTDateTime
+ * fields.
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to set, from 0 to GetFieldCount()-1.
+ * @param nYear (including century)
+ * @param nMonth (1-12)
+ * @param nDay (1-31)
+ * @param nHour (0-23)
+ * @param nMinute (0-59)
+ * @param nSecond (0-59)
+ * @param nTZFlag (0=unknown, 1=localtime, 100=GMT, see data model for details)
+ */
+
+void OGR_F_SetFieldDateTime( OGRFeatureH hFeat, int iField,
+ int nYear, int nMonth, int nDay,
+ int nHour, int nMinute, int nSecond,
+ int nTZFlag )
+
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldDateTime" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, nYear, nMonth, nDay,
+ nHour, nMinute, nSecond, nTZFlag );
+}
+
+/************************************************************************/
+/* SetField() */
+/************************************************************************/
+
+/**
+ * \brief Set field.
+ *
+ * The passed value OGRField must be of exactly the same type as the
+ * target field, or an application crash may occur. The passed value
+ * is copied, and will not be affected. It remains the responsibility of
+ * the caller.
+ *
+ * This method is the same as the C function OGR_F_SetFieldRaw().
+ *
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param puValue the value to assign.
+ */
+
+void OGRFeature::SetField( int iField, OGRField * puValue )
+
+{
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn( iField );
+
+ if( poFDefn == NULL )
+ return;
+
+ if( poFDefn->GetType() == OFTInteger )
+ {
+ pauFields[iField] = *puValue;
+ }
+ else if( poFDefn->GetType() == OFTReal )
+ {
+ pauFields[iField] = *puValue;
+ }
+ else if( poFDefn->GetType() == OFTString )
+ {
+ if( IsFieldSet( iField ) )
+ CPLFree( pauFields[iField].String );
+
+ if( puValue->String == NULL )
+ pauFields[iField].String = NULL;
+ else if( puValue->Set.nMarker1 == OGRUnsetMarker
+ && puValue->Set.nMarker2 == OGRUnsetMarker )
+ pauFields[iField] = *puValue;
+ else
+ pauFields[iField].String = CPLStrdup( puValue->String );
+ }
+ else if( poFDefn->GetType() == OFTDate
+ || poFDefn->GetType() == OFTTime
+ || poFDefn->GetType() == OFTDateTime )
+ {
+ memcpy( pauFields+iField, puValue, sizeof(OGRField) );
+ }
+ else if( poFDefn->GetType() == OFTIntegerList )
+ {
+ int nCount = puValue->IntegerList.nCount;
+
+ if( IsFieldSet( iField ) )
+ CPLFree( pauFields[iField].IntegerList.paList );
+
+ if( puValue->Set.nMarker1 == OGRUnsetMarker
+ && puValue->Set.nMarker2 == OGRUnsetMarker )
+ {
+ pauFields[iField] = *puValue;
+ }
+ else
+ {
+ pauFields[iField].IntegerList.paList =
+ (int *) CPLMalloc(sizeof(int) * nCount);
+ memcpy( pauFields[iField].IntegerList.paList,
+ puValue->IntegerList.paList,
+ sizeof(int) * nCount );
+ pauFields[iField].IntegerList.nCount = nCount;
+ }
+ }
+ else if( poFDefn->GetType() == OFTRealList )
+ {
+ int nCount = puValue->RealList.nCount;
+
+ if( IsFieldSet( iField ) )
+ CPLFree( pauFields[iField].RealList.paList );
+
+ if( puValue->Set.nMarker1 == OGRUnsetMarker
+ && puValue->Set.nMarker2 == OGRUnsetMarker )
+ {
+ pauFields[iField] = *puValue;
+ }
+ else
+ {
+ pauFields[iField].RealList.paList =
+ (double *) CPLMalloc(sizeof(double) * nCount);
+ memcpy( pauFields[iField].RealList.paList,
+ puValue->RealList.paList,
+ sizeof(double) * nCount );
+ pauFields[iField].RealList.nCount = nCount;
+ }
+ }
+ else if( poFDefn->GetType() == OFTStringList )
+ {
+ if( IsFieldSet( iField ) )
+ CSLDestroy( pauFields[iField].StringList.paList );
+
+ if( puValue->Set.nMarker1 == OGRUnsetMarker
+ && puValue->Set.nMarker2 == OGRUnsetMarker )
+ {
+ pauFields[iField] = *puValue;
+ }
+ else
+ {
+ pauFields[iField].StringList.paList =
+ CSLDuplicate( puValue->StringList.paList );
+
+ pauFields[iField].StringList.nCount = puValue->StringList.nCount;
+ CPLAssert( CSLCount(puValue->StringList.paList)
+ == puValue->StringList.nCount );
+ }
+ }
+ else if( poFDefn->GetType() == OFTBinary )
+ {
+ if( IsFieldSet( iField ) )
+ CPLFree( pauFields[iField].Binary.paData );
+
+ if( puValue->Set.nMarker1 == OGRUnsetMarker
+ && puValue->Set.nMarker2 == OGRUnsetMarker )
+ {
+ pauFields[iField] = *puValue;
+ }
+ else
+ {
+ pauFields[iField].Binary.nCount = puValue->Binary.nCount;
+ pauFields[iField].Binary.paData =
+ (GByte *) CPLMalloc(puValue->Binary.nCount);
+ memcpy( pauFields[iField].Binary.paData,
+ puValue->Binary.paData,
+ puValue->Binary.nCount );
+ }
+ }
+ else
+ /* do nothing for other field types */;
+}
+
+/************************************************************************/
+/* OGR_F_SetFieldRaw() */
+/************************************************************************/
+
+/**
+ * \brief Set field.
+ *
+ * The passed value OGRField must be of exactly the same type as the
+ * target field, or an application crash may occur. The passed value
+ * is copied, and will not be affected. It remains the responsibility of
+ * the caller.
+ *
+ * This function is the same as the C++ method OGRFeature::SetField().
+ *
+ * @param hFeat handle to the feature that owned the field.
+ * @param iField the field to fetch, from 0 to GetFieldCount()-1.
+ * @param psValue handle on the value to assign.
+ */
+
+void OGR_F_SetFieldRaw( OGRFeatureH hFeat, int iField, OGRField *psValue )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetFieldRaw" );
+
+ ((OGRFeature *)hFeat)->SetField( iField, psValue );
+}
+
+/************************************************************************/
+/* DumpReadable() */
+/************************************************************************/
+
+/**
+ * \brief Dump this feature in a human readable form.
+ *
+ * This dumps the attributes, and geometry; however, it doesn't definition
+ * information (other than field types and names), nor does it report the
+ * geometry spatial reference system.
+ *
+ * A few options can be defined to change the default dump :
+ *
+ * - DISPLAY_FIELDS=NO : to hide the dump of the attributes
+ * - DISPLAY_STYLE=NO : to hide the dump of the style string
+ * - DISPLAY_GEOMETRY=NO : to hide the dump of the geometry
+ * - DISPLAY_GEOMETRY=SUMMARY : to get only a summary of the geometry
+ *
+ *
+ * This method is the same as the C function OGR_F_DumpReadable().
+ *
+ * @param fpOut the stream to write to, such as stdout. If NULL stdout will
+ * be used.
+ * @param papszOptions NULL terminated list of options (may be NULL)
+ */
+
+void OGRFeature::DumpReadable( FILE * fpOut, char** papszOptions )
+
+{
+ if( fpOut == NULL )
+ fpOut = stdout;
+
+ fprintf( fpOut, "OGRFeature(%s):%ld\n", poDefn->GetName(), GetFID() );
+
+ const char* pszDisplayFields =
+ CSLFetchNameValue(papszOptions, "DISPLAY_FIELDS");
+ if (pszDisplayFields == NULL || CSLTestBoolean(pszDisplayFields))
+ {
+ for( int iField = 0; iField < GetFieldCount(); iField++ )
+ {
+ OGRFieldDefn *poFDefn = poDefn->GetFieldDefn(iField);
+
+ fprintf( fpOut, " %s (%s) = ",
+ poFDefn->GetNameRef(),
+ OGRFieldDefn::GetFieldTypeName(poFDefn->GetType()) );
+
+ if( IsFieldSet( iField ) )
+ fprintf( fpOut, "%s\n", GetFieldAsString( iField ) );
+ else
+ fprintf( fpOut, "(null)\n" );
+
+ }
+ }
+
+
+ if( GetStyleString() != NULL )
+ {
+ const char* pszDisplayStyle =
+ CSLFetchNameValue(papszOptions, "DISPLAY_STYLE");
+ if (pszDisplayStyle == NULL || CSLTestBoolean(pszDisplayStyle))
+ {
+ fprintf( fpOut, " Style = %s\n", GetStyleString() );
+ }
+ }
+
+ if( poGeometry != NULL )
+ {
+ const char* pszDisplayGeometry =
+ CSLFetchNameValue(papszOptions, "DISPLAY_GEOMETRY");
+ if ( ! (pszDisplayGeometry != NULL && EQUAL(pszDisplayGeometry, "NO") ) )
+ poGeometry->dumpReadable( fpOut, " ", papszOptions );
+ }
+
+ fprintf( fpOut, "\n" );
+}
+
+/************************************************************************/
+/* OGR_F_DumpReadable() */
+/************************************************************************/
+
+/**
+ * \brief Dump this feature in a human readable form.
+ *
+ * This dumps the attributes, and geometry; however, it doesn't definition
+ * information (other than field types and names), nor does it report the
+ * geometry spatial reference system.
+ *
+ * This function is the same as the C++ method OGRFeature::DumpReadable().
+ *
+ * @param hFeat handle to the feature to dump.
+ * @param fpOut the stream to write to, such as strout.
+ */
+
+void OGR_F_DumpReadable( OGRFeatureH hFeat, FILE *fpOut )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_DumpReadable" );
+
+ ((OGRFeature *) hFeat)->DumpReadable( fpOut );
+}
+
+/************************************************************************/
+/* GetFID() */
+/************************************************************************/
+
+/**
+ * \fn long OGRFeature::GetFID();
+ *
+ * \brief Get feature identifier.
+ *
+ * This method is the same as the C function OGR_F_GetFID().
+ *
+ * @return feature id or OGRNullFID if none has been assigned.
+ */
+
+/************************************************************************/
+/* OGR_F_GetFID() */
+/************************************************************************/
+
+/**
+ * \brief Get feature identifier.
+ *
+ * This function is the same as the C++ method OGRFeature::GetFID().
+ *
+ * @param hFeat handle to the feature from which to get the feature
+ * identifier.
+ * @return feature id or OGRNullFID if none has been assigned.
+ */
+
+long OGR_F_GetFID( OGRFeatureH hFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetFID", 0 );
+
+ return ((OGRFeature *) hFeat)->GetFID();
+}
+
+/************************************************************************/
+/* SetFID() */
+/************************************************************************/
+
+/**
+ * \brief Set the feature identifier.
+ *
+ * For specific types of features this operation may fail on illegal
+ * features ids. Generally it always succeeds. Feature ids should be
+ * greater than or equal to zero, with the exception of OGRNullFID (-1)
+ * indicating that the feature id is unknown.
+ *
+ * This method is the same as the C function OGR_F_SetFID().
+ *
+ * @param nFID the new feature identifier value to assign.
+ *
+ * @return On success OGRERR_NONE, or on failure some other value.
+ */
+
+OGRErr OGRFeature::SetFID( long nFID )
+
+{
+ this->nFID = nFID;
+
+ return OGRERR_NONE;
+}
+
+/************************************************************************/
+/* OGR_F_SetFID() */
+/************************************************************************/
+
+/**
+ * \brief Set the feature identifier.
+ *
+ * For specific types of features this operation may fail on illegal
+ * features ids. Generally it always succeeds. Feature ids should be
+ * greater than or equal to zero, with the exception of OGRNullFID (-1)
+ * indicating that the feature id is unknown.
+ *
+ * This function is the same as the C++ method OGRFeature::SetFID().
+ *
+ * @param hFeat handle to the feature to set the feature id to.
+ * @param nFID the new feature identifier value to assign.
+ *
+ * @return On success OGRERR_NONE, or on failure some other value.
+ */
+
+OGRErr OGR_F_SetFID( OGRFeatureH hFeat, long nFID )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_SetFID", CE_Failure );
+
+ return ((OGRFeature *) hFeat)->SetFID(nFID);
+}
+
+/************************************************************************/
+/* Equal() */
+/************************************************************************/
+
+/**
+ * \brief Test if two features are the same.
+ *
+ * Two features are considered equal if the share them (pointer equality)
+ * same OGRFeatureDefn, have the same field values, and the same geometry
+ * (as tested by OGRGeometry::Equal()) as well as the same feature id.
+ *
+ * This method is the same as the C function OGR_F_Equal().
+ *
+ * @param poFeature the other feature to test this one against.
+ *
+ * @return TRUE if they are equal, otherwise FALSE.
+ */
+
+OGRBoolean OGRFeature::Equal( OGRFeature * poFeature )
+
+{
+ if( poFeature == this )
+ return TRUE;
+
+ if( GetFID() != poFeature->GetFID() )
+ return FALSE;
+
+ if( GetDefnRef() != poFeature->GetDefnRef() )
+ return FALSE;
+
+ int i;
+ int nFields = GetDefnRef()->GetFieldCount();
+ for(i=0; iIsFieldSet(i) )
+ return FALSE;
+
+ if( !IsFieldSet(i) )
+ continue;
+
+ switch (GetDefnRef()->GetFieldDefn(i)->GetType() )
+ {
+ case OFTInteger:
+ if( GetFieldAsInteger(i) !=
+ poFeature->GetFieldAsInteger(i) )
+ return FALSE;
+ break;
+
+ case OFTReal:
+ if( GetFieldAsDouble(i) !=
+ poFeature->GetFieldAsDouble(i) )
+ return FALSE;
+ break;
+
+ case OFTString:
+ if ( strcmp(GetFieldAsString(i),
+ poFeature->GetFieldAsString(i)) != 0 )
+ return FALSE;
+ break;
+
+ case OFTIntegerList:
+ {
+ int nCount1, nCount2;
+ const int* pnList1 = GetFieldAsIntegerList(i, &nCount1);
+ const int* pnList2 =
+ poFeature->GetFieldAsIntegerList(i, &nCount2);
+ if( nCount1 != nCount2 )
+ return FALSE;
+ int j;
+ for(j=0;jGetFieldAsDoubleList(i, &nCount2);
+ if( nCount1 != nCount2 )
+ return FALSE;
+ int j;
+ for(j=0;jGetFieldAsStringList(i);
+ nCount1 = CSLCount(papszList1);
+ nCount2 = CSLCount(papszList2);
+ if( nCount1 != nCount2 )
+ return FALSE;
+ int j;
+ for(j=0;jGetFieldAsDateTime(i, &nYear2, &nMonth2, &nDay2,
+ &nHour2, &nMinute2, &nSecond2, &nTZFlag2);
+
+ if( !(nYear1 == nYear2 && nMonth1 == nMonth2 &&
+ nDay1 == nDay2 && nHour1 == nHour2 &&
+ nMinute1 == nMinute2 && nSecond1 == nSecond2 &&
+ nTZFlag1 == nTZFlag2) )
+ return FALSE;
+ break;
+ }
+
+ case OFTBinary:
+ {
+ int nCount1, nCount2;
+ GByte* pabyData1 = GetFieldAsBinary(i, &nCount1);
+ GByte* pabyData2 = poFeature->GetFieldAsBinary(i, &nCount2);
+ if( nCount1 != nCount2 )
+ return FALSE;
+ if( memcmp(pabyData1, pabyData2, nCount1) != 0 )
+ return FALSE;
+ break;
+ }
+
+ default:
+ if( strcmp(GetFieldAsString(i),
+ poFeature->GetFieldAsString(i)) != 0 )
+ return FALSE;
+ break;
+ }
+ }
+
+ if( GetGeometryRef() == NULL && poFeature->GetGeometryRef() != NULL )
+ return FALSE;
+
+ if( GetGeometryRef() != NULL && poFeature->GetGeometryRef() == NULL )
+ return FALSE;
+
+ if( GetGeometryRef() != NULL && poFeature->GetGeometryRef() != NULL
+ && (!GetGeometryRef()->Equals( poFeature->GetGeometryRef() ) ) )
+ return FALSE;
+
+ return TRUE;
+}
+
+/************************************************************************/
+/* OGR_F_Equal() */
+/************************************************************************/
+
+/**
+ * \brief Test if two features are the same.
+ *
+ * Two features are considered equal if the share them (handle equality)
+ * same OGRFeatureDefn, have the same field values, and the same geometry
+ * (as tested by OGR_G_Equal()) as well as the same feature id.
+ *
+ * This function is the same as the C++ method OGRFeature::Equal().
+ *
+ * @param hFeat handle to one of the feature.
+ * @param hOtherFeat handle to the other feature to test this one against.
+ *
+ * @return TRUE if they are equal, otherwise FALSE.
+ */
+
+int OGR_F_Equal( OGRFeatureH hFeat, OGRFeatureH hOtherFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_Equal", 0 );
+ VALIDATE_POINTER1( hOtherFeat, "OGR_F_Equal", 0 );
+
+ return ((OGRFeature *) hFeat)->Equal( (OGRFeature *) hOtherFeat );
+}
+
+
+/************************************************************************/
+/* SetFrom() */
+/************************************************************************/
+
+/**
+ * \brief Set one feature from another.
+ *
+ * Overwrite the contents of this feature from the geometry and attributes
+ * of another. The poSrcFeature does not need to have the same
+ * OGRFeatureDefn. Field values are copied by corresponding field names.
+ * Field types do not have to exactly match. SetField() method conversion
+ * rules will be applied as needed.
+ *
+ * This method is the same as the C function OGR_F_SetFrom().
+ *
+ * @param poSrcFeature the feature from which geometry, and field values will
+ * be copied.
+ *
+ * @param bForgiving TRUE if the operation should continue despite lacking
+ * output fields matching some of the source fields.
+ *
+ * @return OGRERR_NONE if the operation succeeds, even if some values are
+ * not transferred, otherwise an error code.
+ */
+
+OGRErr OGRFeature::SetFrom( OGRFeature * poSrcFeature, int bForgiving )
+
+{
+/* -------------------------------------------------------------------- */
+/* Retrieve the field ids by name. */
+/* -------------------------------------------------------------------- */
+ int iField, *panMap;
+ OGRErr eErr;
+
+ panMap = (int *) VSIMalloc( sizeof(int) * poSrcFeature->GetFieldCount() );
+ for( iField = 0; iField < poSrcFeature->GetFieldCount(); iField++ )
+ {
+ panMap[iField] = GetFieldIndex(
+ poSrcFeature->GetFieldDefnRef(iField)->GetNameRef() );
+
+ if( panMap[iField] == -1 )
+ {
+ if( bForgiving )
+ continue;
+ else
+ {
+ VSIFree(panMap);
+ return OGRERR_FAILURE;
+ }
+ }
+ }
+
+ eErr = SetFrom( poSrcFeature, panMap, bForgiving );
+
+ VSIFree(panMap);
+
+ return eErr;
+}
+
+/************************************************************************/
+/* OGR_F_SetFrom() */
+/************************************************************************/
+
+/**
+ * \brief Set one feature from another.
+ *
+ * Overwrite the contents of this feature from the geometry and attributes
+ * of another. The hOtherFeature does not need to have the same
+ * OGRFeatureDefn. Field values are copied by corresponding field names.
+ * Field types do not have to exactly match. OGR_F_SetField*() function
+ * conversion rules will be applied as needed.
+ *
+ * This function is the same as the C++ method OGRFeature::SetFrom().
+ *
+ * @param hFeat handle to the feature to set to.
+ * @param hOtherFeat handle to the feature from which geometry,
+ * and field values will be copied.
+ *
+ * @param bForgiving TRUE if the operation should continue despite lacking
+ * output fields matching some of the source fields.
+ *
+ * @return OGRERR_NONE if the operation succeeds, even if some values are
+ * not transferred, otherwise an error code.
+ */
+
+OGRErr OGR_F_SetFrom( OGRFeatureH hFeat, OGRFeatureH hOtherFeat,
+ int bForgiving )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_SetFrom", CE_Failure );
+ VALIDATE_POINTER1( hOtherFeat, "OGR_F_SetFrom", CE_Failure );
+
+ return ((OGRFeature *) hFeat)->SetFrom( (OGRFeature *) hOtherFeat,
+ bForgiving );
+}
+
+/************************************************************************/
+/* SetFrom() */
+/************************************************************************/
+
+/**
+ * \brief Set one feature from another.
+ *
+ * Overwrite the contents of this feature from the geometry and attributes
+ * of another. The poSrcFeature does not need to have the same
+ * OGRFeatureDefn. Field values are copied according to the provided indices
+ * map. Field types do not have to exactly match. SetField() method
+ * conversion rules will be applied as needed. This is more efficient than
+ * OGR_F_SetFrom() in that this doesn't lookup the fields by their names.
+ * Particularly useful when the field names don't match.
+ *
+ * This method is the same as the C function OGR_F_SetFromWithMap().
+ *
+ * @param poSrcFeature the feature from which geometry, and field values will
+ * be copied.
+ *
+ * @param panMap Array of the indices of the feature's fields
+ * stored at the corresponding index of the source feature's fields. A value of
+ * -1 should be used to ignore the source's field. The array should not be NULL
+ * and be as long as the number of fields in the source feature.
+ *
+ * @param bForgiving TRUE if the operation should continue despite lacking
+ * output fields matching some of the source fields.
+ *
+ * @return OGRERR_NONE if the operation succeeds, even if some values are
+ * not transferred, otherwise an error code.
+ */
+
+OGRErr OGRFeature::SetFrom( OGRFeature * poSrcFeature, int *panMap ,
+ int bForgiving )
+
+{
+ OGRErr eErr;
+
+ SetFID( OGRNullFID );
+
+/* -------------------------------------------------------------------- */
+/* Set the geometry. */
+/* -------------------------------------------------------------------- */
+ eErr = SetGeometry( poSrcFeature->GetGeometryRef() );
+ if( eErr != OGRERR_NONE )
+ return eErr;
+
+/* -------------------------------------------------------------------- */
+/* Copy feature style string. */
+/* -------------------------------------------------------------------- */
+ SetStyleString( poSrcFeature->GetStyleString() );
+
+/* -------------------------------------------------------------------- */
+/* Set the fields by name. */
+/* -------------------------------------------------------------------- */
+ int iField, iDstField;
+
+ for( iField = 0; iField < poSrcFeature->GetFieldCount(); iField++ )
+ {
+ iDstField = panMap[iField];
+
+ if( iDstField < 0 )
+ continue;
+
+ if( GetFieldCount() <= iDstField )
+ return OGRERR_FAILURE;
+
+ if( !poSrcFeature->IsFieldSet(iField) )
+ {
+ UnsetField( iDstField );
+ continue;
+ }
+
+ switch( poSrcFeature->GetFieldDefnRef(iField)->GetType() )
+ {
+ case OFTInteger:
+ SetField( iDstField, poSrcFeature->GetFieldAsInteger( iField ) );
+ break;
+
+ case OFTReal:
+ SetField( iDstField, poSrcFeature->GetFieldAsDouble( iField ) );
+ break;
+
+ case OFTString:
+ SetField( iDstField, poSrcFeature->GetFieldAsString( iField ) );
+ break;
+
+ case OFTIntegerList:
+ {
+ if (GetFieldDefnRef(iDstField)->GetType() == OFTString)
+ {
+ SetField( iDstField, poSrcFeature->GetFieldAsString(iField) );
+ }
+ else
+ {
+ int nCount;
+ const int *panValues = poSrcFeature->GetFieldAsIntegerList( iField, &nCount);
+ SetField( iDstField, nCount, (int*) panValues );
+ }
+ }
+ break;
+
+ case OFTRealList:
+ {
+ if (GetFieldDefnRef(iDstField)->GetType() == OFTString)
+ {
+ SetField( iDstField, poSrcFeature->GetFieldAsString(iField) );
+ }
+ else
+ {
+ int nCount;
+ const double *padfValues = poSrcFeature->GetFieldAsDoubleList( iField, &nCount);
+ SetField( iDstField, nCount, (double*) padfValues );
+ }
+ }
+ break;
+
+ case OFTDate:
+ case OFTDateTime:
+ case OFTTime:
+ if (GetFieldDefnRef(iDstField)->GetType() == OFTDate ||
+ GetFieldDefnRef(iDstField)->GetType() == OFTTime ||
+ GetFieldDefnRef(iDstField)->GetType() == OFTDateTime)
+ {
+ SetField( iDstField, poSrcFeature->GetRawFieldRef( iField ) );
+ }
+ else if (GetFieldDefnRef(iDstField)->GetType() == OFTString)
+ {
+ SetField( iDstField, poSrcFeature->GetFieldAsString( iField ) );
+ }
+ else if( !bForgiving )
+ return OGRERR_FAILURE;
+ break;
+
+ default:
+ if( poSrcFeature->GetFieldDefnRef(iField)->GetType()
+ == GetFieldDefnRef(iDstField)->GetType() )
+ {
+ SetField( iDstField, poSrcFeature->GetRawFieldRef(iField) );
+ }
+ else if (GetFieldDefnRef(iDstField)->GetType() == OFTString)
+ {
+ SetField( iDstField, poSrcFeature->GetFieldAsString( iField ) );
+ }
+ else if( !bForgiving )
+ return OGRERR_FAILURE;
+ break;
+ }
+ }
+
+ return OGRERR_NONE;
+}
+
+/************************************************************************/
+/* OGR_F_SetFromWithMap() */
+/************************************************************************/
+
+/**
+ * \brief Set one feature from another.
+ *
+ * Overwrite the contents of this feature from the geometry and attributes
+ * of another. The hOtherFeature does not need to have the same
+ * OGRFeatureDefn. Field values are copied according to the provided indices
+ * map. Field types do not have to exactly match. OGR_F_SetField*() function
+ * conversion rules will be applied as needed. This is more efficient than
+ * OGR_F_SetFrom() in that this doesn't lookup the fields by their names.
+ * Particularly useful when the field names don't match.
+ *
+ * This function is the same as the C++ method OGRFeature::SetFrom().
+ *
+ * @param hFeat handle to the feature to set to.
+ * @param hOtherFeat handle to the feature from which geometry,
+ * and field values will be copied.
+ *
+ * @param panMap Array of the indices of the destination feature's fields
+ * stored at the corresponding index of the source feature's fields. A value of
+ * -1 should be used to ignore the source's field. The array should not be NULL
+ * and be as long as the number of fields in the source feature.
+ *
+ * @param bForgiving TRUE if the operation should continue despite lacking
+ * output fields matching some of the source fields.
+ *
+ * @return OGRERR_NONE if the operation succeeds, even if some values are
+ * not transferred, otherwise an error code.
+ */
+
+OGRErr OGR_F_SetFromWithMap( OGRFeatureH hFeat, OGRFeatureH hOtherFeat,
+ int bForgiving, int *panMap )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_SetFrom", CE_Failure );
+ VALIDATE_POINTER1( hOtherFeat, "OGR_F_SetFrom", CE_Failure );
+ VALIDATE_POINTER1( panMap, "OGR_F_SetFrom", CE_Failure);
+
+ return ((OGRFeature *) hFeat)->SetFrom( (OGRFeature *) hOtherFeat,
+ panMap, bForgiving );
+}
+
+/************************************************************************/
+/* GetStyleString() */
+/************************************************************************/
+
+/**
+ * \brief Fetch style string for this feature.
+ *
+ * Set the OGR Feature Style Specification for details on the format of
+ * this string, and ogr_featurestyle.h for services available to parse it.
+ *
+ * This method is the same as the C function OGR_F_GetStyleString().
+ *
+ * @return a reference to a representation in string format, or NULL if
+ * there isn't one.
+ */
+
+const char *OGRFeature::GetStyleString()
+{
+ int iStyleFieldIndex;
+
+ if (m_pszStyleString)
+ return m_pszStyleString;
+
+ iStyleFieldIndex = GetFieldIndex("OGR_STYLE");
+ if (iStyleFieldIndex >= 0)
+ return GetFieldAsString(iStyleFieldIndex);
+
+ return NULL;
+}
+
+/************************************************************************/
+/* OGR_F_GetStyleString() */
+/************************************************************************/
+
+/**
+ * \brief Fetch style string for this feature.
+ *
+ * Set the OGR Feature Style Specification for details on the format of
+ * this string, and ogr_featurestyle.h for services available to parse it.
+ *
+ * This function is the same as the C++ method OGRFeature::GetStyleString().
+ *
+ * @param hFeat handle to the feature to get the style from.
+ * @return a reference to a representation in string format, or NULL if
+ * there isn't one.
+ */
+
+const char *OGR_F_GetStyleString( OGRFeatureH hFeat )
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetStyleString", NULL );
+
+ return ((OGRFeature *)hFeat)->GetStyleString();
+}
+
+/************************************************************************/
+/* SetStyleString() */
+/************************************************************************/
+
+/**
+ * \brief Set feature style string.
+ * This method operate exactly as
+ * OGRFeature::SetStyleStringDirectly() except that it does not assume
+ * ownership of the passed string, but instead makes a copy of it.
+ *
+ * This method is the same as the C function OGR_F_SetStyleString().
+ *
+ * @param pszString the style string to apply to this feature, cannot be NULL.
+ */
+
+void OGRFeature::SetStyleString(const char *pszString)
+{
+ if (m_pszStyleString)
+ {
+ CPLFree(m_pszStyleString);
+ m_pszStyleString = NULL;
+ }
+
+ if( pszString )
+ m_pszStyleString = CPLStrdup(pszString);
+}
+
+/************************************************************************/
+/* OGR_F_SetStyleString() */
+/************************************************************************/
+
+/**
+ * \brief Set feature style string.
+ * This method operate exactly as
+ * OGR_F_SetStyleStringDirectly() except that it does not assume ownership
+ * of the passed string, but instead makes a copy of it.
+ *
+ * This function is the same as the C++ method OGRFeature::SetStyleString().
+ *
+ * @param hFeat handle to the feature to set style to.
+ * @param pszStyle the style string to apply to this feature, cannot be NULL.
+ */
+
+void OGR_F_SetStyleString( OGRFeatureH hFeat, const char *pszStyle )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetStyleString" );
+
+ ((OGRFeature *)hFeat)->SetStyleString( pszStyle );
+}
+
+/************************************************************************/
+/* SetStyleStringDirectly() */
+/************************************************************************/
+
+/**
+ * \brief Set feature style string.
+ * This method operate exactly as
+ * OGRFeature::SetStyleString() except that it assumes ownership of the passed
+ * string.
+ *
+ * This method is the same as the C function OGR_F_SetStyleStringDirectly().
+ *
+ * @param pszString the style string to apply to this feature, cannot be NULL.
+ */
+
+void OGRFeature::SetStyleStringDirectly(char *pszString)
+{
+ if (m_pszStyleString)
+ CPLFree(m_pszStyleString);
+ m_pszStyleString = pszString;
+}
+
+/************************************************************************/
+/* OGR_F_SetStyleStringDirectly() */
+/************************************************************************/
+
+/**
+ * \brief Set feature style string.
+ * This method operate exactly as
+ * OGR_F_SetStyleString() except that it assumes ownership of the passed
+ * string.
+ *
+ * This function is the same as the C++ method
+ * OGRFeature::SetStyleStringDirectly().
+ *
+ * @param hFeat handle to the feature to set style to.
+ * @param pszStyle the style string to apply to this feature, cannot be NULL.
+ */
+
+void OGR_F_SetStyleStringDirectly( OGRFeatureH hFeat, char *pszStyle )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetStyleStringDirectly" );
+
+ ((OGRFeature *)hFeat)->SetStyleStringDirectly( pszStyle );
+}
+
+//************************************************************************/
+/* SetStyleTable() */
+/************************************************************************/
+void OGRFeature::SetStyleTable(OGRStyleTable *poStyleTable)
+{
+ if ( m_poStyleTable )
+ delete m_poStyleTable;
+ m_poStyleTable = ( poStyleTable ) ? poStyleTable->Clone() : NULL;
+}
+
+/************************************************************************/
+/* RemapFields() */
+/* */
+/* This is used to transform a feature "in place" from one */
+/* feature defn to another with minimum work. */
+/************************************************************************/
+
+OGRErr OGRFeature::RemapFields( OGRFeatureDefn *poNewDefn,
+ int *panRemapSource )
+
+{
+ int iDstField;
+ OGRField *pauNewFields;
+
+ if( poNewDefn == NULL )
+ poNewDefn = poDefn;
+
+ pauNewFields = (OGRField *) CPLCalloc( poNewDefn->GetFieldCount(),
+ sizeof(OGRField) );
+
+ for( iDstField = 0; iDstField < poDefn->GetFieldCount(); iDstField++ )
+ {
+ if( panRemapSource[iDstField] == -1 )
+ {
+ pauNewFields[iDstField].Set.nMarker1 = OGRUnsetMarker;
+ pauNewFields[iDstField].Set.nMarker2 = OGRUnsetMarker;
+ }
+ else
+ {
+ memcpy( pauNewFields + iDstField,
+ pauFields + panRemapSource[iDstField],
+ sizeof(OGRField) );
+ }
+ }
+
+ /*
+ ** We really should be freeing memory for old columns that
+ ** are no longer present. We don't for now because it is a bit messy
+ ** and would take too long to test.
+ */
+
+/* -------------------------------------------------------------------- */
+/* Apply new definition and fields. */
+/* -------------------------------------------------------------------- */
+ CPLFree( pauFields );
+ pauFields = pauNewFields;
+
+ poDefn = poNewDefn;
+
+ return OGRERR_NONE;
+}
+
+/************************************************************************/
+/* OGR_F_GetStyleTable() */
+/************************************************************************/
+
+OGRStyleTableH OGR_F_GetStyleTable( OGRFeatureH hFeat )
+
+{
+ VALIDATE_POINTER1( hFeat, "OGR_F_GetStyleTable", NULL );
+
+ return (OGRStyleTableH) ((OGRFeature *) hFeat)->GetStyleTable( );
+}
+
+/************************************************************************/
+/* OGR_F_SetStyleTableDirectly() */
+/************************************************************************/
+
+void OGR_F_SetStyleTableDirectly( OGRFeatureH hFeat,
+ OGRStyleTableH hStyleTable )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetStyleTableDirectly" );
+
+ ((OGRFeature *) hFeat)->SetStyleTableDirectly( (OGRStyleTable *) hStyleTable);
+}
+
+/************************************************************************/
+/* OGR_F_SetStyleTable() */
+/************************************************************************/
+
+void OGR_F_SetStyleTable( OGRFeatureH hFeat,
+ OGRStyleTableH hStyleTable )
+
+{
+ VALIDATE_POINTER0( hFeat, "OGR_F_SetStyleTable" );
+ VALIDATE_POINTER0( hStyleTable, "OGR_F_SetStyleTable" );
+
+ ((OGRFeature *) hFeat)->SetStyleTable( (OGRStyleTable *) hStyleTable);
+}
diff --git a/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/filegdb/GNUmakefile b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/filegdb/GNUmakefile
new file mode 100644
index 000000000..31dbca889
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/filegdb/GNUmakefile
@@ -0,0 +1,20 @@
+
+
+include ../../../GDALmake.opt
+
+FGDB_INC=-I/home/test/Downloads/FileGDB_API/include
+EXTRA_LIBS+= -L/home/test/Downloads/FileGDB_API/lib -lFileGDBAPI
+OBJ = FGdbDatasource.o FGdbDriver.o FGdbLayer.o FGdbUtils.o
+
+CPPFLAGS := $(GDAL_INCLUDE) $(FGDB_INC) $(CPPFLAGS)
+
+default: $(O_OBJ:.o=.$(OBJ_EXT))
+
+clean:
+ rm -f *.o $(O_OBJ)
+
+$(O_OBJ): ogr_fgdb.h
+
+plugin: $(OBJ)
+ g++ -shared $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(EXTRA_LIBS) \
+ -o ogr_FileGDB.so
diff --git a/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
new file mode 100644
index 000000000..75bd1ed16
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
@@ -0,0 +1,1084 @@
+/******************************************************************************
+ * $Id: ogrmysqldatasource.cpp 22607 2011-06-28 20:43:27Z rouault $
+ *
+ * Project: OpenGIS Simple Features Reference Implementation
+ * Purpose: Implements OGRMySQLDataSource class.
+ * Author: Frank Warmerdam, warmerdam@pobox.com
+ * Author: Howard Butler, hobu@hobu.net
+ *
+ ******************************************************************************
+ * Copyright (c) 2004, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+
+#include
+#include "ogr_mysql.h"
+#include
+#include
+#include "cpl_conv.h"
+#include "cpl_string.h"
+
+CPL_CVSID("$Id: ogrmysqldatasource.cpp 22607 2011-06-28 20:43:27Z rouault $");
+/************************************************************************/
+/* OGRMySQLDataSource() */
+/************************************************************************/
+
+OGRMySQLDataSource::OGRMySQLDataSource()
+
+{
+ pszName = NULL;
+ papoLayers = NULL;
+ nLayers = 0;
+ hConn = 0;
+ nSoftTransactionLevel = 0;
+
+ nKnownSRID = 0;
+ panSRID = NULL;
+ papoSRS = NULL;
+
+ poLongResultLayer = NULL;
+}
+
+/************************************************************************/
+/* ~OGRMySQLDataSource() */
+/************************************************************************/
+
+OGRMySQLDataSource::~OGRMySQLDataSource()
+
+{
+ int i;
+
+ InterruptLongResult();
+
+ CPLFree( pszName );
+
+ for( i = 0; i < nLayers; i++ )
+ delete papoLayers[i];
+
+ CPLFree( papoLayers );
+
+ if( hConn != NULL )
+ mysql_close( hConn );
+
+ for( i = 0; i < nKnownSRID; i++ )
+ {
+ if( papoSRS[i] != NULL )
+ papoSRS[i]->Release();
+ }
+ CPLFree( panSRID );
+ CPLFree( papoSRS );
+}
+
+/************************************************************************/
+/* ReportError() */
+/************************************************************************/
+
+void OGRMySQLDataSource::ReportError( const char *pszDescription )
+
+{
+ if( pszDescription )
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "MySQL error message:%s Description: %s",
+ mysql_error( hConn ),
+ pszDescription );
+ else
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "%s", mysql_error( hConn ) );
+}
+
+/************************************************************************/
+/* Open() */
+/************************************************************************/
+
+int OGRMySQLDataSource::Open( const char * pszNewName, int bUpdate,
+ int bTestOpen )
+
+{
+ CPLAssert( nLayers == 0 );
+
+/* -------------------------------------------------------------------- */
+/* Verify MySQL prefix. */
+/* -------------------------------------------------------------------- */
+ if( !EQUALN(pszNewName,"MYSQL:",6) )
+ {
+ if( !bTestOpen )
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "%s does not conform to MySQL naming convention,"
+ " MYSQL:dbname[, user=..][,password=..][,host=..][,port=..][tables=table;table;...]",
+ pszNewName );
+ return FALSE;
+ }
+
+/* -------------------------------------------------------------------- */
+/* Use options process to get .my.cnf file contents. */
+/* -------------------------------------------------------------------- */
+ int nPort = 0, i;
+ char **papszTableNames=NULL;
+ std::string oHost, oPassword, oUser, oDB;
+ char *apszArgv[2] = { (char*) "org", NULL };
+ char **papszArgv = apszArgv;
+ int nArgc = 1;
+ const char *client_groups[] = {"client", "ogr", NULL };
+
+ my_init(); // I hope there is no problem with calling this multiple times!
+ load_defaults( "my", client_groups, &nArgc, &papszArgv );
+
+ for( i = 0; i < nArgc; i++ )
+ {
+ if( EQUALN(papszArgv[i],"--user=",7) )
+ oUser = papszArgv[i] + 7;
+ else if( EQUALN(papszArgv[i],"--host=",7) )
+ oHost = papszArgv[i] + 7;
+ else if( EQUALN(papszArgv[i],"--password=",11) )
+ oPassword = papszArgv[i] + 11;
+ else if( EQUALN(papszArgv[i],"--port=",7) )
+ nPort = atoi(papszArgv[i] + 7);
+ }
+
+ // cleanup
+ free_defaults( papszArgv );
+
+/* -------------------------------------------------------------------- */
+/* Parse out connection information. */
+/* -------------------------------------------------------------------- */
+ char **papszItems = CSLTokenizeString2( pszNewName+6, ",",
+ CSLT_HONOURSTRINGS );
+
+ if( CSLCount(papszItems) < 1 )
+ {
+ CSLDestroy( papszItems );
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "MYSQL: request missing databasename." );
+ return FALSE;
+ }
+
+ oDB = papszItems[0];
+
+ for( i = 1; papszItems[i] != NULL; i++ )
+ {
+ if( EQUALN(papszItems[i],"user=",5) )
+ oUser = papszItems[i] + 5;
+ else if( EQUALN(papszItems[i],"password=",9) )
+ oPassword = papszItems[i] + 9;
+ else if( EQUALN(papszItems[i],"host=",5) )
+ oHost = papszItems[i] + 5;
+ else if( EQUALN(papszItems[i],"port=",5) )
+ nPort = atoi(papszItems[i] + 5);
+ else if( EQUALN(papszItems[i],"tables=",7) )
+ {
+ papszTableNames = CSLTokenizeStringComplex(
+ papszItems[i] + 7, ";", FALSE, FALSE );
+ }
+ else
+ CPLError( CE_Warning, CPLE_AppDefined,
+ "'%s' in MYSQL datasource definition not recognised and ignored.", papszItems[i] );
+ }
+
+ CSLDestroy( papszItems );
+
+/* -------------------------------------------------------------------- */
+/* Try to establish connection. */
+/* -------------------------------------------------------------------- */
+ hConn = mysql_init( NULL );
+
+ if( hConn == NULL )
+ {
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "mysql_init() failed." );
+ }
+
+/* -------------------------------------------------------------------- */
+/* Set desired options on the connection: charset and timeout. */
+/* -------------------------------------------------------------------- */
+ if( hConn )
+ {
+ const char *pszTimeoutLength =
+ CPLGetConfigOption( "MYSQL_TIMEOUT", "0" );
+
+ unsigned int timeout = atoi(pszTimeoutLength);
+ mysql_options(hConn, MYSQL_OPT_CONNECT_TIMEOUT, (char*)&timeout);
+
+ mysql_options(hConn, MYSQL_SET_CHARSET_NAME, "utf8" );
+ }
+
+/* -------------------------------------------------------------------- */
+/* Perform connection. */
+/* -------------------------------------------------------------------- */
+ if( hConn
+ && mysql_real_connect( hConn,
+ oHost.length() ? oHost.c_str() : NULL,
+ oUser.length() ? oUser.c_str() : NULL,
+ oPassword.length() ? oPassword.c_str() : NULL,
+ oDB.length() ? oDB.c_str() : NULL,
+ nPort, NULL, CLIENT_INTERACTIVE ) == NULL )
+ {
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "MySQL connect failed for: %s\n%s",
+ pszNewName + 6, mysql_error( hConn ) );
+ mysql_close( hConn );
+ hConn = NULL;
+ }
+
+ if( hConn == NULL )
+ {
+ CSLDestroy( papszTableNames );
+ return FALSE;
+ }
+
+ pszName = CPLStrdup( pszNewName );
+
+ bDSUpdate = bUpdate;
+
+/* -------------------------------------------------------------------- */
+/* Get a list of available tables. */
+/* -------------------------------------------------------------------- */
+ if( papszTableNames == NULL )
+ {
+ MYSQL_RES *hResultSet;
+ MYSQL_ROW papszRow;
+
+ if( mysql_query( hConn, "SHOW TABLES" ) )
+ {
+ ReportError( "SHOW TABLES Failed" );
+ return FALSE;
+ }
+
+ hResultSet = mysql_store_result( hConn );
+ if( hResultSet == NULL )
+ {
+ ReportError( "mysql_store_result() failed on SHOW TABLES result.");
+ return FALSE;
+ }
+
+ while( (papszRow = mysql_fetch_row( hResultSet )) != NULL )
+ {
+ if( papszRow[0] == NULL )
+ continue;
+
+ if( EQUAL(papszRow[0],"spatial_ref_sys")
+ || EQUAL(papszRow[0],"geometry_columns") )
+ continue;
+
+ papszTableNames = CSLAddString(papszTableNames, papszRow[0] );
+ }
+
+ mysql_free_result( hResultSet );
+ }
+
+/* -------------------------------------------------------------------- */
+/* Get the schema of the available tables. */
+/* -------------------------------------------------------------------- */
+ int iRecord;
+
+ for( iRecord = 0;
+ papszTableNames != NULL && papszTableNames[iRecord] != NULL;
+ iRecord++ )
+ {
+ // FIXME: This should be fixed to deal with tables
+ // for which we can't open because the name is bad/
+ OpenTable( papszTableNames[iRecord], bUpdate, FALSE );
+ }
+
+ CSLDestroy( papszTableNames );
+
+ return nLayers > 0 || bUpdate;
+}
+
+/************************************************************************/
+/* OpenTable() */
+/************************************************************************/
+
+int OGRMySQLDataSource::OpenTable( const char *pszNewName, int bUpdate,
+ int bTestOpen )
+
+{
+/* -------------------------------------------------------------------- */
+/* Create the layer object. */
+/* -------------------------------------------------------------------- */
+ OGRMySQLTableLayer *poLayer;
+ OGRErr eErr;
+
+ poLayer = new OGRMySQLTableLayer( this, pszNewName, bUpdate );
+ eErr = poLayer->Initialize(pszNewName);
+ if (eErr == OGRERR_FAILURE)
+ return FALSE;
+
+/* -------------------------------------------------------------------- */
+/* Add layer to data source layer list. */
+/* -------------------------------------------------------------------- */
+ papoLayers = (OGRMySQLLayer **)
+ CPLRealloc( papoLayers, sizeof(OGRMySQLLayer *) * (nLayers+1) );
+ papoLayers[nLayers++] = poLayer;
+
+ return TRUE;
+}
+
+/************************************************************************/
+/* TestCapability() */
+/************************************************************************/
+
+int OGRMySQLDataSource::TestCapability( const char * pszCap )
+
+{
+
+ if( EQUAL(pszCap, ODsCCreateLayer) )
+ return TRUE;
+ if( EQUAL(pszCap, ODsCDeleteLayer))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+/************************************************************************/
+/* GetLayer() */
+/************************************************************************/
+
+OGRLayer *OGRMySQLDataSource::GetLayer( int iLayer )
+
+{
+ if( iLayer < 0 || iLayer >= nLayers )
+ return NULL;
+ else
+ return papoLayers[iLayer];
+}
+
+
+/************************************************************************/
+/* InitializeMetadataTables() */
+/* */
+/* Create the metadata tables (SPATIAL_REF_SYS and */
+/* GEOMETRY_COLUMNS). This method "does no harm" if the tables */
+/* exist and can be called at will. */
+/************************************************************************/
+
+OGRErr OGRMySQLDataSource::InitializeMetadataTables()
+
+{
+ const char* pszCommand;
+ MYSQL_RES *hResult;
+ OGRErr eErr = OGRERR_NONE;
+
+ pszCommand = "DESCRIBE geometry_columns";
+ if( mysql_query(GetConn(), pszCommand ) )
+ {
+ pszCommand =
+ "CREATE TABLE geometry_columns "
+ "( F_TABLE_CATALOG VARCHAR(256), "
+ "F_TABLE_SCHEMA VARCHAR(256), "
+ "F_TABLE_NAME VARCHAR(256) NOT NULL,"
+ "F_GEOMETRY_COLUMN VARCHAR(256) NOT NULL, "
+ "COORD_DIMENSION INT, "
+ "SRID INT,"
+ "TYPE VARCHAR(256) NOT NULL)";
+ if( mysql_query(GetConn(), pszCommand ) )
+ {
+ ReportError( pszCommand );
+ eErr = OGRERR_FAILURE;
+ }
+ else
+ CPLDebug("MYSQL","Creating geometry_columns metadata table");
+
+ }
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ {
+ mysql_free_result( hResult );
+ hResult = NULL;
+ }
+
+ pszCommand = "DESCRIBE spatial_ref_sys";
+ if( mysql_query(GetConn(), pszCommand ) )
+ {
+ pszCommand =
+ "CREATE TABLE spatial_ref_sys "
+ "(SRID INT NOT NULL, "
+ "AUTH_NAME VARCHAR(256), "
+ "AUTH_SRID INT, "
+ "SRTEXT VARCHAR(2048))";
+ if( mysql_query(GetConn(), pszCommand ) )
+ {
+ ReportError( pszCommand );
+ eErr = OGRERR_FAILURE;
+ }
+ else
+ CPLDebug("MYSQL","Creating spatial_ref_sys metadata table");
+
+ }
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ {
+ mysql_free_result( hResult );
+ hResult = NULL;
+ }
+
+ return eErr;
+}
+
+/************************************************************************/
+/* FetchSRS() */
+/* */
+/* Return a SRS corresponding to a particular id. Note that */
+/* reference counting should be honoured on the returned */
+/* OGRSpatialReference, as handles may be cached. */
+/************************************************************************/
+
+OGRSpatialReference *OGRMySQLDataSource::FetchSRS( int nId )
+{
+ char szCommand[128];
+ char **papszRow;
+ MYSQL_RES *hResult;
+
+ if( nId < 0 )
+ return NULL;
+
+/* -------------------------------------------------------------------- */
+/* First, we look through our SRID cache, is it there? */
+/* -------------------------------------------------------------------- */
+ int i;
+
+ for( i = 0; i < nKnownSRID; i++ )
+ {
+ if( panSRID[i] == nId )
+ return papoSRS[i];
+ }
+
+ OGRSpatialReference *poSRS = NULL;
+
+ // make sure to attempt to free any old results
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+
+ sprintf( szCommand,
+ "SELECT srtext FROM spatial_ref_sys WHERE srid = %d",
+ nId );
+
+ if( !mysql_query( GetConn(), szCommand ) )
+ hResult = mysql_store_result( GetConn() );
+
+ char *pszWKT = NULL;
+ papszRow = NULL;
+
+
+ if( hResult != NULL )
+ papszRow = mysql_fetch_row( hResult );
+
+ if( papszRow != NULL && papszRow[0] != NULL )
+ {
+ pszWKT = CPLStrdup(papszRow[0]);
+ }
+
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+
+ poSRS = new OGRSpatialReference();
+ char* pszWKTOri = pszWKT;
+ if( pszWKT == NULL || poSRS->importFromWkt( &pszWKT ) != OGRERR_NONE )
+ {
+ delete poSRS;
+ poSRS = NULL;
+ }
+
+ CPLFree(pszWKTOri);
+
+/* -------------------------------------------------------------------- */
+/* Add to the cache. */
+/* -------------------------------------------------------------------- */
+ panSRID = (int *) CPLRealloc(panSRID,sizeof(int) * (nKnownSRID+1) );
+ papoSRS = (OGRSpatialReference **)
+ CPLRealloc(papoSRS, sizeof(void*) * (nKnownSRID + 1) );
+ panSRID[nKnownSRID] = nId;
+ papoSRS[nKnownSRID] = poSRS;
+ nKnownSRID ++;
+
+ return poSRS;
+}
+
+
+
+/************************************************************************/
+/* FetchSRSId() */
+/* */
+/* Fetch the id corresponding to an SRS, and if not found, add */
+/* it to the table. */
+/************************************************************************/
+
+int OGRMySQLDataSource::FetchSRSId( OGRSpatialReference * poSRS )
+
+{
+ char **papszRow;
+ MYSQL_RES *hResult=NULL;
+
+ CPLString osCommand;
+ char *pszWKT = NULL;
+ int nSRSId;
+
+ if( poSRS == NULL )
+ return -1;
+
+/* -------------------------------------------------------------------- */
+/* Translate SRS to WKT. */
+/* -------------------------------------------------------------------- */
+ if( poSRS->exportToWkt( &pszWKT ) != OGRERR_NONE )
+ return -1;
+
+/* -------------------------------------------------------------------- */
+/* Try to find in the existing table. */
+/* -------------------------------------------------------------------- */
+ osCommand.Printf(
+ "SELECT srid FROM spatial_ref_sys WHERE srtext = '%s'",
+ pszWKT );
+
+ if( !mysql_query( GetConn(), osCommand ) )
+ hResult = mysql_store_result( GetConn() );
+
+ if (!mysql_num_rows(hResult))
+ {
+ CPLDebug("MYSQL", "No rows exist currently exist in spatial_ref_sys");
+ mysql_free_result( hResult );
+ hResult = NULL;
+ }
+ papszRow = NULL;
+ if( hResult != NULL )
+ papszRow = mysql_fetch_row( hResult );
+
+ if( papszRow != NULL && papszRow[0] != NULL )
+ {
+ nSRSId = atoi(papszRow[0]);
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+ CPLFree(pszWKT);
+ return nSRSId;
+ }
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+
+/* -------------------------------------------------------------------- */
+/* Get the current maximum srid in the srs table. */
+/* -------------------------------------------------------------------- */
+ osCommand = "SELECT MAX(srid) FROM spatial_ref_sys";
+ if( !mysql_query( GetConn(), osCommand ) )
+ {
+ hResult = mysql_store_result( GetConn() );
+ papszRow = mysql_fetch_row( hResult );
+ }
+
+ if( papszRow != NULL && papszRow[0] != NULL )
+ {
+ nSRSId = atoi(papszRow[0]) + 1;
+ }
+ else
+ nSRSId = 1;
+
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+
+/* -------------------------------------------------------------------- */
+/* Try adding the SRS to the SRS table. */
+/* -------------------------------------------------------------------- */
+ osCommand.Printf(
+ "INSERT INTO spatial_ref_sys (srid,srtext) VALUES (%d,'%s')",
+ nSRSId, pszWKT );
+
+ if( !mysql_query( GetConn(), osCommand ) )
+ hResult = mysql_store_result( GetConn() );
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+
+ CPLFree(pszWKT);
+
+ return nSRSId;
+}
+
+/************************************************************************/
+/* ExecuteSQL() */
+/************************************************************************/
+
+OGRLayer * OGRMySQLDataSource::ExecuteSQL( const char *pszSQLCommand,
+ OGRGeometry *poSpatialFilter,
+ const char *pszDialect )
+
+{
+ if( poSpatialFilter != NULL )
+ {
+ CPLDebug( "OGR_MYSQL",
+ "Spatial filter ignored for now in OGRMySQLDataSource::ExecuteSQL()" );
+ }
+
+/* -------------------------------------------------------------------- */
+/* Use generic implementation for OGRSQL dialect. */
+/* -------------------------------------------------------------------- */
+ if( pszDialect != NULL && EQUAL(pszDialect,"OGRSQL") )
+ return OGRDataSource::ExecuteSQL( pszSQLCommand,
+ poSpatialFilter,
+ pszDialect );
+
+/* -------------------------------------------------------------------- */
+/* Special case DELLAYER: command. */
+/* -------------------------------------------------------------------- */
+#ifdef notdef
+ if( EQUALN(pszSQLCommand,"DELLAYER:",9) )
+ {
+ const char *pszLayerName = pszSQLCommand + 9;
+
+ while( *pszLayerName == ' ' )
+ pszLayerName++;
+
+ DeleteLayer( pszLayerName );
+ return NULL;
+ }
+#endif
+
+/* -------------------------------------------------------------------- */
+/* Make sure there isn't an active transaction already. */
+/* -------------------------------------------------------------------- */
+ InterruptLongResult();
+
+/* -------------------------------------------------------------------- */
+/* Execute the statement. */
+/* -------------------------------------------------------------------- */
+ MYSQL_RES *hResultSet;
+
+ if( mysql_query( hConn, pszSQLCommand ) )
+ {
+ ReportError( pszSQLCommand );
+ return NULL;
+ }
+
+ hResultSet = mysql_use_result( hConn );
+ if( hResultSet == NULL )
+ {
+ if( mysql_field_count( hConn ) == 0 )
+ {
+ CPLDebug( "MYSQL", "Command '%s' succeeded, %d rows affected.",
+ pszSQLCommand,
+ (int) mysql_affected_rows(hConn) );
+ return NULL;
+ }
+ else
+ {
+ ReportError( pszSQLCommand );
+ return NULL;
+ }
+ }
+
+/* -------------------------------------------------------------------- */
+/* Do we have a tuple result? If so, instantiate a results */
+/* layer for it. */
+/* -------------------------------------------------------------------- */
+
+ OGRMySQLResultLayer *poLayer = NULL;
+
+ poLayer = new OGRMySQLResultLayer( this, pszSQLCommand, hResultSet );
+
+ return poLayer;
+}
+
+/************************************************************************/
+/* ReleaseResultSet() */
+/************************************************************************/
+
+void OGRMySQLDataSource::ReleaseResultSet( OGRLayer * poLayer )
+
+{
+ delete poLayer;
+}
+
+/************************************************************************/
+/* LaunderName() */
+/************************************************************************/
+
+char *OGRMySQLDataSource::LaunderName( const char *pszSrcName )
+
+{
+ char *pszSafeName = CPLStrdup( pszSrcName );
+ int i;
+
+ for( i = 0; pszSafeName[i] != '\0'; i++ )
+ {
+ pszSafeName[i] = (char) tolower( pszSafeName[i] );
+ if( pszSafeName[i] == '-' || pszSafeName[i] == '#' )
+ pszSafeName[i] = '_';
+ }
+
+ return pszSafeName;
+}
+
+/************************************************************************/
+/* RequestLongResult() */
+/* */
+/* Layers need to use mysql_use_result() instead of */
+/* mysql_store_result() so that we won't have to load entire */
+/* result sets into RAM. But only one "streamed" resultset can */
+/* be active on a database connection at a time. So we need to */
+/* maintain a way of closing off an active streaming resultset */
+/* before any other sort of query with a resultset is */
+/* executable. This method (and InterruptLongResult()) */
+/* implement that exclusion. */
+/************************************************************************/
+
+void OGRMySQLDataSource::RequestLongResult( OGRMySQLLayer * poNewLayer )
+
+{
+ InterruptLongResult();
+ poLongResultLayer = poNewLayer;
+}
+
+/************************************************************************/
+/* InterruptLongResult() */
+/************************************************************************/
+
+void OGRMySQLDataSource::InterruptLongResult()
+
+{
+ if( poLongResultLayer != NULL )
+ {
+ poLongResultLayer->ResetReading();
+ poLongResultLayer = NULL;
+ }
+}
+
+
+/************************************************************************/
+/* DeleteLayer() */
+/************************************************************************/
+
+int OGRMySQLDataSource::DeleteLayer( int iLayer)
+
+{
+ if( iLayer < 0 || iLayer >= nLayers )
+ return OGRERR_FAILURE;
+
+/* -------------------------------------------------------------------- */
+/* Blow away our OGR structures related to the layer. This is */
+/* pretty dangerous if anything has a reference to this layer! */
+/* -------------------------------------------------------------------- */
+ CPLString osLayerName = papoLayers[iLayer]->GetLayerDefn()->GetName();
+
+ CPLDebug( "MYSQL", "DeleteLayer(%s)", osLayerName.c_str() );
+
+ delete papoLayers[iLayer];
+ memmove( papoLayers + iLayer, papoLayers + iLayer + 1,
+ sizeof(void *) * (nLayers - iLayer - 1) );
+ nLayers--;
+
+/* -------------------------------------------------------------------- */
+/* Remove from the database. */
+/* -------------------------------------------------------------------- */
+ CPLString osCommand;
+
+ osCommand.Printf(
+ "DROP TABLE `%s` ",
+ osLayerName.c_str() );
+
+ if( !mysql_query(GetConn(), osCommand ) )
+ {
+ CPLDebug("MYSQL","Dropped table %s.", osLayerName.c_str());
+ return OGRERR_NONE;
+ }
+ else
+ {
+ ReportError( osCommand );
+ return OGRERR_FAILURE;
+ }
+
+}
+
+/************************************************************************/
+/* CreateLayer() */
+/************************************************************************/
+
+OGRLayer *
+OGRMySQLDataSource::CreateLayer( const char * pszLayerNameIn,
+ OGRSpatialReference *poSRS,
+ OGRwkbGeometryType eType,
+ char ** papszOptions )
+
+{
+ MYSQL_RES *hResult=NULL;
+ CPLString osCommand;
+ const char *pszGeometryType;
+ const char *pszGeomColumnName;
+ const char *pszExpectedFIDName;
+
+ char *pszLayerName;
+ int nDimension = 3; // MySQL only supports 2d currently
+
+
+/* -------------------------------------------------------------------- */
+/* Make sure there isn't an active transaction already. */
+/* -------------------------------------------------------------------- */
+ InterruptLongResult();
+
+
+ if( CSLFetchBoolean(papszOptions,"LAUNDER",TRUE) )
+ pszLayerName = LaunderName( pszLayerNameIn );
+ else
+ pszLayerName = CPLStrdup( pszLayerNameIn );
+
+ if( wkbFlatten(eType) == eType )
+ nDimension = 2;
+
+ CPLDebug("MYSQL","Creating layer %s.", pszLayerName);
+
+/* -------------------------------------------------------------------- */
+/* Do we already have this layer? If so, should we blow it */
+/* away? */
+/* -------------------------------------------------------------------- */
+
+ int iLayer;
+ for( iLayer = 0; iLayer < nLayers; iLayer++ )
+ {
+ if( EQUAL(pszLayerName,papoLayers[iLayer]->GetLayerDefn()->GetName()) )
+ {
+
+ if( CSLFetchNameValue( papszOptions, "OVERWRITE" ) != NULL
+ && !EQUAL(CSLFetchNameValue(papszOptions,"OVERWRITE"),"NO") )
+ {
+ DeleteLayer( iLayer );
+ }
+ else
+ {
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "Layer %s already exists, CreateLayer failed.\n"
+ "Use the layer creation option OVERWRITE=YES to "
+ "replace it.",
+ pszLayerName );
+ CPLFree( pszLayerName );
+ return NULL;
+ }
+ }
+ }
+
+ pszGeomColumnName = CSLFetchNameValue( papszOptions, "GEOMETRY_NAME" );
+ if (!pszGeomColumnName)
+ pszGeomColumnName="SHAPE";
+
+ pszExpectedFIDName = CSLFetchNameValue( papszOptions, "MYSQL_FID" );
+ if (!pszExpectedFIDName)
+ pszExpectedFIDName="OGR_FID";
+
+
+ CPLDebug("MYSQL","Geometry Column Name %s.", pszGeomColumnName);
+ CPLDebug("MYSQL","FID Column Name %s.", pszExpectedFIDName);
+
+ if( wkbFlatten(eType) == wkbNone )
+ {
+ osCommand.Printf(
+ "CREATE TABLE `%s` ( "
+ " %s INT UNIQUE NOT NULL AUTO_INCREMENT )",
+ pszLayerName, pszExpectedFIDName );
+ }
+ else
+ {
+ osCommand.Printf(
+ "CREATE TABLE `%s` ( "
+ " %s INT UNIQUE NOT NULL AUTO_INCREMENT, "
+ " %s GEOMETRY NOT NULL )",
+ pszLayerName, pszExpectedFIDName, pszGeomColumnName );
+ }
+
+ if( CSLFetchNameValue( papszOptions, "ENGINE" ) != NULL )
+ {
+ osCommand += " ENGINE = ";
+ osCommand += CSLFetchNameValue( papszOptions, "ENGINE" );
+ }
+
+ if( !mysql_query(GetConn(), osCommand ) )
+ {
+ if( mysql_field_count( GetConn() ) == 0 )
+ CPLDebug("MYSQL","Created table %s.", pszLayerName);
+ else
+ {
+ ReportError( osCommand );
+ return NULL;
+ }
+ }
+ else
+ {
+ ReportError( osCommand );
+ return NULL;
+ }
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+
+ // Calling this does no harm
+ InitializeMetadataTables();
+
+/* -------------------------------------------------------------------- */
+/* Try to get the SRS Id of this spatial reference system, */
+/* adding tot the srs table if needed. */
+/* -------------------------------------------------------------------- */
+ int nSRSId = -1;
+
+ if( poSRS != NULL )
+ nSRSId = FetchSRSId( poSRS );
+
+/* -------------------------------------------------------------------- */
+/* Sometimes there is an old crufty entry in the geometry_columns */
+/* table if things were not properly cleaned up before. We make */
+/* an effort to clean out such cruft. */
+/* */
+/* -------------------------------------------------------------------- */
+ osCommand.Printf(
+ "DELETE FROM geometry_columns WHERE f_table_name = '%s'",
+ pszLayerName );
+
+ if( mysql_query(GetConn(), osCommand ) )
+ {
+ ReportError( osCommand );
+ return NULL;
+ }
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+
+/* -------------------------------------------------------------------- */
+/* Attempt to add this table to the geometry_columns table, if */
+/* it is a spatial layer. */
+/* -------------------------------------------------------------------- */
+ if( eType != wkbNone )
+ {
+ int nCoordDimension;
+ if( eType == wkbFlatten(eType) )
+ nCoordDimension = 2;
+ else
+ nCoordDimension = 3;
+
+ pszGeometryType = OGRToOGCGeomType(eType);
+
+ if( nSRSId == -1 )
+ osCommand.Printf(
+ "INSERT INTO geometry_columns "
+ " (F_TABLE_NAME, "
+ " F_GEOMETRY_COLUMN, "
+ " COORD_DIMENSION, "
+ " TYPE) values "
+ " ('%s', '%s', %d, '%s')",
+ pszLayerName,
+ pszGeomColumnName,
+ nCoordDimension,
+ pszGeometryType );
+ else
+ osCommand.Printf(
+ "INSERT INTO geometry_columns "
+ " (F_TABLE_NAME, "
+ " F_GEOMETRY_COLUMN, "
+ " COORD_DIMENSION, "
+ " SRID, "
+ " TYPE) values "
+ " ('%s', '%s', %d, %d, '%s')",
+ pszLayerName,
+ pszGeomColumnName,
+ nCoordDimension,
+ nSRSId,
+ pszGeometryType );
+
+ if( mysql_query(GetConn(), osCommand ) )
+ {
+ ReportError( osCommand );
+ return NULL;
+ }
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+ }
+
+/* -------------------------------------------------------------------- */
+/* Create the spatial index. */
+/* */
+/* We're doing this before we add geometry and record to the table */
+/* so this may not be exactly the best way to do it. */
+/* -------------------------------------------------------------------- */
+ const char *pszSI = CSLFetchNameValue( papszOptions, "SPATIAL_INDEX" );
+
+ if( eType != wkbNone && (pszSI == NULL || CSLTestBoolean(pszSI)) )
+ {
+ osCommand.Printf(
+ "ALTER TABLE `%s` ADD SPATIAL INDEX(`%s`) ",
+ pszLayerName,
+ pszGeomColumnName);
+
+ if( mysql_query(GetConn(), osCommand ) )
+ {
+ ReportError( osCommand );
+ return NULL;
+ }
+
+ // make sure to attempt to free results of successful queries
+ hResult = mysql_store_result( GetConn() );
+ if( hResult != NULL )
+ mysql_free_result( hResult );
+ hResult = NULL;
+ }
+
+/* -------------------------------------------------------------------- */
+/* Create the layer object. */
+/* -------------------------------------------------------------------- */
+ OGRMySQLTableLayer *poLayer;
+ OGRErr eErr;
+
+ poLayer = new OGRMySQLTableLayer( this, pszLayerName, TRUE, nSRSId );
+ eErr = poLayer->Initialize(pszLayerName);
+ if (eErr == OGRERR_FAILURE)
+ return NULL;
+
+ poLayer->SetLaunderFlag( CSLFetchBoolean(papszOptions,"LAUNDER",TRUE) );
+ poLayer->SetPrecisionFlag( CSLFetchBoolean(papszOptions,"PRECISION",TRUE));
+
+/* -------------------------------------------------------------------- */
+/* Add layer to data source layer list. */
+/* -------------------------------------------------------------------- */
+ papoLayers = (OGRMySQLLayer **)
+ CPLRealloc( papoLayers, sizeof(OGRMySQLLayer *) * (nLayers+1) );
+
+ papoLayers[nLayers++] = poLayer;
+
+ CPLFree( pszLayerName );
+
+ return poLayer;
+}
diff --git a/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/oci/GNUmakefile b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/oci/GNUmakefile
new file mode 100644
index 000000000..d7508511a
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/oci/GNUmakefile
@@ -0,0 +1,32 @@
+
+
+include ../../../GDALmake.opt
+GDAL_INCLUDE += -I$(ORACLE_HOME)/sdk/include
+LNK_FLAGS += -arch i386
+EXTRA_LIBS += -L$(ORACLE_HOME)/lib -lclntsh -lnnz11
+
+OBJ = oci_utils.o ogrocisession.o ogrocistatement.o \
+ ogrocidriver.o ogrocidatasource.o ogrocilayer.o \
+ ogrocitablelayer.o ogrociselectlayer.o ogrocistringbuf.o \
+ ogrociwritablelayer.o ogrociloaderlayer.o ogrocistroke.o
+
+CPPFLAGS := $(GDAL_INCLUDE) $(OCI_INCLUDE) $(CPPFLAGS) -fPIC
+
+PLUGIN_SO = ogr_OCI.so
+
+default: $(O_OBJ:.o=.$(OBJ_EXT))
+
+clean:
+ rm -f *.o $(O_OBJ)
+
+$(O_OBJ): ogr_oci.h
+
+fastload: fastload.cpp
+ $(CXX) $(CPPFLAGS) $(CFLAGS) fastload.cpp -L../../.. -lgdal.1.1 \
+ -o fastload
+
+plugin: $(PLUGIN_SO)
+
+$(PLUGIN_SO): $(OBJ)
+ g++ -shared $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(EXTRA_LIBS) \
+ -o $(PLUGIN_SO)
diff --git a/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/oci/ogrocistatement.cpp b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/oci/ogrocistatement.cpp
new file mode 100644
index 000000000..ec5bd3e2f
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/oci/ogrocistatement.cpp
@@ -0,0 +1,398 @@
+/******************************************************************************
+ * $Id: ogrocistatement.cpp 14387 2008-05-07 16:14:03Z tamas $
+ *
+ * Project: Oracle Spatial Driver
+ * Purpose: Implementation of OGROCIStatement, which encapsulates the
+ * preparation, executation and fetching from an SQL statement.
+ * Author: Frank Warmerdam, warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2002, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#include "ogr_oci.h"
+#include "cpl_conv.h"
+
+CPL_CVSID("$Id: ogrocistatement.cpp 14387 2008-05-07 16:14:03Z tamas $");
+
+/************************************************************************/
+/* OGROCIStatement() */
+/************************************************************************/
+
+OGROCIStatement::OGROCIStatement( OGROCISession *poSessionIn )
+
+{
+ poSession = poSessionIn;
+ hStatement = NULL;
+ poDefn = NULL;
+
+ nRawColumnCount = 0;
+ papszCurColumn = NULL;
+ papszCurImage = NULL;
+ panCurColumnInd = NULL;
+ panFieldMap = NULL;
+
+ pszCommandText = NULL;
+}
+
+/************************************************************************/
+/* ~OGROCIStatement() */
+/************************************************************************/
+
+OGROCIStatement::~OGROCIStatement()
+
+{
+ Clean();
+}
+
+/************************************************************************/
+/* Clean() */
+/************************************************************************/
+
+void OGROCIStatement::Clean()
+
+{
+ int i;
+
+ CPLFree( pszCommandText );
+ pszCommandText = NULL;
+
+ if( papszCurColumn != NULL )
+ {
+ for( i = 0; papszCurColumn[i] != NULL; i++ )
+ CPLFree( papszCurColumn[i] );
+ }
+ CPLFree( papszCurColumn );
+ papszCurColumn = NULL;
+
+ CPLFree( papszCurImage );
+ papszCurImage = NULL;
+
+ CPLFree( panCurColumnInd );
+ panCurColumnInd = NULL;
+
+ CPLFree( panFieldMap );
+ panFieldMap = NULL;
+
+ if( poDefn != NULL && poDefn->Dereference() <= 0 )
+ {
+ delete poDefn;
+ poDefn = NULL;
+ }
+
+ if( hStatement != NULL )
+ {
+ OCIHandleFree((dvoid *)hStatement, (ub4)OCI_HTYPE_STMT);
+ hStatement = NULL;
+ }
+}
+
+/************************************************************************/
+/* Prepare() */
+/************************************************************************/
+
+CPLErr OGROCIStatement::Prepare( const char *pszSQLStatement )
+
+{
+ Clean();
+
+ CPLDebug( "OCI", "Prepare(%s)", pszSQLStatement );
+
+ pszCommandText = CPLStrdup(pszSQLStatement);
+
+ if( hStatement != NULL )
+ {
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "Statement already executed once on this OGROCIStatement." );
+ return CE_Failure;
+ }
+
+/* -------------------------------------------------------------------- */
+/* Allocate a statement handle. */
+/* -------------------------------------------------------------------- */
+ if( poSession->Failed(
+ OCIHandleAlloc( poSession->hEnv, (dvoid **) &hStatement,
+ (ub4)OCI_HTYPE_STMT,(size_t)0, (dvoid **)0 ),
+ "OCIHandleAlloc(Statement)" ) )
+ return CE_Failure;
+
+/* -------------------------------------------------------------------- */
+/* Xun: set prefetch count. */
+/* -------------------------------------------------------------------- */
+ int prefetch_rows = 2000;
+ if( poSession->Failed(
+ OCIAttrSet( hStatement, OCI_HTYPE_STMT, (void*)&prefetch_rows,
+ sizeof(int), OCI_ATTR_PREFETCH_ROWS,
+ poSession->hError ) ))
+ return CE_Failure;
+
+/* -------------------------------------------------------------------- */
+/* Prepare the statement. */
+/* -------------------------------------------------------------------- */
+ if( poSession->Failed(
+ OCIStmtPrepare( hStatement, poSession->hError,
+ (text *) pszSQLStatement, strlen(pszSQLStatement),
+ (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT ),
+ "OCIStmtPrepare" ) )
+ return CE_Failure;
+
+ return CE_None;
+}
+
+/************************************************************************/
+/* BindObject() */
+/************************************************************************/
+
+CPLErr OGROCIStatement::BindObject( const char *pszPlaceName,
+ void *pahObjects, OCIType *hTDO,
+ void **papIndicators )
+
+{
+ OCIBind *hBindOrd = NULL;
+
+ if( poSession->Failed(
+ OCIBindByName( hStatement, &hBindOrd, poSession->hError,
+ (text *) pszPlaceName, (sb4) strlen(pszPlaceName),
+ (dvoid *) 0, (sb4) 0, SQLT_NTY, (dvoid *)0,
+ (ub2 *)0, (ub2 *)0, (ub4)0, (ub4 *)0,
+ (ub4)OCI_DEFAULT),
+ "OCIBindByName()") )
+ return CE_Failure;
+
+ if( poSession->Failed(
+ OCIBindObject( hBindOrd, poSession->hError, hTDO,
+ (dvoid **) pahObjects, (ub4 *)0,
+ (dvoid **)papIndicators, (ub4 *)0),
+ "OCIBindObject()" ) )
+ return CE_Failure;
+
+ return CE_None;
+}
+
+/************************************************************************/
+/* BindScalar() */
+/************************************************************************/
+
+CPLErr OGROCIStatement::BindScalar( const char *pszPlaceName,
+ void *pData, int nDataLen,
+ int nSQLType, sb2 *paeInd )
+
+{
+ OCIBind *hBindOrd = NULL;
+
+ if( poSession->Failed(
+ OCIBindByName( hStatement, &hBindOrd, poSession->hError,
+ (text *) pszPlaceName, (sb4) strlen(pszPlaceName),
+ (dvoid *) pData, (sb4) nDataLen,
+ (ub2) nSQLType, (dvoid *)paeInd, (ub2 *)0,
+ (ub2 *)0, (ub4)0, (ub4 *)0,
+ (ub4)OCI_DEFAULT),
+ "OCIBindByName()") )
+ return CE_Failure;
+ else
+ return CE_None;
+}
+
+/************************************************************************/
+/* Execute() */
+/************************************************************************/
+
+CPLErr OGROCIStatement::Execute( const char *pszSQLStatement,
+ int nMode )
+
+{
+/* -------------------------------------------------------------------- */
+/* Prepare the statement if it is being passed in. */
+/* -------------------------------------------------------------------- */
+ if( pszSQLStatement != NULL )
+ {
+ CPLErr eErr = Prepare( pszSQLStatement );
+ if( eErr != CE_None )
+ return eErr;
+ }
+
+ if( hStatement == NULL )
+ {
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "No prepared statement in call to OGROCIStatement::Execute(NULL)" );
+ return CE_Failure;
+ }
+
+/* -------------------------------------------------------------------- */
+/* Determine if this is a SELECT statement. */
+/* -------------------------------------------------------------------- */
+ ub2 nStmtType;
+
+ if( poSession->Failed(
+ OCIAttrGet( hStatement, OCI_HTYPE_STMT,
+ &nStmtType, 0, OCI_ATTR_STMT_TYPE, poSession->hError ),
+ "OCIAttrGet(ATTR_STMT_TYPE)") )
+ return CE_Failure;
+
+ int bSelect = (nStmtType == OCI_STMT_SELECT);
+
+/* -------------------------------------------------------------------- */
+/* Work out some details about execution mode. */
+/* -------------------------------------------------------------------- */
+ if( nMode == -1 )
+ {
+ if( bSelect )
+ nMode = OCI_DEFAULT;
+ else
+ nMode = OCI_COMMIT_ON_SUCCESS;
+ }
+
+/* -------------------------------------------------------------------- */
+/* Execute the statement. */
+/* -------------------------------------------------------------------- */
+ if( poSession->Failed(
+ OCIStmtExecute( poSession->hSvcCtx, hStatement,
+ poSession->hError, (ub4)bSelect ? 0 : 1, (ub4)0,
+ (OCISnapshot *)NULL, (OCISnapshot *)NULL, nMode ),
+ pszCommandText ) )
+ return CE_Failure;
+
+ if( !bSelect )
+ return CE_None;
+
+/* -------------------------------------------------------------------- */
+/* Count the columns. */
+/* -------------------------------------------------------------------- */
+ for( nRawColumnCount = 0; TRUE; nRawColumnCount++ )
+ {
+ OCIParam *hParmDesc;
+
+ if( OCIParamGet( hStatement, OCI_HTYPE_STMT, poSession->hError,
+ (dvoid**)&hParmDesc,
+ (ub4) nRawColumnCount+1 ) != OCI_SUCCESS )
+ break;
+ }
+
+ panFieldMap = (int *) CPLCalloc(sizeof(int),nRawColumnCount);
+
+ papszCurColumn = (char **) CPLCalloc(sizeof(char*),nRawColumnCount+1);
+ panCurColumnInd = (sb2 *) CPLCalloc(sizeof(sb2),nRawColumnCount+1);
+
+/* ==================================================================== */
+/* Establish result column definitions, and setup parameter */
+/* defines. */
+/* ==================================================================== */
+ poDefn = new OGRFeatureDefn( pszCommandText );
+ poDefn->Reference();
+
+ for( int iParm = 0; iParm < nRawColumnCount; iParm++ )
+ {
+ OGRFieldDefn oField( "", OFTString );
+ OCIParam *hParmDesc;
+ ub2 nOCIType;
+ ub4 nOCILen;
+
+/* -------------------------------------------------------------------- */
+/* Get parameter definition. */
+/* -------------------------------------------------------------------- */
+ if( poSession->Failed(
+ OCIParamGet( hStatement, OCI_HTYPE_STMT, poSession->hError,
+ (dvoid**)&hParmDesc, (ub4) iParm+1 ),
+ "OCIParamGet") )
+ return CE_Failure;
+
+ if( poSession->GetParmInfo( hParmDesc, &oField, &nOCIType, &nOCILen )
+ != CE_None )
+ return CE_Failure;
+
+ if( oField.GetType() == OFTBinary )
+ {
+ panFieldMap[iParm] = -1;
+ continue;
+ }
+
+ poDefn->AddFieldDefn( &oField );
+ panFieldMap[iParm] = poDefn->GetFieldCount() - 1;
+
+/* -------------------------------------------------------------------- */
+/* Prepare a binding. */
+/* -------------------------------------------------------------------- */
+ int nBufWidth = 256, nOGRField = panFieldMap[iParm];
+ OCIDefine *hDefn = NULL;
+
+ if( oField.GetWidth() > 0 )
+ /* extra space needed for the decimal separator the string
+ terminator and the negative sign (Tamas Szekeres)*/
+ nBufWidth = oField.GetWidth() + 3;
+ else if( oField.GetType() == OFTInteger )
+ nBufWidth = 22;
+ else if( oField.GetType() == OFTReal )
+ nBufWidth = 36;
+ else if ( oField.GetType() == OFTDateTime )
+ nBufWidth = 40;
+ else if ( oField.GetType() == OFTDate )
+ nBufWidth = 20;
+
+ papszCurColumn[nOGRField] = (char *) CPLMalloc(nBufWidth+2);
+ CPLAssert( ((long) papszCurColumn[nOGRField]) % 2 == 0 );
+
+ if( poSession->Failed(
+ OCIDefineByPos( hStatement, &hDefn, poSession->hError,
+ iParm+1,
+ (ub1 *) papszCurColumn[nOGRField], nBufWidth,
+ SQLT_STR, panCurColumnInd + nOGRField,
+ NULL, NULL, OCI_DEFAULT ),
+ "OCIDefineByPos" ) )
+ return CE_Failure;
+ }
+
+ return CE_None;
+}
+
+/************************************************************************/
+/* SimpleFetchRow() */
+/************************************************************************/
+
+char **OGROCIStatement::SimpleFetchRow()
+
+{
+ int nStatus, i;
+
+ if( papszCurImage == NULL )
+ {
+ papszCurImage = (char **)
+ CPLCalloc(sizeof(char *), nRawColumnCount+1 );
+ }
+
+ nStatus = OCIStmtFetch( hStatement, poSession->hError, 1,
+ OCI_FETCH_NEXT, OCI_DEFAULT );
+
+ if( nStatus == OCI_NO_DATA )
+ return NULL;
+ else if( poSession->Failed( nStatus, "OCIStmtFetch" ) )
+ return NULL;
+
+ for( i = 0; papszCurColumn[i] != NULL; i++ )
+ {
+ if( panCurColumnInd[i] == OCI_IND_NULL )
+ papszCurImage[i] = NULL;
+ else
+ papszCurImage[i] = papszCurColumn[i];
+ }
+
+ return papszCurImage;
+}
+
diff --git a/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/sde/GNUmakefile b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/sde/GNUmakefile
new file mode 100644
index 000000000..d0cd6faf7
--- /dev/null
+++ b/BuildTools/centos/dep/gdal-1.9.2/ogr/ogrsf_frmts/sde/GNUmakefile
@@ -0,0 +1,23 @@
+
+
+include ../../../GDALmake.opt
+
+SDE_HOME = /home/test/esri/sdeexe101
+EXTRA_LIBS += -L$(SDE_HOME)/lib -lpe -lsde -lsg
+
+LNK_FLAGS += -m64
+
+OBJ = ogrsdedriver.o ogrsdedatasource.o ogrsdelayer.o
+
+CPPFLAGS := -m64 -fPIC $(GDAL_INCLUDE) -I$(SDE_HOME)/include $(CPPFLAGS)
+
+default: $(O_OBJ:.o=.$(OBJ_EXT))
+
+clean:
+ rm -f *.o $(O_OBJ)
+
+$(O_OBJ): ogr_sde.h
+
+plugin: $(OBJ)
+ g++ -shared $(LNK_FLAGS) $(OBJ) $(CONFIG_LIBS_INS) $(EXTRA_LIBS) \
+ -o ogr_SDE.so
diff --git a/BuildTools/centos/dep/libkml/src/kml/base/file_posix.cc b/BuildTools/centos/dep/libkml/src/kml/base/file_posix.cc
new file mode 100644
index 000000000..8ee98920c
--- /dev/null
+++ b/BuildTools/centos/dep/libkml/src/kml/base/file_posix.cc
@@ -0,0 +1,74 @@
+// Copyright 2008, Google Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// 3. Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// The file contains the implementation of the File methods specific to
+// POSIX platforms.
+
+#include "kml/base/file.h"
+#include
+#include
+#include
+#include
+#include
+
+namespace kmlbase {
+
+// Internal to the POSIX File class.
+static bool StatFile(const char* path, struct stat* stat_data) {
+ struct stat tmp;
+ if (stat(path, &tmp) !=0) {
+ return false;
+ }
+ *stat_data = tmp;
+ return true;
+}
+
+bool File::Exists(const string& full_path) {
+ struct stat stat_data;
+ if (!StatFile(full_path.c_str(), &stat_data)) {
+ return false;
+ }
+ return S_ISREG(stat_data.st_mode);
+}
+
+bool File::Delete(const string& filepath) {
+ return unlink(filepath.c_str()) == 0;
+}
+
+bool File::CreateNewTempFile(string* path) {
+ if (!path) {
+ return false;
+ }
+ char temp_path[] = "/tmp/libkmlXXXXXX";
+ int fd = mkstemp(temp_path);
+ if (fd == -1) {
+ return false;
+ }
+ close(fd);
+ path->assign(temp_path, strlen(temp_path));
+ return true;
+}
+
+} // end namespace kmlbase
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/CMakeFiles/CMakeDirectoryInformation.cmake b/BuildTools/centos/dep/mysql-5.6.14/include/CMakeFiles/CMakeDirectoryInformation.cmake
new file mode 100644
index 000000000..33007c047
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/CMakeFiles/CMakeDirectoryInformation.cmake
@@ -0,0 +1,16 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 2.8
+
+# Relative path conversion top directories.
+SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/media/psf/Home/Downloads/mysql-5.6.14")
+SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/media/psf/Home/Downloads/mysql-5.6.14/bl")
+
+# Force unix paths in dependencies.
+SET(CMAKE_FORCE_UNIX_PATHS 1)
+
+
+# The C and CXX include file regular expressions for this directory.
+SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
+SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
+SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
+SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/CMakeFiles/progress.marks b/BuildTools/centos/dep/mysql-5.6.14/include/CMakeFiles/progress.marks
new file mode 100644
index 000000000..573541ac9
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/CMakeFiles/progress.marks
@@ -0,0 +1 @@
+0
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/CMakeLists.txt b/BuildTools/centos/dep/mysql-5.6.14/include/CMakeLists.txt
new file mode 100644
index 000000000..7c4a00d97
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/CMakeLists.txt
@@ -0,0 +1,74 @@
+# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+SET(HEADERS_GEN_CONFIGURE
+${CMAKE_CURRENT_BINARY_DIR}/mysql_version.h
+${CMAKE_CURRENT_BINARY_DIR}/my_config.h
+${CMAKE_CURRENT_BINARY_DIR}/mysqld_ername.h
+${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h
+${CMAKE_CURRENT_BINARY_DIR}/sql_state.h
+)
+SET(HEADERS_ABI
+ mysql.h
+ mysql_com.h
+ mysql_time.h
+ my_list.h
+ my_alloc.h
+ typelib.h
+ mysql/plugin.h
+ mysql/plugin_audit.h
+ mysql/plugin_ftparser.h
+ mysql/plugin_validate_password.h
+)
+
+SET(HEADERS
+ ${HEADERS_ABI}
+ my_dbug.h
+ m_string.h
+ my_sys.h
+ my_xml.h
+ mysql_embed.h
+ my_pthread.h
+ decimal.h
+ errmsg.h
+ my_global.h
+ my_net.h
+ my_getopt.h
+ sslopt-longopts.h
+ my_dir.h
+ sslopt-vars.h
+ sslopt-case.h
+ sql_common.h
+ keycache.h
+ m_ctype.h
+ my_attribute.h
+ my_compiler.h
+ mysql_com_server.h
+ my_byteorder.h
+ byte_order_generic.h
+ byte_order_generic_x86.h
+ byte_order_generic_x86_64.h
+ little_endian.h
+ big_endian.h
+ ${HEADERS_GEN_CONFIGURE}
+)
+
+INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
+INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/mysql COMPONENT Development
+ PATTERN "*.h"
+ PATTERN "psi_abi*" EXCLUDE
+)
+
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/CTestTestfile.cmake b/BuildTools/centos/dep/mysql-5.6.14/include/CTestTestfile.cmake
new file mode 100644
index 000000000..99ac814ae
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/CTestTestfile.cmake
@@ -0,0 +1,6 @@
+# CMake generated Testfile for
+# Source directory: /media/psf/Home/Downloads/mysql-5.6.14/include
+# Build directory: /media/psf/Home/Downloads/mysql-5.6.14/bl/include
+#
+# This file includes the relevent testing commands required for
+# testing this directory and lists subdirectories to be tested as well.
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/Makefile b/BuildTools/centos/dep/mysql-5.6.14/include/Makefile
new file mode 100644
index 000000000..2a94e5af5
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/Makefile
@@ -0,0 +1,200 @@
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 2.8
+
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Remove some rules from gmake that .SUFFIXES does not remove.
+SUFFIXES =
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /usr/bin/cmake
+
+# The command to remove a file.
+RM = /usr/bin/cmake -E remove -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /media/psf/Home/Downloads/mysql-5.6.14
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /media/psf/Home/Downloads/mysql-5.6.14/bl
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target edit_cache
+edit_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
+ /usr/bin/cmake -i .
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+.PHONY : edit_cache/fast
+
+# Special rule for the target install
+install: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install
+
+# Special rule for the target install
+install/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install/fast
+
+# Special rule for the target install/local
+install/local: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+ /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local
+
+# Special rule for the target install/local
+install/local/fast: install/local
+.PHONY : install/local/fast
+
+# Special rule for the target install/strip
+install/strip: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+ /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip
+
+# Special rule for the target install/strip
+install/strip/fast: install/strip
+.PHONY : install/strip/fast
+
+# Special rule for the target list_install_components
+list_install_components:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Client\" \"DataFiles\" \"DebugBinaries\" \"Development\" \"Documentation\" \"Embedded\" \"Info\" \"IniFiles\" \"ManPages\" \"Readme\" \"Server\" \"Server_Scripts\" \"SharedLibraries\" \"SqlBench\" \"SupportFiles\" \"Test\" \"Unspecified\""
+.PHONY : list_install_components
+
+# Special rule for the target list_install_components
+list_install_components/fast: list_install_components
+.PHONY : list_install_components/fast
+
+# Special rule for the target package
+package: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..."
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && /usr/bin/cpack --config ./CPackConfig.cmake
+.PHONY : package
+
+# Special rule for the target package
+package/fast: package
+.PHONY : package/fast
+
+# Special rule for the target package_source
+package_source:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..."
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && /usr/bin/cpack --config ./CPackSourceConfig.cmake /media/psf/Home/Downloads/mysql-5.6.14/bl/CPackSourceConfig.cmake
+.PHONY : package_source
+
+# Special rule for the target package_source
+package_source/fast: package_source
+.PHONY : package_source/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+ /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+.PHONY : rebuild_cache/fast
+
+# Special rule for the target test
+test:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
+ /usr/bin/ctest --force-new-ctest-process $(ARGS)
+.PHONY : test
+
+# Special rule for the target test
+test/fast: test
+.PHONY : test/fast
+
+# The main all target
+all: cmake_check_build_system
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && $(CMAKE_COMMAND) -E cmake_progress_start /media/psf/Home/Downloads/mysql-5.6.14/bl/CMakeFiles /media/psf/Home/Downloads/mysql-5.6.14/bl/include/CMakeFiles/progress.marks
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && $(MAKE) -f CMakeFiles/Makefile2 include/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /media/psf/Home/Downloads/mysql-5.6.14/bl/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
+clean:
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && $(MAKE) -f CMakeFiles/Makefile2 include/clean
+.PHONY : clean
+
+# The main clean target
+clean/fast: clean
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && $(MAKE) -f CMakeFiles/Makefile2 include/preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && $(MAKE) -f CMakeFiles/Makefile2 include/preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+# Help Target
+help:
+ @echo "The following are some of the valid targets for this Makefile:"
+ @echo "... all (the default if no target is provided)"
+ @echo "... clean"
+ @echo "... depend"
+ @echo "... edit_cache"
+ @echo "... install"
+ @echo "... install/local"
+ @echo "... install/strip"
+ @echo "... list_install_components"
+ @echo "... package"
+ @echo "... package_source"
+ @echo "... rebuild_cache"
+ @echo "... test"
+.PHONY : help
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+ cd /media/psf/Home/Downloads/mysql-5.6.14/bl && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/atomic/gcc_builtins.h b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/gcc_builtins.h
new file mode 100644
index 000000000..fb6a537d2
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/gcc_builtins.h
@@ -0,0 +1,42 @@
+#ifndef ATOMIC_GCC_BUILTINS_INCLUDED
+#define ATOMIC_GCC_BUILTINS_INCLUDED
+
+/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#define make_atomic_add_body(S) \
+ v= __sync_fetch_and_add(a, v);
+#define make_atomic_fas_body(S) \
+ v= __sync_lock_test_and_set(a, v);
+#define make_atomic_cas_body(S) \
+ int ## S sav; \
+ int ## S cmp_val= *cmp; \
+ sav= __sync_val_compare_and_swap(a, cmp_val, set);\
+ if (!(ret= (sav == cmp_val))) *cmp= sav
+
+#ifdef MY_ATOMIC_MODE_DUMMY
+#define make_atomic_load_body(S) ret= *a
+#define make_atomic_store_body(S) *a= v
+#define MY_ATOMIC_MODE "gcc-builtins-up"
+
+#else
+#define MY_ATOMIC_MODE "gcc-builtins-smp"
+#define make_atomic_load_body(S) \
+ ret= __sync_fetch_and_or(a, 0);
+#define make_atomic_store_body(S) \
+ (void) __sync_lock_test_and_set(a, v);
+#endif
+
+#endif /* ATOMIC_GCC_BUILTINS_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/atomic/generic-msvc.h b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/generic-msvc.h
new file mode 100644
index 000000000..6c5272c98
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/generic-msvc.h
@@ -0,0 +1,135 @@
+/* Copyright (c) 2006-2008 MySQL AB, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _atomic_h_cleanup_
+#define _atomic_h_cleanup_ "atomic/generic-msvc.h"
+
+/*
+ We don't implement anything specific for MY_ATOMIC_MODE_DUMMY, always use
+ intrinsics.
+ 8 and 16-bit atomics are not implemented, but it can be done if necessary.
+*/
+#undef MY_ATOMIC_HAS_8_16
+
+#include
+/*
+ x86 compilers (both VS2003 or VS2005) never use instrinsics, but generate
+ function calls to kernel32 instead, even in the optimized build.
+ We force intrinsics as described in MSDN documentation for
+ _InterlockedCompareExchange.
+*/
+#ifdef _M_IX86
+
+#if (_MSC_VER >= 1500)
+#include
+#else
+C_MODE_START
+/*Visual Studio 2003 and earlier do not have prototypes for atomic intrinsics*/
+LONG _InterlockedCompareExchange (LONG volatile *Target, LONG Value, LONG Comp);
+LONGLONG _InterlockedCompareExchange64 (LONGLONG volatile *Target,
+ LONGLONG Value, LONGLONG Comp);
+C_MODE_END
+
+#pragma intrinsic(_InterlockedCompareExchange)
+#pragma intrinsic(_InterlockedCompareExchange64)
+#endif
+
+#define InterlockedCompareExchange _InterlockedCompareExchange
+#define InterlockedCompareExchange64 _InterlockedCompareExchange64
+/*
+ No need to do something special for InterlockedCompareExchangePointer
+ as it is a #define to InterlockedCompareExchange. The same applies to
+ InterlockedExchangePointer.
+*/
+#endif /*_M_IX86*/
+
+#define MY_ATOMIC_MODE "msvc-intrinsics"
+/* Implement using CAS on WIN32 */
+#define IL_COMP_EXCHG32(X,Y,Z) \
+ InterlockedCompareExchange((volatile LONG *)(X),(Y),(Z))
+#define IL_COMP_EXCHG64(X,Y,Z) \
+ InterlockedCompareExchange64((volatile LONGLONG *)(X), \
+ (LONGLONG)(Y),(LONGLONG)(Z))
+#define IL_COMP_EXCHGptr InterlockedCompareExchangePointer
+
+#define make_atomic_cas_body(S) \
+ int ## S initial_cmp= *cmp; \
+ int ## S initial_a= IL_COMP_EXCHG ## S (a, set, initial_cmp); \
+ if (!(ret= (initial_a == initial_cmp))) *cmp= initial_a;
+
+#ifndef _M_IX86
+/* Use full set of optimised functions on WIN64 */
+#define IL_EXCHG_ADD32(X,Y) \
+ InterlockedExchangeAdd((volatile LONG *)(X),(Y))
+#define IL_EXCHG_ADD64(X,Y) \
+ InterlockedExchangeAdd64((volatile LONGLONG *)(X),(LONGLONG)(Y))
+#define IL_EXCHG32(X,Y) \
+ InterlockedExchange((volatile LONG *)(X),(Y))
+#define IL_EXCHG64(X,Y) \
+ InterlockedExchange64((volatile LONGLONG *)(X),(LONGLONG)(Y))
+#define IL_EXCHGptr InterlockedExchangePointer
+
+#define make_atomic_add_body(S) \
+ v= IL_EXCHG_ADD ## S (a, v)
+#define make_atomic_swap_body(S) \
+ v= IL_EXCHG ## S (a, v)
+#define make_atomic_load_body(S) \
+ ret= 0; /* avoid compiler warning */ \
+ ret= IL_COMP_EXCHG ## S (a, ret, ret);
+#endif
+/*
+ my_yield_processor (equivalent of x86 PAUSE instruction) should be used
+ to improve performance on hyperthreaded CPUs. Intel recommends to use it in
+ spin loops also on non-HT machines to reduce power consumption (see e.g
+ http://softwarecommunity.intel.com/articles/eng/2004.htm)
+
+ Running benchmarks for spinlocks implemented with InterlockedCompareExchange
+ and YieldProcessor shows that much better performance is achieved by calling
+ YieldProcessor in a loop - that is, yielding longer. On Intel boxes setting
+ loop count in the range 200-300 brought best results.
+ */
+#ifndef YIELD_LOOPS
+#define YIELD_LOOPS 200
+#endif
+
+static __inline int my_yield_processor()
+{
+ int i;
+ for(i=0; irw)
+#define my_atomic_rwlock_init(name) pthread_mutex_init(& (name)->rw, 0)
+#define my_atomic_rwlock_rdlock(name) pthread_mutex_lock(& (name)->rw)
+#define my_atomic_rwlock_wrlock(name) pthread_mutex_lock(& (name)->rw)
+#define my_atomic_rwlock_rdunlock(name) pthread_mutex_unlock(& (name)->rw)
+#define my_atomic_rwlock_wrunlock(name) pthread_mutex_unlock(& (name)->rw)
+
+#define MY_ATOMIC_MODE "mutex"
+#ifndef MY_ATOMIC_MODE_RWLOCKS
+#define MY_ATOMIC_MODE_RWLOCKS 1
+#endif
+#endif
+
+#define make_atomic_add_body(S) int ## S sav; sav= *a; *a+= v; v=sav;
+#define make_atomic_fas_body(S) int ## S sav; sav= *a; *a= v; v=sav;
+#define make_atomic_cas_body(S) if ((ret= (*a == *cmp))) *a= set; else *cmp=*a;
+#define make_atomic_load_body(S) ret= *a;
+#define make_atomic_store_body(S) *a= v;
+
+#endif /* ATOMIC_RWLOCK_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/atomic/solaris.h b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/solaris.h
new file mode 100644
index 000000000..7b6f0561f
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/solaris.h
@@ -0,0 +1,72 @@
+/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _atomic_h_cleanup_
+#define _atomic_h_cleanup_ "atomic/solaris.h"
+
+#include
+
+#define MY_ATOMIC_MODE "solaris-atomic"
+
+#if defined(__GNUC__)
+#define atomic_typeof(T,V) __typeof__(V)
+#else
+#define atomic_typeof(T,V) T
+#endif
+
+#define uintptr_t void *
+#define atomic_or_ptr_nv(X,Y) (void *)atomic_or_ulong_nv((volatile ulong_t *)X, Y)
+
+#define make_atomic_cas_body(S) \
+ atomic_typeof(uint ## S ## _t, *cmp) sav; \
+ sav = atomic_cas_ ## S( \
+ (volatile uint ## S ## _t *)a, \
+ (uint ## S ## _t)*cmp, \
+ (uint ## S ## _t)set); \
+ if (! (ret= (sav == *cmp))) \
+ *cmp= sav;
+
+#define make_atomic_add_body(S) \
+ int ## S nv; /* new value */ \
+ nv= atomic_add_ ## S ## _nv((volatile uint ## S ## _t *)a, v); \
+ v= nv - v
+
+/* ------------------------------------------------------------------------ */
+
+#ifdef MY_ATOMIC_MODE_DUMMY
+
+#define make_atomic_load_body(S) ret= *a
+#define make_atomic_store_body(S) *a= v
+
+#else /* MY_ATOMIC_MODE_DUMMY */
+
+#define make_atomic_load_body(S) \
+ ret= atomic_or_ ## S ## _nv((volatile uint ## S ## _t *)a, 0)
+
+#define make_atomic_store_body(S) \
+ (void) atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v)
+
+#endif
+
+#define make_atomic_fas_body(S) \
+ v= atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v)
+
+#else /* cleanup */
+
+#undef uintptr_t
+#undef atomic_or_ptr_nv
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/atomic/x86-gcc.h b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/x86-gcc.h
new file mode 100644
index 000000000..2238347d4
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/atomic/x86-gcc.h
@@ -0,0 +1,145 @@
+#ifndef ATOMIC_X86_GCC_INCLUDED
+#define ATOMIC_X86_GCC_INCLUDED
+
+/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ XXX 64-bit atomic operations can be implemented using
+ cmpxchg8b, if necessary. Though I've heard that not all 64-bit
+ architectures support double-word (128-bit) cas.
+*/
+
+/*
+ No special support of 8 and 16 bit operations are implemented here
+ currently.
+*/
+#undef MY_ATOMIC_HAS_8_AND_16
+
+#ifdef __x86_64__
+# ifdef MY_ATOMIC_NO_XADD
+# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix "-no-xadd"
+# else
+# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix
+# endif
+#else
+# ifdef MY_ATOMIC_NO_XADD
+# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix "-no-xadd"
+# else
+# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix
+# endif
+#endif
+
+/* fix -ansi errors while maintaining readability */
+#ifndef asm
+#define asm __asm__
+#endif
+
+#ifndef MY_ATOMIC_NO_XADD
+#define make_atomic_add_body(S) make_atomic_add_body ## S
+#define make_atomic_cas_body(S) make_atomic_cas_body ## S
+#endif
+
+#define make_atomic_add_body32 \
+ asm volatile (LOCK_prefix "; xadd %0, %1;" \
+ : "+r" (v), "=m" (*a) \
+ : "m" (*a) \
+ : "memory")
+
+#define make_atomic_cas_body32 \
+ __typeof__(*cmp) sav; \
+ asm volatile (LOCK_prefix "; cmpxchg %3, %0; setz %2;" \
+ : "=m" (*a), "=a" (sav), "=q" (ret) \
+ : "r" (set), "m" (*a), "a" (*cmp) \
+ : "memory"); \
+ if (!ret) \
+ *cmp= sav
+
+#ifdef __x86_64__
+#define make_atomic_add_body64 make_atomic_add_body32
+#define make_atomic_cas_body64 make_atomic_cas_body32
+
+#define make_atomic_fas_body(S) \
+ asm volatile ("xchg %0, %1;" \
+ : "+r" (v), "=m" (*a) \
+ : "m" (*a) \
+ : "memory")
+
+/*
+ Actually 32/64-bit reads/writes are always atomic on x86_64,
+ nonetheless issue memory barriers as appropriate.
+*/
+#define make_atomic_load_body(S) \
+ /* Serialize prior load and store operations. */ \
+ asm volatile ("mfence" ::: "memory"); \
+ ret= *a; \
+ /* Prevent compiler from reordering instructions. */ \
+ asm volatile ("" ::: "memory")
+#define make_atomic_store_body(S) \
+ asm volatile ("; xchg %0, %1;" \
+ : "=m" (*a), "+r" (v) \
+ : "m" (*a) \
+ : "memory")
+
+#else
+/*
+ Use default implementations of 64-bit operations since we solved
+ the 64-bit problem on 32-bit platforms for CAS, no need to solve it
+ once more for ADD, LOAD, STORE and FAS as well.
+ Since we already added add32 support, we need to define add64
+ here, but we haven't defined fas, load and store at all, so
+ we can fallback on default implementations.
+*/
+#define make_atomic_add_body64 \
+ int64 tmp=*a; \
+ while (!my_atomic_cas64(a, &tmp, tmp+v)) ; \
+ v=tmp;
+
+/*
+ On some platforms (e.g. Mac OS X and Solaris) the ebx register
+ is held as a pointer to the global offset table. Thus we're not
+ allowed to use the b-register on those platforms when compiling
+ PIC code, to avoid this we push ebx and pop ebx. The new value
+ is copied directly from memory to avoid problems with a implicit
+ manipulation of the stack pointer by the push.
+
+ cmpxchg8b works on both 32-bit platforms and 64-bit platforms but
+ the code here is only used on 32-bit platforms, on 64-bit
+ platforms the much simpler make_atomic_cas_body32 will work
+ fine.
+*/
+#define make_atomic_cas_body64 \
+ asm volatile ("push %%ebx;" \
+ "movl (%%ecx), %%ebx;" \
+ "movl 4(%%ecx), %%ecx;" \
+ LOCK_prefix "; cmpxchg8b %0;" \
+ "setz %2; pop %%ebx" \
+ : "=m" (*a), "+A" (*cmp), "=c" (ret) \
+ : "c" (&set), "m" (*a) \
+ : "memory", "esp")
+#endif
+
+/*
+ The implementation of make_atomic_cas_body32 is adaptable to
+ the OS word size, so on 64-bit platforms it will automatically
+ adapt to 64-bits and so it will work also on 64-bit platforms
+*/
+#define make_atomic_cas_bodyptr make_atomic_cas_body32
+
+#ifdef MY_ATOMIC_MODE_DUMMY
+#define make_atomic_load_body(S) ret=*a
+#define make_atomic_store_body(S) *a=v
+#endif
+#endif /* ATOMIC_X86_GCC_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/base64.h b/BuildTools/centos/dep/mysql-5.6.14/include/base64.h
new file mode 100644
index 000000000..5fb2e9b80
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/base64.h
@@ -0,0 +1,61 @@
+/* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef __BASE64_H_INCLUDED__
+#define __BASE64_H_INCLUDED__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ Calculate how much memory needed for dst of base64_encode()
+*/
+int base64_needed_encoded_length(int length_of_data);
+
+/*
+ Maximum length base64_encode_needed_length() can accept with no overflow.
+*/
+int base64_encode_max_arg_length(void);
+
+/*
+ Calculate how much memory needed for dst of base64_decode()
+*/
+int base64_needed_decoded_length(int length_of_encoded_data);
+
+/*
+ Maximum length base64_decode_needed_length() can accept with no overflow.
+*/
+int base64_decode_max_arg_length();
+
+/*
+ Encode data as a base64 string
+*/
+int base64_encode(const void *src, size_t src_len, char *dst);
+
+/*
+ Decode a base64 string into data
+*/
+int base64_decode(const char *src, size_t src_len,
+ void *dst, const char **end_ptr, int flags);
+
+/* Allow multuple chunks 'AAA= AA== AA==', binlog uses this */
+#define MY_BASE64_DECODE_ALLOW_MULTIPLE_CHUNKS 1
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !__BASE64_H_INCLUDED__ */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/big_endian.h b/BuildTools/centos/dep/mysql-5.6.14/include/big_endian.h
new file mode 100644
index 000000000..13ab6dec6
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/big_endian.h
@@ -0,0 +1,82 @@
+/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Data in big-endian format.
+*/
+#define float4store(T,A) do { *(T)= ((uchar *) &A)[3];\
+ *((T)+1)=(char) ((uchar *) &A)[2];\
+ *((T)+2)=(char) ((uchar *) &A)[1];\
+ *((T)+3)=(char) ((uchar *) &A)[0]; } while(0)
+
+#define float4get(V,M) do { float def_temp;\
+ ((uchar*) &def_temp)[0]=(M)[3];\
+ ((uchar*) &def_temp)[1]=(M)[2];\
+ ((uchar*) &def_temp)[2]=(M)[1];\
+ ((uchar*) &def_temp)[3]=(M)[0];\
+ (V)=def_temp; } while(0)
+
+#define float8store(T,V) do { *(T)= ((uchar *) &V)[7];\
+ *((T)+1)=(char) ((uchar *) &V)[6];\
+ *((T)+2)=(char) ((uchar *) &V)[5];\
+ *((T)+3)=(char) ((uchar *) &V)[4];\
+ *((T)+4)=(char) ((uchar *) &V)[3];\
+ *((T)+5)=(char) ((uchar *) &V)[2];\
+ *((T)+6)=(char) ((uchar *) &V)[1];\
+ *((T)+7)=(char) ((uchar *) &V)[0]; } while(0)
+
+#define float8get(V,M) do { double def_temp;\
+ ((uchar*) &def_temp)[0]=(M)[7];\
+ ((uchar*) &def_temp)[1]=(M)[6];\
+ ((uchar*) &def_temp)[2]=(M)[5];\
+ ((uchar*) &def_temp)[3]=(M)[4];\
+ ((uchar*) &def_temp)[4]=(M)[3];\
+ ((uchar*) &def_temp)[5]=(M)[2];\
+ ((uchar*) &def_temp)[6]=(M)[1];\
+ ((uchar*) &def_temp)[7]=(M)[0];\
+ (V) = def_temp; } while(0)
+
+#define ushortget(V,M) do { V = (uint16) (((uint16) ((uchar) (M)[1]))+\
+ ((uint16) ((uint16) (M)[0]) << 8)); } while(0)
+#define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\
+ ((short) ((short) (M)[0]) << 8)); } while(0)
+#define longget(V,M) do { int32 def_temp;\
+ ((uchar*) &def_temp)[0]=(M)[0];\
+ ((uchar*) &def_temp)[1]=(M)[1];\
+ ((uchar*) &def_temp)[2]=(M)[2];\
+ ((uchar*) &def_temp)[3]=(M)[3];\
+ (V)=def_temp; } while(0)
+#define ulongget(V,M) do { uint32 def_temp;\
+ ((uchar*) &def_temp)[0]=(M)[0];\
+ ((uchar*) &def_temp)[1]=(M)[1];\
+ ((uchar*) &def_temp)[2]=(M)[2];\
+ ((uchar*) &def_temp)[3]=(M)[3];\
+ (V)=def_temp; } while(0)
+#define shortstore(T,A) do { uint def_temp=(uint) (A) ;\
+ *(((char*)T)+1)=(char)(def_temp); \
+ *(((char*)T)+0)=(char)(def_temp >> 8); } while(0)
+#define longstore(T,A) do { *(((char*)T)+3)=((A));\
+ *(((char*)T)+2)=(((A) >> 8));\
+ *(((char*)T)+1)=(((A) >> 16));\
+ *(((char*)T)+0)=(((A) >> 24)); } while(0)
+
+#define floatget(V,M) memcpy(&V, (M), sizeof(float))
+/* Cast away type qualifiers (necessary as macro takes argument by value). */
+#define floatstore(T,V) memcpy((T), (void*) (&V), sizeof(float))
+#define doubleget(V,M) memcpy(&V, (M), sizeof(double))
+/* Cast away type qualifiers (necessary as macro takes argument by value). */
+#define doublestore(T,V) memcpy((T), (void*) &V, sizeof(double))
+#define longlongget(V,M) memcpy(&V, (M), sizeof(ulonglong))
+#define longlongstore(T,V) memcpy((T), &V, sizeof(ulonglong))
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic.h b/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic.h
new file mode 100644
index 000000000..8ad7edd99
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic.h
@@ -0,0 +1,95 @@
+/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Endianness-independent definitions for architectures other
+ than the x86 architecture.
+*/
+#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\
+ ((int16) ((int16) (A)[1]) << 8))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (int32) (((int32) ((uchar) (A)[0])) +\
+ (((int32) ((uchar) (A)[1]) << 8)) +\
+ (((int32) ((uchar) (A)[2]) << 16)) +\
+ (((int32) ((int16) (A)[3]) << 24)))
+#define sint8korr(A) (longlong) uint8korr(A)
+#define uint2korr(A) (uint16) (((uint16) ((uchar) (A)[0])) +\
+ ((uint16) ((uchar) (A)[1]) << 8))
+#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16))
+#define uint4korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \
+ (((uint32) ((uchar) (A)[1])) << 8) + \
+ (((uint32) ((uchar) (A)[2])) << 16) + \
+ (((uint32) ((uchar) (A)[3])) << 24)) + \
+ (((ulonglong) ((uchar) (A)[4])) << 32) + \
+ (((ulonglong) ((uchar) (A)[5])) << 40))
+#define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) (((uint32) ((uchar) (A)[4])) +\
+ (((uint32) ((uchar) (A)[5])) << 8) +\
+ (((uint32) ((uchar) (A)[6])) << 16) +\
+ (((uint32) ((uchar) (A)[7])) << 24))) <<\
+ 32))
+#define int2store(T,A) do { uint def_temp= (uint) (A) ;\
+ *((uchar*) (T))= (uchar)(def_temp); \
+ *((uchar*) (T)+1)=(uchar)((def_temp >> 8)); \
+ } while(0)
+#define int3store(T,A) do { /*lint -save -e734 */\
+ *((uchar*)(T))=(uchar) ((A));\
+ *((uchar*) (T)+1)=(uchar) (((A) >> 8));\
+ *((uchar*)(T)+2)=(uchar) (((A) >> 16)); \
+ /*lint -restore */} while(0)
+#define int4store(T,A) do { *((char *)(T))=(char) ((A));\
+ *(((char *)(T))+1)=(char) (((A) >> 8));\
+ *(((char *)(T))+2)=(char) (((A) >> 16));\
+ *(((char *)(T))+3)=(char) (((A) >> 24));\
+ } while(0)
+#define int5store(T,A) do { *((char *)(T))= (char)((A)); \
+ *(((char *)(T))+1)= (char)(((A) >> 8)); \
+ *(((char *)(T))+2)= (char)(((A) >> 16)); \
+ *(((char *)(T))+3)= (char)(((A) >> 24)); \
+ *(((char *)(T))+4)= (char)(((A) >> 32)); \
+ } while(0)
+#define int6store(T,A) do { *((char *)(T))= (char)((A)); \
+ *(((char *)(T))+1)= (char)(((A) >> 8)); \
+ *(((char *)(T))+2)= (char)(((A) >> 16)); \
+ *(((char *)(T))+3)= (char)(((A) >> 24)); \
+ *(((char *)(T))+4)= (char)(((A) >> 32)); \
+ *(((char *)(T))+5)= (char)(((A) >> 40)); \
+ } while(0)
+#define int8store(T,A) do { uint def_temp= (uint) (A), \
+ def_temp2= (uint) ((A) >> 32); \
+ int4store((T),def_temp); \
+ int4store((T+4),def_temp2);\
+ } while(0)
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic_x86.h b/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic_x86.h
new file mode 100644
index 000000000..6a6f8ff9a
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic_x86.h
@@ -0,0 +1,93 @@
+/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Optimized function-like macros for the x86 architecture (_WIN32 included).
+*/
+#define sint2korr(A) (*((int16 *) (A)))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (*((long *) (A)))
+#define uint2korr(A) (*((uint16 *) (A)))
+/*
+ Attention: Please, note, uint3korr reads 4 bytes (not 3)!
+ It means, that you have to provide enough allocated space.
+*/
+#if defined(HAVE_purify) && !defined(_WIN32)
+#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16))
+#else
+#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
+#endif
+#define uint4korr(A) (*((uint32 *) (A)))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \
+ (((uint32) ((uchar) (A)[1])) << 8) + \
+ (((uint32) ((uchar) (A)[2])) << 16) + \
+ (((uint32) ((uchar) (A)[3])) << 24)) + \
+ (((ulonglong) ((uchar) (A)[4])) << 32) + \
+ (((ulonglong) ((uchar) (A)[5])) << 40))
+#define uint8korr(A) (*((ulonglong *) (A)))
+#define sint8korr(A) (*((longlong *) (A)))
+
+#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
+#define int3store(T,A) do { *(T)= (uchar) ((A));\
+ *(T+1)=(uchar) (((uint) (A) >> 8));\
+ *(T+2)=(uchar) (((A) >> 16));\
+ } while (0)
+#define int4store(T,A) *((long *) (T))= (long) (A)
+#define int5store(T,A) do { *(T)= (uchar)((A));\
+ *((T)+1)=(uchar) (((A) >> 8));\
+ *((T)+2)=(uchar) (((A) >> 16));\
+ *((T)+3)=(uchar) (((A) >> 24));\
+ *((T)+4)=(uchar) (((A) >> 32));\
+ } while(0)
+#define int6store(T,A) do { *(T)= (uchar)((A)); \
+ *((T)+1)=(uchar) (((A) >> 8)); \
+ *((T)+2)=(uchar) (((A) >> 16)); \
+ *((T)+3)=(uchar) (((A) >> 24)); \
+ *((T)+4)=(uchar) (((A) >> 32)); \
+ *((T)+5)=(uchar) (((A) >> 40)); \
+ } while(0)
+#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
+typedef union {
+ double v;
+ long m[2];
+} doubleget_union;
+#define doubleget(V,M) do { doubleget_union _tmp; \
+ _tmp.m[0] = *((long*)(M)); \
+ _tmp.m[1] = *(((long*) (M))+1); \
+ (V) = _tmp.v;\
+ } while(0)
+#define doublestore(T,V) do { *((long *) T) = ((doubleget_union *)&V)->m[0]; \
+ *(((long *) T)+1) = ((doubleget_union *)&V)->m[1];\
+ } while (0)
+#define float4get(V,M) do { *((float *) &(V)) = *((float*) (M)); } while(0)
+#define float8get(V,M) doubleget((V),(M))
+#define float4store(V,M) memcpy((uchar*)(V), (uchar*)(&M), sizeof(float))
+#define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V), sizeof(float))
+#define floatget(V,M) memcpy((uchar*)(&V),(uchar*) (M), sizeof(float))
+#define float8store(V,M) doublestore((V),(M))
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic_x86_64.h b/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic_x86_64.h
new file mode 100644
index 000000000..3287acdcf
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/byte_order_generic_x86_64.h
@@ -0,0 +1,84 @@
+/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Optimized function-like macros for the x86 architecture (_WIN32 included).
+*/
+#define sint2korr(A) (int16) (*((int16 *) (A)))
+#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])) : \
+ (((uint32) (uchar) (A)[2]) << 16) |\
+ (((uint32) (uchar) (A)[1]) << 8) | \
+ ((uint32) (uchar) (A)[0])))
+#define sint4korr(A) (int32) (*((int32 *) (A)))
+#define uint2korr(A) (uint16) (*((uint16 *) (A)))
+/*
+ Attention: Please, note, uint3korr reads 4 bytes (not 3)!
+ It means, that you have to provide enough allocated space.
+*/
+#if defined(HAVE_purify) && !defined(_WIN32)
+#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16))
+#else
+#define uint3korr(A) (uint32) (*((unsigned int *) (A)) & 0xFFFFFF)
+#endif
+#define uint4korr(A) (uint32) (*((uint32 *) (A)))
+#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
+ (((uint32) ((uchar) (A)[1])) << 8) +\
+ (((uint32) ((uchar) (A)[2])) << 16) +\
+ (((uint32) ((uchar) (A)[3])) << 24)) +\
+ (((ulonglong) ((uchar) (A)[4])) << 32))
+#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \
+ (((uint32) ((uchar) (A)[1])) << 8) + \
+ (((uint32) ((uchar) (A)[2])) << 16) + \
+ (((uint32) ((uchar) (A)[3])) << 24)) + \
+ (((ulonglong) ((uchar) (A)[4])) << 32) + \
+ (((ulonglong) ((uchar) (A)[5])) << 40))
+#define uint8korr(A) (ulonglong) (*((ulonglong *) (A)))
+#define sint8korr(A) (longlong) (*((longlong *) (A)))
+
+#define int2store(T,A) do { uchar *pT= (uchar*)(T);\
+ *((uint16*)(pT))= (uint16) (A);\
+ } while (0)
+
+#define int3store(T,A) do { *(T)= (uchar) ((A));\
+ *(T+1)=(uchar) (((uint) (A) >> 8));\
+ *(T+2)=(uchar) (((A) >> 16));\
+ } while (0)
+#define int4store(T,A) do { uchar *pT= (uchar*)(T);\
+ *((uint32 *) (pT))= (uint32) (A); \
+ } while (0)
+
+#define int5store(T,A) do { *(T)= (uchar)((A));\
+ *((T)+1)=(uchar) (((A) >> 8));\
+ *((T)+2)=(uchar) (((A) >> 16));\
+ *((T)+3)=(uchar) (((A) >> 24));\
+ *((T)+4)=(uchar) (((A) >> 32));\
+ } while(0)
+#define int6store(T,A) do { *(T)= (uchar)((A)); \
+ *((T)+1)=(uchar) (((A) >> 8)); \
+ *((T)+2)=(uchar) (((A) >> 16)); \
+ *((T)+3)=(uchar) (((A) >> 24)); \
+ *((T)+4)=(uchar) (((A) >> 32)); \
+ *((T)+5)=(uchar) (((A) >> 40)); \
+ } while(0)
+#define int8store(T,A) do { uchar *pT= (uchar*)(T);\
+ *((ulonglong *) (pT))= (ulonglong) (A);\
+ } while(0)
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/cmake_install.cmake b/BuildTools/centos/dep/mysql-5.6.14/include/cmake_install.cmake
new file mode 100644
index 000000000..44716de4e
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/cmake_install.cmake
@@ -0,0 +1,85 @@
+# Install script for directory: /media/psf/Home/Downloads/mysql-5.6.14/include
+
+# Set the install prefix
+IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+ SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql")
+ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+
+# Set the install configuration name.
+IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+ IF(BUILD_TYPE)
+ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+ CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+ ELSE(BUILD_TYPE)
+ SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo")
+ ENDIF(BUILD_TYPE)
+ MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+
+# Set the component getting installed.
+IF(NOT CMAKE_INSTALL_COMPONENT)
+ IF(COMPONENT)
+ MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
+ SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
+ ELSE(COMPONENT)
+ SET(CMAKE_INSTALL_COMPONENT)
+ ENDIF(COMPONENT)
+ENDIF(NOT CMAKE_INSTALL_COMPONENT)
+
+# Install shared libraries without execute permission?
+IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+ SET(CMAKE_INSTALL_SO_NO_EXE "1")
+ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+
+IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Development")
+ FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE FILE FILES
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql_com.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql_time.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_list.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_alloc.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/typelib.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql/plugin.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql/plugin_audit.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql/plugin_ftparser.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql/plugin_validate_password.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_dbug.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/m_string.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_sys.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_xml.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql_embed.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_pthread.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/decimal.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/errmsg.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_global.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_net.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_getopt.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/sslopt-longopts.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_dir.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/sslopt-vars.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/sslopt-case.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/sql_common.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/keycache.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/m_ctype.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_attribute.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_compiler.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql_com_server.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/my_byteorder.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/byte_order_generic.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/byte_order_generic_x86.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/byte_order_generic_x86_64.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/little_endian.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/include/big_endian.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/bl/include/mysql_version.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/bl/include/my_config.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/bl/include/mysqld_ername.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/bl/include/mysqld_error.h"
+ "/media/psf/Home/Downloads/mysql-5.6.14/bl/include/sql_state.h"
+ )
+ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Development")
+
+IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Development")
+ FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/mysql" TYPE DIRECTORY FILES "/media/psf/Home/Downloads/mysql-5.6.14/include/mysql/" REGEX "/[^/]*\\.h$" REGEX "/psi\\_abi[^/]*$" EXCLUDE)
+ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Development")
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/config.h b/BuildTools/centos/dep/mysql-5.6.14/include/config.h
new file mode 100644
index 000000000..1b3742866
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/config.h
@@ -0,0 +1,667 @@
+/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MY_CONFIG_H
+#define MY_CONFIG_H
+#define DOT_FRM_VERSION 6
+/* Headers we may want to use. */
+#define STDC_HEADERS 1
+#define _GNU_SOURCE 1
+#define HAVE_ALLOCA_H 1
+#define HAVE_AIO_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_ASM_MSR_H 1
+#define HAVE_ASM_TERMBITS_H 1
+#define HAVE_BSEARCH 1
+#define HAVE_CRYPT_H 1
+#define HAVE_CURSES_H 1
+/* #undef HAVE_CXXABI_H */
+/* #undef HAVE_NCURSES_H */
+/* #undef HAVE_NDIR_H */
+#define HAVE_DIRENT_H 1
+#define HAVE_DLFCN_H 1
+#define HAVE_EXECINFO_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FENV_H 1
+#define HAVE_FLOAT_H 1
+/* #undef HAVE_FLOATINGPOINT_H */
+#define HAVE_FNMATCH_H 1
+#define HAVE_FPU_CONTROL_H 1
+#define HAVE_GRP_H 1
+/* #undef HAVE_IA64INTRIN_H */
+/* #undef HAVE_IEEEFP_H */
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_PATHS_H 1
+#define HAVE_POLL_H 1
+/* #undef HAVE_PORT_H */
+#define HAVE_PWD_H 1
+#define HAVE_SCHED_H 1
+/* #undef HAVE_SELECT_H */
+/* #undef HAVE_SOLARIS_LARGE_PAGES */
+#define HAVE_STDDEF_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_SEMAPHORE_H 1
+/* #undef HAVE_SYNCH_H */
+/* #undef HAVE_SYSENT_H */
+#define HAVE_SYS_DIR_H 1
+#define HAVE_SYS_CDEFS_H 1
+#define HAVE_SYS_FILE_H 1
+/* #undef HAVE_SYS_FPU_H */
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_IPC_H 1
+/* #undef HAVE_SYS_MALLOC_H */
+#define HAVE_SYS_MMAN_H 1
+/* #undef HAVE_SYS_NDIR_H */
+/* #undef HAVE_SYS_PTE_H */
+/* #undef HAVE_SYS_PTEM_H */
+#define HAVE_SYS_PRCTL_H 1
+#define HAVE_SYS_RESOURCE_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_SHM_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_STAT_H 1
+/* #undef HAVE_SYS_STREAM_H */
+/* #undef HAVE_SYS_TERMCAP_H */
+#define HAVE_SYS_TIMEB_H 1
+#define HAVE_SYS_TIMES_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_UN_H 1
+/* #undef HAVE_SYS_VADVISE_H */
+/* #undef HAVE_TERM_H */
+/* #undef HAVE_TERMBITS_H */
+#define HAVE_TERMIOS_H 1
+#define HAVE_TERMIO_H 1
+/* #undef HAVE_TERMCAP_H */
+#define HAVE_TIME_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UTIME_H 1
+/* #undef HAVE_VARARGS_H */
+/* #undef HAVE_VIS_H */
+/* #undef HAVE_SYS_UTIME_H */
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_SYS_PARAM_H 1
+
+/* Libraries */
+/* #undef HAVE_LIBPTHREAD */
+#define HAVE_LIBM 1
+#define HAVE_LIBDL 1
+/* #undef HAVE_LIBRT */
+/* #undef HAVE_LIBSOCKET */
+/* #undef HAVE_LIBNSL */
+#define HAVE_LIBCRYPT 1
+/* #undef HAVE_LIBMTMALLOC */
+/* #undef HAVE_LIBWRAP */
+/* #undef HAVE_LIBRESOLV */
+/* Does "struct timespec" have a "sec" and "nsec" field? */
+/* #undef HAVE_TIMESPEC_TS_SEC */
+
+/* Readline */
+#define HAVE_HIST_ENTRY 1
+#define USE_LIBEDIT_INTERFACE 1
+
+#define FIONREAD_IN_SYS_IOCTL 1
+#define GWINSZ_IN_SYS_IOCTL 1
+/* #undef TIOCSTAT_IN_SYS_IOCTL */
+/* #undef FIONREAD_IN_SYS_FILIO */
+
+/* Functions we may want to use. */
+/* #undef HAVE_ALIGNED_MALLOC */
+/* #undef HAVE_ALIGNED_FREE */
+/* #undef HAVE_AIOWAIT */
+#define HAVE_ALARM 1
+#define HAVE_ALLOCA 1
+/* #undef HAVE_BMOVE */
+#define HAVE_INDEX 1
+#define HAVE_CHOWN 1
+#define HAVE_CLOCK_GETTIME 1
+#define HAVE_CRYPT 1
+#define HAVE_CUSERID 1
+/* #undef HAVE_DIRECTIO */
+#define HAVE_DLERROR 1
+#define HAVE_DLOPEN 1
+/* #undef HAVE_DOPRNT */
+#define HAVE_FCHMOD 1
+#define HAVE_FCNTL 1
+/* #undef HAVE_FCONVERT */
+#define HAVE_FDATASYNC 1
+#define HAVE_FESETROUND 1
+#define HAVE_FINITE 1
+/* #undef HAVE_FP_EXCEPT */
+/* #undef HAVE_FPSETMASK */
+#define HAVE_FSEEKO 1
+#define HAVE_FSYNC 1
+#define HAVE_FTIME 1
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETCWD 1
+#define HAVE_GETHOSTBYADDR_R 1
+/* #undef HAVE_GETHRTIME */
+#define HAVE_GETLINE 1
+#define HAVE_GETNAMEINFO 1
+#define HAVE_GETPAGESIZE 1
+#define HAVE_GETPASS 1
+/* #undef HAVE_GETPASSPHRASE */
+#define HAVE_GETPWNAM 1
+#define HAVE_GETPWUID 1
+#define HAVE_GETRLIMIT 1
+#define HAVE_GETRUSAGE 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_GETWD 1
+#define HAVE_GMTIME_R 1
+/* #undef gmtime_r */
+#define HAVE_INITGROUPS 1
+/* #undef HAVE_ISSETUGID */
+#define HAVE_GETUID 1
+#define HAVE_GETEUID 1
+#define HAVE_GETGID 1
+#define HAVE_GETEGID 1
+#define HAVE_ISNAN 1
+#define HAVE_ISINF 1
+#define HAVE_LARGE_PAGE_OPTION 1
+#define HAVE_LDIV 1
+#define HAVE_LRAND48 1
+#define HAVE_LOCALTIME_R 1
+#define HAVE_LOG2 1
+#define HAVE_LONGJMP 1
+#define HAVE_LSTAT 1
+#define HAVE_MEMALIGN 1
+/* #define HAVE_MLOCK 1 see Bug#54662 */
+#define HAVE_NPTL 1
+#define HAVE_NL_LANGINFO 1
+#define HAVE_MADVISE 1
+#define HAVE_DECL_MADVISE 1
+#define HAVE_DECL_TGOTO 1
+/* #undef HAVE_DECL_MHA_MAPSIZE_VA */
+#define HAVE_MALLOC_INFO 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MKSTEMP 1
+#define HAVE_MLOCKALL 1
+#define HAVE_MMAP 1
+#define HAVE_MMAP64 1
+#define HAVE_PERROR 1
+#define HAVE_POLL 1
+/* #undef HAVE_PORT_CREATE */
+#define HAVE_POSIX_FALLOCATE 1
+#define HAVE_POSIX_MEMALIGN 1
+#define HAVE_PREAD 1
+#define HAVE_PAUSE_INSTRUCTION 1
+/* #undef HAVE_FAKE_PAUSE_INSTRUCTION */
+/* #undef HAVE_RDTSCLL */
+/* #undef HAVE_READ_REAL_TIME */
+/* #undef HAVE_PTHREAD_ATTR_CREATE */
+#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
+#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
+/* #undef HAVE_PTHREAD_ATTR_SETPRIO */
+/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
+#define HAVE_PTHREAD_ATTR_SETSCOPE 1
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
+#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+#define HAVE_PTHREAD_KEY_DELETE 1
+#define HAVE_PTHREAD_KEY_DELETE 1
+/* #undef HAVE_PTHREAD_KILL */
+#define HAVE_PTHREAD_RWLOCK_RDLOCK 1
+/* #undef HAVE_PTHREAD_SETPRIO_NP */
+/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
+#define HAVE_PTHREAD_SIGMASK 1
+/* #undef HAVE_PTHREAD_THREADMASK */
+/* #undef HAVE_PTHREAD_YIELD_NP */
+#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
+#define PTHREAD_ONCE_INITIALIZER PTHREAD_ONCE_INIT
+#define HAVE_PUTENV 1
+#define HAVE_RE_COMP 1
+#define HAVE_REGCOMP 1
+#define HAVE_READDIR_R 1
+#define HAVE_READLINK 1
+#define HAVE_REALPATH 1
+#define HAVE_RENAME 1
+#define HAVE_RINT 1
+/* #undef HAVE_RWLOCK_INIT */
+#define HAVE_SCHED_YIELD 1
+#define HAVE_SELECT 1
+/* #undef HAVE_SETFD */
+#define HAVE_SETENV 1
+#define HAVE_SETLOCALE 1
+#define HAVE_SIGADDSET 1
+#define HAVE_SIGEMPTYSET 1
+#define HAVE_SIGHOLD 1
+#define HAVE_SIGSET 1
+#define HAVE_SIGSET_T 1
+#define HAVE_SIGACTION 1
+/* #undef HAVE_SIGTHREADMASK */
+#define HAVE_SIGWAIT 1
+#define HAVE_SLEEP 1
+#define HAVE_SNPRINTF 1
+#define HAVE_STPCPY 1
+#define HAVE_STRERROR 1
+#define HAVE_STRCOLL 1
+#define HAVE_STRSIGNAL 1
+/* #undef HAVE_STRLCPY */
+/* #undef HAVE_STRLCAT */
+/* #undef HAVE_FGETLN */
+#define HAVE_STRNLEN 1
+#define HAVE_STRPBRK 1
+#define HAVE_STRSEP 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOK_R 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOULL 1
+#define HAVE_SHMAT 1
+#define HAVE_SHMCTL 1
+#define HAVE_SHMDT 1
+#define HAVE_SHMGET 1
+/* #undef HAVE_TELL */
+#define HAVE_TEMPNAM 1
+/* #undef HAVE_THR_SETCONCURRENCY */
+/* #undef HAVE_THR_YIELD */
+#define HAVE_TIME 1
+#define HAVE_TIMES 1
+#define HAVE_VALLOC 1
+#define HAVE_VIO_READ_BUFF 1
+#define HAVE_VASPRINTF 1
+#define HAVE_VPRINTF 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_FTRUNCATE 1
+#define HAVE_TZNAME 1
+/* #undef HAVE_AIO_READ */
+/* Symbols we may use */
+/* used by stacktrace functions */
+#define HAVE_BSS_START 1
+#define HAVE_BACKTRACE 1
+#define HAVE_BACKTRACE_SYMBOLS 1
+#define HAVE_BACKTRACE_SYMBOLS_FD 1
+/* #undef HAVE_PRINTSTACK */
+#define HAVE_STRUCT_SOCKADDR_IN6 1
+#define HAVE_STRUCT_IN6_ADDR 1
+/* #undef HAVE_NETINET_IN6_H */
+#define HAVE_IPV6 1
+/* #undef ss_family */
+/* #undef HAVE_SOCKADDR_IN_SIN_LEN */
+/* #undef HAVE_SOCKADDR_IN6_SIN6_LEN */
+/* #undef HAVE_TIMESPEC_TS_SEC */
+#define STRUCT_DIRENT_HAS_D_INO 1
+/* #undef STRUCT_DIRENT_HAS_D_NAMLEN */
+#define SPRINTF_RETURNS_INT 1
+
+#define DNS_USE_CPU_CLOCK_FOR_ID 1
+#define HAVE_EPOLL 1
+#define HAVE_EPOLL_CTL 1
+/* #undef HAVE_EVENT_PORTS */
+#define HAVE_INET_NTOP 1
+/* #undef HAVE_KQUEUE */
+/* #undef HAVE_WORKING_KQUEUE */
+#define HAVE_SIGNAL 1
+#define HAVE_TIMERADD 1
+#define HAVE_TIMERCLEAR 1
+#define HAVE_TIMERCMP 1
+#define HAVE_TIMERISSET 1
+
+/* #undef HAVE_DEVPOLL */
+#define HAVE_SIGNAL_H 1
+/* #undef HAVE_SYS_DEVPOLL_H */
+#define HAVE_SYS_EPOLL_H 1
+/* #undef HAVE_SYS_EVENT_H */
+#define HAVE_SYS_QUEUE_H 1
+#define HAVE_TAILQFOREACH 1
+#define USE_MB 1
+#define USE_MB_IDENT 1
+
+/* #undef HAVE_VALGRIND */
+
+/* Types we may use */
+#ifdef __APPLE__
+ /*
+ Special handling required for OSX to support universal binaries that
+ mix 32 and 64 bit architectures.
+ */
+ #if(__LP64__)
+ #define SIZEOF_LONG 8
+ #else
+ #define SIZEOF_LONG 4
+ #endif
+ #define SIZEOF_VOIDP SIZEOF_LONG
+ #define SIZEOF_CHARP SIZEOF_LONG
+ #define SIZEOF_SIZE_T SIZEOF_LONG
+#else
+/* No indentation, to fetch the lines from verification scripts */
+#define SIZEOF_LONG 8
+#define SIZEOF_VOIDP 8
+#define SIZEOF_CHARP 8
+#define SIZEOF_SIZE_T 8
+#endif
+
+#define SIZEOF_CHAR 1
+#define HAVE_CHAR 1
+#define HAVE_LONG 1
+#define HAVE_CHARP 1
+#define SIZEOF_SHORT 2
+#define HAVE_SHORT 1
+#define SIZEOF_INT 4
+#define HAVE_INT 1
+#define SIZEOF_LONG_LONG 8
+#define HAVE_LONG_LONG 1
+#define SIZEOF_OFF_T 8
+#define HAVE_OFF_T 1
+#define SIZEOF_SIGSET_T 128
+#define HAVE_SIGSET_T 1
+#define HAVE_SIZE_T 1
+/* #undef SIZEOF_UCHAR */
+/* #undef HAVE_UCHAR */
+#define SIZEOF_UINT 4
+#define HAVE_UINT 1
+#define SIZEOF_ULONG 8
+#define HAVE_ULONG 1
+/* #undef SIZEOF_INT8 */
+/* #undef HAVE_INT8 */
+/* #undef SIZEOF_UINT8 */
+/* #undef HAVE_UINT8 */
+/* #undef SIZEOF_INT16 */
+/* #undef HAVE_INT16 */
+/* #undef SIZEOF_UINT16 */
+/* #undef HAVE_UINT16 */
+/* #undef SIZEOF_INT32 */
+/* #undef HAVE_INT32 */
+/* #undef SIZEOF_UINT32 */
+/* #undef HAVE_UINT32 */
+#define SIZEOF_U_INT32_T 4
+#define HAVE_U_INT32_T 1
+/* #undef SIZEOF_INT64 */
+/* #undef HAVE_INT64 */
+/* #undef SIZEOF_UINT64 */
+/* #undef HAVE_UINT64 */
+/* #undef SIZEOF_BOOL */
+/* #undef HAVE_BOOL */
+
+#define SOCKET_SIZE_TYPE socklen_t
+
+#define HAVE_MBSTATE_T
+
+#define MAX_INDEXES 64U
+
+#define QSORT_TYPE_IS_VOID 1
+#define RETQSORTTYPE void
+
+#define SIGNAL_RETURN_TYPE_IS_VOID 1
+#define RETSIGTYPE void
+#define VOID_SIGHANDLER 1
+#define STRUCT_RLIMIT struct rlimit
+
+#ifdef __APPLE__
+ #if __BIG_ENDIAN
+ #define WORDS_BIGENDIAN 1
+ #endif
+#else
+/* #undef WORDS_BIGENDIAN */
+#endif
+
+/*
+ Define to `__inline__' or `__inline' if that's what the C compiler calls it.
+*/
+#define C_HAS_inline 1
+#if !(C_HAS_inline)
+#ifndef __cplusplus
+# define inline
+#endif
+#endif
+
+
+#define TARGET_OS_LINUX 1
+
+#define HAVE_WCTYPE_H 1
+#define HAVE_WCHAR_H 1
+#define HAVE_LANGINFO_H 1
+#define HAVE_MBRLEN
+/* #undef HAVE_MBSCMP */
+#define HAVE_MBSRTOWCS
+#define HAVE_WCRTOMB
+#define HAVE_MBRTOWC
+#define HAVE_WCSCOLL
+#define HAVE_WCSDUP
+#define HAVE_WCWIDTH
+#define HAVE_WCTYPE
+#define HAVE_ISWLOWER 1
+#define HAVE_ISWUPPER 1
+#define HAVE_TOWLOWER 1
+#define HAVE_TOWUPPER 1
+#define HAVE_ISWCTYPE 1
+#define HAVE_WCHAR_T 1
+#define HAVE_WCTYPE_T 1
+#define HAVE_WINT_T 1
+
+
+#define HAVE_STRCASECMP 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_STRDUP 1
+#define HAVE_LANGINFO_CODESET
+#define HAVE_TCGETATTR 1
+#define HAVE_FLOCKFILE 1
+
+#define HAVE_WEAK_SYMBOL 1
+/* #undef HAVE_ABI_CXA_DEMANGLE */
+
+
+#define HAVE_POSIX_SIGNALS 1
+/* #undef HAVE_BSD_SIGNALS */
+/* #undef HAVE_SVR3_SIGNALS */
+/* #undef HAVE_V7_SIGNALS */
+
+
+/* #undef HAVE_SOLARIS_STYLE_GETHOST */
+
+/* #undef MY_ATOMIC_MODE_DUMMY */
+/* #undef MY_ATOMIC_MODE_RWLOCKS */
+#define HAVE_GCC_ATOMIC_BUILTINS 1
+/* #undef HAVE_SOLARIS_ATOMIC */
+#define HAVE_DECL_SHM_HUGETLB 1
+#define HAVE_LARGE_PAGES 1
+#define HUGETLB_USE_PROC_MEMINFO 1
+/* #undef NO_FCNTL_NONBLOCK */
+/* #undef NO_ALARM */
+
+/* #undef _LARGE_FILES */
+#define _LARGEFILE_SOURCE 1
+/* #undef _LARGEFILE64_SOURCE */
+#define _FILE_OFFSET_BITS 64
+
+#define TIME_WITH_SYS_TIME 1
+
+#define STACK_DIRECTION -1
+
+#define SYSTEM_TYPE "Linux"
+#define MACHINE_TYPE "x86_64"
+/* #undef HAVE_DTRACE */
+
+#define SIGNAL_WITH_VIO_SHUTDOWN 1
+
+/* Windows stuff, mostly functions, that have Posix analogs but named differently */
+/* #undef S_IROTH */
+/* #undef S_IFIFO */
+/* #undef IPPROTO_IPV6 */
+/* #undef IPV6_V6ONLY */
+/* #undef sigset_t */
+/* #undef mode_t */
+/* #undef SIGQUIT */
+/* #undef SIGPIPE */
+/* #undef isnan */
+/* #undef finite */
+/* #undef popen */
+/* #undef pclose */
+/* #undef ssize_t */
+/* #undef strcasecmp */
+/* #undef strncasecmp */
+/* #undef snprintf */
+/* #undef strtok_r */
+/* #undef strtoll */
+/* #undef strtoull */
+/* #undef vsnprintf */
+#if (_MSC_VER > 1310)
+# define HAVE_SETENV
+#define setenv(a,b,c) _putenv_s(a,b)
+#endif
+/* We don't want the min/max macros */
+#ifdef __WIN__
+#define NOMINMAX
+#endif
+
+/*
+ Memcached config options
+*/
+/* #undef WITH_INNODB_MEMCACHED */
+/* #undef ENABLE_MEMCACHED_SASL */
+/* #undef ENABLE_MEMCACHED_SASL_PWDB */
+/* #undef HAVE_SASL_SASL_H */
+/* #undef HAVE_HTONLL */
+
+/*
+ MySQL features
+*/
+#define ENABLED_LOCAL_INFILE 1
+#define ENABLED_PROFILING 1
+/* #undef EXTRA_DEBUG */
+/* #undef BACKUP_TEST */
+/* #undef CYBOZU */
+#define OPTIMIZER_TRACE 1
+/* #undef USE_SYMDIR */
+
+/*
+ InnoDB config options
+*/
+#define INNODB_COMPILER_HINTS
+
+/* Character sets and collations */
+#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
+#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
+
+#define USE_MB 1
+#define USE_MB_IDENT 1
+/* #undef USE_STRCOLL */
+
+/* This should mean case insensitive file system */
+/* #undef FN_NO_CASE_SENSE */
+
+#define HAVE_CHARSET_armscii8 1
+#define HAVE_CHARSET_ascii 1
+#define HAVE_CHARSET_big5 1
+#define HAVE_CHARSET_cp1250 1
+#define HAVE_CHARSET_cp1251 1
+#define HAVE_CHARSET_cp1256 1
+#define HAVE_CHARSET_cp1257 1
+#define HAVE_CHARSET_cp850 1
+#define HAVE_CHARSET_cp852 1
+#define HAVE_CHARSET_cp866 1
+#define HAVE_CHARSET_cp932 1
+#define HAVE_CHARSET_dec8 1
+#define HAVE_CHARSET_eucjpms 1
+#define HAVE_CHARSET_euckr 1
+#define HAVE_CHARSET_gb2312 1
+#define HAVE_CHARSET_gbk 1
+#define HAVE_CHARSET_geostd8 1
+#define HAVE_CHARSET_greek 1
+#define HAVE_CHARSET_hebrew 1
+#define HAVE_CHARSET_hp8 1
+#define HAVE_CHARSET_keybcs2 1
+#define HAVE_CHARSET_koi8r 1
+#define HAVE_CHARSET_koi8u 1
+#define HAVE_CHARSET_latin1 1
+#define HAVE_CHARSET_latin2 1
+#define HAVE_CHARSET_latin5 1
+#define HAVE_CHARSET_latin7 1
+#define HAVE_CHARSET_macce 1
+#define HAVE_CHARSET_macroman 1
+#define HAVE_CHARSET_sjis 1
+#define HAVE_CHARSET_swe7 1
+#define HAVE_CHARSET_tis620 1
+#define HAVE_CHARSET_ucs2 1
+#define HAVE_CHARSET_ujis 1
+#define HAVE_CHARSET_utf8mb4 1
+/* #undef HAVE_CHARSET_utf8mb3 */
+#define HAVE_CHARSET_utf8 1
+#define HAVE_CHARSET_utf16 1
+#define HAVE_CHARSET_utf32 1
+#define HAVE_UCA_COLLATIONS 1
+#define HAVE_COMPRESS 1
+/* #undef COMPILE_FLAG_WERROR */
+
+/*
+ Stuff that always need to be defined (compile breaks without it)
+*/
+#define HAVE_SPATIAL 1
+#define HAVE_RTREE_KEYS 1
+#define HAVE_QUERY_CACHE 1
+#define BIG_TABLES 1
+
+/*
+ Important storage engines (those that really need define
+ WITH__STORAGE_ENGINE for the whole server)
+*/
+#define WITH_MYISAM_STORAGE_ENGINE 1
+#define WITH_MYISAMMRG_STORAGE_ENGINE 1
+#define WITH_HEAP_STORAGE_ENGINE 1
+#define WITH_CSV_STORAGE_ENGINE 1
+#define WITH_PARTITION_STORAGE_ENGINE 1
+#define WITH_PERFSCHEMA_STORAGE_ENGINE 1
+/* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */
+#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
+# define HAVE_NDB_BINLOG 1
+#endif
+
+#define DEFAULT_MYSQL_HOME "/usr/local/mysql"
+#define SHAREDIR "/usr/local/mysql/share"
+#define DEFAULT_BASEDIR "/usr/local/mysql"
+#define MYSQL_DATADIR "/usr/local/mysql/data"
+#define DEFAULT_CHARSET_HOME "/usr/local/mysql"
+#define PLUGINDIR "/usr/local/mysql/lib/plugin"
+#define DEFAULT_SYSCONFDIR "/usr/local/mysql/etc"
+
+/* #undef SO_EXT */
+
+#define MYSQL_VERSION_MAJOR 5
+#define MYSQL_VERSION_MINOR 6
+#define MYSQL_VERSION_PATCH 14
+#define MYSQL_VERSION_EXTRA ""
+
+#define PACKAGE "mysql"
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_NAME "MySQL Server"
+#define PACKAGE_STRING "MySQL Server 5.6.14"
+#define PACKAGE_TARNAME "mysql"
+#define PACKAGE_VERSION "5.6.14"
+#define VERSION "5.6.14"
+#define PROTOCOL_VERSION 10
+
+
+/* time_t related defines */
+
+#define SIZEOF_TIME_T 8
+/* #undef TIME_T_UNSIGNED */
+
+/* CPU information */
+
+#define CPU_LEVEL1_DCACHE_LINESIZE 64
+
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/crypt_genhash_impl.h b/BuildTools/centos/dep/mysql-5.6.14/include/crypt_genhash_impl.h
new file mode 100644
index 000000000..828cf1984
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/crypt_genhash_impl.h
@@ -0,0 +1,33 @@
+#ifndef CRYPT_HASHGEN_IMPL_H
+#define CRYPT_HASHGEN_IMPL_H
+#define ROUNDS_DEFAULT 5000
+#define ROUNDS_MIN 1000
+#define ROUNDS_MAX 999999999
+#define MIXCHARS 32
+#define CRYPT_SALT_LENGTH 20
+#define CRYPT_MAGIC_LENGTH 3
+#define CRYPT_PARAM_LENGTH 13
+#define SHA256_HASH_LENGTH 43
+#define CRYPT_MAX_PASSWORD_SIZE (CRYPT_SALT_LENGTH + \
+ SHA256_HASH_LENGTH + \
+ CRYPT_MAGIC_LENGTH + \
+ CRYPT_PARAM_LENGTH)
+
+#include
+#include
+
+int extract_user_salt(char **salt_begin,
+ char **salt_end);
+C_MODE_START
+char *
+my_crypt_genhash(char *ctbuffer,
+ size_t ctbufflen,
+ const char *plaintext,
+ int plaintext_len,
+ const char *switchsalt,
+ const char **params);
+void generate_user_salt(char *buffer, int buffer_len);
+void xor_string(char *to, int to_len, char *pattern, int pattern_len);
+
+C_MODE_END
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/decimal.h b/BuildTools/centos/dep/mysql-5.6.14/include/decimal.h
new file mode 100644
index 000000000..07f408c7c
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/decimal.h
@@ -0,0 +1,138 @@
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _decimal_h
+#define _decimal_h
+
+typedef enum
+{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
+ decimal_round_mode;
+typedef int32 decimal_digit_t;
+
+/**
+ intg is the number of *decimal* digits (NOT number of decimal_digit_t's !)
+ before the point
+ frac is the number of decimal digits after the point
+ len is the length of buf (length of allocated space) in decimal_digit_t's,
+ not in bytes
+ sign false means positive, true means negative
+ buf is an array of decimal_digit_t's
+ */
+typedef struct st_decimal_t {
+ int intg, frac, len;
+ my_bool sign;
+ decimal_digit_t *buf;
+} decimal_t;
+
+int internal_str2dec(const char *from, decimal_t *to, char **end,
+ my_bool fixed);
+int decimal2string(const decimal_t *from, char *to, int *to_len,
+ int fixed_precision, int fixed_decimals,
+ char filler);
+int decimal2ulonglong(decimal_t *from, ulonglong *to);
+int ulonglong2decimal(ulonglong from, decimal_t *to);
+int decimal2longlong(decimal_t *from, longlong *to);
+int longlong2decimal(longlong from, decimal_t *to);
+int decimal2double(const decimal_t *from, double *to);
+int double2decimal(double from, decimal_t *to);
+int decimal_actual_fraction(decimal_t *from);
+int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
+int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale);
+
+/**
+ Convert decimal to lldiv_t.
+ The integer part is stored in to->quot.
+ The fractional part is multiplied to 10^9 and stored to to->rem.
+ @param from Decimal value
+ @param to lldiv_t value
+ @retval 0 on success
+ @retval !0 in error
+*/
+int decimal2lldiv_t(const decimal_t *from, lldiv_t *to);
+
+/**
+ Convert doube to lldiv_t.
+ The integer part is stored in to->quot.
+ The fractional part is multiplied to 10^9 and stored to to->rem.
+ @param from Decimal value
+ @param to lldiv_t value
+ @retval 0 on success
+ @retval !0 in error
+*/
+
+int double2lldiv_t(double from, lldiv_t *to);
+int decimal_size(int precision, int scale);
+int decimal_bin_size(int precision, int scale);
+int decimal_result_size(decimal_t *from1, decimal_t *from2, char op,
+ int param);
+
+int decimal_intg(const decimal_t *from);
+int decimal_add(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_sub(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_cmp(const decimal_t *from1, const decimal_t *from2);
+int decimal_mul(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_div(const decimal_t *from1, const decimal_t *from2, decimal_t *to,
+ int scale_incr);
+int decimal_mod(const decimal_t *from1, const decimal_t *from2, decimal_t *to);
+int decimal_round(const decimal_t *from, decimal_t *to, int new_scale,
+ decimal_round_mode mode);
+int decimal_is_zero(const decimal_t *from);
+void max_decimal(int precision, int frac, decimal_t *to);
+
+#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
+#define string2decimal_fixed(A,B,C) internal_str2dec((A), (B), (C), 1)
+
+/* set a decimal_t to zero */
+
+#define decimal_make_zero(dec) do { \
+ (dec)->buf[0]=0; \
+ (dec)->intg=1; \
+ (dec)->frac=0; \
+ (dec)->sign=0; \
+ } while(0)
+
+/*
+ returns the length of the buffer to hold string representation
+ of the decimal (including decimal dot, possible sign and \0)
+*/
+
+#define decimal_string_size(dec) (((dec)->intg ? (dec)->intg : 1) + \
+ (dec)->frac + ((dec)->frac > 0) + 2)
+
+/* negate a decimal */
+#define decimal_neg(dec) do { (dec)->sign^=1; } while(0)
+
+/*
+ conventions:
+
+ decimal_smth() == 0 -- everything's ok
+ decimal_smth() <= 1 -- result is usable, but precision loss is possible
+ decimal_smth() <= 2 -- result can be unusable, most significant digits
+ could've been lost
+ decimal_smth() > 2 -- no result was generated
+*/
+
+#define E_DEC_OK 0
+#define E_DEC_TRUNCATED 1
+#define E_DEC_OVERFLOW 2
+#define E_DEC_DIV_ZERO 4
+#define E_DEC_BAD_NUM 8
+#define E_DEC_OOM 16
+
+#define E_DEC_ERROR 31
+#define E_DEC_FATAL_ERROR 30
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/errmsg.h b/BuildTools/centos/dep/mysql-5.6.14/include/errmsg.h
new file mode 100644
index 000000000..598a7c6f4
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/errmsg.h
@@ -0,0 +1,110 @@
+#ifndef ERRMSG_INCLUDED
+#define ERRMSG_INCLUDED
+
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* Error messages for MySQL clients */
+/* (Error messages for the daemon are in sql/share/errmsg.txt) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void init_client_errs(void);
+void finish_client_errs(void);
+extern const char *client_errors[]; /* Error messages */
+#ifdef __cplusplus
+}
+#endif
+
+#define CR_MIN_ERROR 2000 /* For easier client code */
+#define CR_MAX_ERROR 2999
+#if !defined(ER)
+#define ER(X) client_errors[(X)-CR_MIN_ERROR]
+#endif
+#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
+
+/* Do not add error numbers before CR_ERROR_FIRST. */
+/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
+#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/
+#define CR_UNKNOWN_ERROR 2000
+#define CR_SOCKET_CREATE_ERROR 2001
+#define CR_CONNECTION_ERROR 2002
+#define CR_CONN_HOST_ERROR 2003
+#define CR_IPSOCK_ERROR 2004
+#define CR_UNKNOWN_HOST 2005
+#define CR_SERVER_GONE_ERROR 2006
+#define CR_VERSION_ERROR 2007
+#define CR_OUT_OF_MEMORY 2008
+#define CR_WRONG_HOST_INFO 2009
+#define CR_LOCALHOST_CONNECTION 2010
+#define CR_TCP_CONNECTION 2011
+#define CR_SERVER_HANDSHAKE_ERR 2012
+#define CR_SERVER_LOST 2013
+#define CR_COMMANDS_OUT_OF_SYNC 2014
+#define CR_NAMEDPIPE_CONNECTION 2015
+#define CR_NAMEDPIPEWAIT_ERROR 2016
+#define CR_NAMEDPIPEOPEN_ERROR 2017
+#define CR_NAMEDPIPESETSTATE_ERROR 2018
+#define CR_CANT_READ_CHARSET 2019
+#define CR_NET_PACKET_TOO_LARGE 2020
+#define CR_EMBEDDED_CONNECTION 2021
+#define CR_PROBE_SLAVE_STATUS 2022
+#define CR_PROBE_SLAVE_HOSTS 2023
+#define CR_PROBE_SLAVE_CONNECT 2024
+#define CR_PROBE_MASTER_CONNECT 2025
+#define CR_SSL_CONNECTION_ERROR 2026
+#define CR_MALFORMED_PACKET 2027
+#define CR_WRONG_LICENSE 2028
+
+/* new 4.1 error codes */
+#define CR_NULL_POINTER 2029
+#define CR_NO_PREPARE_STMT 2030
+#define CR_PARAMS_NOT_BOUND 2031
+#define CR_DATA_TRUNCATED 2032
+#define CR_NO_PARAMETERS_EXISTS 2033
+#define CR_INVALID_PARAMETER_NO 2034
+#define CR_INVALID_BUFFER_USE 2035
+#define CR_UNSUPPORTED_PARAM_TYPE 2036
+
+#define CR_SHARED_MEMORY_CONNECTION 2037
+#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038
+#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039
+#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
+#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041
+#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
+#define CR_SHARED_MEMORY_MAP_ERROR 2043
+#define CR_SHARED_MEMORY_EVENT_ERROR 2044
+#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
+#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
+#define CR_CONN_UNKNOW_PROTOCOL 2047
+#define CR_INVALID_CONN_HANDLE 2048
+#define CR_SECURE_AUTH 2049
+#define CR_FETCH_CANCELED 2050
+#define CR_NO_DATA 2051
+#define CR_NO_STMT_METADATA 2052
+#define CR_NO_RESULT_SET 2053
+#define CR_NOT_IMPLEMENTED 2054
+#define CR_SERVER_LOST_EXTENDED 2055
+#define CR_STMT_CLOSED 2056
+#define CR_NEW_STMT_METADATA 2057
+#define CR_ALREADY_CONNECTED 2058
+#define CR_AUTH_PLUGIN_CANNOT_LOAD 2059
+#define CR_DUPLICATE_CONNECTION_ATTR 2060
+#define CR_AUTH_PLUGIN_ERR 2061
+#define CR_ERROR_LAST /*Copy last error nr:*/ 2061
+/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
+
+#endif /* ERRMSG_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/ft_global.h b/BuildTools/centos/dep/mysql-5.6.14/include/ft_global.h
new file mode 100644
index 000000000..06ef4ecda
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/ft_global.h
@@ -0,0 +1,95 @@
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
+
+/* some definitions for full-text indices */
+
+/* #include "myisam.h" */
+
+#ifndef _ft_global_h
+#define _ft_global_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define HA_FT_MAXBYTELEN 254
+#define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)
+
+#define DEFAULT_FTB_SYNTAX "+ -><()~*:\"\"&|"
+
+typedef struct st_ft_info FT_INFO;
+struct _ft_vft
+{
+ int (*read_next)(FT_INFO *, char *);
+ float (*find_relevance)(FT_INFO *, uchar *, uint);
+ void (*close_search)(FT_INFO *);
+ float (*get_relevance)(FT_INFO *);
+ void (*reinit_search)(FT_INFO *);
+};
+
+typedef struct st_ft_info_ext FT_INFO_EXT;
+struct _ft_vft_ext
+{
+ uint (*get_version)(); // Extended API version
+ ulonglong (*get_flags)();
+ ulonglong (*get_docid)(FT_INFO_EXT *);
+ ulonglong (*count_matches)(FT_INFO_EXT *);
+};
+
+/* Flags for extended FT API */
+#define FTS_ORDERED_RESULT (LL(1) << 1)
+#define FTS_DOCID_IN_RESULT (LL(1) << 2)
+
+#define FTS_DOC_ID_COL_NAME "FTS_DOC_ID"
+
+#ifndef FT_CORE
+struct st_ft_info
+{
+ struct _ft_vft *please; /* INTERCAL style :-) */
+};
+
+struct st_ft_info_ext
+{
+ struct _ft_vft *please; /* INTERCAL style :-) */
+ struct _ft_vft_ext *could_you;
+};
+#endif
+
+extern const char *ft_stopword_file;
+extern const char *ft_precompiled_stopwords[];
+
+extern ulong ft_min_word_len;
+extern ulong ft_max_word_len;
+extern ulong ft_query_expansion_limit;
+extern const char *ft_boolean_syntax;
+extern struct st_mysql_ftparser ft_default_parser;
+
+int ft_init_stopwords(void);
+void ft_free_stopwords(void);
+
+#define FT_NL 0
+#define FT_BOOL 1
+#define FT_SORTED 2
+#define FT_EXPAND 4 /* query expansion */
+
+FT_INFO *ft_init_search(uint,void *, uint, uchar *, uint,
+ const CHARSET_INFO *, uchar *);
+my_bool ft_boolean_check_syntax_string(const uchar *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/hash.h b/BuildTools/centos/dep/mysql-5.6.14/include/hash.h
new file mode 100644
index 000000000..b3a0b5cf4
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/hash.h
@@ -0,0 +1,108 @@
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* Dynamic hashing of record with different key-length */
+
+#ifndef _hash_h
+#define _hash_h
+
+#include "my_global.h" /* uchar */
+#include "my_sys.h" /* DYNAMIC_ARRAY */
+
+/*
+ This forward declaration is used from C files where the real
+ definition is included before. Since C does not allow repeated
+ typedef declarations, even when identical, the definition may not be
+ repeated.
+*/
+#ifndef CHARSET_INFO_DEFINED
+#define CHARSET_INFO_DEFINED
+typedef struct charset_info_st CHARSET_INFO;
+#endif /* CHARSET_INFO_DEFINED */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ Overhead to store an element in hash
+ Can be used to approximate memory consumption for a hash
+ */
+#define HASH_OVERHEAD (sizeof(char*)*2)
+
+/* flags for hash_init */
+#define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */
+
+typedef uint my_hash_value_type;
+typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool);
+typedef void (*my_hash_free_key)(void *);
+
+typedef struct st_hash {
+ size_t key_offset,key_length; /* Length of key if const length */
+ size_t blength;
+ ulong records;
+ uint flags;
+ DYNAMIC_ARRAY array; /* Place for hash_keys */
+ my_hash_get_key get_key;
+ void (*free)(void *);
+ CHARSET_INFO *charset;
+} HASH;
+
+/* A search iterator state */
+typedef uint HASH_SEARCH_STATE;
+
+#define my_hash_init(A,B,C,D,E,F,G,H) \
+ _my_hash_init(A,0,B,C,D,E,F,G,H)
+#define my_hash_init2(A,B,C,D,E,F,G,H,I) \
+ _my_hash_init(A,B,C,D,E,F,G,H,I)
+my_bool _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
+ ulong default_array_elements, size_t key_offset,
+ size_t key_length, my_hash_get_key get_key,
+ void (*free_element)(void*),
+ uint flags);
+void my_hash_free(HASH *tree);
+void my_hash_reset(HASH *hash);
+uchar *my_hash_element(HASH *hash, ulong idx);
+uchar *my_hash_search(const HASH *info, const uchar *key, size_t length);
+uchar *my_hash_search_using_hash_value(const HASH *info,
+ my_hash_value_type hash_value,
+ const uchar *key, size_t length);
+my_hash_value_type my_calc_hash(const HASH *info,
+ const uchar *key, size_t length);
+uchar *my_hash_first(const HASH *info, const uchar *key, size_t length,
+ HASH_SEARCH_STATE *state);
+uchar *my_hash_first_from_hash_value(const HASH *info,
+ my_hash_value_type hash_value,
+ const uchar *key,
+ size_t length,
+ HASH_SEARCH_STATE *state);
+uchar *my_hash_next(const HASH *info, const uchar *key, size_t length,
+ HASH_SEARCH_STATE *state);
+my_bool my_hash_insert(HASH *info, const uchar *data);
+my_bool my_hash_delete(HASH *hash, uchar *record);
+my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
+ size_t old_key_length);
+void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *state, uchar *new_row);
+my_bool my_hash_check(HASH *hash); /* Only in debug library */
+
+#define my_hash_clear(H) memset((H), 0, sizeof(*(H)))
+#define my_hash_inited(H) ((H)->blength != 0)
+#define my_hash_init_opt(A,B,C,D,E,F,G,H) \
+ (!my_hash_inited(A) && _my_hash_init(A,0,B,C,D,E,F,G,H))
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/heap.h b/BuildTools/centos/dep/mysql-5.6.14/include/heap.h
new file mode 100644
index 000000000..02cb54006
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/heap.h
@@ -0,0 +1,266 @@
+/*
+ Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+/* This file should be included when using heap_database_functions */
+/* Author: Michael Widenius */
+
+#ifndef _heap_h
+#define _heap_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _my_base_h
+#include
+#endif
+
+#include
+#include
+
+#include "my_compare.h"
+#include "my_tree.h"
+
+ /* defines used by heap-funktions */
+
+#define HP_MAX_LEVELS 4 /* 128^5 records is enough */
+#define HP_PTRS_IN_NOD 128
+
+ /* struct used with heap_funktions */
+
+typedef struct st_heapinfo /* Struct from heap_info */
+{
+ ulong records; /* Records in database */
+ ulong deleted; /* Deleted records in database */
+ ulong max_records;
+ ulonglong data_length;
+ ulonglong index_length;
+ uint reclength; /* Length of one record */
+ int errkey;
+ ulonglong auto_increment;
+ time_t create_time;
+} HEAPINFO;
+
+
+ /* Structs used by heap-database-handler */
+
+typedef struct st_heap_ptrs
+{
+ uchar *blocks[HP_PTRS_IN_NOD]; /* pointers to HP_PTRS or records */
+} HP_PTRS;
+
+struct st_level_info
+{
+ /* Number of unused slots in *last_blocks HP_PTRS block (0 for 0th level) */
+ uint free_ptrs_in_block;
+
+ /*
+ Maximum number of records that can be 'contained' inside of each element
+ of last_blocks array. For level 0 - 1, for level 1 - HP_PTRS_IN_NOD, for
+ level 2 - HP_PTRS_IN_NOD^2 and so forth.
+ */
+ ulong records_under_level;
+
+ /*
+ Ptr to last allocated HP_PTRS (or records buffer for level 0) on this
+ level.
+ */
+ HP_PTRS *last_blocks;
+};
+
+
+/*
+ Heap table records and hash index entries are stored in HP_BLOCKs.
+ HP_BLOCK is used as a 'growable array' of fixed-size records. Size of record
+ is recbuffer bytes.
+ The internal representation is as follows:
+ HP_BLOCK is a hierarchical structure of 'blocks'.
+ A block at level 0 is an array records_in_block records.
+ A block at higher level is an HP_PTRS structure with pointers to blocks at
+ lower levels.
+ At the highest level there is one top block. It is stored in HP_BLOCK::root.
+
+ See hp_find_block for a description of how record pointer is obtained from
+ its index.
+ See hp_get_new_block
+*/
+
+typedef struct st_heap_block
+{
+ HP_PTRS *root; /* Top-level block */
+ struct st_level_info level_info[HP_MAX_LEVELS+1];
+ uint levels; /* number of used levels */
+ uint records_in_block; /* Records in one heap-block */
+ uint recbuffer; /* Length of one saved record */
+ ulong last_allocated; /* number of records there is allocated space for */
+} HP_BLOCK;
+
+struct st_heap_info; /* For referense */
+
+typedef struct st_hp_keydef /* Key definition with open */
+{
+ uint flag; /* HA_NOSAME | HA_NULL_PART_KEY */
+ uint keysegs; /* Number of key-segment */
+ uint length; /* Length of key (automatic) */
+ uint8 algorithm; /* HASH / BTREE */
+ HA_KEYSEG *seg;
+ HP_BLOCK block; /* Where keys are saved */
+ /*
+ Number of buckets used in hash table. Used only to provide
+ #records estimates for heap key scans.
+ */
+ ha_rows hash_buckets;
+ TREE rb_tree;
+ int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
+ const uchar *record, uchar *recpos);
+ int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
+ const uchar *record, uchar *recpos, int flag);
+ uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key);
+} HP_KEYDEF;
+
+typedef struct st_heap_share
+{
+ HP_BLOCK block;
+ HP_KEYDEF *keydef;
+ ulong min_records,max_records; /* Params to open */
+ ulonglong data_length,index_length,max_table_size;
+ uint key_stat_version; /* version to indicate insert/delete */
+ uint records; /* records */
+ uint blength; /* records rounded up to 2^n */
+ uint deleted; /* Deleted records in database */
+ uint reclength; /* Length of one record */
+ uint changed;
+ uint keys,max_key_length;
+ uint currently_disabled_keys; /* saved value from "keys" when disabled */
+ uint open_count;
+ uchar *del_link; /* Link to next block with del. rec */
+ char * name; /* Name of "memory-file" */
+ time_t create_time;
+ THR_LOCK lock;
+ mysql_mutex_t intern_lock; /* Locking for use with _locking */
+ my_bool delete_on_close;
+ LIST open_list;
+ uint auto_key;
+ uint auto_key_type; /* real type of the auto key segment */
+ ulonglong auto_increment;
+} HP_SHARE;
+
+struct st_hp_hash_info;
+
+typedef struct st_heap_info
+{
+ HP_SHARE *s;
+ uchar *current_ptr;
+ struct st_hp_hash_info *current_hash_ptr;
+ ulong current_record,next_block;
+ int lastinx,errkey;
+ int mode; /* Mode of file (READONLY..) */
+ uint opt_flag,update;
+ uchar *lastkey; /* Last used key with rkey */
+ uchar *recbuf; /* Record buffer for rb-tree keys */
+ enum ha_rkey_function last_find_flag;
+ TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
+ TREE_ELEMENT **last_pos;
+ uint lastkey_len;
+ my_bool implicit_emptied;
+ THR_LOCK_DATA lock;
+ LIST open_list;
+} HP_INFO;
+
+
+typedef struct st_heap_create_info
+{
+ HP_KEYDEF *keydef;
+ ulong max_records;
+ ulong min_records;
+ uint auto_key; /* keynr [1 - maxkey] for auto key */
+ uint auto_key_type;
+ uint keys;
+ uint reclength;
+ ulonglong max_table_size;
+ ulonglong auto_increment;
+ my_bool with_auto_increment;
+ my_bool internal_table;
+ /*
+ TRUE if heap_create should 'pin' the created share by setting
+ open_count to 1. Is only looked at if not internal_table.
+ */
+ my_bool pin_share;
+} HP_CREATE_INFO;
+
+ /* Prototypes for heap-functions */
+
+extern HP_INFO *heap_open(const char *name, int mode);
+extern HP_INFO *heap_open_from_share(HP_SHARE *share, int mode);
+extern HP_INFO *heap_open_from_share_and_register(HP_SHARE *share, int mode);
+extern void heap_release_share(HP_SHARE *share, my_bool internal_table);
+extern int heap_close(HP_INFO *info);
+extern int heap_write(HP_INFO *info,const uchar *buff);
+extern int heap_update(HP_INFO *info,const uchar *old,const uchar *newdata);
+extern int heap_rrnd(HP_INFO *info,uchar *buf,uchar *pos);
+extern int heap_scan_init(HP_INFO *info);
+extern int heap_scan(register HP_INFO *info, uchar *record);
+extern int heap_delete(HP_INFO *info,const uchar *buff);
+extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
+extern int heap_create(const char *name,
+ HP_CREATE_INFO *create_info, HP_SHARE **share,
+ my_bool *created_new_share);
+extern int heap_delete_table(const char *name);
+extern void heap_drop_table(HP_INFO *info);
+extern int heap_extra(HP_INFO *info,enum ha_extra_function function);
+extern int heap_reset(HP_INFO *info);
+extern int heap_rename(const char *old_name,const char *new_name);
+extern int heap_panic(enum ha_panic_function flag);
+extern int heap_rsame(HP_INFO *info,uchar *record,int inx);
+extern int heap_rnext(HP_INFO *info,uchar *record);
+extern int heap_rprev(HP_INFO *info,uchar *record);
+extern int heap_rfirst(HP_INFO *info,uchar *record,int inx);
+extern int heap_rlast(HP_INFO *info,uchar *record,int inx);
+extern void heap_clear(HP_INFO *info);
+extern void heap_clear_keys(HP_INFO *info);
+extern int heap_disable_indexes(HP_INFO *info);
+extern int heap_enable_indexes(HP_INFO *info);
+extern int heap_indexes_are_disabled(HP_INFO *info);
+extern void heap_update_auto_increment(HP_INFO *info, const uchar *record);
+ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, key_range *min_key,
+ key_range *max_key);
+int hp_panic(enum ha_panic_function flag);
+int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key,
+ key_part_map keypart_map, enum ha_rkey_function find_flag);
+extern uchar * heap_find(HP_INFO *info,int inx,const uchar *key);
+extern int heap_check_heap(HP_INFO *info, my_bool print_status);
+extern uchar *heap_position(HP_INFO *info);
+
+/* The following is for programs that uses the old HEAP interface where
+ pointer to rows where a long instead of a (uchar*).
+*/
+
+#if defined(WANT_OLD_HEAP_VERSION) || defined(OLD_HEAP_VERSION)
+extern int heap_rrnd_old(HP_INFO *info,uchar *buf,ulong pos);
+extern ulong heap_position_old(HP_INFO *info);
+#endif
+#ifdef OLD_HEAP_VERSION
+typedef ulong HEAP_PTR;
+#define heap_position(A) heap_position_old(A)
+#define heap_rrnd(A,B,C) heap_rrnd_old(A,B,C)
+#else
+typedef uchar *HEAP_PTR;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/keycache.h b/BuildTools/centos/dep/mysql-5.6.14/include/keycache.h
new file mode 100644
index 000000000..3184f9802
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/keycache.h
@@ -0,0 +1,146 @@
+/* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* Key cache variable structures */
+
+#ifndef _keycache_h
+#define _keycache_h
+
+#include "my_sys.h" /* flush_type */
+
+C_MODE_START
+
+/* declare structures that is used by st_key_cache */
+
+struct st_block_link;
+typedef struct st_block_link BLOCK_LINK;
+struct st_keycache_page;
+typedef struct st_keycache_page KEYCACHE_PAGE;
+struct st_hash_link;
+typedef struct st_hash_link HASH_LINK;
+
+/* info about requests in a waiting queue */
+typedef struct st_keycache_wqueue
+{
+ struct st_my_thread_var *last_thread; /* circular list of waiting threads */
+} KEYCACHE_WQUEUE;
+
+#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */
+
+/*
+ The key cache structure
+ It also contains read-only statistics parameters.
+*/
+
+typedef struct st_key_cache
+{
+ my_bool key_cache_inited;
+ my_bool in_resize; /* true during resize operation */
+ my_bool resize_in_flush; /* true during flush of resize operation */
+ my_bool can_be_used; /* usage of cache for read/write is allowed */
+ size_t key_cache_mem_size; /* specified size of the cache memory */
+ uint key_cache_block_size; /* size of the page buffer of a cache block */
+ ulong min_warm_blocks; /* min number of warm blocks; */
+ ulong age_threshold; /* age threshold for hot blocks */
+ ulonglong keycache_time; /* total number of block link operations */
+ uint hash_entries; /* max number of entries in the hash table */
+ int hash_links; /* max number of hash links */
+ int hash_links_used; /* number of hash links currently used */
+ int disk_blocks; /* max number of blocks in the cache */
+ ulong blocks_used; /* maximum number of concurrently used blocks */
+ ulong blocks_unused; /* number of currently unused blocks */
+ ulong blocks_changed; /* number of currently dirty blocks */
+ ulong warm_blocks; /* number of blocks in warm sub-chain */
+ ulong cnt_for_resize_op; /* counter to block resize operation */
+ long blocks_available; /* number of blocks available in the LRU chain */
+ HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
+ HASH_LINK *hash_link_root; /* memory for hash table links */
+ HASH_LINK *free_hash_list; /* list of free hash links */
+ BLOCK_LINK *free_block_list; /* list of free blocks */
+ BLOCK_LINK *block_root; /* memory for block links */
+ uchar *block_mem; /* memory for block buffers */
+ BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */
+ BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
+ mysql_mutex_t cache_lock; /* to lock access to the cache structure */
+ KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */
+ /*
+ Waiting for a zero resize count. Using a queue for symmetry though
+ only one thread can wait here.
+ */
+ KEYCACHE_WQUEUE waiting_for_resize_cnt;
+ KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */
+ KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free block */
+ BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/
+ BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file bl.*/
+
+ /*
+ The following variables are and variables used to hold parameters for
+ initializing the key cache.
+ */
+
+ ulonglong param_buff_size; /* size the memory allocated for the cache */
+ ulonglong param_block_size; /* size of the blocks in the key cache */
+ ulonglong param_division_limit; /* min. percentage of warm blocks */
+ ulonglong param_age_threshold; /* determines when hot block is downgraded */
+
+ /* Statistics variables. These are reset in reset_key_cache_counters(). */
+ ulong global_blocks_changed; /* number of currently dirty blocks */
+ ulonglong global_cache_w_requests;/* number of write requests (write hits) */
+ ulonglong global_cache_write; /* number of writes from cache to files */
+ ulonglong global_cache_r_requests;/* number of read requests (read hits) */
+ ulonglong global_cache_read; /* number of reads from files to cache */
+
+ int blocks; /* max number of blocks in the cache */
+ my_bool in_init; /* Set to 1 in MySQL during init/resize */
+} KEY_CACHE;
+
+/* The default key cache */
+extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
+
+extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
+ size_t use_mem, uint division_limit,
+ uint age_threshold);
+extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
+ size_t use_mem, uint division_limit,
+ uint age_threshold);
+extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
+ uint age_threshold);
+extern uchar *key_cache_read(KEY_CACHE *keycache,
+ File file, my_off_t filepos, int level,
+ uchar *buff, uint length,
+ uint block_length,int return_buffer);
+extern int key_cache_insert(KEY_CACHE *keycache,
+ File file, my_off_t filepos, int level,
+ uchar *buff, uint length);
+extern int key_cache_write(KEY_CACHE *keycache,
+ File file, my_off_t filepos, int level,
+ uchar *buff, uint length,
+ uint block_length,int force_write);
+extern int flush_key_blocks(KEY_CACHE *keycache,
+ int file, enum flush_type type);
+extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
+
+/* Functions to handle multiple key caches */
+extern my_bool multi_keycache_init(void);
+extern void multi_keycache_free(void);
+extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length);
+extern my_bool multi_key_cache_set(const uchar *key, uint length,
+ KEY_CACHE *key_cache);
+extern void multi_key_cache_change(KEY_CACHE *old_data,
+ KEY_CACHE *new_data);
+extern int reset_key_cache_counters(const char *name,
+ KEY_CACHE *key_cache);
+C_MODE_END
+#endif /* _keycache_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/lf.h b/BuildTools/centos/dep/mysql-5.6.14/include/lf.h
new file mode 100644
index 000000000..44c8279f8
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/lf.h
@@ -0,0 +1,268 @@
+/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _lf_h
+#define _lf_h
+
+#include
+
+C_MODE_START
+
+/*
+ Helpers to define both func() and _func(), where
+ func() is a _func() protected by my_atomic_rwlock_wrlock()
+*/
+
+#define lock_wrap(f, t, proto_args, args, lock) \
+t _ ## f proto_args; \
+static inline t f proto_args \
+{ \
+ t ret; \
+ my_atomic_rwlock_wrlock(lock); \
+ ret= _ ## f args; \
+ my_atomic_rwlock_wrunlock(lock); \
+ return ret; \
+}
+
+#define lock_wrap_void(f, proto_args, args, lock) \
+void _ ## f proto_args; \
+static inline void f proto_args \
+{ \
+ my_atomic_rwlock_wrlock(lock); \
+ _ ## f args; \
+ my_atomic_rwlock_wrunlock(lock); \
+}
+
+#define nolock_wrap(f, t, proto_args, args) \
+t _ ## f proto_args; \
+static inline t f proto_args \
+{ \
+ return _ ## f args; \
+}
+
+#define nolock_wrap_void(f, proto_args, args) \
+void _ ## f proto_args; \
+static inline void f proto_args \
+{ \
+ _ ## f args; \
+}
+
+/*
+ wait-free dynamic array, see lf_dynarray.c
+
+ 4 levels of 256 elements each mean 4311810304 elements in an array - it
+ should be enough for a while
+*/
+#define LF_DYNARRAY_LEVEL_LENGTH 256
+#define LF_DYNARRAY_LEVELS 4
+
+typedef struct {
+ void * volatile level[LF_DYNARRAY_LEVELS];
+ uint size_of_element;
+ my_atomic_rwlock_t lock;
+} LF_DYNARRAY;
+
+typedef int (*lf_dynarray_func)(void *, void *);
+
+void lf_dynarray_init(LF_DYNARRAY *array, uint element_size);
+void lf_dynarray_destroy(LF_DYNARRAY *array);
+
+nolock_wrap(lf_dynarray_value, void *,
+ (LF_DYNARRAY *array, uint idx),
+ (array, idx))
+lock_wrap(lf_dynarray_lvalue, void *,
+ (LF_DYNARRAY *array, uint idx),
+ (array, idx),
+ &array->lock)
+nolock_wrap(lf_dynarray_iterate, int,
+ (LF_DYNARRAY *array, lf_dynarray_func func, void *arg),
+ (array, func, arg))
+
+/*
+ pin manager for memory allocator, lf_alloc-pin.c
+*/
+
+#define LF_PINBOX_PINS 4
+#define LF_PURGATORY_SIZE 10
+
+typedef void lf_pinbox_free_func(void *, void *, void*);
+
+typedef struct {
+ LF_DYNARRAY pinarray;
+ lf_pinbox_free_func *free_func;
+ void *free_func_arg;
+ uint free_ptr_offset;
+ uint32 volatile pinstack_top_ver; /* this is a versioned pointer */
+ uint32 volatile pins_in_array; /* number of elements in array */
+} LF_PINBOX;
+
+typedef struct {
+ void * volatile pin[LF_PINBOX_PINS];
+ LF_PINBOX *pinbox;
+ void **stack_ends_here;
+ void *purgatory;
+ uint32 purgatory_count;
+ uint32 volatile link;
+/* we want sizeof(LF_PINS) to be 64 to avoid false sharing */
+#if SIZEOF_INT*2+SIZEOF_CHARP*(LF_PINBOX_PINS+3) != 64
+ char pad[64-sizeof(uint32)*2-sizeof(void*)*(LF_PINBOX_PINS+3)];
+#endif
+} LF_PINS;
+
+/*
+ shortcut macros to do an atomic_wrlock on a structure that uses pins
+ (e.g. lf_hash).
+*/
+#define lf_rwlock_by_pins(PINS) \
+ my_atomic_rwlock_wrlock(&(PINS)->pinbox->pinarray.lock)
+#define lf_rwunlock_by_pins(PINS) \
+ my_atomic_rwlock_wrunlock(&(PINS)->pinbox->pinarray.lock)
+
+/*
+ compile-time assert, to require "no less than N" pins
+ it's enough if it'll fail on at least one compiler, so
+ we'll enable it on GCC only, which supports zero-length arrays.
+*/
+#if defined(__GNUC__) && defined(MY_LF_EXTRA_DEBUG)
+#define LF_REQUIRE_PINS(N) \
+ static const char require_pins[LF_PINBOX_PINS-N] \
+ __attribute__ ((unused)); \
+ static const int LF_NUM_PINS_IN_THIS_FILE= N;
+#define _lf_pin(PINS, PIN, ADDR) \
+ ( \
+ assert(PIN < LF_NUM_PINS_IN_THIS_FILE), \
+ my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR)) \
+ )
+#else
+#define LF_REQUIRE_PINS(N)
+#define _lf_pin(PINS, PIN, ADDR) my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR))
+#endif
+
+#define _lf_unpin(PINS, PIN) _lf_pin(PINS, PIN, NULL)
+#define lf_pin(PINS, PIN, ADDR) \
+ do { \
+ lf_rwlock_by_pins(PINS); \
+ _lf_pin(PINS, PIN, ADDR); \
+ lf_rwunlock_by_pins(PINS); \
+ } while (0)
+#define lf_unpin(PINS, PIN) lf_pin(PINS, PIN, NULL)
+#define _lf_assert_pin(PINS, PIN) assert((PINS)->pin[PIN] != 0)
+#define _lf_assert_unpin(PINS, PIN) assert((PINS)->pin[PIN] == 0)
+
+void lf_pinbox_init(LF_PINBOX *pinbox, uint free_ptr_offset,
+ lf_pinbox_free_func *free_func, void * free_func_arg);
+void lf_pinbox_destroy(LF_PINBOX *pinbox);
+
+lock_wrap(lf_pinbox_get_pins, LF_PINS *,
+ (LF_PINBOX *pinbox),
+ (pinbox),
+ &pinbox->pinarray.lock)
+lock_wrap_void(lf_pinbox_put_pins,
+ (LF_PINS *pins),
+ (pins),
+ &pins->pinbox->pinarray.lock)
+lock_wrap_void(lf_pinbox_free,
+ (LF_PINS *pins, void *addr),
+ (pins, addr),
+ &pins->pinbox->pinarray.lock)
+
+/*
+ memory allocator, lf_alloc-pin.c
+*/
+
+typedef struct st_lf_allocator {
+ LF_PINBOX pinbox;
+ uchar * volatile top;
+ uint element_size;
+ uint32 volatile mallocs;
+ void (*constructor)(uchar *); /* called, when an object is malloc()'ed */
+ void (*destructor)(uchar *); /* called, when an object is free()'d */
+} LF_ALLOCATOR;
+
+void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset);
+void lf_alloc_destroy(LF_ALLOCATOR *allocator);
+uint lf_alloc_pool_count(LF_ALLOCATOR *allocator);
+/*
+ shortcut macros to access underlying pinbox functions from an LF_ALLOCATOR
+ see _lf_pinbox_get_pins() and _lf_pinbox_put_pins()
+*/
+#define _lf_alloc_free(PINS, PTR) _lf_pinbox_free((PINS), (PTR))
+#define lf_alloc_free(PINS, PTR) lf_pinbox_free((PINS), (PTR))
+#define _lf_alloc_get_pins(A) _lf_pinbox_get_pins(&(A)->pinbox)
+#define lf_alloc_get_pins(A) lf_pinbox_get_pins(&(A)->pinbox)
+#define _lf_alloc_put_pins(PINS) _lf_pinbox_put_pins(PINS)
+#define lf_alloc_put_pins(PINS) lf_pinbox_put_pins(PINS)
+#define lf_alloc_direct_free(ALLOC, ADDR) my_free((ADDR))
+
+lock_wrap(lf_alloc_new, void *,
+ (LF_PINS *pins),
+ (pins),
+ &pins->pinbox->pinarray.lock)
+
+C_MODE_END
+
+/*
+ extendible hash, lf_hash.c
+*/
+#include
+
+C_MODE_START
+
+#define LF_HASH_UNIQUE 1
+
+/* lf_hash overhead per element (that is, sizeof(LF_SLIST) */
+extern const int LF_HASH_OVERHEAD;
+
+typedef struct {
+ LF_DYNARRAY array; /* hash itself */
+ LF_ALLOCATOR alloc; /* allocator for elements */
+ my_hash_get_key get_key; /* see HASH */
+ CHARSET_INFO *charset; /* see HASH */
+ uint key_offset, key_length; /* see HASH */
+ uint element_size; /* size of memcpy'ed area on insert */
+ uint flags; /* LF_HASH_UNIQUE, etc */
+ int32 volatile size; /* size of array */
+ int32 volatile count; /* number of elements in the hash */
+} LF_HASH;
+
+void lf_hash_init(LF_HASH *hash, uint element_size, uint flags,
+ uint key_offset, uint key_length, my_hash_get_key get_key,
+ CHARSET_INFO *charset);
+void lf_hash_destroy(LF_HASH *hash);
+int lf_hash_insert(LF_HASH *hash, LF_PINS *pins, const void *data);
+void *lf_hash_search(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen);
+int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen);
+/*
+ shortcut macros to access underlying pinbox functions from an LF_HASH
+ see _lf_pinbox_get_pins() and _lf_pinbox_put_pins()
+*/
+#define _lf_hash_get_pins(HASH) _lf_alloc_get_pins(&(HASH)->alloc)
+#define lf_hash_get_pins(HASH) lf_alloc_get_pins(&(HASH)->alloc)
+#define _lf_hash_put_pins(PINS) _lf_pinbox_put_pins(PINS)
+#define lf_hash_put_pins(PINS) lf_pinbox_put_pins(PINS)
+#define lf_hash_search_unpin(PINS) lf_unpin((PINS), 2)
+/*
+ cleanup
+*/
+
+#undef lock_wrap_void
+#undef lock_wrap
+#undef nolock_wrap_void
+#undef nolock_wrap
+
+C_MODE_END
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/little_endian.h b/BuildTools/centos/dep/mysql-5.6.14/include/little_endian.h
new file mode 100644
index 000000000..c7fd155b9
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/little_endian.h
@@ -0,0 +1,71 @@
+/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Data in little-endian format.
+*/
+
+#ifndef MY_BYTE_ORDER_ARCH_OPTIMIZED
+#define float4get(V,M) memcpy(&V, (M), sizeof(float))
+#define float4store(V,M) memcpy(V, (&M), sizeof(float))
+#define float8get(V,M) doubleget((V),(M))
+#define float8store(V,M) doublestore((V),(M))
+
+/* Bi-endian hardware.... */
+#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
+#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\
+ *(((char*)T)+1)=(char) ((uchar *) &V)[5];\
+ *(((char*)T)+2)=(char) ((uchar *) &V)[6];\
+ *(((char*)T)+3)=(char) ((uchar *) &V)[7];\
+ *(((char*)T)+4)=(char) ((uchar *) &V)[0];\
+ *(((char*)T)+5)=(char) ((uchar *) &V)[1];\
+ *(((char*)T)+6)=(char) ((uchar *) &V)[2];\
+ *(((char*)T)+7)=(char) ((uchar *) &V)[3]; }\
+ while(0)
+#define doubleget(V,M) do { double def_temp;\
+ ((uchar*) &def_temp)[0]=(M)[4];\
+ ((uchar*) &def_temp)[1]=(M)[5];\
+ ((uchar*) &def_temp)[2]=(M)[6];\
+ ((uchar*) &def_temp)[3]=(M)[7];\
+ ((uchar*) &def_temp)[4]=(M)[0];\
+ ((uchar*) &def_temp)[5]=(M)[1];\
+ ((uchar*) &def_temp)[6]=(M)[2];\
+ ((uchar*) &def_temp)[7]=(M)[3];\
+ (V) = def_temp; } while(0)
+#else /* Bi-endian hardware.... */
+
+/* Cast away type qualifiers (necessary as macro takes argument by value). */
+#define doublestore(T,V) memcpy((T), (void*) &V, sizeof(double))
+#define doubleget(V,M) memcpy(&V, (M), sizeof(double))
+
+#endif /* Bi-endian hardware.... */
+
+#endif /* !MY_BYTE_ORDER_ARCH_OPTIMIZED */
+
+#define ushortget(V,M) do { uchar *pM= (uchar*)(M);V = uint2korr(pM);} while(0)
+#define shortget(V,M) do { uchar *pM= (uchar*)(M);V = sint2korr(pM);} while(0)
+#define longget(V,M) do { uchar *pM= (uchar*)(M);V = sint4korr(pM);} while(0)
+#define ulongget(V,M) do { uchar *pM= (uchar*)(M);V = uint4korr(pM);} while(0)
+#define shortstore(T,V) int2store(T,V)
+#define longstore(T,V) int4store(T,V)
+
+#ifndef floatstore
+/* Cast away type qualifiers (necessary as macro takes argument by value). */
+#define floatstore(T,V) memcpy((T), (void*) (&V), sizeof(float))
+#define floatget(V,M) memcpy(&V, (M), sizeof(float))
+#endif
+
+#define longlongget(V,M) memcpy(&V, (M), sizeof(ulonglong))
+#define longlongstore(T,V) memcpy((T), &V, sizeof(ulonglong))
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/m_ctype.h b/BuildTools/centos/dep/mysql-5.6.14/include/m_ctype.h
new file mode 100644
index 000000000..2c9c5f75d
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/m_ctype.h
@@ -0,0 +1,796 @@
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ A better inplementation of the UNIX ctype(3) library.
+*/
+
+#ifndef _m_ctype_h
+#define _m_ctype_h
+
+#include
+#include "my_global.h" /* uint16, uchar */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MY_CS_NAME_SIZE 32
+#define MY_CS_CTYPE_TABLE_SIZE 257
+#define MY_CS_TO_LOWER_TABLE_SIZE 256
+#define MY_CS_TO_UPPER_TABLE_SIZE 256
+#define MY_CS_SORT_ORDER_TABLE_SIZE 256
+#define MY_CS_TO_UNI_TABLE_SIZE 256
+
+#define CHARSET_DIR "charsets/"
+
+#define my_wc_t ulong
+
+#define MY_CS_REPLACEMENT_CHARACTER 0xFFFD
+
+/*
+ On i386 we store Unicode->CS conversion tables for
+ some character sets using Big-endian order,
+ to copy two bytes at onces.
+ This gives some performance improvement.
+*/
+#ifdef __i386__
+#define MB2(x) (((x) >> 8) + (((x) & 0xFF) << 8))
+#define MY_PUT_MB2(s, code) { *((uint16*)(s))= (code); }
+#else
+#define MB2(x) (x)
+#define MY_PUT_MB2(s, code) { (s)[0]= code >> 8; (s)[1]= code & 0xFF; }
+#endif
+
+
+
+typedef struct unicase_info_char_st
+{
+ uint32 toupper;
+ uint32 tolower;
+ uint32 sort;
+} MY_UNICASE_CHARACTER;
+
+
+typedef struct unicase_info_st
+{
+ my_wc_t maxchar;
+ MY_UNICASE_CHARACTER **page;
+} MY_UNICASE_INFO;
+
+
+extern MY_UNICASE_INFO my_unicase_default;
+extern MY_UNICASE_INFO my_unicase_turkish;
+extern MY_UNICASE_INFO my_unicase_mysql500;
+extern MY_UNICASE_INFO my_unicase_unicode520;
+
+#define MY_UCA_MAX_CONTRACTION 6
+#define MY_UCA_MAX_WEIGHT_SIZE 8
+#define MY_UCA_WEIGHT_LEVELS 1
+
+typedef struct my_contraction_t
+{
+ my_wc_t ch[MY_UCA_MAX_CONTRACTION]; /* Character sequence */
+ uint16 weight[MY_UCA_MAX_WEIGHT_SIZE];/* Its weight string, 0-terminated */
+ my_bool with_context;
+} MY_CONTRACTION;
+
+
+
+typedef struct my_contraction_list_t
+{
+ size_t nitems; /* Number of items in the list */
+ MY_CONTRACTION *item; /* List of contractions */
+ char *flags; /* Character flags, e.g. "is contraction head") */
+} MY_CONTRACTIONS;
+
+
+my_bool my_uca_can_be_contraction_head(const MY_CONTRACTIONS *c, my_wc_t wc);
+my_bool my_uca_can_be_contraction_tail(const MY_CONTRACTIONS *c, my_wc_t wc);
+uint16 *my_uca_contraction2_weight(const MY_CONTRACTIONS *c,
+ my_wc_t wc1, my_wc_t wc2);
+
+
+/* Collation weights on a single level (e.g. primary, secondary, tertiarty) */
+typedef struct my_uca_level_info_st
+{
+ my_wc_t maxchar;
+ uchar *lengths;
+ uint16 **weights;
+ MY_CONTRACTIONS contractions;
+} MY_UCA_WEIGHT_LEVEL;
+
+
+typedef struct uca_info_st
+{
+ MY_UCA_WEIGHT_LEVEL level[MY_UCA_WEIGHT_LEVELS];
+
+ /* Logical positions */
+ my_wc_t first_non_ignorable;
+ my_wc_t last_non_ignorable;
+ my_wc_t first_primary_ignorable;
+ my_wc_t last_primary_ignorable;
+ my_wc_t first_secondary_ignorable;
+ my_wc_t last_secondary_ignorable;
+ my_wc_t first_tertiary_ignorable;
+ my_wc_t last_tertiary_ignorable;
+ my_wc_t first_trailing;
+ my_wc_t last_trailing;
+ my_wc_t first_variable;
+ my_wc_t last_variable;
+
+} MY_UCA_INFO;
+
+
+
+extern MY_UCA_INFO my_uca_v400;
+
+
+typedef struct uni_ctype_st
+{
+ uchar pctype;
+ uchar *ctype;
+} MY_UNI_CTYPE;
+
+extern MY_UNI_CTYPE my_uni_ctype[256];
+
+/* wm_wc and wc_mb return codes */
+#define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc */
+#define MY_CS_ILUNI 0 /* Cannot encode Unicode to charset: wc_mb */
+#define MY_CS_TOOSMALL -101 /* Need at least one byte: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL2 -102 /* Need at least two bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc */
+/* These following three are currently not really used */
+#define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */
+#define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */
+/* A helper macros for "need at least n bytes" */
+#define MY_CS_TOOSMALLN(n) (-100-(n))
+
+#define MY_SEQ_INTTAIL 1
+#define MY_SEQ_SPACES 2
+
+ /* My charsets_list flags */
+#define MY_CS_COMPILED 1 /* compiled-in sets */
+#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
+#define MY_CS_INDEX 4 /* sets listed in the Index file */
+#define MY_CS_LOADED 8 /* sets that are currently loaded */
+#define MY_CS_BINSORT 16 /* if binary sort order */
+#define MY_CS_PRIMARY 32 /* if primary collation */
+#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
+#define MY_CS_UNICODE 128 /* is a charset is BMP Unicode */
+#define MY_CS_READY 256 /* if a charset is initialized */
+#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
+#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
+#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
+#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
+#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */
+#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
+#define MY_CS_LOWER_SORT 32768 /* If use lower case as weight */
+#define MY_CHARSET_UNDEFINED 0
+
+/* Character repertoire flags */
+#define MY_REPERTOIRE_ASCII 1 /* Pure ASCII U+0000..U+007F */
+#define MY_REPERTOIRE_EXTENDED 2 /* Extended characters: U+0080..U+FFFF */
+#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */
+
+/* Flags for strxfrm */
+#define MY_STRXFRM_LEVEL1 0x00000001 /* for primary weights */
+#define MY_STRXFRM_LEVEL2 0x00000002 /* for secondary weights */
+#define MY_STRXFRM_LEVEL3 0x00000004 /* for tertiary weights */
+#define MY_STRXFRM_LEVEL4 0x00000008 /* fourth level weights */
+#define MY_STRXFRM_LEVEL5 0x00000010 /* fifth level weights */
+#define MY_STRXFRM_LEVEL6 0x00000020 /* sixth level weights */
+#define MY_STRXFRM_LEVEL_ALL 0x0000003F /* Bit OR for the above six */
+#define MY_STRXFRM_NLEVELS 6 /* Number of possible levels*/
+
+#define MY_STRXFRM_PAD_WITH_SPACE 0x00000040 /* if pad result with spaces */
+#define MY_STRXFRM_PAD_TO_MAXLEN 0x00000080 /* if pad tail(for filesort) */
+
+#define MY_STRXFRM_DESC_LEVEL1 0x00000100 /* if desc order for level1 */
+#define MY_STRXFRM_DESC_LEVEL2 0x00000200 /* if desc order for level2 */
+#define MY_STRXFRM_DESC_LEVEL3 0x00000300 /* if desc order for level3 */
+#define MY_STRXFRM_DESC_LEVEL4 0x00000800 /* if desc order for level4 */
+#define MY_STRXFRM_DESC_LEVEL5 0x00001000 /* if desc order for level5 */
+#define MY_STRXFRM_DESC_LEVEL6 0x00002000 /* if desc order for level6 */
+#define MY_STRXFRM_DESC_SHIFT 8
+
+#define MY_STRXFRM_UNUSED_00004000 0x00004000 /* for future extensions */
+#define MY_STRXFRM_UNUSED_00008000 0x00008000 /* for future extensions */
+
+#define MY_STRXFRM_REVERSE_LEVEL1 0x00010000 /* if reverse order for level1 */
+#define MY_STRXFRM_REVERSE_LEVEL2 0x00020000 /* if reverse order for level2 */
+#define MY_STRXFRM_REVERSE_LEVEL3 0x00040000 /* if reverse order for level3 */
+#define MY_STRXFRM_REVERSE_LEVEL4 0x00080000 /* if reverse order for level4 */
+#define MY_STRXFRM_REVERSE_LEVEL5 0x00100000 /* if reverse order for level5 */
+#define MY_STRXFRM_REVERSE_LEVEL6 0x00200000 /* if reverse order for level6 */
+#define MY_STRXFRM_REVERSE_SHIFT 16
+
+
+typedef struct my_uni_idx_st
+{
+ uint16 from;
+ uint16 to;
+ uchar *tab;
+} MY_UNI_IDX;
+
+typedef struct
+{
+ uint beg;
+ uint end;
+ uint mb_len;
+} my_match_t;
+
+enum my_lex_states
+{
+ MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
+ MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
+ MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
+ MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
+ MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
+ MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
+ MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
+ MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
+ MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
+ MY_LEX_IDENT_OR_KEYWORD,
+ MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
+ MY_LEX_STRING_OR_DELIMITER
+};
+
+struct charset_info_st;
+
+typedef struct my_charset_loader_st
+{
+ char error[128];
+ void *(*once_alloc)(size_t);
+ void *(*malloc)(size_t);
+ void *(*realloc)(void *, size_t);
+ void (*free)(void *);
+ void (*reporter)(enum loglevel, const char *format, ...);
+ int (*add_collation)(struct charset_info_st *cs);
+} MY_CHARSET_LOADER;
+
+
+extern int (*my_string_stack_guard)(int);
+
+/* See strings/CHARSET_INFO.txt for information about this structure */
+typedef struct my_collation_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, MY_CHARSET_LOADER *);
+ /* Collation routines */
+ int (*strnncoll)(const struct charset_info_st *,
+ const uchar *, size_t, const uchar *, size_t, my_bool);
+ int (*strnncollsp)(const struct charset_info_st *,
+ const uchar *, size_t, const uchar *, size_t,
+ my_bool diff_if_only_endspace_difference);
+ size_t (*strnxfrm)(const struct charset_info_st *,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags);
+ size_t (*strnxfrmlen)(const struct charset_info_st *, size_t);
+ my_bool (*like_range)(const struct charset_info_st *,
+ const char *s, size_t s_length,
+ pchar w_prefix, pchar w_one, pchar w_many,
+ size_t res_length,
+ char *min_str, char *max_str,
+ size_t *min_len, size_t *max_len);
+ int (*wildcmp)(const struct charset_info_st *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape,int w_one, int w_many);
+
+ int (*strcasecmp)(const struct charset_info_st *, const char *,
+ const char *);
+
+ uint (*instr)(const struct charset_info_st *,
+ const char *b, size_t b_length,
+ const char *s, size_t s_length,
+ my_match_t *match, uint nmatch);
+
+ /* Hash calculation */
+ void (*hash_sort)(const struct charset_info_st *cs, const uchar *key,
+ size_t len, ulong *nr1, ulong *nr2);
+ my_bool (*propagate)(const struct charset_info_st *cs, const uchar *str,
+ size_t len);
+} MY_COLLATION_HANDLER;
+
+extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
+extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
+
+/* Some typedef to make it easy for C++ to make function pointers */
+typedef int (*my_charset_conv_mb_wc)(const struct charset_info_st *,
+ my_wc_t *, const uchar *, const uchar *);
+typedef int (*my_charset_conv_wc_mb)(const struct charset_info_st *, my_wc_t,
+ uchar *, uchar *);
+typedef size_t (*my_charset_conv_case)(const struct charset_info_st *,
+ char *, size_t, char *, size_t);
+
+
+/* See strings/CHARSET_INFO.txt about information on this structure */
+typedef struct my_charset_handler_st
+{
+ my_bool (*init)(struct charset_info_st *, MY_CHARSET_LOADER *loader);
+ /* Multibyte routines */
+ uint (*ismbchar)(const struct charset_info_st *, const char *,
+ const char *);
+ uint (*mbcharlen)(const struct charset_info_st *, uint c);
+ size_t (*numchars)(const struct charset_info_st *, const char *b,
+ const char *e);
+ size_t (*charpos)(const struct charset_info_st *, const char *b,
+ const char *e, size_t pos);
+ size_t (*well_formed_len)(const struct charset_info_st *,
+ const char *b,const char *e,
+ size_t nchars, int *error);
+ size_t (*lengthsp)(const struct charset_info_st *, const char *ptr,
+ size_t length);
+ size_t (*numcells)(const struct charset_info_st *, const char *b,
+ const char *e);
+
+ /* Unicode conversion */
+ my_charset_conv_mb_wc mb_wc;
+ my_charset_conv_wc_mb wc_mb;
+
+ /* CTYPE scanner */
+ int (*ctype)(const struct charset_info_st *cs, int *ctype,
+ const uchar *s, const uchar *e);
+
+ /* Functions for case and sort conversion */
+ size_t (*caseup_str)(const struct charset_info_st *, char *);
+ size_t (*casedn_str)(const struct charset_info_st *, char *);
+
+ my_charset_conv_case caseup;
+ my_charset_conv_case casedn;
+
+ /* Charset dependant snprintf() */
+ size_t (*snprintf)(const struct charset_info_st *, char *to, size_t n,
+ const char *fmt,
+ ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
+ size_t (*long10_to_str)(const struct charset_info_st *, char *to, size_t n,
+ int radix, long int val);
+ size_t (*longlong10_to_str)(const struct charset_info_st *, char *to,
+ size_t n, int radix, longlong val);
+
+ void (*fill)(const struct charset_info_st *, char *to, size_t len,
+ int fill);
+
+ /* String-to-number conversion routines */
+ long (*strntol)(const struct charset_info_st *, const char *s,
+ size_t l, int base, char **e, int *err);
+ ulong (*strntoul)(const struct charset_info_st *, const char *s,
+ size_t l, int base, char **e, int *err);
+ longlong (*strntoll)(const struct charset_info_st *, const char *s,
+ size_t l, int base, char **e, int *err);
+ ulonglong (*strntoull)(const struct charset_info_st *, const char *s,
+ size_t l, int base, char **e, int *err);
+ double (*strntod)(const struct charset_info_st *, char *s,
+ size_t l, char **e, int *err);
+ longlong (*strtoll10)(const struct charset_info_st *cs,
+ const char *nptr, char **endptr, int *error);
+ ulonglong (*strntoull10rnd)(const struct charset_info_st *cs,
+ const char *str, size_t length,
+ int unsigned_fl,
+ char **endptr, int *error);
+ size_t (*scan)(const struct charset_info_st *, const char *b,
+ const char *e, int sq);
+} MY_CHARSET_HANDLER;
+
+extern MY_CHARSET_HANDLER my_charset_8bit_handler;
+extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
+
+
+/*
+ We define this CHARSET_INFO_DEFINED here to prevent a repeat of the
+ typedef in hash.c, which will cause a compiler error.
+*/
+#define CHARSET_INFO_DEFINED
+
+/* See strings/CHARSET_INFO.txt about information on this structure */
+typedef struct charset_info_st
+{
+ uint number;
+ uint primary_number;
+ uint binary_number;
+ uint state;
+ const char *csname;
+ const char *name;
+ const char *comment;
+ const char *tailoring;
+ uchar *ctype;
+ uchar *to_lower;
+ uchar *to_upper;
+ uchar *sort_order;
+ MY_UCA_INFO *uca;
+ uint16 *tab_to_uni;
+ MY_UNI_IDX *tab_from_uni;
+ MY_UNICASE_INFO *caseinfo;
+ uchar *state_map;
+ uchar *ident_map;
+ uint strxfrm_multiply;
+ uchar caseup_multiply;
+ uchar casedn_multiply;
+ uint mbminlen;
+ uint mbmaxlen;
+ my_wc_t min_sort_char;
+ my_wc_t max_sort_char; /* For LIKE optimization */
+ uchar pad_char;
+ my_bool escape_with_backslash_is_dangerous;
+ uchar levels_for_compare;
+ uchar levels_for_order;
+
+ MY_CHARSET_HANDLER *cset;
+ MY_COLLATION_HANDLER *coll;
+
+} CHARSET_INFO;
+#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
+
+
+extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
+extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
+extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
+
+extern CHARSET_INFO my_charset_big5_chinese_ci;
+extern CHARSET_INFO my_charset_big5_bin;
+extern CHARSET_INFO my_charset_cp932_japanese_ci;
+extern CHARSET_INFO my_charset_cp932_bin;
+extern CHARSET_INFO my_charset_cp1250_czech_ci;
+extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
+extern CHARSET_INFO my_charset_eucjpms_bin;
+extern CHARSET_INFO my_charset_euckr_korean_ci;
+extern CHARSET_INFO my_charset_euckr_bin;
+extern CHARSET_INFO my_charset_gb2312_chinese_ci;
+extern CHARSET_INFO my_charset_gb2312_bin;
+extern CHARSET_INFO my_charset_gbk_chinese_ci;
+extern CHARSET_INFO my_charset_gbk_bin;
+extern CHARSET_INFO my_charset_latin1_german2_ci;
+extern CHARSET_INFO my_charset_latin1_bin;
+extern CHARSET_INFO my_charset_latin2_czech_ci;
+extern CHARSET_INFO my_charset_sjis_japanese_ci;
+extern CHARSET_INFO my_charset_sjis_bin;
+extern CHARSET_INFO my_charset_tis620_thai_ci;
+extern CHARSET_INFO my_charset_tis620_bin;
+extern CHARSET_INFO my_charset_ucs2_general_ci;
+extern CHARSET_INFO my_charset_ucs2_bin;
+extern CHARSET_INFO my_charset_ucs2_unicode_ci;
+extern CHARSET_INFO my_charset_ucs2_general_mysql500_ci;
+extern CHARSET_INFO my_charset_ujis_japanese_ci;
+extern CHARSET_INFO my_charset_ujis_bin;
+extern CHARSET_INFO my_charset_utf16_bin;
+extern CHARSET_INFO my_charset_utf16_general_ci;
+extern CHARSET_INFO my_charset_utf16_unicode_ci;
+extern CHARSET_INFO my_charset_utf16le_bin;
+extern CHARSET_INFO my_charset_utf16le_general_ci;
+extern CHARSET_INFO my_charset_utf32_bin;
+extern CHARSET_INFO my_charset_utf32_general_ci;
+extern CHARSET_INFO my_charset_utf32_unicode_ci;
+
+extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8_general_ci;
+extern CHARSET_INFO my_charset_utf8_tolower_ci;
+extern CHARSET_INFO my_charset_utf8_unicode_ci;
+extern CHARSET_INFO my_charset_utf8_bin;
+extern CHARSET_INFO my_charset_utf8_general_mysql500_ci;
+extern CHARSET_INFO my_charset_utf8mb4_bin;
+extern CHARSET_INFO my_charset_utf8mb4_general_ci;
+extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;
+#define MY_UTF8MB3 "utf8"
+#define MY_UTF8MB4 "utf8mb4"
+
+
+/* declarations for simple charsets */
+extern size_t my_strnxfrm_simple(const CHARSET_INFO *,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags);
+size_t my_strnxfrmlen_simple(const CHARSET_INFO *, size_t);
+extern int my_strnncoll_simple(const CHARSET_INFO *, const uchar *, size_t,
+ const uchar *, size_t, my_bool);
+
+extern int my_strnncollsp_simple(const CHARSET_INFO *, const uchar *, size_t,
+ const uchar *, size_t,
+ my_bool diff_if_only_endspace_difference);
+
+extern void my_hash_sort_simple(const CHARSET_INFO *cs,
+ const uchar *key, size_t len,
+ ulong *nr1, ulong *nr2);
+
+extern size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr,
+ size_t length);
+
+extern uint my_instr_simple(const struct charset_info_st *,
+ const char *b, size_t b_length,
+ const char *s, size_t s_length,
+ my_match_t *match, uint nmatch);
+
+
+/* Functions for 8bit */
+extern size_t my_caseup_str_8bit(const CHARSET_INFO *, char *);
+extern size_t my_casedn_str_8bit(const CHARSET_INFO *, char *);
+extern size_t my_caseup_8bit(const CHARSET_INFO *, char *src, size_t srclen,
+ char *dst, size_t dstlen);
+extern size_t my_casedn_8bit(const CHARSET_INFO *, char *src, size_t srclen,
+ char *dst, size_t dstlen);
+
+extern int my_strcasecmp_8bit(const CHARSET_INFO * cs, const char *,
+ const char *);
+
+int my_mb_wc_8bit(const CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,
+ const uchar *e);
+int my_wc_mb_8bit(const CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
+
+int my_mb_ctype_8bit(const CHARSET_INFO *,int *, const uchar *,const uchar *);
+int my_mb_ctype_mb(const CHARSET_INFO *,int *, const uchar *,const uchar *);
+
+size_t my_scan_8bit(const CHARSET_INFO *cs, const char *b, const char *e,
+ int sq);
+
+size_t my_snprintf_8bit(const struct charset_info_st *, char *to, size_t n,
+ const char *fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 4, 5);
+
+long my_strntol_8bit(const CHARSET_INFO *, const char *s, size_t l,
+ int base, char **e, int *err);
+ulong my_strntoul_8bit(const CHARSET_INFO *, const char *s, size_t l,
+ int base, char **e, int *err);
+longlong my_strntoll_8bit(const CHARSET_INFO *, const char *s, size_t l,
+ int base, char **e, int *err);
+ulonglong my_strntoull_8bit(const CHARSET_INFO *, const char *s, size_t l,
+ int base, char **e, int *err);
+double my_strntod_8bit(const CHARSET_INFO *, char *s, size_t l, char **e,
+ int *err);
+size_t my_long10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l,
+ int radix, long int val);
+size_t my_longlong10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l,
+ int radix, longlong val);
+
+longlong my_strtoll10_8bit(const CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+longlong my_strtoll10_ucs2(const CHARSET_INFO *cs,
+ const char *nptr, char **endptr, int *error);
+
+ulonglong my_strntoull10rnd_8bit(const CHARSET_INFO *cs,
+ const char *str, size_t length, int
+ unsigned_fl, char **endptr, int *error);
+ulonglong my_strntoull10rnd_ucs2(const CHARSET_INFO *cs,
+ const char *str, size_t length,
+ int unsigned_fl, char **endptr, int *error);
+
+void my_fill_8bit(const CHARSET_INFO *cs, char* to, size_t l, int fill);
+
+/* For 8-bit character set */
+my_bool my_like_range_simple(const CHARSET_INFO *cs,
+ const char *ptr, size_t ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ size_t res_length,
+ char *min_str, char *max_str,
+ size_t *min_length, size_t *max_length);
+
+/* For ASCII-based multi-byte character sets with mbminlen=1 */
+my_bool my_like_range_mb(const CHARSET_INFO *cs,
+ const char *ptr, size_t ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ size_t res_length,
+ char *min_str, char *max_str,
+ size_t *min_length, size_t *max_length);
+
+/* For other character sets, with arbitrary mbminlen and mbmaxlen numbers */
+my_bool my_like_range_generic(const CHARSET_INFO *cs,
+ const char *ptr, size_t ptr_length,
+ pbool escape, pbool w_one, pbool w_many,
+ size_t res_length,
+ char *min_str, char *max_str,
+ size_t *min_length, size_t *max_length);
+
+int my_wildcmp_8bit(const CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+int my_wildcmp_bin(const CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+size_t my_numchars_8bit(const CHARSET_INFO *, const char *b, const char *e);
+size_t my_numcells_8bit(const CHARSET_INFO *, const char *b, const char *e);
+size_t my_charpos_8bit(const CHARSET_INFO *, const char *b, const char *e,
+ size_t pos);
+size_t my_well_formed_len_8bit(const CHARSET_INFO *, const char *b,
+ const char *e, size_t pos, int *error);
+uint my_mbcharlen_8bit(const CHARSET_INFO *, uint c);
+
+
+/* Functions for multibyte charsets */
+extern size_t my_caseup_str_mb(const CHARSET_INFO *, char *);
+extern size_t my_casedn_str_mb(const CHARSET_INFO *, char *);
+extern size_t my_caseup_mb(const CHARSET_INFO *, char *src, size_t srclen,
+ char *dst, size_t dstlen);
+extern size_t my_casedn_mb(const CHARSET_INFO *, char *src, size_t srclen,
+ char *dst, size_t dstlen);
+extern size_t my_caseup_mb_varlen(const CHARSET_INFO *, char *src,
+ size_t srclen, char *dst, size_t dstlen);
+extern size_t my_casedn_mb_varlen(const CHARSET_INFO *, char *src,
+ size_t srclen, char *dst, size_t dstlen);
+extern size_t my_caseup_ujis(const CHARSET_INFO *, char *src, size_t srclen,
+ char *dst, size_t dstlen);
+extern size_t my_casedn_ujis(const CHARSET_INFO *, char *src, size_t srclen,
+ char *dst, size_t dstlen);
+extern int my_strcasecmp_mb(const CHARSET_INFO * cs,const char *,
+ const char *);
+
+int my_wildcmp_mb(const CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+size_t my_numchars_mb(const CHARSET_INFO *, const char *b, const char *e);
+size_t my_numcells_mb(const CHARSET_INFO *, const char *b, const char *e);
+size_t my_charpos_mb(const CHARSET_INFO *, const char *b, const char *e,
+ size_t pos);
+size_t my_well_formed_len_mb(const CHARSET_INFO *, const char *b,
+ const char *e, size_t pos, int *error);
+uint my_instr_mb(const struct charset_info_st *,
+ const char *b, size_t b_length,
+ const char *s, size_t s_length,
+ my_match_t *match, uint nmatch);
+
+int my_strnncoll_mb_bin(const CHARSET_INFO * cs,
+ const uchar *s, size_t slen,
+ const uchar *t, size_t tlen,
+ my_bool t_is_prefix);
+
+int my_strnncollsp_mb_bin(const CHARSET_INFO *cs,
+ const uchar *a, size_t a_length,
+ const uchar *b, size_t b_length,
+ my_bool diff_if_only_endspace_difference);
+
+int my_wildcmp_mb_bin(const CHARSET_INFO *cs,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
+int my_strcasecmp_mb_bin(const CHARSET_INFO * cs __attribute__((unused)),
+ const char *s, const char *t);
+
+void my_hash_sort_mb_bin(const CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *key, size_t len,ulong *nr1, ulong *nr2);
+
+size_t my_strnxfrm_mb(const CHARSET_INFO *,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags);
+
+size_t my_strnxfrm_unicode(const CHARSET_INFO *,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags);
+
+size_t my_strnxfrm_unicode_full_bin(const CHARSET_INFO *,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags);
+size_t my_strnxfrmlen_unicode_full_bin(const CHARSET_INFO *, size_t);
+
+int my_wildcmp_unicode(const CHARSET_INFO *cs,
+ const char *str, const char *str_end,
+ const char *wildstr, const char *wildend,
+ int escape, int w_one, int w_many,
+ MY_UNICASE_INFO *weights);
+
+extern my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader,
+ const char *buf, size_t buflen);
+extern char *my_strchr(const CHARSET_INFO *cs, const char *str,
+ const char *end, pchar c);
+extern size_t my_strcspn(const CHARSET_INFO *cs, const char *str,
+ const char *end, const char *accept);
+
+my_bool my_propagate_simple(const CHARSET_INFO *cs, const uchar *str,
+ size_t len);
+my_bool my_propagate_complex(const CHARSET_INFO *cs, const uchar *str,
+ size_t len);
+
+
+uint my_string_repertoire(const CHARSET_INFO *cs, const char *str, ulong len);
+my_bool my_charset_is_ascii_based(const CHARSET_INFO *cs);
+my_bool my_charset_is_8bit_pure_ascii(const CHARSET_INFO *cs);
+uint my_charset_repertoire(const CHARSET_INFO *cs);
+
+
+uint my_strxfrm_flag_normalize(uint flags, uint nlevels);
+void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
+ uint flags, uint level);
+size_t my_strxfrm_pad_desc_and_reverse(const CHARSET_INFO *cs,
+ uchar *str, uchar *frmend, uchar *strend,
+ uint nweights, uint flags, uint level);
+
+my_bool my_charset_is_ascii_compatible(const CHARSET_INFO *cs);
+
+const MY_CONTRACTIONS *my_charset_get_contractions(const CHARSET_INFO *cs,
+ int level);
+
+extern size_t my_vsnprintf_ex(const CHARSET_INFO *cs, char *to, size_t n,
+ const char* fmt, va_list ap);
+
+uint32 my_convert(char *to, uint32 to_length, const CHARSET_INFO *to_cs,
+ const char *from, uint32 from_length,
+ const CHARSET_INFO *from_cs, uint *errors);
+
+#define _MY_U 01 /* Upper case */
+#define _MY_L 02 /* Lower case */
+#define _MY_NMR 04 /* Numeral (digit) */
+#define _MY_SPC 010 /* Spacing character */
+#define _MY_PNT 020 /* Punctuation */
+#define _MY_CTR 040 /* Control character */
+#define _MY_B 0100 /* Blank */
+#define _MY_X 0200 /* heXadecimal digit */
+
+
+#define my_isascii(c) (!((c) & ~0177))
+#define my_toascii(c) ((c) & 0177)
+#define my_tocntrl(c) ((c) & 31)
+#define my_toprint(c) ((c) | 64)
+#define my_toupper(s,c) (char) ((s)->to_upper[(uchar) (c)])
+#define my_tolower(s,c) (char) ((s)->to_lower[(uchar) (c)])
+#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L))
+#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_U)
+#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_L)
+#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_NMR)
+#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X)
+#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR))
+#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_SPC)
+#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_PNT)
+#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
+#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
+#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_CTR)
+
+/* Some macros that should be cleaned up a little */
+#define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_')
+#define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_')
+
+#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
+#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
+#define my_strnxfrm(cs, d, dl, s, sl) \
+ ((cs)->coll->strnxfrm((cs), (d), (dl), (dl), (s), (sl), MY_STRXFRM_PAD_WITH_SPACE))
+#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
+#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
+ ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
+#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m)))
+#define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b)))
+#define my_charpos(cs, b, e, num) (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num))
+
+
+#define use_mb(s) ((s)->cset->ismbchar != NULL)
+#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b)))
+#ifdef USE_MB
+#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
+#else
+#define my_mbcharlen(s, a) 1
+#endif
+
+#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
+#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
+#define my_strntol(s, a, b, c, d, e) ((s)->cset->strntol((s),(a),(b),(c),(d),(e)))
+#define my_strntoul(s, a, b, c, d, e) ((s)->cset->strntoul((s),(a),(b),(c),(d),(e)))
+#define my_strntoll(s, a, b, c, d, e) ((s)->cset->strntoll((s),(a),(b),(c),(d),(e)))
+#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e)))
+#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s),(a),(b),(c),(d)))
+
+
+/* XXX: still need to take care of this one */
+#ifdef MY_CHARSET_TIS620
+#error The TIS620 charset is broken at the moment. Tell tim to fix it.
+#define USE_TIS620
+#include "t_ctype.h"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _m_ctype_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/m_string.h b/BuildTools/centos/dep/mysql-5.6.14/include/m_string.h
new file mode 100644
index 000000000..06f8bfadf
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/m_string.h
@@ -0,0 +1,286 @@
+/*
+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* There may be prolems include all of theese. Try to test in
+ configure with ones are needed? */
+
+/* This is needed for the definitions of strchr... on solaris */
+
+#ifndef _m_string_h
+#define _m_string_h
+
+#include "my_global.h" /* HAVE_* */
+
+#ifndef __USE_GNU
+#define __USE_GNU /* We want to use stpcpy */
+#endif
+#if defined(HAVE_STRINGS_H)
+#include
+#endif
+#if defined(HAVE_STRING_H)
+#include
+#endif
+
+/* need by my_vsnprintf */
+#include
+
+/* This is needed for the definitions of memcpy... on solaris */
+#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
+#include
+#endif
+
+#define bfill please_use_memset_rather_than_bfill()
+#define bzero please_use_memset_rather_than_bzero()
+
+#if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE)
+# define memcpy(d, s, n) bcopy ((s), (d), (n))
+# define memmove(d, s, n) bmove ((d), (s), (n))
+#elif defined(HAVE_MEMMOVE)
+# define bmove(d, s, n) memmove((d), (s), (n))
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/*
+ my_str_malloc(), my_str_realloc() and my_str_free() are assigned to
+ implementations in strings/alloc.c, but can be overridden in
+ the calling program.
+ */
+extern void *(*my_str_malloc)(size_t);
+extern void *(*my_str_realloc)(void *, size_t);
+extern void (*my_str_free)(void *);
+
+#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
+#define strmov(A,B) __builtin_stpcpy((A),(B))
+#elif defined(HAVE_STPCPY)
+#define strmov(A,B) stpcpy((A),(B))
+#ifndef stpcpy
+extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
+#endif
+#endif
+
+/* Declared in int2str() */
+extern char _dig_vec_upper[];
+extern char _dig_vec_lower[];
+
+#ifndef strmov
+#define strmov_overlapp(A,B) strmov(A,B)
+#define strmake_overlapp(A,B,C) strmake(A,B,C)
+#endif
+
+ /* Prototypes for string functions */
+
+extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
+extern void bchange(uchar *dst,size_t old_len,const uchar *src,
+ size_t new_len,size_t tot_len);
+extern void strappend(char *s,size_t len,pchar fill);
+extern char *strend(const char *s);
+extern char *strcend(const char *, pchar);
+extern char *strfill(char * s,size_t len,pchar fill);
+extern char *strmake(char *dst,const char *src,size_t length);
+
+#ifndef strmov
+extern char *strmov(char *dst,const char *src);
+#else
+extern char *strmov_overlapp(char *dst,const char *src);
+#endif
+extern char *strnmov(char *dst, const char *src, size_t n);
+extern char *strcont(const char *src, const char *set);
+extern char *strxmov(char *dst, const char *src, ...);
+extern char *strxnmov(char *dst, size_t len, const char *src, ...);
+
+/* Prototypes of normal stringfunctions (with may ours) */
+#ifndef HAVE_STRNLEN
+extern size_t strnlen(const char *s, size_t n);
+#endif
+
+extern int is_prefix(const char *, const char *);
+
+/* Conversion routines */
+typedef enum {
+ MY_GCVT_ARG_FLOAT,
+ MY_GCVT_ARG_DOUBLE
+} my_gcvt_arg_type;
+
+double my_strtod(const char *str, char **end, int *error);
+double my_atof(const char *nptr);
+size_t my_fcvt(double x, int precision, char *to, my_bool *error);
+size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
+ my_bool *error);
+
+#define NOT_FIXED_DEC 31
+
+/*
+ The longest string my_fcvt can return is 311 + "precision" bytes.
+ Here we assume that we never cal my_fcvt() with precision >= NOT_FIXED_DEC
+ (+ 1 byte for the terminating '\0').
+*/
+#define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC)
+
+/*
+ We want to use the 'e' format in some cases even if we have enough space
+ for the 'f' one just to mimic sprintf("%.15g") behavior for large integers,
+ and to improve it for numbers < 10^(-4).
+ That is, for |x| < 1 we require |x| >= 10^(-15), and for |x| > 1 we require
+ it to be integer and be <= 10^DBL_DIG for the 'f' format to be used.
+ We don't lose precision, but make cases like "1e200" or "0.00001" look nicer.
+*/
+#define MAX_DECPT_FOR_F_FORMAT DBL_DIG
+
+/*
+ The maximum possible field width for my_gcvt() conversion.
+ (DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or
+ MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is used).
+*/
+#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + MY_MAX(5, MAX_DECPT_FOR_F_FORMAT)) \
+
+extern char *llstr(longlong value,char *buff);
+extern char *ullstr(longlong value,char *buff);
+#ifndef HAVE_STRTOUL
+extern long strtol(const char *str, char **ptr, int base);
+extern ulong strtoul(const char *str, char **ptr, int base);
+#endif
+
+extern char *int2str(long val, char *dst, int radix, int upcase);
+extern char *int10_to_str(long val,char *dst,int radix);
+extern char *str2int(const char *src,int radix,long lower,long upper,
+ long *val);
+longlong my_strtoll10(const char *nptr, char **endptr, int *error);
+#if SIZEOF_LONG == SIZEOF_LONG_LONG
+#define ll2str(A,B,C,D) int2str((A),(B),(C),(D))
+#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
+#undef strtoll
+#define strtoll(A,B,C) strtol((A),(B),(C))
+#define strtoull(A,B,C) strtoul((A),(B),(C))
+#ifndef HAVE_STRTOULL
+#define HAVE_STRTOULL
+#endif
+#ifndef HAVE_STRTOLL
+#define HAVE_STRTOLL
+#endif
+#else
+#ifdef HAVE_LONG_LONG
+extern char *ll2str(longlong val,char *dst,int radix, int upcase);
+extern char *longlong10_to_str(longlong val,char *dst,int radix);
+#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
+extern longlong strtoll(const char *str, char **ptr, int base);
+extern ulonglong strtoull(const char *str, char **ptr, int base);
+#endif
+#endif
+#endif
+#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
+
+#if defined(__cplusplus)
+}
+#endif
+
+/*
+ LEX_STRING -- a pair of a C-string and its length.
+ (it's part of the plugin API as a MYSQL_LEX_STRING)
+*/
+
+#include
+typedef struct st_mysql_lex_string LEX_STRING;
+
+#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
+#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
+#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
+
+struct st_mysql_const_lex_string
+{
+ const char *str;
+ size_t length;
+};
+typedef struct st_mysql_const_lex_string LEX_CSTRING;
+
+/* SPACE_INT is a word that contains only spaces */
+#if SIZEOF_INT == 4
+#define SPACE_INT 0x20202020
+#elif SIZEOF_INT == 8
+#define SPACE_INT 0x2020202020202020
+#else
+#error define the appropriate constant for a word full of spaces
+#endif
+
+/**
+ Skip trailing space.
+
+ On most systems reading memory in larger chunks (ideally equal to the size of
+ the chinks that the machine physically reads from memory) causes fewer memory
+ access loops and hence increased performance.
+ This is why the 'int' type is used : it's closest to that (according to how
+ it's defined in C).
+ So when we determine the amount of whitespace at the end of a string we do
+ the following :
+ 1. We divide the string into 3 zones :
+ a) from the start of the string (__start) to the first multiple
+ of sizeof(int) (__start_words)
+ b) from the end of the string (__end) to the last multiple of sizeof(int)
+ (__end_words)
+ c) a zone that is aligned to sizeof(int) and can be safely accessed
+ through an int *
+ 2. We start comparing backwards from (c) char-by-char. If all we find is
+ space then we continue
+ 3. If there are elements in zone (b) we compare them as unsigned ints to a
+ int mask (SPACE_INT) consisting of all spaces
+ 4. Finally we compare the remaining part (a) of the string char by char.
+ This covers for the last non-space unsigned int from 3. (if any)
+
+ This algorithm works well for relatively larger strings, but it will slow
+ the things down for smaller strings (because of the additional calculations
+ and checks compared to the naive method). Thus the barrier of length 20
+ is added.
+
+ @param ptr pointer to the input string
+ @param len the length of the string
+ @return the last non-space character
+*/
+
+static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
+{
+ const uchar *end= ptr + len;
+
+ if (len > 20)
+ {
+ const uchar *end_words= (const uchar *)(intptr)
+ (((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
+ const uchar *start_words= (const uchar *)(intptr)
+ ((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
+
+ DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
+ if (end_words > ptr)
+ {
+ while (end > end_words && end[-1] == 0x20)
+ end--;
+ if (end[-1] == 0x20 && start_words < end_words)
+ while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
+ end -= SIZEOF_INT;
+ }
+ }
+ while (end > ptr && end[-1] == 0x20)
+ end--;
+ return (end);
+}
+
+static inline void lex_string_set(LEX_STRING *lex_str, const char *c_str)
+{
+ lex_str->str= (char *) c_str;
+ lex_str->length= strlen(c_str);
+}
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_aes.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_aes.h
new file mode 100644
index 000000000..24ddb6e7f
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_aes.h
@@ -0,0 +1,68 @@
+#ifndef MY_AES_INCLUDED
+#define MY_AES_INCLUDED
+
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+
+/* Header file for my_aes.c */
+/* Wrapper to give simple interface for MySQL to AES standard encryption */
+
+C_MODE_START
+
+#define AES_KEY_LENGTH 128 /* Must be 128 192 or 256 */
+
+/*
+ my_aes_encrypt - Crypt buffer with AES encryption algorithm.
+ source - Pointer to data for encryption
+ source_length - size of encryption data
+ dest - buffer to place encrypted data (must be large enough)
+ key - Key to be used for encryption
+ kel_length - Length of the key. Will handle keys of any length
+
+ returns - size of encrypted data, or negative in case of error.
+*/
+
+int my_aes_encrypt(const char *source, int source_length, char *dest,
+ const char *key, int key_length);
+
+/*
+ my_aes_decrypt - DeCrypt buffer with AES encryption algorithm.
+ source - Pointer to data for decryption
+ source_length - size of encrypted data
+ dest - buffer to place decrypted data (must be large enough)
+ key - Key to be used for decryption
+ kel_length - Length of the key. Will handle keys of any length
+
+ returns - size of original data, or negative in case of error.
+*/
+
+
+int my_aes_decrypt(const char *source, int source_length, char *dest,
+ const char *key, int key_length);
+
+/*
+ my_aes_get_size - get size of buffer which will be large enough for encrypted
+ data
+ source_length - length of data to be encrypted
+
+ returns - size of buffer required to store encrypted data
+*/
+
+int my_aes_get_size(int source_length);
+
+C_MODE_END
+
+#endif /* MY_AES_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_alarm.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_alarm.h
new file mode 100644
index 000000000..57d86f567
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_alarm.h
@@ -0,0 +1,58 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ File to include when we want to use alarm or a loop_counter to display
+ some information when a program is running
+*/
+#ifndef _my_alarm_h
+#define _my_alarm_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int volatile my_have_got_alarm;
+extern ulong my_time_to_wait_for_lock;
+
+#if defined(HAVE_ALARM) && !defined(NO_ALARM_LOOP)
+#include
+#define ALARM_VARIABLES uint alarm_old=0; \
+ sig_return alarm_signal=0
+#define ALARM_INIT my_have_got_alarm=0 ; \
+ alarm_old=(uint) alarm(MY_HOW_OFTEN_TO_ALARM); \
+ alarm_signal=signal(SIGALRM,my_set_alarm_variable);
+#define ALARM_END (void) signal(SIGALRM,alarm_signal); \
+ (void) alarm(alarm_old);
+#define ALARM_TEST my_have_got_alarm
+#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
+#define ALARM_REINIT (void) alarm(MY_HOW_OFTEN_TO_ALARM); \
+ (void) signal(SIGALRM,my_set_alarm_variable);\
+ my_have_got_alarm=0;
+#else
+#define ALARM_REINIT (void) alarm((uint) MY_HOW_OFTEN_TO_ALARM); \
+ my_have_got_alarm=0;
+#endif /* SIGNAL_HANDLER_RESET_ON_DELIVERY */
+#else
+#define ALARM_VARIABLES long alarm_pos=0,alarm_end_pos=MY_HOW_OFTEN_TO_WRITE-1
+#define ALARM_INIT
+#define ALARM_END
+#define ALARM_TEST (alarm_pos++ >= alarm_end_pos)
+#define ALARM_REINIT alarm_end_pos+=MY_HOW_OFTEN_TO_WRITE
+#endif /* HAVE_ALARM */
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_alloc.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_alloc.h
new file mode 100644
index 000000000..9e2ef541b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_alloc.h
@@ -0,0 +1,60 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Data structures for mysys/my_alloc.c (root memory allocator)
+*/
+
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+#define ALLOC_MAX_BLOCK_TO_DROP 4096
+#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
+ struct st_used_mem *next; /* Next block in use */
+ unsigned int left; /* memory left in block */
+ unsigned int size; /* size of block */
+} USED_MEM;
+
+
+typedef struct st_mem_root
+{
+ USED_MEM *free; /* blocks with free memory in it */
+ USED_MEM *used; /* blocks almost without free memory */
+ USED_MEM *pre_alloc; /* preallocated block */
+ /* if block have less memory it will be put in 'used' list */
+ size_t min_malloc;
+ size_t block_size; /* initial block size */
+ unsigned int block_num; /* allocated blocks counter */
+ /*
+ first free block in queue test counter (if it exceed
+ MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list)
+ */
+ unsigned int first_block_usage;
+
+ void (*error_handler)(void);
+} MEM_ROOT;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_atomic.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_atomic.h
new file mode 100644
index 000000000..705f531e3
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_atomic.h
@@ -0,0 +1,289 @@
+#ifndef MY_ATOMIC_INCLUDED
+#define MY_ATOMIC_INCLUDED
+
+/* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ This header defines five atomic operations:
+
+ my_atomic_add#(&var, what)
+ 'Fetch and Add'
+ add 'what' to *var, and return the old value of *var
+
+ my_atomic_fas#(&var, what)
+ 'Fetch And Store'
+ store 'what' in *var, and return the old value of *var
+
+ my_atomic_cas#(&var, &old, new)
+ An odd variation of 'Compare And Set/Swap'
+ if *var is equal to *old, then store 'new' in *var, and return TRUE
+ otherwise store *var in *old, and return FALSE
+ Usually, &old should not be accessed if the operation is successful.
+
+ my_atomic_load#(&var)
+ return *var
+
+ my_atomic_store#(&var, what)
+ store 'what' in *var
+
+ '#' is substituted by a size suffix - 8, 16, 32, 64, or ptr
+ (e.g. my_atomic_add8, my_atomic_fas32, my_atomic_casptr).
+
+ NOTE This operations are not always atomic, so they always must be
+ enclosed in my_atomic_rwlock_rdlock(lock)/my_atomic_rwlock_rdunlock(lock)
+ or my_atomic_rwlock_wrlock(lock)/my_atomic_rwlock_wrunlock(lock).
+ Hint: if a code block makes intensive use of atomic ops, it make sense
+ to take/release rwlock once for the whole block, not for every statement.
+
+ On architectures where these operations are really atomic, rwlocks will
+ be optimized away.
+ 8- and 16-bit atomics aren't implemented for windows (see generic-msvc.h),
+ but can be added, if necessary.
+*/
+
+#ifndef my_atomic_rwlock_init
+
+#define intptr void *
+/**
+ Currently we don't support 8-bit and 16-bit operations.
+ It can be added later if needed.
+*/
+#undef MY_ATOMIC_HAS_8_16
+
+#ifndef MY_ATOMIC_MODE_RWLOCKS
+/*
+ * Attempt to do atomic ops without locks
+ */
+#include "atomic/nolock.h"
+#endif
+
+#ifndef make_atomic_cas_body
+/* nolock.h was not able to generate even a CAS function, fall back */
+#include "atomic/rwlock.h"
+#endif
+
+/* define missing functions by using the already generated ones */
+#ifndef make_atomic_add_body
+#define make_atomic_add_body(S) \
+ int ## S tmp=*a; \
+ while (!my_atomic_cas ## S(a, &tmp, tmp+v)) ; \
+ v=tmp;
+#endif
+#ifndef make_atomic_fas_body
+#define make_atomic_fas_body(S) \
+ int ## S tmp=*a; \
+ while (!my_atomic_cas ## S(a, &tmp, v)) ; \
+ v=tmp;
+#endif
+#ifndef make_atomic_load_body
+#define make_atomic_load_body(S) \
+ ret= 0; /* avoid compiler warning */ \
+ (void)(my_atomic_cas ## S(a, &ret, ret));
+#endif
+#ifndef make_atomic_store_body
+#define make_atomic_store_body(S) \
+ (void)(my_atomic_fas ## S (a, v));
+#endif
+
+/*
+ transparent_union doesn't work in g++
+ Bug ?
+
+ Darwin's gcc doesn't want to put pointers in a transparent_union
+ when built with -arch ppc64. Complains:
+ warning: 'transparent_union' attribute ignored
+*/
+#if defined(__GNUC__) && !defined(__cplusplus) && \
+ ! (defined(__APPLE__) && (defined(_ARCH_PPC64) ||defined (_ARCH_PPC)))
+/*
+ we want to be able to use my_atomic_xxx functions with
+ both signed and unsigned integers. But gcc will issue a warning
+ "passing arg N of `my_atomic_XXX' as [un]signed due to prototype"
+ if the signedness of the argument doesn't match the prototype, or
+ "pointer targets in passing argument N of my_atomic_XXX differ in signedness"
+ if int* is used where uint* is expected (or vice versa).
+ Let's shut these warnings up
+*/
+#define make_transparent_unions(S) \
+ typedef union { \
+ int ## S i; \
+ uint ## S u; \
+ } U_ ## S __attribute__ ((transparent_union)); \
+ typedef union { \
+ int ## S volatile *i; \
+ uint ## S volatile *u; \
+ } Uv_ ## S __attribute__ ((transparent_union));
+#define uintptr intptr
+make_transparent_unions(8)
+make_transparent_unions(16)
+make_transparent_unions(32)
+make_transparent_unions(64)
+make_transparent_unions(ptr)
+#undef uintptr
+#undef make_transparent_unions
+#define a U_a.i
+#define cmp U_cmp.i
+#define v U_v.i
+#define set U_set.i
+#else
+#define U_8 int8
+#define U_16 int16
+#define U_32 int32
+#define U_64 int64
+#define U_ptr intptr
+#define Uv_8 int8
+#define Uv_16 int16
+#define Uv_32 int32
+#define Uv_64 int64
+#define Uv_ptr intptr
+#define U_a volatile *a
+#define U_cmp *cmp
+#define U_v v
+#define U_set set
+#endif /* __GCC__ transparent_union magic */
+
+#define make_atomic_cas(S) \
+static inline int my_atomic_cas ## S(Uv_ ## S U_a, \
+ Uv_ ## S U_cmp, U_ ## S U_set) \
+{ \
+ int8 ret; \
+ make_atomic_cas_body(S); \
+ return ret; \
+}
+
+#define make_atomic_add(S) \
+static inline int ## S my_atomic_add ## S( \
+ Uv_ ## S U_a, U_ ## S U_v) \
+{ \
+ make_atomic_add_body(S); \
+ return v; \
+}
+
+#define make_atomic_fas(S) \
+static inline int ## S my_atomic_fas ## S( \
+ Uv_ ## S U_a, U_ ## S U_v) \
+{ \
+ make_atomic_fas_body(S); \
+ return v; \
+}
+
+#define make_atomic_load(S) \
+static inline int ## S my_atomic_load ## S(Uv_ ## S U_a) \
+{ \
+ int ## S ret; \
+ make_atomic_load_body(S); \
+ return ret; \
+}
+
+#define make_atomic_store(S) \
+static inline void my_atomic_store ## S( \
+ Uv_ ## S U_a, U_ ## S U_v) \
+{ \
+ make_atomic_store_body(S); \
+}
+
+#ifdef MY_ATOMIC_HAS_8_16
+make_atomic_cas(8)
+make_atomic_cas(16)
+#endif
+make_atomic_cas(32)
+make_atomic_cas(64)
+make_atomic_cas(ptr)
+
+#ifdef MY_ATOMIC_HAS_8_16
+make_atomic_add(8)
+make_atomic_add(16)
+#endif
+make_atomic_add(32)
+make_atomic_add(64)
+
+#ifdef MY_ATOMIC_HAS_8_16
+make_atomic_load(8)
+make_atomic_load(16)
+#endif
+make_atomic_load(32)
+make_atomic_load(64)
+make_atomic_load(ptr)
+
+#ifdef MY_ATOMIC_HAS_8_16
+make_atomic_fas(8)
+make_atomic_fas(16)
+#endif
+make_atomic_fas(32)
+make_atomic_fas(64)
+make_atomic_fas(ptr)
+
+#ifdef MY_ATOMIC_HAS_8_16
+make_atomic_store(8)
+make_atomic_store(16)
+#endif
+make_atomic_store(32)
+make_atomic_store(64)
+make_atomic_store(ptr)
+
+#ifdef _atomic_h_cleanup_
+#include _atomic_h_cleanup_
+#undef _atomic_h_cleanup_
+#endif
+
+#undef U_8
+#undef U_16
+#undef U_32
+#undef U_64
+#undef U_ptr
+#undef Uv_8
+#undef Uv_16
+#undef Uv_32
+#undef Uv_64
+#undef Uv_ptr
+#undef a
+#undef cmp
+#undef v
+#undef set
+#undef U_a
+#undef U_cmp
+#undef U_v
+#undef U_set
+#undef make_atomic_add
+#undef make_atomic_cas
+#undef make_atomic_load
+#undef make_atomic_store
+#undef make_atomic_fas
+#undef make_atomic_add_body
+#undef make_atomic_cas_body
+#undef make_atomic_load_body
+#undef make_atomic_store_body
+#undef make_atomic_fas_body
+#undef intptr
+
+/*
+ the macro below defines (as an expression) the code that
+ will be run in spin-loops. Intel manuals recummend to have PAUSE there.
+ It is expected to be defined in include/atomic/ *.h files
+*/
+#ifndef LF_BACKOFF
+#define LF_BACKOFF (1)
+#endif
+
+#define MY_ATOMIC_OK 0
+#define MY_ATOMIC_NOT_1CPU 1
+C_MODE_START
+extern int my_atomic_initialize();
+C_MODE_END
+
+#endif
+
+#endif /* MY_ATOMIC_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_attribute.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_attribute.h
new file mode 100644
index 000000000..78999f256
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_attribute.h
@@ -0,0 +1,69 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Helper macros used for setting different __attributes__
+ on functions in a portable fashion
+*/
+
+#ifndef _my_attribute_h
+#define _my_attribute_h
+
+#if defined(__GNUC__)
+# ifndef GCC_VERSION
+# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+# endif
+#endif
+
+/*
+ Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
+ Some forms of __attribute__ are actually supported in earlier versions of
+ g++, but we just disable them all because we only use them to generate
+ compilation warnings.
+*/
+#ifndef __attribute__
+# if !defined(__GNUC__)
+# define __attribute__(A)
+# elif GCC_VERSION < 2008
+# define __attribute__(A)
+# elif defined(__cplusplus) && GCC_VERSION < 3004
+# define __attribute__(A)
+# endif
+#endif
+
+/*
+ __attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4
+ But that's already covered by the __attribute__ tests above, so this is
+ just a convenience macro.
+*/
+#ifndef ATTRIBUTE_FORMAT
+# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n)))
+#endif
+
+/*
+
+ __attribute__((format(...))) on a function pointer is not supported
+ until gcc 3.1
+*/
+#ifndef ATTRIBUTE_FORMAT_FPTR
+# if (GCC_VERSION >= 3001)
+# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
+# else
+# define ATTRIBUTE_FORMAT_FPTR(style, m, n)
+# endif /* GNUC >= 3.1 */
+#endif
+
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_base.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_base.h
new file mode 100644
index 000000000..5a13b810c
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_base.h
@@ -0,0 +1,632 @@
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+
+/* This file includes constants used with all databases */
+
+#ifndef _my_base_h
+#define _my_base_h
+
+#ifndef stdin /* Included first in handler */
+#define CHSIZE_USED
+#include
+#include /* This includes types */
+#include
+#include
+#include
+
+#ifndef EOVERFLOW
+#define EOVERFLOW 84
+#endif
+
+#endif /* stdin */
+#include
+
+/* The following is bits in the flag parameter to ha_open() */
+
+#define HA_OPEN_ABORT_IF_LOCKED 0 /* default */
+#define HA_OPEN_WAIT_IF_LOCKED 1
+#define HA_OPEN_IGNORE_IF_LOCKED 2
+#define HA_OPEN_TMP_TABLE 4 /* Table is a temp table */
+#define HA_OPEN_DELAY_KEY_WRITE 8 /* Don't update index */
+#define HA_OPEN_ABORT_IF_CRASHED 16
+#define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */
+#define HA_OPEN_FROM_SQL_LAYER 64
+#define HA_OPEN_MMAP 128 /* open memory mapped */
+#define HA_OPEN_COPY 256 /* Open copy (for repair) */
+/* Internal temp table, used for temporary results */
+#define HA_OPEN_INTERNAL_TABLE 512
+/**
+ Don't connect any share_psi to the handler, since it is a partition.
+ It would not be used, since partitions don't call unbind_psi()/rebind_psi().
+*/
+#define HA_OPEN_NO_PSI_CALL 1024 /* Don't call/connect PSI */
+
+/* The following is parameter to ha_rkey() how to use key */
+
+/*
+ We define a complete-field prefix of a key value as a prefix where
+ the last included field in the prefix contains the full field, not
+ just some bytes from the start of the field. A partial-field prefix
+ is allowed to contain only a few first bytes from the last included
+ field.
+
+ Below HA_READ_KEY_EXACT, ..., HA_READ_BEFORE_KEY can take a
+ complete-field prefix of a key value as the search
+ key. HA_READ_PREFIX and HA_READ_PREFIX_LAST could also take a
+ partial-field prefix, but currently (4.0.10) they are only used with
+ complete-field prefixes. MySQL uses a padding trick to implement
+ LIKE 'abc%' queries.
+
+ NOTE that in InnoDB HA_READ_PREFIX_LAST will NOT work with a
+ partial-field prefix because InnoDB currently strips spaces from the
+ end of varchar fields!
+*/
+
+enum ha_rkey_function {
+ HA_READ_KEY_EXACT, /* Find first record else error */
+ HA_READ_KEY_OR_NEXT, /* Record or next record */
+ HA_READ_KEY_OR_PREV, /* Record or previous */
+ HA_READ_AFTER_KEY, /* Find next rec. after key-record */
+ HA_READ_BEFORE_KEY, /* Find next rec. before key-record */
+ HA_READ_PREFIX, /* Key which as same prefix */
+ HA_READ_PREFIX_LAST, /* Last key with the same prefix */
+ HA_READ_PREFIX_LAST_OR_PREV, /* Last or prev key with the same prefix */
+ HA_READ_MBR_CONTAIN, /* Minimum Bounding Rectangle contains */
+ HA_READ_MBR_INTERSECT, /* Minimum Bounding Rectangle intersect */
+ HA_READ_MBR_WITHIN, /* Minimum Bounding Rectangle within */
+ HA_READ_MBR_DISJOINT, /* Minimum Bounding Rectangle disjoint */
+ HA_READ_MBR_EQUAL /* Minimum Bounding Rectangle equal */
+};
+
+ /* Key algorithm types */
+
+enum ha_key_alg {
+ HA_KEY_ALG_UNDEF= 0, /* Not specified (old file) */
+ HA_KEY_ALG_BTREE= 1, /* B-tree, default one */
+ HA_KEY_ALG_RTREE= 2, /* R-tree, for spatial searches */
+ HA_KEY_ALG_HASH= 3, /* HASH keys (HEAP tables) */
+ HA_KEY_ALG_FULLTEXT= 4 /* FULLTEXT (MyISAM tables) */
+};
+
+ /* Storage media types */
+
+enum ha_storage_media {
+ HA_SM_DEFAULT= 0, /* Not specified (engine default) */
+ HA_SM_DISK= 1, /* DISK storage */
+ HA_SM_MEMORY= 2 /* MAIN MEMORY storage */
+};
+
+ /* The following is parameter to ha_extra() */
+
+enum ha_extra_function {
+ HA_EXTRA_NORMAL=0, /* Optimize for space (def) */
+ HA_EXTRA_QUICK=1, /* Optimize for speed */
+ HA_EXTRA_NOT_USED=2,
+ HA_EXTRA_CACHE=3, /* Cache record in HA_rrnd() */
+ HA_EXTRA_NO_CACHE=4, /* End caching of records (def) */
+ HA_EXTRA_NO_READCHECK=5, /* No readcheck on update */
+ HA_EXTRA_READCHECK=6, /* Use readcheck (def) */
+ HA_EXTRA_KEYREAD=7, /* Read only key to database */
+ HA_EXTRA_NO_KEYREAD=8, /* Normal read of records (def) */
+ HA_EXTRA_NO_USER_CHANGE=9, /* No user is allowed to write */
+ HA_EXTRA_KEY_CACHE=10,
+ HA_EXTRA_NO_KEY_CACHE=11,
+ HA_EXTRA_WAIT_LOCK=12, /* Wait until file is avalably (def) */
+ HA_EXTRA_NO_WAIT_LOCK=13, /* If file is locked, return quickly */
+ HA_EXTRA_WRITE_CACHE=14, /* Use write cache in ha_write() */
+ HA_EXTRA_FLUSH_CACHE=15, /* flush write_record_cache */
+ HA_EXTRA_NO_KEYS=16, /* Remove all update of keys */
+ HA_EXTRA_KEYREAD_CHANGE_POS=17, /* Keyread, but change pos */
+ /* xxxxchk -r must be used */
+ HA_EXTRA_REMEMBER_POS=18, /* Remember pos for next/prev */
+ HA_EXTRA_RESTORE_POS=19,
+ HA_EXTRA_REINIT_CACHE=20, /* init cache from current record */
+ HA_EXTRA_FORCE_REOPEN=21, /* Datafile have changed on disk */
+ HA_EXTRA_FLUSH, /* Flush tables to disk */
+ HA_EXTRA_NO_ROWS, /* Don't write rows */
+ HA_EXTRA_RESET_STATE, /* Reset positions */
+ HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/
+ HA_EXTRA_NO_IGNORE_DUP_KEY,
+ HA_EXTRA_PREPARE_FOR_DROP,
+ HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */
+ HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */
+ /*
+ On-the-fly switching between unique and non-unique key inserting.
+ */
+ HA_EXTRA_CHANGE_KEY_TO_UNIQUE,
+ HA_EXTRA_CHANGE_KEY_TO_DUP,
+ /*
+ When using HA_EXTRA_KEYREAD, overwrite only key member fields and keep
+ other fields intact. When this is off (by default) InnoDB will use memcpy
+ to overwrite entire row.
+ */
+ HA_EXTRA_KEYREAD_PRESERVE_FIELDS,
+ HA_EXTRA_MMAP,
+ /*
+ Ignore if the a tuple is not found, continue processing the
+ transaction and ignore that 'row'. Needed for idempotency
+ handling on the slave
+
+ Currently only used by NDB storage engine. Partition handler ignores flag.
+ */
+ HA_EXTRA_IGNORE_NO_KEY,
+ HA_EXTRA_NO_IGNORE_NO_KEY,
+ /*
+ Mark the table as a log table. For some handlers (e.g. CSV) this results
+ in a special locking for the table.
+ */
+ HA_EXTRA_MARK_AS_LOG_TABLE,
+ /*
+ Informs handler that write_row() which tries to insert new row into the
+ table and encounters some already existing row with same primary/unique
+ key can replace old row with new row instead of reporting error (basically
+ it informs handler that we do REPLACE instead of simple INSERT).
+ Off by default.
+ */
+ HA_EXTRA_WRITE_CAN_REPLACE,
+ HA_EXTRA_WRITE_CANNOT_REPLACE,
+ /*
+ Inform handler that delete_row()/update_row() cannot batch deletes/updates
+ and should perform them immediately. This may be needed when table has
+ AFTER DELETE/UPDATE triggers which access to subject table.
+ These flags are reset by the handler::extra(HA_EXTRA_RESET) call.
+ */
+ HA_EXTRA_DELETE_CANNOT_BATCH,
+ HA_EXTRA_UPDATE_CANNOT_BATCH,
+ /*
+ Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be
+ executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
+ */
+ HA_EXTRA_INSERT_WITH_UPDATE,
+ /* Inform handler that we will do a rename */
+ HA_EXTRA_PREPARE_FOR_RENAME,
+ /*
+ Special actions for MERGE tables.
+ */
+ HA_EXTRA_ADD_CHILDREN_LIST,
+ HA_EXTRA_ATTACH_CHILDREN,
+ HA_EXTRA_IS_ATTACHED_CHILDREN,
+ HA_EXTRA_DETACH_CHILDREN,
+ /*
+ Prepare table for export
+ (e.g. quiesce the table and write table metadata).
+ */
+ HA_EXTRA_EXPORT
+};
+
+/* Compatible option, to be deleted in 6.0 */
+#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP
+
+ /* The following is parameter to ha_panic() */
+
+enum ha_panic_function {
+ HA_PANIC_CLOSE, /* Close all databases */
+ HA_PANIC_WRITE, /* Unlock and write status */
+ HA_PANIC_READ /* Lock and read keyinfo */
+};
+
+ /* The following is parameter to ha_create(); keytypes */
+
+enum ha_base_keytype {
+ HA_KEYTYPE_END=0,
+ HA_KEYTYPE_TEXT=1, /* Key is sorted as letters */
+ HA_KEYTYPE_BINARY=2, /* Key is sorted as unsigned chars */
+ HA_KEYTYPE_SHORT_INT=3,
+ HA_KEYTYPE_LONG_INT=4,
+ HA_KEYTYPE_FLOAT=5,
+ HA_KEYTYPE_DOUBLE=6,
+ HA_KEYTYPE_NUM=7, /* Not packed num with pre-space */
+ HA_KEYTYPE_USHORT_INT=8,
+ HA_KEYTYPE_ULONG_INT=9,
+ HA_KEYTYPE_LONGLONG=10,
+ HA_KEYTYPE_ULONGLONG=11,
+ HA_KEYTYPE_INT24=12,
+ HA_KEYTYPE_UINT24=13,
+ HA_KEYTYPE_INT8=14,
+ /* Varchar (0-255 bytes) with length packed with 1 byte */
+ HA_KEYTYPE_VARTEXT1=15, /* Key is sorted as letters */
+ HA_KEYTYPE_VARBINARY1=16, /* Key is sorted as unsigned chars */
+ /* Varchar (0-65535 bytes) with length packed with 2 bytes */
+ HA_KEYTYPE_VARTEXT2=17, /* Key is sorted as letters */
+ HA_KEYTYPE_VARBINARY2=18, /* Key is sorted as unsigned chars */
+ HA_KEYTYPE_BIT=19
+};
+
+#define HA_MAX_KEYTYPE 31 /* Must be log2-1 */
+
+ /* These flags kan be OR:ed to key-flag */
+
+#define HA_NOSAME 1 /* Set if not dupplicated records */
+#define HA_PACK_KEY 2 /* Pack string key to previous key */
+#define HA_AUTO_KEY 16
+#define HA_BINARY_PACK_KEY 32 /* Packing of all keys to prev key */
+#define HA_FULLTEXT 128 /* For full-text search */
+#define HA_UNIQUE_CHECK 256 /* Check the key for uniqueness */
+#define HA_SPATIAL 1024 /* For spatial search */
+#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */
+#define HA_GENERATED_KEY 8192 /* Automaticly generated key */
+
+ /* The combination of the above can be used for key type comparison. */
+#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
+ HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
+ HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
+
+/*
+ Key contains partial segments.
+
+ This flag is internal to the MySQL server by design. It is not supposed
+ neither to be saved in FRM-files, nor to be passed to storage engines.
+ It is intended to pass information into internal static sort_keys(KEY *,
+ KEY *) function.
+
+ This flag can be calculated -- it's based on key lengths comparison.
+*/
+#define HA_KEY_HAS_PART_KEY_SEG 65536
+
+ /* Automatic bits in key-flag */
+
+#define HA_SPACE_PACK_USED 4 /* Test for if SPACE_PACK used */
+#define HA_VAR_LENGTH_KEY 8
+#define HA_NULL_PART_KEY 64
+#define HA_USES_COMMENT 4096
+#define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */
+#define HA_USES_BLOCK_SIZE ((uint) 32768)
+#define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */
+
+ /* These flags can be added to key-seg-flag */
+
+#define HA_SPACE_PACK 1 /* Pack space in key-seg */
+#define HA_PART_KEY_SEG 4 /* Used by MySQL for part-key-cols */
+#define HA_VAR_LENGTH_PART 8
+#define HA_NULL_PART 16
+#define HA_BLOB_PART 32
+#define HA_SWAP_KEY 64
+#define HA_REVERSE_SORT 128 /* Sort key in reverse order */
+#define HA_NO_SORT 256 /* do not bother sorting on this keyseg */
+/*
+ End space in unique/varchar are considered equal. (Like 'a' and 'a ')
+ Only needed for internal temporary tables.
+*/
+#define HA_END_SPACE_ARE_EQUAL 512
+#define HA_BIT_PART 1024
+
+ /* optionbits for database */
+#define HA_OPTION_PACK_RECORD 1
+#define HA_OPTION_PACK_KEYS 2
+#define HA_OPTION_COMPRESS_RECORD 4
+#define HA_OPTION_LONG_BLOB_PTR 8 /* new ISAM format */
+#define HA_OPTION_TMP_TABLE 16
+#define HA_OPTION_CHECKSUM 32
+#define HA_OPTION_DELAY_KEY_WRITE 64
+#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */
+#define HA_OPTION_CREATE_FROM_ENGINE 256
+#define HA_OPTION_RELIES_ON_SQL_LAYER 512
+#define HA_OPTION_NULL_FIELDS 1024
+#define HA_OPTION_PAGE_CHECKSUM 2048
+/** STATS_PERSISTENT=1 has been specified in the SQL command (either CREATE
+or ALTER TABLE). Table and index statistics that are collected by the
+storage engine and used by the optimizer for query optimization will be
+stored on disk and will not change after a server restart. */
+#define HA_OPTION_STATS_PERSISTENT 4096
+/** STATS_PERSISTENT=0 has been specified in CREATE/ALTER TABLE. Statistics
+for the table will be wiped away on server shutdown and new ones recalculated
+after the server is started again. If none of HA_OPTION_STATS_PERSISTENT or
+HA_OPTION_NO_STATS_PERSISTENT is set, this means that the setting is not
+explicitly set at table level and the corresponding table will use whatever
+is the global server default. */
+#define HA_OPTION_NO_STATS_PERSISTENT 8192
+#define HA_OPTION_TEMP_COMPRESS_RECORD ((uint) 16384) /* set by isamchk */
+#define HA_OPTION_READ_ONLY_DATA ((uint) 32768) /* Set by isamchk */
+
+ /* Bits in flag to create() */
+
+#define HA_DONT_TOUCH_DATA 1 /* Don't empty datafile (isamchk) */
+#define HA_PACK_RECORD 2 /* Request packed record format */
+#define HA_CREATE_TMP_TABLE 4
+#define HA_CREATE_CHECKSUM 8
+#define HA_CREATE_KEEP_FILES 16 /* don't overwrite .MYD and MYI */
+#define HA_CREATE_PAGE_CHECKSUM 32
+#define HA_CREATE_DELAY_KEY_WRITE 64
+#define HA_CREATE_RELIES_ON_SQL_LAYER 128
+#define HA_CREATE_INTERNAL_TABLE 256
+
+/*
+ The following flags (OR-ed) are passed to handler::info() method.
+ The method copies misc handler information out of the storage engine
+ to data structures accessible from MySQL
+
+ Same flags are also passed down to mi_status, myrg_status, etc.
+*/
+
+/* this one is not used */
+#define HA_STATUS_POS 1
+/*
+ assuming the table keeps shared actual copy of the 'info' and
+ local, possibly outdated copy, the following flag means that
+ it should not try to get the actual data (locking the shared structure)
+ slightly outdated version will suffice
+*/
+#define HA_STATUS_NO_LOCK 2
+/* update the time of the last modification (in handler::update_time) */
+#define HA_STATUS_TIME 4
+/*
+ update the 'constant' part of the info:
+ handler::max_data_file_length, max_index_file_length, create_time
+ sortkey, ref_length, block_size, data_file_name, index_file_name.
+ handler::table->s->keys_in_use, keys_for_keyread, rec_per_key
+*/
+#define HA_STATUS_CONST 8
+/*
+ update the 'variable' part of the info:
+ handler::records, deleted, data_file_length, index_file_length,
+ check_time, mean_rec_length
+*/
+#define HA_STATUS_VARIABLE 16
+/*
+ get the information about the key that caused last duplicate value error
+ update handler::errkey and handler::dupp_ref
+ see handler::get_dup_key()
+*/
+#define HA_STATUS_ERRKEY 32
+/*
+ update handler::auto_increment_value
+*/
+#define HA_STATUS_AUTO 64
+/*
+ Get also delete_length when HA_STATUS_VARIABLE is called. It's ok to set it also
+ when only HA_STATUS_VARIABLE but it won't be used.
+*/
+#define HA_STATUS_VARIABLE_EXTRA 128
+
+/*
+ Errorcodes given by handler functions
+
+ opt_sum_query() assumes these codes are > 1
+ Do not add error numbers before HA_ERR_FIRST.
+ If necessary to add lower numbers, change HA_ERR_FIRST accordingly.
+*/
+#define HA_ERR_FIRST 120 /* Copy of first error nr.*/
+
+#define HA_ERR_KEY_NOT_FOUND 120 /* Didn't find key on read or update */
+#define HA_ERR_FOUND_DUPP_KEY 121 /* Dupplicate key on write */
+#define HA_ERR_INTERNAL_ERROR 122 /* Internal error */
+#define HA_ERR_RECORD_CHANGED 123 /* Uppdate with is recoverable */
+#define HA_ERR_WRONG_INDEX 124 /* Wrong index given to function */
+#define HA_ERR_CRASHED 126 /* Indexfile is crashed */
+#define HA_ERR_WRONG_IN_RECORD 127 /* Record-file is crashed */
+#define HA_ERR_OUT_OF_MEM 128 /* Record-file is crashed */
+#define HA_ERR_NOT_A_TABLE 130 /* not a MYI file - no signature */
+#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */
+#define HA_ERR_OLD_FILE 132 /* old databasfile */
+#define HA_ERR_NO_ACTIVE_RECORD 133 /* No record read in update() */
+#define HA_ERR_RECORD_DELETED 134 /* A record is not there */
+#define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */
+#define HA_ERR_INDEX_FILE_FULL 136 /* No more room in file */
+#define HA_ERR_END_OF_FILE 137 /* end in next/prev/first/last */
+#define HA_ERR_UNSUPPORTED 138 /* unsupported extension used */
+#define HA_ERR_TO_BIG_ROW 139 /* Too big row */
+#define HA_WRONG_CREATE_OPTION 140 /* Wrong create option */
+#define HA_ERR_FOUND_DUPP_UNIQUE 141 /* Dupplicate unique on write */
+#define HA_ERR_UNKNOWN_CHARSET 142 /* Can't open charset */
+#define HA_ERR_WRONG_MRG_TABLE_DEF 143 /* conflicting tables in MERGE */
+#define HA_ERR_CRASHED_ON_REPAIR 144 /* Last (automatic?) repair failed */
+#define HA_ERR_CRASHED_ON_USAGE 145 /* Table must be repaired */
+#define HA_ERR_LOCK_WAIT_TIMEOUT 146
+#define HA_ERR_LOCK_TABLE_FULL 147
+#define HA_ERR_READ_ONLY_TRANSACTION 148 /* Updates not allowed */
+#define HA_ERR_LOCK_DEADLOCK 149
+#define HA_ERR_CANNOT_ADD_FOREIGN 150 /* Cannot add a foreign key constr. */
+#define HA_ERR_NO_REFERENCED_ROW 151 /* Cannot add a child row */
+#define HA_ERR_ROW_IS_REFERENCED 152 /* Cannot delete a parent row */
+#define HA_ERR_NO_SAVEPOINT 153 /* No savepoint with that name */
+#define HA_ERR_NON_UNIQUE_BLOCK_SIZE 154 /* Non unique key block size */
+#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */
+#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
+#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
+/* NULLs are not supported in spatial index */
+#define HA_ERR_NULL_IN_SPATIAL 158
+#define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */
+/* There's no partition in table for given value */
+#define HA_ERR_NO_PARTITION_FOUND 160
+#define HA_ERR_RBR_LOGGING_FAILED 161 /* Row-based binlogging of row failed */
+#define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr */
+/*
+ Upholding foreign key constraints would lead to a duplicate key error
+ in some other table.
+*/
+#define HA_ERR_FOREIGN_DUPLICATE_KEY 163
+/* The table changed in storage engine */
+#define HA_ERR_TABLE_NEEDS_UPGRADE 164
+#define HA_ERR_TABLE_READONLY 165 /* The table is not writable */
+
+#define HA_ERR_AUTOINC_READ_FAILED 166 /* Failed to get next autoinc value */
+#define HA_ERR_AUTOINC_ERANGE 167 /* Failed to set row autoinc value */
+#define HA_ERR_GENERIC 168 /* Generic error */
+/* row not actually updated: new values same as the old values */
+#define HA_ERR_RECORD_IS_THE_SAME 169
+/* It is not possible to log this statement */
+#define HA_ERR_LOGGING_IMPOSSIBLE 170 /* It is not possible to log this
+ statement */
+#define HA_ERR_CORRUPT_EVENT 171 /* The event was corrupt, leading to
+ illegal data being read */
+#define HA_ERR_NEW_FILE 172 /* New file format */
+#define HA_ERR_ROWS_EVENT_APPLY 173 /* The event could not be processed
+ no other hanlder error happened */
+#define HA_ERR_INITIALIZATION 174 /* Error during initialization */
+#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */
+#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */
+#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
+/* There's no explicitly listed partition in table for the given value */
+#define HA_ERR_NOT_IN_LOCK_PARTITIONS 178
+#define HA_ERR_INDEX_COL_TOO_LONG 179 /* Index column length exceeds limit */
+#define HA_ERR_INDEX_CORRUPT 180 /* InnoDB index corrupted */
+#define HA_ERR_UNDO_REC_TOO_BIG 181 /* Undo log record too big */
+#define HA_FTS_INVALID_DOCID 182 /* Invalid InnoDB Doc ID */
+#define HA_ERR_TABLE_IN_FK_CHECK 183 /* Table being used in foreign key check */
+#define HA_ERR_TABLESPACE_EXISTS 184 /* The tablespace existed in storage engine */
+#define HA_ERR_TOO_MANY_FIELDS 185 /* Table has too many columns */
+#define HA_ERR_ROW_IN_WRONG_PARTITION 186 /* Row in wrong partition */
+#define HA_ERR_INNODB_READ_ONLY 187 /* InnoDB is in read only mode. */
+#define HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT 188 /* FTS query exceeds result cache limit */
+#define HA_ERR_LAST 188 /* Copy of last error nr */
+
+/* Number of different errors */
+#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
+
+ /* Other constants */
+
+#define HA_NAMELEN 64 /* Max length of saved filename */
+#define NO_SUCH_KEY (~(uint)0) /* used as a key no. */
+
+typedef ulong key_part_map;
+#define HA_WHOLE_KEY (~(key_part_map)0)
+
+ /* Intern constants in databases */
+
+ /* bits in _search */
+#define SEARCH_FIND 1
+#define SEARCH_NO_FIND 2
+#define SEARCH_SAME 4
+#define SEARCH_BIGGER 8
+#define SEARCH_SMALLER 16
+#define SEARCH_SAVE_BUFF 32
+#define SEARCH_UPDATE 64
+#define SEARCH_PREFIX 128
+#define SEARCH_LAST 256
+#define MBR_CONTAIN 512
+#define MBR_INTERSECT 1024
+#define MBR_WITHIN 2048
+#define MBR_DISJOINT 4096
+#define MBR_EQUAL 8192
+#define MBR_DATA 16384
+#define SEARCH_NULL_ARE_EQUAL 32768 /* NULL in keys are equal */
+#define SEARCH_NULL_ARE_NOT_EQUAL 65536 /* NULL in keys are not equal */
+
+ /* bits in opt_flag */
+#define QUICK_USED 1
+#define READ_CACHE_USED 2
+#define READ_CHECK_USED 4
+#define KEY_READ_USED 8
+#define WRITE_CACHE_USED 16
+#define OPT_NO_ROWS 32
+
+ /* bits in update */
+#define HA_STATE_CHANGED 1 /* Database has changed */
+#define HA_STATE_AKTIV 2 /* Has a current record */
+#define HA_STATE_WRITTEN 4 /* Record is written */
+#define HA_STATE_DELETED 8
+#define HA_STATE_NEXT_FOUND 16 /* Next found record (record before) */
+#define HA_STATE_PREV_FOUND 32 /* Prev found record (record after) */
+#define HA_STATE_NO_KEY 64 /* Last read didn't find record */
+#define HA_STATE_KEY_CHANGED 128
+#define HA_STATE_WRITE_AT_END 256 /* set in _ps_find_writepos */
+#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */
+#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */
+#define HA_STATE_EXTEND_BLOCK 2048
+#define HA_STATE_RNEXT_SAME 4096 /* rnext_same occupied lastkey2 */
+
+/* myisampack expects no more than 32 field types. */
+enum en_fieldtype {
+ FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
+ FIELD_SKIP_ZERO,FIELD_BLOB,FIELD_CONSTANT,FIELD_INTERVALL,FIELD_ZERO,
+ FIELD_VARCHAR,FIELD_CHECK,
+ FIELD_enum_val_count
+};
+
+enum data_file_type {
+ STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD
+};
+
+/* For key ranges */
+
+enum key_range_flag {
+ NO_MIN_RANGE= 1 << 0, ///< from -inf
+ NO_MAX_RANGE= 1 << 1, ///< to +inf
+ /* X < key, i.e. not including the left endpoint */
+ NEAR_MIN= 1 << 2,
+ /* X > key, i.e. not including the right endpoint */
+ NEAR_MAX= 1 << 3,
+ /*
+ This flag means that index is a unique index, and the interval is
+ equivalent to "AND(keypart_i = const_i)", where all of const_i are
+ not NULLs.
+ */
+ UNIQUE_RANGE= 1 << 4,
+ /*
+ This flag means that the interval is equivalent to
+ "AND(keypart_i = const_i)", where not all key parts may be used
+ but all of const_i are not NULLs.
+ */
+ EQ_RANGE= 1 << 5,
+ /*
+ This flag has the same meaning as UNIQUE_RANGE, except that for at
+ least one keypart the condition is "keypart IS NULL".
+ */
+ NULL_RANGE= 1 << 6,
+ GEOM_FLAG= 1 << 7, ///< GIS
+ /* Deprecated, currently used only by NDB at row retrieval */
+ SKIP_RANGE= 1 << 8,
+ /*
+ Used together with EQ_RANGE to indicate that index statistics
+ should be used instead of sampling the index.
+ */
+ USE_INDEX_STATISTICS= 1 << 9
+};
+
+
+typedef struct st_key_range
+{
+ const uchar *key;
+ uint length;
+ key_part_map keypart_map;
+ enum ha_rkey_function flag;
+} key_range;
+
+typedef struct st_key_multi_range
+{
+ key_range start_key;
+ key_range end_key;
+ char *ptr; /* Free to use by caller (ptr to row etc) */
+ uint range_flag; /* key range flags see above */
+} KEY_MULTI_RANGE;
+
+
+/* For number of records */
+#ifdef BIG_TABLES
+#define rows2double(A) ulonglong2double(A)
+typedef my_off_t ha_rows;
+#else
+#define rows2double(A) (double) (A)
+typedef ulong ha_rows;
+#endif
+
+#define HA_POS_ERROR (~ (ha_rows) 0)
+#define HA_OFFSET_ERROR (~ (my_off_t) 0)
+
+#if SYSTEM_SIZEOF_OFF_T == 4
+#define MAX_FILE_SIZE INT_MAX32
+#else
+#define MAX_FILE_SIZE LONGLONG_MAX
+#endif
+
+#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
+
+/* invalidator function reference for Query Cache */
+C_MODE_START
+typedef void (* invalidator_by_filename)(const char * filename);
+C_MODE_END
+
+#endif /* _my_base_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_bit.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_bit.h
new file mode 100644
index 000000000..8d9f485a0
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_bit.h
@@ -0,0 +1,124 @@
+/*
+ Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MY_BIT_INCLUDED
+#define MY_BIT_INCLUDED
+
+/*
+ Some useful bit functions
+*/
+
+C_MODE_START
+
+extern const char _my_bits_nbits[256];
+extern const uchar _my_bits_reverse_table[256];
+
+/*
+ Find smallest X in 2^X >= value
+ This can be used to divide a number with value by doing a shift instead
+*/
+
+static inline uint my_bit_log2(ulong value)
+{
+ uint bit;
+ for (bit=0 ; value > 1 ; value>>=1, bit++) ;
+ return bit;
+}
+
+static inline uint my_count_bits(ulonglong v)
+{
+#if SIZEOF_LONG_LONG > 4
+ /* The following code is a bit faster on 16 bit machines than if we would
+ only shift v */
+ ulong v2=(ulong) (v >> 32);
+ return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
+ _my_bits_nbits[(uchar) (v >> 8)] +
+ _my_bits_nbits[(uchar) (v >> 16)] +
+ _my_bits_nbits[(uchar) (v >> 24)] +
+ _my_bits_nbits[(uchar) (v2)] +
+ _my_bits_nbits[(uchar) (v2 >> 8)] +
+ _my_bits_nbits[(uchar) (v2 >> 16)] +
+ _my_bits_nbits[(uchar) (v2 >> 24)]);
+#else
+ return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
+ _my_bits_nbits[(uchar) (v >> 8)] +
+ _my_bits_nbits[(uchar) (v >> 16)] +
+ _my_bits_nbits[(uchar) (v >> 24)]);
+#endif
+}
+
+static inline uint my_count_bits_uint32(uint32 v)
+{
+ return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
+ _my_bits_nbits[(uchar) (v >> 8)] +
+ _my_bits_nbits[(uchar) (v >> 16)] +
+ _my_bits_nbits[(uchar) (v >> 24)]);
+}
+
+
+/*
+ Next highest power of two
+
+ SYNOPSIS
+ my_round_up_to_next_power()
+ v Value to check
+
+ RETURN
+ Next or equal power of 2
+ Note: 0 will return 0
+
+ NOTES
+ Algorithm by Sean Anderson, according to:
+ http://graphics.stanford.edu/~seander/bithacks.html
+ (Orignal code public domain)
+
+ Comments shows how this works with 01100000000000000000000000001011
+*/
+
+static inline uint32 my_round_up_to_next_power(uint32 v)
+{
+ v--; /* 01100000000000000000000000001010 */
+ v|= v >> 1; /* 01110000000000000000000000001111 */
+ v|= v >> 2; /* 01111100000000000000000000001111 */
+ v|= v >> 4; /* 01111111110000000000000000001111 */
+ v|= v >> 8; /* 01111111111111111100000000001111 */
+ v|= v >> 16; /* 01111111111111111111111111111111 */
+ return v+1; /* 10000000000000000000000000000000 */
+}
+
+static inline uint32 my_clear_highest_bit(uint32 v)
+{
+ uint32 w=v >> 1;
+ w|= w >> 1;
+ w|= w >> 2;
+ w|= w >> 4;
+ w|= w >> 8;
+ w|= w >> 16;
+ return v & w;
+}
+
+static inline uint32 my_reverse_bits(uint32 key)
+{
+ return
+ (_my_bits_reverse_table[ key & 255] << 24) |
+ (_my_bits_reverse_table[(key>> 8) & 255] << 16) |
+ (_my_bits_reverse_table[(key>>16) & 255] << 8) |
+ _my_bits_reverse_table[(key>>24) ];
+}
+
+C_MODE_END
+
+#endif /* MY_BIT_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_bitmap.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_bitmap.h
new file mode 100644
index 000000000..2e0a5457b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_bitmap.h
@@ -0,0 +1,129 @@
+/*
+ Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+#ifndef _my_bitmap_h_
+#define _my_bitmap_h_
+
+#define MY_BIT_NONE (~(uint) 0)
+
+#include
+
+typedef uint32 my_bitmap_map;
+
+typedef struct st_bitmap
+{
+ my_bitmap_map *bitmap;
+ uint n_bits; /* number of bits occupied by the above */
+ my_bitmap_map last_word_mask;
+ my_bitmap_map *last_word_ptr;
+ /*
+ mutex will be acquired for the duration of each bitmap operation if
+ thread_safe flag in bitmap_init was set. Otherwise, we optimize by not
+ acquiring the mutex
+ */
+ mysql_mutex_t *mutex;
+} MY_BITMAP;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern void create_last_word_mask(MY_BITMAP *map);
+extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
+ my_bool thread_safe);
+extern my_bool bitmap_is_clear_all(const MY_BITMAP *map);
+extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size);
+extern my_bool bitmap_is_set_all(const MY_BITMAP *map);
+extern my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2);
+extern my_bool bitmap_is_overlapping(const MY_BITMAP *map1,
+ const MY_BITMAP *map2);
+extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit);
+extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit);
+extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit);
+extern uint bitmap_set_next(MY_BITMAP *map);
+extern uint bitmap_get_first(const MY_BITMAP *map);
+extern uint bitmap_get_first_set(const MY_BITMAP *map);
+extern uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit);
+extern uint bitmap_bits_set(const MY_BITMAP *map);
+extern void bitmap_free(MY_BITMAP *map);
+extern void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit);
+extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size);
+extern void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2);
+extern void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2);
+extern void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2);
+extern void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2);
+extern void bitmap_invert(MY_BITMAP *map);
+extern void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2);
+
+extern uint bitmap_lock_set_next(MY_BITMAP *map);
+extern void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit);
+/* Fast, not thread safe, bitmap functions */
+#define bitmap_buffer_size(bits) (((bits)+31)/32)*4
+#define no_bytes_in_map(map) (((map)->n_bits + 7)/8)
+#define no_words_in_map(map) (((map)->n_bits + 31)/32)
+
+static inline void bitmap_set_bit(MY_BITMAP *map, uint bit)
+{
+ DBUG_ASSERT(bit < map->n_bits);
+ ((uchar*)map->bitmap)[bit / 8] |= (1 << (bit & 7));
+}
+
+
+static inline void bitmap_flip_bit(MY_BITMAP *map, uint bit)
+{
+ DBUG_ASSERT(bit < map->n_bits);
+ ((uchar*)map->bitmap)[bit / 8] ^= (1 << (bit & 7));
+}
+
+
+static inline void bitmap_clear_bit(MY_BITMAP *map, uint bit)
+{
+ DBUG_ASSERT(bit < map->n_bits);
+ ((uchar*)map->bitmap)[bit / 8] &= ~(1 << (bit & 7));
+}
+
+
+static inline my_bool bitmap_is_set(const MY_BITMAP *map, uint bit)
+{
+ DBUG_ASSERT(bit < map->n_bits);
+ return ((uchar*)map->bitmap)[bit / 8] & (1 << (bit & 7));
+}
+
+/**
+ Quite unlike other C comparison functions ending with 'cmp', e.g. memcmp(),
+ strcmp(), this function returns true if the bitmaps are equal, and false
+ otherwise.
+
+ @retval true The bitmaps are equal.
+ @retval false The bitmaps differ.
+ */
+static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
+{
+ if (memcmp(map1->bitmap, map2->bitmap, 4*(no_words_in_map(map1)-1)) != 0)
+ return FALSE;
+ return ((*map1->last_word_ptr | map1->last_word_mask) ==
+ (*map2->last_word_ptr | map2->last_word_mask));
+}
+
+#define bitmap_clear_all(MAP) \
+ { memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); }
+#define bitmap_set_all(MAP) \
+ (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP))))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _my_bitmap_h_ */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_byteorder.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_byteorder.h
new file mode 100644
index 000000000..11c5f2c91
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_byteorder.h
@@ -0,0 +1,54 @@
+#ifndef MY_BYTEORDER_INCLUDED
+#define MY_BYTEORDER_INCLUDED
+
+/* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+
+/*
+ Macro for reading 32-bit integer from network byte order (big-endian)
+ from a unaligned memory location.
+*/
+#define int4net(A) (int32) (((uint32) ((uchar) (A)[3])) | \
+ (((uint32) ((uchar) (A)[2])) << 8) | \
+ (((uint32) ((uchar) (A)[1])) << 16) | \
+ (((uint32) ((uchar) (A)[0])) << 24))
+
+/*
+ Function-like macros for reading and storing in machine independent
+ format (low byte first). There are 'korr' (assume 'corrector') variants
+ for integer types, but 'get' (assume 'getter') for floating point types.
+*/
+#if defined(__i386__) || defined(_WIN32)
+#define MY_BYTE_ORDER_ARCH_OPTIMIZED
+#include "byte_order_generic_x86.h"
+#elif defined(__x86_64__)
+#include "byte_order_generic_x86_64.h"
+#else
+#include "byte_order_generic.h"
+#endif
+
+/*
+ Function-like macros for reading and storing in machine format from/to
+ short/long to/from some place in memory V should be a variable (not on
+ a register) and M a pointer to byte.
+*/
+#ifdef WORDS_BIGENDIAN
+#include "big_endian.h"
+#else
+#include "little_endian.h"
+#endif
+
+#endif /* MY_BYTEORDER_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_compare.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_compare.h
new file mode 100644
index 000000000..8c3825c7f
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_compare.h
@@ -0,0 +1,147 @@
+/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+#ifndef _my_compare_h
+#define _my_compare_h
+
+#include "myisampack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "m_ctype.h" /* CHARSET_INFO */
+
+/*
+ There is a hard limit for the maximum number of keys as there are only
+ 8 bits in the index file header for the number of keys in a table.
+ This means that 0..255 keys can exist for a table. The idea of
+ HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
+ a MyISAM table for which one has more keys than MyISAM is normally
+ compiled for. If you don't have this, you will get a core dump when
+ running myisamchk compiled for 128 keys on a table with 255 keys.
+*/
+
+#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */
+/*
+ The following defines can be increased if necessary.
+ But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
+*/
+
+#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
+#define HA_MAX_KEY_SEG 16 /* Max segments for key */
+
+#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
+#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
+
+typedef struct st_HA_KEYSEG /* Key-portion */
+{
+ const CHARSET_INFO *charset;
+ uint32 start; /* Start of key in record */
+ uint32 null_pos; /* position to NULL indicator */
+ uint16 bit_pos; /* Position to bit part */
+ uint16 flag;
+ uint16 length; /* Keylength */
+ uint16 language;
+ uint8 type; /* Type of key (for sort) */
+ uint8 null_bit; /* bitmask to test for NULL */
+ uint8 bit_start,bit_end; /* if bit field */
+ uint8 bit_length; /* Length of bit part */
+} HA_KEYSEG;
+
+#define get_key_length(length,key) \
+{ if (*(uchar*) (key) != 255) \
+ length= (uint) *(uchar*) ((key)++); \
+ else \
+ { length= mi_uint2korr((key)+1); (key)+=3; } \
+}
+
+#define get_key_length_rdonly(length,key) \
+{ if (*(uchar*) (key) != 255) \
+ length= ((uint) *(uchar*) ((key))); \
+ else \
+ { length= mi_uint2korr((key)+1); } \
+}
+
+#define get_key_pack_length(length,length_pack,key) \
+{ if (*(uchar*) (key) != 255) \
+ { length= (uint) *(uchar*) ((key)++); length_pack= 1; }\
+ else \
+ { length=mi_uint2korr((key)+1); (key)+= 3; length_pack= 3; } \
+}
+
+#define store_key_length_inc(key,length) \
+{ if ((length) < 255) \
+ { *(key)++= (length); } \
+ else \
+ { *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
+}
+
+#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3)
+
+#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
+ (((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \
+ ((1 << (bit_len)) - 1))
+
+#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
+{ \
+ (bit_ptr)[0]= ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \
+ ((bits) << (bit_ofs)); \
+ if ((bit_ofs) + (bit_len) > 8) \
+ (bit_ptr)[1]= ((bit_ptr)[1] & ~((1 << ((bit_len) - 8 + (bit_ofs))) - 1)) | \
+ ((bits) >> (8 - (bit_ofs))); \
+}
+
+#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
+ set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
+
+extern int ha_compare_text(const CHARSET_INFO *, uchar *, uint, uchar *, uint ,
+ my_bool, my_bool);
+extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
+ register uchar *b, uint key_length, uint nextflag,
+ uint *diff_pos);
+
+/*
+ Inside an in-memory data record, memory pointers to pieces of the
+ record (like BLOBs) are stored in their native byte order and in
+ this amount of bytes.
+*/
+#define portable_sizeof_char_ptr 8
+
+
+/**
+ Return values of index_cond_func_xxx functions.
+
+ 0=ICP_NO_MATCH - index tuple doesn't satisfy the pushed index condition (the
+ engine should discard the tuple and go to the next one)
+ 1=ICP_MATCH - index tuple satisfies the pushed index condition (the engine
+ should fetch and return the record)
+ 2=ICP_OUT_OF_RANGE - index tuple is out range that we're scanning, e.g. this
+ if we're scanning "t.key BETWEEN 10 AND 20" and got a
+ "t.key=21" tuple (the engine should stop scanning and return
+ HA_ERR_END_OF_FILE right away).
+*/
+
+typedef enum icp_result {
+ ICP_NO_MATCH,
+ ICP_MATCH,
+ ICP_OUT_OF_RANGE
+} ICP_RESULT;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _my_compare_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_compiler.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_compiler.h
new file mode 100644
index 000000000..000d4e428
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_compiler.h
@@ -0,0 +1,153 @@
+#ifndef MY_COMPILER_INCLUDED
+#define MY_COMPILER_INCLUDED
+
+/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ Header for compiler-dependent features.
+
+ Intended to contain a set of reusable wrappers for preprocessor
+ macros, attributes, pragmas, and any other features that are
+ specific to a target compiler.
+*/
+
+#include /* stddef.h offsetof */
+
+/**
+ Compiler-dependent internal convenience macros.
+*/
+
+/* GNU C/C++ */
+#if defined __GNUC__
+/* Convenience macro to test the minimum required GCC version. */
+# define MY_GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+/* Any after 2.95... */
+# define MY_ALIGN_EXT
+/* Comunicate to the compiler the unreachability of the code. */
+# if MY_GNUC_PREREQ(4,5)
+# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
+# endif
+
+/* Microsoft Visual C++ */
+#elif defined _MSC_VER
+# define MY_ALIGNOF(type) __alignof(type)
+# define MY_ALIGNED(n) __declspec(align(n))
+
+/* Oracle Solaris Studio */
+#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+# if __SUNPRO_C >= 0x590
+# define MY_ALIGN_EXT
+# endif
+
+/* IBM XL C/C++ */
+#elif defined __xlC__
+# if __xlC__ >= 0x0600
+# define MY_ALIGN_EXT
+# endif
+
+/* HP aCC */
+#elif defined(__HP_aCC) || defined(__HP_cc)
+# if (__HP_aCC >= 60000) || (__HP_cc >= 60000)
+# define MY_ALIGN_EXT
+# endif
+#endif
+
+#ifdef MY_ALIGN_EXT
+/** Specifies the minimum alignment of a type. */
+# define MY_ALIGNOF(type) __alignof__(type)
+/** Determine the alignment requirement of a type. */
+# define MY_ALIGNED(n) __attribute__((__aligned__((n))))
+#endif
+
+/**
+ Generic (compiler-independent) features.
+*/
+
+#ifndef MY_GNUC_PREREQ
+# define MY_GNUC_PREREQ(maj, min) (0)
+#endif
+
+#ifndef MY_ALIGNOF
+# ifdef __cplusplus
+ template struct my_alignof_helper { char m1; type m2; };
+ /* Invalid for non-POD types, but most compilers give the right answer. */
+# define MY_ALIGNOF(type) offsetof(my_alignof_helper, m2)
+# else
+# define MY_ALIGNOF(type) offsetof(struct { char m1; type m2; }, m2)
+# endif
+#endif
+
+#ifndef MY_ASSERT_UNREACHABLE
+# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
+#endif
+
+/**
+ C++ Type Traits
+*/
+
+#ifdef __cplusplus
+
+/**
+ Opaque storage with a particular alignment.
+*/
+# if defined(MY_ALIGNED)
+/* Partial specialization used due to MSVC++. */
+template struct my_alignment_imp;
+template<> struct MY_ALIGNED(1) my_alignment_imp<1> {};
+template<> struct MY_ALIGNED(2) my_alignment_imp<2> {};
+template<> struct MY_ALIGNED(4) my_alignment_imp<4> {};
+template<> struct MY_ALIGNED(8) my_alignment_imp<8> {};
+template<> struct MY_ALIGNED(16) my_alignment_imp<16> {};
+/* ... expand as necessary. */
+# else
+template
+struct my_alignment_imp { double m1; };
+# endif
+
+/**
+ A POD type with a given size and alignment.
+
+ @remark If the compiler does not support a alignment attribute
+ (MY_ALIGN macro), the default alignment of a double is
+ used instead.
+
+ @tparam size The minimum size.
+ @tparam alignment The desired alignment: 1, 2, 4, 8 or 16.
+*/
+template
+struct my_aligned_storage
+{
+ union
+ {
+ char data[size];
+ my_alignment_imp align;
+ };
+};
+
+#endif /* __cplusplus */
+
+# ifndef MY_ALIGNED
+/*
+ Make sure MY_ALIGNED can be used also on platforms where we don't
+ have a way of aligning data structures.
+*/
+#define MY_ALIGNED(size)
+#endif
+
+#include
+
+#endif /* MY_COMPILER_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_config.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_config.h
new file mode 100644
index 000000000..1b3742866
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_config.h
@@ -0,0 +1,667 @@
+/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MY_CONFIG_H
+#define MY_CONFIG_H
+#define DOT_FRM_VERSION 6
+/* Headers we may want to use. */
+#define STDC_HEADERS 1
+#define _GNU_SOURCE 1
+#define HAVE_ALLOCA_H 1
+#define HAVE_AIO_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_ASM_MSR_H 1
+#define HAVE_ASM_TERMBITS_H 1
+#define HAVE_BSEARCH 1
+#define HAVE_CRYPT_H 1
+#define HAVE_CURSES_H 1
+/* #undef HAVE_CXXABI_H */
+/* #undef HAVE_NCURSES_H */
+/* #undef HAVE_NDIR_H */
+#define HAVE_DIRENT_H 1
+#define HAVE_DLFCN_H 1
+#define HAVE_EXECINFO_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FENV_H 1
+#define HAVE_FLOAT_H 1
+/* #undef HAVE_FLOATINGPOINT_H */
+#define HAVE_FNMATCH_H 1
+#define HAVE_FPU_CONTROL_H 1
+#define HAVE_GRP_H 1
+/* #undef HAVE_IA64INTRIN_H */
+/* #undef HAVE_IEEEFP_H */
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_LOCALE_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_PATHS_H 1
+#define HAVE_POLL_H 1
+/* #undef HAVE_PORT_H */
+#define HAVE_PWD_H 1
+#define HAVE_SCHED_H 1
+/* #undef HAVE_SELECT_H */
+/* #undef HAVE_SOLARIS_LARGE_PAGES */
+#define HAVE_STDDEF_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_SEMAPHORE_H 1
+/* #undef HAVE_SYNCH_H */
+/* #undef HAVE_SYSENT_H */
+#define HAVE_SYS_DIR_H 1
+#define HAVE_SYS_CDEFS_H 1
+#define HAVE_SYS_FILE_H 1
+/* #undef HAVE_SYS_FPU_H */
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYS_IPC_H 1
+/* #undef HAVE_SYS_MALLOC_H */
+#define HAVE_SYS_MMAN_H 1
+/* #undef HAVE_SYS_NDIR_H */
+/* #undef HAVE_SYS_PTE_H */
+/* #undef HAVE_SYS_PTEM_H */
+#define HAVE_SYS_PRCTL_H 1
+#define HAVE_SYS_RESOURCE_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_SHM_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_SYS_STAT_H 1
+/* #undef HAVE_SYS_STREAM_H */
+/* #undef HAVE_SYS_TERMCAP_H */
+#define HAVE_SYS_TIMEB_H 1
+#define HAVE_SYS_TIMES_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_UN_H 1
+/* #undef HAVE_SYS_VADVISE_H */
+/* #undef HAVE_TERM_H */
+/* #undef HAVE_TERMBITS_H */
+#define HAVE_TERMIOS_H 1
+#define HAVE_TERMIO_H 1
+/* #undef HAVE_TERMCAP_H */
+#define HAVE_TIME_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UTIME_H 1
+/* #undef HAVE_VARARGS_H */
+/* #undef HAVE_VIS_H */
+/* #undef HAVE_SYS_UTIME_H */
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_SYS_PARAM_H 1
+
+/* Libraries */
+/* #undef HAVE_LIBPTHREAD */
+#define HAVE_LIBM 1
+#define HAVE_LIBDL 1
+/* #undef HAVE_LIBRT */
+/* #undef HAVE_LIBSOCKET */
+/* #undef HAVE_LIBNSL */
+#define HAVE_LIBCRYPT 1
+/* #undef HAVE_LIBMTMALLOC */
+/* #undef HAVE_LIBWRAP */
+/* #undef HAVE_LIBRESOLV */
+/* Does "struct timespec" have a "sec" and "nsec" field? */
+/* #undef HAVE_TIMESPEC_TS_SEC */
+
+/* Readline */
+#define HAVE_HIST_ENTRY 1
+#define USE_LIBEDIT_INTERFACE 1
+
+#define FIONREAD_IN_SYS_IOCTL 1
+#define GWINSZ_IN_SYS_IOCTL 1
+/* #undef TIOCSTAT_IN_SYS_IOCTL */
+/* #undef FIONREAD_IN_SYS_FILIO */
+
+/* Functions we may want to use. */
+/* #undef HAVE_ALIGNED_MALLOC */
+/* #undef HAVE_ALIGNED_FREE */
+/* #undef HAVE_AIOWAIT */
+#define HAVE_ALARM 1
+#define HAVE_ALLOCA 1
+/* #undef HAVE_BMOVE */
+#define HAVE_INDEX 1
+#define HAVE_CHOWN 1
+#define HAVE_CLOCK_GETTIME 1
+#define HAVE_CRYPT 1
+#define HAVE_CUSERID 1
+/* #undef HAVE_DIRECTIO */
+#define HAVE_DLERROR 1
+#define HAVE_DLOPEN 1
+/* #undef HAVE_DOPRNT */
+#define HAVE_FCHMOD 1
+#define HAVE_FCNTL 1
+/* #undef HAVE_FCONVERT */
+#define HAVE_FDATASYNC 1
+#define HAVE_FESETROUND 1
+#define HAVE_FINITE 1
+/* #undef HAVE_FP_EXCEPT */
+/* #undef HAVE_FPSETMASK */
+#define HAVE_FSEEKO 1
+#define HAVE_FSYNC 1
+#define HAVE_FTIME 1
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETCWD 1
+#define HAVE_GETHOSTBYADDR_R 1
+/* #undef HAVE_GETHRTIME */
+#define HAVE_GETLINE 1
+#define HAVE_GETNAMEINFO 1
+#define HAVE_GETPAGESIZE 1
+#define HAVE_GETPASS 1
+/* #undef HAVE_GETPASSPHRASE */
+#define HAVE_GETPWNAM 1
+#define HAVE_GETPWUID 1
+#define HAVE_GETRLIMIT 1
+#define HAVE_GETRUSAGE 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_GETWD 1
+#define HAVE_GMTIME_R 1
+/* #undef gmtime_r */
+#define HAVE_INITGROUPS 1
+/* #undef HAVE_ISSETUGID */
+#define HAVE_GETUID 1
+#define HAVE_GETEUID 1
+#define HAVE_GETGID 1
+#define HAVE_GETEGID 1
+#define HAVE_ISNAN 1
+#define HAVE_ISINF 1
+#define HAVE_LARGE_PAGE_OPTION 1
+#define HAVE_LDIV 1
+#define HAVE_LRAND48 1
+#define HAVE_LOCALTIME_R 1
+#define HAVE_LOG2 1
+#define HAVE_LONGJMP 1
+#define HAVE_LSTAT 1
+#define HAVE_MEMALIGN 1
+/* #define HAVE_MLOCK 1 see Bug#54662 */
+#define HAVE_NPTL 1
+#define HAVE_NL_LANGINFO 1
+#define HAVE_MADVISE 1
+#define HAVE_DECL_MADVISE 1
+#define HAVE_DECL_TGOTO 1
+/* #undef HAVE_DECL_MHA_MAPSIZE_VA */
+#define HAVE_MALLOC_INFO 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MKSTEMP 1
+#define HAVE_MLOCKALL 1
+#define HAVE_MMAP 1
+#define HAVE_MMAP64 1
+#define HAVE_PERROR 1
+#define HAVE_POLL 1
+/* #undef HAVE_PORT_CREATE */
+#define HAVE_POSIX_FALLOCATE 1
+#define HAVE_POSIX_MEMALIGN 1
+#define HAVE_PREAD 1
+#define HAVE_PAUSE_INSTRUCTION 1
+/* #undef HAVE_FAKE_PAUSE_INSTRUCTION */
+/* #undef HAVE_RDTSCLL */
+/* #undef HAVE_READ_REAL_TIME */
+/* #undef HAVE_PTHREAD_ATTR_CREATE */
+#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
+#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
+/* #undef HAVE_PTHREAD_ATTR_SETPRIO */
+/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
+#define HAVE_PTHREAD_ATTR_SETSCOPE 1
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
+#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+#define HAVE_PTHREAD_KEY_DELETE 1
+#define HAVE_PTHREAD_KEY_DELETE 1
+/* #undef HAVE_PTHREAD_KILL */
+#define HAVE_PTHREAD_RWLOCK_RDLOCK 1
+/* #undef HAVE_PTHREAD_SETPRIO_NP */
+/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
+#define HAVE_PTHREAD_SIGMASK 1
+/* #undef HAVE_PTHREAD_THREADMASK */
+/* #undef HAVE_PTHREAD_YIELD_NP */
+#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
+#define PTHREAD_ONCE_INITIALIZER PTHREAD_ONCE_INIT
+#define HAVE_PUTENV 1
+#define HAVE_RE_COMP 1
+#define HAVE_REGCOMP 1
+#define HAVE_READDIR_R 1
+#define HAVE_READLINK 1
+#define HAVE_REALPATH 1
+#define HAVE_RENAME 1
+#define HAVE_RINT 1
+/* #undef HAVE_RWLOCK_INIT */
+#define HAVE_SCHED_YIELD 1
+#define HAVE_SELECT 1
+/* #undef HAVE_SETFD */
+#define HAVE_SETENV 1
+#define HAVE_SETLOCALE 1
+#define HAVE_SIGADDSET 1
+#define HAVE_SIGEMPTYSET 1
+#define HAVE_SIGHOLD 1
+#define HAVE_SIGSET 1
+#define HAVE_SIGSET_T 1
+#define HAVE_SIGACTION 1
+/* #undef HAVE_SIGTHREADMASK */
+#define HAVE_SIGWAIT 1
+#define HAVE_SLEEP 1
+#define HAVE_SNPRINTF 1
+#define HAVE_STPCPY 1
+#define HAVE_STRERROR 1
+#define HAVE_STRCOLL 1
+#define HAVE_STRSIGNAL 1
+/* #undef HAVE_STRLCPY */
+/* #undef HAVE_STRLCAT */
+/* #undef HAVE_FGETLN */
+#define HAVE_STRNLEN 1
+#define HAVE_STRPBRK 1
+#define HAVE_STRSEP 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOK_R 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOULL 1
+#define HAVE_SHMAT 1
+#define HAVE_SHMCTL 1
+#define HAVE_SHMDT 1
+#define HAVE_SHMGET 1
+/* #undef HAVE_TELL */
+#define HAVE_TEMPNAM 1
+/* #undef HAVE_THR_SETCONCURRENCY */
+/* #undef HAVE_THR_YIELD */
+#define HAVE_TIME 1
+#define HAVE_TIMES 1
+#define HAVE_VALLOC 1
+#define HAVE_VIO_READ_BUFF 1
+#define HAVE_VASPRINTF 1
+#define HAVE_VPRINTF 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_FTRUNCATE 1
+#define HAVE_TZNAME 1
+/* #undef HAVE_AIO_READ */
+/* Symbols we may use */
+/* used by stacktrace functions */
+#define HAVE_BSS_START 1
+#define HAVE_BACKTRACE 1
+#define HAVE_BACKTRACE_SYMBOLS 1
+#define HAVE_BACKTRACE_SYMBOLS_FD 1
+/* #undef HAVE_PRINTSTACK */
+#define HAVE_STRUCT_SOCKADDR_IN6 1
+#define HAVE_STRUCT_IN6_ADDR 1
+/* #undef HAVE_NETINET_IN6_H */
+#define HAVE_IPV6 1
+/* #undef ss_family */
+/* #undef HAVE_SOCKADDR_IN_SIN_LEN */
+/* #undef HAVE_SOCKADDR_IN6_SIN6_LEN */
+/* #undef HAVE_TIMESPEC_TS_SEC */
+#define STRUCT_DIRENT_HAS_D_INO 1
+/* #undef STRUCT_DIRENT_HAS_D_NAMLEN */
+#define SPRINTF_RETURNS_INT 1
+
+#define DNS_USE_CPU_CLOCK_FOR_ID 1
+#define HAVE_EPOLL 1
+#define HAVE_EPOLL_CTL 1
+/* #undef HAVE_EVENT_PORTS */
+#define HAVE_INET_NTOP 1
+/* #undef HAVE_KQUEUE */
+/* #undef HAVE_WORKING_KQUEUE */
+#define HAVE_SIGNAL 1
+#define HAVE_TIMERADD 1
+#define HAVE_TIMERCLEAR 1
+#define HAVE_TIMERCMP 1
+#define HAVE_TIMERISSET 1
+
+/* #undef HAVE_DEVPOLL */
+#define HAVE_SIGNAL_H 1
+/* #undef HAVE_SYS_DEVPOLL_H */
+#define HAVE_SYS_EPOLL_H 1
+/* #undef HAVE_SYS_EVENT_H */
+#define HAVE_SYS_QUEUE_H 1
+#define HAVE_TAILQFOREACH 1
+#define USE_MB 1
+#define USE_MB_IDENT 1
+
+/* #undef HAVE_VALGRIND */
+
+/* Types we may use */
+#ifdef __APPLE__
+ /*
+ Special handling required for OSX to support universal binaries that
+ mix 32 and 64 bit architectures.
+ */
+ #if(__LP64__)
+ #define SIZEOF_LONG 8
+ #else
+ #define SIZEOF_LONG 4
+ #endif
+ #define SIZEOF_VOIDP SIZEOF_LONG
+ #define SIZEOF_CHARP SIZEOF_LONG
+ #define SIZEOF_SIZE_T SIZEOF_LONG
+#else
+/* No indentation, to fetch the lines from verification scripts */
+#define SIZEOF_LONG 8
+#define SIZEOF_VOIDP 8
+#define SIZEOF_CHARP 8
+#define SIZEOF_SIZE_T 8
+#endif
+
+#define SIZEOF_CHAR 1
+#define HAVE_CHAR 1
+#define HAVE_LONG 1
+#define HAVE_CHARP 1
+#define SIZEOF_SHORT 2
+#define HAVE_SHORT 1
+#define SIZEOF_INT 4
+#define HAVE_INT 1
+#define SIZEOF_LONG_LONG 8
+#define HAVE_LONG_LONG 1
+#define SIZEOF_OFF_T 8
+#define HAVE_OFF_T 1
+#define SIZEOF_SIGSET_T 128
+#define HAVE_SIGSET_T 1
+#define HAVE_SIZE_T 1
+/* #undef SIZEOF_UCHAR */
+/* #undef HAVE_UCHAR */
+#define SIZEOF_UINT 4
+#define HAVE_UINT 1
+#define SIZEOF_ULONG 8
+#define HAVE_ULONG 1
+/* #undef SIZEOF_INT8 */
+/* #undef HAVE_INT8 */
+/* #undef SIZEOF_UINT8 */
+/* #undef HAVE_UINT8 */
+/* #undef SIZEOF_INT16 */
+/* #undef HAVE_INT16 */
+/* #undef SIZEOF_UINT16 */
+/* #undef HAVE_UINT16 */
+/* #undef SIZEOF_INT32 */
+/* #undef HAVE_INT32 */
+/* #undef SIZEOF_UINT32 */
+/* #undef HAVE_UINT32 */
+#define SIZEOF_U_INT32_T 4
+#define HAVE_U_INT32_T 1
+/* #undef SIZEOF_INT64 */
+/* #undef HAVE_INT64 */
+/* #undef SIZEOF_UINT64 */
+/* #undef HAVE_UINT64 */
+/* #undef SIZEOF_BOOL */
+/* #undef HAVE_BOOL */
+
+#define SOCKET_SIZE_TYPE socklen_t
+
+#define HAVE_MBSTATE_T
+
+#define MAX_INDEXES 64U
+
+#define QSORT_TYPE_IS_VOID 1
+#define RETQSORTTYPE void
+
+#define SIGNAL_RETURN_TYPE_IS_VOID 1
+#define RETSIGTYPE void
+#define VOID_SIGHANDLER 1
+#define STRUCT_RLIMIT struct rlimit
+
+#ifdef __APPLE__
+ #if __BIG_ENDIAN
+ #define WORDS_BIGENDIAN 1
+ #endif
+#else
+/* #undef WORDS_BIGENDIAN */
+#endif
+
+/*
+ Define to `__inline__' or `__inline' if that's what the C compiler calls it.
+*/
+#define C_HAS_inline 1
+#if !(C_HAS_inline)
+#ifndef __cplusplus
+# define inline
+#endif
+#endif
+
+
+#define TARGET_OS_LINUX 1
+
+#define HAVE_WCTYPE_H 1
+#define HAVE_WCHAR_H 1
+#define HAVE_LANGINFO_H 1
+#define HAVE_MBRLEN
+/* #undef HAVE_MBSCMP */
+#define HAVE_MBSRTOWCS
+#define HAVE_WCRTOMB
+#define HAVE_MBRTOWC
+#define HAVE_WCSCOLL
+#define HAVE_WCSDUP
+#define HAVE_WCWIDTH
+#define HAVE_WCTYPE
+#define HAVE_ISWLOWER 1
+#define HAVE_ISWUPPER 1
+#define HAVE_TOWLOWER 1
+#define HAVE_TOWUPPER 1
+#define HAVE_ISWCTYPE 1
+#define HAVE_WCHAR_T 1
+#define HAVE_WCTYPE_T 1
+#define HAVE_WINT_T 1
+
+
+#define HAVE_STRCASECMP 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_STRDUP 1
+#define HAVE_LANGINFO_CODESET
+#define HAVE_TCGETATTR 1
+#define HAVE_FLOCKFILE 1
+
+#define HAVE_WEAK_SYMBOL 1
+/* #undef HAVE_ABI_CXA_DEMANGLE */
+
+
+#define HAVE_POSIX_SIGNALS 1
+/* #undef HAVE_BSD_SIGNALS */
+/* #undef HAVE_SVR3_SIGNALS */
+/* #undef HAVE_V7_SIGNALS */
+
+
+/* #undef HAVE_SOLARIS_STYLE_GETHOST */
+
+/* #undef MY_ATOMIC_MODE_DUMMY */
+/* #undef MY_ATOMIC_MODE_RWLOCKS */
+#define HAVE_GCC_ATOMIC_BUILTINS 1
+/* #undef HAVE_SOLARIS_ATOMIC */
+#define HAVE_DECL_SHM_HUGETLB 1
+#define HAVE_LARGE_PAGES 1
+#define HUGETLB_USE_PROC_MEMINFO 1
+/* #undef NO_FCNTL_NONBLOCK */
+/* #undef NO_ALARM */
+
+/* #undef _LARGE_FILES */
+#define _LARGEFILE_SOURCE 1
+/* #undef _LARGEFILE64_SOURCE */
+#define _FILE_OFFSET_BITS 64
+
+#define TIME_WITH_SYS_TIME 1
+
+#define STACK_DIRECTION -1
+
+#define SYSTEM_TYPE "Linux"
+#define MACHINE_TYPE "x86_64"
+/* #undef HAVE_DTRACE */
+
+#define SIGNAL_WITH_VIO_SHUTDOWN 1
+
+/* Windows stuff, mostly functions, that have Posix analogs but named differently */
+/* #undef S_IROTH */
+/* #undef S_IFIFO */
+/* #undef IPPROTO_IPV6 */
+/* #undef IPV6_V6ONLY */
+/* #undef sigset_t */
+/* #undef mode_t */
+/* #undef SIGQUIT */
+/* #undef SIGPIPE */
+/* #undef isnan */
+/* #undef finite */
+/* #undef popen */
+/* #undef pclose */
+/* #undef ssize_t */
+/* #undef strcasecmp */
+/* #undef strncasecmp */
+/* #undef snprintf */
+/* #undef strtok_r */
+/* #undef strtoll */
+/* #undef strtoull */
+/* #undef vsnprintf */
+#if (_MSC_VER > 1310)
+# define HAVE_SETENV
+#define setenv(a,b,c) _putenv_s(a,b)
+#endif
+/* We don't want the min/max macros */
+#ifdef __WIN__
+#define NOMINMAX
+#endif
+
+/*
+ Memcached config options
+*/
+/* #undef WITH_INNODB_MEMCACHED */
+/* #undef ENABLE_MEMCACHED_SASL */
+/* #undef ENABLE_MEMCACHED_SASL_PWDB */
+/* #undef HAVE_SASL_SASL_H */
+/* #undef HAVE_HTONLL */
+
+/*
+ MySQL features
+*/
+#define ENABLED_LOCAL_INFILE 1
+#define ENABLED_PROFILING 1
+/* #undef EXTRA_DEBUG */
+/* #undef BACKUP_TEST */
+/* #undef CYBOZU */
+#define OPTIMIZER_TRACE 1
+/* #undef USE_SYMDIR */
+
+/*
+ InnoDB config options
+*/
+#define INNODB_COMPILER_HINTS
+
+/* Character sets and collations */
+#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
+#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
+
+#define USE_MB 1
+#define USE_MB_IDENT 1
+/* #undef USE_STRCOLL */
+
+/* This should mean case insensitive file system */
+/* #undef FN_NO_CASE_SENSE */
+
+#define HAVE_CHARSET_armscii8 1
+#define HAVE_CHARSET_ascii 1
+#define HAVE_CHARSET_big5 1
+#define HAVE_CHARSET_cp1250 1
+#define HAVE_CHARSET_cp1251 1
+#define HAVE_CHARSET_cp1256 1
+#define HAVE_CHARSET_cp1257 1
+#define HAVE_CHARSET_cp850 1
+#define HAVE_CHARSET_cp852 1
+#define HAVE_CHARSET_cp866 1
+#define HAVE_CHARSET_cp932 1
+#define HAVE_CHARSET_dec8 1
+#define HAVE_CHARSET_eucjpms 1
+#define HAVE_CHARSET_euckr 1
+#define HAVE_CHARSET_gb2312 1
+#define HAVE_CHARSET_gbk 1
+#define HAVE_CHARSET_geostd8 1
+#define HAVE_CHARSET_greek 1
+#define HAVE_CHARSET_hebrew 1
+#define HAVE_CHARSET_hp8 1
+#define HAVE_CHARSET_keybcs2 1
+#define HAVE_CHARSET_koi8r 1
+#define HAVE_CHARSET_koi8u 1
+#define HAVE_CHARSET_latin1 1
+#define HAVE_CHARSET_latin2 1
+#define HAVE_CHARSET_latin5 1
+#define HAVE_CHARSET_latin7 1
+#define HAVE_CHARSET_macce 1
+#define HAVE_CHARSET_macroman 1
+#define HAVE_CHARSET_sjis 1
+#define HAVE_CHARSET_swe7 1
+#define HAVE_CHARSET_tis620 1
+#define HAVE_CHARSET_ucs2 1
+#define HAVE_CHARSET_ujis 1
+#define HAVE_CHARSET_utf8mb4 1
+/* #undef HAVE_CHARSET_utf8mb3 */
+#define HAVE_CHARSET_utf8 1
+#define HAVE_CHARSET_utf16 1
+#define HAVE_CHARSET_utf32 1
+#define HAVE_UCA_COLLATIONS 1
+#define HAVE_COMPRESS 1
+/* #undef COMPILE_FLAG_WERROR */
+
+/*
+ Stuff that always need to be defined (compile breaks without it)
+*/
+#define HAVE_SPATIAL 1
+#define HAVE_RTREE_KEYS 1
+#define HAVE_QUERY_CACHE 1
+#define BIG_TABLES 1
+
+/*
+ Important storage engines (those that really need define
+ WITH__STORAGE_ENGINE for the whole server)
+*/
+#define WITH_MYISAM_STORAGE_ENGINE 1
+#define WITH_MYISAMMRG_STORAGE_ENGINE 1
+#define WITH_HEAP_STORAGE_ENGINE 1
+#define WITH_CSV_STORAGE_ENGINE 1
+#define WITH_PARTITION_STORAGE_ENGINE 1
+#define WITH_PERFSCHEMA_STORAGE_ENGINE 1
+/* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */
+#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
+# define HAVE_NDB_BINLOG 1
+#endif
+
+#define DEFAULT_MYSQL_HOME "/usr/local/mysql"
+#define SHAREDIR "/usr/local/mysql/share"
+#define DEFAULT_BASEDIR "/usr/local/mysql"
+#define MYSQL_DATADIR "/usr/local/mysql/data"
+#define DEFAULT_CHARSET_HOME "/usr/local/mysql"
+#define PLUGINDIR "/usr/local/mysql/lib/plugin"
+#define DEFAULT_SYSCONFDIR "/usr/local/mysql/etc"
+
+/* #undef SO_EXT */
+
+#define MYSQL_VERSION_MAJOR 5
+#define MYSQL_VERSION_MINOR 6
+#define MYSQL_VERSION_PATCH 14
+#define MYSQL_VERSION_EXTRA ""
+
+#define PACKAGE "mysql"
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_NAME "MySQL Server"
+#define PACKAGE_STRING "MySQL Server 5.6.14"
+#define PACKAGE_TARNAME "mysql"
+#define PACKAGE_VERSION "5.6.14"
+#define VERSION "5.6.14"
+#define PROTOCOL_VERSION 10
+
+
+/* time_t related defines */
+
+#define SIZEOF_TIME_T 8
+/* #undef TIME_T_UNSIGNED */
+
+/* CPU information */
+
+#define CPU_LEVEL1_DCACHE_LINESIZE 64
+
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_dbug.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_dbug.h
new file mode 100644
index 000000000..d8108ea4b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_dbug.h
@@ -0,0 +1,206 @@
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MY_DBUG_INCLUDED
+#define MY_DBUG_INCLUDED
+
+#ifndef __WIN__
+#ifdef HAVE_SYS_TYPES_H
+#include
+#endif
+#ifdef HAVE_UNISTD_H
+#include
+#endif
+#include
+#endif /* not __WIN__ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if !defined(DBUG_OFF) && !defined(_lint)
+
+struct _db_stack_frame_ {
+ const char *func; /* function name of the previous stack frame */
+ const char *file; /* filename of the function of previous frame */
+ uint level; /* this nesting level, highest bit enables tracing */
+ struct _db_stack_frame_ *prev; /* pointer to the previous frame */
+};
+
+struct _db_code_state_;
+extern MYSQL_PLUGIN_IMPORT my_bool _dbug_on_;
+extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int);
+extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len);
+extern int _db_explain_init_(char *buf, size_t len);
+extern int _db_is_pushed_(void);
+extern void _db_setjmp_(void);
+extern void _db_longjmp_(void);
+extern void _db_process_(const char *name);
+extern void _db_push_(const char *control);
+extern void _db_pop_(void);
+extern void _db_set_(const char *control);
+extern void _db_set_init_(const char *control);
+extern void _db_enter_(const char *_func_, const char *_file_, uint _line_,
+ struct _db_stack_frame_ *_stack_frame_);
+extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_);
+extern void _db_pargs_(uint _line_,const char *keyword);
+extern int _db_enabled_();
+extern void _db_doprnt_(const char *format,...)
+ ATTRIBUTE_FORMAT(printf, 1, 2);
+extern void _db_dump_(uint _line_,const char *keyword,
+ const unsigned char *memory, size_t length);
+extern void _db_end_(void);
+extern void _db_lock_file_(void);
+extern void _db_unlock_file_(void);
+extern FILE *_db_fp_(void);
+extern void _db_flush_();
+extern const char* _db_get_func_(void);
+
+#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \
+ _db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
+#define DBUG_LEAVE _db_return_ (__LINE__, &_db_stack_frame_)
+#define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0)
+#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0)
+#define DBUG_EXECUTE(keyword,a1) \
+ do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0)
+#define DBUG_EXECUTE_IF(keyword,a1) \
+ do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0)
+#define DBUG_EVALUATE(keyword,a1,a2) \
+ (_db_keyword_(0,(keyword), 0) ? (a1) : (a2))
+#define DBUG_EVALUATE_IF(keyword,a1,a2) \
+ (_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
+#define DBUG_PRINT(keyword,arglist) \
+ do \
+ { \
+ if (_dbug_on_) \
+ { \
+ _db_pargs_(__LINE__,keyword); \
+ if (_db_enabled_()) \
+ { \
+ _db_doprnt_ arglist; \
+ } \
+ } \
+ } while(0)
+#define DBUG_PUSH(a1) _db_push_ (a1)
+#define DBUG_POP() _db_pop_ ()
+#define DBUG_SET(a1) _db_set_ (a1)
+#define DBUG_SET_INITIAL(a1) _db_set_init_ (a1)
+#define DBUG_PROCESS(a1) _db_process_(a1)
+#define DBUG_FILE _db_fp_()
+#define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1))
+#define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
+#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2)
+#define DBUG_END() _db_end_ ()
+#define DBUG_LOCK_FILE _db_lock_file_()
+#define DBUG_UNLOCK_FILE _db_unlock_file_()
+#define DBUG_ASSERT(A) assert(A)
+#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
+#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
+#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
+#define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
+#ifndef __WIN__
+#define DBUG_ABORT() (_db_flush_(), abort())
+#else
+/*
+ Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can
+ call abort() instead of _exit(3) (now it would cause a "test signal" popup).
+*/
+#include
+#define DBUG_ABORT() (_db_flush_(),\
+ (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\
+ (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
+ _exit(3))
+#endif
+#define DBUG_CHECK_CRASH(func, op) \
+ do { char _dbuf_[255]; strxnmov(_dbuf_, sizeof(_dbuf_)-1, (func), (op)); \
+ DBUG_EXECUTE_IF(_dbuf_, DBUG_ABORT()); } while(0)
+#define DBUG_CRASH_ENTER(func) \
+ DBUG_ENTER(func); DBUG_CHECK_CRASH(func, "_crash_enter")
+#define DBUG_CRASH_RETURN(val) \
+ DBUG_CHECK_CRASH(_db_get_func_(), "_crash_return")
+#define DBUG_CRASH_VOID_RETURN \
+ DBUG_CHECK_CRASH (_db_get_func_(), "_crash_return")
+
+/*
+ Make the program fail, without creating a core file.
+ abort() will send SIGABRT which (most likely) generates core.
+ Use SIGKILL instead, which cannot be caught.
+ We also pause the current thread, until the signal is actually delivered.
+ An alternative would be to use _exit(EXIT_FAILURE),
+ but then valgrind would report lots of memory leaks.
+ */
+#ifdef __WIN__
+#define DBUG_SUICIDE() DBUG_ABORT()
+#else
+extern void _db_suicide_();
+extern void _db_flush_gcov_();
+#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
+#endif
+
+#else /* No debugger */
+
+#define DBUG_ENTER(a1)
+#define DBUG_LEAVE
+#define DBUG_RETURN(a1) do { return(a1); } while(0)
+#define DBUG_VOID_RETURN do { return; } while(0)
+#define DBUG_EXECUTE(keyword,a1) do { } while(0)
+#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
+#define DBUG_EVALUATE(keyword,a1,a2) (a2)
+#define DBUG_EVALUATE_IF(keyword,a1,a2) (a2)
+#define DBUG_PRINT(keyword,arglist) do { } while(0)
+#define DBUG_PUSH(a1) do { } while(0)
+#define DBUG_SET(a1) do { } while(0)
+#define DBUG_SET_INITIAL(a1) do { } while(0)
+#define DBUG_POP() do { } while(0)
+#define DBUG_PROCESS(a1) do { } while(0)
+#define DBUG_SETJMP(a1) setjmp(a1)
+#define DBUG_LONGJMP(a1) longjmp(a1)
+#define DBUG_DUMP(keyword,a1,a2) do { } while(0)
+#define DBUG_END() do { } while(0)
+#define DBUG_ASSERT(A) do { } while(0)
+#define DBUG_LOCK_FILE do { } while(0)
+#define DBUG_FILE (stderr)
+#define DBUG_UNLOCK_FILE do { } while(0)
+#define DBUG_EXPLAIN(buf,len)
+#define DBUG_EXPLAIN_INITIAL(buf,len)
+#define DEBUGGER_OFF do { } while(0)
+#define DEBUGGER_ON do { } while(0)
+#define DBUG_ABORT() do { } while(0)
+#define DBUG_CRASH_ENTER(func)
+#define DBUG_CRASH_RETURN(val) do { return(val); } while(0)
+#define DBUG_CRASH_VOID_RETURN do { return; } while(0)
+#define DBUG_SUICIDE() do { } while(0)
+
+#endif
+
+#ifdef EXTRA_DEBUG
+/**
+ Sync points allow us to force the server to reach a certain line of code
+ and block there until the client tells the server it is ok to go on.
+ The client tells the server to block with SELECT GET_LOCK()
+ and unblocks it with SELECT RELEASE_LOCK(). Used for debugging difficult
+ concurrency problems
+*/
+#define DBUG_SYNC_POINT(lock_name,lock_timeout) \
+ debug_sync_point(lock_name,lock_timeout)
+void debug_sync_point(const char* lock_name, uint lock_timeout);
+#else
+#define DBUG_SYNC_POINT(lock_name,lock_timeout)
+#endif /* EXTRA_DEBUG */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MY_DBUG_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_default.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_default.h
new file mode 100644
index 000000000..40d9f6cb8
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_default.h
@@ -0,0 +1,51 @@
+/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MY_DEFAULT_INCLUDED
+#define MY_DEFAULT_INCLUDED
+
+
+#include "my_global.h"
+
+C_MODE_START
+
+extern const char *my_defaults_extra_file;
+extern const char *my_defaults_group_suffix;
+extern const char *my_defaults_file;
+extern my_bool my_getopt_use_args_separator;
+
+/* Define the type of function to be passed to process_default_option_files */
+typedef int (*Process_option_func)(void *ctx, const char *group_name,
+ const char *option);
+
+my_bool my_getopt_is_args_separator(const char* arg);
+int get_defaults_options(int argc, char **argv,
+ char **defaults, char **extra_defaults,
+ char **group_suffix, char **login_path);
+int my_load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv, const char ***);
+int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
+int my_search_option_files(const char *conf_file, int *argc,
+ char ***argv, uint *args_used,
+ Process_option_func func, void *func_ctx,
+ const char **default_directories);
+void free_defaults(char **argv);
+void my_print_default_files(const char *conf_file);
+void print_defaults(const char *conf_file, const char **groups);
+
+C_MODE_END
+
+#endif // MY_DEFAULT_INCLUDED
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_dir.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_dir.h
new file mode 100644
index 000000000..1ee002cc3
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_dir.h
@@ -0,0 +1,109 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MY_DIR_H
+#define MY_DIR_H
+
+#include "my_global.h"
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* Defines for my_dir and my_stat */
+
+#define MY_S_IFMT S_IFMT /* type of file */
+#define MY_S_IFDIR S_IFDIR /* directory */
+#define MY_S_IFCHR S_IFCHR /* character special */
+#define MY_S_IFBLK S_IFBLK /* block special */
+#define MY_S_IFREG S_IFREG /* regular */
+#define MY_S_IFIFO S_IFIFO /* fifo */
+#define MY_S_ISUID S_ISUID /* set user id on execution */
+#define MY_S_ISGID S_ISGID /* set group id on execution */
+#define MY_S_ISVTX S_ISVTX /* save swapped text even after use */
+#define MY_S_IREAD S_IREAD /* read permission, owner */
+#define MY_S_IWRITE S_IWRITE /* write permission, owner */
+#define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */
+
+#define MY_S_ISDIR(m) (((m) & MY_S_IFMT) == MY_S_IFDIR)
+#define MY_S_ISCHR(m) (((m) & MY_S_IFMT) == MY_S_IFCHR)
+#define MY_S_ISBLK(m) (((m) & MY_S_IFMT) == MY_S_IFBLK)
+#define MY_S_ISREG(m) (((m) & MY_S_IFMT) == MY_S_IFREG)
+#define MY_S_ISFIFO(m) (((m) & MY_S_IFMT) == MY_S_IFIFO)
+
+#define MY_DONT_SORT 512 /* my_lib; Don't sort files */
+#define MY_WANT_STAT 1024 /* my_lib; stat files */
+
+ /* typedefs for my_dir & my_stat */
+
+#ifdef USE_MY_STAT_STRUCT
+
+typedef struct my_stat
+{
+ dev_t st_dev; /* major & minor device numbers */
+ ino_t st_ino; /* inode number */
+ ushort st_mode; /* file permissons (& suid sgid .. bits) */
+ short st_nlink; /* number of links to file */
+ ushort st_uid; /* user id */
+ ushort st_gid; /* group id */
+ dev_t st_rdev; /* more major & minor device numbers (???) */
+ off_t st_size; /* size of file */
+ time_t st_atime; /* time for last read */
+ time_t st_mtime; /* time for last contens modify */
+ time_t st_ctime; /* time for last inode or contents modify */
+} MY_STAT;
+
+#else
+
+#if(_MSC_VER)
+#define MY_STAT struct _stati64 /* 64 bit file size */
+#else
+#define MY_STAT struct stat /* Orginal struct have what we need */
+#endif
+
+#endif /* USE_MY_STAT_STRUCT */
+
+/* Struct describing one file returned from my_dir */
+typedef struct fileinfo
+{
+ char *name;
+ MY_STAT *mystat;
+} FILEINFO;
+
+typedef struct st_my_dir /* Struct returned from my_dir */
+{
+ /*
+ These members are just copies of parts of DYNAMIC_ARRAY structure,
+ which is allocated right after the end of MY_DIR structure (MEM_ROOT
+ for storing names is also resides there). We've left them here because
+ we don't want to change code that uses my_dir.
+ */
+ struct fileinfo *dir_entry;
+ uint number_off_files;
+} MY_DIR;
+
+extern MY_DIR *my_dir(const char *path,myf MyFlags);
+extern void my_dirend(MY_DIR *buffer);
+extern MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags);
+extern int my_fstat(int filenr, MY_STAT *stat_area, myf MyFlags);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MY_DIR_H */
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_getopt.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_getopt.h
new file mode 100644
index 000000000..7f3bb228b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_getopt.h
@@ -0,0 +1,137 @@
+/*
+ Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _my_getopt_h
+#define _my_getopt_h
+
+#include "my_sys.h" /* loglevel */
+
+C_MODE_START
+
+#define GET_NO_ARG 1
+#define GET_BOOL 2
+#define GET_INT 3
+#define GET_UINT 4
+#define GET_LONG 5
+#define GET_ULONG 6
+#define GET_LL 7
+#define GET_ULL 8
+#define GET_STR 9
+#define GET_STR_ALLOC 10
+#define GET_DISABLED 11
+#define GET_ENUM 12
+#define GET_SET 13
+#define GET_DOUBLE 14
+#define GET_FLAGSET 15
+#define GET_PASSWORD 16
+
+#define GET_ASK_ADDR 128
+#define GET_TYPE_MASK 127
+
+/**
+ Enumeration of the my_option::arg_type attributes.
+ It should be noted that for historical reasons variables with the combination
+ arg_type=NO_ARG, my_option::var_type=GET_BOOL still accepts
+ arguments. This is someone counter intuitive and care should be taken
+ if the code is refactored.
+*/
+enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
+
+struct st_typelib;
+
+struct my_option
+{
+ const char *name; /**< Name of the option. name=NULL
+ marks the end of the my_option[]
+ array.
+ */
+ int id; /**< For 0255 no short option
+ is created, but a long option still
+ can be identified uniquely in the
+ my_get_one_option() callback.
+ If an opton needs neither special
+ treatment in the my_get_one_option()
+ nor one-letter short equivalent
+ use id=0.
+ id=-1 is a special case and is used
+ to generate deprecation warnings for
+ plugin options. It should not be
+ used for anything else.
+ */
+ const char *comment; /**< option comment, for autom. --help.
+ if it's NULL the option is not
+ visible in --help.
+ */
+ void *value; /**< A pointer to the variable value */
+ void *u_max_value; /**< The user def. max variable value */
+ struct st_typelib *typelib; /**< Pointer to possible values */
+ ulong var_type; /**< GET_BOOL, GET_ULL, etc */
+ enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */
+ longlong def_value; /**< Default value */
+ longlong min_value; /**< Min allowed value (for numbers) */
+ ulonglong max_value; /**< Max allowed value (for numbers) */
+ longlong sub_size; /**< Unused */
+ long block_size; /**< Value should be a mult. of this (for numbers) */
+ void *app_type; /**< To be used by an application */
+};
+
+
+typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
+/**
+ Used to retrieve a reference to the object (variable) that holds the value
+ for the given option. For example, if var_type is GET_UINT, the function
+ must return a pointer to a variable of type uint. A argument is stored in
+ the location pointed to by the returned pointer.
+*/
+typedef void *(*my_getopt_value)(const char *, uint, const struct my_option *,
+ int *);
+
+
+extern char *disabled_my_option;
+extern my_bool my_getopt_print_errors;
+extern my_bool my_getopt_skip_unknown;
+extern my_error_reporter my_getopt_error_reporter;
+
+extern int handle_options (int *argc, char ***argv,
+ const struct my_option *longopts, my_get_one_option);
+extern int my_handle_options (int *argc, char ***argv,
+ const struct my_option *longopts,
+ my_get_one_option,
+ const char **command_list);
+extern void my_cleanup_options(const struct my_option *options);
+extern void my_cleanup_options(const struct my_option *options);
+extern void my_print_help(const struct my_option *options);
+extern void my_print_variables(const struct my_option *options);
+extern void my_getopt_register_get_addr(my_getopt_value);
+
+ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
+ my_bool *fix);
+longlong getopt_ll_limit_value(longlong, const struct my_option *,
+ my_bool *fix);
+double getopt_double_limit_value(double num, const struct my_option *optp,
+ my_bool *fix);
+my_bool getopt_compare_strings(const char *s, const char *t, uint length);
+ulonglong max_of_int_range(int var_type);
+
+ulonglong getopt_double2ulonglong(double);
+double getopt_ulonglong2double(ulonglong);
+
+C_MODE_END
+
+#endif /* _my_getopt_h */
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_global.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_global.h
new file mode 100644
index 000000000..66feb2cfd
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_global.h
@@ -0,0 +1,1221 @@
+/*
+ Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MY_GLOBAL_INCLUDED
+#define MY_GLOBAL_INCLUDED
+
+/* This is the include file that should be included 'first' in every C file. */
+
+/* Client library users on Windows need this macro defined here. */
+#if !defined(__WIN__) && defined(_WIN32)
+#define __WIN__
+#endif
+
+/*
+ InnoDB depends on some MySQL internals which other plugins should not
+ need. This is because of InnoDB's foreign key support, "safe" binlog
+ truncation, and other similar legacy features.
+
+ We define accessors for these internals unconditionally, but do not
+ expose them in mysql/plugin.h. They are declared in ha_innodb.h for
+ InnoDB's use.
+*/
+#define INNODB_COMPATIBILITY_HOOKS
+
+#ifdef __CYGWIN__
+/* We use a Unix API, so pretend it's not Windows */
+#undef WIN
+#undef WIN32
+#undef _WIN
+#undef _WIN32
+#undef _WIN64
+#undef __WIN__
+#undef __WIN32__
+#define HAVE_ERRNO_AS_DEFINE
+#endif /* __CYGWIN__ */
+
+#if defined(i386) && !defined(__i386__)
+#define __i386__
+#endif
+
+/* Macros to make switching between C and C++ mode easier */
+#ifdef __cplusplus
+#define C_MODE_START extern "C" {
+#define C_MODE_END }
+#else
+#define C_MODE_START
+#define C_MODE_END
+#endif
+
+#ifdef __cplusplus
+#define CPP_UNNAMED_NS_START namespace {
+#define CPP_UNNAMED_NS_END }
+#endif
+
+#include
+
+#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
+#define HAVE_PSI_INTERFACE
+#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
+
+/* Make it easier to add conditional code in _expressions_ */
+#ifdef __WIN__
+#define IF_WIN(A,B) A
+#else
+#define IF_WIN(A,B) B
+#endif
+
+#ifdef HAVE_purify
+#define IF_PURIFY(A,B) A
+#else
+#define IF_PURIFY(A,B) B
+#endif
+
+#ifndef EMBEDDED_LIBRARY
+#ifdef WITH_NDB_BINLOG
+#define HAVE_NDB_BINLOG 1
+#endif
+#endif /* !EMBEDDED_LIBRARY */
+
+#ifndef EMBEDDED_LIBRARY
+#define HAVE_REPLICATION
+#define HAVE_EXTERNAL_CLIENT
+#endif
+
+#if defined (_WIN32)
+/*
+ off_t is 32 bit long. We do not use C runtime functions
+ with off_t but native Win32 file IO APIs, that work with
+ 64 bit offsets.
+*/
+#undef SIZEOF_OFF_T
+#define SIZEOF_OFF_T 8
+
+/*
+ Prevent inclusion of Windows GDI headers - they define symbol
+ ERROR that conflicts with mysql headers.
+*/
+#ifndef NOGDI
+#define NOGDI
+#endif
+
+/* Include common headers.*/
+#include
+#include /* SOCKET */
+#include /* access(), chmod() */
+#include /* getpid() */
+
+#define sleep(a) Sleep((a)*1000)
+
+/* Define missing access() modes. */
+#define F_OK 0
+#define W_OK 2
+#define R_OK 4 /* Test for read permission. */
+
+/* Define missing file locking constants. */
+#define F_RDLCK 1
+#define F_WRLCK 2
+#define F_UNLCK 3
+#define F_TO_EOF 0x3FFFFFFF
+
+/* Shared memory and named pipe connections are supported. */
+#define HAVE_SMEM 1
+#define HAVE_NAMED_PIPE 1
+#define shared_memory_buffer_length 16000
+#define default_shared_memory_base_name "MYSQL"
+#endif /* _WIN32*/
+
+
+/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX */
+#if defined(_AIX) && defined(_LARGE_FILE_API)
+#undef _LARGE_FILE_API
+#endif
+
+/*
+ The macros below are used to allow build of Universal/fat binaries of
+ MySQL and MySQL applications under darwin.
+*/
+#if defined(__APPLE__) && defined(__MACH__)
+# undef SIZEOF_CHARP
+# undef SIZEOF_SHORT
+# undef SIZEOF_INT
+# undef SIZEOF_LONG
+# undef SIZEOF_LONG_LONG
+# undef SIZEOF_OFF_T
+# undef WORDS_BIGENDIAN
+# define SIZEOF_SHORT 2
+# define SIZEOF_INT 4
+# define SIZEOF_LONG_LONG 8
+# define SIZEOF_OFF_T 8
+# if defined(__i386__) || defined(__ppc__)
+# define SIZEOF_CHARP 4
+# define SIZEOF_LONG 4
+# elif defined(__x86_64__) || defined(__ppc64__)
+# define SIZEOF_CHARP 8
+# define SIZEOF_LONG 8
+# else
+# error Building FAT binary for an unknown architecture.
+# endif
+# if defined(__ppc__) || defined(__ppc64__)
+# define WORDS_BIGENDIAN
+# endif
+#endif /* defined(__APPLE__) && defined(__MACH__) */
+
+
+/*
+ The macros below are borrowed from include/linux/compiler.h in the
+ Linux kernel. Use them to indicate the likelyhood of the truthfulness
+ of a condition. This serves two purposes - newer versions of gcc will be
+ able to optimize for branch predication, which could yield siginficant
+ performance gains in frequently executed sections of the code, and the
+ other reason to use them is for documentation
+*/
+
+#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#define likely(x) __builtin_expect((x),1)
+#define unlikely(x) __builtin_expect((x),0)
+
+/* Fix problem with S_ISLNK() on Linux */
+#if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
+#undef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
+/*
+ Temporary solution to solve bug#7156. Include "sys/types.h" before
+ the thread headers, else the function madvise() will not be defined
+*/
+#if defined(HAVE_SYS_TYPES_H) && ( defined(sun) || defined(__sun) )
+#include
+#endif
+
+#ifdef HAVE_THREADS_WITHOUT_SOCKETS
+/* MIT pthreads does not work with unix sockets */
+#undef HAVE_SYS_UN_H
+#endif
+
+#define __EXTENSIONS__ 1 /* We want some extension */
+#ifndef __STDC_EXT__
+#define __STDC_EXT__ 1 /* To get large file support on hpux */
+#endif
+
+/*
+ Solaris 9 include file refers to X/Open document
+
+ System Interfaces and Headers, Issue 5
+
+ saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
+ but apparently other systems (namely FreeBSD) don't agree.
+
+ On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
+ Furthermore, it tests that if a program requires older standard
+ (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
+ run on a new compiler (that defines _STDC_C99) and issues an #error.
+ It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
+ or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
+
+ To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
+ C++ compiler does not!
+
+ So, in a desperate attempt to get correct prototypes for both
+ C and C++ code, we define either _XOPEN_SOURCE=600 or _XOPEN_SOURCE=500
+ depending on the compiler's announced C standard support.
+
+ Cleaner solutions are welcome.
+*/
+#ifdef __sun
+#if __STDC_VERSION__ - 0 >= 199901L
+#define _XOPEN_SOURCE 600
+#else
+#define _XOPEN_SOURCE 500
+#endif
+#endif
+
+#if !defined(__WIN__)
+#ifndef _POSIX_PTHREAD_SEMANTICS
+#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */
+#endif
+
+#if !defined(SCO)
+#define _REENTRANT 1 /* Some thread libraries require this */
+#endif
+#if !defined(_THREAD_SAFE) && !defined(_AIX)
+#define _THREAD_SAFE /* Required for OSF1 */
+#endif
+#if defined(HPUX10) || defined(HPUX11)
+C_MODE_START /* HPUX needs this, signal.h bug */
+#include
+C_MODE_END
+#else
+#include /* AIX must have this included first */
+#endif
+#if !defined(SCO) && !defined(_REENTRANT)
+#define _REENTRANT 1 /* Threads requires reentrant code */
+#endif
+#endif /* !defined(__WIN__) */
+
+/* Go around some bugs in different OS and compilers */
+#ifdef _AIX /* By soren@t.dk */
+#define _H_STRINGS
+#define _SYS_STREAM_H
+/* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */
+#define ulonglong2double(A) my_ulonglong2double(A)
+#define my_off_t2double(A) my_ulonglong2double(A)
+C_MODE_START
+inline double my_ulonglong2double(unsigned long long A) { return (double A); }
+C_MODE_END
+#endif /* _AIX */
+
+#ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */
+#undef HAVE_SNPRINTF
+#endif
+#ifdef HAVE_BROKEN_PREAD
+/*
+ pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without
+ installing the kernel patch PHKL_20349 or greater
+*/
+#undef HAVE_PREAD
+#undef HAVE_PWRITE
+#endif
+
+#ifdef UNDEF_HAVE_INITGROUPS /* For AIX 4.3 */
+#undef HAVE_INITGROUPS
+#endif
+
+#if defined(_lint) && !defined(lint)
+#define lint
+#endif
+#if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG)
+#define _LONG_LONG 1 /* For AIX string library */
+#endif
+
+#ifndef stdin
+#include
+#endif
+#include
+#ifdef HAVE_STDLIB_H
+#include
+#endif
+#ifdef HAVE_STDDEF_H
+#include
+#endif
+
+#include
+#ifdef HAVE_LIMITS_H
+#include
+#endif
+#ifdef HAVE_FLOAT_H
+#include
+#endif
+#ifdef HAVE_FENV_H
+#include /* For fesetround() */
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include
+#endif
+#ifdef HAVE_FCNTL_H
+#include
+#endif
+#ifdef HAVE_SYS_TIMEB_H
+#include /* Avoid warnings on SCO */
+#endif
+#if TIME_WITH_SYS_TIME
+# include
+# include
+#else
+# if HAVE_SYS_TIME_H
+# include
+# else
+# include
+# endif
+#endif /* TIME_WITH_SYS_TIME */
+#ifdef HAVE_UNISTD_H
+#include
+#endif
+#if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA)
+#undef HAVE_ALLOCA
+#undef HAVE_ALLOCA_H
+#endif
+#ifdef HAVE_ALLOCA_H
+#include
+#endif
+
+#include /* Recommended by debian */
+/* We need the following to go around a problem with openssl on solaris */
+#if defined(HAVE_CRYPT_H)
+#include
+#endif
+
+/*
+ A lot of our programs uses asserts, so better to always include it
+ This also fixes a problem when people uses DBUG_ASSERT without including
+ assert.h
+*/
+#include
+
+/* an assert that works at compile-time. only for constant expression */
+#ifdef _some_old_compiler_that_does_not_understand_the_construct_below_
+#define compile_time_assert(X) do { } while(0)
+#else
+#define compile_time_assert(X) \
+ do \
+ { \
+ typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \
+ } while(0)
+#endif
+
+/* Go around some bugs in different OS and compilers */
+#if defined (HPUX11) && defined(_LARGEFILE_SOURCE)
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+#endif
+
+#if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)
+#include /* HPUX 10.20 defines ulong here. UGLY !!! */
+#define HAVE_ULONG
+#endif
+#if defined(HPUX10) && defined(_LARGEFILE64_SOURCE)
+/* Fix bug in setrlimit */
+#undef setrlimit
+#define setrlimit cma_setrlimit64
+#endif
+/* Declare madvise where it is not declared for C++, like Solaris */
+#if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus)
+extern "C" int madvise(void *addr, size_t len, int behav);
+#endif
+
+#define QUOTE_ARG(x) #x /* Quote argument (before cpp) */
+#define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */
+
+/* Paranoid settings. Define I_AM_PARANOID if you are paranoid */
+#ifdef I_AM_PARANOID
+#define DONT_ALLOW_USER_CHANGE 1
+#define DONT_USE_MYSQL_PWD 1
+#endif
+
+/* Does the system remember a signal handler after a signal ? */
+#if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION)
+#define SIGNAL_HANDLER_RESET_ON_DELIVERY
+#endif
+
+/*
+ Deprecated workaround for false-positive uninitialized variables
+ warnings. Those should be silenced using tool-specific heuristics.
+
+ Enabled by default for g++ due to the bug referenced below.
+*/
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
+ (defined(__GNUC__) && defined(__cplusplus))
+#define LINT_INIT(var) var= 0
+#else
+#define LINT_INIT(var)
+#endif
+
+#ifndef SO_EXT
+#ifdef _WIN32
+#define SO_EXT ".dll"
+#elif defined(__APPLE__)
+#define SO_EXT ".dylib"
+#else
+#define SO_EXT ".so"
+#endif
+#endif
+
+/*
+ Suppress uninitialized variable warning without generating code.
+
+ The _cplusplus is a temporary workaround for C++ code pending a fix
+ for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772).
+*/
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
+ defined(__cplusplus) || !defined(__GNUC__)
+#define UNINIT_VAR(x) x= 0
+#else
+/* GCC specific self-initialization which inhibits the warning. */
+#define UNINIT_VAR(x) x= x
+#endif
+
+#if !defined(HAVE_UINT)
+#undef HAVE_UINT
+#define HAVE_UINT
+typedef unsigned int uint;
+typedef unsigned short ushort;
+#endif
+
+#define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; }
+#define test(a) ((a) ? 1 : 0)
+#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
+#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
+#define test_all_bits(a,b) (((a) & (b)) == (b))
+#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))
+
+/* Define some general constants */
+#ifndef TRUE
+#define TRUE (1) /* Logical true */
+#define FALSE (0) /* Logical false */
+#endif
+
+#include
+
+/* The DBUG_ON flag always takes precedence over default DBUG_OFF */
+#if defined(DBUG_ON) && defined(DBUG_OFF)
+#undef DBUG_OFF
+#endif
+
+/* We might be forced to turn debug off, if not turned off already */
+#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF)
+# define DBUG_OFF
+# ifdef DBUG_ON
+# undef DBUG_ON
+# endif
+#endif
+
+/* Some types that is different between systems */
+
+typedef int File; /* File descriptor */
+#ifdef _WIN32
+typedef SOCKET my_socket;
+#else
+typedef int my_socket; /* File descriptor for sockets */
+#define INVALID_SOCKET -1
+#endif
+/* Type for fuctions that handles signals */
+#define sig_handler RETSIGTYPE
+C_MODE_START
+typedef void (*sig_return)();/* Returns type from signal */
+C_MODE_END
+#if defined(__GNUC__) && !defined(_lint)
+typedef char pchar; /* Mixed prototypes can take char */
+typedef char puchar; /* Mixed prototypes can take char */
+typedef char pbool; /* Mixed prototypes can take char */
+typedef short pshort; /* Mixed prototypes can take short int */
+typedef float pfloat; /* Mixed prototypes can take float */
+#else
+typedef int pchar; /* Mixed prototypes can't take char */
+typedef uint puchar; /* Mixed prototypes can't take char */
+typedef int pbool; /* Mixed prototypes can't take char */
+typedef int pshort; /* Mixed prototypes can't take short int */
+typedef double pfloat; /* Mixed prototypes can't take float */
+#endif
+C_MODE_START
+typedef int (*qsort_cmp)(const void *,const void *);
+typedef int (*qsort_cmp2)(const void*, const void *,const void *);
+C_MODE_END
+#define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */
+#ifdef HAVE_SYS_SOCKET_H
+#include
+#endif
+typedef SOCKET_SIZE_TYPE size_socket;
+
+#ifndef SOCKOPT_OPTLEN_TYPE
+#define SOCKOPT_OPTLEN_TYPE size_socket
+#endif
+
+/* file create flags */
+
+#ifndef O_SHARE /* Probably not windows */
+#define O_SHARE 0 /* Flag to my_open for shared files */
+#ifndef O_BINARY
+#define O_BINARY 0 /* Flag to my_open for binary files */
+#endif
+#ifndef FILE_BINARY
+#define FILE_BINARY O_BINARY /* Flag to my_fopen for binary streams */
+#endif
+#ifdef HAVE_FCNTL
+#define HAVE_FCNTL_LOCK
+#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */
+#endif
+#endif /* O_SHARE */
+
+#ifndef O_TEMPORARY
+#define O_TEMPORARY 0
+#endif
+#ifndef O_SHORT_LIVED
+#define O_SHORT_LIVED 0
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
+
+/* additional file share flags for win32 */
+#ifdef __WIN__
+#define _SH_DENYRWD 0x110 /* deny read/write mode & delete */
+#define _SH_DENYWRD 0x120 /* deny write mode & delete */
+#define _SH_DENYRDD 0x130 /* deny read mode & delete */
+#define _SH_DENYDEL 0x140 /* deny delete only */
+#endif /* __WIN__ */
+
+
+/* General constants */
+#define FN_LEN 256 /* Max file name len */
+#define FN_HEADLEN 253 /* Max length of filepart of file name */
+#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */
+#define FN_REFLEN 512 /* Max length of full path-name */
+#define FN_EXTCHAR '.'
+#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */
+#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */
+#define FN_PARENTDIR ".." /* Parent directory; Must be a string */
+
+#ifdef _WIN32
+#define FN_LIBCHAR '\\'
+#define FN_LIBCHAR2 '/'
+#define FN_DIRSEP "/\\" /* Valid directory separators */
+#define FN_EXEEXT ".exe"
+#define FN_SOEXT ".dll"
+#define FN_ROOTDIR "\\"
+#define FN_DEVCHAR ':'
+#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
+#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
+#else
+#define FN_LIBCHAR '/'
+#define FN_LIBCHAR2 '/'
+#define FN_DIRSEP "/" /* Valid directory separators */
+#define FN_EXEEXT ""
+#define FN_SOEXT ".so"
+#define FN_ROOTDIR "/"
+#endif
+
+/*
+ MY_FILE_MIN is Windows speciality and is used to quickly detect
+ the mismatch of CRT and mysys file IO usage on Windows at runtime.
+ CRT file descriptors can be in the range 0-2047, whereas descriptors returned
+ by my_open() will start with 2048. If a file descriptor with value less then
+ MY_FILE_MIN is passed to mysys IO function, chances are it stemms from
+ open()/fileno() and not my_open()/my_fileno.
+
+ For Posix, mysys functions are light wrappers around libc, and MY_FILE_MIN
+ is logically 0.
+*/
+
+#ifdef _WIN32
+#define MY_FILE_MIN 2048
+#else
+#define MY_FILE_MIN 0
+#endif
+
+/*
+ MY_NFILE is the default size of my_file_info array.
+
+ It is larger on Windows, because it all file handles are stored in my_file_info
+ Default size is 16384 and this should be enough for most cases.If it is not
+ enough, --max-open-files with larger value can be used.
+
+ For Posix , my_file_info array is only used to store filenames for
+ error reporting and its size is not a limitation for number of open files.
+*/
+#ifdef _WIN32
+#define MY_NFILE (16384 + MY_FILE_MIN)
+#else
+#define MY_NFILE 64
+#endif
+
+#ifndef OS_FILE_LIMIT
+#define OS_FILE_LIMIT UINT_MAX
+#endif
+
+/*
+ Io buffer size; Must be a power of 2 and a multiple of 512. May be
+ smaller what the disk page size. This influences the speed of the
+ isam btree library. eg to big to slow.
+*/
+#define IO_SIZE 4096
+/*
+ How much overhead does malloc have. The code often allocates
+ something like 1024-MALLOC_OVERHEAD bytes
+*/
+#define MALLOC_OVERHEAD 8
+
+ /* get memory in huncs */
+#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD)
+ /* Typical record cash */
+#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD)
+ /* Typical key cash */
+#define KEY_CACHE_SIZE (uint) (8*1024*1024)
+ /* Default size of a key cache block */
+#define KEY_CACHE_BLOCK_SIZE (uint) 1024
+
+
+ /* Some things that this system doesn't have */
+
+#ifdef _WIN32
+#define NO_DIR_LIBRARY /* Not standard dir-library */
+#endif
+
+/* Some defines of functions for portability */
+
+#undef remove /* Crashes MySQL on SCO 5.0.0 */
+#ifndef __WIN__
+#define closesocket(A) close(A)
+#endif
+
+#if (_MSC_VER)
+#if !defined(_WIN64)
+inline double my_ulonglong2double(unsigned long long value)
+{
+ long long nr=(long long) value;
+ if (nr >= 0)
+ return (double) nr;
+ return (18446744073709551616.0 + (double) nr);
+}
+#define ulonglong2double my_ulonglong2double
+#define my_off_t2double my_ulonglong2double
+#endif /* _WIN64 */
+inline unsigned long long my_double2ulonglong(double d)
+{
+ double t= d - (double) 0x8000000000000000ULL;
+
+ if (t >= 0)
+ return ((unsigned long long) t) + 0x8000000000000000ULL;
+ return (unsigned long long) d;
+}
+#define double2ulonglong my_double2ulonglong
+#endif
+
+#ifndef ulonglong2double
+#define ulonglong2double(A) ((double) (ulonglong) (A))
+#define my_off_t2double(A) ((double) (my_off_t) (A))
+#endif
+#ifndef double2ulonglong
+#define double2ulonglong(A) ((ulonglong) (double) (A))
+#endif
+
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+#define ulong_to_double(X) ((double) (ulong) (X))
+
+#ifndef STACK_DIRECTION
+#error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
+#endif
+
+#if !defined(HAVE_STRTOK_R)
+#define strtok_r(A,B,C) strtok((A),(B))
+#endif
+
+/* This is from the old m-machine.h file */
+
+#if SIZEOF_LONG_LONG > 4
+#define HAVE_LONG_LONG 1
+#endif
+
+/*
+ Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define
+ ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined.
+*/
+
+#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
+#define LONGLONG_MIN ((long long) 0x8000000000000000LL)
+#define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL)
+#endif
+
+#if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)
+/* First check for ANSI C99 definition: */
+#ifdef ULLONG_MAX
+#define ULONGLONG_MAX ULLONG_MAX
+#else
+#define ULONGLONG_MAX ((unsigned long long)(~0ULL))
+#endif
+#endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/
+
+#define INT_MIN64 (~0x7FFFFFFFFFFFFFFFLL)
+#define INT_MAX64 0x7FFFFFFFFFFFFFFFLL
+#define INT_MIN32 (~0x7FFFFFFFL)
+#define INT_MAX32 0x7FFFFFFFL
+#define UINT_MAX32 0xFFFFFFFFL
+#define INT_MIN24 (~0x007FFFFF)
+#define INT_MAX24 0x007FFFFF
+#define UINT_MAX24 0x00FFFFFF
+#define INT_MIN16 (~0x7FFF)
+#define INT_MAX16 0x7FFF
+#define UINT_MAX16 0xFFFF
+#define INT_MIN8 (~0x7F)
+#define INT_MAX8 0x7F
+#define UINT_MAX8 0xFF
+
+/* From limits.h instead */
+#ifndef DBL_MIN
+#define DBL_MIN 4.94065645841246544e-324
+#define FLT_MIN ((float)1.40129846432481707e-45)
+#endif
+#ifndef DBL_MAX
+#define DBL_MAX 1.79769313486231470e+308
+#define FLT_MAX ((float)3.40282346638528860e+38)
+#endif
+#ifndef SIZE_T_MAX
+#define SIZE_T_MAX (~((size_t) 0))
+#endif
+
+#ifndef isfinite
+#ifdef HAVE_FINITE
+#define isfinite(x) finite(x)
+#else
+#define finite(x) (1.0 / fabs(x) > 0.0)
+#endif /* HAVE_FINITE */
+#endif /* isfinite */
+
+#include
+#ifndef HAVE_ISNAN
+#define isnan(x) ((x) != (x))
+#endif
+C_MODE_START
+extern double my_double_isnan(double x);
+C_MODE_END
+
+#ifdef HAVE_ISINF
+/* Check if C compiler is affected by GCC bug #39228 */
+#if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF)
+/* Force store/reload of the argument to/from a 64-bit double */
+static inline double my_isinf(double x)
+{
+ volatile double t= x;
+ return isinf(t);
+}
+#else
+/* System-provided isinf() is available and safe to use */
+#define my_isinf(X) isinf(X)
+#endif
+#else /* !HAVE_ISINF */
+#define my_isinf(X) (!finite(X) && !isnan(X))
+#endif
+
+/* Define missing math constants. */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+#ifndef M_E
+#define M_E 2.7182818284590452354
+#endif
+#ifndef M_LN2
+#define M_LN2 0.69314718055994530942
+#endif
+
+/*
+ Max size that must be added to a so that we know Size to make
+ adressable obj.
+*/
+#if SIZEOF_CHARP == 4
+typedef long my_ptrdiff_t;
+#else
+typedef long long my_ptrdiff_t;
+#endif
+
+#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
+#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
+/* Size to make adressable obj. */
+#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
+#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
+
+/*
+ Custom version of standard offsetof() macro which can be used to get
+ offsets of members in class for non-POD types (according to the current
+ version of C++ standard offsetof() macro can't be used in such cases and
+ attempt to do so causes warnings to be emitted, OTOH in many cases it is
+ still OK to assume that all instances of the class has the same offsets
+ for the same members).
+
+ This is temporary solution which should be removed once File_parser class
+ and related routines are refactored.
+*/
+
+#define my_offsetof(TYPE, MEMBER) \
+ ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
+
+#define NullS (char *) 0
+
+#ifdef STDCALL
+#undef STDCALL
+#endif
+
+#ifdef _WIN32
+#define STDCALL __stdcall
+#else
+#define STDCALL
+#endif
+
+/* Typdefs for easyier portability */
+
+#ifndef HAVE_UCHAR
+typedef unsigned char uchar; /* Short for unsigned char */
+#endif
+
+#ifndef HAVE_INT8
+typedef signed char int8; /* Signed integer >= 8 bits */
+#endif
+#ifndef HAVE_UINT8
+typedef unsigned char uint8; /* Unsigned integer >= 8 bits */
+#endif
+#ifndef HAVE_INT16
+typedef short int16;
+#endif
+#ifndef HAVE_UINT16
+typedef unsigned short uint16;
+#endif
+#if SIZEOF_INT == 4
+#ifndef HAVE_INT32
+typedef int int32;
+#endif
+#ifndef HAVE_UINT32
+typedef unsigned int uint32;
+#endif
+#elif SIZEOF_LONG == 4
+#ifndef HAVE_INT32
+typedef long int32;
+#endif
+#ifndef HAVE_UINT32
+typedef unsigned long uint32;
+#endif
+#else
+#error Neither int or long is of 4 bytes width
+#endif
+
+#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
+typedef unsigned long ulong; /* Short for unsigned long */
+#endif
+#ifndef longlong_defined
+/*
+ Using [unsigned] long long is preferable as [u]longlong because we use
+ [unsigned] long long unconditionally in many places,
+ for example in constants with [U]LL suffix.
+*/
+#if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8
+typedef unsigned long long int ulonglong; /* ulong or unsigned long long */
+typedef long long int longlong;
+#else
+typedef unsigned long ulonglong; /* ulong or unsigned long long */
+typedef long longlong;
+#endif
+#endif
+#ifndef HAVE_INT64
+typedef longlong int64;
+#endif
+#ifndef HAVE_UINT64
+typedef ulonglong uint64;
+#endif
+
+#if defined(NO_CLIENT_LONG_LONG)
+typedef unsigned long my_ulonglong;
+#elif defined (__WIN__)
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+
+#if SIZEOF_CHARP == SIZEOF_INT
+typedef int intptr;
+#elif SIZEOF_CHARP == SIZEOF_LONG
+typedef long intptr;
+#elif SIZEOF_CHARP == SIZEOF_LONG_LONG
+typedef long long intptr;
+#else
+#error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(long long)
+#endif
+
+#define MY_ERRPTR ((void*)(intptr)1)
+
+#if defined(_WIN32)
+typedef unsigned long long my_off_t;
+typedef unsigned long long os_off_t;
+#else
+typedef off_t os_off_t;
+#if SIZEOF_OFF_T > 4
+typedef ulonglong my_off_t;
+#else
+typedef unsigned long my_off_t;
+#endif
+#endif /*_WIN32*/
+#define MY_FILEPOS_ERROR (~(my_off_t) 0)
+
+/*
+ TODO Convert these to use Bitmap class.
+ */
+typedef ulonglong table_map; /* Used for table bits in join */
+typedef ulonglong nesting_map; /* Used for flags of nesting constructs */
+
+#if defined(__WIN__)
+#define socket_errno WSAGetLastError()
+#define SOCKET_EINTR WSAEINTR
+#define SOCKET_EAGAIN WSAEINPROGRESS
+#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
+#define SOCKET_EADDRINUSE WSAEADDRINUSE
+#define SOCKET_ETIMEDOUT WSAETIMEDOUT
+#define SOCKET_ECONNRESET WSAECONNRESET
+#define SOCKET_ENFILE ENFILE
+#define SOCKET_EMFILE EMFILE
+#else /* Unix */
+#define socket_errno errno
+#define closesocket(A) close(A)
+#define SOCKET_EINTR EINTR
+#define SOCKET_EAGAIN EAGAIN
+#define SOCKET_EWOULDBLOCK EWOULDBLOCK
+#define SOCKET_EADDRINUSE EADDRINUSE
+#define SOCKET_ETIMEDOUT ETIMEDOUT
+#define SOCKET_ECONNRESET ECONNRESET
+#define SOCKET_ENFILE ENFILE
+#define SOCKET_EMFILE EMFILE
+#endif
+
+typedef int myf; /* Type of MyFlags in my_funcs */
+typedef char my_bool; /* Small bool */
+
+/* Macros for converting *constants* to the right type */
+#define MYF(v) (myf) (v)
+
+#ifndef LL
+#ifdef HAVE_LONG_LONG
+#define LL(A) A ## LL
+#else
+#define LL(A) A ## L
+#endif
+#endif
+
+#ifndef ULL
+#ifdef HAVE_LONG_LONG
+#define ULL(A) A ## ULL
+#else
+#define ULL(A) A ## UL
+#endif
+#endif
+
+/*
+ Defines to make it possible to prioritize register assignments. No
+ longer that important with modern compilers.
+*/
+#ifndef USING_X
+#define reg1 register
+#define reg2 register
+#define reg3 register
+#define reg4 register
+#define reg5 register
+#define reg6 register
+#define reg7 register
+#define reg8 register
+#define reg9 register
+#define reg10 register
+#define reg11 register
+#define reg12 register
+#define reg13 register
+#define reg14 register
+#define reg15 register
+#define reg16 register
+#endif
+
+/* Some helper macros */
+#define YESNO(X) ((X) ? "yes" : "no")
+
+#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
+#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
+
+#include
+
+#ifdef HAVE_CHARSET_utf8
+#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8"
+#else
+#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME
+#endif
+
+#if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_PRIVILEGE_CONTROL)
+#define NO_EMBEDDED_ACCESS_CHECKS
+#endif
+
+#if defined(_WIN32)
+#define dlsym(lib, name) (void*)GetProcAddress((HMODULE)lib, name)
+#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0)
+#define dlclose(lib) FreeLibrary((HMODULE)lib)
+#ifndef HAVE_DLOPEN
+#define HAVE_DLOPEN
+#endif
+#endif
+
+#ifdef HAVE_DLOPEN
+#if defined(HAVE_DLFCN_H)
+#include
+#endif
+#endif
+
+#ifndef HAVE_DLERROR
+#ifdef _WIN32
+#define DLERROR_GENERATE(errmsg, error_number) \
+ char win_errormsg[2048]; \
+ if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, \
+ 0, error_number, 0, win_errormsg, 2048, NULL)) \
+ { \
+ char *ptr; \
+ for (ptr= &win_errormsg[0] + strlen(win_errormsg) - 1; \
+ ptr >= &win_errormsg[0] && strchr("\r\n\t\0x20", *ptr); \
+ ptr--) \
+ *ptr= 0; \
+ errmsg= win_errormsg; \
+ } \
+ else \
+ errmsg= ""
+#define dlerror() ""
+#define dlopen_errno GetLastError()
+#else /* _WIN32 */
+#define dlerror() "No support for dynamic loading (static build?)"
+#define DLERROR_GENERATE(errmsg, error_number) errmsg= dlerror()
+#define dlopen_errno errno
+#endif /* _WIN32 */
+#else /* HAVE_DLERROR */
+#define DLERROR_GENERATE(errmsg, error_number) errmsg= dlerror()
+#define dlopen_errno errno
+#endif /* HAVE_DLERROR */
+
+
+/*
+ * Include standard definitions of operator new and delete.
+ */
+#ifdef __cplusplus
+#include
+#endif
+
+/* Length of decimal number represented by INT32. */
+#define MY_INT32_NUM_DECIMAL_DIGITS 11U
+
+/* Length of decimal number represented by INT64. */
+#define MY_INT64_NUM_DECIMAL_DIGITS 21U
+
+/* Define some useful general macros (should be done after all headers). */
+#define MY_MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MY_MIN(a, b) ((a) < (b) ? (a) : (b))
+
+/*
+ Only Linux is known to need an explicit sync of the directory to make sure a
+ file creation/deletion/renaming in(from,to) this directory durable.
+*/
+#ifdef TARGET_OS_LINUX
+#define NEED_EXPLICIT_SYNC_DIR 1
+#else
+/*
+ On linux default rwlock scheduling policy is good enough for
+ waiting_threads.c, on other systems use our special implementation
+ (which is slower).
+
+ QQ perhaps this should be tested in configure ? how ?
+*/
+#define WT_RWLOCKS_USE_MUTEXES 1
+#endif
+
+#if !defined(__cplusplus) && !defined(bool)
+#define bool In_C_you_should_use_my_bool_instead()
+#endif
+
+/* Provide __func__ macro definition for platforms that miss it. */
+#if __STDC_VERSION__ < 199901L
+# if __GNUC__ >= 2
+# define __func__ __FUNCTION__
+# else
+# define __func__ ""
+# endif
+#elif defined(_MSC_VER)
+# if _MSC_VER < 1300
+# define __func__ ""
+# else
+# define __func__ __FUNCTION__
+# endif
+#elif defined(__BORLANDC__)
+# define __func__ __FUNC__
+#else
+# define __func__ ""
+#endif
+
+#ifndef HAVE_RINT
+/**
+ All integers up to this number can be represented exactly as double precision
+ values (DBL_MANT_DIG == 53 for IEEE 754 hardware).
+*/
+#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
+
+/**
+ rint(3) implementation for platforms that do not have it.
+ Always rounds to the nearest integer with ties being rounded to the nearest
+ even integer to mimic glibc's rint() behavior in the "round-to-nearest"
+ FPU mode. Hardware-specific optimizations are possible (frndint on x86).
+ Unlike this implementation, hardware will also honor the FPU rounding mode.
+*/
+
+static inline double rint(double x)
+{
+ double f, i;
+ f = modf(x, &i);
+ /*
+ All doubles with absolute values > MAX_EXACT_INTEGER are even anyway,
+ no need to check it.
+ */
+ if (x > 0.0)
+ i += (double) ((f > 0.5) || (f == 0.5 &&
+ i <= (double) MAX_EXACT_INTEGER &&
+ (longlong) i % 2));
+ else
+ i -= (double) ((f < -0.5) || (f == -0.5 &&
+ i >= (double) -MAX_EXACT_INTEGER &&
+ (longlong) i % 2));
+ return i;
+}
+#endif /* HAVE_RINT */
+
+/*
+ MYSQL_PLUGIN_IMPORT macro is used to export mysqld data
+ (i.e variables) for usage in storage engine loadable plugins.
+ Outside of Windows, it is dummy.
+*/
+#ifndef MYSQL_PLUGIN_IMPORT
+#if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN))
+#define MYSQL_PLUGIN_IMPORT __declspec(dllimport)
+#else
+#define MYSQL_PLUGIN_IMPORT
+#endif
+#endif
+
+#include
+
+/* Defines that are unique to the embedded version of MySQL */
+
+#ifdef EMBEDDED_LIBRARY
+
+/* Things we don't need in the embedded version of MySQL */
+/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
+
+#undef HAVE_OPENSSL
+#undef HAVE_SMEM /* No shared memory */
+
+#endif /* EMBEDDED_LIBRARY */
+
+
+enum loglevel {
+ ERROR_LEVEL= 0,
+ WARNING_LEVEL= 1,
+ INFORMATION_LEVEL= 2
+};
+
+
+/*
+ Visual Studio before the version 2010 did not have lldiv_t.
+ In Visual Studio 2010, _MSC_VER is defined as 1600.
+*/
+#if defined(_MSC_VER) && (_MSC_VER < 1600)
+typedef struct
+{
+ long long int quot; /* Quotient. */
+ long long int rem; /* Remainder. */
+} lldiv_t;
+#endif
+
+#endif // MY_GLOBAL_INCLUDED
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_libwrap.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_libwrap.h
new file mode 100644
index 000000000..9a0176114
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_libwrap.h
@@ -0,0 +1,32 @@
+#ifndef MY_LIBWRAP_INCLUDED
+#define MY_LIBWRAP_INCLUDED
+
+/* Copyright (c) 2000, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifdef HAVE_LIBWRAP
+#include
+#include
+#ifdef NEED_SYS_SYSLOG_H
+#include
+#endif /* NEED_SYS_SYSLOG_H */
+
+extern void my_fromhost(struct request_info *req);
+extern int my_hosts_access(struct request_info *req);
+extern char *my_eval_client(struct request_info *req);
+
+#endif /* HAVE_LIBWRAP */
+#endif /* MY_LIBWRAP_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_list.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_list.h
new file mode 100644
index 000000000..294be663d
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_list.h
@@ -0,0 +1,45 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _list_h_
+#define _list_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct st_list {
+ struct st_list *prev,*next;
+ void *data;
+} LIST;
+
+typedef int (*list_walk_action)(void *,void *);
+
+extern LIST *list_add(LIST *root,LIST *element);
+extern LIST *list_delete(LIST *root,LIST *element);
+extern LIST *list_cons(void *data,LIST *root);
+extern LIST *list_reverse(LIST *root);
+extern void list_free(LIST *root,unsigned int free_data);
+extern unsigned int list_length(LIST *);
+extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
+
+#define list_rest(a) ((a)->next)
+#define list_push(a,b) (a)=list_cons((b),(a))
+#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old); my_free(old); }
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_md5.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_md5.h
new file mode 100644
index 000000000..452676e46
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_md5.h
@@ -0,0 +1,51 @@
+#ifndef MY_MD5_INCLUDED
+#define MY_MD5_INCLUDED
+
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+#include "m_string.h"
+
+#define MD5_HASH_SIZE 16 /* Hash size in bytes */
+
+/*
+ Wrapper function for MD5 implementation.
+*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void compute_md5_hash(char *digest, const char *buf, int len);
+
+/*
+ Convert an array of bytes to a hexadecimal representation.
+
+ Used to generate a hexadecimal representation of a message digest.
+*/
+static inline void array_to_hex(char *to, const unsigned char *str, uint len)
+{
+ const unsigned char *str_end= str + len;
+ for (; str != str_end; ++str)
+ {
+ *to++= _dig_vec_lower[((uchar) *str) >> 4];
+ *to++= _dig_vec_lower[((uchar) *str) & 0x0F];
+ }
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MY_MD5_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_net.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_net.h
new file mode 100644
index 000000000..ac1643b20
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_net.h
@@ -0,0 +1,84 @@
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ This file is also used to make handling of sockets and ioctl()
+ portable accross systems.
+
+*/
+
+#ifndef _my_net_h
+#define _my_net_h
+
+#include "my_global.h" /* C_MODE_START, C_MODE_END */
+
+C_MODE_START
+
+#include
+
+#ifdef HAVE_SYS_SOCKET_H
+#include
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include
+#endif
+
+#ifdef HAVE_POLL
+#include
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+#include
+#endif
+
+#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES)
+#include
+#include
+#include
+# if !defined(alpha_linux_port)
+# include
+# endif
+#endif
+
+#if defined(__WIN__)
+#define O_NONBLOCK 1 /* For emulation of fcntl() */
+
+/*
+ SHUT_RDWR is called SD_BOTH in windows and
+ is defined to 2 in winsock2.h
+ #define SD_BOTH 0x02
+*/
+#define SHUT_RDWR 0x02
+#else
+#include /* getaddrinfo() & co */
+#endif
+
+/*
+ On OSes which don't have the in_addr_t, we guess that using uint32 is the best
+ possible choice. We guess this from the fact that on HP-UX64bit & FreeBSD64bit
+ & Solaris64bit, in_addr_t is equivalent to uint32. And on Linux32bit too.
+*/
+#ifndef HAVE_IN_ADDR_T
+#define in_addr_t uint32
+#endif
+
+
+C_MODE_END
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_nosys.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_nosys.h
new file mode 100644
index 000000000..d4690d32b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_nosys.h
@@ -0,0 +1,52 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Header to remove use of my_functions in functions where we need speed and
+ where calls to posix functions should work
+*/
+#ifndef _my_nosys_h
+#define _my_nosys_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __MY_NOSYS__
+#define __MY_NOSYS__
+
+#ifndef HAVE_STDLIB_H
+#include
+#endif
+
+#undef my_read
+#undef my_write
+#undef my_seek
+#define my_read(a,b,c,d) my_quick_read(a,b,c,d)
+#define my_write(a,b,c,d) my_quick_write(a,b,c)
+extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count,
+ myf myFlags);
+extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count);
+
+#if defined(USE_HALLOC)
+#define my_malloc(a,b) halloc(a,1)
+#define my_no_flags_free(a) hfree(a)
+#endif
+
+#endif /* __MY_NOSYS__ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_pthread.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_pthread.h
new file mode 100644
index 000000000..24b207107
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_pthread.h
@@ -0,0 +1,936 @@
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+/* Defines to make different thread packages compatible */
+
+#ifndef _my_pthread_h
+#define _my_pthread_h
+
+#include "my_global.h" /* myf */
+
+#ifndef ETIME
+#define ETIME ETIMEDOUT /* For FreeBSD */
+#endif
+
+#ifdef __cplusplus
+#define EXTERNC extern "C"
+extern "C" {
+#else
+#define EXTERNC
+#endif /* __cplusplus */
+
+#if defined(__WIN__)
+typedef CRITICAL_SECTION pthread_mutex_t;
+typedef DWORD pthread_t;
+typedef struct thread_attr {
+ DWORD dwStackSize ;
+ DWORD dwCreatingFlag ;
+} pthread_attr_t ;
+
+typedef struct { int dummy; } pthread_condattr_t;
+
+/* Implementation of posix conditions */
+
+typedef struct st_pthread_link {
+ DWORD thread_id;
+ struct st_pthread_link *next;
+} pthread_link;
+
+/**
+ Implementation of Windows condition variables.
+ We use native conditions on Vista and later, and fallback to own
+ implementation on earlier OS version.
+*/
+typedef union
+{
+ /* Native condition (used on Vista and later) */
+ CONDITION_VARIABLE native_cond;
+
+ /* Own implementation (used on XP) */
+ struct
+ {
+ uint32 waiting;
+ CRITICAL_SECTION lock_waiting;
+ enum
+ {
+ SIGNAL= 0,
+ BROADCAST= 1,
+ MAX_EVENTS= 2
+ } EVENTS;
+ HANDLE events[MAX_EVENTS];
+ HANDLE broadcast_block_event;
+ };
+} pthread_cond_t;
+
+
+typedef int pthread_mutexattr_t;
+#define pthread_self() GetCurrentThreadId()
+#define pthread_handler_t EXTERNC void * __cdecl
+typedef void * (__cdecl *pthread_handler)(void *);
+
+typedef volatile LONG my_pthread_once_t;
+#define MY_PTHREAD_ONCE_INIT 0
+#define MY_PTHREAD_ONCE_INPROGRESS 1
+#define MY_PTHREAD_ONCE_DONE 2
+
+/*
+ Struct and macros to be used in combination with the
+ windows implementation of pthread_cond_timedwait
+*/
+
+/*
+ Declare a union to make sure FILETIME is properly aligned
+ so it can be used directly as a 64 bit value. The value
+ stored is in 100ns units.
+ */
+ union ft64 {
+ FILETIME ft;
+ __int64 i64;
+ };
+struct timespec {
+ union ft64 tv;
+ /* The max timeout value in millisecond for pthread_cond_timedwait */
+ long max_timeout_msec;
+};
+#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \
+ (ABSTIME).tv.i64= (TIME)+(__int64)(NSEC)/100; \
+ (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
+} while(0)
+
+#define set_timespec_nsec(ABSTIME,NSEC) do { \
+ union ft64 tv; \
+ GetSystemTimeAsFileTime(&tv.ft); \
+ set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC)); \
+} while(0)
+
+/**
+ Compare two timespec structs.
+
+ @retval 1 If TS1 ends after TS2.
+
+ @retval 0 If TS1 is equal to TS2.
+
+ @retval -1 If TS1 ends before TS2.
+*/
+#define cmp_timespec(TS1, TS2) \
+ ((TS1.tv.i64 > TS2.tv.i64) ? 1 : \
+ ((TS1.tv.i64 < TS2.tv.i64) ? -1 : 0))
+
+#define diff_timespec(TS1, TS2) \
+ ((TS1.tv.i64 - TS2.tv.i64) * 100)
+
+int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
+int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *);
+int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
+ struct timespec *abstime);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_attr_init(pthread_attr_t *connect_att);
+int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
+int pthread_attr_destroy(pthread_attr_t *connect_att);
+int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void));
+struct tm *localtime_r(const time_t *timep,struct tm *tmp);
+struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
+
+void pthread_exit(void *a);
+int pthread_join(pthread_t thread, void **value_ptr);
+int pthread_cancel(pthread_t thread);
+
+#ifndef ETIMEDOUT
+#define ETIMEDOUT 145 /* Win32 doesn't have this */
+#endif
+#define HAVE_LOCALTIME_R 1
+#define _REENTRANT 1
+#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+
+
+#undef SAFE_MUTEX /* This will cause conflicts */
+#define pthread_key(T,V) DWORD V
+#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF)
+#define pthread_key_delete(A) TlsFree(A)
+#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V)))
+#define pthread_setspecific(A,B) (!TlsSetValue((A),(B)))
+#define pthread_getspecific(A) (TlsGetValue(A))
+#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A))
+#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V))
+
+#define pthread_equal(A,B) ((A) == (B))
+#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
+#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
+#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A))
+#define pthread_mutex_unlock(A) (LeaveCriticalSection(A), 0)
+#define pthread_mutex_destroy(A) (DeleteCriticalSection(A), 0)
+#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
+
+
+/* Dummy defines for easier code */
+#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
+#define pthread_attr_setscope(A,B)
+#define pthread_detach_this_thread()
+#define pthread_condattr_init(A)
+#define pthread_condattr_destroy(A)
+#define pthread_yield() SwitchToThread()
+#define my_sigset(A,B) signal(A,B)
+
+#else /* Normal threads */
+
+#ifdef HAVE_rts_threads
+#define sigwait org_sigwait
+#include
+#undef sigwait
+#endif
+#include
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+#ifdef HAVE_THR_SETCONCURRENCY
+#include /* Probably solaris */
+#endif
+#ifdef HAVE_SCHED_H
+#include
+#endif
+#ifdef HAVE_SYNCH_H
+#include
+#endif
+
+#define pthread_key(T,V) pthread_key_t V
+#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
+#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
+#define pthread_detach_this_thread()
+#define pthread_handler_t EXTERNC void *
+typedef void *(* pthread_handler)(void *);
+
+#define my_pthread_once_t pthread_once_t
+#if defined(PTHREAD_ONCE_INITIALIZER)
+#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER
+#else
+#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#endif
+#define my_pthread_once(C,F) pthread_once(C,F)
+
+/* Test first for RTS or FSU threads */
+
+#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
+#define HAVE_rts_threads
+extern int my_pthread_create_detached;
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#define PTHREAD_CREATE_DETACHED &my_pthread_create_detached
+#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
+#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
+#define USE_ALARM_THREAD
+#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
+
+#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
+int sigwait(sigset_t *set, int *sig);
+#endif
+
+#ifndef HAVE_NONPOSIX_SIGWAIT
+#define my_sigwait(A,B) sigwait((A),(B))
+#else
+int my_sigwait(const sigset_t *set,int *sig);
+#endif
+
+#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT
+#ifndef SAFE_MUTEX
+#define pthread_mutex_init(a,b) my_pthread_mutex_init((a),(b))
+extern int my_pthread_mutex_init(pthread_mutex_t *mp,
+ const pthread_mutexattr_t *attr);
+#endif /* SAFE_MUTEX */
+#define pthread_cond_init(a,b) my_pthread_cond_init((a),(b))
+extern int my_pthread_cond_init(pthread_cond_t *mp,
+ const pthread_condattr_t *attr);
+#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
+
+#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK)
+#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
+#endif
+
+#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
+int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
+#endif
+
+
+/*
+ We define my_sigset() and use that instead of the system sigset() so that
+ we can favor an implementation based on sigaction(). On some systems, such
+ as Mac OS X, sigset() results in flags such as SA_RESTART being set, and
+ we want to make sure that no such flags are set.
+*/
+#if defined(HAVE_SIGACTION) && !defined(my_sigset)
+#define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; \
+ DBUG_ASSERT((A) != 0); \
+ sigemptyset(&l_set); \
+ l_s.sa_handler = (B); \
+ l_s.sa_mask = l_set; \
+ l_s.sa_flags = 0; \
+ sigaction((A), &l_s, NULL); \
+ } while (0)
+#elif defined(HAVE_SIGSET) && !defined(my_sigset)
+#define my_sigset(A,B) sigset((A),(B))
+#elif !defined(my_sigset)
+#define my_sigset(A,B) signal((A),(B))
+#endif
+
+#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS)
+#define pthread_attr_setscope(A,B)
+#undef HAVE_GETHOSTBYADDR_R /* No definition */
+#endif
+
+#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX)
+extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ struct timespec *abstime);
+#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
+#endif
+
+#if !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
+#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B))
+#else
+#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
+void *my_pthread_getspecific_imp(pthread_key_t key);
+#endif
+
+#ifndef HAVE_LOCALTIME_R
+struct tm *localtime_r(const time_t *clock, struct tm *res);
+#endif
+
+#ifndef HAVE_GMTIME_R
+struct tm *gmtime_r(const time_t *clock, struct tm *res);
+#endif
+
+#ifdef HAVE_PTHREAD_CONDATTR_CREATE
+/* DCE threads on HPUX 10.20 */
+#define pthread_condattr_init pthread_condattr_create
+#define pthread_condattr_destroy pthread_condattr_delete
+#endif
+
+/* FSU THREADS */
+#if !defined(HAVE_PTHREAD_KEY_DELETE) && !defined(pthread_key_delete)
+#define pthread_key_delete(A) pthread_dummy(0)
+#endif
+
+#ifdef HAVE_CTHREADS_WRAPPER /* For MacOSX */
+#define pthread_cond_destroy(A) pthread_dummy(0)
+#define pthread_mutex_destroy(A) pthread_dummy(0)
+#define pthread_attr_delete(A) pthread_dummy(0)
+#define pthread_condattr_delete(A) pthread_dummy(0)
+#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
+#define pthread_equal(A,B) ((A) == (B))
+#define pthread_cond_timedwait(a,b,c) pthread_cond_wait((a),(b))
+#define pthread_attr_init(A) pthread_attr_create(A)
+#define pthread_attr_destroy(A) pthread_attr_delete(A)
+#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
+#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
+#undef pthread_detach_this_thread
+#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
+#endif
+
+#ifdef HAVE_DARWIN5_THREADS
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
+#define pthread_condattr_init(A) pthread_dummy(0)
+#define pthread_condattr_destroy(A) pthread_dummy(0)
+#undef pthread_detach_this_thread
+#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
+#endif
+
+#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)
+/* This is set on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too) */
+#define pthread_key_create(A,B) \
+ pthread_keycreate(A,(B) ?\
+ (pthread_destructor_t) (B) :\
+ (pthread_destructor_t) pthread_dummy)
+#define pthread_attr_init(A) pthread_attr_create(A)
+#define pthread_attr_destroy(A) pthread_attr_delete(A)
+#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
+#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
+#ifndef pthread_sigmask
+#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
+#endif
+#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
+#undef pthread_detach_this_thread
+#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
+#else /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
+#define HAVE_PTHREAD_KILL
+#endif
+
+#endif /* defined(__WIN__) */
+
+#if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
+#undef pthread_cond_timedwait
+#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c))
+int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
+ struct timespec *abstime);
+#endif
+
+#if defined(HPUX10)
+#define pthread_attr_getstacksize(A,B) my_pthread_attr_getstacksize(A,B)
+void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size);
+#endif
+
+#if defined(HAVE_POSIX1003_4a_MUTEX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
+#undef pthread_mutex_trylock
+#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
+int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
+#endif
+
+#if !defined(HAVE_PTHREAD_YIELD_ONE_ARG) && !defined(HAVE_PTHREAD_YIELD_ZERO_ARG)
+/* no pthread_yield() available */
+#ifdef HAVE_SCHED_YIELD
+#define pthread_yield() sched_yield()
+#elif defined(HAVE_PTHREAD_YIELD_NP) /* can be Mac OS X */
+#define pthread_yield() pthread_yield_np()
+#elif defined(HAVE_THR_YIELD)
+#define pthread_yield() thr_yield()
+#endif
+#endif
+
+/*
+ The defines set_timespec and set_timespec_nsec should be used
+ for calculating an absolute time at which
+ pthread_cond_timedwait should timeout
+*/
+#define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000000ULL)
+
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+ set_timespec_time_nsec((ABSTIME),my_getsystime(),(NSEC))
+#endif /* !set_timespec_nsec */
+
+/* adapt for two different flavors of struct timespec */
+#ifdef HAVE_TIMESPEC_TS_SEC
+#define MY_tv_sec ts_sec
+#define MY_tv_nsec ts_nsec
+#else
+#define MY_tv_sec tv_sec
+#define MY_tv_nsec tv_nsec
+#endif /* HAVE_TIMESPEC_TS_SEC */
+
+#ifndef set_timespec_time_nsec
+#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \
+ ulonglong nsec= (NSEC); \
+ ulonglong now= (TIME) + (nsec/100); \
+ (ABSTIME).MY_tv_sec= (now / 10000000ULL); \
+ (ABSTIME).MY_tv_nsec= (now % 10000000ULL * 100 + (nsec % 100)); \
+} while(0)
+#endif /* !set_timespec_time_nsec */
+
+/**
+ Compare two timespec structs.
+
+ @retval 1 If TS1 ends after TS2.
+
+ @retval 0 If TS1 is equal to TS2.
+
+ @retval -1 If TS1 ends before TS2.
+*/
+#ifdef HAVE_TIMESPEC_TS_SEC
+#ifndef cmp_timespec
+#define cmp_timespec(TS1, TS2) \
+ ((TS1.ts_sec > TS2.ts_sec || \
+ (TS1.ts_sec == TS2.ts_sec && TS1.ts_nsec > TS2.ts_nsec)) ? 1 : \
+ ((TS1.ts_sec < TS2.ts_sec || \
+ (TS1.ts_sec == TS2.ts_sec && TS1.ts_nsec < TS2.ts_nsec)) ? -1 : 0))
+#endif /* !cmp_timespec */
+#else
+#ifndef cmp_timespec
+#define cmp_timespec(TS1, TS2) \
+ ((TS1.tv_sec > TS2.tv_sec || \
+ (TS1.tv_sec == TS2.tv_sec && TS1.tv_nsec > TS2.tv_nsec)) ? 1 : \
+ ((TS1.tv_sec < TS2.tv_sec || \
+ (TS1.tv_sec == TS2.tv_sec && TS1.tv_nsec < TS2.tv_nsec)) ? -1 : 0))
+#endif /* !cmp_timespec */
+#endif /* HAVE_TIMESPEC_TS_SEC */
+
+#ifdef HAVE_TIMESPEC_TS_SEC
+#ifndef diff_timespec
+#define diff_timespec(TS1, TS2) \
+ ((TS1.ts_sec - TS2.ts_sec) * 1000000000ULL + TS1.ts_nsec - TS2.ts_nsec)
+#endif /* !diff_timespec */
+#else
+#ifndef diff_timespec
+#define diff_timespec(TS1, TS2) \
+ ((TS1.tv_sec - TS2.tv_sec) * 1000000000ULL + TS1.tv_nsec - TS2.tv_nsec)
+#endif /* !diff_timespec */
+#endif /* HAVE_TIMESPEC_TS_SEC */
+
+ /* safe_mutex adds checking to mutex for easier debugging */
+
+typedef struct st_safe_mutex_t
+{
+ pthread_mutex_t global,mutex;
+ const char *file;
+ uint line,count;
+ pthread_t thread;
+#ifdef SAFE_MUTEX_DETECT_DESTROY
+ struct st_safe_mutex_info_t *info; /* to track destroying of mutexes */
+#endif
+} safe_mutex_t;
+
+#ifdef SAFE_MUTEX_DETECT_DESTROY
+/*
+ Used to track the destroying of mutexes. This needs to be a seperate
+ structure because the safe_mutex_t structure could be freed before
+ the mutexes are destroyed.
+*/
+
+typedef struct st_safe_mutex_info_t
+{
+ struct st_safe_mutex_info_t *next;
+ struct st_safe_mutex_info_t *prev;
+ const char *init_file;
+ uint32 init_line;
+} safe_mutex_info_t;
+#endif /* SAFE_MUTEX_DETECT_DESTROY */
+
+int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
+ const char *file, uint line);
+int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, uint line);
+int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
+int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
+int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
+ uint line);
+int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
+ const struct timespec *abstime,
+ const char *file, uint line);
+void safe_mutex_global_init(void);
+void safe_mutex_end(FILE *file);
+
+ /* Wrappers if safe mutex is actually used */
+#ifdef SAFE_MUTEX
+#define safe_mutex_assert_owner(mp) \
+ DBUG_ASSERT((mp)->count > 0 && \
+ pthread_equal(pthread_self(), (mp)->thread))
+#define safe_mutex_assert_not_owner(mp) \
+ DBUG_ASSERT(! (mp)->count || \
+ ! pthread_equal(pthread_self(), (mp)->thread))
+
+#define my_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
+#define my_cond_wait(A,B) safe_cond_wait((A), (B), __FILE__, __LINE__)
+
+#elif defined(MY_PTHREAD_FASTMUTEX)
+
+#define safe_mutex_assert_owner(mp) do {} while (0)
+#define safe_mutex_assert_not_owner(mp) do {} while (0)
+
+#define my_cond_timedwait(A,B,C) pthread_cond_timedwait((A), &(B)->mutex, (C))
+#define my_cond_wait(A,B) pthread_cond_wait((A), &(B)->mutex)
+
+#else
+
+#define safe_mutex_assert_owner(mp) do {} while (0)
+#define safe_mutex_assert_not_owner(mp) do {} while (0)
+
+#define my_cond_timedwait(A,B,C) pthread_cond_timedwait((A),(B),(C))
+#define my_cond_wait(A,B) pthread_cond_wait((A), (B))
+
+#endif /* !SAFE_MUTEX && ! MY_PTHREAD_FASTMUTEX */
+
+#if defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX)
+typedef struct st_my_pthread_fastmutex_t
+{
+ pthread_mutex_t mutex;
+ uint spins;
+ uint rng_state;
+} my_pthread_fastmutex_t;
+void fastmutex_global_init(void);
+
+int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp,
+ const pthread_mutexattr_t *attr);
+int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp);
+
+#endif /* defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */
+
+ /* READ-WRITE thread locking */
+
+#ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */
+#undef HAVE_PTHREAD_RWLOCK_RDLOCK
+#undef HAVE_RWLOCK_INIT
+#undef HAVE_RWLOCK_T
+#endif
+
+#if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS)
+/* use these defs for simple mutex locking */
+#define rw_lock_t pthread_mutex_t
+#define my_rwlock_init(A,B) pthread_mutex_init((A),(B))
+#define rw_rdlock(A) pthread_mutex_lock((A))
+#define rw_wrlock(A) pthread_mutex_lock((A))
+#define rw_tryrdlock(A) pthread_mutex_trylock((A))
+#define rw_trywrlock(A) pthread_mutex_trylock((A))
+#define rw_unlock(A) pthread_mutex_unlock((A))
+#define rwlock_destroy(A) pthread_mutex_destroy((A))
+#elif defined(HAVE_PTHREAD_RWLOCK_RDLOCK)
+#define rw_lock_t pthread_rwlock_t
+#define my_rwlock_init(A,B) pthread_rwlock_init((A),(B))
+#define rw_rdlock(A) pthread_rwlock_rdlock(A)
+#define rw_wrlock(A) pthread_rwlock_wrlock(A)
+#define rw_tryrdlock(A) pthread_rwlock_tryrdlock((A))
+#define rw_trywrlock(A) pthread_rwlock_trywrlock((A))
+#define rw_unlock(A) pthread_rwlock_unlock(A)
+#define rwlock_destroy(A) pthread_rwlock_destroy(A)
+#elif defined(HAVE_RWLOCK_INIT)
+#ifdef HAVE_RWLOCK_T /* For example Solaris 2.6-> */
+#define rw_lock_t rwlock_t
+#endif
+#define my_rwlock_init(A,B) rwlock_init((A),USYNC_THREAD,0)
+#else
+/* Use our own version of read/write locks */
+#define NEED_MY_RW_LOCK 1
+#define rw_lock_t my_rw_lock_t
+#define my_rwlock_init(A,B) my_rw_init((A))
+#define rw_rdlock(A) my_rw_rdlock((A))
+#define rw_wrlock(A) my_rw_wrlock((A))
+#define rw_tryrdlock(A) my_rw_tryrdlock((A))
+#define rw_trywrlock(A) my_rw_trywrlock((A))
+#define rw_unlock(A) my_rw_unlock((A))
+#define rwlock_destroy(A) my_rw_destroy((A))
+#define rw_lock_assert_write_owner(A) my_rw_lock_assert_write_owner((A))
+#define rw_lock_assert_not_write_owner(A) my_rw_lock_assert_not_write_owner((A))
+#endif /* USE_MUTEX_INSTEAD_OF_RW_LOCKS */
+
+
+/**
+ Portable implementation of special type of read-write locks.
+
+ These locks have two properties which are unusual for rwlocks:
+ 1) They "prefer readers" in the sense that they do not allow
+ situations in which rwlock is rd-locked and there is a
+ pending rd-lock which is blocked (e.g. due to pending
+ request for wr-lock).
+ This is a stronger guarantee than one which is provided for
+ PTHREAD_RWLOCK_PREFER_READER_NP rwlocks in Linux.
+ MDL subsystem deadlock detector relies on this property for
+ its correctness.
+ 2) They are optimized for uncontended wr-lock/unlock case.
+ This is scenario in which they are most oftenly used
+ within MDL subsystem. Optimizing for it gives significant
+ performance improvements in some of tests involving many
+ connections.
+
+ Another important requirement imposed on this type of rwlock
+ by the MDL subsystem is that it should be OK to destroy rwlock
+ object which is in unlocked state even though some threads might
+ have not yet fully left unlock operation for it (of course there
+ is an external guarantee that no thread will try to lock rwlock
+ which is destroyed).
+ Putting it another way the unlock operation should not access
+ rwlock data after changing its state to unlocked.
+
+ TODO/FIXME: We should consider alleviating this requirement as
+ it blocks us from doing certain performance optimizations.
+*/
+
+typedef struct st_rw_pr_lock_t {
+ /**
+ Lock which protects the structure.
+ Also held for the duration of wr-lock.
+ */
+ pthread_mutex_t lock;
+ /**
+ Condition variable which is used to wake-up
+ writers waiting for readers to go away.
+ */
+ pthread_cond_t no_active_readers;
+ /** Number of active readers. */
+ uint active_readers;
+ /** Number of writers waiting for readers to go away. */
+ uint writers_waiting_readers;
+ /** Indicates whether there is an active writer. */
+ my_bool active_writer;
+#ifdef SAFE_MUTEX
+ /** Thread holding wr-lock (for debug purposes only). */
+ pthread_t writer_thread;
+#endif
+} rw_pr_lock_t;
+
+extern int rw_pr_init(rw_pr_lock_t *);
+extern int rw_pr_rdlock(rw_pr_lock_t *);
+extern int rw_pr_wrlock(rw_pr_lock_t *);
+extern int rw_pr_unlock(rw_pr_lock_t *);
+extern int rw_pr_destroy(rw_pr_lock_t *);
+#ifdef SAFE_MUTEX
+#define rw_pr_lock_assert_write_owner(A) \
+ DBUG_ASSERT((A)->active_writer && pthread_equal(pthread_self(), \
+ (A)->writer_thread))
+#define rw_pr_lock_assert_not_write_owner(A) \
+ DBUG_ASSERT(! (A)->active_writer || ! pthread_equal(pthread_self(), \
+ (A)->writer_thread))
+#else
+#define rw_pr_lock_assert_write_owner(A)
+#define rw_pr_lock_assert_not_write_owner(A)
+#endif /* SAFE_MUTEX */
+
+
+#ifdef NEED_MY_RW_LOCK
+
+#ifdef _WIN32
+
+/**
+ Implementation of Windows rwlock.
+
+ We use native (slim) rwlocks on Win7 and later, and fallback to portable
+ implementation on earlier Windows.
+
+ slim rwlock are also available on Vista/WS2008, but we do not use it
+ ("trylock" APIs are missing on Vista)
+*/
+typedef union
+{
+ /* Native rwlock (is_srwlock == TRUE) */
+ struct
+ {
+ SRWLOCK srwlock; /* native reader writer lock */
+ BOOL have_exclusive_srwlock; /* used for unlock */
+ };
+
+ /*
+ Portable implementation (is_srwlock == FALSE)
+ Fields are identical with Unix my_rw_lock_t fields.
+ */
+ struct
+ {
+ pthread_mutex_t lock; /* lock for structure */
+ pthread_cond_t readers; /* waiting readers */
+ pthread_cond_t writers; /* waiting writers */
+ int state; /* -1:writer,0:free,>0:readers */
+ int waiters; /* number of waiting writers */
+#ifdef SAFE_MUTEX
+ pthread_t write_thread;
+#endif
+ };
+} my_rw_lock_t;
+
+
+#else /* _WIN32 */
+
+/*
+ On systems which don't support native read/write locks we have
+ to use own implementation.
+*/
+typedef struct st_my_rw_lock_t {
+ pthread_mutex_t lock; /* lock for structure */
+ pthread_cond_t readers; /* waiting readers */
+ pthread_cond_t writers; /* waiting writers */
+ int state; /* -1:writer,0:free,>0:readers */
+ int waiters; /* number of waiting writers */
+#ifdef SAFE_MUTEX
+ pthread_t write_thread;
+#endif
+} my_rw_lock_t;
+
+#endif /*! _WIN32 */
+
+extern int my_rw_init(my_rw_lock_t *);
+extern int my_rw_destroy(my_rw_lock_t *);
+extern int my_rw_rdlock(my_rw_lock_t *);
+extern int my_rw_wrlock(my_rw_lock_t *);
+extern int my_rw_unlock(my_rw_lock_t *);
+extern int my_rw_tryrdlock(my_rw_lock_t *);
+extern int my_rw_trywrlock(my_rw_lock_t *);
+#ifdef SAFE_MUTEX
+#define my_rw_lock_assert_write_owner(A) \
+ DBUG_ASSERT((A)->state == -1 && pthread_equal(pthread_self(), \
+ (A)->write_thread))
+#define my_rw_lock_assert_not_write_owner(A) \
+ DBUG_ASSERT((A)->state >= 0 || ! pthread_equal(pthread_self(), \
+ (A)->write_thread))
+#else
+#define my_rw_lock_assert_write_owner(A)
+#define my_rw_lock_assert_not_write_owner(A)
+#endif
+#endif /* NEED_MY_RW_LOCK */
+
+
+#define GETHOSTBYADDR_BUFF_SIZE 2048
+
+#ifndef HAVE_THR_SETCONCURRENCY
+#define thr_setconcurrency(A) pthread_dummy(0)
+#endif
+#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize)
+#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
+#endif
+
+/* Define mutex types, see my_thr_init.c */
+#define MY_MUTEX_INIT_SLOW NULL
+#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
+extern pthread_mutexattr_t my_fast_mutexattr;
+#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
+#else
+#define MY_MUTEX_INIT_FAST NULL
+#endif
+#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+extern pthread_mutexattr_t my_errorcheck_mutexattr;
+#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr
+#else
+#define MY_MUTEX_INIT_ERRCHK NULL
+#endif
+
+#ifndef ESRCH
+/* Define it to something */
+#define ESRCH 1
+#endif
+
+typedef ulong my_thread_id;
+
+extern my_bool my_thread_global_init(void);
+extern void my_thread_global_reinit(void);
+extern void my_thread_global_end(void);
+extern my_bool my_thread_init(void);
+extern void my_thread_end(void);
+extern const char *my_thread_name(void);
+extern my_thread_id my_thread_dbug_id(void);
+extern int pthread_dummy(int);
+
+#ifndef HAVE_PTHREAD_ATTR_GETGUARDSIZE
+static inline int pthread_attr_getguardsize(pthread_attr_t *attr,
+ size_t *guardsize)
+{
+ *guardsize= 0;
+ return 0;
+}
+#endif
+
+/* All thread specific variables are in the following struct */
+
+#define THREAD_NAME_SIZE 10
+#ifndef DEFAULT_THREAD_STACK
+#if SIZEOF_CHARP > 4
+/*
+ MySQL can survive with 32K, but some glibc libraries require > 128K stack
+ To resolve hostnames. Also recursive stored procedures needs stack.
+*/
+#define DEFAULT_THREAD_STACK (256*1024L)
+#else
+#define DEFAULT_THREAD_STACK (192*1024)
+#endif
+#endif
+
+#include
+
+#define INSTRUMENT_ME 0
+
+struct st_my_thread_var
+{
+ int thr_errno;
+ mysql_cond_t suspend;
+ mysql_mutex_t mutex;
+ mysql_mutex_t * volatile current_mutex;
+ mysql_cond_t * volatile current_cond;
+ pthread_t pthread_self;
+ my_thread_id id;
+ int cmp_length;
+ int volatile abort;
+ my_bool init;
+ struct st_my_thread_var *next,**prev;
+ void *opt_info;
+ void *stack_ends_here;
+#ifndef DBUG_OFF
+ void *dbug;
+ char name[THREAD_NAME_SIZE+1];
+#endif
+};
+
+extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
+extern int set_mysys_var(struct st_my_thread_var *mysys_var);
+extern void **my_thread_var_dbug();
+extern uint my_thread_end_wait_time;
+#define my_thread_var (_my_thread_var())
+#define my_errno my_thread_var->thr_errno
+/*
+ Keep track of shutdown,signal, and main threads so that my_end() will not
+ report errors with them
+*/
+
+/* Which kind of thread library is in use */
+
+#define THD_LIB_OTHER 1
+#define THD_LIB_NPTL 2
+#define THD_LIB_LT 4
+
+extern uint thd_lib_detected;
+
+/*
+ thread_safe_xxx functions are for critical statistic or counters.
+ The implementation is guaranteed to be thread safe, on all platforms.
+ Note that the calling code should *not* assume the counter is protected
+ by the mutex given, as the implementation of these helpers may change
+ to use my_atomic operations instead.
+*/
+
+#ifndef thread_safe_increment
+#ifdef _WIN32
+#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
+#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
+#else
+#define thread_safe_increment(V,L) \
+ (mysql_mutex_lock((L)), (V)++, mysql_mutex_unlock((L)))
+#define thread_safe_decrement(V,L) \
+ (mysql_mutex_lock((L)), (V)--, mysql_mutex_unlock((L)))
+#endif
+#endif
+
+#ifndef thread_safe_add
+#ifdef _WIN32
+#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
+#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
+#else
+#define thread_safe_add(V,C,L) \
+ (mysql_mutex_lock((L)), (V)+=(C), mysql_mutex_unlock((L)))
+#define thread_safe_sub(V,C,L) \
+ (mysql_mutex_lock((L)), (V)-=(C), mysql_mutex_unlock((L)))
+#endif
+#endif
+
+
+/*
+ statistics_xxx functions are for non critical statistic,
+ maintained in global variables.
+ When compiling with SAFE_STATISTICS:
+ - race conditions can not occur.
+ - some locking occurs, which may cause performance degradation.
+
+ When compiling without SAFE_STATISTICS:
+ - race conditions can occur, making the result slightly inaccurate.
+ - the lock given is not honored.
+*/
+#ifdef SAFE_STATISTICS
+#define statistic_increment(V,L) thread_safe_increment((V),(L))
+#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
+#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
+#define statistic_sub(V,C,L) thread_safe_sub((V),(C),(L))
+#else
+#define statistic_decrement(V,L) (V)--
+#define statistic_increment(V,L) (V)++
+#define statistic_add(V,C,L) (V)+=(C)
+#define statistic_sub(V,C,L) (V)-=(C)
+#endif /* SAFE_STATISTICS */
+
+/*
+ No locking needed, the counter is owned by the thread
+*/
+#define status_var_increment(V) (V)++
+#define status_var_decrement(V) (V)--
+#define status_var_add(V,C) (V)+=(C)
+#define status_var_sub(V,C) (V)-=(C)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _my_ptread_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_rdtsc.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_rdtsc.h
new file mode 100644
index 000000000..38ab0de80
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_rdtsc.h
@@ -0,0 +1,130 @@
+/* Copyright (c) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ rdtsc3 -- multi-platform timer code
+ pgulutzan@mysql.com, 2005-08-29
+ modified 2008-11-02
+*/
+
+#ifndef MY_RDTSC_H
+#define MY_RDTSC_H
+
+/**
+ Characteristics of a timer.
+*/
+struct my_timer_unit_info
+{
+ /** Routine used for the timer. */
+ ulonglong routine;
+ /** Overhead of the timer. */
+ ulonglong overhead;
+ /** Frequency of the timer. */
+ ulonglong frequency;
+ /** Resolution of the timer. */
+ ulonglong resolution;
+};
+
+/**
+ Characteristics of all the supported timers.
+ @sa my_timer_init().
+*/
+struct my_timer_info
+{
+ /** Characteristics of the cycle timer. */
+ struct my_timer_unit_info cycles;
+ /** Characteristics of the nanosecond timer. */
+ struct my_timer_unit_info nanoseconds;
+ /** Characteristics of the microsecond timer. */
+ struct my_timer_unit_info microseconds;
+ /** Characteristics of the millisecond timer. */
+ struct my_timer_unit_info milliseconds;
+ /** Characteristics of the tick timer. */
+ struct my_timer_unit_info ticks;
+};
+
+typedef struct my_timer_info MY_TIMER_INFO;
+
+C_MODE_START
+
+/**
+ A cycle timer.
+ @return the current timer value, in cycles.
+*/
+ulonglong my_timer_cycles(void);
+
+/**
+ A namoseconds timer.
+ @return the current timer value, in nanoseconds.
+*/
+ulonglong my_timer_nanoseconds(void);
+
+/**
+ A microseconds timer.
+ @return the current timer value, in microseconds.
+*/
+ulonglong my_timer_microseconds(void);
+
+/**
+ A millisecond timer.
+ @return the current timer value, in milliseconds.
+*/
+ulonglong my_timer_milliseconds(void);
+
+/**
+ A ticks timer.
+ @return the current timer value, in ticks.
+*/
+ulonglong my_timer_ticks(void);
+
+/**
+ Timer initialization function.
+ @param [out] mti the timer characteristics.
+*/
+void my_timer_init(MY_TIMER_INFO *mti);
+
+C_MODE_END
+
+#define MY_TIMER_ROUTINE_ASM_X86 1
+#define MY_TIMER_ROUTINE_ASM_X86_64 2
+#define MY_TIMER_ROUTINE_RDTSCLL 3
+#define MY_TIMER_ROUTINE_ASM_X86_WIN 4
+#define MY_TIMER_ROUTINE_RDTSC 5
+#define MY_TIMER_ROUTINE_ASM_IA64 6
+#define MY_TIMER_ROUTINE_ASM_PPC 7
+#define MY_TIMER_ROUTINE_SGI_CYCLE 8
+#define MY_TIMER_ROUTINE_GETHRTIME 9
+#define MY_TIMER_ROUTINE_READ_REAL_TIME 10
+#define MY_TIMER_ROUTINE_CLOCK_GETTIME 11
+#define MY_TIMER_ROUTINE_NXGETTIME 12
+#define MY_TIMER_ROUTINE_GETTIMEOFDAY 13
+#define MY_TIMER_ROUTINE_QUERYPERFORMANCECOUNTER 14
+#define MY_TIMER_ROUTINE_GETTICKCOUNT 15
+#define MY_TIMER_ROUTINE_TIME 16
+#define MY_TIMER_ROUTINE_TIMES 17
+#define MY_TIMER_ROUTINE_FTIME 18
+#define MY_TIMER_ROUTINE_ASM_PPC64 19
+#define MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC64 20
+#define MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC32 21
+#define MY_TIMER_ROUTINE_ASM_SUNPRO_I386 22
+#define MY_TIMER_ROUTINE_ASM_GCC_SPARC64 23
+#define MY_TIMER_ROUTINE_ASM_GCC_SPARC32 24
+#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25
+#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
+#define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_rnd.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_rnd.h
new file mode 100644
index 000000000..cf57e8dca
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_rnd.h
@@ -0,0 +1,38 @@
+#ifndef MY_RANDOM_INCLUDED
+#define MY_RANDOM_INCLUDED
+
+/*
+ Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ A wrapper to use OpenSSL/YaSSL PRNGs.
+*/
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double my_rnd_ssl(struct rand_struct *rand_st);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MY_RANDOM_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_stacktrace.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_stacktrace.h
new file mode 100644
index 000000000..ee0386789
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_stacktrace.h
@@ -0,0 +1,127 @@
+/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _my_stacktrace_h_
+#define _my_stacktrace_h_
+
+#include
+
+#ifdef TARGET_OS_LINUX
+#if defined (__x86_64__) || defined (__i386__) || \
+ (defined(__alpha__) && defined(__GNUC__))
+#define HAVE_STACKTRACE 1
+#endif
+#elif defined(__WIN__) || defined(HAVE_PRINTSTACK)
+#define HAVE_STACKTRACE 1
+#endif
+
+#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD)
+#undef HAVE_STACKTRACE
+#define HAVE_STACKTRACE 1
+#endif
+
+#define HAVE_WRITE_CORE
+
+#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && \
+ HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE && \
+ HAVE_WEAK_SYMBOL
+#define BACKTRACE_DEMANGLE 1
+#endif
+
+C_MODE_START
+
+#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
+void my_init_stacktrace();
+void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
+void my_safe_print_str(const char* val, int max_len);
+void my_write_core(int sig);
+#if BACKTRACE_DEMANGLE
+char *my_demangle(const char *mangled_name, int *status);
+#endif
+#ifdef __WIN__
+void my_set_exception_pointers(EXCEPTION_POINTERS *ep);
+#endif
+#endif
+
+#ifdef HAVE_WRITE_CORE
+void my_write_core(int sig);
+#endif
+
+
+
+/**
+ Async-signal-safe utility functions used by signal handler routines.
+ Declared here in order to unit-test them.
+ These are not general-purpose, but tailored to the signal handling routines.
+*/
+/**
+ Converts a longlong value to string.
+ @param base 10 for decimal, 16 for hex values (0..9a..f)
+ @param val The value to convert
+ @param buf Assumed to point to the *end* of the buffer.
+ @returns Pointer to the first character of the converted string.
+ Negative values:
+ for base-10 the return string will be prepended with '-'
+ for base-16 the return string will contain 16 characters
+ Implemented with simplicity, and async-signal-safety in mind.
+*/
+char *my_safe_itoa(int base, longlong val, char *buf);
+
+/**
+ Converts a ulonglong value to string.
+ @param base 10 for decimal, 16 for hex values (0..9a..f)
+ @param val The value to convert
+ @param buf Assumed to point to the *end* of the buffer.
+ @returns Pointer to the first character of the converted string.
+ Implemented with simplicity, and async-signal-safety in mind.
+*/
+char *my_safe_utoa(int base, ulonglong val, char *buf);
+
+/**
+ A (very) limited version of snprintf.
+ @param to Destination buffer.
+ @param n Size of destination buffer.
+ @param fmt printf() style format string.
+ @returns Number of bytes written, including terminating '\0'
+ Supports 'd' 'i' 'u' 'x' 'p' 's' conversion.
+ Supports 'l' and 'll' modifiers for integral types.
+ Does not support any width/precision.
+ Implemented with simplicity, and async-signal-safety in mind.
+*/
+size_t my_safe_snprintf(char* to, size_t n, const char* fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 3, 4);
+
+/**
+ A (very) limited version of snprintf, which writes the result to STDERR.
+ @sa my_safe_snprintf
+ Implemented with simplicity, and async-signal-safety in mind.
+ @note Has an internal buffer capacity of 512 bytes,
+ which should suffice for our signal handling routines.
+*/
+size_t my_safe_printf_stderr(const char* fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 1, 2);
+
+/**
+ Writes up to count bytes from buffer to STDERR.
+ Implemented with simplicity, and async-signal-safety in mind.
+ @param buf Buffer containing data to be written.
+ @param count Number of bytes to write.
+ @returns Number of bytes written.
+*/
+size_t my_write_stderr(const void *buf, size_t count);
+
+C_MODE_END
+
+#endif /* _my_stacktrace_h_ */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_sys.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_sys.h
new file mode 100644
index 000000000..76f0be711
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_sys.h
@@ -0,0 +1,1004 @@
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _my_sys_h
+#define _my_sys_h
+
+#include "my_global.h" /* C_MODE_START, C_MODE_END */
+
+C_MODE_START
+
+#ifdef HAVE_AIOWAIT
+#include /* Used by record-cache */
+typedef struct my_aio_result {
+ aio_result_t result;
+ int pending;
+} my_aio_result;
+#endif
+
+#ifdef HAVE_VALGRIND
+# include
+# define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len)
+# define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len)
+# define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
+# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
+#else /* HAVE_VALGRIND */
+# define MEM_UNDEFINED(a,len) ((void) 0)
+# define MEM_NOACCESS(a,len) ((void) 0)
+# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
+# define MEM_CHECK_DEFINED(a,len) ((void) 0)
+#endif /* HAVE_VALGRIND */
+
+#include
+
+#include /* for CHARSET_INFO */
+#include
+#include
+#ifdef _WIN32
+#include /*for alloca*/
+#endif
+
+#define MY_INIT(name) { my_progname= name; my_init(); }
+
+/**
+ Max length of an error message generated by mysys utilities.
+ Some mysys functions produce error messages. These mostly go
+ to stderr.
+ This constant defines the size of the buffer used to format
+ the message. It should be kept in sync with MYSQL_ERRMSG_SIZE,
+ since sometimes mysys errors are stored in the server diagnostics
+ area, and we would like to avoid unexpected truncation.
+*/
+#define MYSYS_ERRMSG_SIZE (512)
+#define MYSYS_STRERROR_SIZE (128)
+
+#define MY_FILE_ERROR ((size_t) -1)
+
+ /* General bitmaps for my_func's */
+#define MY_FFNF 1 /* Fatal if file not found */
+#define MY_FNABP 2 /* Fatal if not all bytes read/writen */
+#define MY_NABP 4 /* Error if not all bytes read/writen */
+#define MY_FAE 8 /* Fatal if any error */
+#define MY_WME 16 /* Write message on error */
+#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
+#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
+#define MY_SYNC_DIR 8192 /* my_create/delete/rename: sync directory */
+#define MY_UNUSED 64 /* Unused (was support for RAID) */
+#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
+#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
+#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
+#define MY_COPYTIME 64 /* my_redel() copys time */
+#define MY_DELETE_OLD 256 /* my_create_with_symlink() */
+#define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */
+#define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */
+#define MY_REDEL_MAKE_BACKUP 256
+#define MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */
+#define MY_DONT_WAIT 64 /* my_lock() don't wait if can't lock */
+#define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */
+#define MY_ALLOW_ZERO_PTR 64 /* my_realloc() ; zero ptr -> malloc */
+#define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */
+#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */
+#define MY_DONT_OVERWRITE_FILE 1024 /* my_copy: Don't overwrite file */
+#define MY_THREADSAFE 2048 /* my_seek(): lock fd mutex */
+#define MY_SYNC 4096 /* my_copy(): sync dst file */
+
+#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */
+#define MY_GIVE_INFO 2 /* Give time info about process*/
+#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */
+
+#define ME_HIGHBYTE 8 /* Shift for colours */
+#define ME_NOCUR 1 /* Don't use curses message */
+#define ME_OLDWIN 2 /* Use old window */
+#define ME_BELL 4 /* Ring bell then printing message */
+#define ME_HOLDTANG 8 /* Don't delete last keys */
+#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */
+#define ME_WAITTANG 32 /* Wait for a user action */
+#define ME_NOREFRESH 64 /* Write the error message to error log */
+#define ME_NOINPUT 128 /* Dont use the input libary */
+#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
+#define ME_COLOUR2 ((2 << ME_HIGHBYTE))
+#define ME_COLOUR3 ((3 << ME_HIGHBYTE))
+#define ME_FATALERROR 1024 /* Fatal statement error */
+
+ /* Bits in last argument to fn_format */
+#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */
+#define MY_REPLACE_EXT 2 /* replace extension with 'ext' */
+#define MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */
+#define MY_PACK_FILENAME 8 /* Pack name (home -> ~) */
+#define MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */
+#define MY_RETURN_REAL_PATH 32 /* return full path for file */
+#define MY_SAFE_PATH 64 /* Return NULL if too long path */
+#define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */
+#define MY_APPEND_EXT 256 /* add 'ext' as additional extension*/
+
+
+ /* My seek flags */
+#define MY_SEEK_SET 0
+#define MY_SEEK_CUR 1
+#define MY_SEEK_END 2
+
+ /* Some constants */
+#define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */
+#define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */
+#define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl. */
+#define DFLT_INIT_HITS 3
+
+ /* root_alloc flags */
+#define MY_KEEP_PREALLOC 1
+#define MY_MARK_BLOCKS_FREE 2 /* move used to free list and reuse them */
+
+ /* Internal error numbers (for assembler functions) */
+#define MY_ERRNO_EDOM 33
+#define MY_ERRNO_ERANGE 34
+
+ /* Bits for get_date timeflag */
+#define GETDATE_DATE_TIME 1
+#define GETDATE_SHORT_DATE 2
+#define GETDATE_HHMMSSTIME 4
+#define GETDATE_GMT 8
+#define GETDATE_FIXEDLENGTH 16
+
+ /* defines when allocating data */
+extern void *my_malloc(size_t Size,myf MyFlags);
+extern void *my_multi_malloc(myf MyFlags, ...);
+extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
+extern void my_free(void *ptr);
+extern void *my_memdup(const void *from,size_t length,myf MyFlags);
+extern char *my_strdup(const char *from,myf MyFlags);
+extern char *my_strndup(const char *from, size_t length,
+ myf MyFlags);
+
+/*
+ Switch to my_malloc() if the memory block to be allocated is bigger than
+ max_alloca_sz.
+*/
+#ifndef HAVE_ALLOCA
+#define my_safe_alloca(size, max_alloca_sz) my_alloca(size)
+#define my_safe_afree(ptr, size, max_alloca_sz) my_afree(ptr)
+#else
+#define my_safe_alloca(size, max_alloca_sz) ((size <= max_alloca_sz) ? \
+ my_alloca(size) : \
+ my_malloc(size, MYF(0)))
+#define my_safe_afree(ptr, size, max_alloca_sz) if (size > max_alloca_sz) \
+ my_free(ptr)
+#endif /* #ifndef HAVE_ALLOCA */
+
+#if !defined(DBUG_OFF) || defined(HAVE_VALGRIND)
+/**
+ Put bad content in memory to be sure it will segfault if dereferenced.
+ With Valgrind, verify that memory is addressable, and mark it undefined.
+ We cache value of B because if B is expression which depends on A, memset()
+ trashes value of B.
+*/
+#define TRASH(A,B) do { \
+ const size_t l= (B); \
+ MEM_CHECK_ADDRESSABLE(A, l); \
+ memset(A, 0x8F, l); \
+ MEM_UNDEFINED(A, l); \
+ } while (0)
+#else
+#define TRASH(A,B) do {} while(0)
+#endif
+#if defined(ENABLED_DEBUG_SYNC)
+extern void (*debug_sync_C_callback_ptr)(const char *, size_t);
+#define DEBUG_SYNC_C(_sync_point_name_) do { \
+ if (debug_sync_C_callback_ptr != NULL) \
+ (*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \
+ while(0)
+#define DEBUG_SYNC_C_IF_THD(thd, _sync_point_name_) do { \
+ if (debug_sync_C_callback_ptr != NULL && thd) \
+ (*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \
+ while(0)
+#else
+#define DEBUG_SYNC_C(_sync_point_name_)
+#define DEBUG_SYNC_C_IF_THD(thd, _sync_point_name_)
+#endif /* defined(ENABLED_DEBUG_SYNC) */
+
+#ifdef HAVE_LARGE_PAGES
+extern uint my_get_large_page_size(void);
+extern uchar * my_large_malloc(size_t size, myf my_flags);
+extern void my_large_free(uchar *ptr);
+#else
+#define my_get_large_page_size() (0)
+#define my_large_malloc(A,B) my_malloc_lock((A),(B))
+#define my_large_free(A) my_free_lock((A))
+#endif /* HAVE_LARGE_PAGES */
+
+#ifdef HAVE_ALLOCA
+#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
+#pragma alloca
+#endif /* _AIX */
+#if defined(__MWERKS__)
+#undef alloca
+#define alloca _alloca
+#endif /* __MWERKS__ */
+#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca)
+#define alloca __builtin_alloca
+#endif /* GNUC */
+#define my_alloca(SZ) alloca((size_t) (SZ))
+#define my_afree(PTR) {}
+#else
+#define my_alloca(SZ) my_malloc(SZ,MYF(MY_FAE))
+#define my_afree(PTR) my_free(PTR)
+#endif /* HAVE_ALLOCA */
+
+#include /* errno is a define */
+
+extern char *home_dir; /* Home directory for user */
+extern const char *my_progname; /* program-name (printed in errors) */
+extern char curr_dir[]; /* Current directory for user */
+extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
+extern void (*fatal_error_handler_hook)(uint my_err, const char *str,
+ myf MyFlags);
+extern void(*sql_print_warning_hook)(const char *format,...);
+extern uint my_file_limit;
+extern ulong my_thread_stack_size;
+
+extern void (*proc_info_hook)(void *, const PSI_stage_info *, PSI_stage_info *,
+ const char *, const char *, const unsigned int);
+
+#ifdef HAVE_LARGE_PAGES
+extern my_bool my_use_large_pages;
+extern uint my_large_page_size;
+#endif
+
+/* charsets */
+#define MY_ALL_CHARSETS_SIZE 2048
+extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
+extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
+extern CHARSET_INFO compiled_charsets[];
+
+/* statistics */
+extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
+extern ulong my_file_total_opened;
+extern my_bool my_init_done;
+
+ /* Point to current my_message() */
+extern void (*my_sigtstp_cleanup)(void),
+ /* Executed before jump to shell */
+ (*my_sigtstp_restart)(void),
+ (*my_abort_hook)(int);
+ /* Executed when comming from shell */
+extern MYSQL_PLUGIN_IMPORT int my_umask; /* Default creation mask */
+extern int my_umask_dir,
+ my_recived_signals, /* Signals we have got */
+ my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
+ my_dont_interrupt; /* call remember_intr when set */
+extern my_bool my_use_symdir;
+
+extern ulong my_default_record_cache_size;
+extern my_bool my_disable_locking, my_disable_async_io,
+ my_disable_flush_key_blocks, my_disable_symlinks;
+extern char wild_many,wild_one,wild_prefix;
+extern const char *charsets_dir;
+
+extern my_bool timed_mutexes;
+
+enum cache_type
+{
+ TYPE_NOT_SET= 0, READ_CACHE, WRITE_CACHE,
+ SEQ_READ_APPEND /* sequential read or append */,
+ READ_FIFO, READ_NET,WRITE_NET};
+
+enum flush_type
+{
+ FLUSH_KEEP, /* flush block and keep it in the cache */
+ FLUSH_RELEASE, /* flush block and remove it from the cache */
+ FLUSH_IGNORE_CHANGED, /* remove block from the cache */
+ /*
+ As my_disable_flush_pagecache_blocks is always 0, the following option
+ is strictly equivalent to FLUSH_KEEP
+ */
+ FLUSH_FORCE_WRITE
+};
+
+typedef struct st_record_cache /* Used when cacheing records */
+{
+ File file;
+ int rc_seek,error,inited;
+ uint rc_length,read_length,reclength;
+ my_off_t rc_record_pos,end_of_file;
+ uchar *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
+#ifdef HAVE_AIOWAIT
+ int use_async_io;
+ my_aio_result aio_result;
+#endif
+ enum cache_type type;
+} RECORD_CACHE;
+
+enum file_type
+{
+ UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOPEN,
+ FILE_BY_MKSTEMP, FILE_BY_DUP
+};
+
+struct st_my_file_info
+{
+ char *name;
+#ifdef _WIN32
+ HANDLE fhandle; /* win32 file handle */
+ int oflag; /* open flags, e.g O_APPEND */
+#endif
+ enum file_type type;
+#if !defined(HAVE_PREAD) && !defined(_WIN32)
+ mysql_mutex_t mutex;
+#endif
+};
+
+extern struct st_my_file_info *my_file_info;
+
+typedef struct st_dynamic_array
+{
+ uchar *buffer;
+ uint elements,max_element;
+ uint alloc_increment;
+ uint size_of_element;
+} DYNAMIC_ARRAY;
+
+typedef struct st_my_tmpdir
+{
+ DYNAMIC_ARRAY full_list;
+ char **list;
+ uint cur, max;
+ mysql_mutex_t mutex;
+} MY_TMPDIR;
+
+typedef struct st_dynamic_string
+{
+ char *str;
+ size_t length,max_length,alloc_increment;
+} DYNAMIC_STRING;
+
+struct st_io_cache;
+typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
+
+typedef struct st_io_cache_share
+{
+ mysql_mutex_t mutex; /* To sync on reads into buffer. */
+ mysql_cond_t cond; /* To wait for signals. */
+ mysql_cond_t cond_writer; /* For a synchronized writer. */
+ /* Offset in file corresponding to the first byte of buffer. */
+ my_off_t pos_in_file;
+ /* If a synchronized write cache is the source of the data. */
+ struct st_io_cache *source_cache;
+ uchar *buffer; /* The read buffer. */
+ uchar *read_end; /* Behind last valid byte of buffer. */
+ int running_threads; /* threads not in lock. */
+ int total_threads; /* threads sharing the cache. */
+ int error; /* Last error. */
+#ifdef NOT_YET_IMPLEMENTED
+ /* whether the structure should be free'd */
+ my_bool alloced;
+#endif
+} IO_CACHE_SHARE;
+
+typedef struct st_io_cache /* Used when cacheing files */
+{
+ /* Offset in file corresponding to the first byte of uchar* buffer. */
+ my_off_t pos_in_file;
+ /*
+ The offset of end of file for READ_CACHE and WRITE_CACHE.
+ For SEQ_READ_APPEND it the maximum of the actual end of file and
+ the position represented by read_end.
+ */
+ my_off_t end_of_file;
+ /* Points to current read position in the buffer */
+ uchar *read_pos;
+ /* the non-inclusive boundary in the buffer for the currently valid read */
+ uchar *read_end;
+ uchar *buffer; /* The read buffer */
+ /* Used in ASYNC_IO */
+ uchar *request_pos;
+
+ /* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */
+ uchar *write_buffer;
+ /*
+ Only used in SEQ_READ_APPEND, and points to the current read position
+ in the write buffer. Note that reads in SEQ_READ_APPEND caches can
+ happen from both read buffer (uchar* buffer) and write buffer
+ (uchar* write_buffer).
+ */
+ uchar *append_read_pos;
+ /* Points to current write position in the write buffer */
+ uchar *write_pos;
+ /* The non-inclusive boundary of the valid write area */
+ uchar *write_end;
+
+ /*
+ Current_pos and current_end are convenience variables used by
+ my_b_tell() and other routines that need to know the current offset
+ current_pos points to &write_pos, and current_end to &write_end in a
+ WRITE_CACHE, and &read_pos and &read_end respectively otherwise
+ */
+ uchar **current_pos, **current_end;
+
+ /*
+ The lock is for append buffer used in SEQ_READ_APPEND cache
+ need mutex copying from append buffer to read buffer.
+ */
+ mysql_mutex_t append_buffer_lock;
+ /*
+ The following is used when several threads are reading the
+ same file in parallel. They are synchronized on disk
+ accesses reading the cached part of the file asynchronously.
+ It should be set to NULL to disable the feature. Only
+ READ_CACHE mode is supported.
+ */
+ IO_CACHE_SHARE *share;
+
+ /*
+ A caller will use my_b_read() macro to read from the cache
+ if the data is already in cache, it will be simply copied with
+ memcpy() and internal variables will be accordinging updated with
+ no functions invoked. However, if the data is not fully in the cache,
+ my_b_read() will call read_function to fetch the data. read_function
+ must never be invoked directly.
+ */
+ int (*read_function)(struct st_io_cache *,uchar *,size_t);
+ /*
+ Same idea as in the case of read_function, except my_b_write() needs to
+ be replaced with my_b_append() for a SEQ_READ_APPEND cache
+ */
+ int (*write_function)(struct st_io_cache *,const uchar *,size_t);
+ /*
+ Specifies the type of the cache. Depending on the type of the cache
+ certain operations might not be available and yield unpredicatable
+ results. Details to be documented later
+ */
+ enum cache_type type;
+ /*
+ Callbacks when the actual read I/O happens. These were added and
+ are currently used for binary logging of LOAD DATA INFILE - when a
+ block is read from the file, we create a block create/append event, and
+ when IO_CACHE is closed, we create an end event. These functions could,
+ of course be used for other things
+ */
+ IO_CACHE_CALLBACK pre_read;
+ IO_CACHE_CALLBACK post_read;
+ IO_CACHE_CALLBACK pre_close;
+ /*
+ Counts the number of times, when we were forced to use disk. We use it to
+ increase the binlog_cache_disk_use and binlog_stmt_cache_disk_use status
+ variables.
+ */
+ ulong disk_writes;
+ void* arg; /* for use by pre/post_read */
+ char *file_name; /* if used with 'open_cached_file' */
+ char *dir,*prefix;
+ File file; /* file descriptor */
+ /*
+ seek_not_done is set by my_b_seek() to inform the upcoming read/write
+ operation that a seek needs to be preformed prior to the actual I/O
+ error is 0 if the cache operation was successful, -1 if there was a
+ "hard" error, and the actual number of I/O-ed bytes if the read/write was
+ partial.
+ */
+ int seek_not_done,error;
+ /* buffer_length is memory size allocated for buffer or write_buffer */
+ size_t buffer_length;
+ /* read_length is the same as buffer_length except when we use async io */
+ size_t read_length;
+ myf myflags; /* Flags used to my_read/my_write */
+ /*
+ alloced_buffer is 1 if the buffer was allocated by init_io_cache() and
+ 0 if it was supplied by the user.
+ Currently READ_NET is the only one that will use a buffer allocated
+ somewhere else
+ */
+ my_bool alloced_buffer;
+#ifdef HAVE_AIOWAIT
+ /*
+ As inidicated by ifdef, this is for async I/O, which is not currently
+ used (because it's not reliable on all systems)
+ */
+ uint inited;
+ my_off_t aio_read_pos;
+ my_aio_result aio_result;
+#endif
+} IO_CACHE;
+
+typedef int (*qsort2_cmp)(const void *, const void *, const void *);
+
+typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...)
+ ATTRIBUTE_FORMAT_FPTR(printf, 2, 3);
+
+extern my_error_reporter my_charset_error_reporter;
+
+ /* defines for mf_iocache */
+
+ /* Test if buffer is inited */
+#define my_b_clear(info) (info)->buffer=0
+#define my_b_inited(info) (info)->buffer
+#define my_b_EOF INT_MIN
+
+#define my_b_read(info,Buffer,Count) \
+ ((info)->read_pos + (Count) <= (info)->read_end ?\
+ (memcpy(Buffer,(info)->read_pos,(size_t) (Count)), \
+ ((info)->read_pos+=(Count)),0) :\
+ (*(info)->read_function)((info),Buffer,Count))
+
+#define my_b_write(info,Buffer,Count) \
+ ((info)->write_pos + (Count) <=(info)->write_end ?\
+ (memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\
+ ((info)->write_pos+=(Count)),0) : \
+ (*(info)->write_function)((info),(uchar *)(Buffer),(Count)))
+
+#define my_b_get(info) \
+ ((info)->read_pos != (info)->read_end ?\
+ ((info)->read_pos++, (int) (uchar) (info)->read_pos[-1]) :\
+ _my_b_get(info))
+
+ /* my_b_write_byte dosn't have any err-check */
+#define my_b_write_byte(info,chr) \
+ (((info)->write_pos < (info)->write_end) ?\
+ ((*(info)->write_pos++)=(chr)) :\
+ (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr))))
+
+#define my_b_fill_cache(info) \
+ (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0))
+
+#define my_b_tell(info) ((info)->pos_in_file + \
+ (size_t) (*(info)->current_pos - (info)->request_pos))
+
+#define my_b_get_buffer_start(info) (info)->request_pos
+#define my_b_get_bytes_in_buffer(info) (char*) (info)->read_end - \
+ (char*) my_b_get_buffer_start(info)
+#define my_b_get_pos_in_file(info) (info)->pos_in_file
+
+/* tell write offset in the SEQ_APPEND cache */
+int my_b_copy_to_file(IO_CACHE *cache, FILE *file);
+my_off_t my_b_append_tell(IO_CACHE* info);
+my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
+
+#define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - \
+ *(info)->current_pos)
+
+typedef uint32 ha_checksum;
+
+#include
+
+
+ /* Prototypes for mysys and my_func functions */
+
+extern int my_copy(const char *from,const char *to,myf MyFlags);
+extern int my_delete(const char *name,myf MyFlags);
+extern int my_getwd(char * buf,size_t size,myf MyFlags);
+extern int my_setwd(const char *dir,myf MyFlags);
+extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
+extern void *my_once_alloc(size_t Size,myf MyFlags);
+extern void my_once_free(void);
+extern char *my_once_strdup(const char *src,myf myflags);
+extern void *my_once_memdup(const void *src, size_t len, myf myflags);
+extern File my_open(const char *FileName,int Flags,myf MyFlags);
+extern File my_register_filename(File fd, const char *FileName,
+ enum file_type type_of_file,
+ uint error_message_number, myf MyFlags);
+extern File my_create(const char *FileName,int CreateFlags,
+ int AccessFlags, myf MyFlags);
+extern int my_close(File Filedes,myf MyFlags);
+extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
+extern int my_readlink(char *to, const char *filename, myf MyFlags);
+extern int my_is_symlink(const char *filename);
+extern int my_realpath(char *to, const char *filename, myf MyFlags);
+extern File my_create_with_symlink(const char *linkname, const char *filename,
+ int createflags, int access_flags,
+ myf MyFlags);
+extern int my_delete_with_symlink(const char *name, myf MyFlags);
+extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
+extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
+extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags);
+extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset,
+ myf MyFlags);
+extern int my_rename(const char *from,const char *to,myf MyFlags);
+extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags);
+extern my_off_t my_tell(File fd,myf MyFlags);
+extern size_t my_write(File Filedes,const uchar *Buffer,size_t Count,
+ myf MyFlags);
+extern size_t my_pwrite(File Filedes,const uchar *Buffer,size_t Count,
+ my_off_t offset,myf MyFlags);
+extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags);
+extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count,
+ myf MyFlags);
+extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
+extern my_off_t my_ftell(FILE *stream,myf MyFlags);
+
+/* implemented in my_memmem.c */
+extern void *my_memmem(const void *haystack, size_t haystacklen,
+ const void *needle, size_t needlelen);
+
+
+#ifdef _WIN32
+extern int my_access(const char *path, int amode);
+#else
+#define my_access access
+#endif
+
+extern int check_if_legal_filename(const char *path);
+extern int check_if_legal_tablename(const char *path);
+
+#ifdef __WIN__
+extern my_bool is_filename_allowed(const char *name, size_t length,
+ my_bool allow_current_dir);
+#else /* __WIN__ */
+# define is_filename_allowed(name, length, allow_cwd) (TRUE)
+#endif /* __WIN__ */
+
+#ifdef _WIN32
+extern int nt_share_delete(const char *name,myf MyFlags);
+#define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags))
+#else
+#define my_delete_allow_opened(fname,flags) my_delete((fname),(flags))
+#endif
+
+#ifdef _WIN32
+/* Windows-only functions (CRT equivalents)*/
+extern HANDLE my_get_osfhandle(File fd);
+extern void my_osmaperr(unsigned long last_error);
+#endif
+
+extern void init_glob_errs(void);
+extern const char** get_global_errmsgs();
+extern void wait_for_free_space(const char *filename, int errors);
+extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
+extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
+extern FILE *my_freopen(const char *path, const char *mode, FILE *stream);
+extern int my_fclose(FILE *fd,myf MyFlags);
+extern File my_fileno(FILE *fd);
+extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
+extern void thr_set_sync_wait_callback(void (*before_sync)(void),
+ void (*after_sync)(void));
+extern int my_sync(File fd, myf my_flags);
+extern int my_sync_dir(const char *dir_name, myf my_flags);
+extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
+extern char *my_strerror(char *buf, size_t len, int errnum);
+extern const char *my_get_err_msg(int nr);
+extern void my_error(int nr,myf MyFlags, ...);
+extern void my_printf_error(uint my_err, const char *format,
+ myf MyFlags, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 4);
+extern void my_printv_error(uint error, const char *format, myf MyFlags,
+ va_list ap);
+extern int my_error_register(const char** (*get_errmsgs) (),
+ int first, int last);
+extern void my_printf_warning (const char * format, ...);
+extern const char **my_error_unregister(int first, int last);
+extern void my_message(uint my_err, const char *str,myf MyFlags);
+extern void my_message_stderr(uint my_err, const char *str, myf MyFlags);
+extern my_bool my_init(void);
+extern void my_end(int infoflag);
+extern int my_redel(const char *from, const char *to, int MyFlags);
+extern int my_copystat(const char *from, const char *to, int MyFlags);
+extern char * my_filename(File fd);
+
+#ifdef EXTRA_DEBUG
+void my_print_open_files(void);
+#else
+#define my_print_open_files()
+#endif
+
+extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist);
+extern char *my_tmpdir(MY_TMPDIR *tmpdir);
+extern void free_tmpdir(MY_TMPDIR *tmpdir);
+
+extern void my_remember_signal(int signal_number,sig_handler (*func)(int));
+extern size_t dirname_part(char * to,const char *name, size_t *to_res_length);
+extern size_t dirname_length(const char *name);
+#define base_name(A) (A+dirname_length(A))
+extern int test_if_hard_path(const char *dir_name);
+extern my_bool has_path(const char *name);
+extern char *convert_dirname(char *to, const char *from, const char *from_end);
+extern void to_unix_path(char * name);
+extern char * fn_ext(const char *name);
+extern char * fn_same(char * toname,const char *name,int flag);
+extern char * fn_format(char * to,const char *name,const char *dir,
+ const char *form, uint flag);
+extern size_t strlength(const char *str);
+extern void pack_dirname(char * to,const char *from);
+extern size_t normalize_dirname(char * to, const char *from);
+extern size_t unpack_dirname(char * to,const char *from, my_bool *is_symdir);
+extern size_t cleanup_dirname(char * to,const char *from);
+extern size_t system_filename(char * to,const char *from);
+extern size_t unpack_filename(char * to,const char *from);
+extern char * intern_filename(char * to,const char *from);
+extern char * directory_file_name(char * dst, const char *src);
+extern int pack_filename(char * to, const char *name, size_t max_length);
+extern char * my_path(char * to,const char *progname,
+ const char *own_pathname_part);
+extern char * my_load_path(char * to, const char *path,
+ const char *own_path_prefix);
+extern int wild_compare(const char *str,const char *wildstr,
+ pbool str_is_pattern);
+extern my_bool array_append_string_unique(const char *str,
+ const char **array, size_t size);
+extern void get_date(char * to,int timeflag,time_t use_time);
+extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr,
+ pbool remove_garbage);
+extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file,
+ size_t reclength,enum cache_type type,
+ pbool use_async_io);
+extern int read_cache_record(RECORD_CACHE *info,uchar *to);
+extern int end_record_cache(RECORD_CACHE *info);
+extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
+ const uchar *record,size_t length);
+extern int flush_write_cache(RECORD_CACHE *info);
+extern void handle_recived_signals(void);
+
+extern sig_handler my_set_alarm_variable(int signo);
+extern my_bool radixsort_is_appliccable(uint n_items, size_t size_of_element);
+extern void my_string_ptr_sort(uchar *base,uint items,size_t size);
+extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
+ size_t size_of_element,uchar *buffer[]);
+extern qsort_t my_qsort(void *base_ptr, size_t total_elems, size_t size,
+ qsort_cmp cmp);
+extern qsort_t my_qsort2(void *base_ptr, size_t total_elems, size_t size,
+ qsort2_cmp cmp, const void *cmp_argument);
+extern qsort2_cmp get_ptr_compare(size_t);
+void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos);
+my_off_t my_get_ptr(uchar *ptr, size_t pack_length);
+extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize,
+ enum cache_type type,my_off_t seek_offset,
+ pbool use_async_io, myf cache_myflags);
+extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
+ my_off_t seek_offset,pbool use_async_io,
+ pbool clear_cache);
+extern void setup_io_cache(IO_CACHE* info);
+extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count);
+extern int _my_b_read_r(IO_CACHE *info,uchar *Buffer,size_t Count);
+extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
+ IO_CACHE *write_cache, uint num_threads);
+extern void remove_io_thread(IO_CACHE *info);
+extern int _my_b_seq_read(IO_CACHE *info,uchar *Buffer,size_t Count);
+extern int _my_b_net_read(IO_CACHE *info,uchar *Buffer,size_t Count);
+extern int _my_b_get(IO_CACHE *info);
+extern int _my_b_async_read(IO_CACHE *info,uchar *Buffer,size_t Count);
+extern int _my_b_write(IO_CACHE *info,const uchar *Buffer,size_t Count);
+extern int my_b_append(IO_CACHE *info,const uchar *Buffer,size_t Count);
+extern int my_b_safe_write(IO_CACHE *info,const uchar *Buffer,size_t Count);
+
+extern int my_block_write(IO_CACHE *info, const uchar *Buffer,
+ size_t Count, my_off_t pos);
+extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
+
+#define flush_io_cache(info) my_b_flush_io_cache((info),1)
+
+extern int end_io_cache(IO_CACHE *info);
+extern size_t my_b_fill(IO_CACHE *info);
+extern void my_b_seek(IO_CACHE *info,my_off_t pos);
+extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length);
+extern my_off_t my_b_filelength(IO_CACHE *info);
+extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
+extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
+extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
+ const char *prefix, size_t cache_size,
+ myf cache_myflags);
+extern my_bool real_open_cached_file(IO_CACHE *cache);
+extern void close_cached_file(IO_CACHE *cache);
+File create_temp_file(char *to, const char *dir, const char *pfx,
+ int mode, myf MyFlags);
+#define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D)
+#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D)
+#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E)
+#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E)
+extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
+ void *init_buffer, uint init_alloc,
+ uint alloc_increment);
+/* init_dynamic_array() function is deprecated */
+extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
+ uint init_alloc, uint alloc_increment);
+extern my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void *element);
+extern void *alloc_dynamic(DYNAMIC_ARRAY *array);
+extern void *pop_dynamic(DYNAMIC_ARRAY*);
+extern my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element,
+ uint array_index);
+extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements);
+extern void get_dynamic(DYNAMIC_ARRAY *array, void *element,
+ uint array_index);
+extern void delete_dynamic(DYNAMIC_ARRAY *array);
+extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
+extern void freeze_size(DYNAMIC_ARRAY *array);
+#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
+#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
+#define push_dynamic(A,B) insert_dynamic((A),(B))
+#define reset_dynamic(array) ((array)->elements= 0)
+#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
+
+extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
+ size_t init_alloc,size_t alloc_increment);
+extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
+my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
+ size_t length);
+extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
+ ...);
+extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
+extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
+extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
+extern void dynstr_free(DYNAMIC_STRING *str);
+#ifdef HAVE_MLOCK
+extern void *my_malloc_lock(size_t length,myf flags);
+extern void my_free_lock(void *ptr);
+#else
+#define my_malloc_lock(A,B) my_malloc((A),(B))
+#define my_free_lock(A) my_free((A))
+#endif
+#define alloc_root_inited(A) ((A)->min_malloc != 0)
+#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
+#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0)
+extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
+ size_t pre_alloc_size);
+extern void *alloc_root(MEM_ROOT *mem_root, size_t Size);
+extern void *multi_alloc_root(MEM_ROOT *mem_root, ...);
+extern void free_root(MEM_ROOT *root, myf MyFLAGS);
+extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
+extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
+ size_t prealloc_size);
+extern char *strdup_root(MEM_ROOT *root,const char *str);
+static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
+{
+ return str ? strdup_root(root, str) : 0;
+}
+extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
+extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
+extern my_bool my_compress(uchar *, size_t *, size_t *);
+extern my_bool my_uncompress(uchar *, size_t , size_t *);
+extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
+ size_t *complen);
+extern int packfrm(uchar *, size_t, uchar **, size_t *);
+extern int unpackfrm(uchar **, size_t *, const uchar *);
+
+extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem,
+ size_t count);
+extern void my_sleep(ulong m_seconds);
+extern ulong crc32(ulong crc, const uchar *buf, uint len);
+extern uint my_set_max_open_files(uint files);
+void my_free_open_file_info(void);
+
+extern time_t my_time(myf flags);
+extern ulonglong my_getsystime(void);
+extern ulonglong my_micro_time();
+extern ulonglong my_micro_time_and_time(time_t *time_arg);
+time_t my_time_possible_from_micro(ulonglong microtime);
+extern my_bool my_gethwaddr(uchar *to);
+extern int my_getncpus();
+
+#ifdef HAVE_SYS_MMAN_H
+#include
+
+#ifndef MAP_NOSYNC
+#define MAP_NOSYNC 0
+#endif
+#ifndef MAP_NORESERVE
+#define MAP_NORESERVE 0 /* For irix and AIX */
+#endif
+
+#ifdef HAVE_MMAP64
+#define my_mmap(a,b,c,d,e,f) mmap64(a,b,c,d,e,f)
+#else
+#define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f)
+#endif
+#define my_munmap(a,b) munmap((a),(b))
+
+#else
+/* not a complete set of mmap() flags, but only those that nesessary */
+#define PROT_READ 1
+#define PROT_WRITE 2
+#define MAP_NORESERVE 0
+#define MAP_SHARED 0x0001
+#define MAP_PRIVATE 0x0002
+#define MAP_NOSYNC 0x0800
+#define MAP_FAILED ((void *)-1)
+#define MS_SYNC 0x0000
+
+#define HAVE_MMAP
+void *my_mmap(void *, size_t, int, int, int, my_off_t);
+int my_munmap(void *, size_t);
+#endif
+
+/* my_getpagesize */
+#ifdef HAVE_GETPAGESIZE
+#define my_getpagesize() getpagesize()
+#else
+int my_getpagesize(void);
+#endif
+
+int my_msync(int, void *, size_t, int);
+
+/* character sets */
+extern void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader);
+extern uint get_charset_number(const char *cs_name, uint cs_flags);
+extern uint get_collation_number(const char *name);
+extern const char *get_charset_name(uint cs_number);
+
+extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
+extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
+extern CHARSET_INFO *my_collation_get_by_name(MY_CHARSET_LOADER *loader,
+ const char *name, myf flags);
+extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
+ uint cs_flags, myf my_flags);
+extern CHARSET_INFO *my_charset_get_by_name(MY_CHARSET_LOADER *loader,
+ const char *name,
+ uint cs_flags, myf my_flags);
+extern my_bool resolve_charset(const char *cs_name,
+ const CHARSET_INFO *default_cs,
+ const CHARSET_INFO **cs);
+extern my_bool resolve_collation(const char *cl_name,
+ const CHARSET_INFO *default_cl,
+ const CHARSET_INFO **cl);
+extern void free_charsets(void);
+extern char *get_charsets_dir(char *buf);
+extern my_bool my_charset_same(const CHARSET_INFO *cs1,
+ const CHARSET_INFO *cs2);
+extern my_bool init_compiled_charsets(myf flags);
+extern void add_compiled_collation(CHARSET_INFO *cs);
+extern size_t escape_string_for_mysql(const CHARSET_INFO *charset_info,
+ char *to, size_t to_length,
+ const char *from, size_t length);
+#ifdef __WIN__
+#define BACKSLASH_MBTAIL
+/* File system character set */
+extern CHARSET_INFO *fs_character_set(void);
+#endif
+extern size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
+ char *to, size_t to_length,
+ const char *from, size_t length);
+
+extern void thd_increment_bytes_sent(ulong length);
+extern void thd_increment_bytes_received(ulong length);
+
+#ifdef __WIN__
+extern my_bool have_tcpip; /* Is set if tcpip is used */
+
+/* implemented in my_windac.c */
+
+int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror,
+ DWORD owner_rights, DWORD everybody_rights);
+
+void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
+
+/* implemented in my_conio.c */
+my_bool my_win_is_console(FILE *file);
+char *my_win_console_readline(const CHARSET_INFO *cs, char *mbbuf, size_t mbbufsize);
+void my_win_console_write(const CHARSET_INFO *cs, const char *data, size_t datalen);
+void my_win_console_fputs(const CHARSET_INFO *cs, const char *data);
+void my_win_console_putc(const CHARSET_INFO *cs, int c);
+void my_win_console_vfprintf(const CHARSET_INFO *cs, const char *fmt, va_list args);
+int my_win_translate_command_line_args(const CHARSET_INFO *cs, int *ac, char ***av);
+#endif /* __WIN__ */
+
+#include
+
+#ifdef HAVE_PSI_INTERFACE
+extern MYSQL_PLUGIN_IMPORT struct PSI_bootstrap *PSI_hook;
+extern void set_psi_server(PSI *psi);
+void my_init_mysys_psi_keys(void);
+#endif
+
+struct st_mysql_file;
+extern struct st_mysql_file *mysql_stdin;
+
+enum durability_properties
+{
+ /*
+ Preserves the durability properties defined by the engine */
+ HA_REGULAR_DURABILITY= 0,
+ /*
+ Ignore the durability properties defined by the engine and
+ write only in-memory entries.
+ */
+ HA_IGNORE_DURABILITY= 1
+};
+
+C_MODE_END
+#endif /* _my_sys_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_time.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_time.h
new file mode 100644
index 000000000..f10724119
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_time.h
@@ -0,0 +1,249 @@
+/* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ This is a private header of sql-common library, containing
+ declarations for my_time.c
+*/
+
+#ifndef _my_time_h_
+#define _my_time_h_
+#include "my_global.h"
+#include "mysql_time.h"
+
+C_MODE_START
+
+extern ulonglong log_10_int[20];
+extern uchar days_in_month[];
+extern const char my_zero_datetime6[]; /* "0000-00-00 00:00:00.000000" */
+
+/*
+ Portable time_t replacement.
+ Should be signed and hold seconds for 1902 -- 2038-01-19 range
+ i.e at least a 32bit variable
+
+ Using the system built in time_t is not an option as
+ we rely on the above requirements in the time functions
+*/
+typedef long my_time_t;
+
+#define MY_TIME_T_MAX LONG_MAX
+#define MY_TIME_T_MIN LONG_MIN
+
+#define DATETIME_MAX_DECIMALS 6
+
+/* Time handling defaults */
+#define TIMESTAMP_MAX_YEAR 2038
+#define TIMESTAMP_MIN_YEAR (1900 + YY_PART_YEAR - 1)
+#define TIMESTAMP_MAX_VALUE INT_MAX32
+#define TIMESTAMP_MIN_VALUE 1
+
+/* two-digit years < this are 20..; >= this are 19.. */
+#define YY_PART_YEAR 70
+
+/*
+ check for valid times only if the range of time_t is greater than
+ the range of my_time_t
+*/
+#if SIZEOF_TIME_T > 4 || defined(TIME_T_UNSIGNED)
+# define IS_TIME_T_VALID_FOR_TIMESTAMP(x) \
+ ((x) <= TIMESTAMP_MAX_VALUE && \
+ (x) >= TIMESTAMP_MIN_VALUE)
+#else
+# define IS_TIME_T_VALID_FOR_TIMESTAMP(x) \
+ ((x) >= TIMESTAMP_MIN_VALUE)
+#endif
+
+/* Flags to str_to_datetime and number_to_datetime */
+#define TIME_FUZZY_DATE 1
+#define TIME_DATETIME_ONLY 2
+#define TIME_NO_NSEC_ROUNDING 4
+#define TIME_NO_DATE_FRAC_WARN 8
+
+/* Must be same as MODE_NO_ZERO_IN_DATE */
+#define TIME_NO_ZERO_IN_DATE (65536L*2*2*2*2*2*2*2)
+/* Must be same as MODE_NO_ZERO_DATE */
+#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2)
+#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2)
+
+/* Conversion warnings */
+#define MYSQL_TIME_WARN_TRUNCATED 1
+#define MYSQL_TIME_WARN_OUT_OF_RANGE 2
+#define MYSQL_TIME_WARN_INVALID_TIMESTAMP 4
+#define MYSQL_TIME_WARN_ZERO_DATE 8
+#define MYSQL_TIME_NOTE_TRUNCATED 16
+#define MYSQL_TIME_WARN_ZERO_IN_DATE 32
+
+/* Usefull constants */
+#define SECONDS_IN_24H 86400L
+
+/* Limits for the TIME data type */
+#define TIME_MAX_HOUR 838
+#define TIME_MAX_MINUTE 59
+#define TIME_MAX_SECOND 59
+#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \
+ TIME_MAX_SECOND)
+#define TIME_MAX_VALUE_SECONDS (TIME_MAX_HOUR * 3600L + \
+ TIME_MAX_MINUTE * 60L + TIME_MAX_SECOND)
+
+/*
+ Structure to return status from
+ str_to_datetime(), str_to_time(), number_to_datetime(), number_to_time()
+*/
+typedef struct st_mysql_time_status
+{
+ int warnings;
+ uint fractional_digits;
+ uint nanoseconds;
+} MYSQL_TIME_STATUS;
+
+static inline void my_time_status_init(MYSQL_TIME_STATUS *status)
+{
+ status->warnings= status->fractional_digits= status->nanoseconds= 0;
+}
+
+
+my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
+ ulonglong flags, int *was_cut);
+my_bool str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
+ ulonglong flags, MYSQL_TIME_STATUS *status);
+longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
+ ulonglong flags, int *was_cut);
+my_bool number_to_time(longlong nr, MYSQL_TIME *ltime, int *warnings);
+ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
+ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *);
+ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *);
+ulonglong TIME_to_ulonglong(const MYSQL_TIME *);
+
+#define MY_PACKED_TIME_GET_INT_PART(x) ((x) >> 24)
+#define MY_PACKED_TIME_GET_FRAC_PART(x) ((x) % (1LL << 24))
+#define MY_PACKED_TIME_MAKE(i, f) ((((longlong) (i)) << 24) + (f))
+#define MY_PACKED_TIME_MAKE_INT(i) ((((longlong) (i)) << 24))
+
+longlong year_to_longlong_datetime_packed(long year);
+longlong TIME_to_longlong_datetime_packed(const MYSQL_TIME *);
+longlong TIME_to_longlong_date_packed(const MYSQL_TIME *);
+longlong TIME_to_longlong_time_packed(const MYSQL_TIME *);
+longlong TIME_to_longlong_packed(const MYSQL_TIME *);
+
+void TIME_from_longlong_datetime_packed(MYSQL_TIME *ltime, longlong nr);
+void TIME_from_longlong_time_packed(MYSQL_TIME *ltime, longlong nr);
+void TIME_from_longlong_date_packed(MYSQL_TIME *ltime, longlong nr);
+void TIME_set_yymmdd(MYSQL_TIME *ltime, uint yymmdd);
+void TIME_set_hhmmss(MYSQL_TIME *ltime, uint hhmmss);
+
+void my_datetime_packed_to_binary(longlong nr, uchar *ptr, uint dec);
+longlong my_datetime_packed_from_binary(const uchar *ptr, uint dec);
+uint my_datetime_binary_length(uint dec);
+
+void my_time_packed_to_binary(longlong nr, uchar *ptr, uint dec);
+longlong my_time_packed_from_binary(const uchar *ptr, uint dec);
+uint my_time_binary_length(uint dec);
+
+void my_timestamp_to_binary(const struct timeval *tm, uchar *ptr, uint dec);
+void my_timestamp_from_binary(struct timeval *tm, const uchar *ptr, uint dec);
+uint my_timestamp_binary_length(uint dec);
+
+my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
+ MYSQL_TIME_STATUS *status);
+
+my_bool check_time_mmssff_range(const MYSQL_TIME *ltime);
+my_bool check_time_range_quick(const MYSQL_TIME *ltime);
+my_bool check_datetime_range(const MYSQL_TIME *ltime);
+void adjust_time_range(struct st_mysql_time *, int *warning);
+
+long calc_daynr(uint year,uint month,uint day);
+uint calc_days_in_year(uint year);
+uint year_2000_handling(uint year);
+
+void my_init_time(void);
+
+
+/*
+ Function to check sanity of a TIMESTAMP value
+
+ DESCRIPTION
+ Check if a given MYSQL_TIME value fits in TIMESTAMP range.
+ This function doesn't make precise check, but rather a rough
+ estimate.
+
+ RETURN VALUES
+ TRUE The value seems sane
+ FALSE The MYSQL_TIME value is definitely out of range
+*/
+
+static inline my_bool validate_timestamp_range(const MYSQL_TIME *t)
+{
+ if ((t->year > TIMESTAMP_MAX_YEAR || t->year < TIMESTAMP_MIN_YEAR) ||
+ (t->year == TIMESTAMP_MAX_YEAR && (t->month > 1 || t->day > 19)) ||
+ (t->year == TIMESTAMP_MIN_YEAR && (t->month < 12 || t->day < 31)))
+ return FALSE;
+
+ return TRUE;
+}
+
+my_time_t
+my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone,
+ my_bool *in_dst_time_gap);
+
+void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
+void set_max_time(MYSQL_TIME *tm, my_bool neg);
+void set_max_hhmmss(MYSQL_TIME *tm);
+
+/*
+ Required buffer length for my_time_to_str, my_date_to_str,
+ my_datetime_to_str and TIME_to_string functions. Note, that the
+ caller is still responsible to check that given TIME structure
+ has values in valid ranges, otherwise size of the buffer could
+ be not enough. We also rely on the fact that even wrong values
+ sent using binary protocol fit in this buffer.
+*/
+#define MAX_DATE_STRING_REP_LENGTH 30
+
+int my_time_to_str(const MYSQL_TIME *l_time, char *to, uint dec);
+int my_date_to_str(const MYSQL_TIME *l_time, char *to);
+int my_datetime_to_str(const MYSQL_TIME *l_time, char *to, uint dec);
+int my_TIME_to_str(const MYSQL_TIME *l_time, char *to, uint dec);
+
+int my_timeval_to_str(const struct timeval *tm, char *to, uint dec);
+
+/*
+ Available interval types used in any statement.
+
+ 'interval_type' must be sorted so that simple intervals comes first,
+ ie year, quarter, month, week, day, hour, etc. The order based on
+ interval size is also important and the intervals should be kept in a
+ large to smaller order. (get_interval_value() depends on this)
+
+ Note: If you change the order of elements in this enum you should fix
+ order of elements in 'interval_type_to_name' and 'interval_names'
+ arrays
+
+ See also interval_type_to_name, get_interval_value, interval_names
+*/
+
+enum interval_type
+{
+ INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY,
+ INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_MICROSECOND,
+ INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
+ INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
+ INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,
+ INTERVAL_MINUTE_MICROSECOND, INTERVAL_SECOND_MICROSECOND, INTERVAL_LAST
+};
+
+C_MODE_END
+
+#endif /* _my_time_h_ */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_tree.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_tree.h
new file mode 100644
index 000000000..c86e48b0f
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_tree.h
@@ -0,0 +1,97 @@
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _tree_h
+#define _tree_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "my_base.h" /* get 'enum ha_rkey_function' */
+#include "my_alloc.h" /* MEM_ROOT */
+
+/* Worst case tree is half full. This gives use 2^(MAX_TREE_HEIGHT/2) leafs */
+#define MAX_TREE_HEIGHT 64
+
+#define ELEMENT_KEY(tree,element)\
+(tree->offset_to_key ? (void*)((uchar*) element+tree->offset_to_key) :\
+ *((void**) (element+1)))
+
+#define tree_set_pointer(element,ptr) *((uchar **) (element+1))=((uchar*) (ptr))
+
+#define TREE_NO_DUPS 1
+
+typedef enum { left_root_right, right_root_left } TREE_WALK;
+typedef uint32 element_count;
+typedef int (*tree_walk_action)(void *,element_count,void *);
+
+typedef enum { free_init, free_free, free_end } TREE_FREE;
+typedef void (*tree_element_free)(void*, TREE_FREE, const void *);
+
+typedef struct st_tree_element {
+ struct st_tree_element *left,*right;
+ uint32 count:31,
+ colour:1; /* black is marked as 1 */
+} TREE_ELEMENT;
+
+#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs))
+
+typedef struct st_tree {
+ TREE_ELEMENT *root,null_element;
+ TREE_ELEMENT **parents[MAX_TREE_HEIGHT];
+ uint offset_to_key,elements_in_tree,size_of_element;
+ ulong memory_limit, allocated;
+ qsort_cmp2 compare;
+ const void *custom_arg;
+ MEM_ROOT mem_root;
+ my_bool with_delete;
+ tree_element_free free;
+ uint flag;
+} TREE;
+
+ /* Functions on whole tree */
+void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit,
+ int size, qsort_cmp2 compare, my_bool with_delete,
+ tree_element_free free_element, const void *custom_arg);
+void delete_tree(TREE*);
+void reset_tree(TREE*);
+ /* similar to delete tree, except we do not my_free() blocks in mem_root
+ */
+#define is_tree_inited(tree) ((tree)->root != 0)
+
+ /* Functions on leafs */
+TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint key_size,
+ const void *custom_arg);
+void *tree_search(TREE *tree, void *key, const void *custom_arg);
+int tree_walk(TREE *tree,tree_walk_action action,
+ void *argument, TREE_WALK visit);
+int tree_delete(TREE *tree, void *key, uint key_size, const void *custom_arg);
+void *tree_search_key(TREE *tree, const void *key,
+ TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos,
+ enum ha_rkey_function flag, const void *custom_arg);
+void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
+ TREE_ELEMENT ***last_pos, int child_offs);
+void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
+ int r_offs);
+ha_rows tree_record_pos(TREE *tree, const void *key,
+ enum ha_rkey_function search_flag,
+ const void *custom_arg);
+
+#define TREE_ELEMENT_EXTRA_SIZE (sizeof(TREE_ELEMENT) + sizeof(void*))
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_uctype.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_uctype.h
new file mode 100644
index 000000000..80ef01c07
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_uctype.h
@@ -0,0 +1,1484 @@
+#ifndef MY_UCTYPE_INCLUDED
+#define MY_UCTYPE_INCLUDED
+
+/* Copyright (c) 2006 MySQL AB, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Unicode ctype data
+ Generated from UnicodeData-5.0.0d9.txt
+*/
+static unsigned char uctype_page00[256]=
+{
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16,
+ 16, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
+ 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 16, 16, 16, 16, 16,
+ 16, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 16, 16, 16, 16, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 32, 16, 16,
+ 16, 16, 20, 20, 16, 2, 16, 16, 16, 20, 2, 16, 20, 20, 20, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static unsigned char uctype_page01[256]=
+{
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1,
+ 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2,
+ 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1,
+ 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1,
+ 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1,
+ 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2,
+ 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1,
+ 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2
+};
+
+static unsigned char uctype_page02[256]=
+{
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2,
+ 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 2, 2, 2, 2, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
+};
+
+static unsigned char uctype_page03[256]=
+{
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 0, 0, 0, 0, 16, 16, 0, 0, 0, 0, 2, 2, 2, 2, 16, 0,
+ 0, 0, 0, 0, 16, 16, 1, 16, 1, 1, 1, 0, 1, 0, 1, 1,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
+ 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 2, 2, 2, 2, 1, 2, 16, 1, 2, 1, 1, 2, 2, 1, 1, 1
+};
+
+static unsigned char uctype_page04[256]=
+{
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 16, 18, 18, 18, 18, 0, 18, 18, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
+};
+
+static unsigned char uctype_page05[256]=
+{
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 0, 2, 16, 16, 16, 16, 16, 16,
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 0, 16, 16, 0, 0, 0, 0, 0,
+ 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 16, 18,
+ 16, 18, 18, 16, 18, 18, 16, 18, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0,
+ 2, 2, 2, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page06[256]=
+{
+ 32, 32, 32, 32, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16,
+ 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 16, 0, 0, 16, 16,
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 2, 2,
+ 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 16, 2, 18, 18, 18, 18, 18, 18, 18, 32, 18, 18,
+ 18, 18, 18, 18, 18, 2, 2, 18, 18, 16, 18, 18, 18, 18, 2, 2,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 16, 16, 2
+};
+
+static unsigned char uctype_page07[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 32,
+ 2, 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 2, 2, 16, 16, 16, 16, 2, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page09[256]=
+{
+ 0, 18, 18, 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0,
+ 2, 18, 18, 18, 18, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 18, 18, 16, 16, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2,
+ 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2,
+ 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 0, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18,
+ 18, 18, 18, 18, 18, 0, 0, 18, 18, 0, 0, 18, 18, 18, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 2, 2, 0, 2,
+ 2, 2, 18, 18, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 2, 2, 16, 16, 20, 20, 20, 20, 20, 20, 16, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page0A[256]=
+{
+ 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2,
+ 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 18, 0, 18, 18,
+ 18, 18, 18, 0, 0, 0, 0, 18, 18, 0, 0, 18, 18, 18, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 18, 18, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2,
+ 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18,
+ 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 0, 18, 18, 18, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 18, 18, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page0B[256]=
+{
+ 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2,
+ 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18,
+ 18, 18, 18, 18, 0, 0, 0, 18, 18, 0, 0, 18, 18, 18, 0, 0,
+ 0, 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 2, 2, 0, 2,
+ 2, 2, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 18, 2, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2,
+ 2, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 0, 2, 0, 2, 2,
+ 0, 0, 0, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 18, 18,
+ 18, 18, 18, 0, 0, 0, 18, 18, 18, 0, 18, 18, 18, 18, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 20, 20, 20, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page0C[256]=
+{
+ 0, 18, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2,
+ 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 18, 18,
+ 18, 18, 18, 18, 18, 0, 18, 18, 18, 0, 18, 18, 18, 18, 0, 0,
+ 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2,
+ 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 18, 2, 18, 18,
+ 18, 18, 18, 18, 18, 0, 18, 18, 18, 0, 18, 18, 18, 18, 0, 0,
+ 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 0, 0, 0, 2, 0,
+ 2, 2, 18, 18, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 0, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page0D[256]=
+{
+ 0, 0, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2,
+ 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 18, 18,
+ 18, 18, 18, 18, 0, 0, 18, 18, 18, 0, 18, 18, 18, 18, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 18, 18, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 18, 0, 0, 0, 0, 18,
+ 18, 18, 18, 18, 18, 0, 18, 0, 18, 18, 18, 18, 18, 18, 18, 18,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 18, 18, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page0E[256]=
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 18, 2, 2, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 16,
+ 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18, 18, 18, 18, 16,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2, 2, 0, 2, 0, 0, 2, 2, 0, 2, 0, 0, 2, 0, 0,
+ 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2,
+ 0, 2, 2, 2, 0, 2, 0, 2, 0, 0, 2, 2, 0, 2, 2, 2,
+ 2, 18, 2, 2, 18, 18, 18, 18, 18, 18, 0, 18, 18, 2, 0, 0,
+ 2, 2, 2, 2, 2, 0, 2, 0, 18, 18, 18, 18, 18, 18, 0, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 2, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page0F[256]=
+{
+ 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 16, 16, 16, 16, 16, 16,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 16, 18, 16, 18, 16, 18, 16, 16, 16, 16, 18, 18,
+ 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0,
+ 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 16, 18, 18, 2, 2, 2, 2, 0, 0, 0, 0,
+ 18, 18, 18, 18, 18, 18, 18, 18, 0, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 16, 16,
+ 16, 16, 16, 16, 16, 16, 18, 16, 16, 16, 16, 16, 16, 0, 0, 16,
+ 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page10[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 0, 18, 18, 18, 18,
+ 18, 18, 18, 0, 0, 0, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16,
+ 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 2, 0, 0, 0
+};
+
+static unsigned char uctype_page11[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page12[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0,
+ 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static unsigned char uctype_page13[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 18,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page14[256]=
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static unsigned char uctype_page16[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 2,
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 7, 7,
+ 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page17[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2,
+ 2, 2, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 18, 18, 18, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2,
+ 2, 0, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 32, 32, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 16, 16, 16, 2, 16, 16, 16, 16, 2, 18, 0, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page18[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 8, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page19[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0,
+ 16, 0, 0, 0, 16, 16, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0,
+ 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 2, 2, 2, 2, 2, 2, 2, 18, 18, 0, 0, 0, 0, 0, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
+};
+
+static unsigned char uctype_page1A[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18, 18, 0, 0, 16, 16,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page1B[256]=
+{
+ 18, 18, 18, 18, 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page1D[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 18
+};
+
+static unsigned char uctype_page1E[256]=
+{
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page1F[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 1, 0, 1, 0, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 0, 2, 2, 1, 1, 1, 1, 1, 16, 2, 16,
+ 16, 16, 2, 2, 2, 0, 2, 2, 1, 1, 1, 1, 1, 16, 16, 16,
+ 2, 2, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1, 0, 16, 16, 16,
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 16, 16, 16,
+ 0, 0, 2, 2, 2, 0, 2, 2, 1, 1, 1, 1, 1, 16, 16, 0
+};
+
+static unsigned char uctype_page20[256]=
+{
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 32, 32, 32, 32, 32,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 8, 8, 32, 32, 32, 32, 32, 8,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 8,
+ 32, 32, 32, 32, 0, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32,
+ 20, 2, 0, 0, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 2,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 0,
+ 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page21[256]=
+{
+ 16, 16, 1, 16, 16, 16, 16, 1, 16, 16, 2, 1, 1, 1, 2, 2,
+ 1, 1, 1, 2, 16, 1, 16, 16, 16, 1, 1, 1, 1, 1, 16, 16,
+ 16, 16, 16, 16, 1, 16, 1, 16, 1, 16, 1, 1, 1, 1, 16, 2,
+ 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 16, 16, 2, 2, 1, 1,
+ 16, 16, 16, 16, 16, 1, 2, 2, 2, 2, 16, 16, 16, 16, 2, 0,
+ 0, 0, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
+};
+
+static unsigned char uctype_page23[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page24[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20
+};
+
+static unsigned char uctype_page26[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page27[256]=
+{
+ 0, 16, 16, 16, 16, 0, 16, 16, 16, 16, 0, 0, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 16, 0, 16,
+ 16, 16, 16, 0, 0, 0, 16, 0, 16, 16, 16, 16, 16, 16, 16, 0,
+ 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 16, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
+};
+
+static unsigned char uctype_page2B[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page2C[256]=
+{
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
+ 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 0, 0, 0,
+ 0, 0, 0, 0, 2, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 2, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 20, 16, 16
+};
+
+static unsigned char uctype_page2D[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0,
+ 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page2E[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 16, 16, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page2F[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0
+};
+
+static unsigned char uctype_page30[256]=
+{
+ 8, 16, 16, 16, 16, 2, 2, 7, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 7, 7, 7, 7, 7, 7, 7, 7, 7, 18, 18, 18, 18, 18, 18,
+ 16, 2, 2, 2, 2, 2, 16, 16, 7, 7, 7, 2, 2, 16, 16, 16,
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 18, 18, 16, 16, 2, 2, 2,
+ 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2
+};
+
+static unsigned char uctype_page31[256]=
+{
+ 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0,
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
+ 16, 16, 20, 20, 20, 20, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static unsigned char uctype_page32[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0
+};
+
+static unsigned char uctype_page4D[256]=
+{
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
+};
+
+static unsigned char uctype_page9F[256]=
+{
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageA4[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageA7[256]=
+{
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 2, 2, 2, 2, 0, 0, 0, 0, 0,
+ 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageA8[256]=
+{
+ 2, 2, 18, 2, 2, 2, 18, 2, 2, 2, 2, 18, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 18, 18, 18, 18, 18, 16, 16, 16, 16, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageD7[256]=
+{
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageD8[256]=
+{
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageDB[256]=
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32
+};
+
+static unsigned char uctype_pageDC[256]=
+{
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageDF[256]=
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32
+};
+
+static unsigned char uctype_pageE0[256]=
+{
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageF8[256]=
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32
+};
+
+static unsigned char uctype_pageFA[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static unsigned char uctype_pageFB[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 18, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 0,
+ 2, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static unsigned char uctype_pageFD[256]=
+{
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 0, 0
+};
+
+static unsigned char uctype_pageFE[256]=
+{
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0,
+ 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 32
+};
+
+static unsigned char uctype_pageFF[256]=
+{
+ 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16,
+ 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
+ 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2,
+ 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0,
+ 16, 16, 16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 16, 16, 16, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 16, 16, 0, 0
+};
+
+MY_UNI_CTYPE my_uni_ctype[256]={
+ {0,uctype_page00},
+ {0,uctype_page01},
+ {0,uctype_page02},
+ {0,uctype_page03},
+ {0,uctype_page04},
+ {0,uctype_page05},
+ {0,uctype_page06},
+ {0,uctype_page07},
+ {0,NULL},
+ {0,uctype_page09},
+ {0,uctype_page0A},
+ {0,uctype_page0B},
+ {0,uctype_page0C},
+ {0,uctype_page0D},
+ {0,uctype_page0E},
+ {0,uctype_page0F},
+ {0,uctype_page10},
+ {0,uctype_page11},
+ {0,uctype_page12},
+ {0,uctype_page13},
+ {0,uctype_page14},
+ {2,NULL},
+ {0,uctype_page16},
+ {0,uctype_page17},
+ {0,uctype_page18},
+ {0,uctype_page19},
+ {0,uctype_page1A},
+ {0,uctype_page1B},
+ {0,NULL},
+ {0,uctype_page1D},
+ {0,uctype_page1E},
+ {0,uctype_page1F},
+ {0,uctype_page20},
+ {0,uctype_page21},
+ {16,NULL},
+ {0,uctype_page23},
+ {0,uctype_page24},
+ {16,NULL},
+ {0,uctype_page26},
+ {0,uctype_page27},
+ {16,NULL},
+ {16,NULL},
+ {16,NULL},
+ {0,uctype_page2B},
+ {0,uctype_page2C},
+ {0,uctype_page2D},
+ {0,uctype_page2E},
+ {0,uctype_page2F},
+ {0,uctype_page30},
+ {0,uctype_page31},
+ {0,uctype_page32},
+ {16,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {0,uctype_page4D},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {0,uctype_page9F},
+ {2,NULL},
+ {2,NULL},
+ {2,NULL},
+ {2,NULL},
+ {0,uctype_pageA4},
+ {0,NULL},
+ {0,NULL},
+ {0,uctype_pageA7},
+ {0,uctype_pageA8},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {3,NULL},
+ {0,uctype_pageD7},
+ {0,uctype_pageD8},
+ {0,NULL},
+ {0,NULL},
+ {0,uctype_pageDB},
+ {0,uctype_pageDC},
+ {0,NULL},
+ {0,NULL},
+ {0,uctype_pageDF},
+ {0,uctype_pageE0},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,NULL},
+ {0,uctype_pageF8},
+ {2,NULL},
+ {0,uctype_pageFA},
+ {0,uctype_pageFB},
+ {2,NULL},
+ {0,uctype_pageFD},
+ {0,uctype_pageFE},
+ {0,uctype_pageFF}
+};
+
+
+#endif /* MY_UCTYPE_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_user.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_user.h
new file mode 100644
index 000000000..48ef13f12
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_user.h
@@ -0,0 +1,35 @@
+/* Copyright (c) 2005-2007 MySQL AB
+ Use is subject to license terms
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+/*
+ This is a header for libraries containing functions used in both server and
+ only some of clients (but not in libmysql)...
+*/
+
+#ifndef _my_user_h_
+#define _my_user_h_
+
+#include
+
+C_MODE_START
+
+void parse_user(const char *user_id_str, size_t user_id_len,
+ char *user_name_str, size_t *user_name_len,
+ char *host_name_str, size_t *host_name_len);
+
+C_MODE_END
+
+#endif /* _my_user_h_ */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/my_xml.h b/BuildTools/centos/dep/mysql-5.6.14/include/my_xml.h
new file mode 100644
index 000000000..639fdc7da
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/my_xml.h
@@ -0,0 +1,96 @@
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+
+#ifndef _my_xml_h
+#define _my_xml_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define MY_XML_OK 0
+#define MY_XML_ERROR 1
+
+/*
+ A flag whether to use absolute tag names in call-back functions,
+ like "a", "a.b" and "a.b.c" (used in character set file parser),
+ or relative names like "a", "b" and "c".
+*/
+#define MY_XML_FLAG_RELATIVE_NAMES 1
+
+/*
+ A flag whether to skip normilization of text values before calling
+ call-back functions: i.e. skip leading/trailing spaces,
+ \r, \n, \t characters.
+*/
+#define MY_XML_FLAG_SKIP_TEXT_NORMALIZATION 2
+
+enum my_xml_node_type
+{
+ MY_XML_NODE_TAG, /* can have TAG, ATTR and TEXT children */
+ MY_XML_NODE_ATTR, /* can have TEXT children */
+ MY_XML_NODE_TEXT /* cannot have children */
+};
+
+typedef struct xml_stack_st
+{
+ int flags;
+ enum my_xml_node_type current_node_type;
+ char errstr[128];
+
+ struct {
+ char static_buffer[128];
+ char *buffer;
+ size_t buffer_size;
+ char *start;
+ char *end;
+ } attr;
+
+ const char *beg;
+ const char *cur;
+ const char *end;
+ void *user_data;
+ int (*enter)(struct xml_stack_st *st,const char *val, size_t len);
+ int (*value)(struct xml_stack_st *st,const char *val, size_t len);
+ int (*leave_xml)(struct xml_stack_st *st,const char *val, size_t len);
+} MY_XML_PARSER;
+
+void my_xml_parser_create(MY_XML_PARSER *st);
+void my_xml_parser_free(MY_XML_PARSER *st);
+int my_xml_parse(MY_XML_PARSER *st,const char *str, size_t len);
+
+void my_xml_set_value_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
+ const char *,
+ size_t len));
+void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
+ const char *,
+ size_t len));
+void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
+ const char *,
+ size_t len));
+void my_xml_set_user_data(MY_XML_PARSER *st, void *);
+
+size_t my_xml_error_pos(MY_XML_PARSER *st);
+uint my_xml_error_lineno(MY_XML_PARSER *st);
+
+const char *my_xml_error_string(MY_XML_PARSER *st);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _my_xml_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/myisam.h b/BuildTools/centos/dep/mysql-5.6.14/include/myisam.h
new file mode 100644
index 000000000..98d2768aa
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/myisam.h
@@ -0,0 +1,514 @@
+/*
+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* This file should be included when using myisam_funktions */
+
+#ifndef _myisam_h
+#define _myisam_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _my_base_h
+#include
+#endif
+#ifndef _m_ctype_h
+#include
+#endif
+#ifndef _keycache_h
+#include "keycache.h"
+#endif
+#include "my_compare.h"
+#include
+
+/*
+ Limit max keys according to HA_MAX_POSSIBLE_KEY
+*/
+
+#if MAX_INDEXES > HA_MAX_POSSIBLE_KEY
+#define MI_MAX_KEY HA_MAX_POSSIBLE_KEY /* Max allowed keys */
+#else
+#define MI_MAX_KEY MAX_INDEXES /* Max allowed keys */
+#endif
+
+#define MI_MAX_POSSIBLE_KEY_BUFF HA_MAX_POSSIBLE_KEY_BUFF
+/*
+ The following defines can be increased if necessary.
+ But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH.
+*/
+#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */
+#define MI_MAX_KEY_SEG 16 /* Max segments for key */
+
+#define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8)
+#define MI_MAX_MSG_BUF 1024 /* used in CHECK TABLE, REPAIR TABLE */
+#define MI_NAME_IEXT ".MYI"
+#define MI_NAME_DEXT ".MYD"
+
+/* Possible values for myisam_block_size (must be power of 2) */
+#define MI_KEY_BLOCK_LENGTH 1024 /* default key block length */
+#define MI_MIN_KEY_BLOCK_LENGTH 1024 /* Min key block length */
+#define MI_MAX_KEY_BLOCK_LENGTH 16384
+
+/*
+ In the following macros '_keyno_' is 0 .. keys-1.
+ If there can be more keys than bits in the key_map, the highest bit
+ is for all upper keys. They cannot be switched individually.
+ This means that clearing of high keys is ignored, setting one high key
+ sets all high keys.
+*/
+#define MI_KEYMAP_BITS (8 * SIZEOF_LONG_LONG)
+#define MI_KEYMAP_HIGH_MASK (ULL(1) << (MI_KEYMAP_BITS - 1))
+#define mi_get_mask_all_keys_active(_keys_) \
+ (((_keys_) < MI_KEYMAP_BITS) ? \
+ ((ULL(1) << (_keys_)) - ULL(1)) : \
+ (~ ULL(0)))
+
+#if MI_MAX_KEY > MI_KEYMAP_BITS
+
+#define mi_is_key_active(_keymap_,_keyno_) \
+ (((_keyno_) < MI_KEYMAP_BITS) ? \
+ test((_keymap_) & (ULL(1) << (_keyno_))) : \
+ test((_keymap_) & MI_KEYMAP_HIGH_MASK))
+#define mi_set_key_active(_keymap_,_keyno_) \
+ (_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
+ (ULL(1) << (_keyno_)) : \
+ MI_KEYMAP_HIGH_MASK)
+#define mi_clear_key_active(_keymap_,_keyno_) \
+ (_keymap_)&= (((_keyno_) < MI_KEYMAP_BITS) ? \
+ (~ (ULL(1) << (_keyno_))) : \
+ (~ (ULL(0))) /*ignore*/ )
+
+#else
+
+#define mi_is_key_active(_keymap_,_keyno_) \
+ test((_keymap_) & (ULL(1) << (_keyno_)))
+#define mi_set_key_active(_keymap_,_keyno_) \
+ (_keymap_)|= (ULL(1) << (_keyno_))
+#define mi_clear_key_active(_keymap_,_keyno_) \
+ (_keymap_)&= (~ (ULL(1) << (_keyno_)))
+
+#endif
+
+#define mi_is_any_key_active(_keymap_) \
+ test((_keymap_))
+#define mi_is_all_keys_active(_keymap_,_keys_) \
+ ((_keymap_) == mi_get_mask_all_keys_active(_keys_))
+#define mi_set_all_keys_active(_keymap_,_keys_) \
+ (_keymap_)= mi_get_mask_all_keys_active(_keys_)
+#define mi_clear_all_keys_active(_keymap_) \
+ (_keymap_)= 0
+#define mi_intersect_keys_active(_to_,_from_) \
+ (_to_)&= (_from_)
+#define mi_is_any_intersect_keys_active(_keymap1_,_keys_,_keymap2_) \
+ ((_keymap1_) & (_keymap2_) & \
+ mi_get_mask_all_keys_active(_keys_))
+#define mi_copy_keys_active(_to_,_maxkeys_,_from_) \
+ (_to_)= (mi_get_mask_all_keys_active(_maxkeys_) & \
+ (_from_))
+
+ /* Param to/from mi_status */
+
+typedef struct st_mi_isaminfo /* Struct from h_info */
+{
+ ha_rows records; /* Records in database */
+ ha_rows deleted; /* Deleted records in database */
+ my_off_t recpos; /* Pos for last used record */
+ my_off_t newrecpos; /* Pos if we write new record */
+ my_off_t dupp_key_pos; /* Position to record with dupp key */
+ my_off_t data_file_length, /* Length of data file */
+ max_data_file_length,
+ index_file_length,
+ max_index_file_length,
+ delete_length;
+ ulong reclength; /* Recordlength */
+ ulong mean_reclength; /* Mean recordlength (if packed) */
+ ulonglong auto_increment;
+ ulonglong key_map; /* Which keys are used */
+ char *data_file_name, *index_file_name;
+ uint keys; /* Number of keys in use */
+ uint options; /* HA_OPTION_... used */
+ int errkey, /* With key was dupplicated on err */
+ sortkey; /* clustered by this key */
+ File filenr; /* (uniq) filenr for datafile */
+ time_t create_time; /* When table was created */
+ time_t check_time;
+ time_t update_time;
+ uint reflength;
+ ulong record_offset;
+ ulong *rec_per_key; /* for sql optimizing */
+} MI_ISAMINFO;
+
+
+typedef struct st_mi_create_info
+{
+ const char *index_file_name, *data_file_name; /* If using symlinks */
+ ha_rows max_rows;
+ ha_rows reloc_rows;
+ ulonglong auto_increment;
+ ulonglong data_file_length;
+ ulonglong key_file_length;
+ uint old_options;
+ uint16 language;
+ my_bool with_auto_increment;
+} MI_CREATE_INFO;
+
+struct st_myisam_info; /* For referense */
+struct st_mi_isam_share;
+typedef struct st_myisam_info MI_INFO;
+struct st_mi_s_param;
+
+typedef struct st_mi_keydef /* Key definition with open & info */
+{
+ struct st_mi_isam_share *share; /* Pointer to base (set in mi_open) */
+ uint16 keysegs; /* Number of key-segment */
+ uint16 flag; /* NOSAME, PACK_USED */
+
+ uint8 key_alg; /* BTREE, RTREE */
+ uint16 block_length; /* Length of keyblock (auto) */
+ uint16 underflow_block_length; /* When to execute underflow */
+ uint16 keylength; /* Tot length of keyparts (auto) */
+ uint16 minlength; /* min length of (packed) key (auto) */
+ uint16 maxlength; /* max length of (packed) key (auto) */
+ uint16 block_size_index; /* block_size (auto) */
+ uint32 version; /* For concurrent read/write */
+ uint32 ftkey_nr; /* full-text index number */
+
+ HA_KEYSEG *seg,*end;
+ struct st_mysql_ftparser *parser; /* Fulltext [pre]parser */
+ int (*bin_search)(struct st_myisam_info *info,struct st_mi_keydef *keyinfo,
+ uchar *page,uchar *key,
+ uint key_len,uint comp_flag,uchar * *ret_pos,
+ uchar *buff, my_bool *was_last_key);
+ uint (*get_key)(struct st_mi_keydef *keyinfo,uint nod_flag,uchar * *page,
+ uchar *key);
+ int (*pack_key)(struct st_mi_keydef *keyinfo,uint nod_flag,uchar *next_key,
+ uchar *org_key, uchar *prev_key, uchar *key,
+ struct st_mi_s_param *s_temp);
+ void (*store_key)(struct st_mi_keydef *keyinfo, uchar *key_pos,
+ struct st_mi_s_param *s_temp);
+ int (*ck_insert)(struct st_myisam_info *inf, uint k_nr, uchar *k, uint klen);
+ int (*ck_delete)(struct st_myisam_info *inf, uint k_nr, uchar *k, uint klen);
+} MI_KEYDEF;
+
+
+#define MI_UNIQUE_HASH_LENGTH 4
+
+typedef struct st_unique_def /* Segment definition of unique */
+{
+ uint16 keysegs; /* Number of key-segment */
+ uchar key; /* Mapped to which key */
+ uint8 null_are_equal;
+ HA_KEYSEG *seg,*end;
+} MI_UNIQUEDEF;
+
+typedef struct st_mi_decode_tree /* Decode huff-table */
+{
+ uint16 *table;
+ uint quick_table_bits;
+ uchar *intervalls;
+} MI_DECODE_TREE;
+
+
+struct st_mi_bit_buff;
+
+/*
+ Note that null markers should always be first in a row !
+ When creating a column, one should only specify:
+ type, length, null_bit and null_pos
+*/
+
+typedef struct st_columndef /* column information */
+{
+ int16 type; /* en_fieldtype */
+ uint16 length; /* length of field */
+ uint32 offset; /* Offset to position in row */
+ uint8 null_bit; /* If column may be 0 */
+ uint16 null_pos; /* position for null marker */
+
+#ifndef NOT_PACKED_DATABASES
+ void (*unpack)(struct st_columndef *rec,struct st_mi_bit_buff *buff,
+ uchar *start,uchar *end);
+ enum en_fieldtype base_type;
+ uint space_length_bits,pack_type;
+ MI_DECODE_TREE *huff_tree;
+#endif
+} MI_COLUMNDEF;
+
+
+extern char * myisam_log_filename; /* Name of logfile */
+extern ulong myisam_block_size;
+extern ulong myisam_concurrent_insert;
+extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
+extern my_off_t myisam_max_temp_length;
+extern ulong myisam_data_pointer_size;
+
+/* usually used to check if a symlink points into the mysql data home */
+/* which is normally forbidden */
+extern int (*myisam_test_invalid_symlink)(const char *filename);
+extern ulonglong myisam_mmap_size, myisam_mmap_used;
+extern mysql_mutex_t THR_LOCK_myisam_mmap;
+
+ /* Prototypes for myisam-functions */
+
+extern int mi_close(struct st_myisam_info *file);
+extern int mi_delete(struct st_myisam_info *file,const uchar *buff);
+extern struct st_myisam_info *mi_open(const char *name,int mode,
+ uint wait_if_locked);
+extern int mi_panic(enum ha_panic_function function);
+extern int mi_rfirst(struct st_myisam_info *file,uchar *buf,int inx);
+extern int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
+ key_part_map keypart_map, enum ha_rkey_function search_flag);
+extern int mi_rlast(struct st_myisam_info *file,uchar *buf,int inx);
+extern int mi_rnext(struct st_myisam_info *file,uchar *buf,int inx);
+extern int mi_rnext_same(struct st_myisam_info *info, uchar *buf);
+extern int mi_rprev(struct st_myisam_info *file,uchar *buf,int inx);
+extern int mi_rrnd(struct st_myisam_info *file,uchar *buf, my_off_t pos);
+extern int mi_scan_init(struct st_myisam_info *file);
+extern int mi_scan(struct st_myisam_info *file,uchar *buf);
+extern int mi_rsame(struct st_myisam_info *file,uchar *record,int inx);
+extern int mi_rsame_with_pos(struct st_myisam_info *file,uchar *record,
+ int inx, my_off_t pos);
+extern int mi_update(struct st_myisam_info *file,const uchar *old,
+ uchar *new_record);
+extern int mi_write(struct st_myisam_info *file,uchar *buff);
+extern my_off_t mi_position(struct st_myisam_info *file);
+extern int mi_status(struct st_myisam_info *info, MI_ISAMINFO *x, uint flag);
+extern int mi_lock_database(struct st_myisam_info *file,int lock_type);
+extern int mi_create(const char *name,uint keys,MI_KEYDEF *keydef,
+ uint columns, MI_COLUMNDEF *columndef,
+ uint uniques, MI_UNIQUEDEF *uniquedef,
+ MI_CREATE_INFO *create_info, uint flags);
+extern int mi_delete_table(const char *name);
+extern int mi_rename(const char *from, const char *to);
+extern int mi_extra(struct st_myisam_info *file,
+ enum ha_extra_function function,
+ void *extra_arg);
+extern int mi_reset(struct st_myisam_info *file);
+extern ha_rows mi_records_in_range(MI_INFO *info, int inx,
+ key_range *min_key, key_range *max_key);
+extern int mi_log(int activate_log);
+extern int mi_is_changed(struct st_myisam_info *info);
+extern int mi_delete_all_rows(struct st_myisam_info *info);
+extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
+extern uint mi_get_pointer_length(ulonglong file_length, uint def);
+
+#define MEMMAP_EXTRA_MARGIN 7 /* Write this as a suffix for mmap file */
+/* this is used to pass to mysql_myisamchk_table */
+
+#define MYISAMCHK_REPAIR 1 /* equivalent to myisamchk -r */
+#define MYISAMCHK_VERIFY 2 /* Verify, run repair if failure */
+
+/*
+ Definitions needed for myisamchk.c
+
+ Entries marked as "QQ to be removed" are NOT used to
+ pass check/repair options to mi_check.c. They are used
+ internally by myisamchk.c or/and ha_myisam.cc and should NOT
+ be stored together with other flags. They should be removed
+ from the following list to make addition of new flags possible.
+*/
+
+#define T_AUTO_INC 1
+#define T_AUTO_REPAIR 2 /* QQ to be removed */
+#define T_BACKUP_DATA 4
+#define T_CALC_CHECKSUM 8
+#define T_CHECK 16 /* QQ to be removed */
+#define T_CHECK_ONLY_CHANGED 32 /* QQ to be removed */
+#define T_CREATE_MISSING_KEYS 64
+#define T_DESCRIPT 128
+#define T_DONT_CHECK_CHECKSUM 256
+#define T_EXTEND 512
+#define T_FAST (1L << 10) /* QQ to be removed */
+#define T_FORCE_CREATE (1L << 11) /* QQ to be removed */
+#define T_FORCE_UNIQUENESS (1L << 12)
+#define T_INFO (1L << 13)
+#define T_MEDIUM (1L << 14)
+#define T_QUICK (1L << 15) /* QQ to be removed */
+#define T_READONLY (1L << 16) /* QQ to be removed */
+#define T_REP (1L << 17)
+#define T_REP_BY_SORT (1L << 18) /* QQ to be removed */
+#define T_REP_PARALLEL (1L << 19) /* QQ to be removed */
+#define T_RETRY_WITHOUT_QUICK (1L << 20)
+#define T_SAFE_REPAIR (1L << 21)
+#define T_SILENT (1L << 22)
+#define T_SORT_INDEX (1L << 23) /* QQ to be removed */
+#define T_SORT_RECORDS (1L << 24) /* QQ to be removed */
+#define T_STATISTICS (1L << 25)
+#define T_UNPACK (1L << 26)
+#define T_UPDATE_STATE (1L << 27)
+#define T_VERBOSE (1L << 28)
+#define T_VERY_SILENT (1L << 29)
+#define T_WAIT_FOREVER (1L << 30)
+#define T_WRITE_LOOP ((ulong) 1L << 31)
+
+#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
+
+/*
+ Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
+ to mi_check.c follows:
+*/
+
+#define TT_USEFRM 1
+#define TT_FOR_UPGRADE 2
+
+#define O_NEW_INDEX 1 /* Bits set in out_flag */
+#define O_NEW_DATA 2
+#define O_DATA_LOST 4
+
+/* these struct is used by my_check to tell it what to do */
+
+typedef struct st_sort_key_blocks /* Used when sorting */
+{
+ uchar *buff,*end_pos;
+ uchar lastkey[MI_MAX_POSSIBLE_KEY_BUFF];
+ uint last_length;
+ int inited;
+} SORT_KEY_BLOCKS;
+
+
+/*
+ MyISAM supports several statistics collection methods. Currently statistics
+ collection method is not stored in MyISAM file and has to be specified for
+ each table analyze/repair operation in MI_CHECK::stats_method.
+*/
+
+typedef enum
+{
+ /* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */
+ MI_STATS_METHOD_NULLS_NOT_EQUAL,
+ /* Treat NULLs as equal when collecting statistics (like 4.0 did) */
+ MI_STATS_METHOD_NULLS_EQUAL,
+ /* Ignore NULLs - count only tuples without NULLs in the index components */
+ MI_STATS_METHOD_IGNORE_NULLS
+} enum_mi_stats_method;
+
+typedef struct st_mi_check_param
+{
+ ulonglong auto_increment_value;
+ ulonglong max_data_file_length;
+ ulonglong keys_in_use;
+ ulonglong max_record_length;
+ ulonglong sort_buffer_length;
+ my_off_t search_after_block;
+ my_off_t new_file_pos,key_file_blocks;
+ my_off_t keydata,totaldata,key_blocks,start_check_pos;
+ ha_rows total_records,total_deleted;
+ ha_checksum record_checksum,glob_crc;
+ ulonglong use_buffers;
+ ulong read_buffer_length, write_buffer_length, sort_key_blocks;
+ uint out_flag,warning_printed,error_printed,verbose;
+ uint opt_sort_key,total_files,max_level;
+ uint testflag, key_cache_block_size;
+ uint16 language;
+ my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
+ my_bool retry_repair, force_sort;
+ char temp_filename[FN_REFLEN],*isam_file_name;
+ MY_TMPDIR *tmpdir;
+ int tmpfile_createflag;
+ myf myf_rw;
+ IO_CACHE read_cache;
+
+ /*
+ The next two are used to collect statistics, see update_key_parts for
+ description.
+ */
+ ulonglong unique_count[MI_MAX_KEY_SEG+1];
+ ulonglong notnull_count[MI_MAX_KEY_SEG+1];
+
+ ha_checksum key_crc[HA_MAX_POSSIBLE_KEY];
+ ulong rec_per_key_part[MI_MAX_KEY_SEG*HA_MAX_POSSIBLE_KEY];
+ void *thd;
+ const char *db_name, *table_name;
+ const char *op_name;
+ enum_mi_stats_method stats_method;
+ mysql_mutex_t print_msg_mutex;
+ my_bool need_print_msg_lock;
+} MI_CHECK;
+
+typedef struct st_sort_ft_buf
+{
+ uchar *buf, *end;
+ int count;
+ uchar lastkey[MI_MAX_KEY_BUFF];
+} SORT_FT_BUF;
+
+typedef struct st_sort_info
+{
+ my_off_t filelength,dupp,buff_length;
+ ha_rows max_records;
+ uint current_key, total_keys;
+ myf myf_rw;
+ enum data_file_type new_data_file_type;
+ MI_INFO *info;
+ MI_CHECK *param;
+ uchar *buff;
+ SORT_KEY_BLOCKS *key_block,*key_block_end;
+ SORT_FT_BUF *ft_buf;
+ /* sync things */
+ uint got_error, threads_running;
+ mysql_mutex_t mutex;
+ mysql_cond_t cond;
+} SORT_INFO;
+
+/* functions in mi_check */
+void myisamchk_init(MI_CHECK *param);
+int chk_status(MI_CHECK *param, MI_INFO *info);
+int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag);
+int chk_size(MI_CHECK *param, MI_INFO *info);
+int chk_key(MI_CHECK *param, MI_INFO *info);
+int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend);
+int mi_repair(MI_CHECK *param, register MI_INFO *info,
+ char * name, int rep_quick);
+int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name);
+int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
+ const char * name, int rep_quick);
+int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
+ const char * name, int rep_quick);
+int change_to_newfile(const char * filename, const char * old_ext,
+ const char * new_ext, myf myflags);
+int lock_file(MI_CHECK *param, File file, my_off_t start, int lock_type,
+ const char *filetype, const char *filename);
+void lock_memory(MI_CHECK *param);
+void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
+ my_bool repair);
+int update_state_info(MI_CHECK *param, MI_INFO *info,uint update);
+void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
+ ulonglong *unique, ulonglong *notnull,
+ ulonglong records);
+int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
+ my_off_t length, const char *type);
+int movepoint(MI_INFO *info,uchar *record,my_off_t oldpos,
+ my_off_t newpos, uint prot_key);
+int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile);
+int test_if_almost_full(MI_INFO *info);
+int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename);
+void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
+my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows, ulonglong key_map,
+ my_bool force);
+
+int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows);
+void mi_flush_bulk_insert(MI_INFO *info, uint inx);
+void mi_end_bulk_insert(MI_INFO *info);
+int mi_assign_to_key_cache(MI_INFO *info, ulonglong key_map,
+ KEY_CACHE *key_cache);
+void mi_change_key_cache(KEY_CACHE *old_key_cache,
+ KEY_CACHE *new_key_cache);
+int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/myisammrg.h b/BuildTools/centos/dep/mysql-5.6.14/include/myisammrg.h
new file mode 100644
index 000000000..84b2d6378
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/myisammrg.h
@@ -0,0 +1,124 @@
+/* Copyright (c) 2000-2002, 2004, 2006-2008 MySQL AB, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* This file should be included when using merge_isam_funktions */
+
+#ifndef _myisammrg_h
+#define _myisammrg_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _my_base_h
+#include
+#endif
+#ifndef _myisam_h
+#include
+#endif
+
+#include
+
+#define MYRG_NAME_EXT ".MRG"
+
+/* In which table to INSERT rows */
+#define MERGE_INSERT_DISABLED 0
+#define MERGE_INSERT_TO_FIRST 1
+#define MERGE_INSERT_TO_LAST 2
+
+extern TYPELIB merge_insert_method;
+
+ /* Param to/from myrg_info */
+
+typedef struct st_mymerge_info /* Struct from h_info */
+{
+ ulonglong records; /* Records in database */
+ ulonglong deleted; /* Deleted records in database */
+ ulonglong recpos; /* Pos for last used record */
+ ulonglong data_file_length;
+ ulonglong dupp_key_pos; /* Offset of the Duplicate key in the merge table */
+ uint reclength; /* Recordlength */
+ int errkey; /* With key was dupplicated on err */
+ uint options; /* HA_OPTION_... used */
+ ulong *rec_per_key; /* for sql optimizing */
+} MYMERGE_INFO;
+
+typedef struct st_myrg_table_info
+{
+ struct st_myisam_info *table;
+ ulonglong file_offset;
+} MYRG_TABLE;
+
+typedef struct st_myrg_info
+{
+ MYRG_TABLE *open_tables,*current_table,*end_table,*last_used_table;
+ ulonglong records; /* records in tables */
+ ulonglong del; /* Removed records */
+ ulonglong data_file_length;
+ ulong cache_size;
+ uint merge_insert_method;
+ uint tables,options,reclength,keys;
+ my_bool cache_in_use;
+ /* If MERGE children attached to parent. See top comment in ha_myisammrg.cc */
+ my_bool children_attached;
+ LIST open_list;
+ QUEUE by_key;
+ ulong *rec_per_key_part; /* for sql optimizing */
+ mysql_mutex_t mutex;
+} MYRG_INFO;
+
+
+ /* Prototypes for merge-functions */
+
+extern int myrg_close(MYRG_INFO *file);
+extern int myrg_delete(MYRG_INFO *file,const uchar *buff);
+extern MYRG_INFO *myrg_open(const char *name,int mode,int wait_if_locked);
+extern MYRG_INFO *myrg_parent_open(const char *parent_name,
+ int (*callback)(void*, const char*),
+ void *callback_param);
+extern int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
+ MI_INFO *(*callback)(void*),
+ void *callback_param,
+ my_bool *need_compat_check);
+extern int myrg_detach_children(MYRG_INFO *m_info);
+extern int myrg_panic(enum ha_panic_function function);
+extern int myrg_rfirst(MYRG_INFO *file,uchar *buf,int inx);
+extern int myrg_rlast(MYRG_INFO *file,uchar *buf,int inx);
+extern int myrg_rnext(MYRG_INFO *file,uchar *buf,int inx);
+extern int myrg_rprev(MYRG_INFO *file,uchar *buf,int inx);
+extern int myrg_rnext_same(MYRG_INFO *file,uchar *buf);
+extern int myrg_rkey(MYRG_INFO *info,uchar *buf,int inx, const uchar *key,
+ key_part_map keypart_map, enum ha_rkey_function search_flag);
+extern int myrg_rrnd(MYRG_INFO *file,uchar *buf,ulonglong pos);
+extern int myrg_rsame(MYRG_INFO *file,uchar *record,int inx);
+extern int myrg_update(MYRG_INFO *file,const uchar *old,uchar *new_rec);
+extern int myrg_write(MYRG_INFO *info,uchar *rec);
+extern int myrg_status(MYRG_INFO *file,MYMERGE_INFO *x,int flag);
+extern int myrg_lock_database(MYRG_INFO *file,int lock_type);
+extern int myrg_create(const char *name, const char **table_names,
+ uint insert_method, my_bool fix_names);
+extern int myrg_extra(MYRG_INFO *file,enum ha_extra_function function,
+ void *extra_arg);
+extern int myrg_reset(MYRG_INFO *info);
+extern void myrg_extrafunc(MYRG_INFO *info,invalidator_by_filename inv);
+extern ha_rows myrg_records_in_range(MYRG_INFO *info, int inx,
+ key_range *min_key, key_range *max_key);
+extern ha_rows myrg_records(MYRG_INFO *info);
+
+extern ulonglong myrg_position(MYRG_INFO *info);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/myisampack.h b/BuildTools/centos/dep/mysql-5.6.14/include/myisampack.h
new file mode 100644
index 000000000..cb744d147
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/myisampack.h
@@ -0,0 +1,242 @@
+#ifndef MYISAMPACK_INCLUDED
+#define MYISAMPACK_INCLUDED
+
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Storing of values in high byte first order.
+
+ integer keys and file pointers are stored with high byte first to get
+ better compression
+*/
+
+/* these two are for uniformity */
+#define mi_sint1korr(A) ((int8)(*A))
+#define mi_uint1korr(A) ((uint8)(*A))
+
+#define mi_sint2korr(A) ((int16) (((int16) (((uchar*) (A))[1])) +\
+ ((int16) ((int16) ((char*) (A))[0]) << 8)))
+#define mi_sint3korr(A) ((int32) (((((uchar*) (A))[0]) & 128) ? \
+ (((uint32) 255L << 24) | \
+ (((uint32) ((uchar*) (A))[0]) << 16) |\
+ (((uint32) ((uchar*) (A))[1]) << 8) | \
+ ((uint32) ((uchar*) (A))[2])) : \
+ (((uint32) ((uchar*) (A))[0]) << 16) |\
+ (((uint32) ((uchar*) (A))[1]) << 8) | \
+ ((uint32) ((uchar*) (A))[2])))
+#define mi_sint4korr(A) ((int32) (((int32) (((uchar*) (A))[3])) +\
+ ((int32) (((uchar*) (A))[2]) << 8) +\
+ ((int32) (((uchar*) (A))[1]) << 16) +\
+ ((int32) ((int16) ((char*) (A))[0]) << 24)))
+#define mi_sint8korr(A) ((longlong) mi_uint8korr(A))
+#define mi_uint2korr(A) ((uint16) (((uint16) (((uchar*) (A))[1])) +\
+ ((uint16) (((uchar*) (A))[0]) << 8)))
+#define mi_uint3korr(A) ((uint32) (((uint32) (((uchar*) (A))[2])) +\
+ (((uint32) (((uchar*) (A))[1])) << 8) +\
+ (((uint32) (((uchar*) (A))[0])) << 16)))
+#define mi_uint4korr(A) ((uint32) (((uint32) (((uchar*) (A))[3])) +\
+ (((uint32) (((uchar*) (A))[2])) << 8) +\
+ (((uint32) (((uchar*) (A))[1])) << 16) +\
+ (((uint32) (((uchar*) (A))[0])) << 24)))
+#define mi_uint5korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[4])) +\
+ (((uint32) (((uchar*) (A))[3])) << 8) +\
+ (((uint32) (((uchar*) (A))[2])) << 16) +\
+ (((uint32) (((uchar*) (A))[1])) << 24)) +\
+ (((ulonglong) (((uchar*) (A))[0])) << 32))
+#define mi_uint6korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[5])) +\
+ (((uint32) (((uchar*) (A))[4])) << 8) +\
+ (((uint32) (((uchar*) (A))[3])) << 16) +\
+ (((uint32) (((uchar*) (A))[2])) << 24)) +\
+ (((ulonglong) (((uint32) (((uchar*) (A))[1])) +\
+ (((uint32) (((uchar*) (A))[0]) << 8)))) <<\
+ 32))
+#define mi_uint7korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[6])) +\
+ (((uint32) (((uchar*) (A))[5])) << 8) +\
+ (((uint32) (((uchar*) (A))[4])) << 16) +\
+ (((uint32) (((uchar*) (A))[3])) << 24)) +\
+ (((ulonglong) (((uint32) (((uchar*) (A))[2])) +\
+ (((uint32) (((uchar*) (A))[1])) << 8) +\
+ (((uint32) (((uchar*) (A))[0])) << 16))) <<\
+ 32))
+#define mi_uint8korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[7])) +\
+ (((uint32) (((uchar*) (A))[6])) << 8) +\
+ (((uint32) (((uchar*) (A))[5])) << 16) +\
+ (((uint32) (((uchar*) (A))[4])) << 24)) +\
+ (((ulonglong) (((uint32) (((uchar*) (A))[3])) +\
+ (((uint32) (((uchar*) (A))[2])) << 8) +\
+ (((uint32) (((uchar*) (A))[1])) << 16) +\
+ (((uint32) (((uchar*) (A))[0])) << 24))) <<\
+ 32))
+
+/* This one is for uniformity */
+#define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A)
+
+#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\
+ ((uchar*) (T))[1]= (uchar) (def_temp);\
+ ((uchar*) (T))[0]= (uchar) (def_temp >> 8); }
+#define mi_int3store(T,A) { /*lint -save -e734 */\
+ ulong def_temp= (ulong) (A);\
+ ((uchar*) (T))[2]= (uchar) (def_temp);\
+ ((uchar*) (T))[1]= (uchar) (def_temp >> 8);\
+ ((uchar*) (T))[0]= (uchar) (def_temp >> 16);\
+ /*lint -restore */}
+#define mi_int4store(T,A) { ulong def_temp= (ulong) (A);\
+ ((uchar*) (T))[3]= (uchar) (def_temp);\
+ ((uchar*) (T))[2]= (uchar) (def_temp >> 8);\
+ ((uchar*) (T))[1]= (uchar) (def_temp >> 16);\
+ ((uchar*) (T))[0]= (uchar) (def_temp >> 24); }
+#define mi_int5store(T,A) { ulong def_temp= (ulong) (A),\
+ def_temp2= (ulong) ((A) >> 32);\
+ ((uchar*) (T))[4]= (uchar) (def_temp);\
+ ((uchar*) (T))[3]= (uchar) (def_temp >> 8);\
+ ((uchar*) (T))[2]= (uchar) (def_temp >> 16);\
+ ((uchar*) (T))[1]= (uchar) (def_temp >> 24);\
+ ((uchar*) (T))[0]= (uchar) (def_temp2); }
+#define mi_int6store(T,A) { ulong def_temp= (ulong) (A),\
+ def_temp2= (ulong) ((A) >> 32);\
+ ((uchar*) (T))[5]= (uchar) (def_temp);\
+ ((uchar*) (T))[4]= (uchar) (def_temp >> 8);\
+ ((uchar*) (T))[3]= (uchar) (def_temp >> 16);\
+ ((uchar*) (T))[2]= (uchar) (def_temp >> 24);\
+ ((uchar*) (T))[1]= (uchar) (def_temp2);\
+ ((uchar*) (T))[0]= (uchar) (def_temp2 >> 8); }
+#define mi_int7store(T,A) { ulong def_temp= (ulong) (A),\
+ def_temp2= (ulong) ((A) >> 32);\
+ ((uchar*) (T))[6]= (uchar) (def_temp);\
+ ((uchar*) (T))[5]= (uchar) (def_temp >> 8);\
+ ((uchar*) (T))[4]= (uchar) (def_temp >> 16);\
+ ((uchar*) (T))[3]= (uchar) (def_temp >> 24);\
+ ((uchar*) (T))[2]= (uchar) (def_temp2);\
+ ((uchar*) (T))[1]= (uchar) (def_temp2 >> 8);\
+ ((uchar*) (T))[0]= (uchar) (def_temp2 >> 16); }
+#define mi_int8store(T,A) { ulong def_temp3= (ulong) (A),\
+ def_temp4= (ulong) ((A) >> 32);\
+ mi_int4store((uchar*) (T) + 0, def_temp4);\
+ mi_int4store((uchar*) (T) + 4, def_temp3); }
+
+#ifdef WORDS_BIGENDIAN
+
+#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((uchar*) &A)[0];\
+ ((uchar*) (T))[1]= ((uchar*) &A)[1];\
+ ((uchar*) (T))[2]= ((uchar*) &A)[2];\
+ ((uchar*) (T))[3]= ((uchar*) &A)[3]; }
+
+#define mi_float4get(V,M) { float def_temp;\
+ ((uchar*) &def_temp)[0]= ((uchar*) (M))[0];\
+ ((uchar*) &def_temp)[1]= ((uchar*) (M))[1];\
+ ((uchar*) &def_temp)[2]= ((uchar*) (M))[2];\
+ ((uchar*) &def_temp)[3]= ((uchar*) (M))[3];\
+ (V)= def_temp; }
+
+#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[0];\
+ ((uchar*) (T))[1]= ((uchar*) &V)[1];\
+ ((uchar*) (T))[2]= ((uchar*) &V)[2];\
+ ((uchar*) (T))[3]= ((uchar*) &V)[3];\
+ ((uchar*) (T))[4]= ((uchar*) &V)[4];\
+ ((uchar*) (T))[5]= ((uchar*) &V)[5];\
+ ((uchar*) (T))[6]= ((uchar*) &V)[6];\
+ ((uchar*) (T))[7]= ((uchar*) &V)[7]; }
+
+#define mi_float8get(V,M) { double def_temp;\
+ ((uchar*) &def_temp)[0]= ((uchar*) (M))[0];\
+ ((uchar*) &def_temp)[1]= ((uchar*) (M))[1];\
+ ((uchar*) &def_temp)[2]= ((uchar*) (M))[2];\
+ ((uchar*) &def_temp)[3]= ((uchar*) (M))[3];\
+ ((uchar*) &def_temp)[4]= ((uchar*) (M))[4];\
+ ((uchar*) &def_temp)[5]= ((uchar*) (M))[5];\
+ ((uchar*) &def_temp)[6]= ((uchar*) (M))[6];\
+ ((uchar*) &def_temp)[7]= ((uchar*) (M))[7]; \
+ (V)= def_temp; }
+#else
+
+#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((uchar*) &A)[3];\
+ ((uchar*) (T))[1]= ((uchar*) &A)[2];\
+ ((uchar*) (T))[2]= ((uchar*) &A)[1];\
+ ((uchar*) (T))[3]= ((uchar*) &A)[0]; }
+
+#define mi_float4get(V,M) { float def_temp;\
+ ((uchar*) &def_temp)[0]= ((uchar*) (M))[3];\
+ ((uchar*) &def_temp)[1]= ((uchar*) (M))[2];\
+ ((uchar*) &def_temp)[2]= ((uchar*) (M))[1];\
+ ((uchar*) &def_temp)[3]= ((uchar*) (M))[0];\
+ (V)= def_temp; }
+
+#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
+#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[3];\
+ ((uchar*) (T))[1]= ((uchar*) &V)[2];\
+ ((uchar*) (T))[2]= ((uchar*) &V)[1];\
+ ((uchar*) (T))[3]= ((uchar*) &V)[0];\
+ ((uchar*) (T))[4]= ((uchar*) &V)[7];\
+ ((uchar*) (T))[5]= ((uchar*) &V)[6];\
+ ((uchar*) (T))[6]= ((uchar*) &V)[5];\
+ ((uchar*) (T))[7]= ((uchar*) &V)[4];}
+
+#define mi_float8get(V,M) { double def_temp;\
+ ((uchar*) &def_temp)[0]= ((uchar*) (M))[3];\
+ ((uchar*) &def_temp)[1]= ((uchar*) (M))[2];\
+ ((uchar*) &def_temp)[2]= ((uchar*) (M))[1];\
+ ((uchar*) &def_temp)[3]= ((uchar*) (M))[0];\
+ ((uchar*) &def_temp)[4]= ((uchar*) (M))[7];\
+ ((uchar*) &def_temp)[5]= ((uchar*) (M))[6];\
+ ((uchar*) &def_temp)[6]= ((uchar*) (M))[5];\
+ ((uchar*) &def_temp)[7]= ((uchar*) (M))[4];\
+ (V)= def_temp; }
+
+#else
+#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[7];\
+ ((uchar*) (T))[1]= ((uchar*) &V)[6];\
+ ((uchar*) (T))[2]= ((uchar*) &V)[5];\
+ ((uchar*) (T))[3]= ((uchar*) &V)[4];\
+ ((uchar*) (T))[4]= ((uchar*) &V)[3];\
+ ((uchar*) (T))[5]= ((uchar*) &V)[2];\
+ ((uchar*) (T))[6]= ((uchar*) &V)[1];\
+ ((uchar*) (T))[7]= ((uchar*) &V)[0];}
+
+#define mi_float8get(V,M) { double def_temp;\
+ ((uchar*) &def_temp)[0]= ((uchar*) (M))[7];\
+ ((uchar*) &def_temp)[1]= ((uchar*) (M))[6];\
+ ((uchar*) &def_temp)[2]= ((uchar*) (M))[5];\
+ ((uchar*) &def_temp)[3]= ((uchar*) (M))[4];\
+ ((uchar*) &def_temp)[4]= ((uchar*) (M))[3];\
+ ((uchar*) &def_temp)[5]= ((uchar*) (M))[2];\
+ ((uchar*) &def_temp)[6]= ((uchar*) (M))[1];\
+ ((uchar*) &def_temp)[7]= ((uchar*) (M))[0];\
+ (V)= def_temp; }
+#endif /* __FLOAT_WORD_ORDER */
+#endif /* WORDS_BIGENDIAN */
+
+/* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */
+
+#ifdef BIG_TABLES
+#define mi_rowstore(T,A) mi_int8store(T, A)
+#define mi_rowkorr(T) mi_uint8korr(T)
+#else
+#define mi_rowstore(T,A) { mi_int4store(T, 0);\
+ mi_int4store(((uchar*) (T) + 4), A); }
+#define mi_rowkorr(T) mi_uint4korr((uchar*) (T) + 4)
+#endif
+
+#if SIZEOF_OFF_T > 4
+#define mi_sizestore(T,A) mi_int8store(T, A)
+#define mi_sizekorr(T) mi_uint8korr(T)
+#else
+#define mi_sizestore(T,A) { if ((A) == HA_OFFSET_ERROR)\
+ memset((T), 255, 8);\
+ else { mi_int4store((T), 0);\
+ mi_int4store(((T) + 4), A); }}
+#define mi_sizekorr(T) mi_uint4korr((uchar*) (T) + 4)
+#endif
+#endif /* MYISAMPACK_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql.h
new file mode 100644
index 000000000..38b54de2e
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql.h
@@ -0,0 +1,739 @@
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ This file defines the client API to MySQL and also the ABI of the
+ dynamically linked libmysqlclient.
+
+ The ABI should never be changed in a released product of MySQL,
+ thus you need to take great care when changing the file. In case
+ the file is changed so the ABI is broken, you must also update
+ the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake
+*/
+
+#ifndef _mysql_h
+#define _mysql_h
+
+#ifdef _AIX /* large-file support will break without this */
+#include
+#endif
+
+#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
+#undef WIN
+#undef _WIN
+#undef _WIN32
+#undef _WIN64
+#undef __WIN__
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef MY_GLOBAL_INCLUDED /* If not standard header */
+#ifndef MYSQL_ABI_CHECK
+#include
+#endif
+#ifdef __LCC__
+#include /* For windows */
+#endif
+typedef char my_bool;
+#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
+#define __WIN__
+#endif
+#if !defined(__WIN__)
+#define STDCALL
+#else
+#define STDCALL __stdcall
+#endif
+
+#ifndef my_socket_defined
+#ifdef __WIN__
+#define my_socket SOCKET
+#else
+typedef int my_socket;
+#endif /* __WIN__ */
+#endif /* my_socket_defined */
+#endif /* MY_GLOBAL_INCLUDED */
+
+#include "mysql_version.h"
+#include "mysql_com.h"
+#include "mysql_time.h"
+
+#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
+
+extern unsigned int mysql_port;
+extern char *mysql_unix_port;
+
+#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
+#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
+
+#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
+#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
+#define IS_BLOB(n) ((n) & BLOB_FLAG)
+/**
+ Returns true if the value is a number which does not need quotes for
+ the sql_lex.cc parser to parse correctly.
+*/
+#define IS_NUM(t) (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
+#define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
+
+
+typedef struct st_mysql_field {
+ char *name; /* Name of column */
+ char *org_name; /* Original column name, if an alias */
+ char *table; /* Table of column if column was a field */
+ char *org_table; /* Org table name, if table was an alias */
+ char *db; /* Database for table */
+ char *catalog; /* Catalog for table */
+ char *def; /* Default value (set by mysql_list_fields) */
+ unsigned long length; /* Width of column (create length) */
+ unsigned long max_length; /* Max width for selected set */
+ unsigned int name_length;
+ unsigned int org_name_length;
+ unsigned int table_length;
+ unsigned int org_table_length;
+ unsigned int db_length;
+ unsigned int catalog_length;
+ unsigned int def_length;
+ unsigned int flags; /* Div flags */
+ unsigned int decimals; /* Number of decimals in field */
+ unsigned int charsetnr; /* Character set */
+ enum enum_field_types type; /* Type of field. See mysql_com.h for types */
+ void *extension;
+} MYSQL_FIELD;
+
+typedef char **MYSQL_ROW; /* return data as array of strings */
+typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
+
+#ifndef MY_GLOBAL_INCLUDED
+#if defined(NO_CLIENT_LONG_LONG)
+typedef unsigned long my_ulonglong;
+#elif defined (__WIN__)
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+#endif
+
+#include "typelib.h"
+
+#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
+
+/* backward compatibility define - to be removed eventually */
+#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
+
+typedef struct st_mysql_rows {
+ struct st_mysql_rows *next; /* list of rows */
+ MYSQL_ROW data;
+ unsigned long length;
+} MYSQL_ROWS;
+
+typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
+
+#include "my_alloc.h"
+
+typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
+typedef struct st_mysql_data {
+ MYSQL_ROWS *data;
+ struct embedded_query_result *embedded_info;
+ MEM_ROOT alloc;
+ my_ulonglong rows;
+ unsigned int fields;
+ /* extra info for embedded library */
+ void *extension;
+} MYSQL_DATA;
+
+enum mysql_option
+{
+ MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
+ MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
+ MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
+ MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
+ MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
+ MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
+ MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
+ MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
+ MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH,
+ MYSQL_OPT_BIND,
+ MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT,
+ MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER,
+ MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH,
+ MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD,
+ MYSQL_OPT_CONNECT_ATTR_DELETE,
+ MYSQL_SERVER_PUBLIC_KEY,
+ MYSQL_ENABLE_CLEARTEXT_PLUGIN,
+ MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS
+};
+
+/**
+ @todo remove the "extension", move st_mysql_options completely
+ out of mysql.h
+*/
+struct st_mysql_options_extention;
+
+struct st_mysql_options {
+ unsigned int connect_timeout, read_timeout, write_timeout;
+ unsigned int port, protocol;
+ unsigned long client_flag;
+ char *host,*user,*password,*unix_socket,*db;
+ struct st_dynamic_array *init_commands;
+ char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
+ char *ssl_key; /* PEM key file */
+ char *ssl_cert; /* PEM cert file */
+ char *ssl_ca; /* PEM CA file */
+ char *ssl_capath; /* PEM directory of CA-s? */
+ char *ssl_cipher; /* cipher to use */
+ char *shared_memory_base_name;
+ unsigned long max_allowed_packet;
+ my_bool use_ssl; /* if to use SSL or not */
+ my_bool compress,named_pipe;
+ my_bool unused1;
+ my_bool unused2;
+ my_bool unused3;
+ my_bool unused4;
+ enum mysql_option methods_to_use;
+ union {
+ /*
+ The ip/hostname to use when authenticating
+ client against embedded server built with
+ grant tables - only used in embedded server
+ */
+ char *client_ip;
+
+ /*
+ The local address to bind when connecting to
+ remote server - not used in embedded server
+ */
+ char *bind_address;
+ } ci;
+ /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
+ my_bool secure_auth;
+ /* 0 - never report, 1 - always report (default) */
+ my_bool report_data_truncation;
+
+ /* function pointers for local infile support */
+ int (*local_infile_init)(void **, const char *, void *);
+ int (*local_infile_read)(void *, char *, unsigned int);
+ void (*local_infile_end)(void *);
+ int (*local_infile_error)(void *, char *, unsigned int);
+ void *local_infile_userdata;
+ struct st_mysql_options_extention *extension;
+};
+
+enum mysql_status
+{
+ MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
+ MYSQL_STATUS_STATEMENT_GET_RESULT
+};
+
+enum mysql_protocol_type
+{
+ MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
+ MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
+};
+
+typedef struct character_set
+{
+ unsigned int number; /* character set number */
+ unsigned int state; /* character set state */
+ const char *csname; /* collation name */
+ const char *name; /* character set name */
+ const char *comment; /* comment */
+ const char *dir; /* character set directory */
+ unsigned int mbminlen; /* min. length for multibyte strings */
+ unsigned int mbmaxlen; /* max. length for multibyte strings */
+} MY_CHARSET_INFO;
+
+struct st_mysql_methods;
+struct st_mysql_stmt;
+
+typedef struct st_mysql
+{
+ NET net; /* Communication parameters */
+ unsigned char *connector_fd; /* ConnectorFd for SSL */
+ char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
+ char *info, *db;
+ struct charset_info_st *charset;
+ MYSQL_FIELD *fields;
+ MEM_ROOT field_alloc;
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
+ my_ulonglong extra_info; /* Not used */
+ unsigned long thread_id; /* Id for connection in server */
+ unsigned long packet_length;
+ unsigned int port;
+ unsigned long client_flag,server_capabilities;
+ unsigned int protocol_version;
+ unsigned int field_count;
+ unsigned int server_status;
+ unsigned int server_language;
+ unsigned int warning_count;
+ struct st_mysql_options options;
+ enum mysql_status status;
+ my_bool free_me; /* If free in mysql_close */
+ my_bool reconnect; /* set to 1 if automatic reconnect */
+
+ /* session-wide random string */
+ char scramble[SCRAMBLE_LENGTH+1];
+ my_bool unused1;
+ void *unused2, *unused3, *unused4, *unused5;
+
+ LIST *stmts; /* list of all statements */
+ const struct st_mysql_methods *methods;
+ void *thd;
+ /*
+ Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
+ from mysql_stmt_close if close had to cancel result set of this object.
+ */
+ my_bool *unbuffered_fetch_owner;
+ /* needed for embedded server - no net buffer to store the 'info' */
+ char *info_buffer;
+ void *extension;
+} MYSQL;
+
+
+typedef struct st_mysql_res {
+ my_ulonglong row_count;
+ MYSQL_FIELD *fields;
+ MYSQL_DATA *data;
+ MYSQL_ROWS *data_cursor;
+ unsigned long *lengths; /* column lengths of current row */
+ MYSQL *handle; /* for unbuffered reads */
+ const struct st_mysql_methods *methods;
+ MYSQL_ROW row; /* If unbuffered read */
+ MYSQL_ROW current_row; /* buffer to current row */
+ MEM_ROOT field_alloc;
+ unsigned int field_count, current_field;
+ my_bool eof; /* Used by mysql_fetch_row */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ void *extension;
+} MYSQL_RES;
+
+
+#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
+#define MYSQL_CLIENT
+#endif
+
+
+typedef struct st_mysql_parameters
+{
+ unsigned long *p_max_allowed_packet;
+ unsigned long *p_net_buffer_length;
+ void *extension;
+} MYSQL_PARAMETERS;
+
+#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
+#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
+#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
+#endif
+
+/*
+ Set up and bring down the server; to ensure that applications will
+ work when linked against either the standard client library or the
+ embedded server library, these functions should be called.
+*/
+int STDCALL mysql_server_init(int argc, char **argv, char **groups);
+void STDCALL mysql_server_end(void);
+
+/*
+ mysql_server_init/end need to be called when using libmysqld or
+ libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
+ you don't need to call it explicitely; but you need to call
+ mysql_server_end() to free memory). The names are a bit misleading
+ (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
+ names which suit well whether you're using libmysqld or libmysqlclient. We
+ intend to promote these aliases over the mysql_server* ones.
+*/
+#define mysql_library_init mysql_server_init
+#define mysql_library_end mysql_server_end
+
+MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
+
+/*
+ Set up and bring down a thread; these function should be called
+ for each thread in an application which opens at least one MySQL
+ connection. All uses of the connection(s) should be between these
+ function calls.
+*/
+my_bool STDCALL mysql_thread_init(void);
+void STDCALL mysql_thread_end(void);
+
+/*
+ Functions to get information from the MYSQL and MYSQL_RES structures
+ Should definitely be used if one uses shared libraries.
+*/
+
+my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res);
+unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
+my_bool STDCALL mysql_eof(MYSQL_RES *res);
+MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res,
+ unsigned int fieldnr);
+MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res);
+MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res);
+
+unsigned int STDCALL mysql_field_count(MYSQL *mysql);
+my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
+my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql);
+unsigned int STDCALL mysql_errno(MYSQL *mysql);
+const char * STDCALL mysql_error(MYSQL *mysql);
+const char *STDCALL mysql_sqlstate(MYSQL *mysql);
+unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
+const char * STDCALL mysql_info(MYSQL *mysql);
+unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
+const char * STDCALL mysql_character_set_name(MYSQL *mysql);
+int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);
+
+MYSQL * STDCALL mysql_init(MYSQL *mysql);
+my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
+ const char *cert, const char *ca,
+ const char *capath, const char *cipher);
+const char * STDCALL mysql_get_ssl_cipher(MYSQL *mysql);
+my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
+ const char *passwd, const char *db);
+MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
+ const char *user,
+ const char *passwd,
+ const char *db,
+ unsigned int port,
+ const char *unix_socket,
+ unsigned long clientflag);
+int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
+int STDCALL mysql_query(MYSQL *mysql, const char *q);
+int STDCALL mysql_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
+
+void STDCALL mysql_get_character_set_info(MYSQL *mysql,
+ MY_CHARSET_INFO *charset);
+
+/* local infile support */
+
+#define LOCAL_INFILE_ERROR_LEN 512
+
+void
+mysql_set_local_infile_handler(MYSQL *mysql,
+ int (*local_infile_init)(void **, const char *,
+ void *),
+ int (*local_infile_read)(void *, char *,
+ unsigned int),
+ void (*local_infile_end)(void *),
+ int (*local_infile_error)(void *, char*,
+ unsigned int),
+ void *);
+
+void
+mysql_set_local_infile_default(MYSQL *mysql);
+
+int STDCALL mysql_shutdown(MYSQL *mysql,
+ enum mysql_enum_shutdown_level
+ shutdown_level);
+int STDCALL mysql_dump_debug_info(MYSQL *mysql);
+int STDCALL mysql_refresh(MYSQL *mysql,
+ unsigned int refresh_options);
+int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid);
+int STDCALL mysql_set_server_option(MYSQL *mysql,
+ enum enum_mysql_set_option
+ option);
+int STDCALL mysql_ping(MYSQL *mysql);
+const char * STDCALL mysql_stat(MYSQL *mysql);
+const char * STDCALL mysql_get_server_info(MYSQL *mysql);
+const char * STDCALL mysql_get_client_info(void);
+unsigned long STDCALL mysql_get_client_version(void);
+const char * STDCALL mysql_get_host_info(MYSQL *mysql);
+unsigned long STDCALL mysql_get_server_version(MYSQL *mysql);
+unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
+int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
+ const void *arg);
+int STDCALL mysql_options4(MYSQL *mysql,enum mysql_option option,
+ const void *arg1, const void *arg2);
+void STDCALL mysql_free_result(MYSQL_RES *result);
+void STDCALL mysql_data_seek(MYSQL_RES *result,
+ my_ulonglong offset);
+MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
+ MYSQL_FIELD_OFFSET offset);
+MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
+unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
+MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
+MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
+ const char *wild);
+unsigned long STDCALL mysql_escape_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_hex_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
+ char *to,const char *from,
+ unsigned long length);
+void STDCALL mysql_debug(const char *debug);
+void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
+unsigned int STDCALL mysql_thread_safe(void);
+my_bool STDCALL mysql_embedded(void);
+my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
+
+
+/*
+ The following definitions are added for the enhanced
+ client-server protocol
+*/
+
+/* statement state */
+enum enum_mysql_stmt_state
+{
+ MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
+ MYSQL_STMT_FETCH_DONE
+};
+
+
+/*
+ This structure is used to define bind information, and
+ internally by the client library.
+ Public members with their descriptions are listed below
+ (conventionally `On input' refers to the binds given to
+ mysql_stmt_bind_param, `On output' refers to the binds given
+ to mysql_stmt_bind_result):
+
+ buffer_type - One of the MYSQL_* types, used to describe
+ the host language type of buffer.
+ On output: if column type is different from
+ buffer_type, column value is automatically converted
+ to buffer_type before it is stored in the buffer.
+ buffer - On input: points to the buffer with input data.
+ On output: points to the buffer capable to store
+ output data.
+ The type of memory pointed by buffer must correspond
+ to buffer_type. See the correspondence table in
+ the comment to mysql_stmt_bind_param.
+
+ The two above members are mandatory for any kind of bind.
+
+ buffer_length - the length of the buffer. You don't have to set
+ it for any fixed length buffer: float, double,
+ int, etc. It must be set however for variable-length
+ types, such as BLOBs or STRINGs.
+
+ length - On input: in case when lengths of input values
+ are different for each execute, you can set this to
+ point at a variable containining value length. This
+ way the value length can be different in each execute.
+ If length is not NULL, buffer_length is not used.
+ Note, length can even point at buffer_length if
+ you keep bind structures around while fetching:
+ this way you can change buffer_length before
+ each execution, everything will work ok.
+ On output: if length is set, mysql_stmt_fetch will
+ write column length into it.
+
+ is_null - On input: points to a boolean variable that should
+ be set to TRUE for NULL values.
+ This member is useful only if your data may be
+ NULL in some but not all cases.
+ If your data is never NULL, is_null should be set to 0.
+ If your data is always NULL, set buffer_type
+ to MYSQL_TYPE_NULL, and is_null will not be used.
+
+ is_unsigned - On input: used to signify that values provided for one
+ of numeric types are unsigned.
+ On output describes signedness of the output buffer.
+ If, taking into account is_unsigned flag, column data
+ is out of range of the output buffer, data for this column
+ is regarded truncated. Note that this has no correspondence
+ to the sign of result set column, if you need to find it out
+ use mysql_stmt_result_metadata.
+ error - where to write a truncation error if it is present.
+ possible error value is:
+ 0 no truncation
+ 1 value is out of range or buffer is too small
+
+ Please note that MYSQL_BIND also has internals members.
+*/
+
+typedef struct st_mysql_bind
+{
+ unsigned long *length; /* output length pointer */
+ my_bool *is_null; /* Pointer to null indicator */
+ void *buffer; /* buffer to get/put data */
+ /* set this if you want to track data truncations happened during fetch */
+ my_bool *error;
+ unsigned char *row_ptr; /* for the current data position */
+ void (*store_param_func)(NET *net, struct st_mysql_bind *param);
+ void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+ void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+ /* output buffer length, must be set when fetching str/binary */
+ unsigned long buffer_length;
+ unsigned long offset; /* offset position for char/binary fetch */
+ unsigned long length_value; /* Used if length is 0 */
+ unsigned int param_number; /* For null count and error messages */
+ unsigned int pack_length; /* Internal length for packed data */
+ enum enum_field_types buffer_type; /* buffer type */
+ my_bool error_value; /* used if error is 0 */
+ my_bool is_unsigned; /* set if integer type is unsigned */
+ my_bool long_data_used; /* If used with mysql_send_long_data */
+ my_bool is_null_value; /* Used if is_null is 0 */
+ void *extension;
+} MYSQL_BIND;
+
+
+struct st_mysql_stmt_extension;
+
+/* statement handler */
+typedef struct st_mysql_stmt
+{
+ MEM_ROOT mem_root; /* root allocations */
+ LIST list; /* list to keep track of all stmts */
+ MYSQL *mysql; /* connection handle */
+ MYSQL_BIND *params; /* input parameters */
+ MYSQL_BIND *bind; /* output parameters */
+ MYSQL_FIELD *fields; /* result set metadata */
+ MYSQL_DATA result; /* cached result set */
+ MYSQL_ROWS *data_cursor; /* current row in cached result */
+ /*
+ mysql_stmt_fetch() calls this function to fetch one row (it's different
+ for buffered, unbuffered and cursor fetch).
+ */
+ int (*read_row_func)(struct st_mysql_stmt *stmt,
+ unsigned char **row);
+ /* copy of mysql->affected_rows after statement execution */
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* copy of mysql->insert_id */
+ unsigned long stmt_id; /* Id for prepared statement */
+ unsigned long flags; /* i.e. type of cursor to open */
+ unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
+ /*
+ Copied from mysql->server_status after execute/fetch to know
+ server-side cursor status for this statement.
+ */
+ unsigned int server_status;
+ unsigned int last_errno; /* error code */
+ unsigned int param_count; /* input parameter count */
+ unsigned int field_count; /* number of columns in result set */
+ enum enum_mysql_stmt_state state; /* statement state */
+ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
+ char sqlstate[SQLSTATE_LENGTH+1];
+ /* Types of input parameters should be sent to server */
+ my_bool send_types_to_server;
+ my_bool bind_param_done; /* input buffers were supplied */
+ unsigned char bind_result_done; /* output buffers were supplied */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ /*
+ Is set to true if we need to calculate field->max_length for
+ metadata fields when doing mysql_stmt_store_result.
+ */
+ my_bool update_max_length;
+ struct st_mysql_stmt_extension *extension;
+} MYSQL_STMT;
+
+enum enum_stmt_attr_type
+{
+ /*
+ When doing mysql_stmt_store_result calculate max_length attribute
+ of statement metadata. This is to be consistent with the old API,
+ where this was done automatically.
+ In the new API we do that only by request because it slows down
+ mysql_stmt_store_result sufficiently.
+ */
+ STMT_ATTR_UPDATE_MAX_LENGTH,
+ /*
+ unsigned long with combination of cursor flags (read only, for update,
+ etc)
+ */
+ STMT_ATTR_CURSOR_TYPE,
+ /*
+ Amount of rows to retrieve from server per one fetch if using cursors.
+ Accepts unsigned long attribute in the range 1 - ulong_max
+ */
+ STMT_ATTR_PREFETCH_ROWS
+};
+
+
+MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
+int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
+ unsigned long length);
+int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg,
+ unsigned int column,
+ unsigned long offset);
+int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
+unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ const void *attr);
+my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ void *attr);
+my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
+my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
+ unsigned int param_number,
+ const char *data,
+ unsigned long length);
+MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
+MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
+void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
+my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
+
+my_bool STDCALL mysql_commit(MYSQL * mysql);
+my_bool STDCALL mysql_rollback(MYSQL * mysql);
+my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
+my_bool STDCALL mysql_more_results(MYSQL *mysql);
+int STDCALL mysql_next_result(MYSQL *mysql);
+int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt);
+void STDCALL mysql_close(MYSQL *sock);
+
+
+/* status return codes */
+#define MYSQL_NO_DATA 100
+#define MYSQL_DATA_TRUNCATED 101
+
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+
+#ifdef USE_OLD_FUNCTIONS
+MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host,
+ const char *user, const char *passwd);
+int STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
+int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
+#endif
+#define HAVE_MYSQL_REAL_CONNECT
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _mysql_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql.h.pp
new file mode 100644
index 000000000..3a5c40d0a
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql.h.pp
@@ -0,0 +1,612 @@
+typedef char my_bool;
+typedef int my_socket;
+#include "mysql_version.h"
+#include "mysql_com.h"
+enum enum_server_command
+{
+ COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
+ COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
+ COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
+ COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
+ COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
+ COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE,
+ COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON,
+ COM_BINLOG_DUMP_GTID,
+ COM_END
+};
+struct st_vio;
+typedef struct st_vio Vio;
+typedef struct st_net {
+ Vio *vio;
+ unsigned char *buff,*buff_end,*write_pos,*read_pos;
+ my_socket fd;
+ unsigned long remain_in_buf,length, buf_length, where_b;
+ unsigned long max_packet,max_packet_size;
+ unsigned int pkt_nr,compress_pkt_nr;
+ unsigned int write_timeout, read_timeout, retry_count;
+ int fcntl;
+ unsigned int *return_status;
+ unsigned char reading_or_writing;
+ char save_char;
+ my_bool unused1;
+ my_bool unused2;
+ my_bool compress;
+ my_bool unused3;
+ unsigned char *unused;
+ unsigned int last_errno;
+ unsigned char error;
+ my_bool unused4;
+ my_bool unused5;
+ char last_error[512];
+ char sqlstate[5 +1];
+ void *extension;
+} NET;
+enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
+ MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
+ MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
+ MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
+ MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
+ MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
+ MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
+ MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
+ MYSQL_TYPE_BIT,
+ MYSQL_TYPE_TIMESTAMP2,
+ MYSQL_TYPE_DATETIME2,
+ MYSQL_TYPE_TIME2,
+ MYSQL_TYPE_NEWDECIMAL=246,
+ MYSQL_TYPE_ENUM=247,
+ MYSQL_TYPE_SET=248,
+ MYSQL_TYPE_TINY_BLOB=249,
+ MYSQL_TYPE_MEDIUM_BLOB=250,
+ MYSQL_TYPE_LONG_BLOB=251,
+ MYSQL_TYPE_BLOB=252,
+ MYSQL_TYPE_VAR_STRING=253,
+ MYSQL_TYPE_STRING=254,
+ MYSQL_TYPE_GEOMETRY=255
+};
+enum mysql_enum_shutdown_level {
+ SHUTDOWN_DEFAULT = 0,
+ SHUTDOWN_WAIT_CONNECTIONS= (unsigned char)(1 << 0),
+ SHUTDOWN_WAIT_TRANSACTIONS= (unsigned char)(1 << 1),
+ SHUTDOWN_WAIT_UPDATES= (unsigned char)(1 << 3),
+ SHUTDOWN_WAIT_ALL_BUFFERS= ((unsigned char)(1 << 3) << 1),
+ SHUTDOWN_WAIT_CRITICAL_BUFFERS= ((unsigned char)(1 << 3) << 1) + 1,
+ KILL_QUERY= 254,
+ KILL_CONNECTION= 255
+};
+enum enum_cursor_type
+{
+ CURSOR_TYPE_NO_CURSOR= 0,
+ CURSOR_TYPE_READ_ONLY= 1,
+ CURSOR_TYPE_FOR_UPDATE= 2,
+ CURSOR_TYPE_SCROLLABLE= 4
+};
+enum enum_mysql_set_option
+{
+ MYSQL_OPTION_MULTI_STATEMENTS_ON,
+ MYSQL_OPTION_MULTI_STATEMENTS_OFF
+};
+my_bool my_net_init(NET *net, Vio* vio);
+void my_net_local_init(NET *net);
+void net_end(NET *net);
+void net_clear(NET *net, my_bool check_buffer);
+my_bool net_realloc(NET *net, size_t length);
+my_bool net_flush(NET *net);
+my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
+my_bool net_write_command(NET *net,unsigned char command,
+ const unsigned char *header, size_t head_len,
+ const unsigned char *packet, size_t len);
+my_bool net_write_packet(NET *net, const unsigned char *packet, size_t length);
+unsigned long my_net_read(NET *net);
+struct rand_struct {
+ unsigned long seed1,seed2,max_value;
+ double max_value_dbl;
+};
+enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT,
+ DECIMAL_RESULT};
+typedef struct st_udf_args
+{
+ unsigned int arg_count;
+ enum Item_result *arg_type;
+ char **args;
+ unsigned long *lengths;
+ char *maybe_null;
+ char **attributes;
+ unsigned long *attribute_lengths;
+ void *extension;
+} UDF_ARGS;
+typedef struct st_udf_init
+{
+ my_bool maybe_null;
+ unsigned int decimals;
+ unsigned long max_length;
+ char *ptr;
+ my_bool const_item;
+ void *extension;
+} UDF_INIT;
+void randominit(struct rand_struct *, unsigned long seed1,
+ unsigned long seed2);
+double my_rnd(struct rand_struct *);
+void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
+void hash_password(unsigned long *to, const char *password, unsigned int password_len);
+void make_scrambled_password_323(char *to, const char *password);
+void scramble_323(char *to, const char *message, const char *password);
+my_bool check_scramble_323(const unsigned char *reply, const char *message,
+ unsigned long *salt);
+void get_salt_from_password_323(unsigned long *res, const char *password);
+void make_password_from_salt_323(char *to, const unsigned long *salt);
+void make_scrambled_password(char *to, const char *password);
+void scramble(char *to, const char *message, const char *password);
+my_bool check_scramble(const unsigned char *reply, const char *message,
+ const unsigned char *hash_stage2);
+void get_salt_from_password(unsigned char *res, const char *password);
+void make_password_from_salt(char *to, const unsigned char *hash_stage2);
+char *octet2hex(char *to, const char *str, unsigned int len);
+char *get_tty_password(const char *opt_message);
+const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
+my_bool my_thread_init(void);
+void my_thread_end(void);
+#include "mysql_time.h"
+enum enum_mysql_timestamp_type
+{
+ MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
+ MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
+};
+typedef struct st_mysql_time
+{
+ unsigned int year, month, day, hour, minute, second;
+ unsigned long second_part;
+ my_bool neg;
+ enum enum_mysql_timestamp_type time_type;
+} MYSQL_TIME;
+#include "my_list.h"
+typedef struct st_list {
+ struct st_list *prev,*next;
+ void *data;
+} LIST;
+typedef int (*list_walk_action)(void *,void *);
+extern LIST *list_add(LIST *root,LIST *element);
+extern LIST *list_delete(LIST *root,LIST *element);
+extern LIST *list_cons(void *data,LIST *root);
+extern LIST *list_reverse(LIST *root);
+extern void list_free(LIST *root,unsigned int free_data);
+extern unsigned int list_length(LIST *);
+extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
+extern unsigned int mysql_port;
+extern char *mysql_unix_port;
+typedef struct st_mysql_field {
+ char *name;
+ char *org_name;
+ char *table;
+ char *org_table;
+ char *db;
+ char *catalog;
+ char *def;
+ unsigned long length;
+ unsigned long max_length;
+ unsigned int name_length;
+ unsigned int org_name_length;
+ unsigned int table_length;
+ unsigned int org_table_length;
+ unsigned int db_length;
+ unsigned int catalog_length;
+ unsigned int def_length;
+ unsigned int flags;
+ unsigned int decimals;
+ unsigned int charsetnr;
+ enum enum_field_types type;
+ void *extension;
+} MYSQL_FIELD;
+typedef char **MYSQL_ROW;
+typedef unsigned int MYSQL_FIELD_OFFSET;
+typedef unsigned long long my_ulonglong;
+#include "typelib.h"
+#include "my_alloc.h"
+typedef struct st_used_mem
+{
+ struct st_used_mem *next;
+ unsigned int left;
+ unsigned int size;
+} USED_MEM;
+typedef struct st_mem_root
+{
+ USED_MEM *free;
+ USED_MEM *used;
+ USED_MEM *pre_alloc;
+ size_t min_malloc;
+ size_t block_size;
+ unsigned int block_num;
+ unsigned int first_block_usage;
+ void (*error_handler)(void);
+} MEM_ROOT;
+typedef struct st_typelib {
+ unsigned int count;
+ const char *name;
+ const char **type_names;
+ unsigned int *type_lengths;
+} TYPELIB;
+extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
+extern int find_type_or_exit(const char *x, TYPELIB *typelib,
+ const char *option);
+extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags);
+extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
+extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
+extern TYPELIB sql_protocol_typelib;
+my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name,
+ my_ulonglong cur_set, my_ulonglong default_set,
+ const char *str, unsigned int length,
+ char **err_pos, unsigned int *err_len);
+typedef struct st_mysql_rows {
+ struct st_mysql_rows *next;
+ MYSQL_ROW data;
+ unsigned long length;
+} MYSQL_ROWS;
+typedef MYSQL_ROWS *MYSQL_ROW_OFFSET;
+#include "my_alloc.h"
+typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
+typedef struct st_mysql_data {
+ MYSQL_ROWS *data;
+ struct embedded_query_result *embedded_info;
+ MEM_ROOT alloc;
+ my_ulonglong rows;
+ unsigned int fields;
+ void *extension;
+} MYSQL_DATA;
+enum mysql_option
+{
+ MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
+ MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
+ MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
+ MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
+ MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
+ MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
+ MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
+ MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
+ MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH,
+ MYSQL_OPT_BIND,
+ MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT,
+ MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER,
+ MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH,
+ MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD,
+ MYSQL_OPT_CONNECT_ATTR_DELETE,
+ MYSQL_SERVER_PUBLIC_KEY,
+ MYSQL_ENABLE_CLEARTEXT_PLUGIN,
+ MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS
+};
+struct st_mysql_options_extention;
+struct st_mysql_options {
+ unsigned int connect_timeout, read_timeout, write_timeout;
+ unsigned int port, protocol;
+ unsigned long client_flag;
+ char *host,*user,*password,*unix_socket,*db;
+ struct st_dynamic_array *init_commands;
+ char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
+ char *ssl_key;
+ char *ssl_cert;
+ char *ssl_ca;
+ char *ssl_capath;
+ char *ssl_cipher;
+ char *shared_memory_base_name;
+ unsigned long max_allowed_packet;
+ my_bool use_ssl;
+ my_bool compress,named_pipe;
+ my_bool unused1;
+ my_bool unused2;
+ my_bool unused3;
+ my_bool unused4;
+ enum mysql_option methods_to_use;
+ union {
+ char *client_ip;
+ char *bind_address;
+ } ci;
+ my_bool secure_auth;
+ my_bool report_data_truncation;
+ int (*local_infile_init)(void **, const char *, void *);
+ int (*local_infile_read)(void *, char *, unsigned int);
+ void (*local_infile_end)(void *);
+ int (*local_infile_error)(void *, char *, unsigned int);
+ void *local_infile_userdata;
+ struct st_mysql_options_extention *extension;
+};
+enum mysql_status
+{
+ MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT,
+ MYSQL_STATUS_STATEMENT_GET_RESULT
+};
+enum mysql_protocol_type
+{
+ MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
+ MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
+};
+typedef struct character_set
+{
+ unsigned int number;
+ unsigned int state;
+ const char *csname;
+ const char *name;
+ const char *comment;
+ const char *dir;
+ unsigned int mbminlen;
+ unsigned int mbmaxlen;
+} MY_CHARSET_INFO;
+struct st_mysql_methods;
+struct st_mysql_stmt;
+typedef struct st_mysql
+{
+ NET net;
+ unsigned char *connector_fd;
+ char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
+ char *info, *db;
+ struct charset_info_st *charset;
+ MYSQL_FIELD *fields;
+ MEM_ROOT field_alloc;
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id;
+ my_ulonglong extra_info;
+ unsigned long thread_id;
+ unsigned long packet_length;
+ unsigned int port;
+ unsigned long client_flag,server_capabilities;
+ unsigned int protocol_version;
+ unsigned int field_count;
+ unsigned int server_status;
+ unsigned int server_language;
+ unsigned int warning_count;
+ struct st_mysql_options options;
+ enum mysql_status status;
+ my_bool free_me;
+ my_bool reconnect;
+ char scramble[20 +1];
+ my_bool unused1;
+ void *unused2, *unused3, *unused4, *unused5;
+ LIST *stmts;
+ const struct st_mysql_methods *methods;
+ void *thd;
+ my_bool *unbuffered_fetch_owner;
+ char *info_buffer;
+ void *extension;
+} MYSQL;
+typedef struct st_mysql_res {
+ my_ulonglong row_count;
+ MYSQL_FIELD *fields;
+ MYSQL_DATA *data;
+ MYSQL_ROWS *data_cursor;
+ unsigned long *lengths;
+ MYSQL *handle;
+ const struct st_mysql_methods *methods;
+ MYSQL_ROW row;
+ MYSQL_ROW current_row;
+ MEM_ROOT field_alloc;
+ unsigned int field_count, current_field;
+ my_bool eof;
+ my_bool unbuffered_fetch_cancelled;
+ void *extension;
+} MYSQL_RES;
+typedef struct st_mysql_parameters
+{
+ unsigned long *p_max_allowed_packet;
+ unsigned long *p_net_buffer_length;
+ void *extension;
+} MYSQL_PARAMETERS;
+int mysql_server_init(int argc, char **argv, char **groups);
+void mysql_server_end(void);
+MYSQL_PARAMETERS * mysql_get_parameters(void);
+my_bool mysql_thread_init(void);
+void mysql_thread_end(void);
+my_ulonglong mysql_num_rows(MYSQL_RES *res);
+unsigned int mysql_num_fields(MYSQL_RES *res);
+my_bool mysql_eof(MYSQL_RES *res);
+MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES *res,
+ unsigned int fieldnr);
+MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES *res);
+MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES *res);
+MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES *res);
+unsigned int mysql_field_count(MYSQL *mysql);
+my_ulonglong mysql_affected_rows(MYSQL *mysql);
+my_ulonglong mysql_insert_id(MYSQL *mysql);
+unsigned int mysql_errno(MYSQL *mysql);
+const char * mysql_error(MYSQL *mysql);
+const char * mysql_sqlstate(MYSQL *mysql);
+unsigned int mysql_warning_count(MYSQL *mysql);
+const char * mysql_info(MYSQL *mysql);
+unsigned long mysql_thread_id(MYSQL *mysql);
+const char * mysql_character_set_name(MYSQL *mysql);
+int mysql_set_character_set(MYSQL *mysql, const char *csname);
+MYSQL * mysql_init(MYSQL *mysql);
+my_bool mysql_ssl_set(MYSQL *mysql, const char *key,
+ const char *cert, const char *ca,
+ const char *capath, const char *cipher);
+const char * mysql_get_ssl_cipher(MYSQL *mysql);
+my_bool mysql_change_user(MYSQL *mysql, const char *user,
+ const char *passwd, const char *db);
+MYSQL * mysql_real_connect(MYSQL *mysql, const char *host,
+ const char *user,
+ const char *passwd,
+ const char *db,
+ unsigned int port,
+ const char *unix_socket,
+ unsigned long clientflag);
+int mysql_select_db(MYSQL *mysql, const char *db);
+int mysql_query(MYSQL *mysql, const char *q);
+int mysql_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+int mysql_real_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+MYSQL_RES * mysql_store_result(MYSQL *mysql);
+MYSQL_RES * mysql_use_result(MYSQL *mysql);
+void mysql_get_character_set_info(MYSQL *mysql,
+ MY_CHARSET_INFO *charset);
+void
+mysql_set_local_infile_handler(MYSQL *mysql,
+ int (*local_infile_init)(void **, const char *,
+ void *),
+ int (*local_infile_read)(void *, char *,
+ unsigned int),
+ void (*local_infile_end)(void *),
+ int (*local_infile_error)(void *, char*,
+ unsigned int),
+ void *);
+void
+mysql_set_local_infile_default(MYSQL *mysql);
+int mysql_shutdown(MYSQL *mysql,
+ enum mysql_enum_shutdown_level
+ shutdown_level);
+int mysql_dump_debug_info(MYSQL *mysql);
+int mysql_refresh(MYSQL *mysql,
+ unsigned int refresh_options);
+int mysql_kill(MYSQL *mysql,unsigned long pid);
+int mysql_set_server_option(MYSQL *mysql,
+ enum enum_mysql_set_option
+ option);
+int mysql_ping(MYSQL *mysql);
+const char * mysql_stat(MYSQL *mysql);
+const char * mysql_get_server_info(MYSQL *mysql);
+const char * mysql_get_client_info(void);
+unsigned long mysql_get_client_version(void);
+const char * mysql_get_host_info(MYSQL *mysql);
+unsigned long mysql_get_server_version(MYSQL *mysql);
+unsigned int mysql_get_proto_info(MYSQL *mysql);
+MYSQL_RES * mysql_list_dbs(MYSQL *mysql,const char *wild);
+MYSQL_RES * mysql_list_tables(MYSQL *mysql,const char *wild);
+MYSQL_RES * mysql_list_processes(MYSQL *mysql);
+int mysql_options(MYSQL *mysql,enum mysql_option option,
+ const void *arg);
+int mysql_options4(MYSQL *mysql,enum mysql_option option,
+ const void *arg1, const void *arg2);
+void mysql_free_result(MYSQL_RES *result);
+void mysql_data_seek(MYSQL_RES *result,
+ my_ulonglong offset);
+MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES *result,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result,
+ MYSQL_FIELD_OFFSET offset);
+MYSQL_ROW mysql_fetch_row(MYSQL_RES *result);
+unsigned long * mysql_fetch_lengths(MYSQL_RES *result);
+MYSQL_FIELD * mysql_fetch_field(MYSQL_RES *result);
+MYSQL_RES * mysql_list_fields(MYSQL *mysql, const char *table,
+ const char *wild);
+unsigned long mysql_escape_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long mysql_hex_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long mysql_real_escape_string(MYSQL *mysql,
+ char *to,const char *from,
+ unsigned long length);
+void mysql_debug(const char *debug);
+void myodbc_remove_escape(MYSQL *mysql,char *name);
+unsigned int mysql_thread_safe(void);
+my_bool mysql_embedded(void);
+my_bool mysql_read_query_result(MYSQL *mysql);
+enum enum_mysql_stmt_state
+{
+ MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
+ MYSQL_STMT_FETCH_DONE
+};
+typedef struct st_mysql_bind
+{
+ unsigned long *length;
+ my_bool *is_null;
+ void *buffer;
+ my_bool *error;
+ unsigned char *row_ptr;
+ void (*store_param_func)(NET *net, struct st_mysql_bind *param);
+ void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+ void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+ unsigned long buffer_length;
+ unsigned long offset;
+ unsigned long length_value;
+ unsigned int param_number;
+ unsigned int pack_length;
+ enum enum_field_types buffer_type;
+ my_bool error_value;
+ my_bool is_unsigned;
+ my_bool long_data_used;
+ my_bool is_null_value;
+ void *extension;
+} MYSQL_BIND;
+struct st_mysql_stmt_extension;
+typedef struct st_mysql_stmt
+{
+ MEM_ROOT mem_root;
+ LIST list;
+ MYSQL *mysql;
+ MYSQL_BIND *params;
+ MYSQL_BIND *bind;
+ MYSQL_FIELD *fields;
+ MYSQL_DATA result;
+ MYSQL_ROWS *data_cursor;
+ int (*read_row_func)(struct st_mysql_stmt *stmt,
+ unsigned char **row);
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id;
+ unsigned long stmt_id;
+ unsigned long flags;
+ unsigned long prefetch_rows;
+ unsigned int server_status;
+ unsigned int last_errno;
+ unsigned int param_count;
+ unsigned int field_count;
+ enum enum_mysql_stmt_state state;
+ char last_error[512];
+ char sqlstate[5 +1];
+ my_bool send_types_to_server;
+ my_bool bind_param_done;
+ unsigned char bind_result_done;
+ my_bool unbuffered_fetch_cancelled;
+ my_bool update_max_length;
+ struct st_mysql_stmt_extension *extension;
+} MYSQL_STMT;
+enum enum_stmt_attr_type
+{
+ STMT_ATTR_UPDATE_MAX_LENGTH,
+ STMT_ATTR_CURSOR_TYPE,
+ STMT_ATTR_PREFETCH_ROWS
+};
+MYSQL_STMT * mysql_stmt_init(MYSQL *mysql);
+int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
+ unsigned long length);
+int mysql_stmt_execute(MYSQL_STMT *stmt);
+int mysql_stmt_fetch(MYSQL_STMT *stmt);
+int mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg,
+ unsigned int column,
+ unsigned long offset);
+int mysql_stmt_store_result(MYSQL_STMT *stmt);
+unsigned long mysql_stmt_param_count(MYSQL_STMT * stmt);
+my_bool mysql_stmt_attr_set(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ const void *attr);
+my_bool mysql_stmt_attr_get(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ void *attr);
+my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool mysql_stmt_close(MYSQL_STMT * stmt);
+my_bool mysql_stmt_reset(MYSQL_STMT * stmt);
+my_bool mysql_stmt_free_result(MYSQL_STMT *stmt);
+my_bool mysql_stmt_send_long_data(MYSQL_STMT *stmt,
+ unsigned int param_number,
+ const char *data,
+ unsigned long length);
+MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT *stmt);
+MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT *stmt);
+unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
+const char * mysql_stmt_error(MYSQL_STMT * stmt);
+const char * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
+MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT *stmt,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT *stmt);
+void mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
+my_ulonglong mysql_stmt_num_rows(MYSQL_STMT *stmt);
+my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT *stmt);
+my_ulonglong mysql_stmt_insert_id(MYSQL_STMT *stmt);
+unsigned int mysql_stmt_field_count(MYSQL_STMT *stmt);
+my_bool mysql_commit(MYSQL * mysql);
+my_bool mysql_rollback(MYSQL * mysql);
+my_bool mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
+my_bool mysql_more_results(MYSQL *mysql);
+int mysql_next_result(MYSQL *mysql);
+int mysql_stmt_next_result(MYSQL_STMT *stmt);
+void mysql_close(MYSQL *sock);
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_authentication.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_authentication.h
new file mode 100644
index 000000000..8873bf16b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_authentication.h
@@ -0,0 +1,14 @@
+#ifndef CLIENT_AUTHENTICATION_H
+#define CLIENT_AUTHENTICATION_H
+#include
+#include "mysql.h"
+#include "mysql/client_plugin.h"
+
+C_MODE_START
+int sha256_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql);
+int sha256_password_init(char *, size_t, int, va_list);
+int sha256_password_deinit(void);
+C_MODE_END
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_plugin.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_plugin.h
new file mode 100644
index 000000000..9be9914a4
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_plugin.h
@@ -0,0 +1,162 @@
+#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED
+/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ @file
+
+ MySQL Client Plugin API
+
+ This file defines the API for plugins that work on the client side
+*/
+#define MYSQL_CLIENT_PLUGIN_INCLUDED
+
+#ifndef MYSQL_ABI_CHECK
+#include
+#include
+#endif
+
+/* known plugin types */
+#define MYSQL_CLIENT_reserved1 0
+#define MYSQL_CLIENT_reserved2 1
+#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2
+
+#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0100
+
+#define MYSQL_CLIENT_MAX_PLUGINS 3
+
+#define mysql_declare_client_plugin(X) \
+ MYSQL_PLUGIN_EXPORT struct st_mysql_client_plugin_ ## X \
+ _mysql_client_plugin_declaration_ = { \
+ MYSQL_CLIENT_ ## X ## _PLUGIN, \
+ MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
+#define mysql_end_client_plugin }
+
+/* generic plugin header structure */
+#define MYSQL_CLIENT_PLUGIN_HEADER \
+ int type; \
+ unsigned int interface_version; \
+ const char *name; \
+ const char *author; \
+ const char *desc; \
+ unsigned int version[3]; \
+ const char *license; \
+ void *mysql_api; \
+ int (*init)(char *, size_t, int, va_list); \
+ int (*deinit)(); \
+ int (*options)(const char *option, const void *);
+
+struct st_mysql_client_plugin
+{
+ MYSQL_CLIENT_PLUGIN_HEADER
+};
+
+struct st_mysql;
+
+/******** authentication plugin specific declarations *********/
+#include
+
+struct st_mysql_client_plugin_AUTHENTICATION
+{
+ MYSQL_CLIENT_PLUGIN_HEADER
+ int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
+};
+
+/******** using plugins ************/
+
+/**
+ loads a plugin and initializes it
+
+ @param mysql MYSQL structure.
+ @param name a name of the plugin to load
+ @param type type of plugin that should be loaded, -1 to disable type check
+ @param argc number of arguments to pass to the plugin initialization
+ function
+ @param ... arguments for the plugin initialization function
+
+ @retval
+ a pointer to the loaded plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
+ int argc, ...);
+
+/**
+ loads a plugin and initializes it, taking va_list as an argument
+
+ This is the same as mysql_load_plugin, but take va_list instead of
+ a list of arguments.
+
+ @param mysql MYSQL structure.
+ @param name a name of the plugin to load
+ @param type type of plugin that should be loaded, -1 to disable type check
+ @param argc number of arguments to pass to the plugin initialization
+ function
+ @param args arguments for the plugin initialization function
+
+ @retval
+ a pointer to the loaded plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
+ int argc, va_list args);
+
+/**
+ finds an already loaded plugin by name, or loads it, if necessary
+
+ @param mysql MYSQL structure.
+ @param name a name of the plugin to load
+ @param type type of plugin that should be loaded
+
+ @retval
+ a pointer to the plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
+
+/**
+ adds a plugin structure to the list of loaded plugins
+
+ This is useful if an application has the necessary functionality
+ (for example, a special load data handler) statically linked into
+ the application binary. It can use this function to register the plugin
+ directly, avoiding the need to factor it out into a shared object.
+
+ @param mysql MYSQL structure. It is only used for error reporting
+ @param plugin an st_mysql_client_plugin structure to register
+
+ @retval
+ a pointer to the plugin, or NULL in case of a failure
+*/
+struct st_mysql_client_plugin *
+mysql_client_register_plugin(struct st_mysql *mysql,
+ struct st_mysql_client_plugin *plugin);
+
+/**
+ set plugin options
+
+ Can be used to set extra options and affect behavior for a plugin.
+ This function may be called multiple times to set several options
+
+ @param plugin an st_mysql_client_plugin structure
+ @param option a string which specifies the option to set
+ @param value value for the option.
+
+ @retval 0 on success, 1 in case of failure
+**/
+int mysql_plugin_options(struct st_mysql_client_plugin *plugin,
+ const char *option, const void *value);
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_plugin.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_plugin.h.pp
new file mode 100644
index 000000000..93eaff750
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/client_plugin.h.pp
@@ -0,0 +1,39 @@
+struct st_mysql_client_plugin
+{
+ int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
+};
+struct st_mysql;
+#include
+typedef struct st_plugin_vio_info
+{
+ enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
+ MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
+ int socket;
+} MYSQL_PLUGIN_VIO_INFO;
+typedef struct st_plugin_vio
+{
+ int (*read_packet)(struct st_plugin_vio *vio,
+ unsigned char **buf);
+ int (*write_packet)(struct st_plugin_vio *vio,
+ const unsigned char *packet,
+ int packet_len);
+ void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
+} MYSQL_PLUGIN_VIO;
+struct st_mysql_client_plugin_AUTHENTICATION
+{
+ int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; const char *license; void *mysql_api; int (*init)(char *, size_t, int, va_list); int (*deinit)(); int (*options)(const char *option, const void *);
+ int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
+};
+struct st_mysql_client_plugin *
+mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
+ int argc, ...);
+struct st_mysql_client_plugin *
+mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
+ int argc, va_list args);
+struct st_mysql_client_plugin *
+mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
+struct st_mysql_client_plugin *
+mysql_client_register_plugin(struct st_mysql *mysql,
+ struct st_mysql_client_plugin *plugin);
+int mysql_plugin_options(struct st_mysql_client_plugin *plugin,
+ const char *option, const void *value);
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/get_password.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/get_password.h
new file mode 100644
index 000000000..a633c58c4
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/get_password.h
@@ -0,0 +1,36 @@
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+** Ask for a password from tty
+** This is an own file to avoid conflicts with curses
+*/
+
+#ifndef MYSQL_GET_PASSWORD_H_INCLUDED
+#define MYSQL_GET_PASSWORD_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef char *(* strdup_handler_t)(const char *, int);
+char *get_tty_password_ext(const char *opt_message,
+ strdup_handler_t strdup_function);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ! MYSQL_GET_PASSWORD_H_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/innodb_priv.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/innodb_priv.h
new file mode 100644
index 000000000..c19becd69
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/innodb_priv.h
@@ -0,0 +1,36 @@
+/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+#ifndef INNODB_PRIV_INCLUDED
+#define INNODB_PRIV_INCLUDED
+
+/** @file Declaring server-internal functions that are used by InnoDB. */
+
+#include
+
+class THD;
+
+int get_quote_char_for_identifier(THD *thd, const char *name, uint length);
+bool schema_table_store_record(THD *thd, TABLE *table);
+void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);
+bool check_global_access(THD *thd, ulong want_access);
+uint strconvert(CHARSET_INFO *from_cs, const char *from,
+ CHARSET_INFO *to_cs, char *to, uint to_length,
+ uint *errors);
+void sql_print_error(const char *format, ...);
+
+
+
+#endif /* INNODB_PRIV_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin.h
new file mode 100644
index 000000000..29f4311f8
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin.h
@@ -0,0 +1,676 @@
+/* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _my_plugin_h
+#define _my_plugin_h
+
+/*
+ On Windows, exports from DLL need to be declared
+ Also, plugin needs to be declared as extern "C" because MSVC
+ unlike other compilers, uses C++ mangling for variables not only
+ for functions.
+*/
+#if defined(_MSC_VER)
+#if defined(MYSQL_DYNAMIC_PLUGIN)
+ #ifdef __cplusplus
+ #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
+ #else
+ #define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
+ #endif
+#else /* MYSQL_DYNAMIC_PLUGIN */
+ #ifdef __cplusplus
+ #define MYSQL_PLUGIN_EXPORT extern "C"
+ #else
+ #define MYSQL_PLUGIN_EXPORT
+ #endif
+#endif /*MYSQL_DYNAMIC_PLUGIN */
+#else /*_MSC_VER */
+#define MYSQL_PLUGIN_EXPORT
+#endif
+
+#ifdef __cplusplus
+class THD;
+class Item;
+#define MYSQL_THD THD*
+#else
+#define MYSQL_THD void*
+#endif
+
+typedef void * MYSQL_PLUGIN;
+
+#include
+
+#define MYSQL_XIDDATASIZE 128
+/**
+ struct st_mysql_xid is binary compatible with the XID structure as
+ in the X/Open CAE Specification, Distributed Transaction Processing:
+ The XA Specification, X/Open Company Ltd., 1991.
+ http://www.opengroup.org/bookstore/catalog/c193.htm
+
+ @see XID in sql/handler.h
+*/
+struct st_mysql_xid {
+ long formatID;
+ long gtrid_length;
+ long bqual_length;
+ char data[MYSQL_XIDDATASIZE]; /* Not \0-terminated */
+};
+typedef struct st_mysql_xid MYSQL_XID;
+
+/*************************************************************************
+ Plugin API. Common for all plugin types.
+*/
+
+#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0104
+
+/*
+ The allowable types of plugins
+*/
+#define MYSQL_UDF_PLUGIN 0 /* User-defined function */
+#define MYSQL_STORAGE_ENGINE_PLUGIN 1 /* Storage Engine */
+#define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */
+#define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */
+#define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */
+#define MYSQL_AUDIT_PLUGIN 5 /* The Audit plugin type */
+#define MYSQL_REPLICATION_PLUGIN 6 /* The replication plugin type */
+#define MYSQL_AUTHENTICATION_PLUGIN 7 /* The authentication plugin type */
+#define MYSQL_VALIDATE_PASSWORD_PLUGIN 8 /* validate password plugin type */
+#define MYSQL_MAX_PLUGIN_TYPE_NUM 9 /* The number of plugin types */
+
+/* We use the following strings to define licenses for plugins */
+#define PLUGIN_LICENSE_PROPRIETARY 0
+#define PLUGIN_LICENSE_GPL 1
+#define PLUGIN_LICENSE_BSD 2
+
+#define PLUGIN_LICENSE_PROPRIETARY_STRING "PROPRIETARY"
+#define PLUGIN_LICENSE_GPL_STRING "GPL"
+#define PLUGIN_LICENSE_BSD_STRING "BSD"
+
+/*
+ Macros for beginning and ending plugin declarations. Between
+ mysql_declare_plugin and mysql_declare_plugin_end there should
+ be a st_mysql_plugin struct for each plugin to be declared.
+*/
+
+
+#ifndef MYSQL_DYNAMIC_PLUGIN
+#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+MYSQL_PLUGIN_EXPORT int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \
+MYSQL_PLUGIN_EXPORT int PSIZE= sizeof(struct st_mysql_plugin); \
+MYSQL_PLUGIN_EXPORT struct st_mysql_plugin DECLS[]= {
+#else
+#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \
+MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \
+MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= {
+#endif
+
+#define mysql_declare_plugin(NAME) \
+__MYSQL_DECLARE_PLUGIN(NAME, \
+ builtin_ ## NAME ## _plugin_interface_version, \
+ builtin_ ## NAME ## _sizeof_struct_st_plugin, \
+ builtin_ ## NAME ## _plugin)
+
+#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0,0}}
+
+/**
+ declarations for SHOW STATUS support in plugins
+*/
+enum enum_mysql_show_type
+{
+ SHOW_UNDEF, SHOW_BOOL,
+ SHOW_INT, ///< shown as _unsigned_ int
+ SHOW_LONG, ///< shown as _unsigned_ long
+ SHOW_LONGLONG, ///< shown as _unsigned_ longlong
+ SHOW_CHAR, SHOW_CHAR_PTR,
+ SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
+ SHOW_always_last
+};
+
+struct st_mysql_show_var {
+ const char *name;
+ char *value;
+ enum enum_mysql_show_type type;
+};
+
+#define SHOW_VAR_FUNC_BUFF_SIZE 1024
+typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *);
+
+
+/*
+ Constants for plugin flags.
+ */
+
+#define PLUGIN_OPT_NO_INSTALL 1UL /* Not dynamically loadable */
+#define PLUGIN_OPT_NO_UNINSTALL 2UL /* Not dynamically unloadable */
+
+
+/*
+ declarations for server variables and command line options
+*/
+
+
+#define PLUGIN_VAR_BOOL 0x0001
+#define PLUGIN_VAR_INT 0x0002
+#define PLUGIN_VAR_LONG 0x0003
+#define PLUGIN_VAR_LONGLONG 0x0004
+#define PLUGIN_VAR_STR 0x0005
+#define PLUGIN_VAR_ENUM 0x0006
+#define PLUGIN_VAR_SET 0x0007
+#define PLUGIN_VAR_DOUBLE 0x0008
+#define PLUGIN_VAR_UNSIGNED 0x0080
+#define PLUGIN_VAR_THDLOCAL 0x0100 /* Variable is per-connection */
+#define PLUGIN_VAR_READONLY 0x0200 /* Server variable is read only */
+#define PLUGIN_VAR_NOSYSVAR 0x0400 /* Not a server variable */
+#define PLUGIN_VAR_NOCMDOPT 0x0800 /* Not a command line option */
+#define PLUGIN_VAR_NOCMDARG 0x1000 /* No argument for cmd line */
+#define PLUGIN_VAR_RQCMDARG 0x0000 /* Argument required for cmd line */
+#define PLUGIN_VAR_OPCMDARG 0x2000 /* Argument optional for cmd line */
+#define PLUGIN_VAR_MEMALLOC 0x8000 /* String needs memory allocated */
+
+struct st_mysql_sys_var;
+struct st_mysql_value;
+
+/*
+ SYNOPSIS
+ (*mysql_var_check_func)()
+ thd thread handle
+ var dynamic variable being altered
+ save pointer to temporary storage
+ value user provided value
+ RETURN
+ 0 user provided value is OK and the update func may be called.
+ any other value indicates error.
+
+ This function should parse the user provided value and store in the
+ provided temporary storage any data as required by the update func.
+ There is sufficient space in the temporary storage to store a double.
+ Note that the update func may not be called if any other error occurs
+ so any memory allocated should be thread-local so that it may be freed
+ automatically at the end of the statement.
+*/
+
+typedef int (*mysql_var_check_func)(MYSQL_THD thd,
+ struct st_mysql_sys_var *var,
+ void *save, struct st_mysql_value *value);
+
+/*
+ SYNOPSIS
+ (*mysql_var_update_func)()
+ thd thread handle
+ var dynamic variable being altered
+ var_ptr pointer to dynamic variable
+ save pointer to temporary storage
+ RETURN
+ NONE
+
+ This function should use the validated value stored in the temporary store
+ and persist it in the provided pointer to the dynamic variable.
+ For example, strings may require memory to be allocated.
+*/
+typedef void (*mysql_var_update_func)(MYSQL_THD thd,
+ struct st_mysql_sys_var *var,
+ void *var_ptr, const void *save);
+
+
+/* the following declarations are for internal use only */
+
+
+#define PLUGIN_VAR_MASK \
+ (PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR | \
+ PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_NOCMDARG | \
+ PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC)
+
+#define MYSQL_PLUGIN_VAR_HEADER \
+ int flags; \
+ const char *name; \
+ const char *comment; \
+ mysql_var_check_func check; \
+ mysql_var_update_func update
+
+#define MYSQL_SYSVAR_NAME(name) mysql_sysvar_ ## name
+#define MYSQL_SYSVAR(name) \
+ ((struct st_mysql_sys_var *)&(MYSQL_SYSVAR_NAME(name)))
+
+/*
+ for global variables, the value pointer is the first
+ element after the header, the default value is the second.
+ for thread variables, the value offset is the first
+ element after the header, the default value is the second.
+*/
+
+
+#define DECLARE_MYSQL_SYSVAR_BASIC(name, type) struct { \
+ MYSQL_PLUGIN_VAR_HEADER; \
+ type *value; \
+ const type def_val; \
+} MYSQL_SYSVAR_NAME(name)
+
+#define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \
+ MYSQL_PLUGIN_VAR_HEADER; \
+ type *value; type def_val; \
+ type min_val; type max_val; \
+ type blk_sz; \
+} MYSQL_SYSVAR_NAME(name)
+
+#define DECLARE_MYSQL_SYSVAR_TYPELIB(name, type) struct { \
+ MYSQL_PLUGIN_VAR_HEADER; \
+ type *value; type def_val; \
+ TYPELIB *typelib; \
+} MYSQL_SYSVAR_NAME(name)
+
+#define DECLARE_THDVAR_FUNC(type) \
+ type *(*resolve)(MYSQL_THD thd, int offset)
+
+#define DECLARE_MYSQL_THDVAR_BASIC(name, type) struct { \
+ MYSQL_PLUGIN_VAR_HEADER; \
+ int offset; \
+ const type def_val; \
+ DECLARE_THDVAR_FUNC(type); \
+} MYSQL_SYSVAR_NAME(name)
+
+#define DECLARE_MYSQL_THDVAR_SIMPLE(name, type) struct { \
+ MYSQL_PLUGIN_VAR_HEADER; \
+ int offset; \
+ type def_val; type min_val; \
+ type max_val; type blk_sz; \
+ DECLARE_THDVAR_FUNC(type); \
+} MYSQL_SYSVAR_NAME(name)
+
+#define DECLARE_MYSQL_THDVAR_TYPELIB(name, type) struct { \
+ MYSQL_PLUGIN_VAR_HEADER; \
+ int offset; \
+ type def_val; \
+ DECLARE_THDVAR_FUNC(type); \
+ TYPELIB *typelib; \
+} MYSQL_SYSVAR_NAME(name)
+
+
+/*
+ the following declarations are for use by plugin implementors
+*/
+
+#define MYSQL_SYSVAR_BOOL(name, varname, opt, comment, check, update, def) \
+DECLARE_MYSQL_SYSVAR_BASIC(name, char) = { \
+ PLUGIN_VAR_BOOL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def}
+
+#define MYSQL_SYSVAR_STR(name, varname, opt, comment, check, update, def) \
+DECLARE_MYSQL_SYSVAR_BASIC(name, char *) = { \
+ PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def}
+
+#define MYSQL_SYSVAR_INT(name, varname, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_SYSVAR_SIMPLE(name, int) = { \
+ PLUGIN_VAR_INT | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, min, max, blk }
+
+#define MYSQL_SYSVAR_UINT(name, varname, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned int) = { \
+ PLUGIN_VAR_INT | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, min, max, blk }
+
+#define MYSQL_SYSVAR_LONG(name, varname, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_SYSVAR_SIMPLE(name, long) = { \
+ PLUGIN_VAR_LONG | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, min, max, blk }
+
+#define MYSQL_SYSVAR_ULONG(name, varname, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long) = { \
+ PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, min, max, blk }
+
+#define MYSQL_SYSVAR_LONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_SYSVAR_SIMPLE(name, long long) = { \
+ PLUGIN_VAR_LONGLONG | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, min, max, blk }
+
+#define MYSQL_SYSVAR_ULONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
+ PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, min, max, blk }
+
+#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
+DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
+ PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, typelib }
+
+#define MYSQL_SYSVAR_SET(name, varname, opt, comment, check, update, def, typelib) \
+DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long long) = { \
+ PLUGIN_VAR_SET | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, typelib }
+
+#define MYSQL_SYSVAR_DOUBLE(name, varname, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_SYSVAR_SIMPLE(name, double) = { \
+ PLUGIN_VAR_DOUBLE | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def, min, max, blk }
+
+#define MYSQL_THDVAR_BOOL(name, opt, comment, check, update, def) \
+DECLARE_MYSQL_THDVAR_BASIC(name, char) = { \
+ PLUGIN_VAR_BOOL | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, NULL}
+
+#define MYSQL_THDVAR_STR(name, opt, comment, check, update, def) \
+DECLARE_MYSQL_THDVAR_BASIC(name, char *) = { \
+ PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, NULL}
+
+#define MYSQL_THDVAR_INT(name, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_THDVAR_SIMPLE(name, int) = { \
+ PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, min, max, blk, NULL }
+
+#define MYSQL_THDVAR_UINT(name, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned int) = { \
+ PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, min, max, blk, NULL }
+
+#define MYSQL_THDVAR_LONG(name, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_THDVAR_SIMPLE(name, long) = { \
+ PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, min, max, blk, NULL }
+
+#define MYSQL_THDVAR_ULONG(name, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned long) = { \
+ PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, min, max, blk, NULL }
+
+#define MYSQL_THDVAR_LONGLONG(name, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_THDVAR_SIMPLE(name, long long) = { \
+ PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, min, max, blk, NULL }
+
+#define MYSQL_THDVAR_ULONGLONG(name, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned long long) = { \
+ PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, min, max, blk, NULL }
+
+#define MYSQL_THDVAR_ENUM(name, opt, comment, check, update, def, typelib) \
+DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long) = { \
+ PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, NULL, typelib }
+
+#define MYSQL_THDVAR_SET(name, opt, comment, check, update, def, typelib) \
+DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long long) = { \
+ PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, NULL, typelib }
+
+#define MYSQL_THDVAR_DOUBLE(name, opt, comment, check, update, def, min, max, blk) \
+DECLARE_MYSQL_THDVAR_SIMPLE(name, double) = { \
+ PLUGIN_VAR_DOUBLE | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, -1, def, min, max, blk, NULL }
+
+/* accessor macros */
+
+#define SYSVAR(name) \
+ (*(MYSQL_SYSVAR_NAME(name).value))
+
+/* when thd == null, result points to global value */
+#define THDVAR(thd, name) \
+ (*(MYSQL_SYSVAR_NAME(name).resolve(thd, MYSQL_SYSVAR_NAME(name).offset)))
+
+
+/*
+ Plugin description structure.
+*/
+
+struct st_mysql_plugin
+{
+ int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
+ void *info; /* pointer to type-specific plugin descriptor */
+ const char *name; /* plugin name */
+ const char *author; /* plugin author (for I_S.PLUGINS) */
+ const char *descr; /* general descriptive text (for I_S.PLUGINS) */
+ int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
+ int (*init)(MYSQL_PLUGIN); /* the function to invoke when plugin is loaded */
+ int (*deinit)(MYSQL_PLUGIN);/* the function to invoke when plugin is unloaded */
+ unsigned int version; /* plugin version (for I_S.PLUGINS) */
+ struct st_mysql_show_var *status_vars;
+ struct st_mysql_sys_var **system_vars;
+ void * __reserved1; /* reserved for dependency checking */
+ unsigned long flags; /* flags for plugin */
+};
+
+/*************************************************************************
+ API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
+*/
+#include "plugin_ftparser.h"
+
+/*************************************************************************
+ API for Storage Engine plugin. (MYSQL_DAEMON_PLUGIN)
+*/
+
+/* handlertons of different MySQL releases are incompatible */
+#define MYSQL_DAEMON_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
+
+/*
+ Here we define only the descriptor structure, that is referred from
+ st_mysql_plugin.
+*/
+
+struct st_mysql_daemon
+{
+ int interface_version;
+};
+
+
+/*************************************************************************
+ API for I_S plugin. (MYSQL_INFORMATION_SCHEMA_PLUGIN)
+*/
+
+/* handlertons of different MySQL releases are incompatible */
+#define MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
+
+/*
+ Here we define only the descriptor structure, that is referred from
+ st_mysql_plugin.
+*/
+
+struct st_mysql_information_schema
+{
+ int interface_version;
+};
+
+
+/*************************************************************************
+ API for Storage Engine plugin. (MYSQL_STORAGE_ENGINE_PLUGIN)
+*/
+
+/* handlertons of different MySQL releases are incompatible */
+#define MYSQL_HANDLERTON_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
+
+/*
+ The real API is in the sql/handler.h
+ Here we define only the descriptor structure, that is referred from
+ st_mysql_plugin.
+*/
+
+struct st_mysql_storage_engine
+{
+ int interface_version;
+};
+
+struct handlerton;
+
+
+/*
+ API for Replication plugin. (MYSQL_REPLICATION_PLUGIN)
+*/
+ #define MYSQL_REPLICATION_INTERFACE_VERSION 0x0200
+
+ /**
+ Replication plugin descriptor
+ */
+ struct Mysql_replication {
+ int interface_version;
+ };
+
+/*************************************************************************
+ st_mysql_value struct for reading values from mysqld.
+ Used by server variables framework to parse user-provided values.
+ Will be used for arguments when implementing UDFs.
+
+ Note that val_str() returns a string in temporary memory
+ that will be freed at the end of statement. Copy the string
+ if you need it to persist.
+*/
+
+#define MYSQL_VALUE_TYPE_STRING 0
+#define MYSQL_VALUE_TYPE_REAL 1
+#define MYSQL_VALUE_TYPE_INT 2
+
+struct st_mysql_value
+{
+ int (*value_type)(struct st_mysql_value *);
+ const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
+ int (*val_real)(struct st_mysql_value *, double *realbuf);
+ int (*val_int)(struct st_mysql_value *, long long *intbuf);
+ int (*is_unsigned)(struct st_mysql_value *);
+};
+
+
+/*************************************************************************
+ Miscellaneous functions for plugin implementors
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int thd_in_lock_tables(const MYSQL_THD thd);
+int thd_tablespace_op(const MYSQL_THD thd);
+long long thd_test_options(const MYSQL_THD thd, long long test_options);
+int thd_sql_command(const MYSQL_THD thd);
+const char *thd_proc_info(MYSQL_THD thd, const char *info);
+void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
+void thd_storage_lock_wait(MYSQL_THD thd, long long value);
+int thd_tx_isolation(const MYSQL_THD thd);
+int thd_tx_is_read_only(const MYSQL_THD thd);
+char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length,
+ unsigned int max_query_len);
+/* Increments the row counter, see THD::row_count */
+void thd_inc_row_count(MYSQL_THD thd);
+int thd_allow_batch(MYSQL_THD thd);
+
+/**
+ Create a temporary file.
+
+ @details
+ The temporary file is created in a location specified by the mysql
+ server configuration (--tmpdir option). The caller does not need to
+ delete the file, it will be deleted automatically.
+
+ @param prefix prefix for temporary file name
+ @retval -1 error
+ @retval >= 0 a file handle that can be passed to dup or my_close
+*/
+int mysql_tmpfile(const char *prefix);
+
+/**
+ Check the killed state of a connection
+
+ @details
+ In MySQL support for the KILL statement is cooperative. The KILL
+ statement only sets a "killed" flag. This function returns the value
+ of that flag. A thread should check it often, especially inside
+ time-consuming loops, and gracefully abort the operation if it is
+ non-zero.
+
+ @param thd user thread connection handle
+ @retval 0 the connection is active
+ @retval 1 the connection has been killed
+*/
+int thd_killed(const MYSQL_THD thd);
+
+
+/**
+ Get binary log position for latest written entry.
+
+ @note The file variable will be set to a buffer holding the name of
+ the file name currently, but this can change if a rotation
+ occur. Copy the string if you want to retain it.
+
+ @param thd Use thread connection handle
+ @param file_var Pointer to variable that will hold the file name.
+ @param pos_var Pointer to variable that will hold the file position.
+ */
+void thd_binlog_pos(const MYSQL_THD thd,
+ const char **file_var,
+ unsigned long long *pos_var);
+
+/**
+ Return the thread id of a user thread
+
+ @param thd user thread connection handle
+ @return thread id
+*/
+unsigned long thd_get_thread_id(const MYSQL_THD thd);
+
+/**
+ Get the XID for this connection's transaction
+
+ @param thd user thread connection handle
+ @param xid location where identifier is stored
+*/
+void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid);
+
+/**
+ Invalidate the query cache for a given table.
+
+ @param thd user thread connection handle
+ @param key databasename\\0tablename\\0
+ @param key_length length of key in bytes, including the NUL bytes
+ @param using_trx flag: TRUE if using transactions, FALSE otherwise
+*/
+void mysql_query_cache_invalidate4(MYSQL_THD thd,
+ const char *key, unsigned int key_length,
+ int using_trx);
+
+
+/**
+ Provide a handler data getter to simplify coding
+*/
+void *thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
+
+
+/**
+ Provide a handler data setter to simplify coding
+
+ @details
+ Set ha_data pointer (storage engine per-connection information).
+
+ To avoid unclean deactivation (uninstall) of storage engine plugin
+ in the middle of transaction, additional storage engine plugin
+ lock is acquired.
+
+ If ha_data is not null and storage engine plugin was not locked
+ by thd_set_ha_data() in this connection before, storage engine
+ plugin gets locked.
+
+ If ha_data is null and storage engine plugin was locked by
+ thd_set_ha_data() in this connection before, storage engine
+ plugin lock gets released.
+
+ If handlerton::close_connection() didn't reset ha_data, server does
+ it immediately after calling handlerton::close_connection().
+*/
+void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton,
+ const void *ha_data);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_audit.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_audit.h
new file mode 100644
index 000000000..0d3f9b8d1
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_audit.h
@@ -0,0 +1,132 @@
+/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _my_audit_h
+#define _my_audit_h
+
+/*************************************************************************
+ API for Audit plugin. (MYSQL_AUDIT_PLUGIN)
+*/
+
+#include "plugin.h"
+
+#define MYSQL_AUDIT_CLASS_MASK_SIZE 1
+
+#define MYSQL_AUDIT_INTERFACE_VERSION 0x0301
+
+
+/*************************************************************************
+ AUDIT CLASS : GENERAL
+
+ LOG events occurs before emitting to the general query log.
+ ERROR events occur before transmitting errors to the user.
+ RESULT events occur after transmitting a resultset to the user.
+ STATUS events occur after transmitting a resultset or errors
+ to the user.
+*/
+
+#define MYSQL_AUDIT_GENERAL_CLASS 0
+#define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS)
+#define MYSQL_AUDIT_GENERAL_LOG 0
+#define MYSQL_AUDIT_GENERAL_ERROR 1
+#define MYSQL_AUDIT_GENERAL_RESULT 2
+#define MYSQL_AUDIT_GENERAL_STATUS 3
+
+struct mysql_event_general
+{
+ unsigned int event_subclass;
+ int general_error_code;
+ unsigned long general_thread_id;
+ const char *general_user;
+ unsigned int general_user_length;
+ const char *general_command;
+ unsigned int general_command_length;
+ const char *general_query;
+ unsigned int general_query_length;
+ struct charset_info_st *general_charset;
+ unsigned long long general_time;
+ unsigned long long general_rows;
+ MYSQL_LEX_STRING general_host;
+ MYSQL_LEX_STRING general_sql_command;
+ MYSQL_LEX_STRING general_external_user;
+ MYSQL_LEX_STRING general_ip;
+};
+
+
+/*
+ AUDIT CLASS : CONNECTION
+
+ CONNECT occurs after authentication phase is completed.
+ DISCONNECT occurs after connection is terminated.
+ CHANGE_USER occurs after COM_CHANGE_USER RPC is completed.
+*/
+
+#define MYSQL_AUDIT_CONNECTION_CLASS 1
+#define MYSQL_AUDIT_CONNECTION_CLASSMASK (1 << MYSQL_AUDIT_CONNECTION_CLASS)
+#define MYSQL_AUDIT_CONNECTION_CONNECT 0
+#define MYSQL_AUDIT_CONNECTION_DISCONNECT 1
+#define MYSQL_AUDIT_CONNECTION_CHANGE_USER 2
+
+struct mysql_event_connection
+{
+ unsigned int event_subclass;
+ int status;
+ unsigned long thread_id;
+ const char *user;
+ unsigned int user_length;
+ const char *priv_user;
+ unsigned int priv_user_length;
+ const char *external_user;
+ unsigned int external_user_length;
+ const char *proxy_user;
+ unsigned int proxy_user_length;
+ const char *host;
+ unsigned int host_length;
+ const char *ip;
+ unsigned int ip_length;
+ const char *database;
+ unsigned int database_length;
+};
+
+
+/*************************************************************************
+ Here we define the descriptor structure, that is referred from
+ st_mysql_plugin.
+
+ release_thd() event occurs when the event class consumer is to be
+ disassociated from the specified THD. This would typically occur
+ before some operation which may require sleeping - such as when
+ waiting for the next query from the client.
+
+ event_notify() is invoked whenever an event occurs which is of any
+ class for which the plugin has interest. The second argument
+ indicates the specific event class and the third argument is data
+ as required for that class.
+
+ class_mask is an array of bits used to indicate what event classes
+ that this plugin wants to receive.
+*/
+
+struct st_mysql_audit
+{
+ int interface_version;
+ void (*release_thd)(MYSQL_THD);
+ void (*event_notify)(MYSQL_THD, unsigned int, const void *);
+ unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE];
+};
+
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_audit.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_audit.h.pp
new file mode 100644
index 000000000..41f240546
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_audit.h.pp
@@ -0,0 +1,295 @@
+#include "plugin.h"
+typedef void * MYSQL_PLUGIN;
+#include
+#include
+extern struct my_snprintf_service_st {
+ size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
+ size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
+} *my_snprintf_service;
+size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
+size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
+#include
+struct st_mysql_lex_string
+{
+ char *str;
+ size_t length;
+};
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+extern struct thd_alloc_service_st {
+ void *(*thd_alloc_func)(void*, unsigned int);
+ void *(*thd_calloc_func)(void*, unsigned int);
+ char *(*thd_strdup_func)(void*, const char *);
+ char *(*thd_strmake_func)(void*, const char *, unsigned int);
+ void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
+ const char *, unsigned int, int);
+} *thd_alloc_service;
+void *thd_alloc(void* thd, unsigned int size);
+void *thd_calloc(void* thd, unsigned int size);
+char *thd_strdup(void* thd, const char *str);
+char *thd_strmake(void* thd, const char *str, unsigned int size);
+void *thd_memdup(void* thd, const void* str, unsigned int size);
+MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
+ const char *str, unsigned int size,
+ int allocate_lex_string);
+#include
+typedef enum _thd_wait_type_e {
+ THD_WAIT_SLEEP= 1,
+ THD_WAIT_DISKIO= 2,
+ THD_WAIT_ROW_LOCK= 3,
+ THD_WAIT_GLOBAL_LOCK= 4,
+ THD_WAIT_META_DATA_LOCK= 5,
+ THD_WAIT_TABLE_LOCK= 6,
+ THD_WAIT_USER_LOCK= 7,
+ THD_WAIT_BINLOG= 8,
+ THD_WAIT_GROUP_COMMIT= 9,
+ THD_WAIT_SYNC= 10,
+ THD_WAIT_LAST= 11
+} thd_wait_type;
+extern struct thd_wait_service_st {
+ void (*thd_wait_begin_func)(void*, int);
+ void (*thd_wait_end_func)(void*);
+} *thd_wait_service;
+void thd_wait_begin(void* thd, int wait_type);
+void thd_wait_end(void* thd);
+#include
+struct scheduler_functions;
+extern struct my_thread_scheduler_service {
+ int (*set)(struct scheduler_functions *scheduler);
+ int (*reset)();
+} *my_thread_scheduler_service;
+int my_thread_scheduler_set(struct scheduler_functions *scheduler);
+int my_thread_scheduler_reset();
+#include
+enum plugin_log_level
+{
+ MY_ERROR_LEVEL,
+ MY_WARNING_LEVEL,
+ MY_INFORMATION_LEVEL
+};
+extern struct my_plugin_log_service
+{
+ int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+ const char *format, ...);
+#include
+typedef void *mysql_string_iterator_handle;
+typedef void *mysql_string_handle;
+extern struct mysql_string_service_st {
+ int (*mysql_string_convert_to_char_ptr_type)
+ (mysql_string_handle, const char *, char *, unsigned int, int *);
+ mysql_string_iterator_handle (*mysql_string_get_iterator_type)
+ (mysql_string_handle);
+ int (*mysql_string_iterator_next_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isupper_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_islower_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isdigit_type)(mysql_string_iterator_handle);
+ mysql_string_handle (*mysql_string_to_lowercase_type)(mysql_string_handle);
+ void (*mysql_string_free_type)(mysql_string_handle);
+ void (*mysql_string_iterator_free_type)(mysql_string_iterator_handle);
+} *mysql_string_service;
+int mysql_string_convert_to_char_ptr(mysql_string_handle string_handle,
+ const char *charset_name, char *buffer,
+ unsigned int buffer_size, int *error);
+mysql_string_iterator_handle mysql_string_get_iterator(mysql_string_handle
+ string_handle);
+int mysql_string_iterator_next(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_isupper(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_islower(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_isdigit(mysql_string_iterator_handle iterator_handle);
+mysql_string_handle mysql_string_to_lowercase(mysql_string_handle
+ string_handle);
+void mysql_string_free(mysql_string_handle);
+void mysql_string_iterator_free(mysql_string_iterator_handle);
+struct st_mysql_xid {
+ long formatID;
+ long gtrid_length;
+ long bqual_length;
+ char data[128];
+};
+typedef struct st_mysql_xid MYSQL_XID;
+enum enum_mysql_show_type
+{
+ SHOW_UNDEF, SHOW_BOOL,
+ SHOW_INT,
+ SHOW_LONG,
+ SHOW_LONGLONG,
+ SHOW_CHAR, SHOW_CHAR_PTR,
+ SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
+ SHOW_always_last
+};
+struct st_mysql_show_var {
+ const char *name;
+ char *value;
+ enum enum_mysql_show_type type;
+};
+typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *);
+struct st_mysql_sys_var;
+struct st_mysql_value;
+typedef int (*mysql_var_check_func)(void* thd,
+ struct st_mysql_sys_var *var,
+ void *save, struct st_mysql_value *value);
+typedef void (*mysql_var_update_func)(void* thd,
+ struct st_mysql_sys_var *var,
+ void *var_ptr, const void *save);
+struct st_mysql_plugin
+{
+ int type;
+ void *info;
+ const char *name;
+ const char *author;
+ const char *descr;
+ int license;
+ int (*init)(MYSQL_PLUGIN);
+ int (*deinit)(MYSQL_PLUGIN);
+ unsigned int version;
+ struct st_mysql_show_var *status_vars;
+ struct st_mysql_sys_var **system_vars;
+ void * __reserved1;
+ unsigned long flags;
+};
+#include "plugin_ftparser.h"
+#include "plugin.h"
+enum enum_ftparser_mode
+{
+ MYSQL_FTPARSER_SIMPLE_MODE= 0,
+ MYSQL_FTPARSER_WITH_STOPWORDS= 1,
+ MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
+};
+enum enum_ft_token_type
+{
+ FT_TOKEN_EOF= 0,
+ FT_TOKEN_WORD= 1,
+ FT_TOKEN_LEFT_PAREN= 2,
+ FT_TOKEN_RIGHT_PAREN= 3,
+ FT_TOKEN_STOPWORD= 4
+};
+typedef struct st_mysql_ftparser_boolean_info
+{
+ enum enum_ft_token_type type;
+ int yesno;
+ int weight_adjust;
+ char wasign;
+ char trunc;
+ char prev;
+ char *quot;
+} MYSQL_FTPARSER_BOOLEAN_INFO;
+typedef struct st_mysql_ftparser_param
+{
+ int (*mysql_parse)(struct st_mysql_ftparser_param *,
+ char *doc, int doc_len);
+ int (*mysql_add_word)(struct st_mysql_ftparser_param *,
+ char *word, int word_len,
+ MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
+ void *ftparser_state;
+ void *mysql_ftparam;
+ const struct charset_info_st *cs;
+ char *doc;
+ int length;
+ int flags;
+ enum enum_ftparser_mode mode;
+} MYSQL_FTPARSER_PARAM;
+struct st_mysql_ftparser
+{
+ int interface_version;
+ int (*parse)(MYSQL_FTPARSER_PARAM *param);
+ int (*init)(MYSQL_FTPARSER_PARAM *param);
+ int (*deinit)(MYSQL_FTPARSER_PARAM *param);
+};
+struct st_mysql_daemon
+{
+ int interface_version;
+};
+struct st_mysql_information_schema
+{
+ int interface_version;
+};
+struct st_mysql_storage_engine
+{
+ int interface_version;
+};
+struct handlerton;
+ struct Mysql_replication {
+ int interface_version;
+ };
+struct st_mysql_value
+{
+ int (*value_type)(struct st_mysql_value *);
+ const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
+ int (*val_real)(struct st_mysql_value *, double *realbuf);
+ int (*val_int)(struct st_mysql_value *, long long *intbuf);
+ int (*is_unsigned)(struct st_mysql_value *);
+};
+int thd_in_lock_tables(const void* thd);
+int thd_tablespace_op(const void* thd);
+long long thd_test_options(const void* thd, long long test_options);
+int thd_sql_command(const void* thd);
+const char *thd_proc_info(void* thd, const char *info);
+void **thd_ha_data(const void* thd, const struct handlerton *hton);
+void thd_storage_lock_wait(void* thd, long long value);
+int thd_tx_isolation(const void* thd);
+int thd_tx_is_read_only(const void* thd);
+char *thd_security_context(void* thd, char *buffer, unsigned int length,
+ unsigned int max_query_len);
+void thd_inc_row_count(void* thd);
+int thd_allow_batch(void* thd);
+int mysql_tmpfile(const char *prefix);
+int thd_killed(const void* thd);
+void thd_binlog_pos(const void* thd,
+ const char **file_var,
+ unsigned long long *pos_var);
+unsigned long thd_get_thread_id(const void* thd);
+void thd_get_xid(const void* thd, MYSQL_XID *xid);
+void mysql_query_cache_invalidate4(void* thd,
+ const char *key, unsigned int key_length,
+ int using_trx);
+void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
+void thd_set_ha_data(void* thd, const struct handlerton *hton,
+ const void *ha_data);
+struct mysql_event_general
+{
+ unsigned int event_subclass;
+ int general_error_code;
+ unsigned long general_thread_id;
+ const char *general_user;
+ unsigned int general_user_length;
+ const char *general_command;
+ unsigned int general_command_length;
+ const char *general_query;
+ unsigned int general_query_length;
+ struct charset_info_st *general_charset;
+ unsigned long long general_time;
+ unsigned long long general_rows;
+ MYSQL_LEX_STRING general_host;
+ MYSQL_LEX_STRING general_sql_command;
+ MYSQL_LEX_STRING general_external_user;
+ MYSQL_LEX_STRING general_ip;
+};
+struct mysql_event_connection
+{
+ unsigned int event_subclass;
+ int status;
+ unsigned long thread_id;
+ const char *user;
+ unsigned int user_length;
+ const char *priv_user;
+ unsigned int priv_user_length;
+ const char *external_user;
+ unsigned int external_user_length;
+ const char *proxy_user;
+ unsigned int proxy_user_length;
+ const char *host;
+ unsigned int host_length;
+ const char *ip;
+ unsigned int ip_length;
+ const char *database;
+ unsigned int database_length;
+};
+struct st_mysql_audit
+{
+ int interface_version;
+ void (*release_thd)(void*);
+ void (*event_notify)(void*, unsigned int, const void *);
+ unsigned long class_mask[1];
+};
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth.h
new file mode 100644
index 000000000..fc661de17
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth.h
@@ -0,0 +1,125 @@
+#ifndef MYSQL_PLUGIN_AUTH_INCLUDED
+/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ @file
+
+ Authentication Plugin API.
+
+ This file defines the API for server authentication plugins.
+*/
+
+#define MYSQL_PLUGIN_AUTH_INCLUDED
+
+#include
+
+#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0100
+
+#include
+
+/* defines for MYSQL_SERVER_AUTH_INFO.password_used */
+
+#define PASSWORD_USED_NO 0
+#define PASSWORD_USED_YES 1
+#define PASSWORD_USED_NO_MENTION 2
+
+
+/**
+ Provides server plugin access to authentication information
+*/
+typedef struct st_mysql_server_auth_info
+{
+ /**
+ User name as sent by the client and shown in USER().
+ NULL if the client packet with the user name was not received yet.
+ */
+ char *user_name;
+
+ /**
+ Length of user_name
+ */
+ unsigned int user_name_length;
+
+ /**
+ A corresponding column value from the mysql.user table for the
+ matching account name
+ */
+ const char *auth_string;
+
+ /**
+ Length of auth_string
+ */
+ unsigned long auth_string_length;
+
+ /**
+ Matching account name as found in the mysql.user table.
+ A plugin can override it with another name that will be
+ used by MySQL for authorization, and shown in CURRENT_USER()
+ */
+ char authenticated_as[MYSQL_USERNAME_LENGTH+1];
+
+
+ /**
+ The unique user name that was used by the plugin to authenticate.
+ Plugins should put null-terminated UTF-8 here.
+ Available through the @@EXTERNAL_USER variable.
+ */
+ char external_user[512];
+
+ /**
+ This only affects the "Authentication failed. Password used: %s"
+ error message. has the following values :
+ 0 : %s will be NO.
+ 1 : %s will be YES.
+ 2 : there will be no %s.
+ Set it as appropriate or ignore at will.
+ */
+ int password_used;
+
+ /**
+ Set to the name of the connected client host, if it can be resolved,
+ or to its IP address otherwise.
+ */
+ const char *host_or_ip;
+
+ /**
+ Length of host_or_ip
+ */
+ unsigned int host_or_ip_length;
+
+} MYSQL_SERVER_AUTH_INFO;
+
+/**
+ Server authentication plugin descriptor
+*/
+struct st_mysql_auth
+{
+ int interface_version; /** version plugin uses */
+ /**
+ A plugin that a client must use for authentication with this server
+ plugin. Can be NULL to mean "any plugin".
+ */
+ const char *client_auth_plugin;
+ /**
+ Function provided by the plugin which should perform authentication (using
+ the vio functions if necessary) and return 0 if successful. The plugin can
+ also fill the info.authenticated_as field if a different username should be
+ used for authorization.
+ */
+ int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
+};
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth.h.pp
new file mode 100644
index 000000000..44049322c
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth.h.pp
@@ -0,0 +1,283 @@
+#include
+typedef void * MYSQL_PLUGIN;
+#include
+#include
+extern struct my_snprintf_service_st {
+ size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
+ size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
+} *my_snprintf_service;
+size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
+size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
+#include
+struct st_mysql_lex_string
+{
+ char *str;
+ size_t length;
+};
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+extern struct thd_alloc_service_st {
+ void *(*thd_alloc_func)(void*, unsigned int);
+ void *(*thd_calloc_func)(void*, unsigned int);
+ char *(*thd_strdup_func)(void*, const char *);
+ char *(*thd_strmake_func)(void*, const char *, unsigned int);
+ void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
+ const char *, unsigned int, int);
+} *thd_alloc_service;
+void *thd_alloc(void* thd, unsigned int size);
+void *thd_calloc(void* thd, unsigned int size);
+char *thd_strdup(void* thd, const char *str);
+char *thd_strmake(void* thd, const char *str, unsigned int size);
+void *thd_memdup(void* thd, const void* str, unsigned int size);
+MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
+ const char *str, unsigned int size,
+ int allocate_lex_string);
+#include
+typedef enum _thd_wait_type_e {
+ THD_WAIT_SLEEP= 1,
+ THD_WAIT_DISKIO= 2,
+ THD_WAIT_ROW_LOCK= 3,
+ THD_WAIT_GLOBAL_LOCK= 4,
+ THD_WAIT_META_DATA_LOCK= 5,
+ THD_WAIT_TABLE_LOCK= 6,
+ THD_WAIT_USER_LOCK= 7,
+ THD_WAIT_BINLOG= 8,
+ THD_WAIT_GROUP_COMMIT= 9,
+ THD_WAIT_SYNC= 10,
+ THD_WAIT_LAST= 11
+} thd_wait_type;
+extern struct thd_wait_service_st {
+ void (*thd_wait_begin_func)(void*, int);
+ void (*thd_wait_end_func)(void*);
+} *thd_wait_service;
+void thd_wait_begin(void* thd, int wait_type);
+void thd_wait_end(void* thd);
+#include
+struct scheduler_functions;
+extern struct my_thread_scheduler_service {
+ int (*set)(struct scheduler_functions *scheduler);
+ int (*reset)();
+} *my_thread_scheduler_service;
+int my_thread_scheduler_set(struct scheduler_functions *scheduler);
+int my_thread_scheduler_reset();
+#include
+enum plugin_log_level
+{
+ MY_ERROR_LEVEL,
+ MY_WARNING_LEVEL,
+ MY_INFORMATION_LEVEL
+};
+extern struct my_plugin_log_service
+{
+ int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+ const char *format, ...);
+#include
+typedef void *mysql_string_iterator_handle;
+typedef void *mysql_string_handle;
+extern struct mysql_string_service_st {
+ int (*mysql_string_convert_to_char_ptr_type)
+ (mysql_string_handle, const char *, char *, unsigned int, int *);
+ mysql_string_iterator_handle (*mysql_string_get_iterator_type)
+ (mysql_string_handle);
+ int (*mysql_string_iterator_next_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isupper_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_islower_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isdigit_type)(mysql_string_iterator_handle);
+ mysql_string_handle (*mysql_string_to_lowercase_type)(mysql_string_handle);
+ void (*mysql_string_free_type)(mysql_string_handle);
+ void (*mysql_string_iterator_free_type)(mysql_string_iterator_handle);
+} *mysql_string_service;
+int mysql_string_convert_to_char_ptr(mysql_string_handle string_handle,
+ const char *charset_name, char *buffer,
+ unsigned int buffer_size, int *error);
+mysql_string_iterator_handle mysql_string_get_iterator(mysql_string_handle
+ string_handle);
+int mysql_string_iterator_next(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_isupper(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_islower(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_isdigit(mysql_string_iterator_handle iterator_handle);
+mysql_string_handle mysql_string_to_lowercase(mysql_string_handle
+ string_handle);
+void mysql_string_free(mysql_string_handle);
+void mysql_string_iterator_free(mysql_string_iterator_handle);
+struct st_mysql_xid {
+ long formatID;
+ long gtrid_length;
+ long bqual_length;
+ char data[128];
+};
+typedef struct st_mysql_xid MYSQL_XID;
+enum enum_mysql_show_type
+{
+ SHOW_UNDEF, SHOW_BOOL,
+ SHOW_INT,
+ SHOW_LONG,
+ SHOW_LONGLONG,
+ SHOW_CHAR, SHOW_CHAR_PTR,
+ SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
+ SHOW_always_last
+};
+struct st_mysql_show_var {
+ const char *name;
+ char *value;
+ enum enum_mysql_show_type type;
+};
+typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *);
+struct st_mysql_sys_var;
+struct st_mysql_value;
+typedef int (*mysql_var_check_func)(void* thd,
+ struct st_mysql_sys_var *var,
+ void *save, struct st_mysql_value *value);
+typedef void (*mysql_var_update_func)(void* thd,
+ struct st_mysql_sys_var *var,
+ void *var_ptr, const void *save);
+struct st_mysql_plugin
+{
+ int type;
+ void *info;
+ const char *name;
+ const char *author;
+ const char *descr;
+ int license;
+ int (*init)(MYSQL_PLUGIN);
+ int (*deinit)(MYSQL_PLUGIN);
+ unsigned int version;
+ struct st_mysql_show_var *status_vars;
+ struct st_mysql_sys_var **system_vars;
+ void * __reserved1;
+ unsigned long flags;
+};
+#include "plugin_ftparser.h"
+#include "plugin.h"
+enum enum_ftparser_mode
+{
+ MYSQL_FTPARSER_SIMPLE_MODE= 0,
+ MYSQL_FTPARSER_WITH_STOPWORDS= 1,
+ MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
+};
+enum enum_ft_token_type
+{
+ FT_TOKEN_EOF= 0,
+ FT_TOKEN_WORD= 1,
+ FT_TOKEN_LEFT_PAREN= 2,
+ FT_TOKEN_RIGHT_PAREN= 3,
+ FT_TOKEN_STOPWORD= 4
+};
+typedef struct st_mysql_ftparser_boolean_info
+{
+ enum enum_ft_token_type type;
+ int yesno;
+ int weight_adjust;
+ char wasign;
+ char trunc;
+ char prev;
+ char *quot;
+} MYSQL_FTPARSER_BOOLEAN_INFO;
+typedef struct st_mysql_ftparser_param
+{
+ int (*mysql_parse)(struct st_mysql_ftparser_param *,
+ char *doc, int doc_len);
+ int (*mysql_add_word)(struct st_mysql_ftparser_param *,
+ char *word, int word_len,
+ MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
+ void *ftparser_state;
+ void *mysql_ftparam;
+ const struct charset_info_st *cs;
+ char *doc;
+ int length;
+ int flags;
+ enum enum_ftparser_mode mode;
+} MYSQL_FTPARSER_PARAM;
+struct st_mysql_ftparser
+{
+ int interface_version;
+ int (*parse)(MYSQL_FTPARSER_PARAM *param);
+ int (*init)(MYSQL_FTPARSER_PARAM *param);
+ int (*deinit)(MYSQL_FTPARSER_PARAM *param);
+};
+struct st_mysql_daemon
+{
+ int interface_version;
+};
+struct st_mysql_information_schema
+{
+ int interface_version;
+};
+struct st_mysql_storage_engine
+{
+ int interface_version;
+};
+struct handlerton;
+ struct Mysql_replication {
+ int interface_version;
+ };
+struct st_mysql_value
+{
+ int (*value_type)(struct st_mysql_value *);
+ const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
+ int (*val_real)(struct st_mysql_value *, double *realbuf);
+ int (*val_int)(struct st_mysql_value *, long long *intbuf);
+ int (*is_unsigned)(struct st_mysql_value *);
+};
+int thd_in_lock_tables(const void* thd);
+int thd_tablespace_op(const void* thd);
+long long thd_test_options(const void* thd, long long test_options);
+int thd_sql_command(const void* thd);
+const char *thd_proc_info(void* thd, const char *info);
+void **thd_ha_data(const void* thd, const struct handlerton *hton);
+void thd_storage_lock_wait(void* thd, long long value);
+int thd_tx_isolation(const void* thd);
+int thd_tx_is_read_only(const void* thd);
+char *thd_security_context(void* thd, char *buffer, unsigned int length,
+ unsigned int max_query_len);
+void thd_inc_row_count(void* thd);
+int thd_allow_batch(void* thd);
+int mysql_tmpfile(const char *prefix);
+int thd_killed(const void* thd);
+void thd_binlog_pos(const void* thd,
+ const char **file_var,
+ unsigned long long *pos_var);
+unsigned long thd_get_thread_id(const void* thd);
+void thd_get_xid(const void* thd, MYSQL_XID *xid);
+void mysql_query_cache_invalidate4(void* thd,
+ const char *key, unsigned int key_length,
+ int using_trx);
+void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
+void thd_set_ha_data(void* thd, const struct handlerton *hton,
+ const void *ha_data);
+#include
+typedef struct st_plugin_vio_info
+{
+ enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
+ MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
+ int socket;
+} MYSQL_PLUGIN_VIO_INFO;
+typedef struct st_plugin_vio
+{
+ int (*read_packet)(struct st_plugin_vio *vio,
+ unsigned char **buf);
+ int (*write_packet)(struct st_plugin_vio *vio,
+ const unsigned char *packet,
+ int packet_len);
+ void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
+} MYSQL_PLUGIN_VIO;
+typedef struct st_mysql_server_auth_info
+{
+ char *user_name;
+ unsigned int user_name_length;
+ const char *auth_string;
+ unsigned long auth_string_length;
+ char authenticated_as[48 +1];
+ char external_user[512];
+ int password_used;
+ const char *host_or_ip;
+ unsigned int host_or_ip_length;
+} MYSQL_SERVER_AUTH_INFO;
+struct st_mysql_auth
+{
+ int interface_version;
+ const char *client_auth_plugin;
+ int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
+};
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth_common.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth_common.h
new file mode 100644
index 000000000..a395a9fdb
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_auth_common.h
@@ -0,0 +1,126 @@
+#ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ @file
+
+ This file defines constants and data structures that are the same for
+ both client- and server-side authentication plugins.
+*/
+#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
+
+/** the max allowed length for a user name */
+#define MYSQL_USERNAME_LENGTH 48
+
+/**
+ return values of the plugin authenticate_user() method.
+*/
+
+/**
+ Authentication failed, plugin internal error.
+ An error occurred in the authentication plugin itself.
+ These errors are reported in table performance_schema.host_cache,
+ column COUNT_AUTH_PLUGIN_ERRORS.
+*/
+#define CR_AUTH_PLUGIN_ERROR 3
+/**
+ Authentication failed, client server handshake.
+ An error occurred during the client server handshake.
+ These errors are reported in table performance_schema.host_cache,
+ column COUNT_HANDSHAKE_ERRORS.
+*/
+#define CR_AUTH_HANDSHAKE 2
+/**
+ Authentication failed, user credentials.
+ For example, wrong passwords.
+ These errors are reported in table performance_schema.host_cache,
+ column COUNT_AUTHENTICATION_ERRORS.
+*/
+#define CR_AUTH_USER_CREDENTIALS 1
+/**
+ Authentication failed. Additionally, all other CR_xxx values
+ (libmysql error code) can be used too.
+
+ The client plugin may set the error code and the error message directly
+ in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
+ code was returned, an error message in the MYSQL structure will be
+ overwritten. If CR_ERROR is returned without setting the error in MYSQL,
+ CR_UNKNOWN_ERROR will be user.
+*/
+#define CR_ERROR 0
+/**
+ Authentication (client part) was successful. It does not mean that the
+ authentication as a whole was successful, usually it only means
+ that the client was able to send the user name and the password to the
+ server. If CR_OK is returned, the libmysql reads the next packet expecting
+ it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
+*/
+#define CR_OK -1
+/**
+ Authentication was successful.
+ It means that the client has done its part successfully and also that
+ a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
+ In this case, libmysql will not read a packet from the server,
+ but it will use the data at mysql->net.read_pos.
+
+ A plugin may return this value if the number of roundtrips in the
+ authentication protocol is not known in advance, and the client plugin
+ needs to read one packet more to determine if the authentication is finished
+ or not.
+*/
+#define CR_OK_HANDSHAKE_COMPLETE -2
+
+typedef struct st_plugin_vio_info
+{
+ enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
+ MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
+ int socket; /**< it's set, if the protocol is SOCKET or TCP */
+#ifdef _WIN32
+ HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */
+#endif
+} MYSQL_PLUGIN_VIO_INFO;
+
+/**
+ Provides plugin access to communication channel
+*/
+typedef struct st_plugin_vio
+{
+ /**
+ Plugin provides a pointer reference and this function sets it to the
+ contents of any incoming packet. Returns the packet length, or -1 if
+ the plugin should terminate.
+ */
+ int (*read_packet)(struct st_plugin_vio *vio,
+ unsigned char **buf);
+
+ /**
+ Plugin provides a buffer with data and the length and this
+ function sends it as a packet. Returns 0 on success, 1 on failure.
+ */
+ int (*write_packet)(struct st_plugin_vio *vio,
+ const unsigned char *packet,
+ int packet_len);
+
+ /**
+ Fills in a st_plugin_vio_info structure, providing the information
+ about the connection.
+ */
+ void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
+
+} MYSQL_PLUGIN_VIO;
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_ftparser.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_ftparser.h
new file mode 100644
index 000000000..3816a0f8e
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_ftparser.h
@@ -0,0 +1,211 @@
+/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _my_plugin_ftparser_h
+#define _my_plugin_ftparser_h
+#include "plugin.h"
+
+/*************************************************************************
+ API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
+*/
+
+#define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100
+
+/* Parsing modes. Set in MYSQL_FTPARSER_PARAM::mode */
+enum enum_ftparser_mode
+{
+/*
+ Fast and simple mode. This mode is used for indexing, and natural
+ language queries.
+
+ The parser is expected to return only those words that go into the
+ index. Stopwords or too short/long words should not be returned. The
+ 'boolean_info' argument of mysql_add_word() does not have to be set.
+*/
+ MYSQL_FTPARSER_SIMPLE_MODE= 0,
+
+/*
+ Parse with stopwords mode. This mode is used in boolean searches for
+ "phrase matching."
+
+ The parser is not allowed to ignore words in this mode. Every word
+ should be returned, including stopwords and words that are too short
+ or long. The 'boolean_info' argument of mysql_add_word() does not
+ have to be set.
+*/
+ MYSQL_FTPARSER_WITH_STOPWORDS= 1,
+
+/*
+ Parse in boolean mode. This mode is used to parse a boolean query string.
+
+ The parser should provide a valid MYSQL_FTPARSER_BOOLEAN_INFO
+ structure in the 'boolean_info' argument to mysql_add_word().
+ Usually that means that the parser should recognize boolean operators
+ in the parsing stream and set appropriate fields in
+ MYSQL_FTPARSER_BOOLEAN_INFO structure accordingly. As for
+ MYSQL_FTPARSER_WITH_STOPWORDS mode, no word should be ignored.
+ Instead, use FT_TOKEN_STOPWORD for the token type of such a word.
+*/
+ MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
+};
+
+/*
+ Token types for boolean mode searching (used for the type member of
+ MYSQL_FTPARSER_BOOLEAN_INFO struct)
+
+ FT_TOKEN_EOF: End of data.
+ FT_TOKEN_WORD: Regular word.
+ FT_TOKEN_LEFT_PAREN: Left parenthesis (start of group/sub-expression).
+ FT_TOKEN_RIGHT_PAREN: Right parenthesis (end of group/sub-expression).
+ FT_TOKEN_STOPWORD: Stopword.
+*/
+
+enum enum_ft_token_type
+{
+ FT_TOKEN_EOF= 0,
+ FT_TOKEN_WORD= 1,
+ FT_TOKEN_LEFT_PAREN= 2,
+ FT_TOKEN_RIGHT_PAREN= 3,
+ FT_TOKEN_STOPWORD= 4
+};
+
+/*
+ This structure is used in boolean search mode only. It conveys
+ boolean-mode metadata to the MySQL search engine for every word in
+ the search query. A valid instance of this structure must be filled
+ in by the plugin parser and passed as an argument in the call to
+ mysql_add_word (the callback function in the MYSQL_FTPARSER_PARAM
+ structure) when a query is parsed in boolean mode.
+
+ type: The token type. Should be one of the enum_ft_token_type values.
+
+ yesno: Whether the word must be present for a match to occur:
+ >0 Must be present
+ <0 Must not be present
+ 0 Neither; the word is optional but its presence increases the relevance
+ With the default settings of the ft_boolean_syntax system variable,
+ >0 corresponds to the '+' operator, <0 corrresponds to the '-' operator,
+ and 0 means neither operator was used.
+
+ weight_adjust: A weighting factor that determines how much a match
+ for the word counts. Positive values increase, negative - decrease the
+ relative word's importance in the query.
+
+ wasign: The sign of the word's weight in the query. If it's non-negative
+ the match for the word will increase document relevance, if it's
+ negative - decrease (the word becomes a "noise word", the less of it the
+ better).
+
+ trunc: Corresponds to the '*' operator in the default setting of the
+ ft_boolean_syntax system variable.
+*/
+
+typedef struct st_mysql_ftparser_boolean_info
+{
+ enum enum_ft_token_type type;
+ int yesno;
+ int weight_adjust;
+ char wasign;
+ char trunc;
+ /* These are parser state and must be removed. */
+ char prev;
+ char *quot;
+} MYSQL_FTPARSER_BOOLEAN_INFO;
+
+/*
+ The following flag means that buffer with a string (document, word)
+ may be overwritten by the caller before the end of the parsing (that is
+ before st_mysql_ftparser::deinit() call). If one needs the string
+ to survive between two successive calls of the parsing function, she
+ needs to save a copy of it. The flag may be set by MySQL before calling
+ st_mysql_ftparser::parse(), or it may be set by a plugin before calling
+ st_mysql_ftparser_param::mysql_parse() or
+ st_mysql_ftparser_param::mysql_add_word().
+*/
+#define MYSQL_FTFLAGS_NEED_COPY 1
+
+/*
+ An argument of the full-text parser plugin. This structure is
+ filled in by MySQL server and passed to the parsing function of the
+ plugin as an in/out parameter.
+
+ mysql_parse: A pointer to the built-in parser implementation of the
+ server. It's set by the server and can be used by the parser plugin
+ to invoke the MySQL default parser. If plugin's role is to extract
+ textual data from .doc, .pdf or .xml content, it might extract
+ plaintext from the content, and then pass the text to the default
+ MySQL parser to be parsed.
+
+ mysql_add_word: A server callback to add a new word. When parsing
+ a document, the server sets this to point at a function that adds
+ the word to MySQL full-text index. When parsing a search query,
+ this function will add the new word to the list of words to search
+ for. The boolean_info argument can be NULL for all cases except
+ when mode is MYSQL_FTPARSER_FULL_BOOLEAN_INFO.
+
+ ftparser_state: A generic pointer. The plugin can set it to point
+ to information to be used internally for its own purposes.
+
+ mysql_ftparam: This is set by the server. It is used by MySQL functions
+ called via mysql_parse() and mysql_add_word() callback. The plugin
+ should not modify it.
+
+ cs: Information about the character set of the document or query string.
+
+ doc: A pointer to the document or query string to be parsed.
+
+ length: Length of the document or query string, in bytes.
+
+ flags: See MYSQL_FTFLAGS_* constants above.
+
+ mode: The parsing mode. With boolean operators, with stopwords, or
+ nothing. See enum_ftparser_mode above.
+*/
+
+typedef struct st_mysql_ftparser_param
+{
+ int (*mysql_parse)(struct st_mysql_ftparser_param *,
+ char *doc, int doc_len);
+ int (*mysql_add_word)(struct st_mysql_ftparser_param *,
+ char *word, int word_len,
+ MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
+ void *ftparser_state;
+ void *mysql_ftparam;
+ const struct charset_info_st *cs;
+ char *doc;
+ int length;
+ int flags;
+ enum enum_ftparser_mode mode;
+} MYSQL_FTPARSER_PARAM;
+
+/*
+ Full-text parser descriptor.
+
+ interface_version is, e.g., MYSQL_FTPARSER_INTERFACE_VERSION.
+ The parsing, initialization, and deinitialization functions are
+ invoked per SQL statement for which the parser is used.
+*/
+
+struct st_mysql_ftparser
+{
+ int interface_version;
+ int (*parse)(MYSQL_FTPARSER_PARAM *param);
+ int (*init)(MYSQL_FTPARSER_PARAM *param);
+ int (*deinit)(MYSQL_FTPARSER_PARAM *param);
+};
+
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_ftparser.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_ftparser.h.pp
new file mode 100644
index 000000000..5a8b0c66a
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_ftparser.h.pp
@@ -0,0 +1,248 @@
+#include "plugin.h"
+typedef void * MYSQL_PLUGIN;
+#include
+#include
+extern struct my_snprintf_service_st {
+ size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
+ size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
+} *my_snprintf_service;
+size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
+size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
+#include
+struct st_mysql_lex_string
+{
+ char *str;
+ size_t length;
+};
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+extern struct thd_alloc_service_st {
+ void *(*thd_alloc_func)(void*, unsigned int);
+ void *(*thd_calloc_func)(void*, unsigned int);
+ char *(*thd_strdup_func)(void*, const char *);
+ char *(*thd_strmake_func)(void*, const char *, unsigned int);
+ void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
+ const char *, unsigned int, int);
+} *thd_alloc_service;
+void *thd_alloc(void* thd, unsigned int size);
+void *thd_calloc(void* thd, unsigned int size);
+char *thd_strdup(void* thd, const char *str);
+char *thd_strmake(void* thd, const char *str, unsigned int size);
+void *thd_memdup(void* thd, const void* str, unsigned int size);
+MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
+ const char *str, unsigned int size,
+ int allocate_lex_string);
+#include
+typedef enum _thd_wait_type_e {
+ THD_WAIT_SLEEP= 1,
+ THD_WAIT_DISKIO= 2,
+ THD_WAIT_ROW_LOCK= 3,
+ THD_WAIT_GLOBAL_LOCK= 4,
+ THD_WAIT_META_DATA_LOCK= 5,
+ THD_WAIT_TABLE_LOCK= 6,
+ THD_WAIT_USER_LOCK= 7,
+ THD_WAIT_BINLOG= 8,
+ THD_WAIT_GROUP_COMMIT= 9,
+ THD_WAIT_SYNC= 10,
+ THD_WAIT_LAST= 11
+} thd_wait_type;
+extern struct thd_wait_service_st {
+ void (*thd_wait_begin_func)(void*, int);
+ void (*thd_wait_end_func)(void*);
+} *thd_wait_service;
+void thd_wait_begin(void* thd, int wait_type);
+void thd_wait_end(void* thd);
+#include
+struct scheduler_functions;
+extern struct my_thread_scheduler_service {
+ int (*set)(struct scheduler_functions *scheduler);
+ int (*reset)();
+} *my_thread_scheduler_service;
+int my_thread_scheduler_set(struct scheduler_functions *scheduler);
+int my_thread_scheduler_reset();
+#include
+enum plugin_log_level
+{
+ MY_ERROR_LEVEL,
+ MY_WARNING_LEVEL,
+ MY_INFORMATION_LEVEL
+};
+extern struct my_plugin_log_service
+{
+ int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+ const char *format, ...);
+#include
+typedef void *mysql_string_iterator_handle;
+typedef void *mysql_string_handle;
+extern struct mysql_string_service_st {
+ int (*mysql_string_convert_to_char_ptr_type)
+ (mysql_string_handle, const char *, char *, unsigned int, int *);
+ mysql_string_iterator_handle (*mysql_string_get_iterator_type)
+ (mysql_string_handle);
+ int (*mysql_string_iterator_next_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isupper_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_islower_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isdigit_type)(mysql_string_iterator_handle);
+ mysql_string_handle (*mysql_string_to_lowercase_type)(mysql_string_handle);
+ void (*mysql_string_free_type)(mysql_string_handle);
+ void (*mysql_string_iterator_free_type)(mysql_string_iterator_handle);
+} *mysql_string_service;
+int mysql_string_convert_to_char_ptr(mysql_string_handle string_handle,
+ const char *charset_name, char *buffer,
+ unsigned int buffer_size, int *error);
+mysql_string_iterator_handle mysql_string_get_iterator(mysql_string_handle
+ string_handle);
+int mysql_string_iterator_next(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_isupper(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_islower(mysql_string_iterator_handle iterator_handle);
+int mysql_string_iterator_isdigit(mysql_string_iterator_handle iterator_handle);
+mysql_string_handle mysql_string_to_lowercase(mysql_string_handle
+ string_handle);
+void mysql_string_free(mysql_string_handle);
+void mysql_string_iterator_free(mysql_string_iterator_handle);
+struct st_mysql_xid {
+ long formatID;
+ long gtrid_length;
+ long bqual_length;
+ char data[128];
+};
+typedef struct st_mysql_xid MYSQL_XID;
+enum enum_mysql_show_type
+{
+ SHOW_UNDEF, SHOW_BOOL,
+ SHOW_INT,
+ SHOW_LONG,
+ SHOW_LONGLONG,
+ SHOW_CHAR, SHOW_CHAR_PTR,
+ SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
+ SHOW_always_last
+};
+struct st_mysql_show_var {
+ const char *name;
+ char *value;
+ enum enum_mysql_show_type type;
+};
+typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *);
+struct st_mysql_sys_var;
+struct st_mysql_value;
+typedef int (*mysql_var_check_func)(void* thd,
+ struct st_mysql_sys_var *var,
+ void *save, struct st_mysql_value *value);
+typedef void (*mysql_var_update_func)(void* thd,
+ struct st_mysql_sys_var *var,
+ void *var_ptr, const void *save);
+struct st_mysql_plugin
+{
+ int type;
+ void *info;
+ const char *name;
+ const char *author;
+ const char *descr;
+ int license;
+ int (*init)(MYSQL_PLUGIN);
+ int (*deinit)(MYSQL_PLUGIN);
+ unsigned int version;
+ struct st_mysql_show_var *status_vars;
+ struct st_mysql_sys_var **system_vars;
+ void * __reserved1;
+ unsigned long flags;
+};
+#include "plugin_ftparser.h"
+struct st_mysql_daemon
+{
+ int interface_version;
+};
+struct st_mysql_information_schema
+{
+ int interface_version;
+};
+struct st_mysql_storage_engine
+{
+ int interface_version;
+};
+struct handlerton;
+ struct Mysql_replication {
+ int interface_version;
+ };
+struct st_mysql_value
+{
+ int (*value_type)(struct st_mysql_value *);
+ const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
+ int (*val_real)(struct st_mysql_value *, double *realbuf);
+ int (*val_int)(struct st_mysql_value *, long long *intbuf);
+ int (*is_unsigned)(struct st_mysql_value *);
+};
+int thd_in_lock_tables(const void* thd);
+int thd_tablespace_op(const void* thd);
+long long thd_test_options(const void* thd, long long test_options);
+int thd_sql_command(const void* thd);
+const char *thd_proc_info(void* thd, const char *info);
+void **thd_ha_data(const void* thd, const struct handlerton *hton);
+void thd_storage_lock_wait(void* thd, long long value);
+int thd_tx_isolation(const void* thd);
+int thd_tx_is_read_only(const void* thd);
+char *thd_security_context(void* thd, char *buffer, unsigned int length,
+ unsigned int max_query_len);
+void thd_inc_row_count(void* thd);
+int thd_allow_batch(void* thd);
+int mysql_tmpfile(const char *prefix);
+int thd_killed(const void* thd);
+void thd_binlog_pos(const void* thd,
+ const char **file_var,
+ unsigned long long *pos_var);
+unsigned long thd_get_thread_id(const void* thd);
+void thd_get_xid(const void* thd, MYSQL_XID *xid);
+void mysql_query_cache_invalidate4(void* thd,
+ const char *key, unsigned int key_length,
+ int using_trx);
+void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
+void thd_set_ha_data(void* thd, const struct handlerton *hton,
+ const void *ha_data);
+enum enum_ftparser_mode
+{
+ MYSQL_FTPARSER_SIMPLE_MODE= 0,
+ MYSQL_FTPARSER_WITH_STOPWORDS= 1,
+ MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
+};
+enum enum_ft_token_type
+{
+ FT_TOKEN_EOF= 0,
+ FT_TOKEN_WORD= 1,
+ FT_TOKEN_LEFT_PAREN= 2,
+ FT_TOKEN_RIGHT_PAREN= 3,
+ FT_TOKEN_STOPWORD= 4
+};
+typedef struct st_mysql_ftparser_boolean_info
+{
+ enum enum_ft_token_type type;
+ int yesno;
+ int weight_adjust;
+ char wasign;
+ char trunc;
+ char prev;
+ char *quot;
+} MYSQL_FTPARSER_BOOLEAN_INFO;
+typedef struct st_mysql_ftparser_param
+{
+ int (*mysql_parse)(struct st_mysql_ftparser_param *,
+ char *doc, int doc_len);
+ int (*mysql_add_word)(struct st_mysql_ftparser_param *,
+ char *word, int word_len,
+ MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
+ void *ftparser_state;
+ void *mysql_ftparam;
+ const struct charset_info_st *cs;
+ char *doc;
+ int length;
+ int flags;
+ enum enum_ftparser_mode mode;
+} MYSQL_FTPARSER_PARAM;
+struct st_mysql_ftparser
+{
+ int interface_version;
+ int (*parse)(MYSQL_FTPARSER_PARAM *param);
+ int (*init)(MYSQL_FTPARSER_PARAM *param);
+ int (*deinit)(MYSQL_FTPARSER_PARAM *param);
+};
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_validate_password.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_validate_password.h
new file mode 100644
index 000000000..cd861d990
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/plugin_validate_password.h
@@ -0,0 +1,46 @@
+/* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MYSQL_PLUGIN_VALIDATE_PASSWORD_INCLUDED
+#define MYSQL_PLUGIN_VALIDATE_PASSWORD_INCLUDED
+
+/* API for validate_password plugin. (MYSQL_VALIDATE_PASSWORD_PLUGIN) */
+
+#include
+#define MYSQL_VALIDATE_PASSWORD_INTERFACE_VERSION 0x0100
+
+/*
+ The descriptor structure for the plugin, that is referred from
+ st_mysql_plugin.
+*/
+
+typedef void* mysql_string_handle;
+
+struct st_mysql_validate_password
+{
+ int interface_version;
+ /*
+ This function retuns TRUE for passwords which satisfy the password
+ policy (as choosen by plugin variable) and FALSE for all other
+ password
+ */
+ int (*validate_password)(mysql_string_handle password);
+ /*
+ This function returns the password strength (0-100) depending
+ upon the policies
+ */
+ int (*get_password_strength)(mysql_string_handle password);
+};
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_file.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_file.h
new file mode 100644
index 000000000..c839b2b01
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_file.h
@@ -0,0 +1,1421 @@
+/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef MYSQL_FILE_H
+#define MYSQL_FILE_H
+
+#include
+
+/* For strlen() */
+#include
+/* For MY_STAT */
+#include
+/* For my_chsize */
+#include
+
+/**
+ @file mysql/psi/mysql_file.h
+ Instrumentation helpers for mysys file io.
+ This header file provides the necessary declarations
+ to use the mysys file API with the performance schema instrumentation.
+ In some compilers (SunStudio), 'static inline' functions, when declared
+ but not used, are not optimized away (because they are unused) by default,
+ so that including a static inline function from a header file does
+ create unwanted dependencies, causing unresolved symbols at link time.
+ Other compilers, like gcc, optimize these dependencies by default.
+
+ Since the instrumented APIs declared here are wrapper on top
+ of mysys file io APIs, including mysql/psi/mysql_file.h assumes that
+ the dependency on my_sys already exists.
+*/
+
+#include "mysql/psi/psi.h"
+
+/**
+ @defgroup File_instrumentation File Instrumentation
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ @def mysql_file_register(P1, P2, P3)
+ File registration.
+*/
+#define mysql_file_register(P1, P2, P3) \
+ inline_mysql_file_register(P1, P2, P3)
+
+/**
+ @def mysql_file_fgets(P1, P2, F)
+ Instrumented fgets.
+ @c mysql_file_fgets is a replacement for @c fgets.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fgets(P1, P2, F) \
+ inline_mysql_file_fgets(__FILE__, __LINE__, P1, P2, F)
+#else
+ #define mysql_file_fgets(P1, P2, F) \
+ inline_mysql_file_fgets(P1, P2, F)
+#endif
+
+/**
+ @def mysql_file_fgetc(F)
+ Instrumented fgetc.
+ @c mysql_file_fgetc is a replacement for @c fgetc.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fgetc(F) inline_mysql_file_fgetc(__FILE__, __LINE__, F)
+#else
+ #define mysql_file_fgetc(F) inline_mysql_file_fgetc(F)
+#endif
+
+/**
+ @def mysql_file_fputs(P1, F)
+ Instrumented fputs.
+ @c mysql_file_fputs is a replacement for @c fputs.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fputs(P1, F) \
+ inline_mysql_file_fputs(__FILE__, __LINE__, P1, F)
+#else
+ #define mysql_file_fputs(P1, F)\
+ inline_mysql_file_fputs(P1, F)
+#endif
+
+/**
+ @def mysql_file_fputc(P1, F)
+ Instrumented fputc.
+ @c mysql_file_fputc is a replacement for @c fputc.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fputc(P1, F) \
+ inline_mysql_file_fputc(__FILE__, __LINE__, P1, F)
+#else
+ #define mysql_file_fputc(P1, F) \
+ inline_mysql_file_fputc(P1, F)
+#endif
+
+/**
+ @def mysql_file_fprintf
+ Instrumented fprintf.
+ @c mysql_file_fprintf is a replacement for @c fprintf.
+*/
+#define mysql_file_fprintf inline_mysql_file_fprintf
+
+/**
+ @def mysql_file_vfprintf(F, P1, P2)
+ Instrumented vfprintf.
+ @c mysql_file_vfprintf is a replacement for @c vfprintf.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_vfprintf(F, P1, P2) \
+ inline_mysql_file_vfprintf(__FILE__, __LINE__, F, P1, P2)
+#else
+ #define mysql_file_vfprintf(F, P1, P2) \
+ inline_mysql_file_vfprintf(F, P1, P2)
+#endif
+
+/**
+ @def mysql_file_fflush(F, P1, P2)
+ Instrumented fflush.
+ @c mysql_file_fflush is a replacement for @c fflush.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fflush(F) \
+ inline_mysql_file_fflush(__FILE__, __LINE__, F)
+#else
+ #define mysql_file_fflush(F) \
+ inline_mysql_file_fflush(F)
+#endif
+
+/**
+ @def mysql_file_feof(F)
+ Instrumented feof.
+ @c mysql_file_feof is a replacement for @c feof.
+*/
+#define mysql_file_feof(F) inline_mysql_file_feof(F)
+
+/**
+ @def mysql_file_fstat(FN, S, FL)
+ Instrumented fstat.
+ @c mysql_file_fstat is a replacement for @c my_fstat.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fstat(FN, S, FL) \
+ inline_mysql_file_fstat(__FILE__, __LINE__, FN, S, FL)
+#else
+ #define mysql_file_fstat(FN, S, FL) \
+ inline_mysql_file_fstat(FN, S, FL)
+#endif
+
+/**
+ @def mysql_file_stat(K, FN, S, FL)
+ Instrumented stat.
+ @c mysql_file_stat is a replacement for @c my_stat.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_stat(K, FN, S, FL) \
+ inline_mysql_file_stat(K, __FILE__, __LINE__, FN, S, FL)
+#else
+ #define mysql_file_stat(K, FN, S, FL) \
+ inline_mysql_file_stat(FN, S, FL)
+#endif
+
+/**
+ @def mysql_file_chsize(F, P1, P2, P3)
+ Instrumented chsize.
+ @c mysql_file_chsize is a replacement for @c my_chsize.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_chsize(F, P1, P2, P3) \
+ inline_mysql_file_chsize(__FILE__, __LINE__, F, P1, P2, P3)
+#else
+ #define mysql_file_chsize(F, P1, P2, P3) \
+ inline_mysql_file_chsize(F, P1, P2, P3)
+#endif
+
+/**
+ @def mysql_file_fopen(K, N, F1, F2)
+ Instrumented fopen.
+ @c mysql_file_fopen is a replacement for @c my_fopen.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fopen(K, N, F1, F2) \
+ inline_mysql_file_fopen(K, __FILE__, __LINE__, N, F1, F2)
+#else
+ #define mysql_file_fopen(K, N, F1, F2) \
+ inline_mysql_file_fopen(N, F1, F2)
+#endif
+
+/**
+ @def mysql_file_fclose(FD, FL)
+ Instrumented fclose.
+ @c mysql_file_fclose is a replacement for @c my_fclose.
+ Without the instrumentation, this call will have the same behavior as the
+ undocumented and possibly platform specific my_fclose(NULL, ...) behavior.
+ With the instrumentation, mysql_fclose(NULL, ...) will safely return 0,
+ which is an extension compared to my_fclose and is therefore compliant.
+ mysql_fclose is on purpose *not* implementing
+ @code DBUG_ASSERT(file != NULL) @endcode,
+ since doing so could introduce regressions.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fclose(FD, FL) \
+ inline_mysql_file_fclose(__FILE__, __LINE__, FD, FL)
+#else
+ #define mysql_file_fclose(FD, FL) \
+ inline_mysql_file_fclose(FD, FL)
+#endif
+
+/**
+ @def mysql_file_fread(FD, P1, P2, P3)
+ Instrumented fread.
+ @c mysql_file_fread is a replacement for @c my_fread.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fread(FD, P1, P2, P3) \
+ inline_mysql_file_fread(__FILE__, __LINE__, FD, P1, P2, P3)
+#else
+ #define mysql_file_fread(FD, P1, P2, P3) \
+ inline_mysql_file_fread(FD, P1, P2, P3)
+#endif
+
+/**
+ @def mysql_file_fwrite(FD, P1, P2, P3)
+ Instrumented fwrite.
+ @c mysql_file_fwrite is a replacement for @c my_fwrite.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fwrite(FD, P1, P2, P3) \
+ inline_mysql_file_fwrite(__FILE__, __LINE__, FD, P1, P2, P3)
+#else
+ #define mysql_file_fwrite(FD, P1, P2, P3) \
+ inline_mysql_file_fwrite(FD, P1, P2, P3)
+#endif
+
+/**
+ @def mysql_file_fseek(FD, P, W, F)
+ Instrumented fseek.
+ @c mysql_file_fseek is a replacement for @c my_fseek.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_fseek(FD, P, W, F) \
+ inline_mysql_file_fseek(__FILE__, __LINE__, FD, P, W, F)
+#else
+ #define mysql_file_fseek(FD, P, W, F) \
+ inline_mysql_file_fseek(FD, P, W, F)
+#endif
+
+/**
+ @def mysql_file_ftell(FD, F)
+ Instrumented ftell.
+ @c mysql_file_ftell is a replacement for @c my_ftell.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_ftell(FD, F) \
+ inline_mysql_file_ftell(__FILE__, __LINE__, FD, F)
+#else
+ #define mysql_file_ftell(FD, F) \
+ inline_mysql_file_ftell(FD, F)
+#endif
+
+/**
+ @def mysql_file_create(K, N, F1, F2, F3)
+ Instrumented create.
+ @c mysql_file_create is a replacement for @c my_create.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_create(K, N, F1, F2, F3) \
+ inline_mysql_file_create(K, __FILE__, __LINE__, N, F1, F2, F3)
+#else
+ #define mysql_file_create(K, N, F1, F2, F3) \
+ inline_mysql_file_create(N, F1, F2, F3)
+#endif
+
+/**
+ @def mysql_file_create_temp(K, T, D, P, M, F)
+ Instrumented create_temp_file.
+ @c mysql_file_create_temp is a replacement for @c create_temp_file.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_create_temp(K, T, D, P, M, F) \
+ inline_mysql_file_create_temp(K, T, D, P, M, F)
+#else
+ #define mysql_file_create_temp(K, T, D, P, M, F) \
+ inline_mysql_file_create_temp(T, D, P, M, F)
+#endif
+
+/**
+ @def mysql_file_open(K, N, F1, F2)
+ Instrumented open.
+ @c mysql_file_open is a replacement for @c my_open.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_open(K, N, F1, F2) \
+ inline_mysql_file_open(K, __FILE__, __LINE__, N, F1, F2)
+#else
+ #define mysql_file_open(K, N, F1, F2) \
+ inline_mysql_file_open(N, F1, F2)
+#endif
+
+/**
+ @def mysql_file_close(FD, F)
+ Instrumented close.
+ @c mysql_file_close is a replacement for @c my_close.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_close(FD, F) \
+ inline_mysql_file_close(__FILE__, __LINE__, FD, F)
+#else
+ #define mysql_file_close(FD, F) \
+ inline_mysql_file_close(FD, F)
+#endif
+
+/**
+ @def mysql_file_read(FD, B, S, F)
+ Instrumented read.
+ @c mysql_read is a replacement for @c my_read.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_read(FD, B, S, F) \
+ inline_mysql_file_read(__FILE__, __LINE__, FD, B, S, F)
+#else
+ #define mysql_file_read(FD, B, S, F) \
+ inline_mysql_file_read(FD, B, S, F)
+#endif
+
+/**
+ @def mysql_file_write(FD, B, S, F)
+ Instrumented write.
+ @c mysql_file_write is a replacement for @c my_write.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_write(FD, B, S, F) \
+ inline_mysql_file_write(__FILE__, __LINE__, FD, B, S, F)
+#else
+ #define mysql_file_write(FD, B, S, F) \
+ inline_mysql_file_write(FD, B, S, F)
+#endif
+
+/**
+ @def mysql_file_pread(FD, B, S, O, F)
+ Instrumented pread.
+ @c mysql_pread is a replacement for @c my_pread.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_pread(FD, B, S, O, F) \
+ inline_mysql_file_pread(__FILE__, __LINE__, FD, B, S, O, F)
+#else
+ #define mysql_file_pread(FD, B, S, O, F) \
+ inline_mysql_file_pread(FD, B, S, O, F)
+#endif
+
+/**
+ @def mysql_file_pwrite(FD, B, S, O, F)
+ Instrumented pwrite.
+ @c mysql_file_pwrite is a replacement for @c my_pwrite.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_pwrite(FD, B, S, O, F) \
+ inline_mysql_file_pwrite(__FILE__, __LINE__, FD, B, S, O, F)
+#else
+ #define mysql_file_pwrite(FD, B, S, O, F) \
+ inline_mysql_file_pwrite(FD, B, S, O, F)
+#endif
+
+/**
+ @def mysql_file_seek(FD, P, W, F)
+ Instrumented seek.
+ @c mysql_file_seek is a replacement for @c my_seek.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_seek(FD, P, W, F) \
+ inline_mysql_file_seek(__FILE__, __LINE__, FD, P, W, F)
+#else
+ #define mysql_file_seek(FD, P, W, F) \
+ inline_mysql_file_seek(FD, P, W, F)
+#endif
+
+/**
+ @def mysql_file_tell(FD, F)
+ Instrumented tell.
+ @c mysql_file_tell is a replacement for @c my_tell.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_tell(FD, F) \
+ inline_mysql_file_tell(__FILE__, __LINE__, FD, F)
+#else
+ #define mysql_file_tell(FD, F) \
+ inline_mysql_file_tell(FD, F)
+#endif
+
+/**
+ @def mysql_file_delete(K, P1, P2)
+ Instrumented delete.
+ @c mysql_file_delete is a replacement for @c my_delete.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_delete(K, P1, P2) \
+ inline_mysql_file_delete(K, __FILE__, __LINE__, P1, P2)
+#else
+ #define mysql_file_delete(K, P1, P2) \
+ inline_mysql_file_delete(P1, P2)
+#endif
+
+/**
+ @def mysql_file_rename(K, P1, P2, P3)
+ Instrumented rename.
+ @c mysql_file_rename is a replacement for @c my_rename.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_rename(K, P1, P2, P3) \
+ inline_mysql_file_rename(K, __FILE__, __LINE__, P1, P2, P3)
+#else
+ #define mysql_file_rename(K, P1, P2, P3) \
+ inline_mysql_file_rename(P1, P2, P3)
+#endif
+
+/**
+ @def mysql_file_create_with_symlink(K, P1, P2, P3, P4, P5)
+ Instrumented create with symbolic link.
+ @c mysql_file_create_with_symlink is a replacement
+ for @c my_create_with_symlink.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_create_with_symlink(K, P1, P2, P3, P4, P5) \
+ inline_mysql_file_create_with_symlink(K, __FILE__, __LINE__, \
+ P1, P2, P3, P4, P5)
+#else
+ #define mysql_file_create_with_symlink(K, P1, P2, P3, P4, P5) \
+ inline_mysql_file_create_with_symlink(P1, P2, P3, P4, P5)
+#endif
+
+/**
+ @def mysql_file_delete_with_symlink(K, P1, P2)
+ Instrumented delete with symbolic link.
+ @c mysql_file_delete_with_symlink is a replacement
+ for @c my_delete_with_symlink.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_delete_with_symlink(K, P1, P2) \
+ inline_mysql_file_delete_with_symlink(K, __FILE__, __LINE__, P1, P2)
+#else
+ #define mysql_file_delete_with_symlink(K, P1, P2) \
+ inline_mysql_file_delete_with_symlink(P1, P2)
+#endif
+
+/**
+ @def mysql_file_rename_with_symlink(K, P1, P2, P3)
+ Instrumented rename with symbolic link.
+ @c mysql_file_rename_with_symlink is a replacement
+ for @c my_rename_with_symlink.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_rename_with_symlink(K, P1, P2, P3) \
+ inline_mysql_file_rename_with_symlink(K, __FILE__, __LINE__, P1, P2, P3)
+#else
+ #define mysql_file_rename_with_symlink(K, P1, P2, P3) \
+ inline_mysql_file_rename_with_symlink(P1, P2, P3)
+#endif
+
+/**
+ @def mysql_file_sync(P1, P2)
+ Instrumented file sync.
+ @c mysql_file_sync is a replacement for @c my_sync.
+*/
+#ifdef HAVE_PSI_FILE_INTERFACE
+ #define mysql_file_sync(P1, P2) \
+ inline_mysql_file_sync(__FILE__, __LINE__, P1, P2)
+#else
+ #define mysql_file_sync(P1, P2) \
+ inline_mysql_file_sync(P1, P2)
+#endif
+
+/**
+ An instrumented FILE structure.
+ @sa MYSQL_FILE
+*/
+struct st_mysql_file
+{
+ /** The real file. */
+ FILE *m_file;
+ /**
+ The instrumentation hook.
+ Note that this hook is not conditionally defined,
+ for binary compatibility of the @c MYSQL_FILE interface.
+ */
+ struct PSI_file *m_psi;
+};
+
+/**
+ Type of an instrumented file.
+ @c MYSQL_FILE is a drop-in replacement for @c FILE.
+ @sa mysql_file_open
+*/
+typedef struct st_mysql_file MYSQL_FILE;
+
+static inline void inline_mysql_file_register(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *category,
+ PSI_file_info *info,
+ int count
+#else
+ const char *category __attribute__ ((unused)),
+ void *info __attribute__ ((unused)),
+ int count __attribute__ ((unused))
+#endif
+)
+{
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_FILE_CALL(register_file)(category, info, count);
+#endif
+}
+
+static inline char *
+inline_mysql_file_fgets(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ char *str, int size, MYSQL_FILE *file)
+{
+ char *result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_READ);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) size, src_file, src_line);
+ result= fgets(str, size, file->m_file);
+ PSI_FILE_CALL(end_file_wait)(locker, result ? strlen(result) : 0);
+ return result;
+ }
+#endif
+
+ result= fgets(str, size, file->m_file);
+ return result;
+}
+
+static inline int
+inline_mysql_file_fgetc(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_READ);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line);
+ result= fgetc(file->m_file);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1);
+ return result;
+ }
+#endif
+
+ result= fgetc(file->m_file);
+ return result;
+}
+
+static inline int
+inline_mysql_file_fputs(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ const char *str, MYSQL_FILE *file)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ size_t bytes;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_WRITE);
+ if (likely(locker != NULL))
+ {
+ bytes= str ? strlen(str) : 0;
+ PSI_FILE_CALL(start_file_wait)(locker, bytes, src_file, src_line);
+ result= fputs(str, file->m_file);
+ PSI_FILE_CALL(end_file_wait)(locker, bytes);
+ return result;
+ }
+#endif
+
+ result= fputs(str, file->m_file);
+ return result;
+}
+
+static inline int
+inline_mysql_file_fputc(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ char c, MYSQL_FILE *file)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_WRITE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line);
+ result= fputc(c, file->m_file);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1);
+ return result;
+ }
+#endif
+
+ result= fputc(c, file->m_file);
+ return result;
+}
+
+static inline int
+inline_mysql_file_fprintf(MYSQL_FILE *file, const char *format, ...)
+{
+ /*
+ TODO: figure out how to pass src_file and src_line from the caller.
+ */
+ int result;
+ va_list args;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_WRITE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, __FILE__, __LINE__);
+ va_start(args, format);
+ result= vfprintf(file->m_file, format, args);
+ va_end(args);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) result);
+ return result;
+ }
+#endif
+
+ va_start(args, format);
+ result= vfprintf(file->m_file, format, args);
+ va_end(args);
+ return result;
+}
+
+static inline int
+inline_mysql_file_vfprintf(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file, const char *format, va_list args)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_WRITE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= vfprintf(file->m_file, format, args);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) result);
+ return result;
+ }
+#endif
+
+ result= vfprintf(file->m_file, format, args);
+ return result;
+}
+
+static inline int
+inline_mysql_file_fflush(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_FLUSH);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= fflush(file->m_file);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= fflush(file->m_file);
+ return result;
+}
+
+static inline int inline_mysql_file_feof(MYSQL_FILE *file)
+{
+ /* Not instrumented, there is no wait involved */
+ return feof(file->m_file);
+}
+
+static inline int
+inline_mysql_file_fstat(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ int filenr, MY_STAT *stat_area, myf flags)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, filenr, PSI_FILE_FSTAT);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_fstat(filenr, stat_area, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_fstat(filenr, stat_area, flags);
+ return result;
+}
+
+static inline MY_STAT *
+inline_mysql_file_stat(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *path, MY_STAT *stat_area, myf flags)
+{
+ MY_STAT *result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_STAT, path, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
+ result= my_stat(path, stat_area, flags);
+ PSI_FILE_CALL(end_file_open_wait)(locker, result);
+ return result;
+ }
+#endif
+
+ result= my_stat(path, stat_area, flags);
+ return result;
+}
+
+static inline int
+inline_mysql_file_chsize(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, my_off_t newlength, int filler, myf flags)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_CHSIZE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file,
+ src_line);
+ result= my_chsize(file, newlength, filler, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength);
+ return result;
+ }
+#endif
+
+ result= my_chsize(file, newlength, filler, flags);
+ return result;
+}
+
+static inline MYSQL_FILE*
+inline_mysql_file_fopen(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *filename, int flags, myf myFlags)
+{
+ MYSQL_FILE *that;
+ that= (MYSQL_FILE*) my_malloc(sizeof(MYSQL_FILE), MYF(MY_WME));
+ if (likely(that != NULL))
+ {
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_STREAM_OPEN, filename, that);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_open_wait)
+ (locker, src_file, src_line);
+ that->m_file= my_fopen(filename, flags, myFlags);
+ that->m_psi= PSI_FILE_CALL(end_file_open_wait)(locker, that->m_file);
+ if (unlikely(that->m_file == NULL))
+ {
+ my_free(that);
+ return NULL;
+ }
+ return that;
+ }
+#endif
+
+ that->m_psi= NULL;
+ that->m_file= my_fopen(filename, flags, myFlags);
+ if (unlikely(that->m_file == NULL))
+ {
+ my_free(that);
+ return NULL;
+ }
+ }
+ return that;
+}
+
+static inline int
+inline_mysql_file_fclose(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file, myf flags)
+{
+ int result= 0;
+ if (likely(file != NULL))
+ {
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_STREAM_CLOSE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
+ result= my_fclose(file->m_file, flags);
+ PSI_FILE_CALL(end_file_close_wait)(locker, result);
+ my_free(file);
+ return result;
+ }
+#endif
+
+ result= my_fclose(file->m_file, flags);
+ my_free(file);
+ }
+ return result;
+}
+
+static inline size_t
+inline_mysql_file_fread(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file, uchar *buffer, size_t count, myf flags)
+{
+ size_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ size_t bytes_read;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_READ);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
+ result= my_fread(file->m_file, buffer, count, flags);
+ if (flags & (MY_NABP | MY_FNABP))
+ bytes_read= (result == 0) ? count : 0;
+ else
+ bytes_read= (result != MY_FILE_ERROR) ? result : 0;
+ PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
+ return result;
+ }
+#endif
+
+ result= my_fread(file->m_file, buffer, count, flags);
+ return result;
+}
+
+static inline size_t
+inline_mysql_file_fwrite(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file, const uchar *buffer, size_t count, myf flags)
+{
+ size_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ size_t bytes_written;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_WRITE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
+ result= my_fwrite(file->m_file, buffer, count, flags);
+ if (flags & (MY_NABP | MY_FNABP))
+ bytes_written= (result == 0) ? count : 0;
+ else
+ bytes_written= (result != MY_FILE_ERROR) ? result : 0;
+ PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
+ return result;
+ }
+#endif
+
+ result= my_fwrite(file->m_file, buffer, count, flags);
+ return result;
+}
+
+static inline my_off_t
+inline_mysql_file_fseek(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file, my_off_t pos, int whence, myf flags)
+{
+ my_off_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_SEEK);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_fseek(file->m_file, pos, whence, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_fseek(file->m_file, pos, whence, flags);
+ return result;
+}
+
+static inline my_off_t
+inline_mysql_file_ftell(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_FILE *file, myf flags)
+{
+ my_off_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_stream_locker)
+ (&state, file->m_psi, PSI_FILE_TELL);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_ftell(file->m_file, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_ftell(file->m_file, flags);
+ return result;
+}
+
+static inline File
+inline_mysql_file_create(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *filename, int create_flags, int access_flags, myf myFlags)
+{
+ File file;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_CREATE, filename, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
+ file= my_create(filename, create_flags, access_flags, myFlags);
+ PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
+ return file;
+ }
+#endif
+
+ file= my_create(filename, create_flags, access_flags, myFlags);
+ return file;
+}
+
+static inline File
+inline_mysql_file_create_temp(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key,
+#endif
+ char *to, const char *dir, const char *pfx, int mode, myf myFlags)
+{
+ File file;
+ /*
+ TODO: This event is instrumented, but not timed.
+ The problem is that the file name is now known
+ before the create_temp_file call.
+ */
+ file= create_temp_file(to, dir, pfx, mode, myFlags);
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_FILE_CALL(create_file)(key, to, file);
+#endif
+ return file;
+}
+
+static inline File
+inline_mysql_file_open(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *filename, int flags, myf myFlags)
+{
+ File file;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_OPEN, filename, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
+ file= my_open(filename, flags, myFlags);
+ PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
+ return file;
+ }
+#endif
+
+ file= my_open(filename, flags, myFlags);
+ return file;
+}
+
+static inline int
+inline_mysql_file_close(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, myf flags)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_CLOSE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
+ result= my_close(file, flags);
+ PSI_FILE_CALL(end_file_close_wait)(locker, result);
+ return result;
+ }
+#endif
+
+ result= my_close(file, flags);
+ return result;
+}
+
+static inline size_t
+inline_mysql_file_read(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, uchar *buffer, size_t count, myf flags)
+{
+ size_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ size_t bytes_read;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_READ);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
+ result= my_read(file, buffer, count, flags);
+ if (flags & (MY_NABP | MY_FNABP))
+ bytes_read= (result == 0) ? count : 0;
+ else
+ bytes_read= (result != MY_FILE_ERROR) ? result : 0;
+ PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
+ return result;
+ }
+#endif
+
+ result= my_read(file, buffer, count, flags);
+ return result;
+}
+
+static inline size_t
+inline_mysql_file_write(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, const uchar *buffer, size_t count, myf flags)
+{
+ size_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ size_t bytes_written;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_WRITE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
+ result= my_write(file, buffer, count, flags);
+ if (flags & (MY_NABP | MY_FNABP))
+ bytes_written= (result == 0) ? count : 0;
+ else
+ bytes_written= (result != MY_FILE_ERROR) ? result : 0;
+ PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
+ return result;
+ }
+#endif
+
+ result= my_write(file, buffer, count, flags);
+ return result;
+}
+
+static inline size_t
+inline_mysql_file_pread(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, uchar *buffer, size_t count, my_off_t offset, myf flags)
+{
+ size_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ size_t bytes_read;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_READ);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
+ result= my_pread(file, buffer, count, offset, flags);
+ if (flags & (MY_NABP | MY_FNABP))
+ bytes_read= (result == 0) ? count : 0;
+ else
+ bytes_read= (result != MY_FILE_ERROR) ? result : 0;
+ PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
+ return result;
+ }
+#endif
+
+ result= my_pread(file, buffer, count, offset, flags);
+ return result;
+}
+
+static inline size_t
+inline_mysql_file_pwrite(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, const uchar *buffer, size_t count, my_off_t offset, myf flags)
+{
+ size_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ size_t bytes_written;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_WRITE);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
+ result= my_pwrite(file, buffer, count, offset, flags);
+ if (flags & (MY_NABP | MY_FNABP))
+ bytes_written= (result == 0) ? count : 0;
+ else
+ bytes_written= (result != MY_FILE_ERROR) ? result : 0;
+ PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
+ return result;
+ }
+#endif
+
+ result= my_pwrite(file, buffer, count, offset, flags);
+ return result;
+}
+
+static inline my_off_t
+inline_mysql_file_seek(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, my_off_t pos, int whence, myf flags)
+{
+ my_off_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_SEEK);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_seek(file, pos, whence, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_seek(file, pos, whence, flags);
+ return result;
+}
+
+static inline my_off_t
+inline_mysql_file_tell(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File file, myf flags)
+{
+ my_off_t result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, file, PSI_FILE_TELL);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_tell(file, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_tell(file, flags);
+ return result;
+}
+
+static inline int
+inline_mysql_file_delete(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *name, myf flags)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_DELETE, name, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
+ result= my_delete(name, flags);
+ PSI_FILE_CALL(end_file_close_wait)(locker, result);
+ return result;
+ }
+#endif
+
+ result= my_delete(name, flags);
+ return result;
+}
+
+static inline int
+inline_mysql_file_rename(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *from, const char *to, myf flags)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_RENAME, to, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_rename(from, to, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_rename(from, to, flags);
+ return result;
+}
+
+static inline File
+inline_mysql_file_create_with_symlink(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *linkname, const char *filename, int create_flags,
+ int access_flags, myf flags)
+{
+ File file;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_CREATE, filename, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
+ file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
+ flags);
+ PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
+ return file;
+ }
+#endif
+
+ file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
+ flags);
+ return file;
+}
+
+static inline int
+inline_mysql_file_delete_with_symlink(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *name, myf flags)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_DELETE, name, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
+ result= my_delete_with_symlink(name, flags);
+ PSI_FILE_CALL(end_file_close_wait)(locker, result);
+ return result;
+ }
+#endif
+
+ result= my_delete_with_symlink(name, flags);
+ return result;
+}
+
+static inline int
+inline_mysql_file_rename_with_symlink(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ PSI_file_key key, const char *src_file, uint src_line,
+#endif
+ const char *from, const char *to, myf flags)
+{
+ int result;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_name_locker)
+ (&state, key, PSI_FILE_RENAME, to, &locker);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_rename_with_symlink(from, to, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_rename_with_symlink(from, to, flags);
+ return result;
+}
+
+static inline int
+inline_mysql_file_sync(
+#ifdef HAVE_PSI_FILE_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ File fd, myf flags)
+{
+ int result= 0;
+#ifdef HAVE_PSI_FILE_INTERFACE
+ struct PSI_file_locker *locker;
+ PSI_file_locker_state state;
+ locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
+ (&state, fd, PSI_FILE_SYNC);
+ if (likely(locker != NULL))
+ {
+ PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
+ result= my_sync(fd, flags);
+ PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
+ return result;
+ }
+#endif
+
+ result= my_sync(fd, flags);
+ return result;
+}
+
+/** @} (end of group File_instrumentation) */
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_idle.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_idle.h
new file mode 100644
index 000000000..5c72b715b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_idle.h
@@ -0,0 +1,92 @@
+/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef MYSQL_IDLE_H
+#define MYSQL_IDLE_H
+
+/**
+ @file mysql/psi/mysql_idle.h
+ Instrumentation helpers for idle waits.
+*/
+
+#include "mysql/psi/psi.h"
+
+/**
+ @defgroup Idle_instrumentation Idle Instrumentation
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ @def MYSQL_START_IDLE_WAIT
+ Instrumentation helper for table io_waits.
+ This instrumentation marks the start of a wait event.
+ @param LOCKER the locker
+ @param STATE the locker state
+ @sa MYSQL_END_IDLE_WAIT.
+*/
+#ifdef HAVE_PSI_IDLE_INTERFACE
+ #define MYSQL_START_IDLE_WAIT(LOCKER, STATE) \
+ LOCKER= inline_mysql_start_idle_wait(STATE, __FILE__, __LINE__)
+#else
+ #define MYSQL_START_IDLE_WAIT(LOCKER, STATE) \
+ do {} while (0)
+#endif
+
+/**
+ @def MYSQL_END_IDLE_WAIT
+ Instrumentation helper for idle waits.
+ This instrumentation marks the end of a wait event.
+ @param LOCKER the locker
+ @sa MYSQL_START_IDLE_WAIT.
+*/
+#ifdef HAVE_PSI_IDLE_INTERFACE
+ #define MYSQL_END_IDLE_WAIT(LOCKER) \
+ inline_mysql_end_idle_wait(LOCKER)
+#else
+ #define MYSQL_END_IDLE_WAIT(LOCKER) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_IDLE_INTERFACE
+/**
+ Instrumentation calls for MYSQL_START_IDLE_WAIT.
+ @sa MYSQL_END_IDLE_WAIT.
+*/
+static inline struct PSI_idle_locker *
+inline_mysql_start_idle_wait(PSI_idle_locker_state *state,
+ const char *src_file, int src_line)
+{
+ struct PSI_idle_locker *locker;
+ locker= PSI_IDLE_CALL(start_idle_wait)(state, src_file, src_line);
+ return locker;
+}
+
+/**
+ Instrumentation calls for MYSQL_END_IDLE_WAIT.
+ @sa MYSQL_START_IDLE_WAIT.
+*/
+static inline void
+inline_mysql_end_idle_wait(struct PSI_idle_locker *locker)
+{
+ if (likely(locker != NULL))
+ PSI_IDLE_CALL(end_idle_wait)(locker);
+}
+#endif
+
+/** @} (end of group Idle_instrumentation) */
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_socket.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_socket.h
new file mode 100644
index 000000000..e1d56539f
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_socket.h
@@ -0,0 +1,1161 @@
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; version 2 of the
+License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA
+*/
+
+#ifndef MYSQL_SOCKET_H
+#define MYSQL_SOCKET_H
+
+/* For strlen() */
+#include
+/* For MY_STAT */
+#include
+/* For my_chsize */
+#include
+/* For socket api */
+#ifdef __WIN__
+ #include
+ #include
+ #include
+ #define SOCKBUF_T char
+#else
+ #include
+ #define SOCKBUF_T void
+#endif
+/**
+ @file mysql/psi/mysql_socket.h
+[...]
+*/
+
+#include "mysql/psi/psi.h"
+
+/**
+ @defgroup Socket_instrumentation Socket Instrumentation
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ @def mysql_socket_register(P1, P2, P3)
+ Socket registration.
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_register(P1, P2, P3) \
+ inline_mysql_socket_register(P1, P2, P3)
+#else
+ #define mysql_socket_register(P1, P2, P3) \
+ do {} while (0)
+#endif
+
+struct st_mysql_socket
+{
+ /** The real socket descriptor. */
+ my_socket fd;
+
+ /**
+ The instrumentation hook.
+ Note that this hook is not conditionally defined,
+ for binary compatibility of the @c MYSQL_SOCKET interface.
+ */
+ struct PSI_socket *m_psi;
+};
+
+/**
+ An instrumented socket.
+ @c MYSQL_SOCKET is a replacement for @c my_socket.
+*/
+typedef struct st_mysql_socket MYSQL_SOCKET;
+
+
+/**
+ @def MYSQL_INVALID_SOCKET
+ MYSQL_SOCKET initial value.
+*/
+//MYSQL_SOCKET MYSQL_INVALID_SOCKET= {INVALID_SOCKET, NULL};
+#define MYSQL_INVALID_SOCKET mysql_socket_invalid()
+
+/**
+ MYSQL_SOCKET helper. Initialize instrumented socket.
+ @sa mysql_socket_getfd
+ @sa mysql_socket_setfd
+*/
+static inline MYSQL_SOCKET
+mysql_socket_invalid()
+{
+ MYSQL_SOCKET mysql_socket= {INVALID_SOCKET, NULL};
+ return mysql_socket;
+}
+
+/**
+ Set socket descriptor and address.
+ @param socket nstrumented socket
+ @param fd socket descriptor
+ @param addr unformatted socket address
+ @param adr_len length of socket addres
+*/
+
+static inline void
+mysql_socket_set_address(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ MYSQL_SOCKET socket,
+ const struct sockaddr *addr,
+ socklen_t addr_len
+#else
+ MYSQL_SOCKET socket __attribute__ ((unused)),
+ const struct sockaddr *addr __attribute__ ((unused)),
+ socklen_t addr_len __attribute__ ((unused))
+#endif
+)
+{
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (socket.m_psi != NULL)
+ PSI_SOCKET_CALL(set_socket_info)(socket.m_psi, NULL, addr, addr_len);
+#endif
+}
+
+/**
+ Set socket descriptor and address.
+ @param socket instrumented socket
+ @param thread instrumented owning thread
+*/
+static inline void
+mysql_socket_set_thread_owner(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+MYSQL_SOCKET socket
+#else
+MYSQL_SOCKET socket __attribute__ ((unused))
+#endif
+)
+{
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (socket.m_psi != NULL)
+ PSI_SOCKET_CALL(set_socket_thread_owner)(socket.m_psi);
+#endif
+}
+
+/**
+ MYSQL_SOCKET helper. Get socket descriptor.
+ @param mysql_socket Instrumented socket
+ @sa mysql_socket_setfd
+*/
+static inline my_socket
+mysql_socket_getfd(MYSQL_SOCKET mysql_socket)
+{
+ return mysql_socket.fd;
+}
+
+/**
+ MYSQL_SOCKET helper. Set socket descriptor.
+ @param mysql_socket Instrumented socket
+ @param fd Socket descriptor
+ @sa mysql_socket_getfd
+*/
+static inline void
+mysql_socket_setfd(MYSQL_SOCKET *mysql_socket, my_socket fd)
+{
+ if (likely(mysql_socket != NULL))
+ mysql_socket->fd= fd;
+}
+
+/**
+ @def MYSQL_SOCKET_WAIT_VARIABLES
+ Instrumentation helper for socket waits.
+ This instrumentation declares local variables.
+ Do not use a ';' after this macro
+ @param LOCKER locker
+ @param STATE locker state
+ @sa MYSQL_START_SOCKET_WAIT.
+ @sa MYSQL_END_SOCKET_WAIT.
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define MYSQL_SOCKET_WAIT_VARIABLES(LOCKER, STATE) \
+ struct PSI_socket_locker* LOCKER; \
+ PSI_socket_locker_state STATE;
+#else
+ #define MYSQL_SOCKET_WAIT_VARIABLES(LOCKER, STATE)
+#endif
+
+/**
+ @def MYSQL_START_SOCKET_WAIT
+ Instrumentation helper for socket waits.
+ This instrumentation marks the start of a wait event.
+ @param LOCKER locker
+ @param STATE locker state
+ @param SOCKET instrumented socket
+ @param OP The socket operation to be performed
+ @param FLAGS per-socket operation flags.
+ @param COUNT bytes to be written/read
+ @sa MYSQL_END_SOCKET_WAIT.
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define MYSQL_START_SOCKET_WAIT(LOCKER, STATE, SOCKET, OP, COUNT) \
+ LOCKER= inline_mysql_start_socket_wait(STATE, SOCKET, OP, COUNT,\
+ __FILE__, __LINE__)
+#else
+ #define MYSQL_START_SOCKET_WAIT(LOCKER, STATE, SOCKET, OP, COUNT) \
+ do {} while (0)
+#endif
+
+/**
+ @def MYSQL_END_SOCKET_WAIT
+ Instrumentation helper for socket waits.
+ This instrumentation marks the end of a wait event.
+ @param LOCKER locker
+ @param COUNT actual bytes written/read, or -1
+ @sa MYSQL_START_SOCKET_WAIT.
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define MYSQL_END_SOCKET_WAIT(LOCKER, COUNT) \
+ inline_mysql_end_socket_wait(LOCKER, COUNT)
+#else
+ #define MYSQL_END_SOCKET_WAIT(LOCKER, COUNT) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define MYSQL_SOCKET_SET_STATE(SOCKET, STATE) \
+ inline_mysql_socket_set_state(SOCKET, STATE)
+#else
+ #define MYSQL_SOCKET_SET_STATE(SOCKET, STATE) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+/**
+ Instrumentation calls for MYSQL_START_SOCKET_WAIT.
+ @sa MYSQL_START_SOCKET_WAIT.
+*/
+static inline struct PSI_socket_locker*
+inline_mysql_start_socket_wait(PSI_socket_locker_state *state,
+ MYSQL_SOCKET mysql_socket,
+ enum PSI_socket_operation op,
+ size_t byte_count,
+ const char *src_file, int src_line)
+{
+ struct PSI_socket_locker *locker;
+ if (mysql_socket.m_psi != NULL)
+ {
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (state, mysql_socket.m_psi, op, byte_count, src_file, src_line);
+ }
+ else
+ locker= NULL;
+ return locker;
+}
+
+/**
+ Instrumentation calls for MYSQL_END_SOCKET_WAIT.
+ @sa MYSQL_END_SOCKET_WAIT.
+*/
+static inline void
+inline_mysql_end_socket_wait(struct PSI_socket_locker *locker, size_t byte_count)
+{
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, byte_count);
+}
+
+/**
+ Set the state (IDLE, ACTIVE) of an instrumented socket.
+ @param socket the instrumented socket
+ @param state the new state
+ @sa PSI_socket_state
+*/
+static inline void
+inline_mysql_socket_set_state(MYSQL_SOCKET socket, enum PSI_socket_state state)
+{
+ if (socket.m_psi != NULL)
+ PSI_SOCKET_CALL(set_socket_state)(socket.m_psi, state);
+}
+#endif /* HAVE_PSI_SOCKET_INTERFACE */
+
+/**
+ @def mysql_socket_socket(K, D, T, P)
+ Create a socket.
+ @c mysql_socket_socket is a replacement for @c socket.
+ @param K PSI_socket_key for this instrumented socket
+ @param D Socket domain
+ @param T Protocol type
+ @param P Transport protocol
+*/
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_socket(K, D, T, P) \
+ inline_mysql_socket_socket(K, D, T, P)
+#else
+ #define mysql_socket_socket(K, D, T, P) \
+ inline_mysql_socket_socket(D, T, P)
+#endif
+
+/**
+ @def mysql_socket_bind(FD, AP, L)
+ Bind a socket to a local port number and IP address
+ @c mysql_socket_bind is a replacement for @c bind.
+ @param FD Instrumented socket descriptor returned by socket()
+ @param AP Pointer to local port number and IP address in sockaddr structure
+ @param L Length of sockaddr structure
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_bind(FD, AP, L) \
+ inline_mysql_socket_bind(__FILE__, __LINE__, FD, AP, L)
+#else
+ #define mysql_socket_bind(FD, AP, L) \
+ inline_mysql_socket_bind(FD, AP, L)
+#endif
+
+/**
+ @def mysql_socket_getsockname(FD, AP, LP)
+ Return port number and IP address of the local host
+ @c mysql_socket_getsockname is a replacement for @c getsockname.
+ @param FD Instrumented socket descriptor returned by socket()
+ @param A Pointer to returned address of local host in sockaddr structure
+ @param L Pointer to length of sockaddr structure
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_getsockname(FD, AP, LP) \
+ inline_mysql_socket_getsockname(__FILE__, __LINE__, FD, AP, LP)
+#else
+ #define mysql_socket_getsockname(FD, AP, LP) \
+ inline_mysql_socket_getsockname(FD, AP, LP)
+#endif
+
+/**
+ @def mysql_socket_connect(FD, AP, L)
+ Establish a connection to a remote host.
+ @c mysql_socket_connect is a replacement for @c connect.
+ @param FD Instrumented socket descriptor returned by socket()
+ @param AP Pointer to target address in sockaddr structure
+ @param L Length of sockaddr structure
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_connect(FD, AP, L) \
+ inline_mysql_socket_connect(__FILE__, __LINE__, FD, AP, L)
+#else
+ #define mysql_socket_connect(FD, AP, L) \
+ inline_mysql_socket_connect(FD, AP, L)
+#endif
+
+/**
+ @def mysql_socket_getpeername(FD, AP, LP)
+ Get port number and IP address of remote host that a socket is connected to.
+ @c mysql_socket_getpeername is a replacement for @c getpeername.
+ @param FD Instrumented socket descriptor returned by socket() or accept()
+ @param AP Pointer to returned address of remote host in sockaddr structure
+ @param LP Pointer to length of sockaddr structure
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_getpeername(FD, AP, LP) \
+ inline_mysql_socket_getpeername(__FILE__, __LINE__, FD, AP, LP)
+#else
+ #define mysql_socket_getpeername(FD, AP, LP) \
+ inline_mysql_socket_getpeername(FD, AP, LP)
+#endif
+
+/**
+ @def mysql_socket_send(FD, B, N, FL)
+ Send data from the buffer, B, to a connected socket.
+ @c mysql_socket_send is a replacement for @c send.
+ @param FD Instrumented socket descriptor returned by socket() or accept()
+ @param B Buffer to send
+ @param N Number of bytes to send
+ @param FL Control flags
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_send(FD, B, N, FL) \
+ inline_mysql_socket_send(__FILE__, __LINE__, FD, B, N, FL)
+#else
+ #define mysql_socket_send(FD, B, N, FL) \
+ inline_mysql_socket_send(FD, B, N, FL)
+#endif
+
+/**
+ @def mysql_socket_recv(FD, B, N, FL)
+ Receive data from a connected socket.
+ @c mysql_socket_recv is a replacement for @c recv.
+ @param FD Instrumented socket descriptor returned by socket() or accept()
+ @param B Buffer to receive to
+ @param N Maximum bytes to receive
+ @param FL Control flags
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_recv(FD, B, N, FL) \
+ inline_mysql_socket_recv(__FILE__, __LINE__, FD, B, N, FL)
+#else
+ #define mysql_socket_recv(FD, B, N, FL) \
+ inline_mysql_socket_recv(FD, B, N, FL)
+#endif
+
+/**
+ @def mysql_socket_sendto(FD, B, N, FL, AP, L)
+ Send data to a socket at the specified address.
+ @c mysql_socket_sendto is a replacement for @c sendto.
+ @param FD Instrumented socket descriptor returned by socket()
+ @param B Buffer to send
+ @param N Number of bytes to send
+ @param FL Control flags
+ @param AP Pointer to destination sockaddr structure
+ @param L Size of sockaddr structure
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_sendto(FD, B, N, FL, AP, L) \
+ inline_mysql_socket_sendto(__FILE__, __LINE__, FD, B, N, FL, AP, L)
+#else
+ #define mysql_socket_sendto(FD, B, N, FL, AP, L) \
+ inline_mysql_socket_sendto(FD, B, N, FL, AP, L)
+#endif
+
+/**
+ @def mysql_socket_recvfrom(FD, B, N, FL, AP, L)
+ Receive data from a socket and return source address information
+ @c mysql_socket_recvfrom is a replacement for @c recvfrom.
+ @param FD Instrumented socket descriptor returned by socket()
+ @param B Buffer to receive to
+ @param N Maximum bytes to receive
+ @param FL Control flags
+ @param AP Pointer to source address in sockaddr_storage structure
+ @param L Size of sockaddr_storage structure
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_recvfrom(FD, B, N, FL, AP, LP) \
+ inline_mysql_socket_recvfrom(__FILE__, __LINE__, FD, B, N, FL, AP, LP)
+#else
+ #define mysql_socket_recvfrom(FD, B, N, FL, AP, LP) \
+ inline_mysql_socket_recvfrom(FD, B, N, FL, AP, LP)
+#endif
+
+/**
+ @def mysql_socket_getsockopt(FD, LV, ON, OP, OL)
+ Get a socket option for the specified socket.
+ @c mysql_socket_getsockopt is a replacement for @c getsockopt.
+ @param FD Instrumented socket descriptor returned by socket()
+ @param LV Protocol level
+ @param ON Option to query
+ @param OP Buffer which will contain the value for the requested option
+ @param OL Pointer to length of OP
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_getsockopt(FD, LV, ON, OP, OL) \
+ inline_mysql_socket_getsockopt(__FILE__, __LINE__, FD, LV, ON, OP, OL)
+#else
+ #define mysql_socket_getsockopt(FD, LV, ON, OP, OL) \
+ inline_mysql_socket_getsockopt(FD, LV, ON, OP, OL)
+#endif
+
+/**
+ @def mysql_socket_setsockopt(FD, LV, ON, OP, OL)
+ Set a socket option for the specified socket.
+ @c mysql_socket_setsockopt is a replacement for @c setsockopt.
+ @param FD Instrumented socket descriptor returned by socket()
+ @param LV Protocol level
+ @param ON Option to modify
+ @param OP Buffer containing the value for the specified option
+ @param OL Pointer to length of OP
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_setsockopt(FD, LV, ON, OP, OL) \
+ inline_mysql_socket_setsockopt(__FILE__, __LINE__, FD, LV, ON, OP, OL)
+#else
+ #define mysql_socket_setsockopt(FD, LV, ON, OP, OL) \
+ inline_mysql_socket_setsockopt(FD, LV, ON, OP, OL)
+#endif
+
+/**
+ @def mysql_socket_listen(FD, N)
+ Set socket state to listen for an incoming connection.
+ @c mysql_socket_listen is a replacement for @c listen.
+ @param FD Instrumented socket descriptor, bound and connected
+ @param N Maximum number of pending connections allowed.
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_listen(FD, N) \
+ inline_mysql_socket_listen(__FILE__, __LINE__, FD, N)
+#else
+ #define mysql_socket_listen(FD, N) \
+ inline_mysql_socket_listen(FD, N)
+#endif
+
+/**
+ @def mysql_socket_accept(K, FD, AP, LP)
+ Accept a connection from any remote host; TCP only.
+ @c mysql_socket_accept is a replacement for @c accept.
+ @param K PSI_socket_key for this instrumented socket
+ @param FD Instrumented socket descriptor, bound and placed in a listen state
+ @param AP Pointer to sockaddr structure with returned IP address and port of connected host
+ @param LP Pointer to length of valid information in AP
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_accept(K, FD, AP, LP) \
+ inline_mysql_socket_accept(__FILE__, __LINE__, K, FD, AP, LP)
+#else
+ #define mysql_socket_accept(K, FD, AP, LP) \
+ inline_mysql_socket_accept(FD, AP, LP)
+#endif
+
+/**
+ @def mysql_socket_close(FD)
+ Close a socket and sever any connections.
+ @c mysql_socket_close is a replacement for @c close.
+ @param FD Instrumented socket descriptor returned by socket() or accept()
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_close(FD) \
+ inline_mysql_socket_close(__FILE__, __LINE__, FD)
+#else
+ #define mysql_socket_close(FD) \
+ inline_mysql_socket_close(FD)
+#endif
+
+/**
+ @def mysql_socket_shutdown(FD, H)
+ Disable receives and/or sends on a socket.
+ @c mysql_socket_shutdown is a replacement for @c shutdown.
+ @param FD Instrumented socket descriptor returned by socket() or accept()
+ @param H Specifies which operations to shutdown
+*/
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ #define mysql_socket_shutdown(FD, H) \
+ inline_mysql_socket_shutdown(__FILE__, __LINE__, FD, H)
+#else
+ #define mysql_socket_shutdown(FD, H) \
+ inline_mysql_socket_shutdown(FD, H)
+#endif
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+static inline void inline_mysql_socket_register(
+ const char *category,
+ PSI_socket_info *info,
+ int count)
+{
+ PSI_SOCKET_CALL(register_socket)(category, info, count);
+}
+#endif
+
+/** mysql_socket_socket */
+
+static inline MYSQL_SOCKET
+inline_mysql_socket_socket
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ PSI_socket_key key,
+#endif
+ int domain, int type, int protocol)
+{
+ MYSQL_SOCKET mysql_socket= MYSQL_INVALID_SOCKET;
+ mysql_socket.fd= socket(domain, type, protocol);
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (likely(mysql_socket.fd != INVALID_SOCKET))
+ {
+ mysql_socket.m_psi= PSI_SOCKET_CALL(init_socket)
+ (key, (const my_socket*)&mysql_socket.fd, NULL, 0);
+ }
+#endif
+ return mysql_socket;
+}
+
+/** mysql_socket_bind */
+
+static inline int
+inline_mysql_socket_bind
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, const struct sockaddr *addr, socklen_t len)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker_state state;
+ PSI_socket_locker *locker;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_BIND, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= bind(mysql_socket.fd, addr, len);
+
+ /* Instrumentation end */
+ if (result == 0)
+ PSI_SOCKET_CALL(set_socket_info)(mysql_socket.m_psi, NULL, addr, len);
+
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= bind(mysql_socket.fd, addr, len);
+ return result;
+}
+
+/** mysql_socket_getsockname */
+
+static inline int
+inline_mysql_socket_getsockname
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, struct sockaddr *addr, socklen_t *len)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_BIND, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= getsockname(mysql_socket.fd, addr, len);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= getsockname(mysql_socket.fd, addr, len);
+
+ return result;
+}
+
+/** mysql_socket_connect */
+
+static inline int
+inline_mysql_socket_connect
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, const struct sockaddr *addr, socklen_t len)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_CONNECT, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= connect(mysql_socket.fd, addr, len);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= connect(mysql_socket.fd, addr, len);
+
+ return result;
+}
+
+/** mysql_socket_getpeername */
+
+static inline int
+inline_mysql_socket_getpeername
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, struct sockaddr *addr, socklen_t *len)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_BIND, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= getpeername(mysql_socket.fd, addr, len);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= getpeername(mysql_socket.fd, addr, len);
+
+ return result;
+}
+
+/** mysql_socket_send */
+
+static inline ssize_t
+inline_mysql_socket_send
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, const SOCKBUF_T *buf, size_t n, int flags)
+{
+ ssize_t result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_SEND, n, src_file, src_line);
+
+ /* Instrumented code */
+ result= send(mysql_socket.fd, buf, IF_WIN((int),) n, flags);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ {
+ size_t bytes_written;
+ bytes_written= (result > -1) ? result : 0;
+ PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_written);
+ }
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= send(mysql_socket.fd, buf, IF_WIN((int),) n, flags);
+
+ return result;
+}
+
+/** mysql_socket_recv */
+
+static inline ssize_t
+inline_mysql_socket_recv
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, SOCKBUF_T *buf, size_t n, int flags)
+{
+ ssize_t result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_RECV, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= recv(mysql_socket.fd, buf, IF_WIN((int),) n, flags);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ {
+ size_t bytes_read;
+ bytes_read= (result > -1) ? result : 0;
+ PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_read);
+ }
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= recv(mysql_socket.fd, buf, IF_WIN((int),) n, flags);
+
+ return result;
+}
+
+/** mysql_socket_sendto */
+
+static inline ssize_t
+inline_mysql_socket_sendto
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, const SOCKBUF_T *buf, size_t n, int flags, const struct sockaddr *addr, socklen_t addr_len)
+{
+ ssize_t result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_SEND, n, src_file, src_line);
+
+ /* Instrumented code */
+ result= sendto(mysql_socket.fd, buf, IF_WIN((int),) n, flags, addr, addr_len);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ {
+ size_t bytes_written;
+ bytes_written = (result > -1) ? result : 0;
+ PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_written);
+ }
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= sendto(mysql_socket.fd, buf, IF_WIN((int),) n, flags, addr, addr_len);
+
+ return result;
+}
+
+/** mysql_socket_recvfrom */
+
+static inline ssize_t
+inline_mysql_socket_recvfrom
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, SOCKBUF_T *buf, size_t n, int flags,
+ struct sockaddr *addr, socklen_t *addr_len)
+{
+ ssize_t result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_RECV, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= recvfrom(mysql_socket.fd, buf, IF_WIN((int),) n, flags, addr, addr_len);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ {
+ size_t bytes_read;
+ bytes_read = (result > -1) ? result : 0;
+ PSI_SOCKET_CALL(end_socket_wait)(locker, bytes_read);
+ }
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= recvfrom(mysql_socket.fd, buf, IF_WIN((int),) n, flags, addr, addr_len);
+
+ return result;
+}
+
+/** mysql_socket_getsockopt */
+
+static inline int
+inline_mysql_socket_getsockopt
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, int level, int optname, SOCKBUF_T *optval, socklen_t *optlen)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_OPT, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= getsockopt(mysql_socket.fd, level, optname, optval, optlen);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= getsockopt(mysql_socket.fd, level, optname, optval, optlen);
+
+ return result;
+}
+
+/** mysql_socket_setsockopt */
+
+static inline int
+inline_mysql_socket_setsockopt
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, int level, int optname, const SOCKBUF_T *optval,
+ socklen_t optlen)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_OPT, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= setsockopt(mysql_socket.fd, level, optname, optval, optlen);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= setsockopt(mysql_socket.fd, level, optname, optval, optlen);
+
+ return result;
+}
+
+/** mysql_socket_listen */
+
+static inline int
+inline_mysql_socket_listen
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, int backlog)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_CONNECT, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= listen(mysql_socket.fd, backlog);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= listen(mysql_socket.fd, backlog);
+
+ return result;
+}
+
+/** mysql_socket_accept */
+
+static inline MYSQL_SOCKET
+inline_mysql_socket_accept
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line, PSI_socket_key key,
+#endif
+ MYSQL_SOCKET socket_listen, struct sockaddr *addr, socklen_t *addr_len)
+{
+ MYSQL_SOCKET socket_accept= MYSQL_INVALID_SOCKET;
+ socklen_t addr_length= (addr_len != NULL) ? *addr_len : 0;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (socket_listen.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, socket_listen.m_psi, PSI_SOCKET_CONNECT, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ socket_accept.fd= accept(socket_listen.fd, addr, &addr_length);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+ }
+ else
+#endif
+ {
+ /* Non instrumented code */
+ socket_accept.fd= accept(socket_listen.fd, addr, &addr_length);
+ }
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (likely(socket_accept.fd != INVALID_SOCKET))
+ {
+ /* Initialize the instrument with the new socket descriptor and address */
+ socket_accept.m_psi= PSI_SOCKET_CALL(init_socket)
+ (key, (const my_socket*)&socket_accept.fd, addr, addr_length);
+ }
+#endif
+
+ return socket_accept;
+}
+
+/** mysql_socket_close */
+
+static inline int
+inline_mysql_socket_close
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket)
+{
+ int result;
+
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_CLOSE, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+ result= closesocket(mysql_socket.fd);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+ /* Remove the instrumentation for this socket. */
+ if (mysql_socket.m_psi != NULL)
+ PSI_SOCKET_CALL(destroy_socket)(mysql_socket.m_psi);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= closesocket(mysql_socket.fd);
+
+ return result;
+}
+
+/** mysql_socket_shutdown */
+
+static inline int
+inline_mysql_socket_shutdown
+(
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ const char *src_file, uint src_line,
+#endif
+ MYSQL_SOCKET mysql_socket, int how)
+{
+ int result;
+
+#ifdef __WIN__
+ static LPFN_DISCONNECTEX DisconnectEx = NULL;
+ if (DisconnectEx == NULL)
+ {
+ DWORD dwBytesReturned;
+ GUID guidDisconnectEx = WSAID_DISCONNECTEX;
+ WSAIoctl(mysql_socket.fd, SIO_GET_EXTENSION_FUNCTION_POINTER,
+ &guidDisconnectEx, sizeof(GUID),
+ &DisconnectEx, sizeof(DisconnectEx),
+ &dwBytesReturned, NULL, NULL);
+ }
+#endif
+
+/* Instrumentation start */
+#ifdef HAVE_PSI_SOCKET_INTERFACE
+ if (mysql_socket.m_psi != NULL)
+ {
+ PSI_socket_locker *locker;
+ PSI_socket_locker_state state;
+ locker= PSI_SOCKET_CALL(start_socket_wait)
+ (&state, mysql_socket.m_psi, PSI_SOCKET_SHUTDOWN, (size_t)0, src_file, src_line);
+
+ /* Instrumented code */
+#ifdef __WIN__
+ if (DisconnectEx)
+ result= (DisconnectEx(mysql_socket.fd, (LPOVERLAPPED) NULL,
+ (DWORD) 0, (DWORD) 0) == TRUE) ? 0 : -1;
+ else
+#endif
+ result= shutdown(mysql_socket.fd, how);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+#ifdef __WIN__
+ if (DisconnectEx)
+ result= (DisconnectEx(mysql_socket.fd, (LPOVERLAPPED) NULL,
+ (DWORD) 0, (DWORD) 0) == TRUE) ? 0 : -1;
+ else
+#endif
+ result= shutdown(mysql_socket.fd, how);
+
+ return result;
+}
+
+/** @} (end of group Socket_instrumentation) */
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_stage.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_stage.h
new file mode 100644
index 000000000..91a5c12f8
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_stage.h
@@ -0,0 +1,72 @@
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MYSQL_STAGE_H
+#define MYSQL_STAGE_H
+
+/**
+ @file mysql/psi/mysql_stage.h
+ Instrumentation helpers for stages.
+*/
+
+#include "mysql/psi/psi.h"
+
+/**
+ @defgroup Stage_instrumentation Stage Instrumentation
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ @def mysql_stage_register(P1, P2, P3)
+ Stage registration.
+*/
+#ifdef HAVE_PSI_STAGE_INTERFACE
+#define mysql_stage_register(P1, P2, P3) \
+ inline_mysql_stage_register(P1, P2, P3)
+#else
+#define mysql_stage_register(P1, P2, P3) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STAGE_INTERFACE
+ #define MYSQL_SET_STAGE(K, F, L) \
+ inline_mysql_set_stage(K, F, L)
+#else
+ #define MYSQL_SET_STAGE(K, F, L) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STAGE_INTERFACE
+static inline void inline_mysql_stage_register(
+ const char *category, PSI_stage_info **info, int count)
+{
+ PSI_STAGE_CALL(register_stage)(category, info, count);
+}
+#endif
+
+#ifdef HAVE_PSI_STAGE_INTERFACE
+static inline void
+inline_mysql_set_stage(PSI_stage_key key,
+ const char *src_file, int src_line)
+{
+ PSI_STAGE_CALL(start_stage)(key, src_file, src_line);
+}
+#endif
+
+/** @} (end of group Stage_instrumentation) */
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_statement.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_statement.h
new file mode 100644
index 000000000..d7a76ee25
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_statement.h
@@ -0,0 +1,230 @@
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MYSQL_STATEMENT_H
+#define MYSQL_STATEMENT_H
+
+/**
+ @file mysql/psi/mysql_statement.h
+ Instrumentation helpers for statements.
+*/
+
+#include "mysql/psi/psi.h"
+
+/**
+ @defgroup Statement_instrumentation Statement Instrumentation
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ @def mysql_statement_register(P1, P2, P3)
+ Statement registration.
+*/
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+#define mysql_statement_register(P1, P2, P3) \
+ inline_mysql_statement_register(P1, P2, P3)
+#else
+#define mysql_statement_register(P1, P2, P3) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
+ #define MYSQL_DIGEST_START(LOCKER) \
+ inline_mysql_digest_start(LOCKER)
+#else
+ #define MYSQL_DIGEST_START(LOCKER) \
+ NULL
+#endif
+#else
+ #define MYSQL_DIGEST_START(LOCKER) \
+ NULL
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
+ #define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
+ inline_mysql_add_token(LOCKER, T, Y)
+#else
+ #define MYSQL_ADD_TOKEN(LOCKER, T, Y) \
+ NULL
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+ #define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS) \
+ inline_mysql_start_statement(STATE, K, DB, DB_LEN, CS, __FILE__, __LINE__)
+#else
+ #define MYSQL_START_STATEMENT(STATE, K, DB, DB_LEN, CS) \
+ NULL
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+ #define MYSQL_REFINE_STATEMENT(LOCKER, K) \
+ inline_mysql_refine_statement(LOCKER, K)
+#else
+ #define MYSQL_REFINE_STATEMENT(LOCKER, K) \
+ NULL
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+ #define MYSQL_SET_STATEMENT_TEXT(LOCKER, P1, P2) \
+ inline_mysql_set_statement_text(LOCKER, P1, P2)
+#else
+ #define MYSQL_SET_STATEMENT_TEXT(LOCKER, P1, P2) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+ #define MYSQL_SET_STATEMENT_LOCK_TIME(LOCKER, P1) \
+ inline_mysql_set_statement_lock_time(LOCKER, P1)
+#else
+ #define MYSQL_SET_STATEMENT_LOCK_TIME(LOCKER, P1) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+ #define MYSQL_SET_STATEMENT_ROWS_SENT(LOCKER, P1) \
+ inline_mysql_set_statement_rows_sent(LOCKER, P1)
+#else
+ #define MYSQL_SET_STATEMENT_ROWS_SENT(LOCKER, P1) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+ #define MYSQL_SET_STATEMENT_ROWS_EXAMINED(LOCKER, P1) \
+ inline_mysql_set_statement_rows_examined(LOCKER, P1)
+#else
+ #define MYSQL_SET_STATEMENT_ROWS_EXAMINED(LOCKER, P1) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+ #define MYSQL_END_STATEMENT(LOCKER, DA) \
+ inline_mysql_end_statement(LOCKER, DA)
+#else
+ #define MYSQL_END_STATEMENT(LOCKER, DA) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_INTERFACE
+static inline void inline_mysql_statement_register(
+ const char *category, PSI_statement_info *info, int count)
+{
+ PSI_STATEMENT_CALL(register_statement)(category, info, count);
+}
+
+#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
+static inline struct PSI_digest_locker *
+inline_mysql_digest_start(PSI_statement_locker *locker)
+{
+ PSI_digest_locker* digest_locker= NULL;
+
+ if (likely(locker != NULL))
+ digest_locker= PSI_STATEMENT_CALL(digest_start)(locker);
+ return digest_locker;
+}
+#endif
+
+#ifdef HAVE_PSI_STATEMENT_DIGEST_INTERFACE
+static inline struct PSI_digest_locker *
+inline_mysql_add_token(PSI_digest_locker *locker, uint token,
+ void *yylval)
+{
+ if (likely(locker != NULL))
+ locker= PSI_STATEMENT_CALL(digest_add_token)(locker, token,
+ (OPAQUE_LEX_YYSTYPE*)yylval);
+ return locker;
+}
+#endif
+
+static inline struct PSI_statement_locker *
+inline_mysql_start_statement(PSI_statement_locker_state *state,
+ PSI_statement_key key,
+ const char *db, uint db_len,
+ const CHARSET_INFO *charset,
+ const char *src_file, int src_line)
+{
+ PSI_statement_locker *locker;
+ locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset);
+ if (likely(locker != NULL))
+ PSI_STATEMENT_CALL(start_statement)(locker, db, db_len, src_file, src_line);
+ return locker;
+}
+
+static inline struct PSI_statement_locker *
+inline_mysql_refine_statement(PSI_statement_locker *locker,
+ PSI_statement_key key)
+{
+ if (likely(locker != NULL))
+ {
+ locker= PSI_STATEMENT_CALL(refine_statement)(locker, key);
+ }
+ return locker;
+}
+
+static inline void
+inline_mysql_set_statement_text(PSI_statement_locker *locker,
+ const char *text, uint text_len)
+{
+ if (likely(locker != NULL))
+ {
+ PSI_STATEMENT_CALL(set_statement_text)(locker, text, text_len);
+ }
+}
+
+static inline void
+inline_mysql_set_statement_lock_time(PSI_statement_locker *locker,
+ ulonglong count)
+{
+ if (likely(locker != NULL))
+ {
+ PSI_STATEMENT_CALL(set_statement_lock_time)(locker, count);
+ }
+}
+
+static inline void
+inline_mysql_set_statement_rows_sent(PSI_statement_locker *locker,
+ ulonglong count)
+{
+ if (likely(locker != NULL))
+ {
+ PSI_STATEMENT_CALL(set_statement_rows_sent)(locker, count);
+ }
+}
+
+static inline void
+inline_mysql_set_statement_rows_examined(PSI_statement_locker *locker,
+ ulonglong count)
+{
+ if (likely(locker != NULL))
+ {
+ PSI_STATEMENT_CALL(set_statement_rows_examined)(locker, count);
+ }
+}
+
+static inline void
+inline_mysql_end_statement(struct PSI_statement_locker *locker,
+ Diagnostics_area *stmt_da)
+{
+ PSI_STAGE_CALL(end_stage)();
+ if (likely(locker != NULL))
+ PSI_STATEMENT_CALL(end_statement)(locker, stmt_da);
+}
+#endif
+
+/** @} (end of group Statement_instrumentation) */
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_table.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_table.h
new file mode 100644
index 000000000..815313e65
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_table.h
@@ -0,0 +1,189 @@
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef MYSQL_TABLE_H
+#define MYSQL_TABLE_H
+
+/**
+ @file mysql/psi/mysql_table.h
+ Instrumentation helpers for table io.
+*/
+
+#include "mysql/psi/psi.h"
+
+/**
+ @defgroup Table_instrumentation Table Instrumentation
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ @def MYSQL_TABLE_WAIT_VARIABLES
+ Instrumentation helper for table waits.
+ This instrumentation declares local variables.
+ Do not use a ';' after this macro
+ @param LOCKER the locker
+ @param STATE the locker state
+ @sa MYSQL_START_TABLE_IO_WAIT.
+ @sa MYSQL_END_TABLE_IO_WAIT.
+ @sa MYSQL_START_TABLE_LOCK_WAIT.
+ @sa MYSQL_END_TABLE_LOCK_WAIT.
+*/
+#ifdef HAVE_PSI_TABLE_INTERFACE
+ #define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE) \
+ struct PSI_table_locker* LOCKER; \
+ PSI_table_locker_state STATE;
+#else
+ #define MYSQL_TABLE_WAIT_VARIABLES(LOCKER, STATE)
+#endif
+
+/**
+ @def MYSQL_TABLE_IO_WAIT
+ Instrumentation helper for table io_waits.
+ This instrumentation marks the start of a wait event.
+ @param PSI the instrumented table
+ @param OP the table operation to be performed
+ @param INDEX the table index used if any, or MAY_KEY.
+ @param FLAGS per table operation flags.
+ @sa MYSQL_END_TABLE_WAIT.
+*/
+#ifdef HAVE_PSI_TABLE_INTERFACE
+ #define MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD) \
+ { \
+ if (PSI != NULL) \
+ { \
+ PSI_table_locker *locker; \
+ PSI_table_locker_state state; \
+ locker= PSI_TABLE_CALL(start_table_io_wait) \
+ (& state, PSI, OP, INDEX, __FILE__, __LINE__); \
+ PAYLOAD \
+ if (locker != NULL) \
+ PSI_TABLE_CALL(end_table_io_wait)(locker); \
+ } \
+ else \
+ { \
+ PAYLOAD \
+ } \
+ }
+#else
+ #define MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD) \
+ PAYLOAD
+#endif
+
+/**
+ @def MYSQL_TABLE_LOCK_WAIT
+ Instrumentation helper for table io_waits.
+ This instrumentation marks the start of a wait event.
+ @param PSI the instrumented table
+ @param OP the table operation to be performed
+ @param INDEX the table index used if any, or MAY_KEY.
+ @param FLAGS per table operation flags.
+ @sa MYSQL_END_TABLE_WAIT.
+*/
+#ifdef HAVE_PSI_TABLE_INTERFACE
+ #define MYSQL_TABLE_LOCK_WAIT(PSI, OP, FLAGS, PAYLOAD) \
+ { \
+ if (PSI != NULL) \
+ { \
+ PSI_table_locker *locker; \
+ PSI_table_locker_state state; \
+ locker= PSI_TABLE_CALL(start_table_lock_wait) \
+ (& state, PSI, OP, FLAGS, __FILE__, __LINE__); \
+ PAYLOAD \
+ if (locker != NULL) \
+ PSI_TABLE_CALL(end_table_lock_wait)(locker); \
+ } \
+ else \
+ { \
+ PAYLOAD \
+ } \
+ }
+#else
+ #define MYSQL_TABLE_LOCK_WAIT(PSI, OP, FLAGS, PAYLOAD) \
+ PAYLOAD
+#endif
+
+/**
+ @def MYSQL_START_TABLE_LOCK_WAIT
+ Instrumentation helper for table lock waits.
+ This instrumentation marks the start of a wait event.
+ @param LOCKER the locker
+ @param STATE the locker state
+ @param PSI the instrumented table
+ @param OP the table operation to be performed
+ @param FLAGS per table operation flags.
+ @sa MYSQL_END_TABLE_LOCK_WAIT.
+*/
+#ifdef HAVE_PSI_TABLE_INTERFACE
+ #define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
+ LOCKER= inline_mysql_start_table_lock_wait(STATE, PSI, \
+ OP, FLAGS, __FILE__, __LINE__)
+#else
+ #define MYSQL_START_TABLE_LOCK_WAIT(LOCKER, STATE, PSI, OP, FLAGS) \
+ do {} while (0)
+#endif
+
+/**
+ @def MYSQL_END_TABLE_LOCK_WAIT
+ Instrumentation helper for table lock waits.
+ This instrumentation marks the end of a wait event.
+ @param LOCKER the locker
+ @sa MYSQL_START_TABLE_LOCK_WAIT.
+*/
+#ifdef HAVE_PSI_TABLE_INTERFACE
+ #define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
+ inline_mysql_end_table_lock_wait(LOCKER)
+#else
+ #define MYSQL_END_TABLE_LOCK_WAIT(LOCKER) \
+ do {} while (0)
+#endif
+
+#ifdef HAVE_PSI_TABLE_INTERFACE
+/**
+ Instrumentation calls for MYSQL_START_TABLE_LOCK_WAIT.
+ @sa MYSQL_END_TABLE_LOCK_WAIT.
+*/
+static inline struct PSI_table_locker *
+inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
+ struct PSI_table *psi,
+ enum PSI_table_lock_operation op,
+ ulong flags, const char *src_file, int src_line)
+{
+ if (psi != NULL)
+ {
+ struct PSI_table_locker *locker;
+ locker= PSI_TABLE_CALL(start_table_lock_wait)
+ (state, psi, op, flags, src_file, src_line);
+ return locker;
+ }
+ return NULL;
+}
+
+/**
+ Instrumentation calls for MYSQL_END_TABLE_LOCK_WAIT.
+ @sa MYSQL_START_TABLE_LOCK_WAIT.
+*/
+static inline void
+inline_mysql_end_table_lock_wait(struct PSI_table_locker *locker)
+{
+ if (locker != NULL)
+ PSI_TABLE_CALL(end_table_lock_wait)(locker);
+}
+#endif
+
+/** @} (end of group Table_instrumentation) */
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_thread.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_thread.h
new file mode 100644
index 000000000..604b9c5af
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/mysql_thread.h
@@ -0,0 +1,1268 @@
+/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef MYSQL_THREAD_H
+#define MYSQL_THREAD_H
+
+/**
+ @file mysql/psi/mysql_thread.h
+ Instrumentation helpers for mysys threads, mutexes,
+ read write locks and conditions.
+ This header file provides the necessary declarations
+ to use the mysys thread API with the performance schema instrumentation.
+ In some compilers (SunStudio), 'static inline' functions, when declared
+ but not used, are not optimized away (because they are unused) by default,
+ so that including a static inline function from a header file does
+ create unwanted dependencies, causing unresolved symbols at link time.
+ Other compilers, like gcc, optimize these dependencies by default.
+
+ Since the instrumented APIs declared here are wrapper on top
+ of my_pthread / safemutex / etc APIs,
+ including mysql/psi/mysql_thread.h assumes that
+ the dependency on my_pthread and safemutex already exists.
+*/
+/*
+ Note: there are several orthogonal dimensions here.
+
+ Dimension 1: Instrumentation
+ HAVE_PSI_INTERFACE is defined when the instrumentation is compiled in.
+ This may happen both in debug or production builds.
+
+ Dimension 2: Debug
+ SAFE_MUTEX is defined when debug is compiled in.
+ This may happen both with and without instrumentation.
+
+ Dimension 3: Platform
+ Mutexes are implemented with one of:
+ - the pthread library
+ - fast mutexes
+ - window apis
+ This is implemented by various macro definitions in my_pthread.h
+
+ This causes complexity with '#ifdef'-ery that can't be avoided.
+*/
+
+#include "mysql/psi/psi.h"
+
+/**
+ @defgroup Thread_instrumentation Thread Instrumentation
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ An instrumented mutex structure.
+ @sa mysql_mutex_t
+*/
+struct st_mysql_mutex
+{
+ /** The real mutex. */
+#ifdef SAFE_MUTEX
+ safe_mutex_t m_mutex;
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ my_pthread_fastmutex_t m_mutex;
+#else
+ pthread_mutex_t m_mutex;
+#endif
+ /**
+ The instrumentation hook.
+ Note that this hook is not conditionally defined,
+ for binary compatibility of the @c mysql_mutex_t interface.
+ */
+ struct PSI_mutex *m_psi;
+};
+
+/**
+ Type of an instrumented mutex.
+ @c mysql_mutex_t is a drop-in replacement for @c pthread_mutex_t.
+ @sa mysql_mutex_assert_owner
+ @sa mysql_mutex_assert_not_owner
+ @sa mysql_mutex_init
+ @sa mysql_mutex_lock
+ @sa mysql_mutex_unlock
+ @sa mysql_mutex_destroy
+*/
+typedef struct st_mysql_mutex mysql_mutex_t;
+
+/**
+ An instrumented rwlock structure.
+ @sa mysql_rwlock_t
+*/
+struct st_mysql_rwlock
+{
+ /** The real rwlock */
+ rw_lock_t m_rwlock;
+ /**
+ The instrumentation hook.
+ Note that this hook is not conditionally defined,
+ for binary compatibility of the @c mysql_rwlock_t interface.
+ */
+ struct PSI_rwlock *m_psi;
+};
+
+/**
+ An instrumented prlock structure.
+ @sa mysql_prlock_t
+*/
+struct st_mysql_prlock
+{
+ /** The real prlock */
+ rw_pr_lock_t m_prlock;
+ /**
+ The instrumentation hook.
+ Note that this hook is not conditionally defined,
+ for binary compatibility of the @c mysql_rwlock_t interface.
+ */
+ struct PSI_rwlock *m_psi;
+};
+
+/**
+ Type of an instrumented rwlock.
+ @c mysql_rwlock_t is a drop-in replacement for @c pthread_rwlock_t.
+ @sa mysql_rwlock_init
+ @sa mysql_rwlock_rdlock
+ @sa mysql_rwlock_tryrdlock
+ @sa mysql_rwlock_wrlock
+ @sa mysql_rwlock_trywrlock
+ @sa mysql_rwlock_unlock
+ @sa mysql_rwlock_destroy
+*/
+typedef struct st_mysql_rwlock mysql_rwlock_t;
+
+/**
+ Type of an instrumented prlock.
+ A prlock is a read write lock that 'prefers readers' (pr).
+ @c mysql_prlock_t is a drop-in replacement for @c rw_pr_lock_t.
+ @sa mysql_prlock_init
+ @sa mysql_prlock_rdlock
+ @sa mysql_prlock_wrlock
+ @sa mysql_prlock_unlock
+ @sa mysql_prlock_destroy
+*/
+typedef struct st_mysql_prlock mysql_prlock_t;
+
+/**
+ An instrumented cond structure.
+ @sa mysql_cond_t
+*/
+struct st_mysql_cond
+{
+ /** The real condition */
+ pthread_cond_t m_cond;
+ /**
+ The instrumentation hook.
+ Note that this hook is not conditionally defined,
+ for binary compatibility of the @c mysql_cond_t interface.
+ */
+ struct PSI_cond *m_psi;
+};
+
+/**
+ Type of an instrumented condition.
+ @c mysql_cond_t is a drop-in replacement for @c pthread_cond_t.
+ @sa mysql_cond_init
+ @sa mysql_cond_wait
+ @sa mysql_cond_timedwait
+ @sa mysql_cond_signal
+ @sa mysql_cond_broadcast
+ @sa mysql_cond_destroy
+*/
+typedef struct st_mysql_cond mysql_cond_t;
+
+/*
+ Consider the following code:
+ static inline void foo() { bar(); }
+ when foo() is never called.
+
+ With gcc, foo() is a local static function, so the dependencies
+ are optimized away at compile time, and there is no dependency on bar().
+ With other compilers (HP, Sun Studio), the function foo() implementation
+ is compiled, and bar() needs to be present to link.
+
+ Due to the existing header dependencies in MySQL code, this header file
+ is sometime used when it is not needed, which in turn cause link failures
+ on some platforms.
+ The proper fix would be to cut these extra dependencies in the calling code.
+ DISABLE_MYSQL_THREAD_H is a work around to limit dependencies.
+ DISABLE_MYSQL_PRLOCK_H is similar, and is used to disable specifically
+ the prlock wrappers.
+*/
+#ifndef DISABLE_MYSQL_THREAD_H
+
+/**
+ @def mysql_mutex_assert_owner(M)
+ Wrapper, to use safe_mutex_assert_owner with instrumented mutexes.
+ @c mysql_mutex_assert_owner is a drop-in replacement
+ for @c safe_mutex_assert_owner.
+*/
+#define mysql_mutex_assert_owner(M) \
+ safe_mutex_assert_owner(&(M)->m_mutex)
+
+/**
+ @def mysql_mutex_assert_not_owner(M)
+ Wrapper, to use safe_mutex_assert_not_owner with instrumented mutexes.
+ @c mysql_mutex_assert_not_owner is a drop-in replacement
+ for @c safe_mutex_assert_not_owner.
+*/
+#define mysql_mutex_assert_not_owner(M) \
+ safe_mutex_assert_not_owner(&(M)->m_mutex)
+
+/** Wrappers for instrumented prlock objects. */
+
+#define mysql_prlock_assert_write_owner(M) \
+ rw_pr_lock_assert_write_owner(&(M)->m_prlock)
+
+#define mysql_prlock_assert_not_write_owner(M) \
+ rw_pr_lock_assert_not_write_owner(&(M)->m_prlock)
+
+/**
+ @def mysql_mutex_register(P1, P2, P3)
+ Mutex registration.
+*/
+#define mysql_mutex_register(P1, P2, P3) \
+ inline_mysql_mutex_register(P1, P2, P3)
+
+/**
+ @def mysql_mutex_init(K, M, A)
+ Instrumented mutex_init.
+ @c mysql_mutex_init is a replacement for @c pthread_mutex_init.
+ @param K The PSI_mutex_key for this instrumented mutex
+ @param M The mutex to initialize
+ @param A Mutex attributes
+*/
+
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ #ifdef SAFE_MUTEX
+ #define mysql_mutex_init(K, M, A) \
+ inline_mysql_mutex_init(K, M, A, __FILE__, __LINE__)
+ #else
+ #define mysql_mutex_init(K, M, A) \
+ inline_mysql_mutex_init(K, M, A)
+ #endif
+#else
+ #ifdef SAFE_MUTEX
+ #define mysql_mutex_init(K, M, A) \
+ inline_mysql_mutex_init(M, A, __FILE__, __LINE__)
+ #else
+ #define mysql_mutex_init(K, M, A) \
+ inline_mysql_mutex_init(M, A)
+ #endif
+#endif
+
+/**
+ @def mysql_mutex_destroy(M)
+ Instrumented mutex_destroy.
+ @c mysql_mutex_destroy is a drop-in replacement
+ for @c pthread_mutex_destroy.
+*/
+#ifdef SAFE_MUTEX
+ #define mysql_mutex_destroy(M) \
+ inline_mysql_mutex_destroy(M, __FILE__, __LINE__)
+#else
+ #define mysql_mutex_destroy(M) \
+ inline_mysql_mutex_destroy(M)
+#endif
+
+/**
+ @def mysql_mutex_lock(M)
+ Instrumented mutex_lock.
+ @c mysql_mutex_lock is a drop-in replacement for @c pthread_mutex_lock.
+ @param M The mutex to lock
+*/
+
+#if defined(SAFE_MUTEX) || defined (HAVE_PSI_MUTEX_INTERFACE)
+ #define mysql_mutex_lock(M) \
+ inline_mysql_mutex_lock(M, __FILE__, __LINE__)
+#else
+ #define mysql_mutex_lock(M) \
+ inline_mysql_mutex_lock(M)
+#endif
+
+/**
+ @def mysql_mutex_trylock(M)
+ Instrumented mutex_lock.
+ @c mysql_mutex_trylock is a drop-in replacement
+ for @c pthread_mutex_trylock.
+*/
+
+#if defined(SAFE_MUTEX) || defined (HAVE_PSI_MUTEX_INTERFACE)
+ #define mysql_mutex_trylock(M) \
+ inline_mysql_mutex_trylock(M, __FILE__, __LINE__)
+#else
+ #define mysql_mutex_trylock(M) \
+ inline_mysql_mutex_trylock(M)
+#endif
+
+/**
+ @def mysql_mutex_unlock(M)
+ Instrumented mutex_unlock.
+ @c mysql_mutex_unlock is a drop-in replacement for @c pthread_mutex_unlock.
+*/
+#ifdef SAFE_MUTEX
+ #define mysql_mutex_unlock(M) \
+ inline_mysql_mutex_unlock(M, __FILE__, __LINE__)
+#else
+ #define mysql_mutex_unlock(M) \
+ inline_mysql_mutex_unlock(M)
+#endif
+
+/**
+ @def mysql_rwlock_register(P1, P2, P3)
+ Rwlock registration.
+*/
+#define mysql_rwlock_register(P1, P2, P3) \
+ inline_mysql_rwlock_register(P1, P2, P3)
+
+/**
+ @def mysql_rwlock_init(K, RW)
+ Instrumented rwlock_init.
+ @c mysql_rwlock_init is a replacement for @c pthread_rwlock_init.
+ Note that pthread_rwlockattr_t is not supported in MySQL.
+ @param K The PSI_rwlock_key for this instrumented rwlock
+ @param RW The rwlock to initialize
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_rwlock_init(K, RW) inline_mysql_rwlock_init(K, RW)
+#else
+ #define mysql_rwlock_init(K, RW) inline_mysql_rwlock_init(RW)
+#endif
+
+/**
+ @def mysql_prlock_init(K, RW)
+ Instrumented rw_pr_init.
+ @c mysql_prlock_init is a replacement for @c rw_pr_init.
+ @param K The PSI_rwlock_key for this instrumented prlock
+ @param RW The prlock to initialize
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_prlock_init(K, RW) inline_mysql_prlock_init(K, RW)
+#else
+ #define mysql_prlock_init(K, RW) inline_mysql_prlock_init(RW)
+#endif
+
+/**
+ @def mysql_rwlock_destroy(RW)
+ Instrumented rwlock_destroy.
+ @c mysql_rwlock_destroy is a drop-in replacement
+ for @c pthread_rwlock_destroy.
+*/
+#define mysql_rwlock_destroy(RW) inline_mysql_rwlock_destroy(RW)
+
+/**
+ @def mysql_prlock_destroy(RW)
+ Instrumented rw_pr_destroy.
+ @c mysql_prlock_destroy is a drop-in replacement
+ for @c rw_pr_destroy.
+*/
+#define mysql_prlock_destroy(RW) inline_mysql_prlock_destroy(RW)
+
+/**
+ @def mysql_rwlock_rdlock(RW)
+ Instrumented rwlock_rdlock.
+ @c mysql_rwlock_rdlock is a drop-in replacement
+ for @c pthread_rwlock_rdlock.
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_rwlock_rdlock(RW) \
+ inline_mysql_rwlock_rdlock(RW, __FILE__, __LINE__)
+#else
+ #define mysql_rwlock_rdlock(RW) \
+ inline_mysql_rwlock_rdlock(RW)
+#endif
+
+/**
+ @def mysql_prlock_rdlock(RW)
+ Instrumented rw_pr_rdlock.
+ @c mysql_prlock_rdlock is a drop-in replacement
+ for @c rw_pr_rdlock.
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_prlock_rdlock(RW) \
+ inline_mysql_prlock_rdlock(RW, __FILE__, __LINE__)
+#else
+ #define mysql_prlock_rdlock(RW) \
+ inline_mysql_prlock_rdlock(RW)
+#endif
+
+/**
+ @def mysql_rwlock_wrlock(RW)
+ Instrumented rwlock_wrlock.
+ @c mysql_rwlock_wrlock is a drop-in replacement
+ for @c pthread_rwlock_wrlock.
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_rwlock_wrlock(RW) \
+ inline_mysql_rwlock_wrlock(RW, __FILE__, __LINE__)
+#else
+ #define mysql_rwlock_wrlock(RW) \
+ inline_mysql_rwlock_wrlock(RW)
+#endif
+
+/**
+ @def mysql_prlock_wrlock(RW)
+ Instrumented rw_pr_wrlock.
+ @c mysql_prlock_wrlock is a drop-in replacement
+ for @c rw_pr_wrlock.
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_prlock_wrlock(RW) \
+ inline_mysql_prlock_wrlock(RW, __FILE__, __LINE__)
+#else
+ #define mysql_prlock_wrlock(RW) \
+ inline_mysql_prlock_wrlock(RW)
+#endif
+
+/**
+ @def mysql_rwlock_tryrdlock(RW)
+ Instrumented rwlock_tryrdlock.
+ @c mysql_rwlock_tryrdlock is a drop-in replacement
+ for @c pthread_rwlock_tryrdlock.
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_rwlock_tryrdlock(RW) \
+ inline_mysql_rwlock_tryrdlock(RW, __FILE__, __LINE__)
+#else
+ #define mysql_rwlock_tryrdlock(RW) \
+ inline_mysql_rwlock_tryrdlock(RW)
+#endif
+
+/**
+ @def mysql_rwlock_trywrlock(RW)
+ Instrumented rwlock_trywrlock.
+ @c mysql_rwlock_trywrlock is a drop-in replacement
+ for @c pthread_rwlock_trywrlock.
+*/
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ #define mysql_rwlock_trywrlock(RW) \
+ inline_mysql_rwlock_trywrlock(RW, __FILE__, __LINE__)
+#else
+ #define mysql_rwlock_trywrlock(RW) \
+ inline_mysql_rwlock_trywrlock(RW)
+#endif
+
+/**
+ @def mysql_rwlock_unlock(RW)
+ Instrumented rwlock_unlock.
+ @c mysql_rwlock_unlock is a drop-in replacement
+ for @c pthread_rwlock_unlock.
+*/
+#define mysql_rwlock_unlock(RW) inline_mysql_rwlock_unlock(RW)
+
+/**
+ @def mysql_prlock_unlock(RW)
+ Instrumented rw_pr_unlock.
+ @c mysql_prlock_unlock is a drop-in replacement
+ for @c rw_pr_unlock.
+*/
+#define mysql_prlock_unlock(RW) inline_mysql_prlock_unlock(RW)
+
+/**
+ @def mysql_cond_register(P1, P2, P3)
+ Cond registration.
+*/
+#define mysql_cond_register(P1, P2, P3) \
+ inline_mysql_cond_register(P1, P2, P3)
+
+/**
+ @def mysql_cond_init(K, C, A)
+ Instrumented cond_init.
+ @c mysql_cond_init is a replacement for @c pthread_cond_init.
+ @param C The cond to initialize
+ @param K The PSI_cond_key for this instrumented cond
+ @param A Condition attributes
+*/
+#ifdef HAVE_PSI_COND_INTERFACE
+ #define mysql_cond_init(K, C, A) inline_mysql_cond_init(K, C, A)
+#else
+ #define mysql_cond_init(K, C, A) inline_mysql_cond_init(C, A)
+#endif
+
+/**
+ @def mysql_cond_destroy(C)
+ Instrumented cond_destroy.
+ @c mysql_cond_destroy is a drop-in replacement for @c pthread_cond_destroy.
+*/
+#define mysql_cond_destroy(C) inline_mysql_cond_destroy(C)
+
+/**
+ @def mysql_cond_wait(C)
+ Instrumented cond_wait.
+ @c mysql_cond_wait is a drop-in replacement for @c pthread_cond_wait.
+*/
+#ifdef HAVE_PSI_COND_INTERFACE
+ #define mysql_cond_wait(C, M) \
+ inline_mysql_cond_wait(C, M, __FILE__, __LINE__)
+#else
+ #define mysql_cond_wait(C, M) \
+ inline_mysql_cond_wait(C, M)
+#endif
+
+/**
+ @def mysql_cond_timedwait(C, M, W)
+ Instrumented cond_timedwait.
+ @c mysql_cond_timedwait is a drop-in replacement
+ for @c pthread_cond_timedwait.
+*/
+#ifdef HAVE_PSI_COND_INTERFACE
+ #define mysql_cond_timedwait(C, M, W) \
+ inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__)
+#else
+ #define mysql_cond_timedwait(C, M, W) \
+ inline_mysql_cond_timedwait(C, M, W)
+#endif
+
+/**
+ @def mysql_cond_signal(C)
+ Instrumented cond_signal.
+ @c mysql_cond_signal is a drop-in replacement for @c pthread_cond_signal.
+*/
+#define mysql_cond_signal(C) inline_mysql_cond_signal(C)
+
+/**
+ @def mysql_cond_broadcast(C)
+ Instrumented cond_broadcast.
+ @c mysql_cond_broadcast is a drop-in replacement
+ for @c pthread_cond_broadcast.
+*/
+#define mysql_cond_broadcast(C) inline_mysql_cond_broadcast(C)
+
+/**
+ @def mysql_thread_register(P1, P2, P3)
+ Thread registration.
+*/
+#define mysql_thread_register(P1, P2, P3) \
+ inline_mysql_thread_register(P1, P2, P3)
+
+/**
+ @def mysql_thread_create(K, P1, P2, P3, P4)
+ Instrumented pthread_create.
+ This function creates both the thread instrumentation and a thread.
+ @c mysql_thread_create is a replacement for @c pthread_create.
+ The parameter P4 (or, if it is NULL, P1) will be used as the
+ instrumented thread "indentity".
+ Providing a P1 / P4 parameter with a different value for each call
+ will on average improve performances, since this thread identity value
+ is used internally to randomize access to data and prevent contention.
+ This is optional, and the improvement is not guaranteed, only statistical.
+ @param K The PSI_thread_key for this instrumented thread
+ @param P1 pthread_create parameter 1
+ @param P2 pthread_create parameter 2
+ @param P3 pthread_create parameter 3
+ @param P4 pthread_create parameter 4
+*/
+#ifdef HAVE_PSI_THREAD_INTERFACE
+ #define mysql_thread_create(K, P1, P2, P3, P4) \
+ inline_mysql_thread_create(K, P1, P2, P3, P4)
+#else
+ #define mysql_thread_create(K, P1, P2, P3, P4) \
+ pthread_create(P1, P2, P3, P4)
+#endif
+
+/**
+ @def mysql_thread_set_psi_id(I)
+ Set the thread indentifier for the instrumentation.
+ @param I The thread identifier
+*/
+#ifdef HAVE_PSI_THREAD_INTERFACE
+ #define mysql_thread_set_psi_id(I) inline_mysql_thread_set_psi_id(I)
+#else
+ #define mysql_thread_set_psi_id(I) do {} while (0)
+#endif
+
+static inline void inline_mysql_mutex_register(
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ const char *category,
+ PSI_mutex_info *info,
+ int count
+#else
+ const char *category __attribute__ ((unused)),
+ void *info __attribute__ ((unused)),
+ int count __attribute__ ((unused))
+#endif
+)
+{
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ PSI_MUTEX_CALL(register_mutex)(category, info, count);
+#endif
+}
+
+static inline int inline_mysql_mutex_init(
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ PSI_mutex_key key,
+#endif
+ mysql_mutex_t *that,
+ const pthread_mutexattr_t *attr
+#ifdef SAFE_MUTEX
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex);
+#else
+ that->m_psi= NULL;
+#endif
+#ifdef SAFE_MUTEX
+ return safe_mutex_init(&that->m_mutex, attr, src_file, src_line);
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ return my_pthread_fastmutex_init(&that->m_mutex, attr);
+#else
+ return pthread_mutex_init(&that->m_mutex, attr);
+#endif
+}
+
+static inline int inline_mysql_mutex_destroy(
+ mysql_mutex_t *that
+#ifdef SAFE_MUTEX
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ PSI_MUTEX_CALL(destroy_mutex)(that->m_psi);
+ that->m_psi= NULL;
+ }
+#endif
+#ifdef SAFE_MUTEX
+ return safe_mutex_destroy(&that->m_mutex, src_file, src_line);
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ return pthread_mutex_destroy(&that->m_mutex.mutex);
+#else
+ return pthread_mutex_destroy(&that->m_mutex);
+#endif
+}
+
+static inline int inline_mysql_mutex_lock(
+ mysql_mutex_t *that
+#if defined(SAFE_MUTEX) || defined (HAVE_PSI_MUTEX_INTERFACE)
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_mutex_locker *locker;
+ PSI_mutex_locker_state state;
+ locker= PSI_MUTEX_CALL(start_mutex_wait)(&state, that->m_psi,
+ PSI_MUTEX_LOCK, src_file, src_line);
+
+ /* Instrumented code */
+#ifdef SAFE_MUTEX
+ result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line);
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ result= my_pthread_fastmutex_lock(&that->m_mutex);
+#else
+ result= pthread_mutex_lock(&that->m_mutex);
+#endif
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+#ifdef SAFE_MUTEX
+ result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line);
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ result= my_pthread_fastmutex_lock(&that->m_mutex);
+#else
+ result= pthread_mutex_lock(&that->m_mutex);
+#endif
+
+ return result;
+}
+
+static inline int inline_mysql_mutex_trylock(
+ mysql_mutex_t *that
+#if defined(SAFE_MUTEX) || defined (HAVE_PSI_MUTEX_INTERFACE)
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_mutex_locker *locker;
+ PSI_mutex_locker_state state;
+ locker= PSI_MUTEX_CALL(start_mutex_wait)(&state, that->m_psi,
+ PSI_MUTEX_TRYLOCK, src_file, src_line);
+
+ /* Instrumented code */
+#ifdef SAFE_MUTEX
+ result= safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line);
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ result= pthread_mutex_trylock(&that->m_mutex.mutex);
+#else
+ result= pthread_mutex_trylock(&that->m_mutex);
+#endif
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+#ifdef SAFE_MUTEX
+ result= safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line);
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ result= pthread_mutex_trylock(&that->m_mutex.mutex);
+#else
+ result= pthread_mutex_trylock(&that->m_mutex);
+#endif
+
+ return result;
+}
+
+static inline int inline_mysql_mutex_unlock(
+ mysql_mutex_t *that
+#ifdef SAFE_MUTEX
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_MUTEX_INTERFACE
+ if (that->m_psi != NULL)
+ PSI_MUTEX_CALL(unlock_mutex)(that->m_psi);
+#endif
+
+#ifdef SAFE_MUTEX
+ result= safe_mutex_unlock(&that->m_mutex, src_file, src_line);
+#elif defined(MY_PTHREAD_FASTMUTEX)
+ result= pthread_mutex_unlock(&that->m_mutex.mutex);
+#else
+ result= pthread_mutex_unlock(&that->m_mutex);
+#endif
+
+ return result;
+}
+
+static inline void inline_mysql_rwlock_register(
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ const char *category,
+ PSI_rwlock_info *info,
+ int count
+#else
+ const char *category __attribute__ ((unused)),
+ void *info __attribute__ ((unused)),
+ int count __attribute__ ((unused))
+#endif
+)
+{
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ PSI_RWLOCK_CALL(register_rwlock)(category, info, count);
+#endif
+}
+
+static inline int inline_mysql_rwlock_init(
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ PSI_rwlock_key key,
+#endif
+ mysql_rwlock_t *that)
+{
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ that->m_psi= PSI_RWLOCK_CALL(init_rwlock)(key, &that->m_rwlock);
+#else
+ that->m_psi= NULL;
+#endif
+ /*
+ pthread_rwlockattr_t is not used in MySQL.
+ */
+ return my_rwlock_init(&that->m_rwlock, NULL);
+}
+
+#ifndef DISABLE_MYSQL_PRLOCK_H
+static inline int inline_mysql_prlock_init(
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ PSI_rwlock_key key,
+#endif
+ mysql_prlock_t *that)
+{
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ that->m_psi= PSI_RWLOCK_CALL(init_rwlock)(key, &that->m_prlock);
+#else
+ that->m_psi= NULL;
+#endif
+ return rw_pr_init(&that->m_prlock);
+}
+#endif
+
+static inline int inline_mysql_rwlock_destroy(
+ mysql_rwlock_t *that)
+{
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ PSI_RWLOCK_CALL(destroy_rwlock)(that->m_psi);
+ that->m_psi= NULL;
+ }
+#endif
+ return rwlock_destroy(&that->m_rwlock);
+}
+
+#ifndef DISABLE_MYSQL_PRLOCK_H
+static inline int inline_mysql_prlock_destroy(
+ mysql_prlock_t *that)
+{
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ PSI_RWLOCK_CALL(destroy_rwlock)(that->m_psi);
+ that->m_psi= NULL;
+ }
+#endif
+ return rw_pr_destroy(&that->m_prlock);
+}
+#endif
+
+static inline int inline_mysql_rwlock_rdlock(
+ mysql_rwlock_t *that
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_rwlock_locker *locker;
+ PSI_rwlock_locker_state state;
+ locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)(&state, that->m_psi,
+ PSI_RWLOCK_READLOCK, src_file, src_line);
+
+ /* Instrumented code */
+ result= rw_rdlock(&that->m_rwlock);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= rw_rdlock(&that->m_rwlock);
+
+ return result;
+}
+
+#ifndef DISABLE_MYSQL_PRLOCK_H
+static inline int inline_mysql_prlock_rdlock(
+ mysql_prlock_t *that
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_rwlock_locker *locker;
+ PSI_rwlock_locker_state state;
+ locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)(&state, that->m_psi,
+ PSI_RWLOCK_READLOCK, src_file, src_line);
+
+ /* Instrumented code */
+ result= rw_pr_rdlock(&that->m_prlock);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= rw_pr_rdlock(&that->m_prlock);
+
+ return result;
+}
+#endif
+
+static inline int inline_mysql_rwlock_wrlock(
+ mysql_rwlock_t *that
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_rwlock_locker *locker;
+ PSI_rwlock_locker_state state;
+ locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)(&state, that->m_psi,
+ PSI_RWLOCK_WRITELOCK, src_file, src_line);
+
+ /* Instrumented code */
+ result= rw_wrlock(&that->m_rwlock);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= rw_wrlock(&that->m_rwlock);
+
+ return result;
+}
+
+#ifndef DISABLE_MYSQL_PRLOCK_H
+static inline int inline_mysql_prlock_wrlock(
+ mysql_prlock_t *that
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_rwlock_locker *locker;
+ PSI_rwlock_locker_state state;
+ locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)(&state, that->m_psi,
+ PSI_RWLOCK_WRITELOCK, src_file, src_line);
+
+ /* Instrumented code */
+ result= rw_pr_wrlock(&that->m_prlock);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= rw_pr_wrlock(&that->m_prlock);
+
+ return result;
+}
+#endif
+
+static inline int inline_mysql_rwlock_tryrdlock(
+ mysql_rwlock_t *that
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_rwlock_locker *locker;
+ PSI_rwlock_locker_state state;
+ locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)(&state, that->m_psi,
+ PSI_RWLOCK_TRYREADLOCK, src_file, src_line);
+
+ /* Instrumented code */
+ result= rw_tryrdlock(&that->m_rwlock);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= rw_tryrdlock(&that->m_rwlock);
+
+ return result;
+}
+
+static inline int inline_mysql_rwlock_trywrlock(
+ mysql_rwlock_t *that
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_rwlock_locker *locker;
+ PSI_rwlock_locker_state state;
+ locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)(&state, that->m_psi,
+ PSI_RWLOCK_TRYWRITELOCK, src_file, src_line);
+
+ /* Instrumented code */
+ result= rw_trywrlock(&that->m_rwlock);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= rw_trywrlock(&that->m_rwlock);
+
+ return result;
+}
+
+static inline int inline_mysql_rwlock_unlock(
+ mysql_rwlock_t *that)
+{
+ int result;
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi);
+#endif
+ result= rw_unlock(&that->m_rwlock);
+ return result;
+}
+
+#ifndef DISABLE_MYSQL_PRLOCK_H
+static inline int inline_mysql_prlock_unlock(
+ mysql_prlock_t *that)
+{
+ int result;
+#ifdef HAVE_PSI_RWLOCK_INTERFACE
+ if (that->m_psi != NULL)
+ PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi);
+#endif
+ result= rw_pr_unlock(&that->m_prlock);
+ return result;
+}
+#endif
+
+static inline void inline_mysql_cond_register(
+#ifdef HAVE_PSI_COND_INTERFACE
+ const char *category,
+ PSI_cond_info *info,
+ int count
+#else
+ const char *category __attribute__ ((unused)),
+ void *info __attribute__ ((unused)),
+ int count __attribute__ ((unused))
+#endif
+)
+{
+#ifdef HAVE_PSI_COND_INTERFACE
+ PSI_COND_CALL(register_cond)(category, info, count);
+#endif
+}
+
+static inline int inline_mysql_cond_init(
+#ifdef HAVE_PSI_COND_INTERFACE
+ PSI_cond_key key,
+#endif
+ mysql_cond_t *that,
+ const pthread_condattr_t *attr)
+{
+#ifdef HAVE_PSI_COND_INTERFACE
+ that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
+#else
+ that->m_psi= NULL;
+#endif
+ return pthread_cond_init(&that->m_cond, attr);
+}
+
+static inline int inline_mysql_cond_destroy(
+ mysql_cond_t *that)
+{
+#ifdef HAVE_PSI_COND_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ PSI_COND_CALL(destroy_cond)(that->m_psi);
+ that->m_psi= NULL;
+ }
+#endif
+ return pthread_cond_destroy(&that->m_cond);
+}
+
+static inline int inline_mysql_cond_wait(
+ mysql_cond_t *that,
+ mysql_mutex_t *mutex
+#ifdef HAVE_PSI_COND_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_COND_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_cond_locker *locker;
+ PSI_cond_locker_state state;
+ locker= PSI_COND_CALL(start_cond_wait)(&state, that->m_psi, mutex->m_psi,
+ PSI_COND_WAIT, src_file, src_line);
+
+ /* Instrumented code */
+ result= my_cond_wait(&that->m_cond, &mutex->m_mutex);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_COND_CALL(end_cond_wait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= my_cond_wait(&that->m_cond, &mutex->m_mutex);
+
+ return result;
+}
+
+static inline int inline_mysql_cond_timedwait(
+ mysql_cond_t *that,
+ mysql_mutex_t *mutex,
+ struct timespec *abstime
+#ifdef HAVE_PSI_COND_INTERFACE
+ , const char *src_file, uint src_line
+#endif
+ )
+{
+ int result;
+
+#ifdef HAVE_PSI_COND_INTERFACE
+ if (that->m_psi != NULL)
+ {
+ /* Instrumentation start */
+ PSI_cond_locker *locker;
+ PSI_cond_locker_state state;
+ locker= PSI_COND_CALL(start_cond_wait)(&state, that->m_psi, mutex->m_psi,
+ PSI_COND_TIMEDWAIT, src_file, src_line);
+
+ /* Instrumented code */
+ result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
+
+ /* Instrumentation end */
+ if (locker != NULL)
+ PSI_COND_CALL(end_cond_wait)(locker, result);
+
+ return result;
+ }
+#endif
+
+ /* Non instrumented code */
+ result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
+
+ return result;
+}
+
+static inline int inline_mysql_cond_signal(
+ mysql_cond_t *that)
+{
+ int result;
+#ifdef HAVE_PSI_COND_INTERFACE
+ if (that->m_psi != NULL)
+ PSI_COND_CALL(signal_cond)(that->m_psi);
+#endif
+ result= pthread_cond_signal(&that->m_cond);
+ return result;
+}
+
+static inline int inline_mysql_cond_broadcast(
+ mysql_cond_t *that)
+{
+ int result;
+#ifdef HAVE_PSI_COND_INTERFACE
+ if (that->m_psi != NULL)
+ PSI_COND_CALL(broadcast_cond)(that->m_psi);
+#endif
+ result= pthread_cond_broadcast(&that->m_cond);
+ return result;
+}
+
+static inline void inline_mysql_thread_register(
+#ifdef HAVE_PSI_THREAD_INTERFACE
+ const char *category,
+ PSI_thread_info *info,
+ int count
+#else
+ const char *category __attribute__ ((unused)),
+ void *info __attribute__ ((unused)),
+ int count __attribute__ ((unused))
+#endif
+)
+{
+#ifdef HAVE_PSI_THREAD_INTERFACE
+ PSI_THREAD_CALL(register_thread)(category, info, count);
+#endif
+}
+
+#ifdef HAVE_PSI_THREAD_INTERFACE
+static inline int inline_mysql_thread_create(
+ PSI_thread_key key,
+ pthread_t *thread, const pthread_attr_t *attr,
+ void *(*start_routine)(void*), void *arg)
+{
+ int result;
+ result= PSI_THREAD_CALL(spawn_thread)(key, thread, attr, start_routine, arg);
+ return result;
+}
+
+static inline void inline_mysql_thread_set_psi_id(ulong id)
+{
+ struct PSI_thread *psi= PSI_THREAD_CALL(get_thread)();
+ PSI_THREAD_CALL(set_thread_id)(psi, id);
+}
+#endif
+
+#endif /* DISABLE_MYSQL_THREAD_H */
+
+/** @} (end of group Thread_instrumentation) */
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi.h
new file mode 100644
index 000000000..30f2709be
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi.h
@@ -0,0 +1,2431 @@
+/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H
+#define MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H
+
+#ifdef EMBEDDED_LIBRARY
+#define DISABLE_PSI_MUTEX
+#define DISABLE_PSI_RWLOCK
+#define DISABLE_PSI_COND
+#define DISABLE_PSI_FILE
+#define DISABLE_PSI_TABLE
+#define DISABLE_PSI_SOCKET
+#define DISABLE_PSI_STAGE
+#define DISABLE_PSI_STATEMENT
+#define DISABLE_PSI_IDLE
+#define DISABLE_PSI_STATEMENT_DIGEST
+#endif /* EMBEDDED_LIBRARY */
+
+#ifndef MY_GLOBAL_INCLUDED
+/*
+ Make sure a .c or .cc file contains an include to my_global.h first.
+ When this include is missing, all the #ifdef HAVE_XXX have no effect,
+ and the resulting binary won't build, or won't link,
+ or will crash at runtime
+ since various structures will have different binary definitions.
+*/
+#error "You must include my_global.h in the code for the build to be correct."
+#endif
+
+C_MODE_START
+
+struct TABLE_SHARE;
+/*
+ There are 3 known bison parsers in the server:
+ - (1) the SQL parser itself, sql/sql_yacc.yy
+ - (2) storage/innobase/fts/fts0pars.y
+ - (3) storage/innobase/pars/pars0grm.y
+ What is instrumented here are the tokens from the SQL query text (1),
+ to make digests.
+ Now, to avoid name pollution and conflicts with different YYSTYPE definitions,
+ an opaque structure is used here.
+ The real type to use when invoking the digest api is LEX_YYSTYPE.
+*/
+struct OPAQUE_LEX_YYSTYPE;
+
+/**
+ @file mysql/psi/psi.h
+ Performance schema instrumentation interface.
+
+ @defgroup Instrumentation_interface Instrumentation Interface
+ @ingroup Performance_schema
+ @{
+*/
+
+/**
+ Interface for an instrumented mutex.
+ This is an opaque structure.
+*/
+struct PSI_mutex;
+typedef struct PSI_mutex PSI_mutex;
+
+/**
+ Interface for an instrumented rwlock.
+ This is an opaque structure.
+*/
+struct PSI_rwlock;
+typedef struct PSI_rwlock PSI_rwlock;
+
+/**
+ Interface for an instrumented condition.
+ This is an opaque structure.
+*/
+struct PSI_cond;
+typedef struct PSI_cond PSI_cond;
+
+/**
+ Interface for an instrumented table share.
+ This is an opaque structure.
+*/
+struct PSI_table_share;
+typedef struct PSI_table_share PSI_table_share;
+
+/**
+ Interface for an instrumented table handle.
+ This is an opaque structure.
+*/
+struct PSI_table;
+typedef struct PSI_table PSI_table;
+
+/**
+ Interface for an instrumented thread.
+ This is an opaque structure.
+*/
+struct PSI_thread;
+typedef struct PSI_thread PSI_thread;
+
+/**
+ Interface for an instrumented file handle.
+ This is an opaque structure.
+*/
+struct PSI_file;
+typedef struct PSI_file PSI_file;
+
+/**
+ Interface for an instrumented socket descriptor.
+ This is an opaque structure.
+*/
+struct PSI_socket;
+typedef struct PSI_socket PSI_socket;
+
+/**
+ Interface for an instrumented table operation.
+ This is an opaque structure.
+*/
+struct PSI_table_locker;
+typedef struct PSI_table_locker PSI_table_locker;
+
+/**
+ Interface for an instrumented statement.
+ This is an opaque structure.
+*/
+struct PSI_statement_locker;
+typedef struct PSI_statement_locker PSI_statement_locker;
+
+/**
+ Interface for an instrumented idle operation.
+ This is an opaque structure.
+*/
+struct PSI_idle_locker;
+typedef struct PSI_idle_locker PSI_idle_locker;
+
+/**
+ Interface for an instrumented statement digest operation.
+ This is an opaque structure.
+*/
+struct PSI_digest_locker;
+typedef struct PSI_digest_locker PSI_digest_locker;
+
+/** Entry point for the performance schema interface. */
+struct PSI_bootstrap
+{
+ /**
+ ABI interface finder.
+ Calling this method with an interface version number returns either
+ an instance of the ABI for this version, or NULL.
+ @param version the interface version number to find
+ @return a versioned interface (PSI_v1, PSI_v2 or PSI)
+ @sa PSI_VERSION_1
+ @sa PSI_v1
+ @sa PSI_VERSION_2
+ @sa PSI_v2
+ @sa PSI_CURRENT_VERSION
+ @sa PSI
+ */
+ void* (*get_interface)(int version);
+};
+typedef struct PSI_bootstrap PSI_bootstrap;
+
+#ifdef HAVE_PSI_INTERFACE
+
+/**
+ @def DISABLE_PSI_MUTEX
+ Compiling option to disable the mutex instrumentation.
+ This option is mostly intended to be used during development,
+ when doing special builds with only a subset of the performance schema instrumentation,
+ for code analysis / profiling / performance tuning of a specific instrumentation alone.
+ For this reason, DISABLE_PSI_MUTEX is not advertised in the cmake general options.
+ To disable mutexes, add -DDISABLE_PSI_MUTEX to CFLAGS.
+ @sa DISABLE_PSI_RWLOCK
+ @sa DISABLE_PSI_COND
+ @sa DISABLE_PSI_FILE
+ @sa DISABLE_PSI_THREAD
+ @sa DISABLE_PSI_TABLE
+ @sa DISABLE_PSI_STAGE
+ @sa DISABLE_PSI_STATEMENT
+ @sa DISABLE_PSI_SOCKET
+ @sa DISABLE_PSI_IDLE
+*/
+
+#ifndef DISABLE_PSI_MUTEX
+#define HAVE_PSI_MUTEX_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_RWLOCK
+ Compiling option to disable the rwlock instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_RWLOCK
+#define HAVE_PSI_RWLOCK_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_COND
+ Compiling option to disable the cond instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_COND
+#define HAVE_PSI_COND_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_FILE
+ Compiling option to disable the file instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_FILE
+#define HAVE_PSI_FILE_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_THREAD
+ Compiling option to disable the thread instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+#ifndef DISABLE_PSI_THREAD
+#define HAVE_PSI_THREAD_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_TABLE
+ Compiling option to disable the table instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_TABLE
+#define HAVE_PSI_TABLE_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_STAGE
+ Compiling option to disable the stage instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_STAGE
+#define HAVE_PSI_STAGE_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_STATEMENT
+ Compiling option to disable the statement instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_STATEMENT
+#define HAVE_PSI_STATEMENT_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_STATEMENT_DIGEST
+ Compiling option to disable the statement digest instrumentation.
+*/
+
+#ifndef DISABLE_PSI_STATEMENT
+#ifndef DISABLE_PSI_STATEMENT_DIGEST
+#define HAVE_PSI_STATEMENT_DIGEST_INTERFACE
+#endif
+#endif
+
+/**
+ @def DISABLE_PSI_SOCKET
+ Compiling option to disable the statement instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_SOCKET
+#define HAVE_PSI_SOCKET_INTERFACE
+#endif
+
+/**
+ @def DISABLE_PSI_IDLE
+ Compiling option to disable the idle instrumentation.
+ @sa DISABLE_PSI_MUTEX
+*/
+
+#ifndef DISABLE_PSI_IDLE
+#define HAVE_PSI_IDLE_INTERFACE
+#endif
+
+/**
+ @def PSI_VERSION_1
+ Performance Schema Interface number for version 1.
+ This version is supported.
+*/
+#define PSI_VERSION_1 1
+
+/**
+ @def PSI_VERSION_2
+ Performance Schema Interface number for version 2.
+ This version is not implemented, it's a placeholder.
+*/
+#define PSI_VERSION_2 2
+
+/**
+ @def PSI_CURRENT_VERSION
+ Performance Schema Interface number for the most recent version.
+ The most current version is @c PSI_VERSION_1
+*/
+#define PSI_CURRENT_VERSION 1
+
+#ifndef USE_PSI_2
+#ifndef USE_PSI_1
+#define USE_PSI_1
+#endif
+#endif
+
+/**
+ Interface for an instrumented mutex operation.
+ This is an opaque structure.
+*/
+struct PSI_mutex_locker;
+typedef struct PSI_mutex_locker PSI_mutex_locker;
+
+/**
+ Interface for an instrumented rwlock operation.
+ This is an opaque structure.
+*/
+struct PSI_rwlock_locker;
+typedef struct PSI_rwlock_locker PSI_rwlock_locker;
+
+/**
+ Interface for an instrumented condition operation.
+ This is an opaque structure.
+*/
+struct PSI_cond_locker;
+typedef struct PSI_cond_locker PSI_cond_locker;
+
+/**
+ Interface for an instrumented file operation.
+ This is an opaque structure.
+*/
+struct PSI_file_locker;
+typedef struct PSI_file_locker PSI_file_locker;
+
+/**
+ Interface for an instrumented socket operation.
+ This is an opaque structure.
+*/
+struct PSI_socket_locker;
+typedef struct PSI_socket_locker PSI_socket_locker;
+
+/** Operation performed on an instrumented mutex. */
+enum PSI_mutex_operation
+{
+ /** Lock. */
+ PSI_MUTEX_LOCK= 0,
+ /** Lock attempt. */
+ PSI_MUTEX_TRYLOCK= 1
+};
+typedef enum PSI_mutex_operation PSI_mutex_operation;
+
+/** Operation performed on an instrumented rwlock. */
+enum PSI_rwlock_operation
+{
+ /** Read lock. */
+ PSI_RWLOCK_READLOCK= 0,
+ /** Write lock. */
+ PSI_RWLOCK_WRITELOCK= 1,
+ /** Read lock attempt. */
+ PSI_RWLOCK_TRYREADLOCK= 2,
+ /** Write lock attempt. */
+ PSI_RWLOCK_TRYWRITELOCK= 3
+};
+typedef enum PSI_rwlock_operation PSI_rwlock_operation;
+
+/** Operation performed on an instrumented condition. */
+enum PSI_cond_operation
+{
+ /** Wait. */
+ PSI_COND_WAIT= 0,
+ /** Wait, with timeout. */
+ PSI_COND_TIMEDWAIT= 1
+};
+typedef enum PSI_cond_operation PSI_cond_operation;
+
+/** Operation performed on an instrumented file. */
+enum PSI_file_operation
+{
+ /** File creation, as in @c create(). */
+ PSI_FILE_CREATE= 0,
+ /** Temporary file creation, as in @c create_temp_file(). */
+ PSI_FILE_CREATE_TMP= 1,
+ /** File open, as in @c open(). */
+ PSI_FILE_OPEN= 2,
+ /** File open, as in @c fopen(). */
+ PSI_FILE_STREAM_OPEN= 3,
+ /** File close, as in @c close(). */
+ PSI_FILE_CLOSE= 4,
+ /** File close, as in @c fclose(). */
+ PSI_FILE_STREAM_CLOSE= 5,
+ /**
+ Generic file read, such as @c fgets(), @c fgetc(), @c fread(), @c read(),
+ @c pread().
+ */
+ PSI_FILE_READ= 6,
+ /**
+ Generic file write, such as @c fputs(), @c fputc(), @c fprintf(),
+ @c vfprintf(), @c fwrite(), @c write(), @c pwrite().
+ */
+ PSI_FILE_WRITE= 7,
+ /** Generic file seek, such as @c fseek() or @c seek(). */
+ PSI_FILE_SEEK= 8,
+ /** Generic file tell, such as @c ftell() or @c tell(). */
+ PSI_FILE_TELL= 9,
+ /** File flush, as in @c fflush(). */
+ PSI_FILE_FLUSH= 10,
+ /** File stat, as in @c stat(). */
+ PSI_FILE_STAT= 11,
+ /** File stat, as in @c fstat(). */
+ PSI_FILE_FSTAT= 12,
+ /** File chsize, as in @c my_chsize(). */
+ PSI_FILE_CHSIZE= 13,
+ /** File delete, such as @c my_delete() or @c my_delete_with_symlink(). */
+ PSI_FILE_DELETE= 14,
+ /** File rename, such as @c my_rename() or @c my_rename_with_symlink(). */
+ PSI_FILE_RENAME= 15,
+ /** File sync, as in @c fsync() or @c my_sync(). */
+ PSI_FILE_SYNC= 16
+};
+typedef enum PSI_file_operation PSI_file_operation;
+
+/** IO operation performed on an instrumented table. */
+enum PSI_table_io_operation
+{
+ /** Row fetch. */
+ PSI_TABLE_FETCH_ROW= 0,
+ /** Row write. */
+ PSI_TABLE_WRITE_ROW= 1,
+ /** Row update. */
+ PSI_TABLE_UPDATE_ROW= 2,
+ /** Row delete. */
+ PSI_TABLE_DELETE_ROW= 3
+};
+typedef enum PSI_table_io_operation PSI_table_io_operation;
+
+/** Lock operation performed on an instrumented table. */
+enum PSI_table_lock_operation
+{
+ /** Table lock, in the server layer. */
+ PSI_TABLE_LOCK= 0,
+ /** Table lock, in the storage engine layer. */
+ PSI_TABLE_EXTERNAL_LOCK= 1
+};
+typedef enum PSI_table_lock_operation PSI_table_lock_operation;
+
+/** State of an instrumented socket. */
+enum PSI_socket_state
+{
+ /** Idle, waiting for the next command. */
+ PSI_SOCKET_STATE_IDLE= 1,
+ /** Active, executing a command. */
+ PSI_SOCKET_STATE_ACTIVE= 2
+};
+typedef enum PSI_socket_state PSI_socket_state;
+
+/** Operation performed on an instrumented socket. */
+enum PSI_socket_operation
+{
+ /** Socket creation, as in @c socket() or @c socketpair(). */
+ PSI_SOCKET_CREATE= 0,
+ /** Socket connection, as in @c connect(), @c listen() and @c accept(). */
+ PSI_SOCKET_CONNECT= 1,
+ /** Socket bind, as in @c bind(), @c getsockname() and @c getpeername(). */
+ PSI_SOCKET_BIND= 2,
+ /** Socket close, as in @c shutdown(). */
+ PSI_SOCKET_CLOSE= 3,
+ /** Socket send, @c send(). */
+ PSI_SOCKET_SEND= 4,
+ /** Socket receive, @c recv(). */
+ PSI_SOCKET_RECV= 5,
+ /** Socket send, @c sendto(). */
+ PSI_SOCKET_SENDTO= 6,
+ /** Socket receive, @c recvfrom). */
+ PSI_SOCKET_RECVFROM= 7,
+ /** Socket send, @c sendmsg(). */
+ PSI_SOCKET_SENDMSG= 8,
+ /** Socket receive, @c recvmsg(). */
+ PSI_SOCKET_RECVMSG= 9,
+ /** Socket seek, such as @c fseek() or @c seek(). */
+ PSI_SOCKET_SEEK= 10,
+ /** Socket options, as in @c getsockopt() and @c setsockopt(). */
+ PSI_SOCKET_OPT= 11,
+ /** Socket status, as in @c sockatmark() and @c isfdtype(). */
+ PSI_SOCKET_STAT= 12,
+ /** Socket shutdown, as in @c shutdown(). */
+ PSI_SOCKET_SHUTDOWN= 13,
+ /** Socket select, as in @c select() and @c poll(). */
+ PSI_SOCKET_SELECT= 14
+};
+typedef enum PSI_socket_operation PSI_socket_operation;
+
+/**
+ Instrumented mutex key.
+ To instrument a mutex, a mutex key must be obtained using @c register_mutex.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_mutex_key;
+
+/**
+ Instrumented rwlock key.
+ To instrument a rwlock, a rwlock key must be obtained
+ using @c register_rwlock.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_rwlock_key;
+
+/**
+ Instrumented cond key.
+ To instrument a condition, a condition key must be obtained
+ using @c register_cond.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_cond_key;
+
+/**
+ Instrumented thread key.
+ To instrument a thread, a thread key must be obtained
+ using @c register_thread.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_thread_key;
+
+/**
+ Instrumented file key.
+ To instrument a file, a file key must be obtained using @c register_file.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_file_key;
+
+/**
+ Instrumented stage key.
+ To instrument a stage, a stage key must be obtained using @c register_stage.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_stage_key;
+
+/**
+ Instrumented statement key.
+ To instrument a statement, a statement key must be obtained using @c register_statement.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_statement_key;
+
+/**
+ Instrumented socket key.
+ To instrument a socket, a socket key must be obtained using @c register_socket.
+ Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_socket_key;
+
+/**
+ @def USE_PSI_1
+ Define USE_PSI_1 to use the interface version 1.
+*/
+
+/**
+ @def USE_PSI_2
+ Define USE_PSI_2 to use the interface version 2.
+*/
+
+/**
+ @def HAVE_PSI_1
+ Define HAVE_PSI_1 if the interface version 1 needs to be compiled in.
+*/
+
+/**
+ @def HAVE_PSI_2
+ Define HAVE_PSI_2 if the interface version 2 needs to be compiled in.
+*/
+
+/**
+ Global flag.
+ This flag indicate that an instrumentation point is a global variable,
+ or a singleton.
+*/
+#define PSI_FLAG_GLOBAL (1 << 0)
+
+/**
+ Global flag.
+ This flag indicate that an instrumentation point is a general placeholder,
+ that can mutate into a more specific instrumentation point.
+*/
+#define PSI_FLAG_MUTABLE (1 << 1)
+
+#ifdef USE_PSI_1
+#define HAVE_PSI_1
+#endif
+
+#ifdef HAVE_PSI_1
+
+/**
+ @defgroup Group_PSI_v1 Application Binary Interface, version 1
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ Mutex information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented mutex.
+*/
+struct PSI_mutex_info_v1
+{
+ /**
+ Pointer to the key assigned to the registered mutex.
+ */
+ PSI_mutex_key *m_key;
+ /**
+ The name of the mutex to register.
+ */
+ const char *m_name;
+ /**
+ The flags of the mutex to register.
+ @sa PSI_FLAG_GLOBAL
+ */
+ int m_flags;
+};
+
+/**
+ Rwlock information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented rwlock.
+*/
+struct PSI_rwlock_info_v1
+{
+ /**
+ Pointer to the key assigned to the registered rwlock.
+ */
+ PSI_rwlock_key *m_key;
+ /**
+ The name of the rwlock to register.
+ */
+ const char *m_name;
+ /**
+ The flags of the rwlock to register.
+ @sa PSI_FLAG_GLOBAL
+ */
+ int m_flags;
+};
+
+/**
+ Condition information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented cond.
+*/
+struct PSI_cond_info_v1
+{
+ /**
+ Pointer to the key assigned to the registered cond.
+ */
+ PSI_cond_key *m_key;
+ /**
+ The name of the cond to register.
+ */
+ const char *m_name;
+ /**
+ The flags of the cond to register.
+ @sa PSI_FLAG_GLOBAL
+ */
+ int m_flags;
+};
+
+/**
+ Thread instrument information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented thread.
+*/
+struct PSI_thread_info_v1
+{
+ /**
+ Pointer to the key assigned to the registered thread.
+ */
+ PSI_thread_key *m_key;
+ /**
+ The name of the thread instrument to register.
+ */
+ const char *m_name;
+ /**
+ The flags of the thread to register.
+ @sa PSI_FLAG_GLOBAL
+ */
+ int m_flags;
+};
+
+/**
+ File instrument information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented file.
+*/
+struct PSI_file_info_v1
+{
+ /**
+ Pointer to the key assigned to the registered file.
+ */
+ PSI_file_key *m_key;
+ /**
+ The name of the file instrument to register.
+ */
+ const char *m_name;
+ /**
+ The flags of the file instrument to register.
+ @sa PSI_FLAG_GLOBAL
+ */
+ int m_flags;
+};
+
+/**
+ Stage instrument information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented stage.
+*/
+struct PSI_stage_info_v1
+{
+ /** The registered stage key. */
+ PSI_stage_key m_key;
+ /** The name of the stage instrument to register. */
+ const char *m_name;
+ /** The flags of the stage instrument to register. */
+ int m_flags;
+};
+
+/**
+ Statement instrument information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented statement.
+*/
+struct PSI_statement_info_v1
+{
+ /** The registered statement key. */
+ PSI_statement_key m_key;
+ /** The name of the statement instrument to register. */
+ const char *m_name;
+ /** The flags of the statement instrument to register. */
+ int m_flags;
+};
+
+/**
+ Socket instrument information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented socket.
+*/
+struct PSI_socket_info_v1
+{
+ /**
+ Pointer to the key assigned to the registered socket.
+ */
+ PSI_socket_key *m_key;
+ /**
+ The name of the socket instrument to register.
+ */
+ const char *m_name;
+ /**
+ The flags of the socket instrument to register.
+ @sa PSI_FLAG_GLOBAL
+ */
+ int m_flags;
+};
+
+/**
+ State data storage for @c start_idle_wait_v1_t.
+ This structure provide temporary storage to an idle locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa start_idle_wait_v1_t.
+*/
+struct PSI_idle_locker_state_v1
+{
+ /** Internal state. */
+ uint m_flags;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Internal data. */
+ void *m_wait;
+};
+
+/**
+ State data storage for @c start_mutex_wait_v1_t.
+ This structure provide temporary storage to a mutex locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa start_mutex_wait_v1_t
+*/
+struct PSI_mutex_locker_state_v1
+{
+ /** Internal state. */
+ uint m_flags;
+ /** Current operation. */
+ enum PSI_mutex_operation m_operation;
+ /** Current mutex. */
+ struct PSI_mutex *m_mutex;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Internal data. */
+ void *m_wait;
+};
+
+/**
+ State data storage for @c start_rwlock_rdwait_v1_t, @c start_rwlock_wrwait_v1_t.
+ This structure provide temporary storage to a rwlock locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa start_rwlock_rdwait_v1_t
+ @sa start_rwlock_wrwait_v1_t
+*/
+struct PSI_rwlock_locker_state_v1
+{
+ /** Internal state. */
+ uint m_flags;
+ /** Current operation. */
+ enum PSI_rwlock_operation m_operation;
+ /** Current rwlock. */
+ struct PSI_rwlock *m_rwlock;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Internal data. */
+ void *m_wait;
+};
+
+/**
+ State data storage for @c start_cond_wait_v1_t.
+ This structure provide temporary storage to a condition locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa start_cond_wait_v1_t
+*/
+struct PSI_cond_locker_state_v1
+{
+ /** Internal state. */
+ uint m_flags;
+ /** Current operation. */
+ enum PSI_cond_operation m_operation;
+ /** Current condition. */
+ struct PSI_cond *m_cond;
+ /** Current mutex. */
+ struct PSI_mutex *m_mutex;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Internal data. */
+ void *m_wait;
+};
+
+/**
+ State data storage for @c get_thread_file_name_locker_v1_t.
+ This structure provide temporary storage to a file locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa get_thread_file_name_locker_v1_t
+ @sa get_thread_file_stream_locker_v1_t
+ @sa get_thread_file_descriptor_locker_v1_t
+*/
+struct PSI_file_locker_state_v1
+{
+ /** Internal state. */
+ uint m_flags;
+ /** Current operation. */
+ enum PSI_file_operation m_operation;
+ /** Current file. */
+ struct PSI_file *m_file;
+ /** Current file name. */
+ const char *m_name;
+ /** Current file class. */
+ void *m_class;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Operation number of bytes. */
+ size_t m_number_of_bytes;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Internal data. */
+ void *m_wait;
+};
+
+/**
+ State data storage for @c start_table_io_wait_v1_t,
+ @c start_table_lock_wait_v1_t.
+ This structure provide temporary storage to a table locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa start_table_io_wait_v1_t
+ @sa start_table_lock_wait_v1_t
+*/
+struct PSI_table_locker_state_v1
+{
+ /** Internal state. */
+ uint m_flags;
+ /** Current io operation. */
+ enum PSI_table_io_operation m_io_operation;
+ /** Current table handle. */
+ struct PSI_table *m_table;
+ /** Current table share. */
+ struct PSI_table_share *m_table_share;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Internal data. */
+ void *m_wait;
+ /**
+ Implementation specific.
+ For table io, the table io index.
+ For table lock, the lock type.
+ */
+ uint m_index;
+};
+
+#define PSI_MAX_DIGEST_STORAGE_SIZE 1024
+
+/**
+ Structure to store token count/array for a statement
+ on which digest is to be calculated.
+*/
+struct PSI_digest_storage
+{
+ my_bool m_full;
+ int m_byte_count;
+ /** Character set number. */
+ uint m_charset_number;
+ unsigned char m_token_array[PSI_MAX_DIGEST_STORAGE_SIZE];
+};
+typedef struct PSI_digest_storage PSI_digest_storage;
+
+struct PSI_digest_locker_state
+{
+ int m_last_id_index;
+ PSI_digest_storage m_digest_storage;
+};
+typedef struct PSI_digest_locker_state PSI_digest_locker_state;
+
+/* Duplicate of NAME_LEN, to avoid dependency on mysql_com.h */
+#define PSI_SCHEMA_NAME_LEN (64 * 3)
+
+/**
+ State data storage for @c get_thread_statement_locker_v1_t,
+ @c get_thread_statement_locker_v1_t.
+ This structure provide temporary storage to a statement locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa get_thread_statement_locker_v1_t
+*/
+struct PSI_statement_locker_state_v1
+{
+ /** Discarded flag. */
+ my_bool m_discarded;
+ /** Metric, no index used flag. */
+ uchar m_no_index_used;
+ /** Metric, no good index used flag. */
+ uchar m_no_good_index_used;
+ /** Internal state. */
+ uint m_flags;
+ /** Instrumentation class. */
+ void *m_class;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Internal data. */
+ void *m_statement;
+ /** Locked time. */
+ ulonglong m_lock_time;
+ /** Rows sent. */
+ ulonglong m_rows_sent;
+ /** Rows examined. */
+ ulonglong m_rows_examined;
+ /** Metric, temporary tables created on disk. */
+ ulong m_created_tmp_disk_tables;
+ /** Metric, temporary tables created. */
+ ulong m_created_tmp_tables;
+ /** Metric, number of select full join. */
+ ulong m_select_full_join;
+ /** Metric, number of select full range join. */
+ ulong m_select_full_range_join;
+ /** Metric, number of select range. */
+ ulong m_select_range;
+ /** Metric, number of select range check. */
+ ulong m_select_range_check;
+ /** Metric, number of select scan. */
+ ulong m_select_scan;
+ /** Metric, number of sort merge passes. */
+ ulong m_sort_merge_passes;
+ /** Metric, number of sort merge. */
+ ulong m_sort_range;
+ /** Metric, number of sort rows. */
+ ulong m_sort_rows;
+ /** Metric, number of sort scans. */
+ ulong m_sort_scan;
+ /** Statement digest. */
+ PSI_digest_locker_state m_digest_state;
+ /** Current schema name. */
+ char m_schema_name[PSI_SCHEMA_NAME_LEN];
+ /** Length in bytes of @c m_schema_name. */
+ uint m_schema_name_length;
+};
+
+/**
+ State data storage for @c start_socket_wait_v1_t.
+ This structure provide temporary storage to a socket locker.
+ The content of this structure is considered opaque,
+ the fields are only hints of what an implementation
+ of the psi interface can use.
+ This memory is provided by the instrumented code for performance reasons.
+ @sa start_socket_wait_v1_t
+*/
+struct PSI_socket_locker_state_v1
+{
+ /** Internal state. */
+ uint m_flags;
+ /** Current socket. */
+ struct PSI_socket *m_socket;
+ /** Current thread. */
+ struct PSI_thread *m_thread;
+ /** Operation number of bytes. */
+ size_t m_number_of_bytes;
+ /** Timer start. */
+ ulonglong m_timer_start;
+ /** Timer function. */
+ ulonglong (*m_timer)(void);
+ /** Current operation. */
+ enum PSI_socket_operation m_operation;
+ /** Source file. */
+ const char* m_src_file;
+ /** Source line number. */
+ int m_src_line;
+ /** Internal data. */
+ void *m_wait;
+};
+
+/* Using typedef to make reuse between PSI_v1 and PSI_v2 easier later. */
+
+/**
+ Mutex registration API.
+ @param category a category name (typically a plugin name)
+ @param info an array of mutex info to register
+ @param count the size of the info array
+*/
+typedef void (*register_mutex_v1_t)
+ (const char *category, struct PSI_mutex_info_v1 *info, int count);
+
+/**
+ Rwlock registration API.
+ @param category a category name (typically a plugin name)
+ @param info an array of rwlock info to register
+ @param count the size of the info array
+*/
+typedef void (*register_rwlock_v1_t)
+ (const char *category, struct PSI_rwlock_info_v1 *info, int count);
+
+/**
+ Cond registration API.
+ @param category a category name (typically a plugin name)
+ @param info an array of cond info to register
+ @param count the size of the info array
+*/
+typedef void (*register_cond_v1_t)
+ (const char *category, struct PSI_cond_info_v1 *info, int count);
+
+/**
+ Thread registration API.
+ @param category a category name (typically a plugin name)
+ @param info an array of thread info to register
+ @param count the size of the info array
+*/
+typedef void (*register_thread_v1_t)
+ (const char *category, struct PSI_thread_info_v1 *info, int count);
+
+/**
+ File registration API.
+ @param category a category name (typically a plugin name)
+ @param info an array of file info to register
+ @param count the size of the info array
+*/
+typedef void (*register_file_v1_t)
+ (const char *category, struct PSI_file_info_v1 *info, int count);
+
+/**
+ Stage registration API.
+ @param category a category name
+ @param info an array of stage info to register
+ @param count the size of the info array
+*/
+typedef void (*register_stage_v1_t)
+ (const char *category, struct PSI_stage_info_v1 **info, int count);
+
+/**
+ Statement registration API.
+ @param category a category name
+ @param info an array of stage info to register
+ @param count the size of the info array
+*/
+typedef void (*register_statement_v1_t)
+ (const char *category, struct PSI_statement_info_v1 *info, int count);
+
+/**
+ Socket registration API.
+ @param category a category name (typically a plugin name)
+ @param info an array of socket info to register
+ @param count the size of the info array
+*/
+typedef void (*register_socket_v1_t)
+ (const char *category, struct PSI_socket_info_v1 *info, int count);
+
+/**
+ Mutex instrumentation initialisation API.
+ @param key the registered mutex key
+ @param identity the address of the mutex itself
+ @return an instrumented mutex
+*/
+typedef struct PSI_mutex* (*init_mutex_v1_t)
+ (PSI_mutex_key key, const void *identity);
+
+/**
+ Mutex instrumentation destruction API.
+ @param mutex the mutex to destroy
+*/
+typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
+
+/**
+ Rwlock instrumentation initialisation API.
+ @param key the registered rwlock key
+ @param identity the address of the rwlock itself
+ @return an instrumented rwlock
+*/
+typedef struct PSI_rwlock* (*init_rwlock_v1_t)
+ (PSI_rwlock_key key, const void *identity);
+
+/**
+ Rwlock instrumentation destruction API.
+ @param rwlock the rwlock to destroy
+*/
+typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
+
+/**
+ Cond instrumentation initialisation API.
+ @param key the registered key
+ @param identity the address of the rwlock itself
+ @return an instrumented cond
+*/
+typedef struct PSI_cond* (*init_cond_v1_t)
+ (PSI_cond_key key, const void *identity);
+
+/**
+ Cond instrumentation destruction API.
+ @param cond the rcond to destroy
+*/
+typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
+
+/**
+ Socket instrumentation initialisation API.
+ @param key the registered mutex key
+ @param socket descriptor
+ @param addr the socket ip address
+ @param addr_len length of socket ip address
+ @return an instrumented socket
+*/
+typedef struct PSI_socket* (*init_socket_v1_t)
+ (PSI_socket_key key, const my_socket *fd,
+ const struct sockaddr *addr, socklen_t addr_len);
+
+/**
+ socket instrumentation destruction API.
+ @param socket the socket to destroy
+*/
+typedef void (*destroy_socket_v1_t)(struct PSI_socket *socket);
+
+/**
+ Acquire a table share instrumentation.
+ @param temporary True for temporary tables
+ @param share The SQL layer table share
+ @return a table share instrumentation, or NULL
+*/
+typedef struct PSI_table_share* (*get_table_share_v1_t)
+ (my_bool temporary, struct TABLE_SHARE *share);
+
+/**
+ Release a table share.
+ @param info the table share to release
+*/
+typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
+
+/**
+ Drop a table share.
+ @param temporary True for temporary tables
+ @param schema_name the table schema name
+ @param schema_name_length the table schema name length
+ @param table_name the table name
+ @param table_name_length the table name length
+*/
+typedef void (*drop_table_share_v1_t)
+ (my_bool temporary, const char *schema_name, int schema_name_length,
+ const char *table_name, int table_name_length);
+
+/**
+ Open an instrumentation table handle.
+ @param share the table to open
+ @param identity table handle identity
+ @return a table handle, or NULL
+*/
+typedef struct PSI_table* (*open_table_v1_t)
+ (struct PSI_table_share *share, const void *identity);
+
+/**
+ Unbind a table handle from the current thread.
+ This operation happens when an opened table is added to the open table cache.
+ @param table the table to unbind
+*/
+typedef void (*unbind_table_v1_t)
+ (struct PSI_table *table);
+
+/**
+ Rebind a table handle to the current thread.
+ This operation happens when a table from the open table cache
+ is reused for a thread.
+ @param table the table to unbind
+*/
+typedef PSI_table* (*rebind_table_v1_t)
+ (PSI_table_share *share, const void *identity, PSI_table *table);
+
+/**
+ Close an instrumentation table handle.
+ Note that the table handle is invalid after this call.
+ @param table the table handle to close
+*/
+typedef void (*close_table_v1_t)(struct PSI_table *table);
+
+/**
+ Create a file instrumentation for a created file.
+ This method does not create the file itself, but is used to notify the
+ instrumentation interface that a file was just created.
+ @param key the file instrumentation key for this file
+ @param name the file name
+ @param file the file handle
+*/
+typedef void (*create_file_v1_t)(PSI_file_key key, const char *name,
+ File file);
+
+/**
+ Spawn a thread.
+ This method creates a new thread, with instrumentation.
+ @param key the instrumentation key for this thread
+ @param thread the resulting thread
+ @param attr the thread attributes
+ @param start_routine the thread start routine
+ @param arg the thread start routine argument
+*/
+typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
+ pthread_t *thread,
+ const pthread_attr_t *attr,
+ void *(*start_routine)(void*), void *arg);
+
+/**
+ Create instrumentation for a thread.
+ @param key the registered key
+ @param identity an address typical of the thread
+ @return an instrumented thread
+*/
+typedef struct PSI_thread* (*new_thread_v1_t)
+ (PSI_thread_key key, const void *identity, ulonglong thread_id);
+
+/**
+ Assign an id to an instrumented thread.
+ @param thread the instrumented thread
+ @param id the id to assign
+*/
+typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
+ ulonglong id);
+
+/**
+ Get the instrumentation for the running thread.
+ For this function to return a result,
+ the thread instrumentation must have been attached to the
+ running thread using @c set_thread()
+ @return the instrumentation for the running thread
+*/
+typedef struct PSI_thread* (*get_thread_v1_t)(void);
+
+/**
+ Assign a user name to the instrumented thread.
+ @param user the user name
+ @param user_len the user name length
+*/
+typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
+
+/**
+ Assign a user name and host name to the instrumented thread.
+ @param user the user name
+ @param user_len the user name length
+ @param host the host name
+ @param host_len the host name length
+*/
+typedef void (*set_thread_user_host_v1_t)(const char *user, int user_len,
+ const char *host, int host_len);
+
+/**
+ Assign a current database to the instrumented thread.
+ @param db the database name
+ @param db_len the database name length
+*/
+typedef void (*set_thread_db_v1_t)(const char* db, int db_len);
+
+/**
+ Assign a current command to the instrumented thread.
+ @param command the current command
+*/
+typedef void (*set_thread_command_v1_t)(int command);
+
+/**
+ Assign a start time to the instrumented thread.
+ @param start_time the thread start time
+*/
+typedef void (*set_thread_start_time_v1_t)(time_t start_time);
+
+/**
+ Assign a state to the instrumented thread.
+ @param state the thread state
+*/
+typedef void (*set_thread_state_v1_t)(const char* state);
+
+/**
+ Assign a process info to the instrumented thread.
+ @param info the process into string
+ @param info_len the process into string length
+*/
+typedef void (*set_thread_info_v1_t)(const char* info, uint info_len);
+
+/**
+ Attach a thread instrumentation to the running thread.
+ In case of thread pools, this method should be called when
+ a worker thread picks a work item and runs it.
+ Also, this method should be called if the instrumented code does not
+ keep the pointer returned by @c new_thread() and relies on @c get_thread()
+ instead.
+ @param thread the thread instrumentation
+*/
+typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
+
+/** Delete the current thread instrumentation. */
+typedef void (*delete_current_thread_v1_t)(void);
+
+/** Delete a thread instrumentation. */
+typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
+
+/**
+ Get a file instrumentation locker, for opening or creating a file.
+ @param state data storage for the locker
+ @param key the file instrumentation key
+ @param op the operation to perform
+ @param name the file name
+ @param identity a pointer representative of this file.
+ @return a file locker, or NULL
+*/
+typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
+ (struct PSI_file_locker_state_v1 *state,
+ PSI_file_key key, enum PSI_file_operation op, const char *name,
+ const void *identity);
+
+/**
+ Get a file stream instrumentation locker.
+ @param state data storage for the locker
+ @param file the file stream to access
+ @param op the operation to perform
+ @return a file locker, or NULL
+*/
+typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
+ (struct PSI_file_locker_state_v1 *state,
+ struct PSI_file *file, enum PSI_file_operation op);
+
+/**
+ Get a file instrumentation locker.
+ @param state data storage for the locker
+ @param file the file descriptor to access
+ @param op the operation to perform
+ @return a file locker, or NULL
+*/
+typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
+ (struct PSI_file_locker_state_v1 *state,
+ File file, enum PSI_file_operation op);
+
+/**
+ Record a mutex instrumentation unlock event.
+ @param mutex the mutex instrumentation
+*/
+typedef void (*unlock_mutex_v1_t)
+ (struct PSI_mutex *mutex);
+
+/**
+ Record a rwlock instrumentation unlock event.
+ @param rwlock the rwlock instrumentation
+*/
+typedef void (*unlock_rwlock_v1_t)
+ (struct PSI_rwlock *rwlock);
+
+/**
+ Record a condition instrumentation signal event.
+ @param cond the cond instrumentation
+*/
+typedef void (*signal_cond_v1_t)
+ (struct PSI_cond *cond);
+
+/**
+ Record a condition instrumentation broadcast event.
+ @param cond the cond instrumentation
+*/
+typedef void (*broadcast_cond_v1_t)
+ (struct PSI_cond *cond);
+
+typedef struct PSI_idle_locker* (*start_idle_wait_v1_t)
+ (struct PSI_idle_locker_state_v1 *state, const char *src_file, uint src_line);
+
+typedef void (*end_idle_wait_v1_t)
+ (struct PSI_idle_locker *locker);
+
+/**
+ Record a mutex instrumentation wait start event.
+ @param state data storage for the locker
+ @param mutex the instrumented mutex to lock
+ @param op the operation to perform
+ @param file the source file name
+ @param line the source line number
+ @return a mutex locker, or NULL
+*/
+typedef struct PSI_mutex_locker* (*start_mutex_wait_v1_t)
+ (struct PSI_mutex_locker_state_v1 *state,
+ struct PSI_mutex *mutex,
+ enum PSI_mutex_operation op,
+ const char *src_file, uint src_line);
+
+/**
+ Record a mutex instrumentation wait end event.
+ @param locker a thread locker for the running thread
+ @param rc the wait operation return code
+*/
+typedef void (*end_mutex_wait_v1_t)
+ (struct PSI_mutex_locker *locker, int rc);
+
+/**
+ Record a rwlock instrumentation read wait start event.
+ @param locker a thread locker for the running thread
+ @param must must block: 1 for lock, 0 for trylock
+*/
+typedef struct PSI_rwlock_locker* (*start_rwlock_rdwait_v1_t)
+ (struct PSI_rwlock_locker_state_v1 *state,
+ struct PSI_rwlock *rwlock,
+ enum PSI_rwlock_operation op,
+ const char *src_file, uint src_line);
+
+/**
+ Record a rwlock instrumentation read wait end event.
+ @param locker a thread locker for the running thread
+ @param rc the wait operation return code
+*/
+typedef void (*end_rwlock_rdwait_v1_t)
+ (struct PSI_rwlock_locker *locker, int rc);
+
+/**
+ Record a rwlock instrumentation write wait start event.
+ @param locker a thread locker for the running thread
+ @param must must block: 1 for lock, 0 for trylock
+*/
+typedef struct PSI_rwlock_locker* (*start_rwlock_wrwait_v1_t)
+ (struct PSI_rwlock_locker_state_v1 *state,
+ struct PSI_rwlock *rwlock,
+ enum PSI_rwlock_operation op,
+ const char *src_file, uint src_line);
+
+/**
+ Record a rwlock instrumentation write wait end event.
+ @param locker a thread locker for the running thread
+ @param rc the wait operation return code
+*/
+typedef void (*end_rwlock_wrwait_v1_t)
+ (struct PSI_rwlock_locker *locker, int rc);
+
+/**
+ Record a condition instrumentation wait start event.
+ @param locker a thread locker for the running thread
+ @param must must block: 1 for wait, 0 for timedwait
+*/
+typedef struct PSI_cond_locker* (*start_cond_wait_v1_t)
+ (struct PSI_cond_locker_state_v1 *state,
+ struct PSI_cond *cond,
+ struct PSI_mutex *mutex,
+ enum PSI_cond_operation op,
+ const char *src_file, uint src_line);
+
+/**
+ Record a condition instrumentation wait end event.
+ @param locker a thread locker for the running thread
+ @param rc the wait operation return code
+*/
+typedef void (*end_cond_wait_v1_t)
+ (struct PSI_cond_locker *locker, int rc);
+
+/**
+ Record a table instrumentation io wait start event.
+ @param locker a table locker for the running thread
+ @param file the source file name
+ @param line the source line number
+*/
+typedef struct PSI_table_locker* (*start_table_io_wait_v1_t)
+ (struct PSI_table_locker_state_v1 *state,
+ struct PSI_table *table,
+ enum PSI_table_io_operation op,
+ uint index,
+ const char *src_file, uint src_line);
+
+/**
+ Record a table instrumentation io wait end event.
+ @param locker a table locker for the running thread
+*/
+typedef void (*end_table_io_wait_v1_t)(struct PSI_table_locker *locker);
+
+/**
+ Record a table instrumentation lock wait start event.
+ @param locker a table locker for the running thread
+ @param file the source file name
+ @param line the source line number
+*/
+typedef struct PSI_table_locker* (*start_table_lock_wait_v1_t)
+ (struct PSI_table_locker_state_v1 *state,
+ struct PSI_table *table,
+ enum PSI_table_lock_operation op,
+ ulong flags,
+ const char *src_file, uint src_line);
+
+/**
+ Record a table instrumentation lock wait end event.
+ @param locker a table locker for the running thread
+*/
+typedef void (*end_table_lock_wait_v1_t)(struct PSI_table_locker *locker);
+
+/**
+ Start a file instrumentation open operation.
+ @param locker the file locker
+ @param op the operation to perform
+ @param src_file the source file name
+ @param src_line the source line number
+*/
+typedef void (*start_file_open_wait_v1_t)
+ (struct PSI_file_locker *locker, const char *src_file, uint src_line);
+
+/**
+ End a file instrumentation open operation, for file streams.
+ @param locker the file locker.
+ @param result the opened file (NULL indicates failure, non NULL success).
+ @return an instrumented file handle
+*/
+typedef struct PSI_file* (*end_file_open_wait_v1_t)
+ (struct PSI_file_locker *locker, void *result);
+
+/**
+ End a file instrumentation open operation, for non stream files.
+ @param locker the file locker.
+ @param file the file number assigned by open() or create() for this file.
+*/
+typedef void (*end_file_open_wait_and_bind_to_descriptor_v1_t)
+ (struct PSI_file_locker *locker, File file);
+
+/**
+ Record a file instrumentation start event.
+ @param locker a file locker for the running thread
+ @param op file operation to be performed
+ @param count the number of bytes requested, or 0 if not applicable
+ @param src_file the source file name
+ @param src_line the source line number
+*/
+typedef void (*start_file_wait_v1_t)
+ (struct PSI_file_locker *locker, size_t count,
+ const char *src_file, uint src_line);
+
+/**
+ Record a file instrumentation end event.
+ Note that for file close operations, the instrumented file handle
+ associated with the file (which was provided to obtain a locker)
+ is invalid after this call.
+ @param locker a file locker for the running thread
+ @param count the number of bytes actually used in the operation,
+ or 0 if not applicable, or -1 if the operation failed
+ @sa get_thread_file_name_locker
+ @sa get_thread_file_stream_locker
+ @sa get_thread_file_descriptor_locker
+*/
+typedef void (*end_file_wait_v1_t)
+ (struct PSI_file_locker *locker, size_t count);
+
+/**
+ Start a file instrumentation close operation.
+ @param locker the file locker
+ @param op the operation to perform
+ @param src_file the source file name
+ @param src_line the source line number
+*/
+typedef void (*start_file_close_wait_v1_t)
+ (struct PSI_file_locker *locker, const char *src_file, uint src_line);
+
+/**
+ End a file instrumentation close operation.
+ @param locker the file locker.
+ @param rc the close operation return code (0 for success).
+ @return an instrumented file handle
+*/
+typedef void (*end_file_close_wait_v1_t)
+ (struct PSI_file_locker *locker, int rc);
+
+/**
+ Start a new stage, and implicitly end the previous stage.
+ @param key the key of the new stage
+ @param src_file the source file name
+ @param src_line the source line number
+*/
+typedef void (*start_stage_v1_t)
+ (PSI_stage_key key, const char *src_file, int src_line);
+
+/** End the current stage. */
+typedef void (*end_stage_v1_t) (void);
+
+/**
+ Get a statement instrumentation locker.
+ @param state data storage for the locker
+ @param key the statement instrumentation key
+ @param charset client character set
+ @return a statement locker, or NULL
+*/
+typedef struct PSI_statement_locker* (*get_thread_statement_locker_v1_t)
+ (struct PSI_statement_locker_state_v1 *state,
+ PSI_statement_key key, const void *charset);
+
+/**
+ Refine a statement locker to a more specific key.
+ Note that only events declared mutable can be refined.
+ @param the statement locker for the current event
+ @param key the new key for the event
+ @sa PSI_FLAG_MUTABLE
+*/
+typedef struct PSI_statement_locker* (*refine_statement_v1_t)
+ (struct PSI_statement_locker *locker,
+ PSI_statement_key key);
+
+/**
+ Start a new statement event.
+ @param locker the statement locker for this event
+ @param db the active database name for this statement
+ @param db_length the active database name length for this statement
+ @param src_file source file name
+ @param src_line source line number
+*/
+typedef void (*start_statement_v1_t)
+ (struct PSI_statement_locker *locker,
+ const char *db, uint db_length,
+ const char *src_file, uint src_line);
+
+/**
+ Set the statement text for a statement event.
+ @param locker the current statement locker
+ @param text the statement text
+ @param text_len the statement text length
+*/
+typedef void (*set_statement_text_v1_t)
+ (struct PSI_statement_locker *locker,
+ const char *text, uint text_len);
+
+/**
+ Set a statement event lock time.
+ @param locker the statement locker
+ @param lock_time the locked time, in microseconds
+*/
+typedef void (*set_statement_lock_time_t)
+ (struct PSI_statement_locker *locker, ulonglong lock_time);
+
+/**
+ Set a statement event rows sent metric.
+ @param locker the statement locker
+ @param count the number of rows sent
+*/
+typedef void (*set_statement_rows_sent_t)
+ (struct PSI_statement_locker *locker, ulonglong count);
+
+/**
+ Set a statement event rows examined metric.
+ @param locker the statement locker
+ @param count the number of rows examined
+*/
+typedef void (*set_statement_rows_examined_t)
+ (struct PSI_statement_locker *locker, ulonglong count);
+
+/**
+ Increment a statement event "created tmp disk tables" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_created_tmp_disk_tables_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "created tmp tables" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_created_tmp_tables_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "select full join" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_select_full_join_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "select full range join" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_select_full_range_join_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "select range join" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_select_range_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "select range check" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_select_range_check_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "select scan" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_select_scan_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "sort merge passes" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_sort_merge_passes_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "sort range" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_sort_range_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "sort rows" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_sort_rows_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Increment a statement event "sort scan" metric.
+ @param locker the statement locker
+ @param count the metric increment value
+*/
+typedef void (*inc_statement_sort_scan_t)
+ (struct PSI_statement_locker *locker, ulong count);
+
+/**
+ Set a statement event "no index used" metric.
+ @param locker the statement locker
+ @param count the metric value
+*/
+typedef void (*set_statement_no_index_used_t)
+ (struct PSI_statement_locker *locker);
+
+/**
+ Set a statement event "no good index used" metric.
+ @param locker the statement locker
+ @param count the metric value
+*/
+typedef void (*set_statement_no_good_index_used_t)
+ (struct PSI_statement_locker *locker);
+
+/**
+ End a statement event.
+ @param locker the statement locker
+ @param stmt_da the statement diagnostics area.
+ @sa Diagnostics_area
+*/
+typedef void (*end_statement_v1_t)
+ (struct PSI_statement_locker *locker, void *stmt_da);
+
+/**
+ Record a socket instrumentation start event.
+ @param locker a socket locker for the running thread
+ @param op socket operation to be performed
+ @param count the number of bytes requested, or 0 if not applicable
+ @param src_file the source file name
+ @param src_line the source line number
+*/
+typedef struct PSI_socket_locker* (*start_socket_wait_v1_t)
+ (struct PSI_socket_locker_state_v1 *state,
+ struct PSI_socket *socket,
+ enum PSI_socket_operation op,
+ size_t count,
+ const char *src_file, uint src_line);
+
+/**
+ Record a socket instrumentation end event.
+ Note that for socket close operations, the instrumented socket handle
+ associated with the socket (which was provided to obtain a locker)
+ is invalid after this call.
+ @param locker a socket locker for the running thread
+ @param count the number of bytes actually used in the operation,
+ or 0 if not applicable, or -1 if the operation failed
+ @sa get_thread_socket_locker
+*/
+typedef void (*end_socket_wait_v1_t)
+ (struct PSI_socket_locker *locker, size_t count);
+
+/**
+ Set the socket state for an instrumented socket.
+ @param socket the instrumented socket
+ @param state socket state
+ */
+typedef void (*set_socket_state_v1_t)(struct PSI_socket *socket,
+ enum PSI_socket_state state);
+
+/**
+ Set the socket info for an instrumented socket.
+ @param socket the instrumented socket
+ @param fd the socket descriptor
+ @param addr the socket ip address
+ @param addr_len length of socket ip address
+ @param thread_id associated thread id
+*/
+typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
+ const my_socket *fd,
+ const struct sockaddr *addr,
+ socklen_t addr_len);
+
+/**
+ Bind a socket to the thread that owns it.
+ @param socket instrumented socket
+*/
+typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
+
+typedef struct PSI_digest_locker * (*digest_start_v1_t)
+ (struct PSI_statement_locker *locker);
+
+typedef struct PSI_digest_locker* (*digest_add_token_v1_t)
+ (struct PSI_digest_locker *locker, uint token, struct OPAQUE_LEX_YYSTYPE *yylval);
+
+/**
+ Stores an array of connection attributes
+ @param buffer char array of length encoded connection attributes
+ in network format
+ @param length legnth of the data in buffer
+ @param from_cs charset in which @buffer is encodded
+ @return state
+ @retval non-0 attributes truncated
+ @retval 0 stored the attribute
+*/
+typedef int (*set_thread_connect_attrs_v1_t)(const char *buffer, uint length,
+ const void *from_cs);
+
+/**
+ Performance Schema Interface, version 1.
+ @since PSI_VERSION_1
+*/
+struct PSI_v1
+{
+ /** @sa register_mutex_v1_t. */
+ register_mutex_v1_t register_mutex;
+ /** @sa register_rwlock_v1_t. */
+ register_rwlock_v1_t register_rwlock;
+ /** @sa register_cond_v1_t. */
+ register_cond_v1_t register_cond;
+ /** @sa register_thread_v1_t. */
+ register_thread_v1_t register_thread;
+ /** @sa register_file_v1_t. */
+ register_file_v1_t register_file;
+ /** @sa register_stage_v1_t. */
+ register_stage_v1_t register_stage;
+ /** @sa register_statement_v1_t. */
+ register_statement_v1_t register_statement;
+ /** @sa register_socket_v1_t. */
+ register_socket_v1_t register_socket;
+ /** @sa init_mutex_v1_t. */
+ init_mutex_v1_t init_mutex;
+ /** @sa destroy_mutex_v1_t. */
+ destroy_mutex_v1_t destroy_mutex;
+ /** @sa init_rwlock_v1_t. */
+ init_rwlock_v1_t init_rwlock;
+ /** @sa destroy_rwlock_v1_t. */
+ destroy_rwlock_v1_t destroy_rwlock;
+ /** @sa init_cond_v1_t. */
+ init_cond_v1_t init_cond;
+ /** @sa destroy_cond_v1_t. */
+ destroy_cond_v1_t destroy_cond;
+ /** @sa init_socket_v1_t. */
+ init_socket_v1_t init_socket;
+ /** @sa destroy_socket_v1_t. */
+ destroy_socket_v1_t destroy_socket;
+ /** @sa get_table_share_v1_t. */
+ get_table_share_v1_t get_table_share;
+ /** @sa release_table_share_v1_t. */
+ release_table_share_v1_t release_table_share;
+ /** @sa drop_table_share_v1_t. */
+ drop_table_share_v1_t drop_table_share;
+ /** @sa open_table_v1_t. */
+ open_table_v1_t open_table;
+ /** @sa unbind_table_v1_t. */
+ unbind_table_v1_t unbind_table;
+ /** @sa rebind_table_v1_t. */
+ rebind_table_v1_t rebind_table;
+ /** @sa close_table_v1_t. */
+ close_table_v1_t close_table;
+ /** @sa create_file_v1_t. */
+ create_file_v1_t create_file;
+ /** @sa spawn_thread_v1_t. */
+ spawn_thread_v1_t spawn_thread;
+ /** @sa new_thread_v1_t. */
+ new_thread_v1_t new_thread;
+ /** @sa set_thread_id_v1_t. */
+ set_thread_id_v1_t set_thread_id;
+ /** @sa get_thread_v1_t. */
+ get_thread_v1_t get_thread;
+ /** @sa set_thread_user_v1_t. */
+ set_thread_user_v1_t set_thread_user;
+ /** @sa set_thread_user_host_v1_t. */
+ set_thread_user_host_v1_t set_thread_user_host;
+ /** @sa set_thread_db_v1_t. */
+ set_thread_db_v1_t set_thread_db;
+ /** @sa set_thread_command_v1_t. */
+ set_thread_command_v1_t set_thread_command;
+ /** @sa set_thread_start_time_v1_t. */
+ set_thread_start_time_v1_t set_thread_start_time;
+ /** @sa set_thread_state_v1_t. */
+ set_thread_state_v1_t set_thread_state;
+ /** @sa set_thread_info_v1_t. */
+ set_thread_info_v1_t set_thread_info;
+ /** @sa set_thread_v1_t. */
+ set_thread_v1_t set_thread;
+ /** @sa delete_current_thread_v1_t. */
+ delete_current_thread_v1_t delete_current_thread;
+ /** @sa delete_thread_v1_t. */
+ delete_thread_v1_t delete_thread;
+ /** @sa get_thread_file_name_locker_v1_t. */
+ get_thread_file_name_locker_v1_t get_thread_file_name_locker;
+ /** @sa get_thread_file_stream_locker_v1_t. */
+ get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
+ /** @sa get_thread_file_descriptor_locker_v1_t. */
+ get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
+ /** @sa unlock_mutex_v1_t. */
+ unlock_mutex_v1_t unlock_mutex;
+ /** @sa unlock_rwlock_v1_t. */
+ unlock_rwlock_v1_t unlock_rwlock;
+ /** @sa signal_cond_v1_t. */
+ signal_cond_v1_t signal_cond;
+ /** @sa broadcast_cond_v1_t. */
+ broadcast_cond_v1_t broadcast_cond;
+ /** @sa start_idle_wait_v1_t. */
+ start_idle_wait_v1_t start_idle_wait;
+ /** @sa end_idle_wait_v1_t. */
+ end_idle_wait_v1_t end_idle_wait;
+ /** @sa start_mutex_wait_v1_t. */
+ start_mutex_wait_v1_t start_mutex_wait;
+ /** @sa end_mutex_wait_v1_t. */
+ end_mutex_wait_v1_t end_mutex_wait;
+ /** @sa start_rwlock_rdwait_v1_t. */
+ start_rwlock_rdwait_v1_t start_rwlock_rdwait;
+ /** @sa end_rwlock_rdwait_v1_t. */
+ end_rwlock_rdwait_v1_t end_rwlock_rdwait;
+ /** @sa start_rwlock_wrwait_v1_t. */
+ start_rwlock_wrwait_v1_t start_rwlock_wrwait;
+ /** @sa end_rwlock_wrwait_v1_t. */
+ end_rwlock_wrwait_v1_t end_rwlock_wrwait;
+ /** @sa start_cond_wait_v1_t. */
+ start_cond_wait_v1_t start_cond_wait;
+ /** @sa end_cond_wait_v1_t. */
+ end_cond_wait_v1_t end_cond_wait;
+ /** @sa start_table_io_wait_v1_t. */
+ start_table_io_wait_v1_t start_table_io_wait;
+ /** @sa end_table_io_wait_v1_t. */
+ end_table_io_wait_v1_t end_table_io_wait;
+ /** @sa start_table_lock_wait_v1_t. */
+ start_table_lock_wait_v1_t start_table_lock_wait;
+ /** @sa end_table_lock_wait_v1_t. */
+ end_table_lock_wait_v1_t end_table_lock_wait;
+ /** @sa start_file_open_wait_v1_t. */
+ start_file_open_wait_v1_t start_file_open_wait;
+ /** @sa end_file_open_wait_v1_t. */
+ end_file_open_wait_v1_t end_file_open_wait;
+ /** @sa end_file_open_wait_and_bind_to_descriptor_v1_t. */
+ end_file_open_wait_and_bind_to_descriptor_v1_t
+ end_file_open_wait_and_bind_to_descriptor;
+ /** @sa start_file_wait_v1_t. */
+ start_file_wait_v1_t start_file_wait;
+ /** @sa end_file_wait_v1_t. */
+ end_file_wait_v1_t end_file_wait;
+ /** @sa start_file_close_wait_v1_t. */
+ start_file_close_wait_v1_t start_file_close_wait;
+ /** @sa end_file_close_wait_v1_t. */
+ end_file_close_wait_v1_t end_file_close_wait;
+ /** @sa start_stage_v1_t. */
+ start_stage_v1_t start_stage;
+ /** @sa end_stage_v1_t. */
+ end_stage_v1_t end_stage;
+ /** @sa get_thread_statement_locker_v1_t. */
+ get_thread_statement_locker_v1_t get_thread_statement_locker;
+ /** @sa refine_statement_v1_t. */
+ refine_statement_v1_t refine_statement;
+ /** @sa start_statement_v1_t. */
+ start_statement_v1_t start_statement;
+ /** @sa set_statement_text_v1_t. */
+ set_statement_text_v1_t set_statement_text;
+ /** @sa set_statement_lock_time_t. */
+ set_statement_lock_time_t set_statement_lock_time;
+ /** @sa set_statement_rows_sent_t. */
+ set_statement_rows_sent_t set_statement_rows_sent;
+ /** @sa set_statement_rows_examined_t. */
+ set_statement_rows_examined_t set_statement_rows_examined;
+ /** @sa inc_statement_created_tmp_disk_tables. */
+ inc_statement_created_tmp_disk_tables_t inc_statement_created_tmp_disk_tables;
+ /** @sa inc_statement_created_tmp_tables. */
+ inc_statement_created_tmp_tables_t inc_statement_created_tmp_tables;
+ /** @sa inc_statement_select_full_join. */
+ inc_statement_select_full_join_t inc_statement_select_full_join;
+ /** @sa inc_statement_select_full_range_join. */
+ inc_statement_select_full_range_join_t inc_statement_select_full_range_join;
+ /** @sa inc_statement_select_range. */
+ inc_statement_select_range_t inc_statement_select_range;
+ /** @sa inc_statement_select_range_check. */
+ inc_statement_select_range_check_t inc_statement_select_range_check;
+ /** @sa inc_statement_select_scan. */
+ inc_statement_select_scan_t inc_statement_select_scan;
+ /** @sa inc_statement_sort_merge_passes. */
+ inc_statement_sort_merge_passes_t inc_statement_sort_merge_passes;
+ /** @sa inc_statement_sort_range. */
+ inc_statement_sort_range_t inc_statement_sort_range;
+ /** @sa inc_statement_sort_rows. */
+ inc_statement_sort_rows_t inc_statement_sort_rows;
+ /** @sa inc_statement_sort_scan. */
+ inc_statement_sort_scan_t inc_statement_sort_scan;
+ /** @sa set_statement_no_index_used. */
+ set_statement_no_index_used_t set_statement_no_index_used;
+ /** @sa set_statement_no_good_index_used. */
+ set_statement_no_good_index_used_t set_statement_no_good_index_used;
+ /** @sa end_statement_v1_t. */
+ end_statement_v1_t end_statement;
+ /** @sa start_socket_wait_v1_t. */
+ start_socket_wait_v1_t start_socket_wait;
+ /** @sa end_socket_wait_v1_t. */
+ end_socket_wait_v1_t end_socket_wait;
+ /** @sa set_socket_state_v1_t. */
+ set_socket_state_v1_t set_socket_state;
+ /** @sa set_socket_info_v1_t. */
+ set_socket_info_v1_t set_socket_info;
+ /** @sa set_socket_thread_owner_v1_t. */
+ set_socket_thread_owner_v1_t set_socket_thread_owner;
+ /** @sa digest_start_v1_t. */
+ digest_start_v1_t digest_start;
+ /** @sa digest_add_token_v1_t. */
+ digest_add_token_v1_t digest_add_token;
+ /** @sa set_thread_connect_attrs_v1_t. */
+ set_thread_connect_attrs_v1_t set_thread_connect_attrs;
+};
+
+/** @} (end of group Group_PSI_v1) */
+
+#endif /* HAVE_PSI_1 */
+
+#ifdef USE_PSI_2
+#define HAVE_PSI_2
+#endif
+
+#ifdef HAVE_PSI_2
+
+/**
+ @defgroup Group_PSI_v2 Application Binary Interface, version 2
+ @ingroup Instrumentation_interface
+ @{
+*/
+
+/**
+ Performance Schema Interface, version 2.
+ This is a placeholder, this interface is not defined yet.
+ @since PSI_VERSION_2
+*/
+struct PSI_v2
+{
+ /** Placeholder */
+ int placeholder;
+ /* ... extended interface ... */
+};
+
+/** Placeholder */
+struct PSI_mutex_info_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_rwlock_info_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_cond_info_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_thread_info_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_file_info_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_stage_info_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_statement_info_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_idle_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_mutex_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_rwlock_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_cond_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_file_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_table_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_statement_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** Placeholder */
+struct PSI_socket_locker_state_v2
+{
+ /** Placeholder */
+ int placeholder;
+};
+
+/** @} (end of group Group_PSI_v2) */
+
+#endif /* HAVE_PSI_2 */
+
+/**
+ @typedef PSI
+ The instrumentation interface for the current version.
+ @sa PSI_CURRENT_VERSION
+*/
+
+/**
+ @typedef PSI_mutex_info
+ The mutex information structure for the current version.
+*/
+
+/**
+ @typedef PSI_rwlock_info
+ The rwlock information structure for the current version.
+*/
+
+/**
+ @typedef PSI_cond_info
+ The cond information structure for the current version.
+*/
+
+/**
+ @typedef PSI_thread_info
+ The thread information structure for the current version.
+*/
+
+/**
+ @typedef PSI_file_info
+ The file information structure for the current version.
+*/
+
+/* Export the required version */
+#ifdef USE_PSI_1
+typedef struct PSI_v1 PSI;
+typedef struct PSI_mutex_info_v1 PSI_mutex_info;
+typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
+typedef struct PSI_cond_info_v1 PSI_cond_info;
+typedef struct PSI_thread_info_v1 PSI_thread_info;
+typedef struct PSI_file_info_v1 PSI_file_info;
+typedef struct PSI_stage_info_v1 PSI_stage_info;
+typedef struct PSI_statement_info_v1 PSI_statement_info;
+typedef struct PSI_socket_info_v1 PSI_socket_info;
+typedef struct PSI_idle_locker_state_v1 PSI_idle_locker_state;
+typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
+typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
+typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
+typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
+typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
+typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
+typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
+#endif
+
+#ifdef USE_PSI_2
+typedef struct PSI_v2 PSI;
+typedef struct PSI_mutex_info_v2 PSI_mutex_info;
+typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
+typedef struct PSI_cond_info_v2 PSI_cond_info;
+typedef struct PSI_thread_info_v2 PSI_thread_info;
+typedef struct PSI_file_info_v2 PSI_file_info;
+typedef struct PSI_stage_info_v2 PSI_stage_info;
+typedef struct PSI_statement_info_v2 PSI_statement_info;
+typedef struct PSI_socket_info_v2 PSI_socket_info;
+typedef struct PSI_idle_locker_state_v2 PSI_idle_locker_state;
+typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state;
+typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state;
+typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state;
+typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
+typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
+typedef struct PSI_statement_locker_state_v2 PSI_statement_locker_state;
+typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state;
+#endif
+
+#else /* HAVE_PSI_INTERFACE */
+
+/**
+ Dummy structure, used to declare PSI_server when no instrumentation
+ is available.
+ The content does not matter, since PSI_server will be NULL.
+*/
+struct PSI_none
+{
+ int opaque;
+};
+typedef struct PSI_none PSI;
+
+/**
+ Stage instrument information.
+ @since PSI_VERSION_1
+ This structure is used to register an instrumented stage.
+*/
+struct PSI_stage_info_none
+{
+ /** Unused stage key. */
+ unsigned int m_key;
+ /** The name of the stage instrument. */
+ const char *m_name;
+ /** Unused stage flags. */
+ int m_flags;
+};
+
+/**
+ The stage instrumentation has to co exist with the legacy
+ THD::set_proc_info instrumentation.
+ To avoid duplication of the instrumentation in the server,
+ the common PSI_stage_info structure is used,
+ so we export it here, even when not building
+ with HAVE_PSI_INTERFACE.
+*/
+typedef struct PSI_stage_info_none PSI_stage_info;
+
+#endif /* HAVE_PSI_INTERFACE */
+
+extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
+
+/*
+ Allow to override PSI_XXX_CALL at compile time
+ with more efficient implementations, if available.
+ If nothing better is available,
+ make a dynamic call using the PSI_server function pointer.
+*/
+
+#ifndef PSI_MUTEX_CALL
+#define PSI_MUTEX_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_RWLOCK_CALL
+#define PSI_RWLOCK_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_COND_CALL
+#define PSI_COND_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_THREAD_CALL
+#define PSI_THREAD_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_FILE_CALL
+#define PSI_FILE_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_SOCKET_CALL
+#define PSI_SOCKET_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_STAGE_CALL
+#define PSI_STAGE_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_STATEMENT_CALL
+#define PSI_STATEMENT_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_TABLE_CALL
+#define PSI_TABLE_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#ifndef PSI_IDLE_CALL
+#define PSI_IDLE_CALL(M) PSI_DYNAMIC_CALL(M)
+#endif
+
+#define PSI_DYNAMIC_CALL(M) PSI_server->M
+
+/** @} */
+
+C_MODE_END
+#endif /* MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H */
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v0.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v0.h
new file mode 100644
index 000000000..7444cb0b2
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v0.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+/**
+ @file mysql/psi/psi_abi_v0.h
+ ABI check for mysql/psi/psi.h, when compiling without instrumentation.
+ This file is only used to automate detection of changes between versions.
+ Do not include this file, include mysql/psi/psi.h instead.
+*/
+#define _global_h
+#include "mysql/psi/psi.h"
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v0.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v0.h.pp
new file mode 100644
index 000000000..b46b38ed1
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v0.h.pp
@@ -0,0 +1,47 @@
+#include "mysql/psi/psi.h"
+C_MODE_START
+struct TABLE_SHARE;
+struct OPAQUE_LEX_YYSTYPE;
+struct PSI_mutex;
+typedef struct PSI_mutex PSI_mutex;
+struct PSI_rwlock;
+typedef struct PSI_rwlock PSI_rwlock;
+struct PSI_cond;
+typedef struct PSI_cond PSI_cond;
+struct PSI_table_share;
+typedef struct PSI_table_share PSI_table_share;
+struct PSI_table;
+typedef struct PSI_table PSI_table;
+struct PSI_thread;
+typedef struct PSI_thread PSI_thread;
+struct PSI_file;
+typedef struct PSI_file PSI_file;
+struct PSI_socket;
+typedef struct PSI_socket PSI_socket;
+struct PSI_table_locker;
+typedef struct PSI_table_locker PSI_table_locker;
+struct PSI_statement_locker;
+typedef struct PSI_statement_locker PSI_statement_locker;
+struct PSI_idle_locker;
+typedef struct PSI_idle_locker PSI_idle_locker;
+struct PSI_digest_locker;
+typedef struct PSI_digest_locker PSI_digest_locker;
+struct PSI_bootstrap
+{
+ void* (*get_interface)(int version);
+};
+typedef struct PSI_bootstrap PSI_bootstrap;
+struct PSI_none
+{
+ int opaque;
+};
+typedef struct PSI_none PSI;
+struct PSI_stage_info_none
+{
+ unsigned int m_key;
+ const char *m_name;
+ int m_flags;
+};
+typedef struct PSI_stage_info_none PSI_stage_info;
+extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
+C_MODE_END
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v1.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v1.h
new file mode 100644
index 000000000..54c49f0c5
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v1.h
@@ -0,0 +1,26 @@
+/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+/**
+ @file mysql/psi/psi_abi_v1.h
+ ABI check for mysql/psi/psi.h, when using PSI_VERSION_1.
+ This file is only used to automate detection of changes between versions.
+ Do not include this file, include mysql/psi/psi.h instead.
+*/
+#define USE_PSI_1
+#define HAVE_PSI_INTERFACE
+#define MY_GLOBAL_INCLUDED
+#include "mysql/psi/psi.h"
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v1.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v1.h.pp
new file mode 100644
index 000000000..fa2bf724b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v1.h.pp
@@ -0,0 +1,634 @@
+#include "mysql/psi/psi.h"
+C_MODE_START
+struct TABLE_SHARE;
+struct OPAQUE_LEX_YYSTYPE;
+struct PSI_mutex;
+typedef struct PSI_mutex PSI_mutex;
+struct PSI_rwlock;
+typedef struct PSI_rwlock PSI_rwlock;
+struct PSI_cond;
+typedef struct PSI_cond PSI_cond;
+struct PSI_table_share;
+typedef struct PSI_table_share PSI_table_share;
+struct PSI_table;
+typedef struct PSI_table PSI_table;
+struct PSI_thread;
+typedef struct PSI_thread PSI_thread;
+struct PSI_file;
+typedef struct PSI_file PSI_file;
+struct PSI_socket;
+typedef struct PSI_socket PSI_socket;
+struct PSI_table_locker;
+typedef struct PSI_table_locker PSI_table_locker;
+struct PSI_statement_locker;
+typedef struct PSI_statement_locker PSI_statement_locker;
+struct PSI_idle_locker;
+typedef struct PSI_idle_locker PSI_idle_locker;
+struct PSI_digest_locker;
+typedef struct PSI_digest_locker PSI_digest_locker;
+struct PSI_bootstrap
+{
+ void* (*get_interface)(int version);
+};
+typedef struct PSI_bootstrap PSI_bootstrap;
+struct PSI_mutex_locker;
+typedef struct PSI_mutex_locker PSI_mutex_locker;
+struct PSI_rwlock_locker;
+typedef struct PSI_rwlock_locker PSI_rwlock_locker;
+struct PSI_cond_locker;
+typedef struct PSI_cond_locker PSI_cond_locker;
+struct PSI_file_locker;
+typedef struct PSI_file_locker PSI_file_locker;
+struct PSI_socket_locker;
+typedef struct PSI_socket_locker PSI_socket_locker;
+enum PSI_mutex_operation
+{
+ PSI_MUTEX_LOCK= 0,
+ PSI_MUTEX_TRYLOCK= 1
+};
+typedef enum PSI_mutex_operation PSI_mutex_operation;
+enum PSI_rwlock_operation
+{
+ PSI_RWLOCK_READLOCK= 0,
+ PSI_RWLOCK_WRITELOCK= 1,
+ PSI_RWLOCK_TRYREADLOCK= 2,
+ PSI_RWLOCK_TRYWRITELOCK= 3
+};
+typedef enum PSI_rwlock_operation PSI_rwlock_operation;
+enum PSI_cond_operation
+{
+ PSI_COND_WAIT= 0,
+ PSI_COND_TIMEDWAIT= 1
+};
+typedef enum PSI_cond_operation PSI_cond_operation;
+enum PSI_file_operation
+{
+ PSI_FILE_CREATE= 0,
+ PSI_FILE_CREATE_TMP= 1,
+ PSI_FILE_OPEN= 2,
+ PSI_FILE_STREAM_OPEN= 3,
+ PSI_FILE_CLOSE= 4,
+ PSI_FILE_STREAM_CLOSE= 5,
+ PSI_FILE_READ= 6,
+ PSI_FILE_WRITE= 7,
+ PSI_FILE_SEEK= 8,
+ PSI_FILE_TELL= 9,
+ PSI_FILE_FLUSH= 10,
+ PSI_FILE_STAT= 11,
+ PSI_FILE_FSTAT= 12,
+ PSI_FILE_CHSIZE= 13,
+ PSI_FILE_DELETE= 14,
+ PSI_FILE_RENAME= 15,
+ PSI_FILE_SYNC= 16
+};
+typedef enum PSI_file_operation PSI_file_operation;
+enum PSI_table_io_operation
+{
+ PSI_TABLE_FETCH_ROW= 0,
+ PSI_TABLE_WRITE_ROW= 1,
+ PSI_TABLE_UPDATE_ROW= 2,
+ PSI_TABLE_DELETE_ROW= 3
+};
+typedef enum PSI_table_io_operation PSI_table_io_operation;
+enum PSI_table_lock_operation
+{
+ PSI_TABLE_LOCK= 0,
+ PSI_TABLE_EXTERNAL_LOCK= 1
+};
+typedef enum PSI_table_lock_operation PSI_table_lock_operation;
+enum PSI_socket_state
+{
+ PSI_SOCKET_STATE_IDLE= 1,
+ PSI_SOCKET_STATE_ACTIVE= 2
+};
+typedef enum PSI_socket_state PSI_socket_state;
+enum PSI_socket_operation
+{
+ PSI_SOCKET_CREATE= 0,
+ PSI_SOCKET_CONNECT= 1,
+ PSI_SOCKET_BIND= 2,
+ PSI_SOCKET_CLOSE= 3,
+ PSI_SOCKET_SEND= 4,
+ PSI_SOCKET_RECV= 5,
+ PSI_SOCKET_SENDTO= 6,
+ PSI_SOCKET_RECVFROM= 7,
+ PSI_SOCKET_SENDMSG= 8,
+ PSI_SOCKET_RECVMSG= 9,
+ PSI_SOCKET_SEEK= 10,
+ PSI_SOCKET_OPT= 11,
+ PSI_SOCKET_STAT= 12,
+ PSI_SOCKET_SHUTDOWN= 13,
+ PSI_SOCKET_SELECT= 14
+};
+typedef enum PSI_socket_operation PSI_socket_operation;
+typedef unsigned int PSI_mutex_key;
+typedef unsigned int PSI_rwlock_key;
+typedef unsigned int PSI_cond_key;
+typedef unsigned int PSI_thread_key;
+typedef unsigned int PSI_file_key;
+typedef unsigned int PSI_stage_key;
+typedef unsigned int PSI_statement_key;
+typedef unsigned int PSI_socket_key;
+struct PSI_mutex_info_v1
+{
+ PSI_mutex_key *m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_rwlock_info_v1
+{
+ PSI_rwlock_key *m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_cond_info_v1
+{
+ PSI_cond_key *m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_thread_info_v1
+{
+ PSI_thread_key *m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_file_info_v1
+{
+ PSI_file_key *m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_stage_info_v1
+{
+ PSI_stage_key m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_statement_info_v1
+{
+ PSI_statement_key m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_socket_info_v1
+{
+ PSI_socket_key *m_key;
+ const char *m_name;
+ int m_flags;
+};
+struct PSI_idle_locker_state_v1
+{
+ uint m_flags;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ void *m_wait;
+};
+struct PSI_mutex_locker_state_v1
+{
+ uint m_flags;
+ enum PSI_mutex_operation m_operation;
+ struct PSI_mutex *m_mutex;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ void *m_wait;
+};
+struct PSI_rwlock_locker_state_v1
+{
+ uint m_flags;
+ enum PSI_rwlock_operation m_operation;
+ struct PSI_rwlock *m_rwlock;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ void *m_wait;
+};
+struct PSI_cond_locker_state_v1
+{
+ uint m_flags;
+ enum PSI_cond_operation m_operation;
+ struct PSI_cond *m_cond;
+ struct PSI_mutex *m_mutex;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ void *m_wait;
+};
+struct PSI_file_locker_state_v1
+{
+ uint m_flags;
+ enum PSI_file_operation m_operation;
+ struct PSI_file *m_file;
+ const char *m_name;
+ void *m_class;
+ struct PSI_thread *m_thread;
+ size_t m_number_of_bytes;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ void *m_wait;
+};
+struct PSI_table_locker_state_v1
+{
+ uint m_flags;
+ enum PSI_table_io_operation m_io_operation;
+ struct PSI_table *m_table;
+ struct PSI_table_share *m_table_share;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ void *m_wait;
+ uint m_index;
+};
+struct PSI_digest_storage
+{
+ my_bool m_full;
+ int m_byte_count;
+ uint m_charset_number;
+ unsigned char m_token_array[1024];
+};
+typedef struct PSI_digest_storage PSI_digest_storage;
+struct PSI_digest_locker_state
+{
+ int m_last_id_index;
+ PSI_digest_storage m_digest_storage;
+};
+typedef struct PSI_digest_locker_state PSI_digest_locker_state;
+struct PSI_statement_locker_state_v1
+{
+ my_bool m_discarded;
+ uchar m_no_index_used;
+ uchar m_no_good_index_used;
+ uint m_flags;
+ void *m_class;
+ struct PSI_thread *m_thread;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ void *m_statement;
+ ulonglong m_lock_time;
+ ulonglong m_rows_sent;
+ ulonglong m_rows_examined;
+ ulong m_created_tmp_disk_tables;
+ ulong m_created_tmp_tables;
+ ulong m_select_full_join;
+ ulong m_select_full_range_join;
+ ulong m_select_range;
+ ulong m_select_range_check;
+ ulong m_select_scan;
+ ulong m_sort_merge_passes;
+ ulong m_sort_range;
+ ulong m_sort_rows;
+ ulong m_sort_scan;
+ PSI_digest_locker_state m_digest_state;
+ char m_schema_name[(64 * 3)];
+ uint m_schema_name_length;
+};
+struct PSI_socket_locker_state_v1
+{
+ uint m_flags;
+ struct PSI_socket *m_socket;
+ struct PSI_thread *m_thread;
+ size_t m_number_of_bytes;
+ ulonglong m_timer_start;
+ ulonglong (*m_timer)(void);
+ enum PSI_socket_operation m_operation;
+ const char* m_src_file;
+ int m_src_line;
+ void *m_wait;
+};
+typedef void (*register_mutex_v1_t)
+ (const char *category, struct PSI_mutex_info_v1 *info, int count);
+typedef void (*register_rwlock_v1_t)
+ (const char *category, struct PSI_rwlock_info_v1 *info, int count);
+typedef void (*register_cond_v1_t)
+ (const char *category, struct PSI_cond_info_v1 *info, int count);
+typedef void (*register_thread_v1_t)
+ (const char *category, struct PSI_thread_info_v1 *info, int count);
+typedef void (*register_file_v1_t)
+ (const char *category, struct PSI_file_info_v1 *info, int count);
+typedef void (*register_stage_v1_t)
+ (const char *category, struct PSI_stage_info_v1 **info, int count);
+typedef void (*register_statement_v1_t)
+ (const char *category, struct PSI_statement_info_v1 *info, int count);
+typedef void (*register_socket_v1_t)
+ (const char *category, struct PSI_socket_info_v1 *info, int count);
+typedef struct PSI_mutex* (*init_mutex_v1_t)
+ (PSI_mutex_key key, const void *identity);
+typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
+typedef struct PSI_rwlock* (*init_rwlock_v1_t)
+ (PSI_rwlock_key key, const void *identity);
+typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
+typedef struct PSI_cond* (*init_cond_v1_t)
+ (PSI_cond_key key, const void *identity);
+typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
+typedef struct PSI_socket* (*init_socket_v1_t)
+ (PSI_socket_key key, const my_socket *fd,
+ const struct sockaddr *addr, socklen_t addr_len);
+typedef void (*destroy_socket_v1_t)(struct PSI_socket *socket);
+typedef struct PSI_table_share* (*get_table_share_v1_t)
+ (my_bool temporary, struct TABLE_SHARE *share);
+typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
+typedef void (*drop_table_share_v1_t)
+ (my_bool temporary, const char *schema_name, int schema_name_length,
+ const char *table_name, int table_name_length);
+typedef struct PSI_table* (*open_table_v1_t)
+ (struct PSI_table_share *share, const void *identity);
+typedef void (*unbind_table_v1_t)
+ (struct PSI_table *table);
+typedef PSI_table* (*rebind_table_v1_t)
+ (PSI_table_share *share, const void *identity, PSI_table *table);
+typedef void (*close_table_v1_t)(struct PSI_table *table);
+typedef void (*create_file_v1_t)(PSI_file_key key, const char *name,
+ File file);
+typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
+ pthread_t *thread,
+ const pthread_attr_t *attr,
+ void *(*start_routine)(void*), void *arg);
+typedef struct PSI_thread* (*new_thread_v1_t)
+ (PSI_thread_key key, const void *identity, ulonglong thread_id);
+typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
+ ulonglong id);
+typedef struct PSI_thread* (*get_thread_v1_t)(void);
+typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
+typedef void (*set_thread_user_host_v1_t)(const char *user, int user_len,
+ const char *host, int host_len);
+typedef void (*set_thread_db_v1_t)(const char* db, int db_len);
+typedef void (*set_thread_command_v1_t)(int command);
+typedef void (*set_thread_start_time_v1_t)(time_t start_time);
+typedef void (*set_thread_state_v1_t)(const char* state);
+typedef void (*set_thread_info_v1_t)(const char* info, uint info_len);
+typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
+typedef void (*delete_current_thread_v1_t)(void);
+typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
+typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
+ (struct PSI_file_locker_state_v1 *state,
+ PSI_file_key key, enum PSI_file_operation op, const char *name,
+ const void *identity);
+typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
+ (struct PSI_file_locker_state_v1 *state,
+ struct PSI_file *file, enum PSI_file_operation op);
+typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
+ (struct PSI_file_locker_state_v1 *state,
+ File file, enum PSI_file_operation op);
+typedef void (*unlock_mutex_v1_t)
+ (struct PSI_mutex *mutex);
+typedef void (*unlock_rwlock_v1_t)
+ (struct PSI_rwlock *rwlock);
+typedef void (*signal_cond_v1_t)
+ (struct PSI_cond *cond);
+typedef void (*broadcast_cond_v1_t)
+ (struct PSI_cond *cond);
+typedef struct PSI_idle_locker* (*start_idle_wait_v1_t)
+ (struct PSI_idle_locker_state_v1 *state, const char *src_file, uint src_line);
+typedef void (*end_idle_wait_v1_t)
+ (struct PSI_idle_locker *locker);
+typedef struct PSI_mutex_locker* (*start_mutex_wait_v1_t)
+ (struct PSI_mutex_locker_state_v1 *state,
+ struct PSI_mutex *mutex,
+ enum PSI_mutex_operation op,
+ const char *src_file, uint src_line);
+typedef void (*end_mutex_wait_v1_t)
+ (struct PSI_mutex_locker *locker, int rc);
+typedef struct PSI_rwlock_locker* (*start_rwlock_rdwait_v1_t)
+ (struct PSI_rwlock_locker_state_v1 *state,
+ struct PSI_rwlock *rwlock,
+ enum PSI_rwlock_operation op,
+ const char *src_file, uint src_line);
+typedef void (*end_rwlock_rdwait_v1_t)
+ (struct PSI_rwlock_locker *locker, int rc);
+typedef struct PSI_rwlock_locker* (*start_rwlock_wrwait_v1_t)
+ (struct PSI_rwlock_locker_state_v1 *state,
+ struct PSI_rwlock *rwlock,
+ enum PSI_rwlock_operation op,
+ const char *src_file, uint src_line);
+typedef void (*end_rwlock_wrwait_v1_t)
+ (struct PSI_rwlock_locker *locker, int rc);
+typedef struct PSI_cond_locker* (*start_cond_wait_v1_t)
+ (struct PSI_cond_locker_state_v1 *state,
+ struct PSI_cond *cond,
+ struct PSI_mutex *mutex,
+ enum PSI_cond_operation op,
+ const char *src_file, uint src_line);
+typedef void (*end_cond_wait_v1_t)
+ (struct PSI_cond_locker *locker, int rc);
+typedef struct PSI_table_locker* (*start_table_io_wait_v1_t)
+ (struct PSI_table_locker_state_v1 *state,
+ struct PSI_table *table,
+ enum PSI_table_io_operation op,
+ uint index,
+ const char *src_file, uint src_line);
+typedef void (*end_table_io_wait_v1_t)(struct PSI_table_locker *locker);
+typedef struct PSI_table_locker* (*start_table_lock_wait_v1_t)
+ (struct PSI_table_locker_state_v1 *state,
+ struct PSI_table *table,
+ enum PSI_table_lock_operation op,
+ ulong flags,
+ const char *src_file, uint src_line);
+typedef void (*end_table_lock_wait_v1_t)(struct PSI_table_locker *locker);
+typedef void (*start_file_open_wait_v1_t)
+ (struct PSI_file_locker *locker, const char *src_file, uint src_line);
+typedef struct PSI_file* (*end_file_open_wait_v1_t)
+ (struct PSI_file_locker *locker, void *result);
+typedef void (*end_file_open_wait_and_bind_to_descriptor_v1_t)
+ (struct PSI_file_locker *locker, File file);
+typedef void (*start_file_wait_v1_t)
+ (struct PSI_file_locker *locker, size_t count,
+ const char *src_file, uint src_line);
+typedef void (*end_file_wait_v1_t)
+ (struct PSI_file_locker *locker, size_t count);
+typedef void (*start_file_close_wait_v1_t)
+ (struct PSI_file_locker *locker, const char *src_file, uint src_line);
+typedef void (*end_file_close_wait_v1_t)
+ (struct PSI_file_locker *locker, int rc);
+typedef void (*start_stage_v1_t)
+ (PSI_stage_key key, const char *src_file, int src_line);
+typedef void (*end_stage_v1_t) (void);
+typedef struct PSI_statement_locker* (*get_thread_statement_locker_v1_t)
+ (struct PSI_statement_locker_state_v1 *state,
+ PSI_statement_key key, const void *charset);
+typedef struct PSI_statement_locker* (*refine_statement_v1_t)
+ (struct PSI_statement_locker *locker,
+ PSI_statement_key key);
+typedef void (*start_statement_v1_t)
+ (struct PSI_statement_locker *locker,
+ const char *db, uint db_length,
+ const char *src_file, uint src_line);
+typedef void (*set_statement_text_v1_t)
+ (struct PSI_statement_locker *locker,
+ const char *text, uint text_len);
+typedef void (*set_statement_lock_time_t)
+ (struct PSI_statement_locker *locker, ulonglong lock_time);
+typedef void (*set_statement_rows_sent_t)
+ (struct PSI_statement_locker *locker, ulonglong count);
+typedef void (*set_statement_rows_examined_t)
+ (struct PSI_statement_locker *locker, ulonglong count);
+typedef void (*inc_statement_created_tmp_disk_tables_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_created_tmp_tables_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_select_full_join_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_select_full_range_join_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_select_range_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_select_range_check_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_select_scan_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_sort_merge_passes_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_sort_range_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_sort_rows_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*inc_statement_sort_scan_t)
+ (struct PSI_statement_locker *locker, ulong count);
+typedef void (*set_statement_no_index_used_t)
+ (struct PSI_statement_locker *locker);
+typedef void (*set_statement_no_good_index_used_t)
+ (struct PSI_statement_locker *locker);
+typedef void (*end_statement_v1_t)
+ (struct PSI_statement_locker *locker, void *stmt_da);
+typedef struct PSI_socket_locker* (*start_socket_wait_v1_t)
+ (struct PSI_socket_locker_state_v1 *state,
+ struct PSI_socket *socket,
+ enum PSI_socket_operation op,
+ size_t count,
+ const char *src_file, uint src_line);
+typedef void (*end_socket_wait_v1_t)
+ (struct PSI_socket_locker *locker, size_t count);
+typedef void (*set_socket_state_v1_t)(struct PSI_socket *socket,
+ enum PSI_socket_state state);
+typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
+ const my_socket *fd,
+ const struct sockaddr *addr,
+ socklen_t addr_len);
+typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
+typedef struct PSI_digest_locker * (*digest_start_v1_t)
+ (struct PSI_statement_locker *locker);
+typedef struct PSI_digest_locker* (*digest_add_token_v1_t)
+ (struct PSI_digest_locker *locker, uint token, struct OPAQUE_LEX_YYSTYPE *yylval);
+typedef int (*set_thread_connect_attrs_v1_t)(const char *buffer, uint length,
+ const void *from_cs);
+struct PSI_v1
+{
+ register_mutex_v1_t register_mutex;
+ register_rwlock_v1_t register_rwlock;
+ register_cond_v1_t register_cond;
+ register_thread_v1_t register_thread;
+ register_file_v1_t register_file;
+ register_stage_v1_t register_stage;
+ register_statement_v1_t register_statement;
+ register_socket_v1_t register_socket;
+ init_mutex_v1_t init_mutex;
+ destroy_mutex_v1_t destroy_mutex;
+ init_rwlock_v1_t init_rwlock;
+ destroy_rwlock_v1_t destroy_rwlock;
+ init_cond_v1_t init_cond;
+ destroy_cond_v1_t destroy_cond;
+ init_socket_v1_t init_socket;
+ destroy_socket_v1_t destroy_socket;
+ get_table_share_v1_t get_table_share;
+ release_table_share_v1_t release_table_share;
+ drop_table_share_v1_t drop_table_share;
+ open_table_v1_t open_table;
+ unbind_table_v1_t unbind_table;
+ rebind_table_v1_t rebind_table;
+ close_table_v1_t close_table;
+ create_file_v1_t create_file;
+ spawn_thread_v1_t spawn_thread;
+ new_thread_v1_t new_thread;
+ set_thread_id_v1_t set_thread_id;
+ get_thread_v1_t get_thread;
+ set_thread_user_v1_t set_thread_user;
+ set_thread_user_host_v1_t set_thread_user_host;
+ set_thread_db_v1_t set_thread_db;
+ set_thread_command_v1_t set_thread_command;
+ set_thread_start_time_v1_t set_thread_start_time;
+ set_thread_state_v1_t set_thread_state;
+ set_thread_info_v1_t set_thread_info;
+ set_thread_v1_t set_thread;
+ delete_current_thread_v1_t delete_current_thread;
+ delete_thread_v1_t delete_thread;
+ get_thread_file_name_locker_v1_t get_thread_file_name_locker;
+ get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
+ get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
+ unlock_mutex_v1_t unlock_mutex;
+ unlock_rwlock_v1_t unlock_rwlock;
+ signal_cond_v1_t signal_cond;
+ broadcast_cond_v1_t broadcast_cond;
+ start_idle_wait_v1_t start_idle_wait;
+ end_idle_wait_v1_t end_idle_wait;
+ start_mutex_wait_v1_t start_mutex_wait;
+ end_mutex_wait_v1_t end_mutex_wait;
+ start_rwlock_rdwait_v1_t start_rwlock_rdwait;
+ end_rwlock_rdwait_v1_t end_rwlock_rdwait;
+ start_rwlock_wrwait_v1_t start_rwlock_wrwait;
+ end_rwlock_wrwait_v1_t end_rwlock_wrwait;
+ start_cond_wait_v1_t start_cond_wait;
+ end_cond_wait_v1_t end_cond_wait;
+ start_table_io_wait_v1_t start_table_io_wait;
+ end_table_io_wait_v1_t end_table_io_wait;
+ start_table_lock_wait_v1_t start_table_lock_wait;
+ end_table_lock_wait_v1_t end_table_lock_wait;
+ start_file_open_wait_v1_t start_file_open_wait;
+ end_file_open_wait_v1_t end_file_open_wait;
+ end_file_open_wait_and_bind_to_descriptor_v1_t
+ end_file_open_wait_and_bind_to_descriptor;
+ start_file_wait_v1_t start_file_wait;
+ end_file_wait_v1_t end_file_wait;
+ start_file_close_wait_v1_t start_file_close_wait;
+ end_file_close_wait_v1_t end_file_close_wait;
+ start_stage_v1_t start_stage;
+ end_stage_v1_t end_stage;
+ get_thread_statement_locker_v1_t get_thread_statement_locker;
+ refine_statement_v1_t refine_statement;
+ start_statement_v1_t start_statement;
+ set_statement_text_v1_t set_statement_text;
+ set_statement_lock_time_t set_statement_lock_time;
+ set_statement_rows_sent_t set_statement_rows_sent;
+ set_statement_rows_examined_t set_statement_rows_examined;
+ inc_statement_created_tmp_disk_tables_t inc_statement_created_tmp_disk_tables;
+ inc_statement_created_tmp_tables_t inc_statement_created_tmp_tables;
+ inc_statement_select_full_join_t inc_statement_select_full_join;
+ inc_statement_select_full_range_join_t inc_statement_select_full_range_join;
+ inc_statement_select_range_t inc_statement_select_range;
+ inc_statement_select_range_check_t inc_statement_select_range_check;
+ inc_statement_select_scan_t inc_statement_select_scan;
+ inc_statement_sort_merge_passes_t inc_statement_sort_merge_passes;
+ inc_statement_sort_range_t inc_statement_sort_range;
+ inc_statement_sort_rows_t inc_statement_sort_rows;
+ inc_statement_sort_scan_t inc_statement_sort_scan;
+ set_statement_no_index_used_t set_statement_no_index_used;
+ set_statement_no_good_index_used_t set_statement_no_good_index_used;
+ end_statement_v1_t end_statement;
+ start_socket_wait_v1_t start_socket_wait;
+ end_socket_wait_v1_t end_socket_wait;
+ set_socket_state_v1_t set_socket_state;
+ set_socket_info_v1_t set_socket_info;
+ set_socket_thread_owner_v1_t set_socket_thread_owner;
+ digest_start_v1_t digest_start;
+ digest_add_token_v1_t digest_add_token;
+ set_thread_connect_attrs_v1_t set_thread_connect_attrs;
+};
+typedef struct PSI_v1 PSI;
+typedef struct PSI_mutex_info_v1 PSI_mutex_info;
+typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
+typedef struct PSI_cond_info_v1 PSI_cond_info;
+typedef struct PSI_thread_info_v1 PSI_thread_info;
+typedef struct PSI_file_info_v1 PSI_file_info;
+typedef struct PSI_stage_info_v1 PSI_stage_info;
+typedef struct PSI_statement_info_v1 PSI_statement_info;
+typedef struct PSI_socket_info_v1 PSI_socket_info;
+typedef struct PSI_idle_locker_state_v1 PSI_idle_locker_state;
+typedef struct PSI_mutex_locker_state_v1 PSI_mutex_locker_state;
+typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
+typedef struct PSI_cond_locker_state_v1 PSI_cond_locker_state;
+typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
+typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
+typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
+typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
+extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
+C_MODE_END
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v2.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v2.h
new file mode 100644
index 000000000..08bca609b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v2.h
@@ -0,0 +1,26 @@
+/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+/**
+ @file mysql/psi/psi_abi_v1.h
+ ABI check for mysql/psi/psi.h, when using PSI_VERSION_2.
+ This file is only used to automate detection of changes between versions.
+ Do not include this file, include mysql/psi/psi.h instead.
+*/
+#define USE_PSI_2
+#define HAVE_PSI_INTERFACE
+#define _global_h
+#include "mysql/psi/psi.h"
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v2.h.pp b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v2.h.pp
new file mode 100644
index 000000000..458013b43
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/psi/psi_abi_v2.h.pp
@@ -0,0 +1,214 @@
+#include "mysql/psi/psi.h"
+C_MODE_START
+struct TABLE_SHARE;
+struct OPAQUE_LEX_YYSTYPE;
+struct PSI_mutex;
+typedef struct PSI_mutex PSI_mutex;
+struct PSI_rwlock;
+typedef struct PSI_rwlock PSI_rwlock;
+struct PSI_cond;
+typedef struct PSI_cond PSI_cond;
+struct PSI_table_share;
+typedef struct PSI_table_share PSI_table_share;
+struct PSI_table;
+typedef struct PSI_table PSI_table;
+struct PSI_thread;
+typedef struct PSI_thread PSI_thread;
+struct PSI_file;
+typedef struct PSI_file PSI_file;
+struct PSI_socket;
+typedef struct PSI_socket PSI_socket;
+struct PSI_table_locker;
+typedef struct PSI_table_locker PSI_table_locker;
+struct PSI_statement_locker;
+typedef struct PSI_statement_locker PSI_statement_locker;
+struct PSI_idle_locker;
+typedef struct PSI_idle_locker PSI_idle_locker;
+struct PSI_digest_locker;
+typedef struct PSI_digest_locker PSI_digest_locker;
+struct PSI_bootstrap
+{
+ void* (*get_interface)(int version);
+};
+typedef struct PSI_bootstrap PSI_bootstrap;
+struct PSI_mutex_locker;
+typedef struct PSI_mutex_locker PSI_mutex_locker;
+struct PSI_rwlock_locker;
+typedef struct PSI_rwlock_locker PSI_rwlock_locker;
+struct PSI_cond_locker;
+typedef struct PSI_cond_locker PSI_cond_locker;
+struct PSI_file_locker;
+typedef struct PSI_file_locker PSI_file_locker;
+struct PSI_socket_locker;
+typedef struct PSI_socket_locker PSI_socket_locker;
+enum PSI_mutex_operation
+{
+ PSI_MUTEX_LOCK= 0,
+ PSI_MUTEX_TRYLOCK= 1
+};
+typedef enum PSI_mutex_operation PSI_mutex_operation;
+enum PSI_rwlock_operation
+{
+ PSI_RWLOCK_READLOCK= 0,
+ PSI_RWLOCK_WRITELOCK= 1,
+ PSI_RWLOCK_TRYREADLOCK= 2,
+ PSI_RWLOCK_TRYWRITELOCK= 3
+};
+typedef enum PSI_rwlock_operation PSI_rwlock_operation;
+enum PSI_cond_operation
+{
+ PSI_COND_WAIT= 0,
+ PSI_COND_TIMEDWAIT= 1
+};
+typedef enum PSI_cond_operation PSI_cond_operation;
+enum PSI_file_operation
+{
+ PSI_FILE_CREATE= 0,
+ PSI_FILE_CREATE_TMP= 1,
+ PSI_FILE_OPEN= 2,
+ PSI_FILE_STREAM_OPEN= 3,
+ PSI_FILE_CLOSE= 4,
+ PSI_FILE_STREAM_CLOSE= 5,
+ PSI_FILE_READ= 6,
+ PSI_FILE_WRITE= 7,
+ PSI_FILE_SEEK= 8,
+ PSI_FILE_TELL= 9,
+ PSI_FILE_FLUSH= 10,
+ PSI_FILE_STAT= 11,
+ PSI_FILE_FSTAT= 12,
+ PSI_FILE_CHSIZE= 13,
+ PSI_FILE_DELETE= 14,
+ PSI_FILE_RENAME= 15,
+ PSI_FILE_SYNC= 16
+};
+typedef enum PSI_file_operation PSI_file_operation;
+enum PSI_table_io_operation
+{
+ PSI_TABLE_FETCH_ROW= 0,
+ PSI_TABLE_WRITE_ROW= 1,
+ PSI_TABLE_UPDATE_ROW= 2,
+ PSI_TABLE_DELETE_ROW= 3
+};
+typedef enum PSI_table_io_operation PSI_table_io_operation;
+enum PSI_table_lock_operation
+{
+ PSI_TABLE_LOCK= 0,
+ PSI_TABLE_EXTERNAL_LOCK= 1
+};
+typedef enum PSI_table_lock_operation PSI_table_lock_operation;
+enum PSI_socket_state
+{
+ PSI_SOCKET_STATE_IDLE= 1,
+ PSI_SOCKET_STATE_ACTIVE= 2
+};
+typedef enum PSI_socket_state PSI_socket_state;
+enum PSI_socket_operation
+{
+ PSI_SOCKET_CREATE= 0,
+ PSI_SOCKET_CONNECT= 1,
+ PSI_SOCKET_BIND= 2,
+ PSI_SOCKET_CLOSE= 3,
+ PSI_SOCKET_SEND= 4,
+ PSI_SOCKET_RECV= 5,
+ PSI_SOCKET_SENDTO= 6,
+ PSI_SOCKET_RECVFROM= 7,
+ PSI_SOCKET_SENDMSG= 8,
+ PSI_SOCKET_RECVMSG= 9,
+ PSI_SOCKET_SEEK= 10,
+ PSI_SOCKET_OPT= 11,
+ PSI_SOCKET_STAT= 12,
+ PSI_SOCKET_SHUTDOWN= 13,
+ PSI_SOCKET_SELECT= 14
+};
+typedef enum PSI_socket_operation PSI_socket_operation;
+typedef unsigned int PSI_mutex_key;
+typedef unsigned int PSI_rwlock_key;
+typedef unsigned int PSI_cond_key;
+typedef unsigned int PSI_thread_key;
+typedef unsigned int PSI_file_key;
+typedef unsigned int PSI_stage_key;
+typedef unsigned int PSI_statement_key;
+typedef unsigned int PSI_socket_key;
+struct PSI_v2
+{
+ int placeholder;
+};
+struct PSI_mutex_info_v2
+{
+ int placeholder;
+};
+struct PSI_rwlock_info_v2
+{
+ int placeholder;
+};
+struct PSI_cond_info_v2
+{
+ int placeholder;
+};
+struct PSI_thread_info_v2
+{
+ int placeholder;
+};
+struct PSI_file_info_v2
+{
+ int placeholder;
+};
+struct PSI_stage_info_v2
+{
+ int placeholder;
+};
+struct PSI_statement_info_v2
+{
+ int placeholder;
+};
+struct PSI_idle_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_mutex_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_rwlock_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_cond_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_file_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_table_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_statement_locker_state_v2
+{
+ int placeholder;
+};
+struct PSI_socket_locker_state_v2
+{
+ int placeholder;
+};
+typedef struct PSI_v2 PSI;
+typedef struct PSI_mutex_info_v2 PSI_mutex_info;
+typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
+typedef struct PSI_cond_info_v2 PSI_cond_info;
+typedef struct PSI_thread_info_v2 PSI_thread_info;
+typedef struct PSI_file_info_v2 PSI_file_info;
+typedef struct PSI_stage_info_v2 PSI_stage_info;
+typedef struct PSI_statement_info_v2 PSI_statement_info;
+typedef struct PSI_socket_info_v2 PSI_socket_info;
+typedef struct PSI_idle_locker_state_v2 PSI_idle_locker_state;
+typedef struct PSI_mutex_locker_state_v2 PSI_mutex_locker_state;
+typedef struct PSI_rwlock_locker_state_v2 PSI_rwlock_locker_state;
+typedef struct PSI_cond_locker_state_v2 PSI_cond_locker_state;
+typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
+typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
+typedef struct PSI_statement_locker_state_v2 PSI_statement_locker_state;
+typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state;
+extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
+C_MODE_END
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_my_plugin_log.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_my_plugin_log.h
new file mode 100644
index 000000000..0cf781757
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_my_plugin_log.h
@@ -0,0 +1,64 @@
+/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; version 2 of the
+ License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ @file
+ This service provides functions to report error conditions and log to
+ mysql error log.
+*/
+
+#ifndef MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
+#define MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
+
+#ifndef MYSQL_ABI_CHECK
+#include
+#endif
+
+/* keep in sync with the loglevel enum in my_sys.h */
+enum plugin_log_level
+{
+ MY_ERROR_LEVEL,
+ MY_WARNING_LEVEL,
+ MY_INFORMATION_LEVEL
+};
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern struct my_plugin_log_service
+{
+ /** write a message to the log */
+ int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
+} *my_plugin_log_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define my_plugin_log_message my_plugin_log_service->my_plugin_log_message
+
+#else
+
+int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
+ const char *format, ...);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_my_snprintf.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_my_snprintf.h
new file mode 100644
index 000000000..d5783faa8
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_my_snprintf.h
@@ -0,0 +1,102 @@
+#ifndef MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
+/* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ @file
+ my_snprintf service
+
+ Portable and limited vsnprintf() implementation.
+
+ This is a portable, limited vsnprintf() implementation, with some
+ extra features. "Portable" means that it'll produce identical result
+ on all platforms (for example, on Windows and Linux system printf %e
+ formats the exponent differently, on different systems %p either
+ prints leading 0x or not, %s may accept null pointer or crash on
+ it). "Limited" means that it does not support all the C89 features.
+ But it supports few extensions, not in any standard.
+
+ my_vsnprintf(to, n, fmt, ap)
+
+ @param[out] to A buffer to store the result in
+ @param[in] n Store up to n-1 characters, followed by an end 0
+ @param[in] fmt printf-like format string
+ @param[in] ap Arguments
+
+ @return a number of bytes written to a buffer *excluding* terminating '\0'
+
+ @post
+ The syntax of a format string is generally the same:
+ %
+ where everithing but the format is optional.
+
+ Three one-character flags are recognized:
+ '0' has the standard zero-padding semantics;
+ '-' is parsed, but silently ignored;
+ '`' (backtick) is only supported for strings (%s) and means that the
+ string will be quoted according to MySQL identifier quoting rules.
+
+ Both and can be specified as numbers or '*'.
+ If an asterisk is used, an argument of type int is consumed.
+
+ can be 'l', 'll', or 'z'.
+
+ Supported formats are 's' (null pointer is accepted, printed as
+ "(null)"), 'b' (extension, see below), 'c', 'd', 'i', 'u', 'x', 'o',
+ 'X', 'p' (works as 0x%x).
+
+ Standard syntax for positional arguments $n is supported.
+
+ Extensions:
+
+ Flag '`' (backtick): see above.
+
+ Format 'b': binary buffer, prints exactly bytes from the
+ argument, without stopping at '\0'.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef MYSQL_ABI_CHECK
+#include
+#include
+#endif
+
+extern struct my_snprintf_service_st {
+ size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
+ size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
+} *my_snprintf_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define my_vsnprintf my_snprintf_service->my_vsnprintf_type
+#define my_snprintf my_snprintf_service->my_snprintf_type
+
+#else
+
+size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
+size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_mysql_string.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_mysql_string.h
new file mode 100644
index 000000000..3c121a6d6
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_mysql_string.h
@@ -0,0 +1,133 @@
+/* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* This service provides functions to parse mysql String */
+
+#ifndef MYSQL_SERVICE_MYSQL_STRING_INCLUDED
+#define MYSQL_SERVICE_MYSQL_STRING_INCLUDED
+
+#ifndef MYSQL_ABI_CHECK
+#include
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *mysql_string_iterator_handle;
+typedef void *mysql_string_handle;
+
+extern struct mysql_string_service_st {
+ int (*mysql_string_convert_to_char_ptr_type)
+ (mysql_string_handle, const char *, char *, unsigned int, int *);
+ mysql_string_iterator_handle (*mysql_string_get_iterator_type)
+ (mysql_string_handle);
+ int (*mysql_string_iterator_next_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isupper_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_islower_type)(mysql_string_iterator_handle);
+ int (*mysql_string_iterator_isdigit_type)(mysql_string_iterator_handle);
+ mysql_string_handle (*mysql_string_to_lowercase_type)(mysql_string_handle);
+ void (*mysql_string_free_type)(mysql_string_handle);
+ void (*mysql_string_iterator_free_type)(mysql_string_iterator_handle);
+} *mysql_string_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define mysql_string_convert_to_char_ptr(string_handle, charset_name, \
+ buffer, buffer_size, error) \
+ mysql_string_service->mysql_string_convert_to_char_ptr_type \
+ (string_handle, charset_name, buffer, \
+ buffer_size, error)
+
+#define mysql_string_get_iterator(string_handle) \
+ mysql_string_service->mysql_string_get_iterator_type(string_handle)
+
+#define mysql_string_iterator_next(iterator_handle) \
+ mysql_string_service->mysql_string_iterator_next_type(iterator_handle)
+
+#define mysql_string_iterator_isupper(iterator_handle) \
+ mysql_string_service->mysql_string_iterator_isupper_type \
+ (iterator_handle)
+
+#define mysql_string_iterator_islower(iterator_handle) \
+ mysql_string_service->mysql_string_iterator_islower_type \
+ (iterator_handle)
+
+#define mysql_string_iterator_isdigit(iterator_handle) \
+ mysql_string_service->mysql_string_iterator_isdigit_type \
+ (iterator_handle)
+
+#define mysql_string_to_lowercase(string_handle) \
+ mysql_string_service->mysql_string_to_lowercase_type(string_handle)
+
+#define mysql_string_free(mysql_string_handle) \
+ mysql_string_service->mysql_string_free_type(mysql_string_handle)
+
+#define mysql_string_iterator_free(mysql_string_iterator_handle) \
+ mysql_string_service->mysql_string_iterator_free_type \
+ (mysql_string_iterator_handle)
+#else
+
+/* This service function convert string into given character set */
+int mysql_string_convert_to_char_ptr(mysql_string_handle string_handle,
+ const char *charset_name, char *buffer,
+ unsigned int buffer_size, int *error);
+
+/* This service function returns the beginning of the iterator handle */
+mysql_string_iterator_handle mysql_string_get_iterator(mysql_string_handle
+ string_handle);
+/*
+ This service function gets the next iterator handle
+ returns 0 if reached the end else return 1
+*/
+int mysql_string_iterator_next(mysql_string_iterator_handle iterator_handle);
+
+/*
+ This service function return 1 if current iterator handle points to a
+ uppercase character else return 0 for client character set.
+*/
+int mysql_string_iterator_isupper(mysql_string_iterator_handle iterator_handle);
+
+/*
+ This service function return 1 if current iterator handle points to a
+ lowercase character else return 0 for client character set.
+*/
+int mysql_string_iterator_islower(mysql_string_iterator_handle iterator_handle);
+
+/*
+ This service function return 1 if current iterator handle points to a digit
+ else return 0 for client character sets.
+*/
+int mysql_string_iterator_isdigit(mysql_string_iterator_handle iterator_handle);
+
+/* convert string_handle into lowercase */
+mysql_string_handle mysql_string_to_lowercase(mysql_string_handle
+ string_handle);
+
+/* It deallocates the string created on server side during plugin operations */
+void mysql_string_free(mysql_string_handle);
+
+/*
+ It deallocates the string iterator created on server side
+ during plugin operations
+*/
+void mysql_string_iterator_free(mysql_string_iterator_handle);
+
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thd_alloc.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thd_alloc.h
new file mode 100644
index 000000000..645fb310c
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thd_alloc.h
@@ -0,0 +1,130 @@
+#ifndef MYSQL_SERVICE_THD_ALLOC_INCLUDED
+/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ @file
+ This service provdes functions to allocate memory in a connection local
+ memory pool. The memory allocated there will be automatically freed at the
+ end of the statement, don't use it for allocations that should live longer
+ than that. For short living allocations this is more efficient than
+ using my_malloc and friends, and automatic "garbage collection" allows not
+ to think about memory leaks.
+
+ The pool is best for small to medium objects, don't use it for large
+ allocations - they are better served with my_malloc.
+*/
+
+#ifndef MYSQL_ABI_CHECK
+#include
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct st_mysql_lex_string
+{
+ char *str;
+ size_t length;
+};
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+
+extern struct thd_alloc_service_st {
+ void *(*thd_alloc_func)(MYSQL_THD, unsigned int);
+ void *(*thd_calloc_func)(MYSQL_THD, unsigned int);
+ char *(*thd_strdup_func)(MYSQL_THD, const char *);
+ char *(*thd_strmake_func)(MYSQL_THD, const char *, unsigned int);
+ void *(*thd_memdup_func)(MYSQL_THD, const void*, unsigned int);
+ MYSQL_LEX_STRING *(*thd_make_lex_string_func)(MYSQL_THD, MYSQL_LEX_STRING *,
+ const char *, unsigned int, int);
+} *thd_alloc_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define thd_alloc(thd,size) (thd_alloc_service->thd_alloc_func((thd), (size)))
+
+#define thd_calloc(thd,size) (thd_alloc_service->thd_calloc_func((thd), (size)))
+
+#define thd_strdup(thd,str) (thd_alloc_service->thd_strdup_func((thd), (str)))
+
+#define thd_strmake(thd,str,size) \
+ (thd_alloc_service->thd_strmake_func((thd), (str), (size)))
+
+#define thd_memdup(thd,str,size) \
+ (thd_alloc_service->thd_memdup_func((thd), (str), (size)))
+
+#define thd_make_lex_string(thd, lex_str, str, size, allocate_lex_string) \
+ (thd_alloc_service->thd_make_lex_string_func((thd), (lex_str), (str), \
+ (size), (allocate_lex_string)))
+
+#else
+
+/**
+ Allocate memory in the connection's local memory pool
+
+ @details
+ When properly used in place of @c my_malloc(), this can significantly
+ improve concurrency. Don't use this or related functions to allocate
+ large chunks of memory. Use for temporary storage only. The memory
+ will be freed automatically at the end of the statement; no explicit
+ code is required to prevent memory leaks.
+
+ @see alloc_root()
+*/
+void *thd_alloc(MYSQL_THD thd, unsigned int size);
+/**
+ @see thd_alloc()
+*/
+void *thd_calloc(MYSQL_THD thd, unsigned int size);
+/**
+ @see thd_alloc()
+*/
+char *thd_strdup(MYSQL_THD thd, const char *str);
+/**
+ @see thd_alloc()
+*/
+char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
+/**
+ @see thd_alloc()
+*/
+void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
+
+/**
+ Create a LEX_STRING in this connection's local memory pool
+
+ @param thd user thread connection handle
+ @param lex_str pointer to LEX_STRING object to be initialized
+ @param str initializer to be copied into lex_str
+ @param size length of str, in bytes
+ @param allocate_lex_string flag: if TRUE, allocate new LEX_STRING object,
+ instead of using lex_str value
+ @return NULL on failure, or pointer to the LEX_STRING object
+
+ @see thd_alloc()
+*/
+MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
+ const char *str, unsigned int size,
+ int allocate_lex_string);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define MYSQL_SERVICE_THD_ALLOC_INCLUDED
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thd_wait.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thd_wait.h
new file mode 100644
index 000000000..6b47a4ff2
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thd_wait.h
@@ -0,0 +1,103 @@
+/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef MYSQL_SERVICE_THD_WAIT_INCLUDED
+#define MYSQL_SERVICE_THD_WAIT_INCLUDED
+
+/**
+ @file include/mysql/service_thd_wait.h
+ This service provides functions for plugins and storage engines to report
+ when they are going to sleep/stall.
+
+ SYNOPSIS
+ thd_wait_begin() - call just before a wait begins
+ thd Thread object
+ Use NULL if the thd is NOT known.
+ wait_type Type of wait
+ 1 -- short wait (e.g. for mutex)
+ 2 -- medium wait (e.g. for disk io)
+ 3 -- large wait (e.g. for locked row/table)
+ NOTES
+ This is used by the threadpool to have better knowledge of which
+ threads that currently are actively running on CPUs. When a thread
+ reports that it's going to sleep/stall, the threadpool scheduler is
+ free to start another thread in the pool most likely. The expected wait
+ time is simply an indication of how long the wait is expected to
+ become, the real wait time could be very different.
+
+ thd_wait_end() called immediately after the wait is complete
+
+ thd_wait_end() MUST be called if thd_wait_begin() was called.
+
+ Using thd_wait_...() service is optional but recommended. Using it will
+ improve performance as the thread pool will be more active at managing the
+ thread workload.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ One should only report wait events that could potentially block for a
+ long time. A mutex wait is too short of an event to report. The reason
+ is that an event which is reported leads to a new thread starts
+ executing a query and this has a negative impact of usage of CPU caches
+ and thus the expected gain of starting a new thread must be higher than
+ the expected cost of lost performance due to starting a new thread.
+
+ Good examples of events that should be reported are waiting for row locks
+ that could easily be for many milliseconds or even seconds and the same
+ holds true for global read locks, table locks and other meta data locks.
+ Another event of interest is going to sleep for an extended time.
+*/
+typedef enum _thd_wait_type_e {
+ THD_WAIT_SLEEP= 1,
+ THD_WAIT_DISKIO= 2,
+ THD_WAIT_ROW_LOCK= 3,
+ THD_WAIT_GLOBAL_LOCK= 4,
+ THD_WAIT_META_DATA_LOCK= 5,
+ THD_WAIT_TABLE_LOCK= 6,
+ THD_WAIT_USER_LOCK= 7,
+ THD_WAIT_BINLOG= 8,
+ THD_WAIT_GROUP_COMMIT= 9,
+ THD_WAIT_SYNC= 10,
+ THD_WAIT_LAST= 11
+} thd_wait_type;
+
+extern struct thd_wait_service_st {
+ void (*thd_wait_begin_func)(MYSQL_THD, int);
+ void (*thd_wait_end_func)(MYSQL_THD);
+} *thd_wait_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define thd_wait_begin(_THD, _WAIT_TYPE) \
+ thd_wait_service->thd_wait_begin_func(_THD, _WAIT_TYPE)
+#define thd_wait_end(_THD) thd_wait_service->thd_wait_end_func(_THD)
+
+#else
+
+void thd_wait_begin(MYSQL_THD thd, int wait_type);
+void thd_wait_end(MYSQL_THD thd);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thread_scheduler.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thread_scheduler.h
new file mode 100644
index 000000000..5a5e0e2f5
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/service_thread_scheduler.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifndef SERVICE_THREAD_SCHEDULER_INCLUDED
+#define SERVICE_THREAD_SCHEDULER_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct scheduler_functions;
+
+extern struct my_thread_scheduler_service {
+ int (*set)(struct scheduler_functions *scheduler);
+ int (*reset)();
+} *my_thread_scheduler_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+
+#define my_thread_scheduler_set(F) my_thread_scheduler_service->set((F))
+#define my_thread_scheduler_reset() my_thread_scheduler_service->reset()
+
+#else
+
+/**
+ Set the thread scheduler to use for the server.
+
+ @param scheduler Pointer to scheduler callbacks to use.
+ @retval 0 Scheduler installed correctly.
+ @retval 1 Invalid value (NULL) used for scheduler.
+*/
+int my_thread_scheduler_set(struct scheduler_functions *scheduler);
+
+/**
+ Restore the previous thread scheduler.
+
+ @note If no thread scheduler was installed previously with
+ thd_set_thread_scheduler, this function will report an error.
+
+ @retval 0 Scheduler installed correctly.
+ @retval 1 No scheduler installed.
+*/
+int my_thread_scheduler_reset();
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SERVICE_THREAD_SCHEDULER_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/services.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/services.h
new file mode 100644
index 000000000..3c3ed98e3
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/services.h
@@ -0,0 +1,34 @@
+#ifndef MYSQL_SERVICES_INCLUDED
+/* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+}
+#endif
+
+#define MYSQL_SERVICES_INCLUDED
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql/thread_pool_priv.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/thread_pool_priv.h
new file mode 100644
index 000000000..d5d12ef10
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql/thread_pool_priv.h
@@ -0,0 +1,132 @@
+/*
+ Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifndef THREAD_POOL_PRIV_INCLUDED
+#define THREAD_POOL_PRIV_INCLUDED
+
+/*
+ The thread pool requires access to some MySQL server error codes, this is
+ accessed from mysqld_error.h.
+ We need access to the struct that defines the thread pool plugin interface
+ which is accessed through scheduler.h.
+ All accesses to THD variables and functions are defined in this header file.
+ A thread pool can also use DEBUG_SYNC and must thus include
+ debug_sync.h
+ To handle definitions of Information Schema plugins it is also required
+ to include sql_profile.h and table.h.
+*/
+#include /* To get ER_ERROR_ON_READ */
+#define MYSQL_SERVER 1
+#include
+#include
+#include
+#include
+#include
+
+typedef std::set::iterator Thread_iterator;
+/* Needed to get access to scheduler variables */
+void* thd_get_scheduler_data(THD *thd);
+void thd_set_scheduler_data(THD *thd, void *data);
+PSI_thread* thd_get_psi(THD *thd);
+void thd_set_psi(THD *thd, PSI_thread *psi);
+
+/* Interface to THD variables and functions */
+void thd_set_killed(THD *thd);
+void thd_clear_errors(THD *thd);
+void thd_set_thread_stack(THD *thd, char *stack_start);
+void thd_lock_thread_count(THD *thd);
+void thd_unlock_thread_count(THD *thd);
+void thd_close_connection(THD *thd);
+THD *thd_get_current_thd();
+void thd_new_connection_setup(THD *thd, char *stack_start);
+void thd_lock_data(THD *thd);
+void thd_unlock_data(THD *thd);
+bool thd_is_transaction_active(THD *thd);
+int thd_connection_has_data(THD *thd);
+void thd_set_net_read_write(THD *thd, uint val);
+uint thd_get_net_read_write(THD *thd);
+void thd_set_mysys_var(THD *thd, st_my_thread_var *mysys_var);
+ulong thd_get_net_wait_timeout(THD *thd);
+my_socket thd_get_fd(THD *thd);
+int thd_store_globals(THD* thd);
+
+/* Interface to global thread list iterator functions */
+Thread_iterator thd_get_global_thread_list_begin();
+Thread_iterator thd_get_global_thread_list_end();
+
+/* Print to the MySQL error log */
+void sql_print_error(const char *format, ...);
+
+/* Store a table record */
+bool schema_table_store_record(THD *thd, TABLE *table);
+
+/*
+ The thread pool must be able to execute statements using the connection
+ state in THD object. This is the main objective of the thread pool to
+ schedule the start of these commands.
+*/
+bool do_command(THD *thd);
+
+/*
+ The thread pool requires an interface to the connection logic in the
+ MySQL Server since the thread pool will maintain the event logic on
+ the TCP connection of the MySQL Server. Thus new connections, dropped
+ connections will be discovered by the thread pool and it needs to
+ ensure that the proper MySQL Server logic attached to these events is
+ executed.
+*/
+/* Initialise a new connection handler thread */
+bool init_new_connection_handler_thread();
+/* Set up connection thread before use as execution thread */
+bool setup_connection_thread_globals(THD *thd);
+/* Prepare connection as part of connection set-up */
+bool thd_prepare_connection(THD *thd);
+/* Release auditing before executing statement */
+void mysql_audit_release(THD *thd);
+/* Check if connection is still alive */
+bool thd_is_connection_alive(THD *thd);
+/* Close connection with possible error code */
+void close_connection(THD *thd, uint errcode);
+/* End the connection before closing it */
+void end_connection(THD *thd);
+/* Release resources of the THD object */
+void thd_release_resources(THD *thd);
+/* Decrement connection counter */
+void dec_connection_count();
+/* Destroy THD object */
+void destroy_thd(THD *thd);
+/* Remove the THD from the set of global threads. */
+void remove_global_thread(THD *thd);
+
+/*
+ thread_created is maintained by thread pool when activated since
+ user threads are created by the thread pool (and also special
+ threads to maintain the thread pool). This is done through
+ inc_thread_created.
+
+ max_connections is needed to calculate the maximum number of threads
+ that is allowed to be started by the thread pool. The method
+ get_max_connections() gets reference to this variable.
+
+ connection_attrib is the thread attributes for connection threads,
+ the method get_connection_attrib provides a reference to these
+ attributes.
+*/
+void inc_thread_created(void);
+ulong get_max_connections(void);
+pthread_attr_t *get_connection_attrib(void);
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql_com.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_com.h
new file mode 100644
index 000000000..a25af23fa
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_com.h
@@ -0,0 +1,602 @@
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+** Common definition between mysql server & client
+*/
+
+#ifndef _mysql_com_h
+#define _mysql_com_h
+
+#define HOSTNAME_LENGTH 60
+#define SYSTEM_CHARSET_MBMAXLEN 3
+#define NAME_CHAR_LEN 64 /* Field/table name length */
+#define USERNAME_CHAR_LENGTH 16
+#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
+#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
+
+#define MYSQL_AUTODETECT_CHARSET_NAME "auto"
+
+#define SERVER_VERSION_LENGTH 60
+#define SQLSTATE_LENGTH 5
+
+/*
+ Maximum length of comments
+*/
+#define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 6.0: 60 characters */
+#define TABLE_COMMENT_MAXLEN 2048
+#define COLUMN_COMMENT_MAXLEN 1024
+#define INDEX_COMMENT_MAXLEN 1024
+#define TABLE_PARTITION_COMMENT_MAXLEN 1024
+
+/*
+ USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
+ username and hostname parts of the user identifier with trailing zero in
+ MySQL standard format:
+ user_name_part@host_name_part\0
+*/
+#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2
+
+#define LOCAL_HOST "localhost"
+#define LOCAL_HOST_NAMEDPIPE "."
+
+
+#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
+#define MYSQL_NAMEDPIPE "MySQL"
+#define MYSQL_SERVICENAME "MySQL"
+#endif /* __WIN__ */
+
+/*
+ You should add new commands to the end of this list, otherwise old
+ servers won't be able to handle them as 'unsupported'.
+*/
+
+enum enum_server_command
+{
+ COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
+ COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
+ COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
+ COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
+ COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
+ COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE,
+ COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON,
+ COM_BINLOG_DUMP_GTID,
+ /* don't forget to update const char *command_name[] in sql_parse.cc */
+
+ /* Must be last */
+ COM_END
+};
+
+
+/*
+ Length of random string sent by server on handshake; this is also length of
+ obfuscated password, recieved from client
+*/
+#define SCRAMBLE_LENGTH 20
+#define SCRAMBLE_LENGTH_323 8
+/* length of password stored in the db: new passwords are preceeded with '*' */
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
+
+
+#define NOT_NULL_FLAG 1 /* Field can't be NULL */
+#define PRI_KEY_FLAG 2 /* Field is part of a primary key */
+#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */
+#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
+#define BLOB_FLAG 16 /* Field is a blob */
+#define UNSIGNED_FLAG 32 /* Field is unsigned */
+#define ZEROFILL_FLAG 64 /* Field is zerofill */
+#define BINARY_FLAG 128 /* Field is binary */
+
+/* The following are only sent to new clients */
+#define ENUM_FLAG 256 /* field is an enum */
+#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
+#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
+#define SET_FLAG 2048 /* field is a set */
+#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */
+#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */
+#define NUM_FLAG 32768 /* Field is num (for clients) */
+#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
+#define GROUP_FLAG 32768 /* Intern: Group field */
+#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
+#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
+#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */
+#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */
+/**
+ Intern: Field in TABLE object for new version of altered table,
+ which participates in a newly added index.
+*/
+#define FIELD_IN_ADD_INDEX (1 << 20)
+#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */
+#define FIELD_FLAGS_STORAGE_MEDIA 22 /* Field storage media, bit 22-23 */
+#define FIELD_FLAGS_STORAGE_MEDIA_MASK (3 << FIELD_FLAGS_STORAGE_MEDIA)
+#define FIELD_FLAGS_COLUMN_FORMAT 24 /* Field column format, bit 24-25 */
+#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT)
+#define FIELD_IS_DROPPED (1<< 26) /* Intern: Field is being dropped */
+
+#define REFRESH_GRANT 1 /* Refresh grant tables */
+#define REFRESH_LOG 2 /* Start on new log file */
+#define REFRESH_TABLES 4 /* close all tables */
+#define REFRESH_HOSTS 8 /* Flush host cache */
+#define REFRESH_STATUS 16 /* Flush status variables */
+#define REFRESH_THREADS 32 /* Flush thread cache */
+#define REFRESH_SLAVE 64 /* Reset master info and restart slave
+ thread */
+#define REFRESH_MASTER 128 /* Remove all bin logs in the index
+ and truncate the index */
+#define REFRESH_ERROR_LOG 256 /* Rotate only the erorr log */
+#define REFRESH_ENGINE_LOG 512 /* Flush all storage engine logs */
+#define REFRESH_BINARY_LOG 1024 /* Flush the binary log */
+#define REFRESH_RELAY_LOG 2048 /* Flush the relay log */
+#define REFRESH_GENERAL_LOG 4096 /* Flush the general log */
+#define REFRESH_SLOW_LOG 8192 /* Flush the slow query log */
+
+/* The following can't be set with mysql_refresh() */
+#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
+#define REFRESH_FAST 32768 /* Intern flag */
+
+/* RESET (remove all queries) from query cache */
+#define REFRESH_QUERY_CACHE 65536
+#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
+#define REFRESH_DES_KEY_FILE 0x40000L
+#define REFRESH_USER_RESOURCES 0x80000L
+#define REFRESH_FOR_EXPORT 0x100000L /* FLUSH TABLES ... FOR EXPORT */
+
+#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
+#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
+#define CLIENT_LONG_FLAG 4 /* Get all column flags */
+#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
+#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
+#define CLIENT_COMPRESS 32 /* Can use compression protocol */
+#define CLIENT_ODBC 64 /* Odbc client */
+#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
+#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
+#define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */
+#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
+#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
+#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
+#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
+#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
+#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
+#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
+#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
+#define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */
+
+#define CLIENT_PLUGIN_AUTH (1UL << 19) /* Client supports plugin authentication */
+#define CLIENT_CONNECT_ATTRS (1UL << 20) /* Client supports connection attributes */
+
+/* Enable authentication response packet to be larger than 255 bytes. */
+#define CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA (1UL << 21)
+
+/* Don't close the connection for a connection with expired password. */
+#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22)
+
+#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
+#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
+
+#ifdef HAVE_COMPRESS
+#define CAN_CLIENT_COMPRESS CLIENT_COMPRESS
+#else
+#define CAN_CLIENT_COMPRESS 0
+#endif
+
+/* Gather all possible capabilites (flags) supported by the server */
+#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD \
+ | CLIENT_FOUND_ROWS \
+ | CLIENT_LONG_FLAG \
+ | CLIENT_CONNECT_WITH_DB \
+ | CLIENT_NO_SCHEMA \
+ | CLIENT_COMPRESS \
+ | CLIENT_ODBC \
+ | CLIENT_LOCAL_FILES \
+ | CLIENT_IGNORE_SPACE \
+ | CLIENT_PROTOCOL_41 \
+ | CLIENT_INTERACTIVE \
+ | CLIENT_SSL \
+ | CLIENT_IGNORE_SIGPIPE \
+ | CLIENT_TRANSACTIONS \
+ | CLIENT_RESERVED \
+ | CLIENT_SECURE_CONNECTION \
+ | CLIENT_MULTI_STATEMENTS \
+ | CLIENT_MULTI_RESULTS \
+ | CLIENT_PS_MULTI_RESULTS \
+ | CLIENT_SSL_VERIFY_SERVER_CERT \
+ | CLIENT_REMEMBER_OPTIONS \
+ | CLIENT_PLUGIN_AUTH \
+ | CLIENT_CONNECT_ATTRS \
+ | CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA \
+ | CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS \
+)
+
+/*
+ Switch off the flags that are optional and depending on build flags
+ If any of the optional flags is supported by the build it will be switched
+ on before sending to the client during the connection handshake.
+*/
+#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
+ & ~CLIENT_COMPRESS) \
+ & ~CLIENT_SSL_VERIFY_SERVER_CERT)
+
+/**
+ Is raised when a multi-statement transaction
+ has been started, either explicitly, by means
+ of BEGIN or COMMIT AND CHAIN, or
+ implicitly, by the first transactional
+ statement, when autocommit=off.
+*/
+#define SERVER_STATUS_IN_TRANS 1
+#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
+#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
+#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
+#define SERVER_QUERY_NO_INDEX_USED 32
+/**
+ The server was able to fulfill the clients request and opened a
+ read-only non-scrollable cursor for a query. This flag comes
+ in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
+*/
+#define SERVER_STATUS_CURSOR_EXISTS 64
+/**
+ This flag is sent when a read-only cursor is exhausted, in reply to
+ COM_STMT_FETCH command.
+*/
+#define SERVER_STATUS_LAST_ROW_SENT 128
+#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
+#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
+/**
+ Sent to the client if after a prepared statement reprepare
+ we discovered that the new statement returns a different
+ number of result set columns.
+*/
+#define SERVER_STATUS_METADATA_CHANGED 1024
+#define SERVER_QUERY_WAS_SLOW 2048
+
+/**
+ To mark ResultSet containing output parameter values.
+*/
+#define SERVER_PS_OUT_PARAMS 4096
+
+/**
+ Set at the same time as SERVER_STATUS_IN_TRANS if the started
+ multi-statement transaction is a read-only transaction. Cleared
+ when the transaction commits or aborts. Since this flag is sent
+ to clients in OK and EOF packets, the flag indicates the
+ transaction status at the end of command execution.
+*/
+#define SERVER_STATUS_IN_TRANS_READONLY 8192
+
+
+/**
+ Server status flags that must be cleared when starting
+ execution of a new SQL statement.
+ Flags from this set are only added to the
+ current server status by the execution engine, but
+ never removed -- the execution engine expects them
+ to disappear automagically by the next command.
+*/
+#define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \
+ SERVER_QUERY_NO_INDEX_USED|\
+ SERVER_MORE_RESULTS_EXISTS|\
+ SERVER_STATUS_METADATA_CHANGED |\
+ SERVER_QUERY_WAS_SLOW |\
+ SERVER_STATUS_DB_DROPPED |\
+ SERVER_STATUS_CURSOR_EXISTS|\
+ SERVER_STATUS_LAST_ROW_SENT)
+
+#define MYSQL_ERRMSG_SIZE 512
+#define NET_READ_TIMEOUT 30 /* Timeout on read */
+#define NET_WRITE_TIMEOUT 60 /* Timeout on write */
+#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */
+
+#define ONLY_KILL_QUERY 1
+
+
+struct st_vio; /* Only C */
+typedef struct st_vio Vio;
+
+#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */
+#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */
+#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */
+#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
+#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
+#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
+#define MAX_BLOB_WIDTH 16777216 /* Default width for blob */
+
+typedef struct st_net {
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
+ Vio *vio;
+ unsigned char *buff,*buff_end,*write_pos,*read_pos;
+ my_socket fd; /* For Perl DBI/dbd */
+ /*
+ The following variable is set if we are doing several queries in one
+ command ( as in LOAD TABLE ... FROM MASTER ),
+ and do not want to confuse the client with OK at the wrong time
+ */
+ unsigned long remain_in_buf,length, buf_length, where_b;
+ unsigned long max_packet,max_packet_size;
+ unsigned int pkt_nr,compress_pkt_nr;
+ unsigned int write_timeout, read_timeout, retry_count;
+ int fcntl;
+ unsigned int *return_status;
+ unsigned char reading_or_writing;
+ char save_char;
+ my_bool unused1; /* Please remove with the next incompatible ABI change */
+ my_bool unused2; /* Please remove with the next incompatible ABI change */
+ my_bool compress;
+ my_bool unused3; /* Please remove with the next incompatible ABI change. */
+ /*
+ Pointer to query object in query cache, do not equal NULL (0) for
+ queries in cache that have not stored its results yet
+ */
+#endif
+ /*
+ Unused, please remove with the next incompatible ABI change.
+ */
+ unsigned char *unused;
+ unsigned int last_errno;
+ unsigned char error;
+ my_bool unused4; /* Please remove with the next incompatible ABI change. */
+ my_bool unused5; /* Please remove with the next incompatible ABI change. */
+ /** Client library error message buffer. Actually belongs to struct MYSQL. */
+ char last_error[MYSQL_ERRMSG_SIZE];
+ /** Client library sqlstate buffer. Set along with the error message. */
+ char sqlstate[SQLSTATE_LENGTH+1];
+ /**
+ Extension pointer, for the caller private use.
+ Any program linking with the networking library can use this pointer,
+ which is handy when private connection specific data needs to be
+ maintained.
+ The mysqld server process uses this pointer internally,
+ to maintain the server internal instrumentation for the connection.
+ */
+ void *extension;
+} NET;
+
+
+#define packet_error (~(unsigned long) 0)
+
+enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
+ MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
+ MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
+ MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
+ MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
+ MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
+ MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
+ MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
+ MYSQL_TYPE_BIT,
+ MYSQL_TYPE_TIMESTAMP2,
+ MYSQL_TYPE_DATETIME2,
+ MYSQL_TYPE_TIME2,
+ MYSQL_TYPE_NEWDECIMAL=246,
+ MYSQL_TYPE_ENUM=247,
+ MYSQL_TYPE_SET=248,
+ MYSQL_TYPE_TINY_BLOB=249,
+ MYSQL_TYPE_MEDIUM_BLOB=250,
+ MYSQL_TYPE_LONG_BLOB=251,
+ MYSQL_TYPE_BLOB=252,
+ MYSQL_TYPE_VAR_STRING=253,
+ MYSQL_TYPE_STRING=254,
+ MYSQL_TYPE_GEOMETRY=255
+
+};
+
+/* For backward compatibility */
+#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
+#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
+#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
+#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
+#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
+#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
+#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
+#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
+#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
+#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
+#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
+#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
+#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
+#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
+#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
+#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
+#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
+#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
+#define FIELD_TYPE_SET MYSQL_TYPE_SET
+#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
+#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
+#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
+#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
+#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
+#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
+#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
+#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
+#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
+#define FIELD_TYPE_BIT MYSQL_TYPE_BIT
+
+
+/* Shutdown/kill enums and constants */
+
+/* Bits for THD::killable. */
+#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
+#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
+#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
+#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
+
+enum mysql_enum_shutdown_level {
+ /*
+ We want levels to be in growing order of hardness (because we use number
+ comparisons). Note that DEFAULT does not respect the growing property, but
+ it's ok.
+ */
+ SHUTDOWN_DEFAULT = 0,
+ /* wait for existing connections to finish */
+ SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT,
+ /* wait for existing trans to finish */
+ SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS,
+ /* wait for existing updates to finish (=> no partial MyISAM update) */
+ SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE,
+ /* flush InnoDB buffers and other storage engines' buffers*/
+ SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1),
+ /* don't flush InnoDB buffers, flush other storage engines' buffers*/
+ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1,
+ /* Now the 2 levels of the KILL command */
+#if MYSQL_VERSION_ID >= 50000
+ KILL_QUERY= 254,
+#endif
+ KILL_CONNECTION= 255
+};
+
+
+enum enum_cursor_type
+{
+ CURSOR_TYPE_NO_CURSOR= 0,
+ CURSOR_TYPE_READ_ONLY= 1,
+ CURSOR_TYPE_FOR_UPDATE= 2,
+ CURSOR_TYPE_SCROLLABLE= 4
+};
+
+
+/* options for mysql_set_option */
+enum enum_mysql_set_option
+{
+ MYSQL_OPTION_MULTI_STATEMENTS_ON,
+ MYSQL_OPTION_MULTI_STATEMENTS_OFF
+};
+
+#define net_new_transaction(net) ((net)->pkt_nr=0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+my_bool my_net_init(NET *net, Vio* vio);
+void my_net_local_init(NET *net);
+void net_end(NET *net);
+void net_clear(NET *net, my_bool check_buffer);
+my_bool net_realloc(NET *net, size_t length);
+my_bool net_flush(NET *net);
+my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
+my_bool net_write_command(NET *net,unsigned char command,
+ const unsigned char *header, size_t head_len,
+ const unsigned char *packet, size_t len);
+my_bool net_write_packet(NET *net, const unsigned char *packet, size_t length);
+unsigned long my_net_read(NET *net);
+
+#ifdef MY_GLOBAL_INCLUDED
+void my_net_set_write_timeout(NET *net, uint timeout);
+void my_net_set_read_timeout(NET *net, uint timeout);
+#endif
+
+struct rand_struct {
+ unsigned long seed1,seed2,max_value;
+ double max_value_dbl;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+ /* The following is for user defined functions */
+
+enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT,
+ DECIMAL_RESULT};
+
+typedef struct st_udf_args
+{
+ unsigned int arg_count; /* Number of arguments */
+ enum Item_result *arg_type; /* Pointer to item_results */
+ char **args; /* Pointer to argument */
+ unsigned long *lengths; /* Length of string arguments */
+ char *maybe_null; /* Set to 1 for all maybe_null args */
+ char **attributes; /* Pointer to attribute name */
+ unsigned long *attribute_lengths; /* Length of attribute arguments */
+ void *extension;
+} UDF_ARGS;
+
+ /* This holds information about the result */
+
+typedef struct st_udf_init
+{
+ my_bool maybe_null; /* 1 if function can return NULL */
+ unsigned int decimals; /* for real functions */
+ unsigned long max_length; /* For string functions */
+ char *ptr; /* free pointer for function data */
+ my_bool const_item; /* 1 if function always returns the same value */
+ void *extension;
+} UDF_INIT;
+/*
+ TODO: add a notion for determinism of the UDF.
+ See Item_udf_func::update_used_tables ()
+*/
+
+ /* Constants when using compression */
+#define NET_HEADER_SIZE 4 /* standard header size */
+#define COMP_HEADER_SIZE 3 /* compression header extra size */
+
+ /* Prototypes to password functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ These functions are used for authentication by client and server and
+ implemented in sql/password.c
+*/
+
+void randominit(struct rand_struct *, unsigned long seed1,
+ unsigned long seed2);
+double my_rnd(struct rand_struct *);
+void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
+
+void hash_password(unsigned long *to, const char *password, unsigned int password_len);
+void make_scrambled_password_323(char *to, const char *password);
+void scramble_323(char *to, const char *message, const char *password);
+my_bool check_scramble_323(const unsigned char *reply, const char *message,
+ unsigned long *salt);
+void get_salt_from_password_323(unsigned long *res, const char *password);
+void make_password_from_salt_323(char *to, const unsigned long *salt);
+
+void make_scrambled_password(char *to, const char *password);
+void scramble(char *to, const char *message, const char *password);
+my_bool check_scramble(const unsigned char *reply, const char *message,
+ const unsigned char *hash_stage2);
+void get_salt_from_password(unsigned char *res, const char *password);
+void make_password_from_salt(char *to, const unsigned char *hash_stage2);
+char *octet2hex(char *to, const char *str, unsigned int len);
+
+/* end of password.c */
+
+char *get_tty_password(const char *opt_message);
+const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
+
+/* Some other useful functions */
+
+my_bool my_thread_init(void);
+void my_thread_end(void);
+
+#ifdef MY_GLOBAL_INCLUDED
+ulong STDCALL net_field_length(uchar **packet);
+my_ulonglong net_field_length_ll(uchar **packet);
+uchar *net_store_length(uchar *pkg, ulonglong length);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
+#define MYSQL_STMT_HEADER 4
+#define MYSQL_LONG_DATA_HEADER 6
+
+#define NOT_FIXED_DEC 31
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql_com_server.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_com_server.h
new file mode 100644
index 000000000..1ea040207
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_com_server.h
@@ -0,0 +1,41 @@
+/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Definitions private to the server,
+ used in the networking layer to notify specific events.
+*/
+
+#ifndef _mysql_com_server_h
+#define _mysql_com_server_h
+
+struct st_net_server;
+
+typedef void (*before_header_callback_fn)
+ (struct st_net *net, void *user_data, size_t count);
+
+typedef void (*after_header_callback_fn)
+ (struct st_net *net, void *user_data, size_t count, my_bool rc);
+
+struct st_net_server
+{
+ before_header_callback_fn m_before_header;
+ after_header_callback_fn m_after_header;
+ void *m_user_data;
+};
+
+typedef struct st_net_server NET_SERVER;
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql_embed.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_embed.h
new file mode 100644
index 000000000..b96083d07
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_embed.h
@@ -0,0 +1,30 @@
+#ifndef MYSQL_EMBED_INCLUDED
+#define MYSQL_EMBED_INCLUDED
+
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* Defines that are unique to the embedded version of MySQL */
+
+#ifdef EMBEDDED_LIBRARY
+
+/* Things we don't need in the embedded version of MySQL */
+/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
+
+#undef HAVE_DLOPEN /* No udf functions */
+#undef HAVE_SMEM /* No shared memory */
+
+#endif /* EMBEDDED_LIBRARY */
+#endif /* MYSQL_EMBED_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql_time.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_time.h
new file mode 100644
index 000000000..ac9719c68
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_time.h
@@ -0,0 +1,55 @@
+/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+#ifndef _mysql_time_h_
+#define _mysql_time_h_
+
+/*
+ Time declarations shared between the server and client API:
+ you should not add anything to this header unless it's used
+ (and hence should be visible) in mysql.h.
+ If you're looking for a place to add new time-related declaration,
+ it's most likely my_time.h. See also "C API Handling of Date
+ and Time Values" chapter in documentation.
+*/
+
+enum enum_mysql_timestamp_type
+{
+ MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
+ MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
+};
+
+
+/*
+ Structure which is used to represent datetime values inside MySQL.
+
+ We assume that values in this structure are normalized, i.e. year <= 9999,
+ month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
+ in server such as my_system_gmt_sec() or make_time() family of functions
+ rely on this (actually now usage of make_*() family relies on a bit weaker
+ restriction). Also functions that produce MYSQL_TIME as result ensure this.
+ There is one exception to this rule though if this structure holds time
+ value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
+ bigger values.
+*/
+typedef struct st_mysql_time
+{
+ unsigned int year, month, day, hour, minute, second;
+ unsigned long second_part; /**< microseconds */
+ my_bool neg;
+ enum enum_mysql_timestamp_type time_type;
+} MYSQL_TIME;
+
+#endif /* _mysql_time_h_ */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql_version.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_version.h
new file mode 100644
index 000000000..4c8758f67
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_version.h
@@ -0,0 +1,31 @@
+/* Copyright (c) 1996, 1999-2004, 2007 MySQL AB
+ Use is subject to license terms
+ This file is public domain and comes with NO WARRANTY of any kind */
+
+/* Version numbers for protocol & mysqld */
+
+#ifndef _mysql_version_h
+#define _mysql_version_h
+#ifdef _CUSTOMCONFIG_
+#include
+#else
+#define PROTOCOL_VERSION 10
+#define MYSQL_SERVER_VERSION "5.6.14"
+#define MYSQL_BASE_VERSION "mysqld-5.6"
+#define MYSQL_SERVER_SUFFIX_DEF ""
+#define FRM_VER 6
+#define MYSQL_VERSION_ID 50614
+#define MYSQL_PORT 3306
+#define MYSQL_PORT_DEFAULT 0
+#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
+#define MYSQL_CONFIG_NAME "my"
+#define MYSQL_COMPILATION_COMMENT "Source distribution"
+
+/* mysqld compile time options */
+#endif /* _CUSTOMCONFIG_ */
+
+#ifndef LICENSE
+#define LICENSE GPL
+#endif /* LICENSE */
+
+#endif /* _mysql_version_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysql_version.h.in b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_version.h.in
new file mode 100644
index 000000000..ab7745020
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysql_version.h.in
@@ -0,0 +1,31 @@
+/* Copyright (c) 1996, 1999-2004, 2007 MySQL AB
+ Use is subject to license terms
+ This file is public domain and comes with NO WARRANTY of any kind */
+
+/* Version numbers for protocol & mysqld */
+
+#ifndef _mysql_version_h
+#define _mysql_version_h
+#ifdef _CUSTOMCONFIG_
+#include
+#else
+#define PROTOCOL_VERSION @PROTOCOL_VERSION@
+#define MYSQL_SERVER_VERSION "@VERSION@"
+#define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@"
+#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@"
+#define FRM_VER @DOT_FRM_VERSION@
+#define MYSQL_VERSION_ID @MYSQL_VERSION_ID@
+#define MYSQL_PORT @MYSQL_TCP_PORT@
+#define MYSQL_PORT_DEFAULT @MYSQL_TCP_PORT_DEFAULT@
+#define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@"
+#define MYSQL_CONFIG_NAME "my"
+#define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@"
+
+/* mysqld compile time options */
+#endif /* _CUSTOMCONFIG_ */
+
+#ifndef LICENSE
+#define LICENSE GPL
+#endif /* LICENSE */
+
+#endif /* _mysql_version_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysqld_ername.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysqld_ername.h
new file mode 100644
index 000000000..1c9cb8e73
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysqld_ername.h
@@ -0,0 +1,880 @@
+/* Autogenerated file, please don't edit */
+
+{ "ER_HASHCHK", 1000, "hashchk" },
+{ "ER_NISAMCHK", 1001, "isamchk" },
+{ "ER_NO", 1002, "NO" },
+{ "ER_YES", 1003, "YES" },
+{ "ER_CANT_CREATE_FILE", 1004, "Can\'t create file \'%-.200s\' (errno: %d - %s)" },
+{ "ER_CANT_CREATE_TABLE", 1005, "Can\'t create table \'%-.200s\' (errno: %d)" },
+{ "ER_CANT_CREATE_DB", 1006, "Can\'t create database \'%-.192s\' (errno: %d)" },
+{ "ER_DB_CREATE_EXISTS", 1007, "Can\'t create database \'%-.192s\'; database exists" },
+{ "ER_DB_DROP_EXISTS", 1008, "Can\'t drop database \'%-.192s\'; database doesn\'t exist" },
+{ "ER_DB_DROP_DELETE", 1009, "Error dropping database (can\'t delete \'%-.192s\', errno: %d)" },
+{ "ER_DB_DROP_RMDIR", 1010, "Error dropping database (can\'t rmdir \'%-.192s\', errno: %d)" },
+{ "ER_CANT_DELETE_FILE", 1011, "Error on delete of \'%-.192s\' (errno: %d - %s)" },
+{ "ER_CANT_FIND_SYSTEM_REC", 1012, "Can\'t read record in system table" },
+{ "ER_CANT_GET_STAT", 1013, "Can\'t get status of \'%-.200s\' (errno: %d - %s)" },
+{ "ER_CANT_GET_WD", 1014, "Can\'t get working directory (errno: %d - %s)" },
+{ "ER_CANT_LOCK", 1015, "Can\'t lock file (errno: %d - %s)" },
+{ "ER_CANT_OPEN_FILE", 1016, "Can\'t open file: \'%-.200s\' (errno: %d - %s)" },
+{ "ER_FILE_NOT_FOUND", 1017, "Can\'t find file: \'%-.200s\' (errno: %d - %s)" },
+{ "ER_CANT_READ_DIR", 1018, "Can\'t read dir of \'%-.192s\' (errno: %d - %s)" },
+{ "ER_CANT_SET_WD", 1019, "Can\'t change dir to \'%-.192s\' (errno: %d - %s)" },
+{ "ER_CHECKREAD", 1020, "Record has changed since last read in table \'%-.192s\'" },
+{ "ER_DISK_FULL", 1021, "Disk full (%s); waiting for someone to free some space... (errno: %d - %s)" },
+{ "ER_DUP_KEY", 1022, "Can\'t write; duplicate key in table \'%-.192s\'" },
+{ "ER_ERROR_ON_CLOSE", 1023, "Error on close of \'%-.192s\' (errno: %d - %s)" },
+{ "ER_ERROR_ON_READ", 1024, "Error reading file \'%-.200s\' (errno: %d - %s)" },
+{ "ER_ERROR_ON_RENAME", 1025, "Error on rename of \'%-.210s\' to \'%-.210s\' (errno: %d - %s)" },
+{ "ER_ERROR_ON_WRITE", 1026, "Error writing file \'%-.200s\' (errno: %d - %s)" },
+{ "ER_FILE_USED", 1027, "\'%-.192s\' is locked against change" },
+{ "ER_FILSORT_ABORT", 1028, "Sort aborted" },
+{ "ER_FORM_NOT_FOUND", 1029, "View \'%-.192s\' doesn\'t exist for \'%-.192s\'" },
+{ "ER_GET_ERRNO", 1030, "Got error %d from storage engine" },
+{ "ER_ILLEGAL_HA", 1031, "Table storage engine for \'%-.192s\' doesn\'t have this option" },
+{ "ER_KEY_NOT_FOUND", 1032, "Can\'t find record in \'%-.192s\'" },
+{ "ER_NOT_FORM_FILE", 1033, "Incorrect information in file: \'%-.200s\'" },
+{ "ER_NOT_KEYFILE", 1034, "Incorrect key file for table \'%-.200s\'; try to repair it" },
+{ "ER_OLD_KEYFILE", 1035, "Old key file for table \'%-.192s\'; repair it!" },
+{ "ER_OPEN_AS_READONLY", 1036, "Table \'%-.192s\' is read only" },
+{ "ER_OUTOFMEMORY", 1037, "Out of memory; restart server and try again (needed %d bytes)" },
+{ "ER_OUT_OF_SORTMEMORY", 1038, "Out of sort memory, consider increasing server sort buffer size" },
+{ "ER_UNEXPECTED_EOF", 1039, "Unexpected EOF found when reading file \'%-.192s\' (errno: %d - %s)" },
+{ "ER_CON_COUNT_ERROR", 1040, "Too many connections" },
+{ "ER_OUT_OF_RESOURCES", 1041, "Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use \'ulimit\' to allow mysqld to use more memory or you can add more swap space" },
+{ "ER_BAD_HOST_ERROR", 1042, "Can\'t get hostname for your address" },
+{ "ER_HANDSHAKE_ERROR", 1043, "Bad handshake" },
+{ "ER_DBACCESS_DENIED_ERROR", 1044, "Access denied for user \'%-.48s\'@\'%-.64s\' to database \'%-.192s\'" },
+{ "ER_ACCESS_DENIED_ERROR", 1045, "Access denied for user \'%-.48s\'@\'%-.64s\' (using password: %s)" },
+{ "ER_NO_DB_ERROR", 1046, "No database selected" },
+{ "ER_UNKNOWN_COM_ERROR", 1047, "Unknown command" },
+{ "ER_BAD_NULL_ERROR", 1048, "Column \'%-.192s\' cannot be null" },
+{ "ER_BAD_DB_ERROR", 1049, "Unknown database \'%-.192s\'" },
+{ "ER_TABLE_EXISTS_ERROR", 1050, "Table \'%-.192s\' already exists" },
+{ "ER_BAD_TABLE_ERROR", 1051, "Unknown table \'%-.100s\'" },
+{ "ER_NON_UNIQ_ERROR", 1052, "Column \'%-.192s\' in %-.192s is ambiguous" },
+{ "ER_SERVER_SHUTDOWN", 1053, "Server shutdown in progress" },
+{ "ER_BAD_FIELD_ERROR", 1054, "Unknown column \'%-.192s\' in \'%-.192s\'" },
+{ "ER_WRONG_FIELD_WITH_GROUP", 1055, "\'%-.192s\' isn\'t in GROUP BY" },
+{ "ER_WRONG_GROUP_FIELD", 1056, "Can\'t group on \'%-.192s\'" },
+{ "ER_WRONG_SUM_SELECT", 1057, "Statement has sum functions and columns in same statement" },
+{ "ER_WRONG_VALUE_COUNT", 1058, "Column count doesn\'t match value count" },
+{ "ER_TOO_LONG_IDENT", 1059, "Identifier name \'%-.100s\' is too long" },
+{ "ER_DUP_FIELDNAME", 1060, "Duplicate column name \'%-.192s\'" },
+{ "ER_DUP_KEYNAME", 1061, "Duplicate key name \'%-.192s\'" },
+{ "ER_DUP_ENTRY", 1062, "Duplicate entry \'%-.192s\' for key %d" },
+{ "ER_WRONG_FIELD_SPEC", 1063, "Incorrect column specifier for column \'%-.192s\'" },
+{ "ER_PARSE_ERROR", 1064, "%s near \'%-.80s\' at line %d" },
+{ "ER_EMPTY_QUERY", 1065, "Query was empty" },
+{ "ER_NONUNIQ_TABLE", 1066, "Not unique table/alias: \'%-.192s\'" },
+{ "ER_INVALID_DEFAULT", 1067, "Invalid default value for \'%-.192s\'" },
+{ "ER_MULTIPLE_PRI_KEY", 1068, "Multiple primary key defined" },
+{ "ER_TOO_MANY_KEYS", 1069, "Too many keys specified; max %d keys allowed" },
+{ "ER_TOO_MANY_KEY_PARTS", 1070, "Too many key parts specified; max %d parts allowed" },
+{ "ER_TOO_LONG_KEY", 1071, "Specified key was too long; max key length is %d bytes" },
+{ "ER_KEY_COLUMN_DOES_NOT_EXITS", 1072, "Key column \'%-.192s\' doesn\'t exist in table" },
+{ "ER_BLOB_USED_AS_KEY", 1073, "BLOB column \'%-.192s\' can\'t be used in key specification with the used table type" },
+{ "ER_TOO_BIG_FIELDLENGTH", 1074, "Column length too big for column \'%-.192s\' (max = %lu); use BLOB or TEXT instead" },
+{ "ER_WRONG_AUTO_KEY", 1075, "Incorrect table definition; there can be only one auto column and it must be defined as a key" },
+{ "ER_READY", 1076, "%s: ready for connections.\nVersion: \'%s\' socket: \'%s\' port: %d" },
+{ "ER_NORMAL_SHUTDOWN", 1077, "%s: Normal shutdown\n" },
+{ "ER_GOT_SIGNAL", 1078, "%s: Got signal %d. Aborting!\n" },
+{ "ER_SHUTDOWN_COMPLETE", 1079, "%s: Shutdown complete\n" },
+{ "ER_FORCING_CLOSE", 1080, "%s: Forcing close of thread %ld user: \'%-.48s\'\n" },
+{ "ER_IPSOCK_ERROR", 1081, "Can\'t create IP socket" },
+{ "ER_NO_SUCH_INDEX", 1082, "Table \'%-.192s\' has no index like the one used in CREATE INDEX; recreate the table" },
+{ "ER_WRONG_FIELD_TERMINATORS", 1083, "Field separator argument is not what is expected; check the manual" },
+{ "ER_BLOBS_AND_NO_TERMINATED", 1084, "You can\'t use fixed rowlength with BLOBs; please use \'fields terminated by\'" },
+{ "ER_TEXTFILE_NOT_READABLE", 1085, "The file \'%-.128s\' must be in the database directory or be readable by all" },
+{ "ER_FILE_EXISTS_ERROR", 1086, "File \'%-.200s\' already exists" },
+{ "ER_LOAD_INFO", 1087, "Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld" },
+{ "ER_ALTER_INFO", 1088, "Records: %ld Duplicates: %ld" },
+{ "ER_WRONG_SUB_KEY", 1089, "Incorrect prefix key; the used key part isn\'t a string, the used length is longer than the key part, or the storage engine doesn\'t support unique prefix keys" },
+{ "ER_CANT_REMOVE_ALL_FIELDS", 1090, "You can\'t delete all columns with ALTER TABLE; use DROP TABLE instead" },
+{ "ER_CANT_DROP_FIELD_OR_KEY", 1091, "Can\'t DROP \'%-.192s\'; check that column/key exists" },
+{ "ER_INSERT_INFO", 1092, "Records: %ld Duplicates: %ld Warnings: %ld" },
+{ "ER_UPDATE_TABLE_USED", 1093, "You can\'t specify target table \'%-.192s\' for update in FROM clause" },
+{ "ER_NO_SUCH_THREAD", 1094, "Unknown thread id: %lu" },
+{ "ER_KILL_DENIED_ERROR", 1095, "You are not owner of thread %lu" },
+{ "ER_NO_TABLES_USED", 1096, "No tables used" },
+{ "ER_TOO_BIG_SET", 1097, "Too many strings for column %-.192s and SET" },
+{ "ER_NO_UNIQUE_LOGFILE", 1098, "Can\'t generate a unique log-filename %-.200s.(1-999)\n" },
+{ "ER_TABLE_NOT_LOCKED_FOR_WRITE", 1099, "Table \'%-.192s\' was locked with a READ lock and can\'t be updated" },
+{ "ER_TABLE_NOT_LOCKED", 1100, "Table \'%-.192s\' was not locked with LOCK TABLES" },
+{ "ER_BLOB_CANT_HAVE_DEFAULT", 1101, "BLOB/TEXT column \'%-.192s\' can\'t have a default value" },
+{ "ER_WRONG_DB_NAME", 1102, "Incorrect database name \'%-.100s\'" },
+{ "ER_WRONG_TABLE_NAME", 1103, "Incorrect table name \'%-.100s\'" },
+{ "ER_TOO_BIG_SELECT", 1104, "The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay" },
+{ "ER_UNKNOWN_ERROR", 1105, "Unknown error" },
+{ "ER_UNKNOWN_PROCEDURE", 1106, "Unknown procedure \'%-.192s\'" },
+{ "ER_WRONG_PARAMCOUNT_TO_PROCEDURE", 1107, "Incorrect parameter count to procedure \'%-.192s\'" },
+{ "ER_WRONG_PARAMETERS_TO_PROCEDURE", 1108, "Incorrect parameters to procedure \'%-.192s\'" },
+{ "ER_UNKNOWN_TABLE", 1109, "Unknown table \'%-.192s\' in %-.32s" },
+{ "ER_FIELD_SPECIFIED_TWICE", 1110, "Column \'%-.192s\' specified twice" },
+{ "ER_INVALID_GROUP_FUNC_USE", 1111, "Invalid use of group function" },
+{ "ER_UNSUPPORTED_EXTENSION", 1112, "Table \'%-.192s\' uses an extension that doesn\'t exist in this MySQL version" },
+{ "ER_TABLE_MUST_HAVE_COLUMNS", 1113, "A table must have at least 1 column" },
+{ "ER_RECORD_FILE_FULL", 1114, "The table \'%-.192s\' is full" },
+{ "ER_UNKNOWN_CHARACTER_SET", 1115, "Unknown character set: \'%-.64s\'" },
+{ "ER_TOO_MANY_TABLES", 1116, "Too many tables; MySQL can only use %d tables in a join" },
+{ "ER_TOO_MANY_FIELDS", 1117, "Too many columns" },
+{ "ER_TOO_BIG_ROWSIZE", 1118, "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs" },
+{ "ER_STACK_OVERRUN", 1119, "Thread stack overrun: Used: %ld of a %ld stack. Use \'mysqld --thread_stack=#\' to specify a bigger stack if needed" },
+{ "ER_WRONG_OUTER_JOIN", 1120, "Cross dependency found in OUTER JOIN; examine your ON conditions" },
+{ "ER_NULL_COLUMN_IN_INDEX", 1121, "Table handler doesn\'t support NULL in given index. Please change column \'%-.192s\' to be NOT NULL or use another handler" },
+{ "ER_CANT_FIND_UDF", 1122, "Can\'t load function \'%-.192s\'" },
+{ "ER_CANT_INITIALIZE_UDF", 1123, "Can\'t initialize function \'%-.192s\'; %-.80s" },
+{ "ER_UDF_NO_PATHS", 1124, "No paths allowed for shared library" },
+{ "ER_UDF_EXISTS", 1125, "Function \'%-.192s\' already exists" },
+{ "ER_CANT_OPEN_LIBRARY", 1126, "Can\'t open shared library \'%-.192s\' (errno: %d %-.128s)" },
+{ "ER_CANT_FIND_DL_ENTRY", 1127, "Can\'t find symbol \'%-.128s\' in library" },
+{ "ER_FUNCTION_NOT_DEFINED", 1128, "Function \'%-.192s\' is not defined" },
+{ "ER_HOST_IS_BLOCKED", 1129, "Host \'%-.64s\' is blocked because of many connection errors; unblock with \'mysqladmin flush-hosts\'" },
+{ "ER_HOST_NOT_PRIVILEGED", 1130, "Host \'%-.64s\' is not allowed to connect to this MySQL server" },
+{ "ER_PASSWORD_ANONYMOUS_USER", 1131, "You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords" },
+{ "ER_PASSWORD_NOT_ALLOWED", 1132, "You must have privileges to update tables in the mysql database to be able to change passwords for others" },
+{ "ER_PASSWORD_NO_MATCH", 1133, "Can\'t find any matching row in the user table" },
+{ "ER_UPDATE_INFO", 1134, "Rows matched: %ld Changed: %ld Warnings: %ld" },
+{ "ER_CANT_CREATE_THREAD", 1135, "Can\'t create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug" },
+{ "ER_WRONG_VALUE_COUNT_ON_ROW", 1136, "Column count doesn\'t match value count at row %ld" },
+{ "ER_CANT_REOPEN_TABLE", 1137, "Can\'t reopen table: \'%-.192s\'" },
+{ "ER_INVALID_USE_OF_NULL", 1138, "Invalid use of NULL value" },
+{ "ER_REGEXP_ERROR", 1139, "Got error \'%-.64s\' from regexp" },
+{ "ER_MIX_OF_GROUP_FUNC_AND_FIELDS", 1140, "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause" },
+{ "ER_NONEXISTING_GRANT", 1141, "There is no such grant defined for user \'%-.48s\' on host \'%-.64s\'" },
+{ "ER_TABLEACCESS_DENIED_ERROR", 1142, "%-.128s command denied to user \'%-.48s\'@\'%-.64s\' for table \'%-.64s\'" },
+{ "ER_COLUMNACCESS_DENIED_ERROR", 1143, "%-.16s command denied to user \'%-.48s\'@\'%-.64s\' for column \'%-.192s\' in table \'%-.192s\'" },
+{ "ER_ILLEGAL_GRANT_FOR_TABLE", 1144, "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used" },
+{ "ER_GRANT_WRONG_HOST_OR_USER", 1145, "The host or user argument to GRANT is too long" },
+{ "ER_NO_SUCH_TABLE", 1146, "Table \'%-.192s.%-.192s\' doesn\'t exist" },
+{ "ER_NONEXISTING_TABLE_GRANT", 1147, "There is no such grant defined for user \'%-.48s\' on host \'%-.64s\' on table \'%-.192s\'" },
+{ "ER_NOT_ALLOWED_COMMAND", 1148, "The used command is not allowed with this MySQL version" },
+{ "ER_SYNTAX_ERROR", 1149, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use" },
+{ "ER_DELAYED_CANT_CHANGE_LOCK", 1150, "Delayed insert thread couldn\'t get requested lock for table %-.192s" },
+{ "ER_TOO_MANY_DELAYED_THREADS", 1151, "Too many delayed threads in use" },
+{ "ER_ABORTING_CONNECTION", 1152, "Aborted connection %ld to db: \'%-.192s\' user: \'%-.48s\' (%-.64s)" },
+{ "ER_NET_PACKET_TOO_LARGE", 1153, "Got a packet bigger than \'max_allowed_packet\' bytes" },
+{ "ER_NET_READ_ERROR_FROM_PIPE", 1154, "Got a read error from the connection pipe" },
+{ "ER_NET_FCNTL_ERROR", 1155, "Got an error from fcntl()" },
+{ "ER_NET_PACKETS_OUT_OF_ORDER", 1156, "Got packets out of order" },
+{ "ER_NET_UNCOMPRESS_ERROR", 1157, "Couldn\'t uncompress communication packet" },
+{ "ER_NET_READ_ERROR", 1158, "Got an error reading communication packets" },
+{ "ER_NET_READ_INTERRUPTED", 1159, "Got timeout reading communication packets" },
+{ "ER_NET_ERROR_ON_WRITE", 1160, "Got an error writing communication packets" },
+{ "ER_NET_WRITE_INTERRUPTED", 1161, "Got timeout writing communication packets" },
+{ "ER_TOO_LONG_STRING", 1162, "Result string is longer than \'max_allowed_packet\' bytes" },
+{ "ER_TABLE_CANT_HANDLE_BLOB", 1163, "The used table type doesn\'t support BLOB/TEXT columns" },
+{ "ER_TABLE_CANT_HANDLE_AUTO_INCREMENT", 1164, "The used table type doesn\'t support AUTO_INCREMENT columns" },
+{ "ER_DELAYED_INSERT_TABLE_LOCKED", 1165, "INSERT DELAYED can\'t be used with table \'%-.192s\' because it is locked with LOCK TABLES" },
+{ "ER_WRONG_COLUMN_NAME", 1166, "Incorrect column name \'%-.100s\'" },
+{ "ER_WRONG_KEY_COLUMN", 1167, "The used storage engine can\'t index column \'%-.192s\'" },
+{ "ER_WRONG_MRG_TABLE", 1168, "Unable to open underlying table which is differently defined or of non-MyISAM type or doesn\'t exist" },
+{ "ER_DUP_UNIQUE", 1169, "Can\'t write, because of unique constraint, to table \'%-.192s\'" },
+{ "ER_BLOB_KEY_WITHOUT_LENGTH", 1170, "BLOB/TEXT column \'%-.192s\' used in key specification without a key length" },
+{ "ER_PRIMARY_CANT_HAVE_NULL", 1171, "All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead" },
+{ "ER_TOO_MANY_ROWS", 1172, "Result consisted of more than one row" },
+{ "ER_REQUIRES_PRIMARY_KEY", 1173, "This table type requires a primary key" },
+{ "ER_NO_RAID_COMPILED", 1174, "This version of MySQL is not compiled with RAID support" },
+{ "ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE", 1175, "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column" },
+{ "ER_KEY_DOES_NOT_EXITS", 1176, "Key \'%-.192s\' doesn\'t exist in table \'%-.192s\'" },
+{ "ER_CHECK_NO_SUCH_TABLE", 1177, "Can\'t open table" },
+{ "ER_CHECK_NOT_IMPLEMENTED", 1178, "The storage engine for the table doesn\'t support %s" },
+{ "ER_CANT_DO_THIS_DURING_AN_TRANSACTION", 1179, "You are not allowed to execute this command in a transaction" },
+{ "ER_ERROR_DURING_COMMIT", 1180, "Got error %d during COMMIT" },
+{ "ER_ERROR_DURING_ROLLBACK", 1181, "Got error %d during ROLLBACK" },
+{ "ER_ERROR_DURING_FLUSH_LOGS", 1182, "Got error %d during FLUSH_LOGS" },
+{ "ER_ERROR_DURING_CHECKPOINT", 1183, "Got error %d during CHECKPOINT" },
+{ "ER_NEW_ABORTING_CONNECTION", 1184, "Aborted connection %ld to db: \'%-.192s\' user: \'%-.48s\' host: \'%-.64s\' (%-.64s)" },
+{ "ER_DUMP_NOT_IMPLEMENTED", 1185, "The storage engine for the table does not support binary table dump" },
+{ "ER_FLUSH_MASTER_BINLOG_CLOSED", 1186, "Binlog closed, cannot RESET MASTER" },
+{ "ER_INDEX_REBUILD", 1187, "Failed rebuilding the index of dumped table \'%-.192s\'" },
+{ "ER_MASTER", 1188, "Error from master: \'%-.64s\'" },
+{ "ER_MASTER_NET_READ", 1189, "Net error reading from master" },
+{ "ER_MASTER_NET_WRITE", 1190, "Net error writing to master" },
+{ "ER_FT_MATCHING_KEY_NOT_FOUND", 1191, "Can\'t find FULLTEXT index matching the column list" },
+{ "ER_LOCK_OR_ACTIVE_TRANSACTION", 1192, "Can\'t execute the given command because you have active locked tables or an active transaction" },
+{ "ER_UNKNOWN_SYSTEM_VARIABLE", 1193, "Unknown system variable \'%-.64s\'" },
+{ "ER_CRASHED_ON_USAGE", 1194, "Table \'%-.192s\' is marked as crashed and should be repaired" },
+{ "ER_CRASHED_ON_REPAIR", 1195, "Table \'%-.192s\' is marked as crashed and last (automatic?) repair failed" },
+{ "ER_WARNING_NOT_COMPLETE_ROLLBACK", 1196, "Some non-transactional changed tables couldn\'t be rolled back" },
+{ "ER_TRANS_CACHE_FULL", 1197, "Multi-statement transaction required more than \'max_binlog_cache_size\' bytes of storage; increase this mysqld variable and try again" },
+{ "ER_SLAVE_MUST_STOP", 1198, "This operation cannot be performed with a running slave; run STOP SLAVE first" },
+{ "ER_SLAVE_NOT_RUNNING", 1199, "This operation requires a running slave; configure slave and do START SLAVE" },
+{ "ER_BAD_SLAVE", 1200, "The server is not configured as slave; fix in config file or with CHANGE MASTER TO" },
+{ "ER_MASTER_INFO", 1201, "Could not initialize master info structure; more error messages can be found in the MySQL error log" },
+{ "ER_SLAVE_THREAD", 1202, "Could not create slave thread; check system resources" },
+{ "ER_TOO_MANY_USER_CONNECTIONS", 1203, "User %-.64s already has more than \'max_user_connections\' active connections" },
+{ "ER_SET_CONSTANTS_ONLY", 1204, "You may only use constant expressions with SET" },
+{ "ER_LOCK_WAIT_TIMEOUT", 1205, "Lock wait timeout exceeded; try restarting transaction" },
+{ "ER_LOCK_TABLE_FULL", 1206, "The total number of locks exceeds the lock table size" },
+{ "ER_READ_ONLY_TRANSACTION", 1207, "Update locks cannot be acquired during a READ UNCOMMITTED transaction" },
+{ "ER_DROP_DB_WITH_READ_LOCK", 1208, "DROP DATABASE not allowed while thread is holding global read lock" },
+{ "ER_CREATE_DB_WITH_READ_LOCK", 1209, "CREATE DATABASE not allowed while thread is holding global read lock" },
+{ "ER_WRONG_ARGUMENTS", 1210, "Incorrect arguments to %s" },
+{ "ER_NO_PERMISSION_TO_CREATE_USER", 1211, "\'%-.48s\'@\'%-.64s\' is not allowed to create new users" },
+{ "ER_UNION_TABLES_IN_DIFFERENT_DIR", 1212, "Incorrect table definition; all MERGE tables must be in the same database" },
+{ "ER_LOCK_DEADLOCK", 1213, "Deadlock found when trying to get lock; try restarting transaction" },
+{ "ER_TABLE_CANT_HANDLE_FT", 1214, "The used table type doesn\'t support FULLTEXT indexes" },
+{ "ER_CANNOT_ADD_FOREIGN", 1215, "Cannot add foreign key constraint" },
+{ "ER_NO_REFERENCED_ROW", 1216, "Cannot add or update a child row: a foreign key constraint fails" },
+{ "ER_ROW_IS_REFERENCED", 1217, "Cannot delete or update a parent row: a foreign key constraint fails" },
+{ "ER_CONNECT_TO_MASTER", 1218, "Error connecting to master: %-.128s" },
+{ "ER_QUERY_ON_MASTER", 1219, "Error running query on master: %-.128s" },
+{ "ER_ERROR_WHEN_EXECUTING_COMMAND", 1220, "Error when executing command %s: %-.128s" },
+{ "ER_WRONG_USAGE", 1221, "Incorrect usage of %s and %s" },
+{ "ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT", 1222, "The used SELECT statements have a different number of columns" },
+{ "ER_CANT_UPDATE_WITH_READLOCK", 1223, "Can\'t execute the query because you have a conflicting read lock" },
+{ "ER_MIXING_NOT_ALLOWED", 1224, "Mixing of transactional and non-transactional tables is disabled" },
+{ "ER_DUP_ARGUMENT", 1225, "Option \'%s\' used twice in statement" },
+{ "ER_USER_LIMIT_REACHED", 1226, "User \'%-.64s\' has exceeded the \'%s\' resource (current value: %ld)" },
+{ "ER_SPECIFIC_ACCESS_DENIED_ERROR", 1227, "Access denied; you need (at least one of) the %-.128s privilege(s) for this operation" },
+{ "ER_LOCAL_VARIABLE", 1228, "Variable \'%-.64s\' is a SESSION variable and can\'t be used with SET GLOBAL" },
+{ "ER_GLOBAL_VARIABLE", 1229, "Variable \'%-.64s\' is a GLOBAL variable and should be set with SET GLOBAL" },
+{ "ER_NO_DEFAULT", 1230, "Variable \'%-.64s\' doesn\'t have a default value" },
+{ "ER_WRONG_VALUE_FOR_VAR", 1231, "Variable \'%-.64s\' can\'t be set to the value of \'%-.200s\'" },
+{ "ER_WRONG_TYPE_FOR_VAR", 1232, "Incorrect argument type to variable \'%-.64s\'" },
+{ "ER_VAR_CANT_BE_READ", 1233, "Variable \'%-.64s\' can only be set, not read" },
+{ "ER_CANT_USE_OPTION_HERE", 1234, "Incorrect usage/placement of \'%s\'" },
+{ "ER_NOT_SUPPORTED_YET", 1235, "This version of MySQL doesn\'t yet support \'%s\'" },
+{ "ER_MASTER_FATAL_ERROR_READING_BINLOG", 1236, "Got fatal error %d from master when reading data from binary log: \'%-.320s\'" },
+{ "ER_SLAVE_IGNORED_TABLE", 1237, "Slave SQL thread ignored the query because of replicate-*-table rules" },
+{ "ER_INCORRECT_GLOBAL_LOCAL_VAR", 1238, "Variable \'%-.192s\' is a %s variable" },
+{ "ER_WRONG_FK_DEF", 1239, "Incorrect foreign key definition for \'%-.192s\': %s" },
+{ "ER_KEY_REF_DO_NOT_MATCH_TABLE_REF", 1240, "Key reference and table reference don\'t match" },
+{ "ER_OPERAND_COLUMNS", 1241, "Operand should contain %d column(s)" },
+{ "ER_SUBQUERY_NO_1_ROW", 1242, "Subquery returns more than 1 row" },
+{ "ER_UNKNOWN_STMT_HANDLER", 1243, "Unknown prepared statement handler (%.*s) given to %s" },
+{ "ER_CORRUPT_HELP_DB", 1244, "Help database is corrupt or does not exist" },
+{ "ER_CYCLIC_REFERENCE", 1245, "Cyclic reference on subqueries" },
+{ "ER_AUTO_CONVERT", 1246, "Converting column \'%s\' from %s to %s" },
+{ "ER_ILLEGAL_REFERENCE", 1247, "Reference \'%-.64s\' not supported (%s)" },
+{ "ER_DERIVED_MUST_HAVE_ALIAS", 1248, "Every derived table must have its own alias" },
+{ "ER_SELECT_REDUCED", 1249, "Select %u was reduced during optimization" },
+{ "ER_TABLENAME_NOT_ALLOWED_HERE", 1250, "Table \'%-.192s\' from one of the SELECTs cannot be used in %-.32s" },
+{ "ER_NOT_SUPPORTED_AUTH_MODE", 1251, "Client does not support authentication protocol requested by server; consider upgrading MySQL client" },
+{ "ER_SPATIAL_CANT_HAVE_NULL", 1252, "All parts of a SPATIAL index must be NOT NULL" },
+{ "ER_COLLATION_CHARSET_MISMATCH", 1253, "COLLATION \'%s\' is not valid for CHARACTER SET \'%s\'" },
+{ "ER_SLAVE_WAS_RUNNING", 1254, "Slave is already running" },
+{ "ER_SLAVE_WAS_NOT_RUNNING", 1255, "Slave already has been stopped" },
+{ "ER_TOO_BIG_FOR_UNCOMPRESS", 1256, "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)" },
+{ "ER_ZLIB_Z_MEM_ERROR", 1257, "ZLIB: Not enough memory" },
+{ "ER_ZLIB_Z_BUF_ERROR", 1258, "ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)" },
+{ "ER_ZLIB_Z_DATA_ERROR", 1259, "ZLIB: Input data corrupted" },
+{ "ER_CUT_VALUE_GROUP_CONCAT", 1260, "Row %u was cut by GROUP_CONCAT()" },
+{ "ER_WARN_TOO_FEW_RECORDS", 1261, "Row %ld doesn\'t contain data for all columns" },
+{ "ER_WARN_TOO_MANY_RECORDS", 1262, "Row %ld was truncated; it contained more data than there were input columns" },
+{ "ER_WARN_NULL_TO_NOTNULL", 1263, "Column set to default value; NULL supplied to NOT NULL column \'%s\' at row %ld" },
+{ "ER_WARN_DATA_OUT_OF_RANGE", 1264, "Out of range value for column \'%s\' at row %ld" },
+{ "WARN_DATA_TRUNCATED", 1265, "Data truncated for column \'%s\' at row %ld" },
+{ "ER_WARN_USING_OTHER_HANDLER", 1266, "Using storage engine %s for table \'%s\'" },
+{ "ER_CANT_AGGREGATE_2COLLATIONS", 1267, "Illegal mix of collations (%s,%s) and (%s,%s) for operation \'%s\'" },
+{ "ER_DROP_USER", 1268, "Cannot drop one or more of the requested users" },
+{ "ER_REVOKE_GRANTS", 1269, "Can\'t revoke all privileges for one or more of the requested users" },
+{ "ER_CANT_AGGREGATE_3COLLATIONS", 1270, "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation \'%s\'" },
+{ "ER_CANT_AGGREGATE_NCOLLATIONS", 1271, "Illegal mix of collations for operation \'%s\'" },
+{ "ER_VARIABLE_IS_NOT_STRUCT", 1272, "Variable \'%-.64s\' is not a variable component (can\'t be used as XXXX.variable_name)" },
+{ "ER_UNKNOWN_COLLATION", 1273, "Unknown collation: \'%-.64s\'" },
+{ "ER_SLAVE_IGNORED_SSL_PARAMS", 1274, "SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started" },
+{ "ER_SERVER_IS_IN_SECURE_AUTH_MODE", 1275, "Server is running in --secure-auth mode, but \'%s\'@\'%s\' has a password in the old format; please change the password to the new format" },
+{ "ER_WARN_FIELD_RESOLVED", 1276, "Field or reference \'%-.192s%s%-.192s%s%-.192s\' of SELECT #%d was resolved in SELECT #%d" },
+{ "ER_BAD_SLAVE_UNTIL_COND", 1277, "Incorrect parameter or combination of parameters for START SLAVE UNTIL" },
+{ "ER_MISSING_SKIP_SLAVE", 1278, "It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave\'s mysqld restart" },
+{ "ER_UNTIL_COND_IGNORED", 1279, "SQL thread is not to be started so UNTIL options are ignored" },
+{ "ER_WRONG_NAME_FOR_INDEX", 1280, "Incorrect index name \'%-.100s\'" },
+{ "ER_WRONG_NAME_FOR_CATALOG", 1281, "Incorrect catalog name \'%-.100s\'" },
+{ "ER_WARN_QC_RESIZE", 1282, "Query cache failed to set size %lu; new query cache size is %lu" },
+{ "ER_BAD_FT_COLUMN", 1283, "Column \'%-.192s\' cannot be part of FULLTEXT index" },
+{ "ER_UNKNOWN_KEY_CACHE", 1284, "Unknown key cache \'%-.100s\'" },
+{ "ER_WARN_HOSTNAME_WONT_WORK", 1285, "MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work" },
+{ "ER_UNKNOWN_STORAGE_ENGINE", 1286, "Unknown storage engine \'%s\'" },
+{ "ER_WARN_DEPRECATED_SYNTAX", 1287, "\'%s\' is deprecated and will be removed in a future release. Please use %s instead" },
+{ "ER_NON_UPDATABLE_TABLE", 1288, "The target table %-.100s of the %s is not updatable" },
+{ "ER_FEATURE_DISABLED", 1289, "The \'%s\' feature is disabled; you need MySQL built with \'%s\' to have it working" },
+{ "ER_OPTION_PREVENTS_STATEMENT", 1290, "The MySQL server is running with the %s option so it cannot execute this statement" },
+{ "ER_DUPLICATED_VALUE_IN_TYPE", 1291, "Column \'%-.100s\' has duplicated value \'%-.64s\' in %s" },
+{ "ER_TRUNCATED_WRONG_VALUE", 1292, "Truncated incorrect %-.32s value: \'%-.128s\'" },
+{ "ER_TOO_MUCH_AUTO_TIMESTAMP_COLS", 1293, "Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" },
+{ "ER_INVALID_ON_UPDATE", 1294, "Invalid ON UPDATE clause for \'%-.192s\' column" },
+{ "ER_UNSUPPORTED_PS", 1295, "This command is not supported in the prepared statement protocol yet" },
+{ "ER_GET_ERRMSG", 1296, "Got error %d \'%-.100s\' from %s" },
+{ "ER_GET_TEMPORARY_ERRMSG", 1297, "Got temporary error %d \'%-.100s\' from %s" },
+{ "ER_UNKNOWN_TIME_ZONE", 1298, "Unknown or incorrect time zone: \'%-.64s\'" },
+{ "ER_WARN_INVALID_TIMESTAMP", 1299, "Invalid TIMESTAMP value in column \'%s\' at row %ld" },
+{ "ER_INVALID_CHARACTER_STRING", 1300, "Invalid %s character string: \'%.64s\'" },
+{ "ER_WARN_ALLOWED_PACKET_OVERFLOWED", 1301, "Result of %s() was larger than max_allowed_packet (%ld) - truncated" },
+{ "ER_CONFLICTING_DECLARATIONS", 1302, "Conflicting declarations: \'%s%s\' and \'%s%s\'" },
+{ "ER_SP_NO_RECURSIVE_CREATE", 1303, "Can\'t create a %s from within another stored routine" },
+{ "ER_SP_ALREADY_EXISTS", 1304, "%s %s already exists" },
+{ "ER_SP_DOES_NOT_EXIST", 1305, "%s %s does not exist" },
+{ "ER_SP_DROP_FAILED", 1306, "Failed to DROP %s %s" },
+{ "ER_SP_STORE_FAILED", 1307, "Failed to CREATE %s %s" },
+{ "ER_SP_LILABEL_MISMATCH", 1308, "%s with no matching label: %s" },
+{ "ER_SP_LABEL_REDEFINE", 1309, "Redefining label %s" },
+{ "ER_SP_LABEL_MISMATCH", 1310, "End-label %s without match" },
+{ "ER_SP_UNINIT_VAR", 1311, "Referring to uninitialized variable %s" },
+{ "ER_SP_BADSELECT", 1312, "PROCEDURE %s can\'t return a result set in the given context" },
+{ "ER_SP_BADRETURN", 1313, "RETURN is only allowed in a FUNCTION" },
+{ "ER_SP_BADSTATEMENT", 1314, "%s is not allowed in stored procedures" },
+{ "ER_UPDATE_LOG_DEPRECATED_IGNORED", 1315, "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored." },
+{ "ER_UPDATE_LOG_DEPRECATED_TRANSLATED", 1316, "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN." },
+{ "ER_QUERY_INTERRUPTED", 1317, "Query execution was interrupted" },
+{ "ER_SP_WRONG_NO_OF_ARGS", 1318, "Incorrect number of arguments for %s %s; expected %u, got %u" },
+{ "ER_SP_COND_MISMATCH", 1319, "Undefined CONDITION: %s" },
+{ "ER_SP_NORETURN", 1320, "No RETURN found in FUNCTION %s" },
+{ "ER_SP_NORETURNEND", 1321, "FUNCTION %s ended without RETURN" },
+{ "ER_SP_BAD_CURSOR_QUERY", 1322, "Cursor statement must be a SELECT" },
+{ "ER_SP_BAD_CURSOR_SELECT", 1323, "Cursor SELECT must not have INTO" },
+{ "ER_SP_CURSOR_MISMATCH", 1324, "Undefined CURSOR: %s" },
+{ "ER_SP_CURSOR_ALREADY_OPEN", 1325, "Cursor is already open" },
+{ "ER_SP_CURSOR_NOT_OPEN", 1326, "Cursor is not open" },
+{ "ER_SP_UNDECLARED_VAR", 1327, "Undeclared variable: %s" },
+{ "ER_SP_WRONG_NO_OF_FETCH_ARGS", 1328, "Incorrect number of FETCH variables" },
+{ "ER_SP_FETCH_NO_DATA", 1329, "No data - zero rows fetched, selected, or processed" },
+{ "ER_SP_DUP_PARAM", 1330, "Duplicate parameter: %s" },
+{ "ER_SP_DUP_VAR", 1331, "Duplicate variable: %s" },
+{ "ER_SP_DUP_COND", 1332, "Duplicate condition: %s" },
+{ "ER_SP_DUP_CURS", 1333, "Duplicate cursor: %s" },
+{ "ER_SP_CANT_ALTER", 1334, "Failed to ALTER %s %s" },
+{ "ER_SP_SUBSELECT_NYI", 1335, "Subquery value not supported" },
+{ "ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG", 1336, "%s is not allowed in stored function or trigger" },
+{ "ER_SP_VARCOND_AFTER_CURSHNDLR", 1337, "Variable or condition declaration after cursor or handler declaration" },
+{ "ER_SP_CURSOR_AFTER_HANDLER", 1338, "Cursor declaration after handler declaration" },
+{ "ER_SP_CASE_NOT_FOUND", 1339, "Case not found for CASE statement" },
+{ "ER_FPARSER_TOO_BIG_FILE", 1340, "Configuration file \'%-.192s\' is too big" },
+{ "ER_FPARSER_BAD_HEADER", 1341, "Malformed file type header in file \'%-.192s\'" },
+{ "ER_FPARSER_EOF_IN_COMMENT", 1342, "Unexpected end of file while parsing comment \'%-.200s\'" },
+{ "ER_FPARSER_ERROR_IN_PARAMETER", 1343, "Error while parsing parameter \'%-.192s\' (line: \'%-.192s\')" },
+{ "ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER", 1344, "Unexpected end of file while skipping unknown parameter \'%-.192s\'" },
+{ "ER_VIEW_NO_EXPLAIN", 1345, "EXPLAIN/SHOW can not be issued; lacking privileges for underlying table" },
+{ "ER_FRM_UNKNOWN_TYPE", 1346, "File \'%-.192s\' has unknown type \'%-.64s\' in its header" },
+{ "ER_WRONG_OBJECT", 1347, "\'%-.192s.%-.192s\' is not %s" },
+{ "ER_NONUPDATEABLE_COLUMN", 1348, "Column \'%-.192s\' is not updatable" },
+{ "ER_VIEW_SELECT_DERIVED", 1349, "View\'s SELECT contains a subquery in the FROM clause" },
+{ "ER_VIEW_SELECT_CLAUSE", 1350, "View\'s SELECT contains a \'%s\' clause" },
+{ "ER_VIEW_SELECT_VARIABLE", 1351, "View\'s SELECT contains a variable or parameter" },
+{ "ER_VIEW_SELECT_TMPTABLE", 1352, "View\'s SELECT refers to a temporary table \'%-.192s\'" },
+{ "ER_VIEW_WRONG_LIST", 1353, "View\'s SELECT and view\'s field list have different column counts" },
+{ "ER_WARN_VIEW_MERGE", 1354, "View merge algorithm can\'t be used here for now (assumed undefined algorithm)" },
+{ "ER_WARN_VIEW_WITHOUT_KEY", 1355, "View being updated does not have complete key of underlying table in it" },
+{ "ER_VIEW_INVALID", 1356, "View \'%-.192s.%-.192s\' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" },
+{ "ER_SP_NO_DROP_SP", 1357, "Can\'t drop or alter a %s from within another stored routine" },
+{ "ER_SP_GOTO_IN_HNDLR", 1358, "GOTO is not allowed in a stored procedure handler" },
+{ "ER_TRG_ALREADY_EXISTS", 1359, "Trigger already exists" },
+{ "ER_TRG_DOES_NOT_EXIST", 1360, "Trigger does not exist" },
+{ "ER_TRG_ON_VIEW_OR_TEMP_TABLE", 1361, "Trigger\'s \'%-.192s\' is view or temporary table" },
+{ "ER_TRG_CANT_CHANGE_ROW", 1362, "Updating of %s row is not allowed in %strigger" },
+{ "ER_TRG_NO_SUCH_ROW_IN_TRG", 1363, "There is no %s row in %s trigger" },
+{ "ER_NO_DEFAULT_FOR_FIELD", 1364, "Field \'%-.192s\' doesn\'t have a default value" },
+{ "ER_DIVISION_BY_ZERO", 1365, "Division by 0" },
+{ "ER_TRUNCATED_WRONG_VALUE_FOR_FIELD", 1366, "Incorrect %-.32s value: \'%-.128s\' for column \'%.192s\' at row %ld" },
+{ "ER_ILLEGAL_VALUE_FOR_TYPE", 1367, "Illegal %s \'%-.192s\' value found during parsing" },
+{ "ER_VIEW_NONUPD_CHECK", 1368, "CHECK OPTION on non-updatable view \'%-.192s.%-.192s\'" },
+{ "ER_VIEW_CHECK_FAILED", 1369, "CHECK OPTION failed \'%-.192s.%-.192s\'" },
+{ "ER_PROCACCESS_DENIED_ERROR", 1370, "%-.16s command denied to user \'%-.48s\'@\'%-.64s\' for routine \'%-.192s\'" },
+{ "ER_RELAY_LOG_FAIL", 1371, "Failed purging old relay logs: %s" },
+{ "ER_PASSWD_LENGTH", 1372, "Password hash should be a %d-digit hexadecimal number" },
+{ "ER_UNKNOWN_TARGET_BINLOG", 1373, "Target log not found in binlog index" },
+{ "ER_IO_ERR_LOG_INDEX_READ", 1374, "I/O error reading log index file" },
+{ "ER_BINLOG_PURGE_PROHIBITED", 1375, "Server configuration does not permit binlog purge" },
+{ "ER_FSEEK_FAIL", 1376, "Failed on fseek()" },
+{ "ER_BINLOG_PURGE_FATAL_ERR", 1377, "Fatal error during log purge" },
+{ "ER_LOG_IN_USE", 1378, "A purgeable log is in use, will not purge" },
+{ "ER_LOG_PURGE_UNKNOWN_ERR", 1379, "Unknown error during log purge" },
+{ "ER_RELAY_LOG_INIT", 1380, "Failed initializing relay log position: %s" },
+{ "ER_NO_BINARY_LOGGING", 1381, "You are not using binary logging" },
+{ "ER_RESERVED_SYNTAX", 1382, "The \'%-.64s\' syntax is reserved for purposes internal to the MySQL server" },
+{ "ER_WSAS_FAILED", 1383, "WSAStartup Failed" },
+{ "ER_DIFF_GROUPS_PROC", 1384, "Can\'t handle procedures with different groups yet" },
+{ "ER_NO_GROUP_FOR_PROC", 1385, "Select must have a group with this procedure" },
+{ "ER_ORDER_WITH_PROC", 1386, "Can\'t use ORDER clause with this procedure" },
+{ "ER_LOGGING_PROHIBIT_CHANGING_OF", 1387, "Binary logging and replication forbid changing the global server %s" },
+{ "ER_NO_FILE_MAPPING", 1388, "Can\'t map file: %-.200s, errno: %d" },
+{ "ER_WRONG_MAGIC", 1389, "Wrong magic in %-.64s" },
+{ "ER_PS_MANY_PARAM", 1390, "Prepared statement contains too many placeholders" },
+{ "ER_KEY_PART_0", 1391, "Key part \'%-.192s\' length cannot be 0" },
+{ "ER_VIEW_CHECKSUM", 1392, "View text checksum failed" },
+{ "ER_VIEW_MULTIUPDATE", 1393, "Can not modify more than one base table through a join view \'%-.192s.%-.192s\'" },
+{ "ER_VIEW_NO_INSERT_FIELD_LIST", 1394, "Can not insert into join view \'%-.192s.%-.192s\' without fields list" },
+{ "ER_VIEW_DELETE_MERGE_VIEW", 1395, "Can not delete from join view \'%-.192s.%-.192s\'" },
+{ "ER_CANNOT_USER", 1396, "Operation %s failed for %.256s" },
+{ "ER_XAER_NOTA", 1397, "XAER_NOTA: Unknown XID" },
+{ "ER_XAER_INVAL", 1398, "XAER_INVAL: Invalid arguments (or unsupported command)" },
+{ "ER_XAER_RMFAIL", 1399, "XAER_RMFAIL: The command cannot be executed when global transaction is in the %.64s state" },
+{ "ER_XAER_OUTSIDE", 1400, "XAER_OUTSIDE: Some work is done outside global transaction" },
+{ "ER_XAER_RMERR", 1401, "XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency" },
+{ "ER_XA_RBROLLBACK", 1402, "XA_RBROLLBACK: Transaction branch was rolled back" },
+{ "ER_NONEXISTING_PROC_GRANT", 1403, "There is no such grant defined for user \'%-.48s\' on host \'%-.64s\' on routine \'%-.192s\'" },
+{ "ER_PROC_AUTO_GRANT_FAIL", 1404, "Failed to grant EXECUTE and ALTER ROUTINE privileges" },
+{ "ER_PROC_AUTO_REVOKE_FAIL", 1405, "Failed to revoke all privileges to dropped routine" },
+{ "ER_DATA_TOO_LONG", 1406, "Data too long for column \'%s\' at row %ld" },
+{ "ER_SP_BAD_SQLSTATE", 1407, "Bad SQLSTATE: \'%s\'" },
+{ "ER_STARTUP", 1408, "%s: ready for connections.\nVersion: \'%s\' socket: \'%s\' port: %d %s" },
+{ "ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR", 1409, "Can\'t load value from file with fixed size rows to variable" },
+{ "ER_CANT_CREATE_USER_WITH_GRANT", 1410, "You are not allowed to create a user with GRANT" },
+{ "ER_WRONG_VALUE_FOR_TYPE", 1411, "Incorrect %-.32s value: \'%-.128s\' for function %-.32s" },
+{ "ER_TABLE_DEF_CHANGED", 1412, "Table definition has changed, please retry transaction" },
+{ "ER_SP_DUP_HANDLER", 1413, "Duplicate handler declared in the same block" },
+{ "ER_SP_NOT_VAR_ARG", 1414, "OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger" },
+{ "ER_SP_NO_RETSET", 1415, "Not allowed to return a result set from a %s" },
+{ "ER_CANT_CREATE_GEOMETRY_OBJECT", 1416, "Cannot get geometry object from data you send to the GEOMETRY field" },
+{ "ER_FAILED_ROUTINE_BREAK_BINLOG", 1417, "A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes" },
+{ "ER_BINLOG_UNSAFE_ROUTINE", 1418, "This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" },
+{ "ER_BINLOG_CREATE_ROUTINE_NEED_SUPER", 1419, "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" },
+{ "ER_EXEC_STMT_WITH_OPEN_CURSOR", 1420, "You can\'t execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it." },
+{ "ER_STMT_HAS_NO_OPEN_CURSOR", 1421, "The statement (%lu) has no open cursor." },
+{ "ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG", 1422, "Explicit or implicit commit is not allowed in stored function or trigger." },
+{ "ER_NO_DEFAULT_FOR_VIEW_FIELD", 1423, "Field of view \'%-.192s.%-.192s\' underlying table doesn\'t have a default value" },
+{ "ER_SP_NO_RECURSION", 1424, "Recursive stored functions and triggers are not allowed." },
+{ "ER_TOO_BIG_SCALE", 1425, "Too big scale %d specified for column \'%-.192s\'. Maximum is %lu." },
+{ "ER_TOO_BIG_PRECISION", 1426, "Too big precision %d specified for column \'%-.192s\'. Maximum is %lu." },
+{ "ER_M_BIGGER_THAN_D", 1427, "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column \'%-.192s\')." },
+{ "ER_WRONG_LOCK_OF_SYSTEM_TABLE", 1428, "You can\'t combine write-locking of system tables with other tables or lock types" },
+{ "ER_CONNECT_TO_FOREIGN_DATA_SOURCE", 1429, "Unable to connect to foreign data source: %.64s" },
+{ "ER_QUERY_ON_FOREIGN_DATA_SOURCE", 1430, "There was a problem processing the query on the foreign data source. Data source error: %-.64s" },
+{ "ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST", 1431, "The foreign data source you are trying to reference does not exist. Data source error: %-.64s" },
+{ "ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE", 1432, "Can\'t create federated table. The data source connection string \'%-.64s\' is not in the correct format" },
+{ "ER_FOREIGN_DATA_STRING_INVALID", 1433, "The data source connection string \'%-.64s\' is not in the correct format" },
+{ "ER_CANT_CREATE_FEDERATED_TABLE", 1434, "Can\'t create federated table. Foreign data src error: %-.64s" },
+{ "ER_TRG_IN_WRONG_SCHEMA", 1435, "Trigger in wrong schema" },
+{ "ER_STACK_OVERRUN_NEED_MORE", 1436, "Thread stack overrun: %ld bytes used of a %ld byte stack, and %ld bytes needed. Use \'mysqld --thread_stack=#\' to specify a bigger stack." },
+{ "ER_TOO_LONG_BODY", 1437, "Routine body for \'%-.100s\' is too long" },
+{ "ER_WARN_CANT_DROP_DEFAULT_KEYCACHE", 1438, "Cannot drop default keycache" },
+{ "ER_TOO_BIG_DISPLAYWIDTH", 1439, "Display width out of range for column \'%-.192s\' (max = %lu)" },
+{ "ER_XAER_DUPID", 1440, "XAER_DUPID: The XID already exists" },
+{ "ER_DATETIME_FUNCTION_OVERFLOW", 1441, "Datetime function: %-.32s field overflow" },
+{ "ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG", 1442, "Can\'t update table \'%-.192s\' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." },
+{ "ER_VIEW_PREVENT_UPDATE", 1443, "The definition of table \'%-.192s\' prevents operation %.192s on table \'%-.192s\'." },
+{ "ER_PS_NO_RECURSION", 1444, "The prepared statement contains a stored routine call that refers to that same statement. It\'s not allowed to execute a prepared statement in such a recursive manner" },
+{ "ER_SP_CANT_SET_AUTOCOMMIT", 1445, "Not allowed to set autocommit from a stored function or trigger" },
+{ "ER_MALFORMED_DEFINER", 1446, "Definer is not fully qualified" },
+{ "ER_VIEW_FRM_NO_USER", 1447, "View \'%-.192s\'.\'%-.192s\' has no definer information (old table format). Current user is used as definer. Please recreate the view!" },
+{ "ER_VIEW_OTHER_USER", 1448, "You need the SUPER privilege for creation view with \'%-.192s\'@\'%-.192s\' definer" },
+{ "ER_NO_SUCH_USER", 1449, "The user specified as a definer (\'%-.64s\'@\'%-.64s\') does not exist" },
+{ "ER_FORBID_SCHEMA_CHANGE", 1450, "Changing schema from \'%-.192s\' to \'%-.192s\' is not allowed." },
+{ "ER_ROW_IS_REFERENCED_2", 1451, "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)" },
+{ "ER_NO_REFERENCED_ROW_2", 1452, "Cannot add or update a child row: a foreign key constraint fails (%.192s)" },
+{ "ER_SP_BAD_VAR_SHADOW", 1453, "Variable \'%-.64s\' must be quoted with `...`, or renamed" },
+{ "ER_TRG_NO_DEFINER", 1454, "No definer attribute for trigger \'%-.192s\'.\'%-.192s\'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger." },
+{ "ER_OLD_FILE_FORMAT", 1455, "\'%-.192s\' has an old format, you should re-create the \'%s\' object(s)" },
+{ "ER_SP_RECURSION_LIMIT", 1456, "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s" },
+{ "ER_SP_PROC_TABLE_CORRUPT", 1457, "Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)" },
+{ "ER_SP_WRONG_NAME", 1458, "Incorrect routine name \'%-.192s\'" },
+{ "ER_TABLE_NEEDS_UPGRADE", 1459, "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\" or dump/reload to fix it!" },
+{ "ER_SP_NO_AGGREGATE", 1460, "AGGREGATE is not supported for stored functions" },
+{ "ER_MAX_PREPARED_STMT_COUNT_REACHED", 1461, "Can\'t create more than max_prepared_stmt_count statements (current value: %lu)" },
+{ "ER_VIEW_RECURSIVE", 1462, "`%-.192s`.`%-.192s` contains view recursion" },
+{ "ER_NON_GROUPING_FIELD_USED", 1463, "Non-grouping field \'%-.192s\' is used in %-.64s clause" },
+{ "ER_TABLE_CANT_HANDLE_SPKEYS", 1464, "The used table type doesn\'t support SPATIAL indexes" },
+{ "ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA", 1465, "Triggers can not be created on system tables" },
+{ "ER_REMOVED_SPACES", 1466, "Leading spaces are removed from name \'%s\'" },
+{ "ER_AUTOINC_READ_FAILED", 1467, "Failed to read auto-increment value from storage engine" },
+{ "ER_USERNAME", 1468, "user name" },
+{ "ER_HOSTNAME", 1469, "host name" },
+{ "ER_WRONG_STRING_LENGTH", 1470, "String \'%-.70s\' is too long for %s (should be no longer than %d)" },
+{ "ER_NON_INSERTABLE_TABLE", 1471, "The target table %-.100s of the %s is not insertable-into" },
+{ "ER_ADMIN_WRONG_MRG_TABLE", 1472, "Table \'%-.64s\' is differently defined or of non-MyISAM type or doesn\'t exist" },
+{ "ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT", 1473, "Too high level of nesting for select" },
+{ "ER_NAME_BECOMES_EMPTY", 1474, "Name \'%-.64s\' has become \'\'" },
+{ "ER_AMBIGUOUS_FIELD_TERM", 1475, "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY" },
+{ "ER_FOREIGN_SERVER_EXISTS", 1476, "The foreign server, %s, you are trying to create already exists." },
+{ "ER_FOREIGN_SERVER_DOESNT_EXIST", 1477, "The foreign server name you are trying to reference does not exist. Data source error: %-.64s" },
+{ "ER_ILLEGAL_HA_CREATE_OPTION", 1478, "Table storage engine \'%-.64s\' does not support the create option \'%.64s\'" },
+{ "ER_PARTITION_REQUIRES_VALUES_ERROR", 1479, "Syntax error: %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition" },
+{ "ER_PARTITION_WRONG_VALUES_ERROR", 1480, "Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition" },
+{ "ER_PARTITION_MAXVALUE_ERROR", 1481, "MAXVALUE can only be used in last partition definition" },
+{ "ER_PARTITION_SUBPARTITION_ERROR", 1482, "Subpartitions can only be hash partitions and by key" },
+{ "ER_PARTITION_SUBPART_MIX_ERROR", 1483, "Must define subpartitions on all partitions if on one partition" },
+{ "ER_PARTITION_WRONG_NO_PART_ERROR", 1484, "Wrong number of partitions defined, mismatch with previous setting" },
+{ "ER_PARTITION_WRONG_NO_SUBPART_ERROR", 1485, "Wrong number of subpartitions defined, mismatch with previous setting" },
+{ "ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR", 1486, "Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed" },
+{ "ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR", 1487, "Expression in RANGE/LIST VALUES must be constant" },
+{ "ER_FIELD_NOT_FOUND_PART_ERROR", 1488, "Field in list of fields for partition function not found in table" },
+{ "ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR", 1489, "List of fields is only allowed in KEY partitions" },
+{ "ER_INCONSISTENT_PARTITION_INFO_ERROR", 1490, "The partition info in the frm file is not consistent with what can be written into the frm file" },
+{ "ER_PARTITION_FUNC_NOT_ALLOWED_ERROR", 1491, "The %-.192s function returns the wrong type" },
+{ "ER_PARTITIONS_MUST_BE_DEFINED_ERROR", 1492, "For %-.64s partitions each partition must be defined" },
+{ "ER_RANGE_NOT_INCREASING_ERROR", 1493, "VALUES LESS THAN value must be strictly increasing for each partition" },
+{ "ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR", 1494, "VALUES value must be of same type as partition function" },
+{ "ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR", 1495, "Multiple definition of same constant in list partitioning" },
+{ "ER_PARTITION_ENTRY_ERROR", 1496, "Partitioning can not be used stand-alone in query" },
+{ "ER_MIX_HANDLER_ERROR", 1497, "The mix of handlers in the partitions is not allowed in this version of MySQL" },
+{ "ER_PARTITION_NOT_DEFINED_ERROR", 1498, "For the partitioned engine it is necessary to define all %-.64s" },
+{ "ER_TOO_MANY_PARTITIONS_ERROR", 1499, "Too many partitions (including subpartitions) were defined" },
+{ "ER_SUBPARTITION_ERROR", 1500, "It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning" },
+{ "ER_CANT_CREATE_HANDLER_FILE", 1501, "Failed to create specific handler file" },
+{ "ER_BLOB_FIELD_IN_PART_FUNC_ERROR", 1502, "A BLOB field is not allowed in partition function" },
+{ "ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF", 1503, "A %-.192s must include all columns in the table\'s partitioning function" },
+{ "ER_NO_PARTS_ERROR", 1504, "Number of %-.64s = 0 is not an allowed value" },
+{ "ER_PARTITION_MGMT_ON_NONPARTITIONED", 1505, "Partition management on a not partitioned table is not possible" },
+{ "ER_FOREIGN_KEY_ON_PARTITIONED", 1506, "Foreign key clause is not yet supported in conjunction with partitioning" },
+{ "ER_DROP_PARTITION_NON_EXISTENT", 1507, "Error in list of partitions to %-.64s" },
+{ "ER_DROP_LAST_PARTITION", 1508, "Cannot remove all partitions, use DROP TABLE instead" },
+{ "ER_COALESCE_ONLY_ON_HASH_PARTITION", 1509, "COALESCE PARTITION can only be used on HASH/KEY partitions" },
+{ "ER_REORG_HASH_ONLY_ON_SAME_NO", 1510, "REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers" },
+{ "ER_REORG_NO_PARAM_ERROR", 1511, "REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs" },
+{ "ER_ONLY_ON_RANGE_LIST_PARTITION", 1512, "%-.64s PARTITION can only be used on RANGE/LIST partitions" },
+{ "ER_ADD_PARTITION_SUBPART_ERROR", 1513, "Trying to Add partition(s) with wrong number of subpartitions" },
+{ "ER_ADD_PARTITION_NO_NEW_PARTITION", 1514, "At least one partition must be added" },
+{ "ER_COALESCE_PARTITION_NO_PARTITION", 1515, "At least one partition must be coalesced" },
+{ "ER_REORG_PARTITION_NOT_EXIST", 1516, "More partitions to reorganize than there are partitions" },
+{ "ER_SAME_NAME_PARTITION", 1517, "Duplicate partition name %-.192s" },
+{ "ER_NO_BINLOG_ERROR", 1518, "It is not allowed to shut off binlog on this command" },
+{ "ER_CONSECUTIVE_REORG_PARTITIONS", 1519, "When reorganizing a set of partitions they must be in consecutive order" },
+{ "ER_REORG_OUTSIDE_RANGE", 1520, "Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range" },
+{ "ER_PARTITION_FUNCTION_FAILURE", 1521, "Partition function not supported in this version for this handler" },
+{ "ER_PART_STATE_ERROR", 1522, "Partition state cannot be defined from CREATE/ALTER TABLE" },
+{ "ER_LIMITED_PART_RANGE", 1523, "The %-.64s handler only supports 32 bit integers in VALUES" },
+{ "ER_PLUGIN_IS_NOT_LOADED", 1524, "Plugin \'%-.192s\' is not loaded" },
+{ "ER_WRONG_VALUE", 1525, "Incorrect %-.32s value: \'%-.128s\'" },
+{ "ER_NO_PARTITION_FOR_GIVEN_VALUE", 1526, "Table has no partition for value %-.64s" },
+{ "ER_FILEGROUP_OPTION_ONLY_ONCE", 1527, "It is not allowed to specify %s more than once" },
+{ "ER_CREATE_FILEGROUP_FAILED", 1528, "Failed to create %s" },
+{ "ER_DROP_FILEGROUP_FAILED", 1529, "Failed to drop %s" },
+{ "ER_TABLESPACE_AUTO_EXTEND_ERROR", 1530, "The handler doesn\'t support autoextend of tablespaces" },
+{ "ER_WRONG_SIZE_NUMBER", 1531, "A size parameter was incorrectly specified, either number or on the form 10M" },
+{ "ER_SIZE_OVERFLOW_ERROR", 1532, "The size number was correct but we don\'t allow the digit part to be more than 2 billion" },
+{ "ER_ALTER_FILEGROUP_FAILED", 1533, "Failed to alter: %s" },
+{ "ER_BINLOG_ROW_LOGGING_FAILED", 1534, "Writing one row to the row-based binary log failed" },
+{ "ER_BINLOG_ROW_WRONG_TABLE_DEF", 1535, "Table definition on master and slave does not match: %s" },
+{ "ER_BINLOG_ROW_RBR_TO_SBR", 1536, "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events" },
+{ "ER_EVENT_ALREADY_EXISTS", 1537, "Event \'%-.192s\' already exists" },
+{ "ER_EVENT_STORE_FAILED", 1538, "Failed to store event %s. Error code %d from storage engine." },
+{ "ER_EVENT_DOES_NOT_EXIST", 1539, "Unknown event \'%-.192s\'" },
+{ "ER_EVENT_CANT_ALTER", 1540, "Failed to alter event \'%-.192s\'" },
+{ "ER_EVENT_DROP_FAILED", 1541, "Failed to drop %s" },
+{ "ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG", 1542, "INTERVAL is either not positive or too big" },
+{ "ER_EVENT_ENDS_BEFORE_STARTS", 1543, "ENDS is either invalid or before STARTS" },
+{ "ER_EVENT_EXEC_TIME_IN_THE_PAST", 1544, "Event execution time is in the past. Event has been disabled" },
+{ "ER_EVENT_OPEN_TABLE_FAILED", 1545, "Failed to open mysql.event" },
+{ "ER_EVENT_NEITHER_M_EXPR_NOR_M_AT", 1546, "No datetime expression provided" },
+{ "ER_OBSOLETE_COL_COUNT_DOESNT_MATCH_CORRUPTED", 1547, "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted" },
+{ "ER_OBSOLETE_CANNOT_LOAD_FROM_TABLE", 1548, "Cannot load from mysql.%s. The table is probably corrupted" },
+{ "ER_EVENT_CANNOT_DELETE", 1549, "Failed to delete the event from mysql.event" },
+{ "ER_EVENT_COMPILE_ERROR", 1550, "Error during compilation of event\'s body" },
+{ "ER_EVENT_SAME_NAME", 1551, "Same old and new event name" },
+{ "ER_EVENT_DATA_TOO_LONG", 1552, "Data for column \'%s\' too long" },
+{ "ER_DROP_INDEX_FK", 1553, "Cannot drop index \'%-.192s\': needed in a foreign key constraint" },
+{ "ER_WARN_DEPRECATED_SYNTAX_WITH_VER", 1554, "The syntax \'%s\' is deprecated and will be removed in MySQL %s. Please use %s instead" },
+{ "ER_CANT_WRITE_LOCK_LOG_TABLE", 1555, "You can\'t write-lock a log table. Only read access is possible" },
+{ "ER_CANT_LOCK_LOG_TABLE", 1556, "You can\'t use locks with log tables." },
+{ "ER_FOREIGN_DUPLICATE_KEY_OLD_UNUSED", 1557, "Upholding foreign key constraints for table \'%.192s\', entry \'%-.192s\', key %d would lead to a duplicate entry" },
+{ "ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE", 1558, "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error." },
+{ "ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR", 1559, "Cannot switch out of the row-based binary log format when the session has open temporary tables" },
+{ "ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT", 1560, "Cannot change the binary logging format inside a stored function or trigger" },
+{ "ER_NDB_CANT_SWITCH_BINLOG_FORMAT", 1561, "The NDB cluster engine does not support changing the binlog format on the fly yet" },
+{ "ER_PARTITION_NO_TEMPORARY", 1562, "Cannot create temporary table with partitions" },
+{ "ER_PARTITION_CONST_DOMAIN_ERROR", 1563, "Partition constant is out of partition function domain" },
+{ "ER_PARTITION_FUNCTION_IS_NOT_ALLOWED", 1564, "This partition function is not allowed" },
+{ "ER_DDL_LOG_ERROR", 1565, "Error in DDL log" },
+{ "ER_NULL_IN_VALUES_LESS_THAN", 1566, "Not allowed to use NULL value in VALUES LESS THAN" },
+{ "ER_WRONG_PARTITION_NAME", 1567, "Incorrect partition name" },
+{ "ER_CANT_CHANGE_TX_CHARACTERISTICS", 1568, "Transaction characteristics can\'t be changed while a transaction is in progress" },
+{ "ER_DUP_ENTRY_AUTOINCREMENT_CASE", 1569, "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry \'%-.192s\' for key \'%-.192s\'" },
+{ "ER_EVENT_MODIFY_QUEUE_ERROR", 1570, "Internal scheduler error %d" },
+{ "ER_EVENT_SET_VAR_ERROR", 1571, "Error during starting/stopping of the scheduler. Error code %u" },
+{ "ER_PARTITION_MERGE_ERROR", 1572, "Engine cannot be used in partitioned tables" },
+{ "ER_CANT_ACTIVATE_LOG", 1573, "Cannot activate \'%-.64s\' log" },
+{ "ER_RBR_NOT_AVAILABLE", 1574, "The server was not built with row-based replication" },
+{ "ER_BASE64_DECODE_ERROR", 1575, "Decoding of base64 string failed" },
+{ "ER_EVENT_RECURSION_FORBIDDEN", 1576, "Recursion of EVENT DDL statements is forbidden when body is present" },
+{ "ER_EVENTS_DB_ERROR", 1577, "Cannot proceed because system tables used by Event Scheduler were found damaged at server start" },
+{ "ER_ONLY_INTEGERS_ALLOWED", 1578, "Only integers allowed as number here" },
+{ "ER_UNSUPORTED_LOG_ENGINE", 1579, "This storage engine cannot be used for log tables\"" },
+{ "ER_BAD_LOG_STATEMENT", 1580, "You cannot \'%s\' a log table if logging is enabled" },
+{ "ER_CANT_RENAME_LOG_TABLE", 1581, "Cannot rename \'%s\'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to \'%s\'" },
+{ "ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT", 1582, "Incorrect parameter count in the call to native function \'%-.192s\'" },
+{ "ER_WRONG_PARAMETERS_TO_NATIVE_FCT", 1583, "Incorrect parameters in the call to native function \'%-.192s\'" },
+{ "ER_WRONG_PARAMETERS_TO_STORED_FCT", 1584, "Incorrect parameters in the call to stored function \'%-.192s\'" },
+{ "ER_NATIVE_FCT_NAME_COLLISION", 1585, "This function \'%-.192s\' has the same name as a native function" },
+{ "ER_DUP_ENTRY_WITH_KEY_NAME", 1586, "Duplicate entry \'%-.64s\' for key \'%-.192s\'" },
+{ "ER_BINLOG_PURGE_EMFILE", 1587, "Too many files opened, please execute the command again" },
+{ "ER_EVENT_CANNOT_CREATE_IN_THE_PAST", 1588, "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation." },
+{ "ER_EVENT_CANNOT_ALTER_IN_THE_PAST", 1589, "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future." },
+{ "ER_SLAVE_INCIDENT", 1590, "The incident %s occured on the master. Message: %-.64s" },
+{ "ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT", 1591, "Table has no partition for some existing values" },
+{ "ER_BINLOG_UNSAFE_STATEMENT", 1592, "Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. %s" },
+{ "ER_SLAVE_FATAL_ERROR", 1593, "Fatal error: %s" },
+{ "ER_SLAVE_RELAY_LOG_READ_FAILURE", 1594, "Relay log read failure: %s" },
+{ "ER_SLAVE_RELAY_LOG_WRITE_FAILURE", 1595, "Relay log write failure: %s" },
+{ "ER_SLAVE_CREATE_EVENT_FAILURE", 1596, "Failed to create %s" },
+{ "ER_SLAVE_MASTER_COM_FAILURE", 1597, "Master command %s failed: %s" },
+{ "ER_BINLOG_LOGGING_IMPOSSIBLE", 1598, "Binary logging not possible. Message: %s" },
+{ "ER_VIEW_NO_CREATION_CTX", 1599, "View `%-.64s`.`%-.64s` has no creation context" },
+{ "ER_VIEW_INVALID_CREATION_CTX", 1600, "Creation context of view `%-.64s`.`%-.64s\' is invalid" },
+{ "ER_SR_INVALID_CREATION_CTX", 1601, "Creation context of stored routine `%-.64s`.`%-.64s` is invalid" },
+{ "ER_TRG_CORRUPTED_FILE", 1602, "Corrupted TRG file for table `%-.64s`.`%-.64s`" },
+{ "ER_TRG_NO_CREATION_CTX", 1603, "Triggers for table `%-.64s`.`%-.64s` have no creation context" },
+{ "ER_TRG_INVALID_CREATION_CTX", 1604, "Trigger creation context of table `%-.64s`.`%-.64s` is invalid" },
+{ "ER_EVENT_INVALID_CREATION_CTX", 1605, "Creation context of event `%-.64s`.`%-.64s` is invalid" },
+{ "ER_TRG_CANT_OPEN_TABLE", 1606, "Cannot open table for trigger `%-.64s`.`%-.64s`" },
+{ "ER_CANT_CREATE_SROUTINE", 1607, "Cannot create stored routine `%-.64s`. Check warnings" },
+{ "ER_NEVER_USED", 1608, "Ambiguous slave modes combination. %s" },
+{ "ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT", 1609, "The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement." },
+{ "ER_SLAVE_CORRUPT_EVENT", 1610, "Corrupted replication event was detected" },
+{ "ER_LOAD_DATA_INVALID_COLUMN", 1611, "Invalid column reference (%-.64s) in LOAD DATA" },
+{ "ER_LOG_PURGE_NO_FILE", 1612, "Being purged log %s was not found" },
+{ "ER_XA_RBTIMEOUT", 1613, "XA_RBTIMEOUT: Transaction branch was rolled back: took too long" },
+{ "ER_XA_RBDEADLOCK", 1614, "XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected" },
+{ "ER_NEED_REPREPARE", 1615, "Prepared statement needs to be re-prepared" },
+{ "ER_DELAYED_NOT_SUPPORTED", 1616, "DELAYED option not supported for table \'%-.192s\'" },
+{ "WARN_NO_MASTER_INFO", 1617, "The master info structure does not exist" },
+{ "WARN_OPTION_IGNORED", 1618, "<%-.64s> option ignored" },
+{ "WARN_PLUGIN_DELETE_BUILTIN", 1619, "Built-in plugins cannot be deleted" },
+{ "WARN_PLUGIN_BUSY", 1620, "Plugin is busy and will be uninstalled on shutdown" },
+{ "ER_VARIABLE_IS_READONLY", 1621, "%s variable \'%s\' is read-only. Use SET %s to assign the value" },
+{ "ER_WARN_ENGINE_TRANSACTION_ROLLBACK", 1622, "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted" },
+{ "ER_SLAVE_HEARTBEAT_FAILURE", 1623, "Unexpected master\'s heartbeat data: %s" },
+{ "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE", 1624, "The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%s seconds)." },
+{ "ER_NDB_REPLICATION_SCHEMA_ERROR", 1625, "Bad schema for mysql.ndb_replication table. Message: %-.64s" },
+{ "ER_CONFLICT_FN_PARSE_ERROR", 1626, "Error in parsing conflict function. Message: %-.64s" },
+{ "ER_EXCEPTIONS_WRITE_ERROR", 1627, "Write to exceptions table failed. Message: %-.128s\"" },
+{ "ER_TOO_LONG_TABLE_COMMENT", 1628, "Comment for table \'%-.64s\' is too long (max = %lu)" },
+{ "ER_TOO_LONG_FIELD_COMMENT", 1629, "Comment for field \'%-.64s\' is too long (max = %lu)" },
+{ "ER_FUNC_INEXISTENT_NAME_COLLISION", 1630, "FUNCTION %s does not exist. Check the \'Function Name Parsing and Resolution\' section in the Reference Manual" },
+{ "ER_DATABASE_NAME", 1631, "Database" },
+{ "ER_TABLE_NAME", 1632, "Table" },
+{ "ER_PARTITION_NAME", 1633, "Partition" },
+{ "ER_SUBPARTITION_NAME", 1634, "Subpartition" },
+{ "ER_TEMPORARY_NAME", 1635, "Temporary" },
+{ "ER_RENAMED_NAME", 1636, "Renamed" },
+{ "ER_TOO_MANY_CONCURRENT_TRXS", 1637, "Too many active concurrent transactions" },
+{ "WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED", 1638, "Non-ASCII separator arguments are not fully supported" },
+{ "ER_DEBUG_SYNC_TIMEOUT", 1639, "debug sync point wait timed out" },
+{ "ER_DEBUG_SYNC_HIT_LIMIT", 1640, "debug sync point hit limit reached" },
+{ "ER_DUP_SIGNAL_SET", 1641, "Duplicate condition information item \'%s\'" },
+{ "ER_SIGNAL_WARN", 1642, "Unhandled user-defined warning condition" },
+{ "ER_SIGNAL_NOT_FOUND", 1643, "Unhandled user-defined not found condition" },
+{ "ER_SIGNAL_EXCEPTION", 1644, "Unhandled user-defined exception condition" },
+{ "ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER", 1645, "RESIGNAL when handler not active" },
+{ "ER_SIGNAL_BAD_CONDITION_TYPE", 1646, "SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE" },
+{ "WARN_COND_ITEM_TRUNCATED", 1647, "Data truncated for condition item \'%s\'" },
+{ "ER_COND_ITEM_TOO_LONG", 1648, "Data too long for condition item \'%s\'" },
+{ "ER_UNKNOWN_LOCALE", 1649, "Unknown locale: \'%-.64s\'" },
+{ "ER_SLAVE_IGNORE_SERVER_IDS", 1650, "The requested server id %d clashes with the slave startup option --replicate-same-server-id" },
+{ "ER_QUERY_CACHE_DISABLED", 1651, "Query cache is disabled; restart the server with query_cache_type=1 to enable it" },
+{ "ER_SAME_NAME_PARTITION_FIELD", 1652, "Duplicate partition field name \'%-.192s\'" },
+{ "ER_PARTITION_COLUMN_LIST_ERROR", 1653, "Inconsistency in usage of column lists for partitioning" },
+{ "ER_WRONG_TYPE_COLUMN_VALUE_ERROR", 1654, "Partition column values of incorrect type" },
+{ "ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR", 1655, "Too many fields in \'%-.192s\'" },
+{ "ER_MAXVALUE_IN_VALUES_IN", 1656, "Cannot use MAXVALUE as value in VALUES IN" },
+{ "ER_TOO_MANY_VALUES_ERROR", 1657, "Cannot have more than one value for this type of %-.64s partitioning" },
+{ "ER_ROW_SINGLE_PARTITION_FIELD_ERROR", 1658, "Row expressions in VALUES IN only allowed for multi-field column partitioning" },
+{ "ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD", 1659, "Field \'%-.192s\' is of a not allowed type for this type of partitioning" },
+{ "ER_PARTITION_FIELDS_TOO_LONG", 1660, "The total length of the partitioning fields is too large" },
+{ "ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE", 1661, "Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved." },
+{ "ER_BINLOG_ROW_MODE_AND_STMT_ENGINE", 1662, "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging." },
+{ "ER_BINLOG_UNSAFE_AND_STMT_ENGINE", 1663, "Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. %s" },
+{ "ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE", 1664, "Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging." },
+{ "ER_BINLOG_STMT_MODE_AND_ROW_ENGINE", 1665, "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s" },
+{ "ER_BINLOG_ROW_INJECTION_AND_STMT_MODE", 1666, "Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT." },
+{ "ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE", 1667, "Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging." },
+{ "ER_BINLOG_UNSAFE_LIMIT", 1668, "The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted." },
+{ "ER_BINLOG_UNSAFE_INSERT_DELAYED", 1669, "The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted." },
+{ "ER_BINLOG_UNSAFE_SYSTEM_TABLE", 1670, "The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves." },
+{ "ER_BINLOG_UNSAFE_AUTOINC_COLUMNS", 1671, "Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly." },
+{ "ER_BINLOG_UNSAFE_UDF", 1672, "Statement is unsafe because it uses a UDF which may not return the same value on the slave." },
+{ "ER_BINLOG_UNSAFE_SYSTEM_VARIABLE", 1673, "Statement is unsafe because it uses a system variable that may have a different value on the slave." },
+{ "ER_BINLOG_UNSAFE_SYSTEM_FUNCTION", 1674, "Statement is unsafe because it uses a system function that may return a different value on the slave." },
+{ "ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS", 1675, "Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction." },
+{ "ER_MESSAGE_AND_STATEMENT", 1676, "%s Statement: %s" },
+{ "ER_SLAVE_CONVERSION_FAILED", 1677, "Column %d of table \'%-.192s.%-.192s\' cannot be converted from type \'%-.32s\' to type \'%-.32s\'" },
+{ "ER_SLAVE_CANT_CREATE_CONVERSION", 1678, "Can\'t create conversion table for table \'%-.192s.%-.192s\'" },
+{ "ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT", 1679, "Cannot modify @@session.binlog_format inside a transaction" },
+{ "ER_PATH_LENGTH", 1680, "The path specified for %.64s is too long." },
+{ "ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT", 1681, "\'%s\' is deprecated and will be removed in a future release." },
+{ "ER_WRONG_NATIVE_TABLE_STRUCTURE", 1682, "Native table \'%-.64s\'.\'%-.64s\' has the wrong structure" },
+{ "ER_WRONG_PERFSCHEMA_USAGE", 1683, "Invalid performance_schema usage." },
+{ "ER_WARN_I_S_SKIPPED_TABLE", 1684, "Table \'%s\'.\'%s\' was skipped since its definition is being modified by concurrent DDL statement" },
+{ "ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT", 1685, "Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction" },
+{ "ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT", 1686, "Cannot change the binlog direct flag inside a stored function or trigger" },
+{ "ER_SPATIAL_MUST_HAVE_GEOM_COL", 1687, "A SPATIAL index may only contain a geometrical type column" },
+{ "ER_TOO_LONG_INDEX_COMMENT", 1688, "Comment for index \'%-.64s\' is too long (max = %lu)" },
+{ "ER_LOCK_ABORTED", 1689, "Wait on a lock was aborted due to a pending exclusive lock" },
+{ "ER_DATA_OUT_OF_RANGE", 1690, "%s value is out of range in \'%s\'" },
+{ "ER_WRONG_SPVAR_TYPE_IN_LIMIT", 1691, "A variable of a non-integer based type in LIMIT clause" },
+{ "ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE", 1692, "Mixing self-logging and non-self-logging engines in a statement is unsafe." },
+{ "ER_BINLOG_UNSAFE_MIXED_STATEMENT", 1693, "Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them." },
+{ "ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN", 1694, "Cannot modify @@session.sql_log_bin inside a transaction" },
+{ "ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN", 1695, "Cannot change the sql_log_bin inside a stored function or trigger" },
+{ "ER_FAILED_READ_FROM_PAR_FILE", 1696, "Failed to read from the .par file" },
+{ "ER_VALUES_IS_NOT_INT_TYPE_ERROR", 1697, "VALUES value for partition \'%-.64s\' must have type INT" },
+{ "ER_ACCESS_DENIED_NO_PASSWORD_ERROR", 1698, "Access denied for user \'%-.48s\'@\'%-.64s\'" },
+{ "ER_SET_PASSWORD_AUTH_PLUGIN", 1699, "SET PASSWORD has no significance for users authenticating via plugins" },
+{ "ER_GRANT_PLUGIN_USER_EXISTS", 1700, "GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists" },
+{ "ER_TRUNCATE_ILLEGAL_FK", 1701, "Cannot truncate a table referenced in a foreign key constraint (%.192s)" },
+{ "ER_PLUGIN_IS_PERMANENT", 1702, "Plugin \'%s\' is force_plus_permanent and can not be unloaded" },
+{ "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN", 1703, "The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled." },
+{ "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX", 1704, "The requested value for the heartbeat period exceeds the value of `slave_net_timeout\' seconds. A sensible value for the period should be less than the timeout." },
+{ "ER_STMT_CACHE_FULL", 1705, "Multi-row statements required more than \'max_binlog_stmt_cache_size\' bytes of storage; increase this mysqld variable and try again" },
+{ "ER_MULTI_UPDATE_KEY_CONFLICT", 1706, "Primary key/partition key update is not allowed since the table is updated both as \'%-.192s\' and \'%-.192s\'." },
+{ "ER_TABLE_NEEDS_REBUILD", 1707, "Table rebuild required. Please do \"ALTER TABLE `%-.32s` FORCE\" or dump/reload to fix it!" },
+{ "WARN_OPTION_BELOW_LIMIT", 1708, "The value of \'%s\' should be no less than the value of \'%s\'" },
+{ "ER_INDEX_COLUMN_TOO_LONG", 1709, "Index column size too large. The maximum column size is %lu bytes." },
+{ "ER_ERROR_IN_TRIGGER_BODY", 1710, "Trigger \'%-.64s\' has an error in its body: \'%-.256s\'" },
+{ "ER_ERROR_IN_UNKNOWN_TRIGGER_BODY", 1711, "Unknown trigger has an error in its body: \'%-.256s\'" },
+{ "ER_INDEX_CORRUPT", 1712, "Index %s is corrupted" },
+{ "ER_UNDO_RECORD_TOO_BIG", 1713, "Undo log record is too big." },
+{ "ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT", 1714, "INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE", 1715, "INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_BINLOG_UNSAFE_REPLACE_SELECT", 1716, "REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT", 1717, "CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT", 1718, "CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_BINLOG_UNSAFE_UPDATE_IGNORE", 1719, "UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_PLUGIN_NO_UNINSTALL", 1720, "Plugin \'%s\' is marked as not dynamically uninstallable. You have to stop the server to uninstall it." },
+{ "ER_PLUGIN_NO_INSTALL", 1721, "Plugin \'%s\' is marked as not dynamically installable. You have to stop the server to install it." },
+{ "ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT", 1722, "Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC", 1723, "CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave." },
+{ "ER_BINLOG_UNSAFE_INSERT_TWO_KEYS", 1724, "INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe" },
+{ "ER_TABLE_IN_FK_CHECK", 1725, "Table is being used in foreign key check." },
+{ "ER_UNSUPPORTED_ENGINE", 1726, "Storage engine \'%s\' does not support system tables. [%s.%s]" },
+{ "ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST", 1727, "INSERT into autoincrement field which is not the first part in the composed primary key is unsafe." },
+{ "ER_CANNOT_LOAD_FROM_TABLE_V2", 1728, "Cannot load from %s.%s. The table is probably corrupted" },
+{ "ER_MASTER_DELAY_VALUE_OUT_OF_RANGE", 1729, "The requested value %s for the master delay exceeds the maximum %u" },
+{ "ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT", 1730, "Only Format_description_log_event and row events are allowed in BINLOG statements (but %s was provided)" },
+{ "ER_PARTITION_EXCHANGE_DIFFERENT_OPTION", 1731, "Non matching attribute \'%-.64s\' between partition and table" },
+{ "ER_PARTITION_EXCHANGE_PART_TABLE", 1732, "Table to exchange with partition is partitioned: \'%-.64s\'" },
+{ "ER_PARTITION_EXCHANGE_TEMP_TABLE", 1733, "Table to exchange with partition is temporary: \'%-.64s\'" },
+{ "ER_PARTITION_INSTEAD_OF_SUBPARTITION", 1734, "Subpartitioned table, use subpartition instead of partition" },
+{ "ER_UNKNOWN_PARTITION", 1735, "Unknown partition \'%-.64s\' in table \'%-.64s\'" },
+{ "ER_TABLES_DIFFERENT_METADATA", 1736, "Tables have different definitions" },
+{ "ER_ROW_DOES_NOT_MATCH_PARTITION", 1737, "Found a row that does not match the partition" },
+{ "ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX", 1738, "Option binlog_cache_size (%lu) is greater than max_binlog_cache_size (%lu); setting binlog_cache_size equal to max_binlog_cache_size." },
+{ "ER_WARN_INDEX_NOT_APPLICABLE", 1739, "Cannot use %-.64s access on index \'%-.64s\' due to type or collation conversion on field \'%-.64s\'" },
+{ "ER_PARTITION_EXCHANGE_FOREIGN_KEY", 1740, "Table to exchange with partition has foreign key references: \'%-.64s\'" },
+{ "ER_NO_SUCH_KEY_VALUE", 1741, "Key value \'%-.192s\' was not found in table \'%-.192s.%-.192s\'" },
+{ "ER_RPL_INFO_DATA_TOO_LONG", 1742, "Data for column \'%s\' too long" },
+{ "ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE", 1743, "Replication event checksum verification failed while reading from network." },
+{ "ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE", 1744, "Replication event checksum verification failed while reading from a log file." },
+{ "ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX", 1745, "Option binlog_stmt_cache_size (%lu) is greater than max_binlog_stmt_cache_size (%lu); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size." },
+{ "ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT", 1746, "Can\'t update table \'%-.192s\' while \'%-.192s\' is being created." },
+{ "ER_PARTITION_CLAUSE_ON_NONPARTITIONED", 1747, "PARTITION () clause on non partitioned table" },
+{ "ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET", 1748, "Found a row not matching the given partition set" },
+{ "ER_NO_SUCH_PARTITION__UNUSED", 1749, "partition \'%-.64s\' doesn\'t exist" },
+{ "ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE", 1750, "Failure while changing the type of replication repository: %s." },
+{ "ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE", 1751, "The creation of some temporary tables could not be rolled back." },
+{ "ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE", 1752, "Some temporary tables were dropped, but these operations could not be rolled back." },
+{ "ER_MTS_FEATURE_IS_NOT_SUPPORTED", 1753, "%s is not supported in multi-threaded slave mode. %s" },
+{ "ER_MTS_UPDATED_DBS_GREATER_MAX", 1754, "The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata." },
+{ "ER_MTS_CANT_PARALLEL", 1755, "Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s." },
+{ "ER_MTS_INCONSISTENT_DATA", 1756, "%s" },
+{ "ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING", 1757, "FULLTEXT index is not supported for partitioned tables." },
+{ "ER_DA_INVALID_CONDITION_NUMBER", 1758, "Invalid condition number" },
+{ "ER_INSECURE_PLAIN_TEXT", 1759, "Sending passwords in plain text without SSL/TLS is extremely insecure." },
+{ "ER_INSECURE_CHANGE_MASTER", 1760, "Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the \'START SLAVE Syntax\' in the MySQL Manual for more information." },
+{ "ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO", 1761, "Foreign key constraint for table \'%.192s\', record \'%-.192s\' would lead to a duplicate entry in table \'%.192s\', key \'%.192s\'" },
+{ "ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO", 1762, "Foreign key constraint for table \'%.192s\', record \'%-.192s\' would lead to a duplicate entry in a child table" },
+{ "ER_SQLTHREAD_WITH_SECURE_SLAVE", 1763, "Setting authentication options is not possible when only the Slave SQL Thread is being started." },
+{ "ER_TABLE_HAS_NO_FT", 1764, "The table does not have FULLTEXT index to support this query" },
+{ "ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER", 1765, "The system variable %.200s cannot be set in stored functions or triggers." },
+{ "ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION", 1766, "The system variable %.200s cannot be set when there is an ongoing transaction." },
+{ "ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST", 1767, "The system variable @@SESSION.GTID_NEXT has the value %.200s, which is not listed in @@SESSION.GTID_NEXT_LIST." },
+{ "ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION_WHEN_GTID_NEXT_LIST_IS_NULL", 1768, "The system variable @@SESSION.GTID_NEXT cannot change inside a transaction." },
+{ "ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION", 1769, "The statement \'SET %.200s\' cannot invoke a stored function." },
+{ "ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL", 1770, "The system variable @@SESSION.GTID_NEXT cannot be \'AUTOMATIC\' when @@SESSION.GTID_NEXT_LIST is non-NULL." },
+{ "ER_SKIPPING_LOGGED_TRANSACTION", 1771, "Skipping transaction %.200s because it has already been executed and logged." },
+{ "ER_MALFORMED_GTID_SET_SPECIFICATION", 1772, "Malformed GTID set specification \'%.200s\'." },
+{ "ER_MALFORMED_GTID_SET_ENCODING", 1773, "Malformed GTID set encoding." },
+{ "ER_MALFORMED_GTID_SPECIFICATION", 1774, "Malformed GTID specification \'%.200s\'." },
+{ "ER_GNO_EXHAUSTED", 1775, "Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new server_uuid." },
+{ "ER_BAD_SLAVE_AUTO_POSITION", 1776, "Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE and RELAY_LOG_POS cannot be set when MASTER_AUTO_POSITION is active." },
+{ "ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON", 1777, "CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when @@GLOBAL.GTID_MODE = ON." },
+{ "ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET", 1778, "Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC." },
+{ "ER_GTID_MODE_2_OR_3_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON", 1779, "@@GLOBAL.GTID_MODE = ON or UPGRADE_STEP_2 requires @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1." },
+{ "ER_GTID_MODE_REQUIRES_BINLOG", 1780, "@@GLOBAL.GTID_MODE = ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates." },
+{ "ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF", 1781, "@@SESSION.GTID_NEXT cannot be set to UUID:NUMBER when @@GLOBAL.GTID_MODE = OFF." },
+{ "ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON", 1782, "@@SESSION.GTID_NEXT cannot be set to ANONYMOUS when @@GLOBAL.GTID_MODE = ON." },
+{ "ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF", 1783, "@@SESSION.GTID_NEXT_LIST cannot be set to a non-NULL value when @@GLOBAL.GTID_MODE = OFF." },
+{ "ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF", 1784, "Found a Gtid_log_event or Previous_gtids_log_event when @@GLOBAL.GTID_MODE = OFF." },
+{ "ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE", 1785, "When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables." },
+{ "ER_GTID_UNSAFE_CREATE_SELECT", 1786, "CREATE TABLE ... SELECT is forbidden when @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1." },
+{ "ER_GTID_UNSAFE_CREATE_DROP_TEMPORARY_TABLE_IN_TRANSACTION", 1787, "When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1." },
+{ "ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME", 1788, "The value of @@GLOBAL.GTID_MODE can only change one step at a time: OFF <-> UPGRADE_STEP_1 <-> UPGRADE_STEP_2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions." },
+{ "ER_MASTER_HAS_PURGED_REQUIRED_GTIDS", 1789, "The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires." },
+{ "ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID", 1790, "@@SESSION.GTID_NEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK." },
+{ "ER_UNKNOWN_EXPLAIN_FORMAT", 1791, "Unknown EXPLAIN format name: \'%s\'" },
+{ "ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION", 1792, "Cannot execute statement in a READ ONLY transaction." },
+{ "ER_TOO_LONG_TABLE_PARTITION_COMMENT", 1793, "Comment for table partition \'%-.64s\' is too long (max = %lu)" },
+{ "ER_SLAVE_CONFIGURATION", 1794, "Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log." },
+{ "ER_INNODB_FT_LIMIT", 1795, "InnoDB presently supports one FULLTEXT index creation at a time" },
+{ "ER_INNODB_NO_FT_TEMP_TABLE", 1796, "Cannot create FULLTEXT index on temporary InnoDB table" },
+{ "ER_INNODB_FT_WRONG_DOCID_COLUMN", 1797, "Column \'%-.192s\' is of wrong type for an InnoDB FULLTEXT index" },
+{ "ER_INNODB_FT_WRONG_DOCID_INDEX", 1798, "Index \'%-.192s\' is of wrong type for an InnoDB FULLTEXT index" },
+{ "ER_INNODB_ONLINE_LOG_TOO_BIG", 1799, "Creating index \'%-.192s\' required more than \'innodb_online_alter_log_max_size\' bytes of modification log. Please try again." },
+{ "ER_UNKNOWN_ALTER_ALGORITHM", 1800, "Unknown ALGORITHM \'%s\'" },
+{ "ER_UNKNOWN_ALTER_LOCK", 1801, "Unknown LOCK type \'%s\'" },
+{ "ER_MTS_CHANGE_MASTER_CANT_RUN_WITH_GAPS", 1802, "CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL." },
+{ "ER_MTS_RECOVERY_FAILURE", 1803, "Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MySQL error log." },
+{ "ER_MTS_RESET_WORKERS", 1804, "Cannot clean up worker info tables. Additional error messages can be found in the MySQL error log." },
+{ "ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2", 1805, "Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted" },
+{ "ER_SLAVE_SILENT_RETRY_TRANSACTION", 1806, "Slave must silently retry current transaction" },
+{ "ER_DISCARD_FK_CHECKS_RUNNING", 1807, "There is a foreign key check running on table \'%-.192s\'. Cannot discard the table." },
+{ "ER_TABLE_SCHEMA_MISMATCH", 1808, "Schema mismatch (%s)" },
+{ "ER_TABLE_IN_SYSTEM_TABLESPACE", 1809, "Table \'%-.192s\' in system tablespace" },
+{ "ER_IO_READ_ERROR", 1810, "IO Read error: (%lu, %s) %s" },
+{ "ER_IO_WRITE_ERROR", 1811, "IO Write error: (%lu, %s) %s" },
+{ "ER_TABLESPACE_MISSING", 1812, "Tablespace is missing for table \'%-.192s\'" },
+{ "ER_TABLESPACE_EXISTS", 1813, "Tablespace for table \'%-.192s\' exists. Please DISCARD the tablespace before IMPORT." },
+{ "ER_TABLESPACE_DISCARDED", 1814, "Tablespace has been discarded for table \'%-.192s\'" },
+{ "ER_INTERNAL_ERROR", 1815, "Internal error: %s" },
+{ "ER_INNODB_IMPORT_ERROR", 1816, "ALTER TABLE \'%-.192s\' IMPORT TABLESPACE failed with error %lu : \'%s\'" },
+{ "ER_INNODB_INDEX_CORRUPT", 1817, "Index corrupt: %s" },
+{ "ER_INVALID_YEAR_COLUMN_LENGTH", 1818, "YEAR(%lu) column type is deprecated. Creating YEAR(4) column instead." },
+{ "ER_NOT_VALID_PASSWORD", 1819, "Your password does not satisfy the current policy requirements" },
+{ "ER_MUST_CHANGE_PASSWORD", 1820, "You must SET PASSWORD before executing this statement" },
+{ "ER_FK_NO_INDEX_CHILD", 1821, "Failed to add the foreign key constaint. Missing index for constraint \'%s\' in the foreign table \'%s\'" },
+{ "ER_FK_NO_INDEX_PARENT", 1822, "Failed to add the foreign key constaint. Missing index for constraint \'%s\' in the referenced table \'%s\'" },
+{ "ER_FK_FAIL_ADD_SYSTEM", 1823, "Failed to add the foreign key constraint \'%s\' to system tables" },
+{ "ER_FK_CANNOT_OPEN_PARENT", 1824, "Failed to open the referenced table \'%s\'" },
+{ "ER_FK_INCORRECT_OPTION", 1825, "Failed to add the foreign key constraint on table \'%s\'. Incorrect options in FOREIGN KEY constraint \'%s\'" },
+{ "ER_FK_DUP_NAME", 1826, "Duplicate foreign key constraint name \'%s\'" },
+{ "ER_PASSWORD_FORMAT", 1827, "The password hash doesn\'t have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function." },
+{ "ER_FK_COLUMN_CANNOT_DROP", 1828, "Cannot drop column \'%-.192s\': needed in a foreign key constraint \'%-.192s\'" },
+{ "ER_FK_COLUMN_CANNOT_DROP_CHILD", 1829, "Cannot drop column \'%-.192s\': needed in a foreign key constraint \'%-.192s\' of table \'%-.192s\'" },
+{ "ER_FK_COLUMN_NOT_NULL", 1830, "Column \'%-.192s\' cannot be NOT NULL: needed in a foreign key constraint \'%-.192s\' SET NULL" },
+{ "ER_DUP_INDEX", 1831, "Duplicate index \'%-.64s\' defined on the table \'%-.64s.%-.64s\'. This is deprecated and will be disallowed in a future release." },
+{ "ER_FK_COLUMN_CANNOT_CHANGE", 1832, "Cannot change column \'%-.192s\': used in a foreign key constraint \'%-.192s\'" },
+{ "ER_FK_COLUMN_CANNOT_CHANGE_CHILD", 1833, "Cannot change column \'%-.192s\': used in a foreign key constraint \'%-.192s\' of table \'%-.192s\'" },
+{ "ER_FK_CANNOT_DELETE_PARENT", 1834, "Cannot delete rows from table which is parent in a foreign key constraint \'%-.192s\' of table \'%-.192s\'" },
+{ "ER_MALFORMED_PACKET", 1835, "Malformed communication packet." },
+{ "ER_READ_ONLY_MODE", 1836, "Running in read-only mode" },
+{ "ER_GTID_NEXT_TYPE_UNDEFINED_GROUP", 1837, "When @@SESSION.GTID_NEXT is set to a GTID, you must explicitly set it to a different value after a COMMIT or ROLLBACK. Please check GTID_NEXT variable manual page for detailed explanation. Current @@SESSION.GTID_NEXT is \'%s\'." },
+{ "ER_VARIABLE_NOT_SETTABLE_IN_SP", 1838, "The system variable %.200s cannot be set in stored procedures." },
+{ "ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF", 1839, "@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON." },
+{ "ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY", 1840, "@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty." },
+{ "ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY", 1841, "@@GLOBAL.GTID_PURGED can only be set when there are no ongoing transactions (not even in other clients)." },
+{ "ER_GTID_PURGED_WAS_CHANGED", 1842, "@@GLOBAL.GTID_PURGED was changed from \'%s\' to \'%s\'." },
+{ "ER_GTID_EXECUTED_WAS_CHANGED", 1843, "@@GLOBAL.GTID_EXECUTED was changed from \'%s\' to \'%s\'." },
+{ "ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES", 1844, "Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT, and both replicated and non replicated tables are written to." },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED", 1845, "%s is not supported for this operation. Try %s." },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON", 1846, "%s is not supported. Reason: %s. Try %s." },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY", 1847, "COPY algorithm requires a lock" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION", 1848, "Partition specific operations do not yet support LOCK/ALGORITHM" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME", 1849, "Columns participating in a foreign key are renamed" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE", 1850, "Cannot change column type INPLACE" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK", 1851, "Adding foreign keys needs foreign_key_checks=OFF" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_IGNORE", 1852, "Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK", 1853, "Dropping a primary key is not allowed without also adding a new primary key" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC", 1854, "Adding an auto-increment column requires a lock" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS", 1855, "Cannot replace hidden FTS_DOC_ID with a user-visible one" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS", 1856, "Cannot drop or rename FTS_DOC_ID" },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS", 1857, "Fulltext index creation requires a lock" },
+{ "ER_SQL_SLAVE_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE", 1858, "sql_slave_skip_counter can not be set when the server is running with @@GLOBAL.GTID_MODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction" },
+{ "ER_DUP_UNKNOWN_IN_INDEX", 1859, "Duplicate entry for key \'%-.192s\'" },
+{ "ER_IDENT_CAUSES_TOO_LONG_PATH", 1860, "Long database name and identifier for object resulted in path length exceeding %d characters. Path: \'%s\'." },
+{ "ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL", 1861, "cannot silently convert NULL values, as required in this SQL_MODE" },
+{ "ER_MUST_CHANGE_PASSWORD_LOGIN", 1862, "Your password has expired. To log in you must change it using a client that supports expired passwords." },
+{ "ER_ROW_IN_WRONG_PARTITION", 1863, "Found a row in wrong partition %s" },
+{ "ER_MTS_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX", 1864, "Cannot schedule event %s, relay-log name %s, position %s to Worker thread because its size %lu exceeds %lu of slave_pending_jobs_size_max." },
+{ "ER_INNODB_NO_FT_USES_PARSER", 1865, "Cannot CREATE FULLTEXT INDEX WITH PARSER on InnoDB table" },
+{ "ER_BINLOG_LOGICAL_CORRUPTION", 1866, "The binary log file \'%s\' is logically corrupted: %s" },
+{ "ER_WARN_PURGE_LOG_IN_USE", 1867, "file %s was not purged because it was being read by %d thread(s), purged only %d out of %d files." },
+{ "ER_WARN_PURGE_LOG_IS_ACTIVE", 1868, "file %s was not purged because it is the active log file." },
+{ "ER_AUTO_INCREMENT_CONFLICT", 1869, "Auto-increment value in UPDATE conflicts with internally generated values" },
+{ "WARN_ON_BLOCKHOLE_IN_RBR", 1870, "Row events are not logged for %s statements that modify BLACKHOLE tables in row format. Table(s): \'%-.192s\'" },
+{ "ER_SLAVE_MI_INIT_REPOSITORY", 1871, "Slave failed to initialize master info structure from the repository" },
+{ "ER_SLAVE_RLI_INIT_REPOSITORY", 1872, "Slave failed to initialize relay log info structure from the repository" },
+{ "ER_ACCESS_DENIED_CHANGE_USER_ERROR", 1873, "Access denied trying to change to user \'%-.48s\'@\'%-.64s\' (using password: %s). Disconnecting." },
+{ "ER_INNODB_READ_ONLY", 1874, "InnoDB is in read only mode." },
+{ "ER_STOP_SLAVE_SQL_THREAD_TIMEOUT", 1875, "STOP SLAVE command execution is incomplete: Slave SQL thread got the stop signal, thread is busy, SQL thread will stop once the current task is complete." },
+{ "ER_STOP_SLAVE_IO_THREAD_TIMEOUT", 1876, "STOP SLAVE command execution is incomplete: Slave IO thread got the stop signal, thread is busy, IO thread will stop once the current task is complete." },
+{ "ER_TABLE_CORRUPT", 1877, "Operation cannot be performed. The table \'%-.64s.%-.64s\' is missing, corrupt or contains bad data." },
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysqld_error.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysqld_error.h
new file mode 100644
index 000000000..25a45ea83
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysqld_error.h
@@ -0,0 +1,882 @@
+/* Autogenerated file, please don't edit */
+
+#define ER_ERROR_FIRST 1000
+#define ER_HASHCHK 1000
+#define ER_NISAMCHK 1001
+#define ER_NO 1002
+#define ER_YES 1003
+#define ER_CANT_CREATE_FILE 1004
+#define ER_CANT_CREATE_TABLE 1005
+#define ER_CANT_CREATE_DB 1006
+#define ER_DB_CREATE_EXISTS 1007
+#define ER_DB_DROP_EXISTS 1008
+#define ER_DB_DROP_DELETE 1009
+#define ER_DB_DROP_RMDIR 1010
+#define ER_CANT_DELETE_FILE 1011
+#define ER_CANT_FIND_SYSTEM_REC 1012
+#define ER_CANT_GET_STAT 1013
+#define ER_CANT_GET_WD 1014
+#define ER_CANT_LOCK 1015
+#define ER_CANT_OPEN_FILE 1016
+#define ER_FILE_NOT_FOUND 1017
+#define ER_CANT_READ_DIR 1018
+#define ER_CANT_SET_WD 1019
+#define ER_CHECKREAD 1020
+#define ER_DISK_FULL 1021
+#define ER_DUP_KEY 1022
+#define ER_ERROR_ON_CLOSE 1023
+#define ER_ERROR_ON_READ 1024
+#define ER_ERROR_ON_RENAME 1025
+#define ER_ERROR_ON_WRITE 1026
+#define ER_FILE_USED 1027
+#define ER_FILSORT_ABORT 1028
+#define ER_FORM_NOT_FOUND 1029
+#define ER_GET_ERRNO 1030
+#define ER_ILLEGAL_HA 1031
+#define ER_KEY_NOT_FOUND 1032
+#define ER_NOT_FORM_FILE 1033
+#define ER_NOT_KEYFILE 1034
+#define ER_OLD_KEYFILE 1035
+#define ER_OPEN_AS_READONLY 1036
+#define ER_OUTOFMEMORY 1037
+#define ER_OUT_OF_SORTMEMORY 1038
+#define ER_UNEXPECTED_EOF 1039
+#define ER_CON_COUNT_ERROR 1040
+#define ER_OUT_OF_RESOURCES 1041
+#define ER_BAD_HOST_ERROR 1042
+#define ER_HANDSHAKE_ERROR 1043
+#define ER_DBACCESS_DENIED_ERROR 1044
+#define ER_ACCESS_DENIED_ERROR 1045
+#define ER_NO_DB_ERROR 1046
+#define ER_UNKNOWN_COM_ERROR 1047
+#define ER_BAD_NULL_ERROR 1048
+#define ER_BAD_DB_ERROR 1049
+#define ER_TABLE_EXISTS_ERROR 1050
+#define ER_BAD_TABLE_ERROR 1051
+#define ER_NON_UNIQ_ERROR 1052
+#define ER_SERVER_SHUTDOWN 1053
+#define ER_BAD_FIELD_ERROR 1054
+#define ER_WRONG_FIELD_WITH_GROUP 1055
+#define ER_WRONG_GROUP_FIELD 1056
+#define ER_WRONG_SUM_SELECT 1057
+#define ER_WRONG_VALUE_COUNT 1058
+#define ER_TOO_LONG_IDENT 1059
+#define ER_DUP_FIELDNAME 1060
+#define ER_DUP_KEYNAME 1061
+#define ER_DUP_ENTRY 1062
+#define ER_WRONG_FIELD_SPEC 1063
+#define ER_PARSE_ERROR 1064
+#define ER_EMPTY_QUERY 1065
+#define ER_NONUNIQ_TABLE 1066
+#define ER_INVALID_DEFAULT 1067
+#define ER_MULTIPLE_PRI_KEY 1068
+#define ER_TOO_MANY_KEYS 1069
+#define ER_TOO_MANY_KEY_PARTS 1070
+#define ER_TOO_LONG_KEY 1071
+#define ER_KEY_COLUMN_DOES_NOT_EXITS 1072
+#define ER_BLOB_USED_AS_KEY 1073
+#define ER_TOO_BIG_FIELDLENGTH 1074
+#define ER_WRONG_AUTO_KEY 1075
+#define ER_READY 1076
+#define ER_NORMAL_SHUTDOWN 1077
+#define ER_GOT_SIGNAL 1078
+#define ER_SHUTDOWN_COMPLETE 1079
+#define ER_FORCING_CLOSE 1080
+#define ER_IPSOCK_ERROR 1081
+#define ER_NO_SUCH_INDEX 1082
+#define ER_WRONG_FIELD_TERMINATORS 1083
+#define ER_BLOBS_AND_NO_TERMINATED 1084
+#define ER_TEXTFILE_NOT_READABLE 1085
+#define ER_FILE_EXISTS_ERROR 1086
+#define ER_LOAD_INFO 1087
+#define ER_ALTER_INFO 1088
+#define ER_WRONG_SUB_KEY 1089
+#define ER_CANT_REMOVE_ALL_FIELDS 1090
+#define ER_CANT_DROP_FIELD_OR_KEY 1091
+#define ER_INSERT_INFO 1092
+#define ER_UPDATE_TABLE_USED 1093
+#define ER_NO_SUCH_THREAD 1094
+#define ER_KILL_DENIED_ERROR 1095
+#define ER_NO_TABLES_USED 1096
+#define ER_TOO_BIG_SET 1097
+#define ER_NO_UNIQUE_LOGFILE 1098
+#define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099
+#define ER_TABLE_NOT_LOCKED 1100
+#define ER_BLOB_CANT_HAVE_DEFAULT 1101
+#define ER_WRONG_DB_NAME 1102
+#define ER_WRONG_TABLE_NAME 1103
+#define ER_TOO_BIG_SELECT 1104
+#define ER_UNKNOWN_ERROR 1105
+#define ER_UNKNOWN_PROCEDURE 1106
+#define ER_WRONG_PARAMCOUNT_TO_PROCEDURE 1107
+#define ER_WRONG_PARAMETERS_TO_PROCEDURE 1108
+#define ER_UNKNOWN_TABLE 1109
+#define ER_FIELD_SPECIFIED_TWICE 1110
+#define ER_INVALID_GROUP_FUNC_USE 1111
+#define ER_UNSUPPORTED_EXTENSION 1112
+#define ER_TABLE_MUST_HAVE_COLUMNS 1113
+#define ER_RECORD_FILE_FULL 1114
+#define ER_UNKNOWN_CHARACTER_SET 1115
+#define ER_TOO_MANY_TABLES 1116
+#define ER_TOO_MANY_FIELDS 1117
+#define ER_TOO_BIG_ROWSIZE 1118
+#define ER_STACK_OVERRUN 1119
+#define ER_WRONG_OUTER_JOIN 1120
+#define ER_NULL_COLUMN_IN_INDEX 1121
+#define ER_CANT_FIND_UDF 1122
+#define ER_CANT_INITIALIZE_UDF 1123
+#define ER_UDF_NO_PATHS 1124
+#define ER_UDF_EXISTS 1125
+#define ER_CANT_OPEN_LIBRARY 1126
+#define ER_CANT_FIND_DL_ENTRY 1127
+#define ER_FUNCTION_NOT_DEFINED 1128
+#define ER_HOST_IS_BLOCKED 1129
+#define ER_HOST_NOT_PRIVILEGED 1130
+#define ER_PASSWORD_ANONYMOUS_USER 1131
+#define ER_PASSWORD_NOT_ALLOWED 1132
+#define ER_PASSWORD_NO_MATCH 1133
+#define ER_UPDATE_INFO 1134
+#define ER_CANT_CREATE_THREAD 1135
+#define ER_WRONG_VALUE_COUNT_ON_ROW 1136
+#define ER_CANT_REOPEN_TABLE 1137
+#define ER_INVALID_USE_OF_NULL 1138
+#define ER_REGEXP_ERROR 1139
+#define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140
+#define ER_NONEXISTING_GRANT 1141
+#define ER_TABLEACCESS_DENIED_ERROR 1142
+#define ER_COLUMNACCESS_DENIED_ERROR 1143
+#define ER_ILLEGAL_GRANT_FOR_TABLE 1144
+#define ER_GRANT_WRONG_HOST_OR_USER 1145
+#define ER_NO_SUCH_TABLE 1146
+#define ER_NONEXISTING_TABLE_GRANT 1147
+#define ER_NOT_ALLOWED_COMMAND 1148
+#define ER_SYNTAX_ERROR 1149
+#define ER_DELAYED_CANT_CHANGE_LOCK 1150
+#define ER_TOO_MANY_DELAYED_THREADS 1151
+#define ER_ABORTING_CONNECTION 1152
+#define ER_NET_PACKET_TOO_LARGE 1153
+#define ER_NET_READ_ERROR_FROM_PIPE 1154
+#define ER_NET_FCNTL_ERROR 1155
+#define ER_NET_PACKETS_OUT_OF_ORDER 1156
+#define ER_NET_UNCOMPRESS_ERROR 1157
+#define ER_NET_READ_ERROR 1158
+#define ER_NET_READ_INTERRUPTED 1159
+#define ER_NET_ERROR_ON_WRITE 1160
+#define ER_NET_WRITE_INTERRUPTED 1161
+#define ER_TOO_LONG_STRING 1162
+#define ER_TABLE_CANT_HANDLE_BLOB 1163
+#define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164
+#define ER_DELAYED_INSERT_TABLE_LOCKED 1165
+#define ER_WRONG_COLUMN_NAME 1166
+#define ER_WRONG_KEY_COLUMN 1167
+#define ER_WRONG_MRG_TABLE 1168
+#define ER_DUP_UNIQUE 1169
+#define ER_BLOB_KEY_WITHOUT_LENGTH 1170
+#define ER_PRIMARY_CANT_HAVE_NULL 1171
+#define ER_TOO_MANY_ROWS 1172
+#define ER_REQUIRES_PRIMARY_KEY 1173
+#define ER_NO_RAID_COMPILED 1174
+#define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175
+#define ER_KEY_DOES_NOT_EXITS 1176
+#define ER_CHECK_NO_SUCH_TABLE 1177
+#define ER_CHECK_NOT_IMPLEMENTED 1178
+#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179
+#define ER_ERROR_DURING_COMMIT 1180
+#define ER_ERROR_DURING_ROLLBACK 1181
+#define ER_ERROR_DURING_FLUSH_LOGS 1182
+#define ER_ERROR_DURING_CHECKPOINT 1183
+#define ER_NEW_ABORTING_CONNECTION 1184
+#define ER_DUMP_NOT_IMPLEMENTED 1185
+#define ER_FLUSH_MASTER_BINLOG_CLOSED 1186
+#define ER_INDEX_REBUILD 1187
+#define ER_MASTER 1188
+#define ER_MASTER_NET_READ 1189
+#define ER_MASTER_NET_WRITE 1190
+#define ER_FT_MATCHING_KEY_NOT_FOUND 1191
+#define ER_LOCK_OR_ACTIVE_TRANSACTION 1192
+#define ER_UNKNOWN_SYSTEM_VARIABLE 1193
+#define ER_CRASHED_ON_USAGE 1194
+#define ER_CRASHED_ON_REPAIR 1195
+#define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196
+#define ER_TRANS_CACHE_FULL 1197
+#define ER_SLAVE_MUST_STOP 1198
+#define ER_SLAVE_NOT_RUNNING 1199
+#define ER_BAD_SLAVE 1200
+#define ER_MASTER_INFO 1201
+#define ER_SLAVE_THREAD 1202
+#define ER_TOO_MANY_USER_CONNECTIONS 1203
+#define ER_SET_CONSTANTS_ONLY 1204
+#define ER_LOCK_WAIT_TIMEOUT 1205
+#define ER_LOCK_TABLE_FULL 1206
+#define ER_READ_ONLY_TRANSACTION 1207
+#define ER_DROP_DB_WITH_READ_LOCK 1208
+#define ER_CREATE_DB_WITH_READ_LOCK 1209
+#define ER_WRONG_ARGUMENTS 1210
+#define ER_NO_PERMISSION_TO_CREATE_USER 1211
+#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212
+#define ER_LOCK_DEADLOCK 1213
+#define ER_TABLE_CANT_HANDLE_FT 1214
+#define ER_CANNOT_ADD_FOREIGN 1215
+#define ER_NO_REFERENCED_ROW 1216
+#define ER_ROW_IS_REFERENCED 1217
+#define ER_CONNECT_TO_MASTER 1218
+#define ER_QUERY_ON_MASTER 1219
+#define ER_ERROR_WHEN_EXECUTING_COMMAND 1220
+#define ER_WRONG_USAGE 1221
+#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222
+#define ER_CANT_UPDATE_WITH_READLOCK 1223
+#define ER_MIXING_NOT_ALLOWED 1224
+#define ER_DUP_ARGUMENT 1225
+#define ER_USER_LIMIT_REACHED 1226
+#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
+#define ER_LOCAL_VARIABLE 1228
+#define ER_GLOBAL_VARIABLE 1229
+#define ER_NO_DEFAULT 1230
+#define ER_WRONG_VALUE_FOR_VAR 1231
+#define ER_WRONG_TYPE_FOR_VAR 1232
+#define ER_VAR_CANT_BE_READ 1233
+#define ER_CANT_USE_OPTION_HERE 1234
+#define ER_NOT_SUPPORTED_YET 1235
+#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
+#define ER_SLAVE_IGNORED_TABLE 1237
+#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238
+#define ER_WRONG_FK_DEF 1239
+#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240
+#define ER_OPERAND_COLUMNS 1241
+#define ER_SUBQUERY_NO_1_ROW 1242
+#define ER_UNKNOWN_STMT_HANDLER 1243
+#define ER_CORRUPT_HELP_DB 1244
+#define ER_CYCLIC_REFERENCE 1245
+#define ER_AUTO_CONVERT 1246
+#define ER_ILLEGAL_REFERENCE 1247
+#define ER_DERIVED_MUST_HAVE_ALIAS 1248
+#define ER_SELECT_REDUCED 1249
+#define ER_TABLENAME_NOT_ALLOWED_HERE 1250
+#define ER_NOT_SUPPORTED_AUTH_MODE 1251
+#define ER_SPATIAL_CANT_HAVE_NULL 1252
+#define ER_COLLATION_CHARSET_MISMATCH 1253
+#define ER_SLAVE_WAS_RUNNING 1254
+#define ER_SLAVE_WAS_NOT_RUNNING 1255
+#define ER_TOO_BIG_FOR_UNCOMPRESS 1256
+#define ER_ZLIB_Z_MEM_ERROR 1257
+#define ER_ZLIB_Z_BUF_ERROR 1258
+#define ER_ZLIB_Z_DATA_ERROR 1259
+#define ER_CUT_VALUE_GROUP_CONCAT 1260
+#define ER_WARN_TOO_FEW_RECORDS 1261
+#define ER_WARN_TOO_MANY_RECORDS 1262
+#define ER_WARN_NULL_TO_NOTNULL 1263
+#define ER_WARN_DATA_OUT_OF_RANGE 1264
+#define WARN_DATA_TRUNCATED 1265
+#define ER_WARN_USING_OTHER_HANDLER 1266
+#define ER_CANT_AGGREGATE_2COLLATIONS 1267
+#define ER_DROP_USER 1268
+#define ER_REVOKE_GRANTS 1269
+#define ER_CANT_AGGREGATE_3COLLATIONS 1270
+#define ER_CANT_AGGREGATE_NCOLLATIONS 1271
+#define ER_VARIABLE_IS_NOT_STRUCT 1272
+#define ER_UNKNOWN_COLLATION 1273
+#define ER_SLAVE_IGNORED_SSL_PARAMS 1274
+#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275
+#define ER_WARN_FIELD_RESOLVED 1276
+#define ER_BAD_SLAVE_UNTIL_COND 1277
+#define ER_MISSING_SKIP_SLAVE 1278
+#define ER_UNTIL_COND_IGNORED 1279
+#define ER_WRONG_NAME_FOR_INDEX 1280
+#define ER_WRONG_NAME_FOR_CATALOG 1281
+#define ER_WARN_QC_RESIZE 1282
+#define ER_BAD_FT_COLUMN 1283
+#define ER_UNKNOWN_KEY_CACHE 1284
+#define ER_WARN_HOSTNAME_WONT_WORK 1285
+#define ER_UNKNOWN_STORAGE_ENGINE 1286
+#define ER_WARN_DEPRECATED_SYNTAX 1287
+#define ER_NON_UPDATABLE_TABLE 1288
+#define ER_FEATURE_DISABLED 1289
+#define ER_OPTION_PREVENTS_STATEMENT 1290
+#define ER_DUPLICATED_VALUE_IN_TYPE 1291
+#define ER_TRUNCATED_WRONG_VALUE 1292
+#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293
+#define ER_INVALID_ON_UPDATE 1294
+#define ER_UNSUPPORTED_PS 1295
+#define ER_GET_ERRMSG 1296
+#define ER_GET_TEMPORARY_ERRMSG 1297
+#define ER_UNKNOWN_TIME_ZONE 1298
+#define ER_WARN_INVALID_TIMESTAMP 1299
+#define ER_INVALID_CHARACTER_STRING 1300
+#define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301
+#define ER_CONFLICTING_DECLARATIONS 1302
+#define ER_SP_NO_RECURSIVE_CREATE 1303
+#define ER_SP_ALREADY_EXISTS 1304
+#define ER_SP_DOES_NOT_EXIST 1305
+#define ER_SP_DROP_FAILED 1306
+#define ER_SP_STORE_FAILED 1307
+#define ER_SP_LILABEL_MISMATCH 1308
+#define ER_SP_LABEL_REDEFINE 1309
+#define ER_SP_LABEL_MISMATCH 1310
+#define ER_SP_UNINIT_VAR 1311
+#define ER_SP_BADSELECT 1312
+#define ER_SP_BADRETURN 1313
+#define ER_SP_BADSTATEMENT 1314
+#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1315
+#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1316
+#define ER_QUERY_INTERRUPTED 1317
+#define ER_SP_WRONG_NO_OF_ARGS 1318
+#define ER_SP_COND_MISMATCH 1319
+#define ER_SP_NORETURN 1320
+#define ER_SP_NORETURNEND 1321
+#define ER_SP_BAD_CURSOR_QUERY 1322
+#define ER_SP_BAD_CURSOR_SELECT 1323
+#define ER_SP_CURSOR_MISMATCH 1324
+#define ER_SP_CURSOR_ALREADY_OPEN 1325
+#define ER_SP_CURSOR_NOT_OPEN 1326
+#define ER_SP_UNDECLARED_VAR 1327
+#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1328
+#define ER_SP_FETCH_NO_DATA 1329
+#define ER_SP_DUP_PARAM 1330
+#define ER_SP_DUP_VAR 1331
+#define ER_SP_DUP_COND 1332
+#define ER_SP_DUP_CURS 1333
+#define ER_SP_CANT_ALTER 1334
+#define ER_SP_SUBSELECT_NYI 1335
+#define ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 1336
+#define ER_SP_VARCOND_AFTER_CURSHNDLR 1337
+#define ER_SP_CURSOR_AFTER_HANDLER 1338
+#define ER_SP_CASE_NOT_FOUND 1339
+#define ER_FPARSER_TOO_BIG_FILE 1340
+#define ER_FPARSER_BAD_HEADER 1341
+#define ER_FPARSER_EOF_IN_COMMENT 1342
+#define ER_FPARSER_ERROR_IN_PARAMETER 1343
+#define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1344
+#define ER_VIEW_NO_EXPLAIN 1345
+#define ER_FRM_UNKNOWN_TYPE 1346
+#define ER_WRONG_OBJECT 1347
+#define ER_NONUPDATEABLE_COLUMN 1348
+#define ER_VIEW_SELECT_DERIVED 1349
+#define ER_VIEW_SELECT_CLAUSE 1350
+#define ER_VIEW_SELECT_VARIABLE 1351
+#define ER_VIEW_SELECT_TMPTABLE 1352
+#define ER_VIEW_WRONG_LIST 1353
+#define ER_WARN_VIEW_MERGE 1354
+#define ER_WARN_VIEW_WITHOUT_KEY 1355
+#define ER_VIEW_INVALID 1356
+#define ER_SP_NO_DROP_SP 1357
+#define ER_SP_GOTO_IN_HNDLR 1358
+#define ER_TRG_ALREADY_EXISTS 1359
+#define ER_TRG_DOES_NOT_EXIST 1360
+#define ER_TRG_ON_VIEW_OR_TEMP_TABLE 1361
+#define ER_TRG_CANT_CHANGE_ROW 1362
+#define ER_TRG_NO_SUCH_ROW_IN_TRG 1363
+#define ER_NO_DEFAULT_FOR_FIELD 1364
+#define ER_DIVISION_BY_ZERO 1365
+#define ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 1366
+#define ER_ILLEGAL_VALUE_FOR_TYPE 1367
+#define ER_VIEW_NONUPD_CHECK 1368
+#define ER_VIEW_CHECK_FAILED 1369
+#define ER_PROCACCESS_DENIED_ERROR 1370
+#define ER_RELAY_LOG_FAIL 1371
+#define ER_PASSWD_LENGTH 1372
+#define ER_UNKNOWN_TARGET_BINLOG 1373
+#define ER_IO_ERR_LOG_INDEX_READ 1374
+#define ER_BINLOG_PURGE_PROHIBITED 1375
+#define ER_FSEEK_FAIL 1376
+#define ER_BINLOG_PURGE_FATAL_ERR 1377
+#define ER_LOG_IN_USE 1378
+#define ER_LOG_PURGE_UNKNOWN_ERR 1379
+#define ER_RELAY_LOG_INIT 1380
+#define ER_NO_BINARY_LOGGING 1381
+#define ER_RESERVED_SYNTAX 1382
+#define ER_WSAS_FAILED 1383
+#define ER_DIFF_GROUPS_PROC 1384
+#define ER_NO_GROUP_FOR_PROC 1385
+#define ER_ORDER_WITH_PROC 1386
+#define ER_LOGGING_PROHIBIT_CHANGING_OF 1387
+#define ER_NO_FILE_MAPPING 1388
+#define ER_WRONG_MAGIC 1389
+#define ER_PS_MANY_PARAM 1390
+#define ER_KEY_PART_0 1391
+#define ER_VIEW_CHECKSUM 1392
+#define ER_VIEW_MULTIUPDATE 1393
+#define ER_VIEW_NO_INSERT_FIELD_LIST 1394
+#define ER_VIEW_DELETE_MERGE_VIEW 1395
+#define ER_CANNOT_USER 1396
+#define ER_XAER_NOTA 1397
+#define ER_XAER_INVAL 1398
+#define ER_XAER_RMFAIL 1399
+#define ER_XAER_OUTSIDE 1400
+#define ER_XAER_RMERR 1401
+#define ER_XA_RBROLLBACK 1402
+#define ER_NONEXISTING_PROC_GRANT 1403
+#define ER_PROC_AUTO_GRANT_FAIL 1404
+#define ER_PROC_AUTO_REVOKE_FAIL 1405
+#define ER_DATA_TOO_LONG 1406
+#define ER_SP_BAD_SQLSTATE 1407
+#define ER_STARTUP 1408
+#define ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR 1409
+#define ER_CANT_CREATE_USER_WITH_GRANT 1410
+#define ER_WRONG_VALUE_FOR_TYPE 1411
+#define ER_TABLE_DEF_CHANGED 1412
+#define ER_SP_DUP_HANDLER 1413
+#define ER_SP_NOT_VAR_ARG 1414
+#define ER_SP_NO_RETSET 1415
+#define ER_CANT_CREATE_GEOMETRY_OBJECT 1416
+#define ER_FAILED_ROUTINE_BREAK_BINLOG 1417
+#define ER_BINLOG_UNSAFE_ROUTINE 1418
+#define ER_BINLOG_CREATE_ROUTINE_NEED_SUPER 1419
+#define ER_EXEC_STMT_WITH_OPEN_CURSOR 1420
+#define ER_STMT_HAS_NO_OPEN_CURSOR 1421
+#define ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG 1422
+#define ER_NO_DEFAULT_FOR_VIEW_FIELD 1423
+#define ER_SP_NO_RECURSION 1424
+#define ER_TOO_BIG_SCALE 1425
+#define ER_TOO_BIG_PRECISION 1426
+#define ER_M_BIGGER_THAN_D 1427
+#define ER_WRONG_LOCK_OF_SYSTEM_TABLE 1428
+#define ER_CONNECT_TO_FOREIGN_DATA_SOURCE 1429
+#define ER_QUERY_ON_FOREIGN_DATA_SOURCE 1430
+#define ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST 1431
+#define ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE 1432
+#define ER_FOREIGN_DATA_STRING_INVALID 1433
+#define ER_CANT_CREATE_FEDERATED_TABLE 1434
+#define ER_TRG_IN_WRONG_SCHEMA 1435
+#define ER_STACK_OVERRUN_NEED_MORE 1436
+#define ER_TOO_LONG_BODY 1437
+#define ER_WARN_CANT_DROP_DEFAULT_KEYCACHE 1438
+#define ER_TOO_BIG_DISPLAYWIDTH 1439
+#define ER_XAER_DUPID 1440
+#define ER_DATETIME_FUNCTION_OVERFLOW 1441
+#define ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG 1442
+#define ER_VIEW_PREVENT_UPDATE 1443
+#define ER_PS_NO_RECURSION 1444
+#define ER_SP_CANT_SET_AUTOCOMMIT 1445
+#define ER_MALFORMED_DEFINER 1446
+#define ER_VIEW_FRM_NO_USER 1447
+#define ER_VIEW_OTHER_USER 1448
+#define ER_NO_SUCH_USER 1449
+#define ER_FORBID_SCHEMA_CHANGE 1450
+#define ER_ROW_IS_REFERENCED_2 1451
+#define ER_NO_REFERENCED_ROW_2 1452
+#define ER_SP_BAD_VAR_SHADOW 1453
+#define ER_TRG_NO_DEFINER 1454
+#define ER_OLD_FILE_FORMAT 1455
+#define ER_SP_RECURSION_LIMIT 1456
+#define ER_SP_PROC_TABLE_CORRUPT 1457
+#define ER_SP_WRONG_NAME 1458
+#define ER_TABLE_NEEDS_UPGRADE 1459
+#define ER_SP_NO_AGGREGATE 1460
+#define ER_MAX_PREPARED_STMT_COUNT_REACHED 1461
+#define ER_VIEW_RECURSIVE 1462
+#define ER_NON_GROUPING_FIELD_USED 1463
+#define ER_TABLE_CANT_HANDLE_SPKEYS 1464
+#define ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA 1465
+#define ER_REMOVED_SPACES 1466
+#define ER_AUTOINC_READ_FAILED 1467
+#define ER_USERNAME 1468
+#define ER_HOSTNAME 1469
+#define ER_WRONG_STRING_LENGTH 1470
+#define ER_NON_INSERTABLE_TABLE 1471
+#define ER_ADMIN_WRONG_MRG_TABLE 1472
+#define ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT 1473
+#define ER_NAME_BECOMES_EMPTY 1474
+#define ER_AMBIGUOUS_FIELD_TERM 1475
+#define ER_FOREIGN_SERVER_EXISTS 1476
+#define ER_FOREIGN_SERVER_DOESNT_EXIST 1477
+#define ER_ILLEGAL_HA_CREATE_OPTION 1478
+#define ER_PARTITION_REQUIRES_VALUES_ERROR 1479
+#define ER_PARTITION_WRONG_VALUES_ERROR 1480
+#define ER_PARTITION_MAXVALUE_ERROR 1481
+#define ER_PARTITION_SUBPARTITION_ERROR 1482
+#define ER_PARTITION_SUBPART_MIX_ERROR 1483
+#define ER_PARTITION_WRONG_NO_PART_ERROR 1484
+#define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485
+#define ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR 1486
+#define ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487
+#define ER_FIELD_NOT_FOUND_PART_ERROR 1488
+#define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489
+#define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490
+#define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491
+#define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492
+#define ER_RANGE_NOT_INCREASING_ERROR 1493
+#define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494
+#define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495
+#define ER_PARTITION_ENTRY_ERROR 1496
+#define ER_MIX_HANDLER_ERROR 1497
+#define ER_PARTITION_NOT_DEFINED_ERROR 1498
+#define ER_TOO_MANY_PARTITIONS_ERROR 1499
+#define ER_SUBPARTITION_ERROR 1500
+#define ER_CANT_CREATE_HANDLER_FILE 1501
+#define ER_BLOB_FIELD_IN_PART_FUNC_ERROR 1502
+#define ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF 1503
+#define ER_NO_PARTS_ERROR 1504
+#define ER_PARTITION_MGMT_ON_NONPARTITIONED 1505
+#define ER_FOREIGN_KEY_ON_PARTITIONED 1506
+#define ER_DROP_PARTITION_NON_EXISTENT 1507
+#define ER_DROP_LAST_PARTITION 1508
+#define ER_COALESCE_ONLY_ON_HASH_PARTITION 1509
+#define ER_REORG_HASH_ONLY_ON_SAME_NO 1510
+#define ER_REORG_NO_PARAM_ERROR 1511
+#define ER_ONLY_ON_RANGE_LIST_PARTITION 1512
+#define ER_ADD_PARTITION_SUBPART_ERROR 1513
+#define ER_ADD_PARTITION_NO_NEW_PARTITION 1514
+#define ER_COALESCE_PARTITION_NO_PARTITION 1515
+#define ER_REORG_PARTITION_NOT_EXIST 1516
+#define ER_SAME_NAME_PARTITION 1517
+#define ER_NO_BINLOG_ERROR 1518
+#define ER_CONSECUTIVE_REORG_PARTITIONS 1519
+#define ER_REORG_OUTSIDE_RANGE 1520
+#define ER_PARTITION_FUNCTION_FAILURE 1521
+#define ER_PART_STATE_ERROR 1522
+#define ER_LIMITED_PART_RANGE 1523
+#define ER_PLUGIN_IS_NOT_LOADED 1524
+#define ER_WRONG_VALUE 1525
+#define ER_NO_PARTITION_FOR_GIVEN_VALUE 1526
+#define ER_FILEGROUP_OPTION_ONLY_ONCE 1527
+#define ER_CREATE_FILEGROUP_FAILED 1528
+#define ER_DROP_FILEGROUP_FAILED 1529
+#define ER_TABLESPACE_AUTO_EXTEND_ERROR 1530
+#define ER_WRONG_SIZE_NUMBER 1531
+#define ER_SIZE_OVERFLOW_ERROR 1532
+#define ER_ALTER_FILEGROUP_FAILED 1533
+#define ER_BINLOG_ROW_LOGGING_FAILED 1534
+#define ER_BINLOG_ROW_WRONG_TABLE_DEF 1535
+#define ER_BINLOG_ROW_RBR_TO_SBR 1536
+#define ER_EVENT_ALREADY_EXISTS 1537
+#define ER_EVENT_STORE_FAILED 1538
+#define ER_EVENT_DOES_NOT_EXIST 1539
+#define ER_EVENT_CANT_ALTER 1540
+#define ER_EVENT_DROP_FAILED 1541
+#define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542
+#define ER_EVENT_ENDS_BEFORE_STARTS 1543
+#define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544
+#define ER_EVENT_OPEN_TABLE_FAILED 1545
+#define ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546
+#define ER_OBSOLETE_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547
+#define ER_OBSOLETE_CANNOT_LOAD_FROM_TABLE 1548
+#define ER_EVENT_CANNOT_DELETE 1549
+#define ER_EVENT_COMPILE_ERROR 1550
+#define ER_EVENT_SAME_NAME 1551
+#define ER_EVENT_DATA_TOO_LONG 1552
+#define ER_DROP_INDEX_FK 1553
+#define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554
+#define ER_CANT_WRITE_LOCK_LOG_TABLE 1555
+#define ER_CANT_LOCK_LOG_TABLE 1556
+#define ER_FOREIGN_DUPLICATE_KEY_OLD_UNUSED 1557
+#define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558
+#define ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR 1559
+#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT 1560
+#define ER_NDB_CANT_SWITCH_BINLOG_FORMAT 1561
+#define ER_PARTITION_NO_TEMPORARY 1562
+#define ER_PARTITION_CONST_DOMAIN_ERROR 1563
+#define ER_PARTITION_FUNCTION_IS_NOT_ALLOWED 1564
+#define ER_DDL_LOG_ERROR 1565
+#define ER_NULL_IN_VALUES_LESS_THAN 1566
+#define ER_WRONG_PARTITION_NAME 1567
+#define ER_CANT_CHANGE_TX_CHARACTERISTICS 1568
+#define ER_DUP_ENTRY_AUTOINCREMENT_CASE 1569
+#define ER_EVENT_MODIFY_QUEUE_ERROR 1570
+#define ER_EVENT_SET_VAR_ERROR 1571
+#define ER_PARTITION_MERGE_ERROR 1572
+#define ER_CANT_ACTIVATE_LOG 1573
+#define ER_RBR_NOT_AVAILABLE 1574
+#define ER_BASE64_DECODE_ERROR 1575
+#define ER_EVENT_RECURSION_FORBIDDEN 1576
+#define ER_EVENTS_DB_ERROR 1577
+#define ER_ONLY_INTEGERS_ALLOWED 1578
+#define ER_UNSUPORTED_LOG_ENGINE 1579
+#define ER_BAD_LOG_STATEMENT 1580
+#define ER_CANT_RENAME_LOG_TABLE 1581
+#define ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 1582
+#define ER_WRONG_PARAMETERS_TO_NATIVE_FCT 1583
+#define ER_WRONG_PARAMETERS_TO_STORED_FCT 1584
+#define ER_NATIVE_FCT_NAME_COLLISION 1585
+#define ER_DUP_ENTRY_WITH_KEY_NAME 1586
+#define ER_BINLOG_PURGE_EMFILE 1587
+#define ER_EVENT_CANNOT_CREATE_IN_THE_PAST 1588
+#define ER_EVENT_CANNOT_ALTER_IN_THE_PAST 1589
+#define ER_SLAVE_INCIDENT 1590
+#define ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT 1591
+#define ER_BINLOG_UNSAFE_STATEMENT 1592
+#define ER_SLAVE_FATAL_ERROR 1593
+#define ER_SLAVE_RELAY_LOG_READ_FAILURE 1594
+#define ER_SLAVE_RELAY_LOG_WRITE_FAILURE 1595
+#define ER_SLAVE_CREATE_EVENT_FAILURE 1596
+#define ER_SLAVE_MASTER_COM_FAILURE 1597
+#define ER_BINLOG_LOGGING_IMPOSSIBLE 1598
+#define ER_VIEW_NO_CREATION_CTX 1599
+#define ER_VIEW_INVALID_CREATION_CTX 1600
+#define ER_SR_INVALID_CREATION_CTX 1601
+#define ER_TRG_CORRUPTED_FILE 1602
+#define ER_TRG_NO_CREATION_CTX 1603
+#define ER_TRG_INVALID_CREATION_CTX 1604
+#define ER_EVENT_INVALID_CREATION_CTX 1605
+#define ER_TRG_CANT_OPEN_TABLE 1606
+#define ER_CANT_CREATE_SROUTINE 1607
+#define ER_NEVER_USED 1608
+#define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609
+#define ER_SLAVE_CORRUPT_EVENT 1610
+#define ER_LOAD_DATA_INVALID_COLUMN 1611
+#define ER_LOG_PURGE_NO_FILE 1612
+#define ER_XA_RBTIMEOUT 1613
+#define ER_XA_RBDEADLOCK 1614
+#define ER_NEED_REPREPARE 1615
+#define ER_DELAYED_NOT_SUPPORTED 1616
+#define WARN_NO_MASTER_INFO 1617
+#define WARN_OPTION_IGNORED 1618
+#define WARN_PLUGIN_DELETE_BUILTIN 1619
+#define WARN_PLUGIN_BUSY 1620
+#define ER_VARIABLE_IS_READONLY 1621
+#define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622
+#define ER_SLAVE_HEARTBEAT_FAILURE 1623
+#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624
+#define ER_NDB_REPLICATION_SCHEMA_ERROR 1625
+#define ER_CONFLICT_FN_PARSE_ERROR 1626
+#define ER_EXCEPTIONS_WRITE_ERROR 1627
+#define ER_TOO_LONG_TABLE_COMMENT 1628
+#define ER_TOO_LONG_FIELD_COMMENT 1629
+#define ER_FUNC_INEXISTENT_NAME_COLLISION 1630
+#define ER_DATABASE_NAME 1631
+#define ER_TABLE_NAME 1632
+#define ER_PARTITION_NAME 1633
+#define ER_SUBPARTITION_NAME 1634
+#define ER_TEMPORARY_NAME 1635
+#define ER_RENAMED_NAME 1636
+#define ER_TOO_MANY_CONCURRENT_TRXS 1637
+#define WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED 1638
+#define ER_DEBUG_SYNC_TIMEOUT 1639
+#define ER_DEBUG_SYNC_HIT_LIMIT 1640
+#define ER_DUP_SIGNAL_SET 1641
+#define ER_SIGNAL_WARN 1642
+#define ER_SIGNAL_NOT_FOUND 1643
+#define ER_SIGNAL_EXCEPTION 1644
+#define ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 1645
+#define ER_SIGNAL_BAD_CONDITION_TYPE 1646
+#define WARN_COND_ITEM_TRUNCATED 1647
+#define ER_COND_ITEM_TOO_LONG 1648
+#define ER_UNKNOWN_LOCALE 1649
+#define ER_SLAVE_IGNORE_SERVER_IDS 1650
+#define ER_QUERY_CACHE_DISABLED 1651
+#define ER_SAME_NAME_PARTITION_FIELD 1652
+#define ER_PARTITION_COLUMN_LIST_ERROR 1653
+#define ER_WRONG_TYPE_COLUMN_VALUE_ERROR 1654
+#define ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR 1655
+#define ER_MAXVALUE_IN_VALUES_IN 1656
+#define ER_TOO_MANY_VALUES_ERROR 1657
+#define ER_ROW_SINGLE_PARTITION_FIELD_ERROR 1658
+#define ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD 1659
+#define ER_PARTITION_FIELDS_TOO_LONG 1660
+#define ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE 1661
+#define ER_BINLOG_ROW_MODE_AND_STMT_ENGINE 1662
+#define ER_BINLOG_UNSAFE_AND_STMT_ENGINE 1663
+#define ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE 1664
+#define ER_BINLOG_STMT_MODE_AND_ROW_ENGINE 1665
+#define ER_BINLOG_ROW_INJECTION_AND_STMT_MODE 1666
+#define ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1667
+#define ER_BINLOG_UNSAFE_LIMIT 1668
+#define ER_BINLOG_UNSAFE_INSERT_DELAYED 1669
+#define ER_BINLOG_UNSAFE_SYSTEM_TABLE 1670
+#define ER_BINLOG_UNSAFE_AUTOINC_COLUMNS 1671
+#define ER_BINLOG_UNSAFE_UDF 1672
+#define ER_BINLOG_UNSAFE_SYSTEM_VARIABLE 1673
+#define ER_BINLOG_UNSAFE_SYSTEM_FUNCTION 1674
+#define ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS 1675
+#define ER_MESSAGE_AND_STATEMENT 1676
+#define ER_SLAVE_CONVERSION_FAILED 1677
+#define ER_SLAVE_CANT_CREATE_CONVERSION 1678
+#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT 1679
+#define ER_PATH_LENGTH 1680
+#define ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT 1681
+#define ER_WRONG_NATIVE_TABLE_STRUCTURE 1682
+#define ER_WRONG_PERFSCHEMA_USAGE 1683
+#define ER_WARN_I_S_SKIPPED_TABLE 1684
+#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT 1685
+#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT 1686
+#define ER_SPATIAL_MUST_HAVE_GEOM_COL 1687
+#define ER_TOO_LONG_INDEX_COMMENT 1688
+#define ER_LOCK_ABORTED 1689
+#define ER_DATA_OUT_OF_RANGE 1690
+#define ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691
+#define ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1692
+#define ER_BINLOG_UNSAFE_MIXED_STATEMENT 1693
+#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN 1694
+#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN 1695
+#define ER_FAILED_READ_FROM_PAR_FILE 1696
+#define ER_VALUES_IS_NOT_INT_TYPE_ERROR 1697
+#define ER_ACCESS_DENIED_NO_PASSWORD_ERROR 1698
+#define ER_SET_PASSWORD_AUTH_PLUGIN 1699
+#define ER_GRANT_PLUGIN_USER_EXISTS 1700
+#define ER_TRUNCATE_ILLEGAL_FK 1701
+#define ER_PLUGIN_IS_PERMANENT 1702
+#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN 1703
+#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX 1704
+#define ER_STMT_CACHE_FULL 1705
+#define ER_MULTI_UPDATE_KEY_CONFLICT 1706
+#define ER_TABLE_NEEDS_REBUILD 1707
+#define WARN_OPTION_BELOW_LIMIT 1708
+#define ER_INDEX_COLUMN_TOO_LONG 1709
+#define ER_ERROR_IN_TRIGGER_BODY 1710
+#define ER_ERROR_IN_UNKNOWN_TRIGGER_BODY 1711
+#define ER_INDEX_CORRUPT 1712
+#define ER_UNDO_RECORD_TOO_BIG 1713
+#define ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT 1714
+#define ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE 1715
+#define ER_BINLOG_UNSAFE_REPLACE_SELECT 1716
+#define ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT 1717
+#define ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT 1718
+#define ER_BINLOG_UNSAFE_UPDATE_IGNORE 1719
+#define ER_PLUGIN_NO_UNINSTALL 1720
+#define ER_PLUGIN_NO_INSTALL 1721
+#define ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT 1722
+#define ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC 1723
+#define ER_BINLOG_UNSAFE_INSERT_TWO_KEYS 1724
+#define ER_TABLE_IN_FK_CHECK 1725
+#define ER_UNSUPPORTED_ENGINE 1726
+#define ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST 1727
+#define ER_CANNOT_LOAD_FROM_TABLE_V2 1728
+#define ER_MASTER_DELAY_VALUE_OUT_OF_RANGE 1729
+#define ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT 1730
+#define ER_PARTITION_EXCHANGE_DIFFERENT_OPTION 1731
+#define ER_PARTITION_EXCHANGE_PART_TABLE 1732
+#define ER_PARTITION_EXCHANGE_TEMP_TABLE 1733
+#define ER_PARTITION_INSTEAD_OF_SUBPARTITION 1734
+#define ER_UNKNOWN_PARTITION 1735
+#define ER_TABLES_DIFFERENT_METADATA 1736
+#define ER_ROW_DOES_NOT_MATCH_PARTITION 1737
+#define ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX 1738
+#define ER_WARN_INDEX_NOT_APPLICABLE 1739
+#define ER_PARTITION_EXCHANGE_FOREIGN_KEY 1740
+#define ER_NO_SUCH_KEY_VALUE 1741
+#define ER_RPL_INFO_DATA_TOO_LONG 1742
+#define ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE 1743
+#define ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE 1744
+#define ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX 1745
+#define ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT 1746
+#define ER_PARTITION_CLAUSE_ON_NONPARTITIONED 1747
+#define ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET 1748
+#define ER_NO_SUCH_PARTITION__UNUSED 1749
+#define ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE 1750
+#define ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE 1751
+#define ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE 1752
+#define ER_MTS_FEATURE_IS_NOT_SUPPORTED 1753
+#define ER_MTS_UPDATED_DBS_GREATER_MAX 1754
+#define ER_MTS_CANT_PARALLEL 1755
+#define ER_MTS_INCONSISTENT_DATA 1756
+#define ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING 1757
+#define ER_DA_INVALID_CONDITION_NUMBER 1758
+#define ER_INSECURE_PLAIN_TEXT 1759
+#define ER_INSECURE_CHANGE_MASTER 1760
+#define ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO 1761
+#define ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO 1762
+#define ER_SQLTHREAD_WITH_SECURE_SLAVE 1763
+#define ER_TABLE_HAS_NO_FT 1764
+#define ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER 1765
+#define ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION 1766
+#define ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST 1767
+#define ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION_WHEN_GTID_NEXT_LIST_IS_NULL 1768
+#define ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION 1769
+#define ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL 1770
+#define ER_SKIPPING_LOGGED_TRANSACTION 1771
+#define ER_MALFORMED_GTID_SET_SPECIFICATION 1772
+#define ER_MALFORMED_GTID_SET_ENCODING 1773
+#define ER_MALFORMED_GTID_SPECIFICATION 1774
+#define ER_GNO_EXHAUSTED 1775
+#define ER_BAD_SLAVE_AUTO_POSITION 1776
+#define ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON 1777
+#define ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1778
+#define ER_GTID_MODE_2_OR_3_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON 1779
+#define ER_GTID_MODE_REQUIRES_BINLOG 1780
+#define ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF 1781
+#define ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON 1782
+#define ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF 1783
+#define ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF 1784
+#define ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE 1785
+#define ER_GTID_UNSAFE_CREATE_SELECT 1786
+#define ER_GTID_UNSAFE_CREATE_DROP_TEMPORARY_TABLE_IN_TRANSACTION 1787
+#define ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME 1788
+#define ER_MASTER_HAS_PURGED_REQUIRED_GTIDS 1789
+#define ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID 1790
+#define ER_UNKNOWN_EXPLAIN_FORMAT 1791
+#define ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION 1792
+#define ER_TOO_LONG_TABLE_PARTITION_COMMENT 1793
+#define ER_SLAVE_CONFIGURATION 1794
+#define ER_INNODB_FT_LIMIT 1795
+#define ER_INNODB_NO_FT_TEMP_TABLE 1796
+#define ER_INNODB_FT_WRONG_DOCID_COLUMN 1797
+#define ER_INNODB_FT_WRONG_DOCID_INDEX 1798
+#define ER_INNODB_ONLINE_LOG_TOO_BIG 1799
+#define ER_UNKNOWN_ALTER_ALGORITHM 1800
+#define ER_UNKNOWN_ALTER_LOCK 1801
+#define ER_MTS_CHANGE_MASTER_CANT_RUN_WITH_GAPS 1802
+#define ER_MTS_RECOVERY_FAILURE 1803
+#define ER_MTS_RESET_WORKERS 1804
+#define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2 1805
+#define ER_SLAVE_SILENT_RETRY_TRANSACTION 1806
+#define ER_DISCARD_FK_CHECKS_RUNNING 1807
+#define ER_TABLE_SCHEMA_MISMATCH 1808
+#define ER_TABLE_IN_SYSTEM_TABLESPACE 1809
+#define ER_IO_READ_ERROR 1810
+#define ER_IO_WRITE_ERROR 1811
+#define ER_TABLESPACE_MISSING 1812
+#define ER_TABLESPACE_EXISTS 1813
+#define ER_TABLESPACE_DISCARDED 1814
+#define ER_INTERNAL_ERROR 1815
+#define ER_INNODB_IMPORT_ERROR 1816
+#define ER_INNODB_INDEX_CORRUPT 1817
+#define ER_INVALID_YEAR_COLUMN_LENGTH 1818
+#define ER_NOT_VALID_PASSWORD 1819
+#define ER_MUST_CHANGE_PASSWORD 1820
+#define ER_FK_NO_INDEX_CHILD 1821
+#define ER_FK_NO_INDEX_PARENT 1822
+#define ER_FK_FAIL_ADD_SYSTEM 1823
+#define ER_FK_CANNOT_OPEN_PARENT 1824
+#define ER_FK_INCORRECT_OPTION 1825
+#define ER_FK_DUP_NAME 1826
+#define ER_PASSWORD_FORMAT 1827
+#define ER_FK_COLUMN_CANNOT_DROP 1828
+#define ER_FK_COLUMN_CANNOT_DROP_CHILD 1829
+#define ER_FK_COLUMN_NOT_NULL 1830
+#define ER_DUP_INDEX 1831
+#define ER_FK_COLUMN_CANNOT_CHANGE 1832
+#define ER_FK_COLUMN_CANNOT_CHANGE_CHILD 1833
+#define ER_FK_CANNOT_DELETE_PARENT 1834
+#define ER_MALFORMED_PACKET 1835
+#define ER_READ_ONLY_MODE 1836
+#define ER_GTID_NEXT_TYPE_UNDEFINED_GROUP 1837
+#define ER_VARIABLE_NOT_SETTABLE_IN_SP 1838
+#define ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF 1839
+#define ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY 1840
+#define ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY 1841
+#define ER_GTID_PURGED_WAS_CHANGED 1842
+#define ER_GTID_EXECUTED_WAS_CHANGED 1843
+#define ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES 1844
+#define ER_ALTER_OPERATION_NOT_SUPPORTED 1845
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON 1846
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY 1847
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION 1848
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME 1849
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE 1850
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK 1851
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_IGNORE 1852
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK 1853
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC 1854
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS 1855
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS 1856
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS 1857
+#define ER_SQL_SLAVE_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE 1858
+#define ER_DUP_UNKNOWN_IN_INDEX 1859
+#define ER_IDENT_CAUSES_TOO_LONG_PATH 1860
+#define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL 1861
+#define ER_MUST_CHANGE_PASSWORD_LOGIN 1862
+#define ER_ROW_IN_WRONG_PARTITION 1863
+#define ER_MTS_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX 1864
+#define ER_INNODB_NO_FT_USES_PARSER 1865
+#define ER_BINLOG_LOGICAL_CORRUPTION 1866
+#define ER_WARN_PURGE_LOG_IN_USE 1867
+#define ER_WARN_PURGE_LOG_IS_ACTIVE 1868
+#define ER_AUTO_INCREMENT_CONFLICT 1869
+#define WARN_ON_BLOCKHOLE_IN_RBR 1870
+#define ER_SLAVE_MI_INIT_REPOSITORY 1871
+#define ER_SLAVE_RLI_INIT_REPOSITORY 1872
+#define ER_ACCESS_DENIED_CHANGE_USER_ERROR 1873
+#define ER_INNODB_READ_ONLY 1874
+#define ER_STOP_SLAVE_SQL_THREAD_TIMEOUT 1875
+#define ER_STOP_SLAVE_IO_THREAD_TIMEOUT 1876
+#define ER_TABLE_CORRUPT 1877
+#define ER_ERROR_LAST 1877
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/mysys_err.h b/BuildTools/centos/dep/mysql-5.6.14/include/mysys_err.h
new file mode 100644
index 000000000..35c7890a5
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/mysys_err.h
@@ -0,0 +1,93 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _mysys_err_h
+#define _mysys_err_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
+#define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
+
+extern const char *globerrs[]; /* my_error_messages is here */
+
+/* Error message numbers in global map */
+/*
+ Do not add error numbers before EE_ERROR_FIRST.
+ If necessary to add lower numbers, change EE_ERROR_FIRST accordingly.
+
+ We start with error 1 to not confuse peoples with 'error 0'
+*/
+
+#define EE_ERROR_FIRST 1 /*Copy first error nr.*/
+#define EE_CANTCREATEFILE 1
+#define EE_READ 2
+#define EE_WRITE 3
+#define EE_BADCLOSE 4
+#define EE_OUTOFMEMORY 5
+#define EE_DELETE 6
+#define EE_LINK 7
+#define EE_EOFERR 9
+#define EE_CANTLOCK 10
+#define EE_CANTUNLOCK 11
+#define EE_DIR 12
+#define EE_STAT 13
+#define EE_CANT_CHSIZE 14
+#define EE_CANT_OPEN_STREAM 15
+#define EE_GETWD 16
+#define EE_SETWD 17
+#define EE_LINK_WARNING 18
+#define EE_OPEN_WARNING 19
+#define EE_DISK_FULL 20
+#define EE_CANT_MKDIR 21
+#define EE_UNKNOWN_CHARSET 22
+#define EE_OUT_OF_FILERESOURCES 23
+#define EE_CANT_READLINK 24
+#define EE_CANT_SYMLINK 25
+#define EE_REALPATH 26
+#define EE_SYNC 27
+#define EE_UNKNOWN_COLLATION 28
+#define EE_FILENOTFOUND 29
+#define EE_FILE_NOT_CLOSED 30
+#define EE_CHANGE_OWNERSHIP 31
+#define EE_CHANGE_PERMISSIONS 32
+#define EE_CANT_SEEK 33
+#define EE_ERROR_LAST 33 /* Copy last error nr */
+/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
+
+ /* exit codes for all MySQL programs */
+
+#define EXIT_UNSPECIFIED_ERROR 1
+#define EXIT_UNKNOWN_OPTION 2
+#define EXIT_AMBIGUOUS_OPTION 3
+#define EXIT_NO_ARGUMENT_ALLOWED 4
+#define EXIT_ARGUMENT_REQUIRED 5
+#define EXIT_VAR_PREFIX_NOT_UNIQUE 6
+#define EXIT_UNKNOWN_VARIABLE 7
+#define EXIT_OUT_OF_MEMORY 8
+#define EXIT_UNKNOWN_SUFFIX 9
+#define EXIT_NO_PTR_TO_VARIABLE 10
+#define EXIT_CANNOT_CONNECT_TO_SERVICE 11
+#define EXIT_OPTION_DISABLED 12
+#define EXIT_ARGUMENT_INVALID 13
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/password.h b/BuildTools/centos/dep/mysql-5.6.14/include/password.h
new file mode 100644
index 000000000..66e59e730
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/password.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef PASSWORD_INCLUDED
+#define PASSWORD_INCLUDED
+
+#include "my_global.h"
+
+struct rand_struct *get_sql_rand();
+
+C_MODE_START
+
+void my_make_scrambled_password_323(char *to, const char *password,
+ size_t pass_len);
+void my_make_scrambled_password(char *to, const char *password,
+ size_t pass_len);
+void my_make_scrambled_password_sha1(char *to, const char *password,
+ size_t pass_len);
+void my_make_scrambled_password_323(char *to, const char *password,
+ size_t pass_len);
+
+void hash_password(ulong *result, const char *password, uint password_len);
+
+C_MODE_END
+
+#endif /* PASSWORD_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql.d.base b/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql.d.base
new file mode 100644
index 000000000..02eb9ec1a
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql.d.base
@@ -0,0 +1,177 @@
+/* Copyright (c) 2008, 2009 Sun Microsystems, Inc.
+ Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ The actual probe names in DTrace scripts will replace '__' by '-'. Thus
+ insert__row__start will be insert-row-start.
+
+ Recommendations for adding new probes:
+
+ - each probe should have the minimal set of arguments required to
+ unambiguously identify the context in which the probe fires. Redundant
+ arguments (i.e. the ones that can be obtained in user scripts from previous
+ probes' arguments or otherwise) may be added for convenience.
+
+ - try to avoid computationally expensive probe arguments. If impossible,
+ use *_ENABLED() macros to check if the probe is activated before
+ performing expensive calculations for a probe argument.
+
+ - all *-done probes should have a status argument wherever applicable to make
+ it possible for user scripts to figure out whether the completed operation
+ was successful or not.
+
+ - for all status arguments, a non-zero value should be returned on error or
+ failure, 0 should be returned on success.
+*/
+
+provider mysql {
+
+ /* The following ones fire when creating or closing a client connection */
+ probe connection__start(unsigned long conn_id, char *user, char *host);
+ probe connection__done(int status, unsigned long conn_id);
+
+ /*
+ Fire at the start/end of any client command processing (including SQL
+ queries).
+ */
+ probe command__start(unsigned long conn_id, int command,
+ char *user, char *host);
+ probe command__done(int status);
+
+ /*
+ The following probes fire at the start/end of any SQL query processing,
+ respectively.
+
+ query_start() has a lot of parameters that can be used to pick up
+ parameters for a lot of other probes here. For simplicity reasons we also
+ add the query string to most other DTrace probes as well. Hostname is
+ either the hostname or the IP address of the MySQL Client.
+ */
+ probe query__start(char *query,
+ unsigned long conn_id,
+ char *db_name,
+ char *user,
+ char *host);
+ probe query__done(int status);
+
+ /* Fire at the start/end of SQL query parsing */
+ probe query__parse__start(char *query);
+ probe query__parse__done(int status);
+
+ /* Track whether the query hits the query cache or not */
+ probe query__cache__hit(char *query, unsigned long rows);
+ probe query__cache__miss(char *query);
+
+ /*
+ This probe fires when the actual query execution starts, i.e. after
+ parsing and checking the query cache, but before privilege checks,
+ optimizing, etc.
+
+ Query means also all independent queries of a stored procedure and prepared
+ statements. Also the stored procedure itself is a query.
+
+ exec_type is:
+ 0: Executed query from sql_parse, top-level query (sql_parse.cc)
+ 1: Executed prepared statement (sql_prepare.cc)
+ 2: Executed cursor statement (sql_cursor.cc)
+ 3: Executed query in stored procedure (sp_head.cc)
+ */
+ probe query__exec__start(char *query,
+ unsigned long connid,
+ char *db_name,
+ char *user,
+ char *host,
+ int exec_type);
+ probe query__exec__done(int status);
+
+ /* These probes fire when performing row operations towards any handler */
+ probe insert__row__start(char *db, char *table);
+ probe insert__row__done(int status);
+ probe update__row__start(char *db, char *table);
+ probe update__row__done(int status);
+ probe delete__row__start(char *db, char *table);
+ probe delete__row__done(int status);
+ probe read__row__start(char *db, char *table, int scan_flag);
+ probe read__row__done(int status);
+ probe index__read__row__start(char *db, char *table);
+ probe index__read__row__done(int status);
+
+ /*
+ These probes fire when calling external_lock for any handler
+ depending on the lock type being acquired or released.
+ */
+ probe handler__rdlock__start(char *db, char *table);
+ probe handler__wrlock__start(char *db, char *table);
+ probe handler__unlock__start(char *db, char *table);
+ probe handler__rdlock__done(int status);
+ probe handler__wrlock__done(int status);
+ probe handler__unlock__done(int status);
+
+ /*
+ These probes fire when a filesort activity happens in a query.
+ */
+ probe filesort__start(char *db, char *table);
+ probe filesort__done(int status, unsigned long rows);
+ /*
+ The query types SELECT, INSERT, INSERT AS SELECT, UPDATE, UPDATE with
+ multiple tables, DELETE, DELETE with multiple tables are all probed.
+ The start probe always contains the query text.
+ */
+ probe select__start(char *query);
+ probe select__done(int status, unsigned long rows);
+ probe insert__start(char *query);
+ probe insert__done(int status, unsigned long rows);
+ probe insert__select__start(char *query);
+ probe insert__select__done(int status, unsigned long rows);
+ probe update__start(char *query);
+ probe update__done(int status,
+ unsigned long rowsmatches, unsigned long rowschanged);
+ probe multi__update__start(char *query);
+ probe multi__update__done(int status,
+ unsigned long rowsmatches,
+ unsigned long rowschanged);
+ probe delete__start(char *query);
+ probe delete__done(int status, unsigned long rows);
+ probe multi__delete__start(char *query);
+ probe multi__delete__done(int status, unsigned long rows);
+
+ /*
+ These probes can be used to measure the time waiting for network traffic
+ or identify network-related problems.
+ */
+ probe net__read__start();
+ probe net__read__done(int status, unsigned long bytes);
+ probe net__write__start(unsigned long bytes);
+ probe net__write__done(int status);
+
+ /* MyISAM Key cache probes */
+ probe keycache__read__start(char *filepath, unsigned long bytes,
+ unsigned long mem_used, unsigned long mem_free);
+ probe keycache__read__block(unsigned long bytes);
+ probe keycache__read__hit();
+ probe keycache__read__miss();
+ probe keycache__read__done(unsigned long mem_used, unsigned long mem_free);
+ probe keycache__write__start(char *filepath, unsigned long bytes,
+ unsigned long mem_used, unsigned long mem_free);
+ probe keycache__write__block(unsigned long bytes);
+ probe keycache__write__done(unsigned long mem_used, unsigned long mem_free);
+};
+
+#pragma D attributes Evolving/Evolving/Common provider mysql provider
+#pragma D attributes Evolving/Evolving/Common provider mysql module
+#pragma D attributes Evolving/Evolving/Common provider mysql function
+#pragma D attributes Evolving/Evolving/Common provider mysql name
+#pragma D attributes Evolving/Evolving/Common provider mysql args
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql.h b/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql.h
new file mode 100644
index 000000000..191860d0b
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql.h
@@ -0,0 +1,29 @@
+/* Copyright (c) 2008 Sun Microsystems, Inc.
+ Use is subject to license terms.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef PROBES_MYSQL_H
+
+#define PROBES_MYSQL_H
+
+#include
+
+#if defined(HAVE_DTRACE) && !defined(DISABLE_DTRACE)
+#include "probes_mysql_dtrace.h"
+#else
+#include "probes_mysql_nodtrace.h"
+#endif
+
+#endif /* PROBES_MYSQL_H */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql_nodtrace.h b/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql_nodtrace.h
new file mode 100644
index 000000000..bc3b65a00
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/probes_mysql_nodtrace.h
@@ -0,0 +1,129 @@
+/*
+ * Generated by dheadgen(1).
+ */
+
+#ifndef _PROBES_MYSQL_D
+#define _PROBES_MYSQL_D
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MYSQL_CONNECTION_START(arg0, arg1, arg2)
+#define MYSQL_CONNECTION_START_ENABLED() (0)
+#define MYSQL_CONNECTION_DONE(arg0, arg1)
+#define MYSQL_CONNECTION_DONE_ENABLED() (0)
+#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3)
+#define MYSQL_COMMAND_START_ENABLED() (0)
+#define MYSQL_COMMAND_DONE(arg0)
+#define MYSQL_COMMAND_DONE_ENABLED() (0)
+#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4)
+#define MYSQL_QUERY_START_ENABLED() (0)
+#define MYSQL_QUERY_DONE(arg0)
+#define MYSQL_QUERY_DONE_ENABLED() (0)
+#define MYSQL_QUERY_PARSE_START(arg0)
+#define MYSQL_QUERY_PARSE_START_ENABLED() (0)
+#define MYSQL_QUERY_PARSE_DONE(arg0)
+#define MYSQL_QUERY_PARSE_DONE_ENABLED() (0)
+#define MYSQL_QUERY_CACHE_HIT(arg0, arg1)
+#define MYSQL_QUERY_CACHE_HIT_ENABLED() (0)
+#define MYSQL_QUERY_CACHE_MISS(arg0)
+#define MYSQL_QUERY_CACHE_MISS_ENABLED() (0)
+#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5)
+#define MYSQL_QUERY_EXEC_START_ENABLED() (0)
+#define MYSQL_QUERY_EXEC_DONE(arg0)
+#define MYSQL_QUERY_EXEC_DONE_ENABLED() (0)
+#define MYSQL_INSERT_ROW_START(arg0, arg1)
+#define MYSQL_INSERT_ROW_START_ENABLED() (0)
+#define MYSQL_INSERT_ROW_DONE(arg0)
+#define MYSQL_INSERT_ROW_DONE_ENABLED() (0)
+#define MYSQL_UPDATE_ROW_START(arg0, arg1)
+#define MYSQL_UPDATE_ROW_START_ENABLED() (0)
+#define MYSQL_UPDATE_ROW_DONE(arg0)
+#define MYSQL_UPDATE_ROW_DONE_ENABLED() (0)
+#define MYSQL_DELETE_ROW_START(arg0, arg1)
+#define MYSQL_DELETE_ROW_START_ENABLED() (0)
+#define MYSQL_DELETE_ROW_DONE(arg0)
+#define MYSQL_DELETE_ROW_DONE_ENABLED() (0)
+#define MYSQL_READ_ROW_START(arg0, arg1, arg2)
+#define MYSQL_READ_ROW_START_ENABLED() (0)
+#define MYSQL_READ_ROW_DONE(arg0)
+#define MYSQL_READ_ROW_DONE_ENABLED() (0)
+#define MYSQL_INDEX_READ_ROW_START(arg0, arg1)
+#define MYSQL_INDEX_READ_ROW_START_ENABLED() (0)
+#define MYSQL_INDEX_READ_ROW_DONE(arg0)
+#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (0)
+#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1)
+#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (0)
+#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1)
+#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (0)
+#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1)
+#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (0)
+#define MYSQL_HANDLER_RDLOCK_DONE(arg0)
+#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (0)
+#define MYSQL_HANDLER_WRLOCK_DONE(arg0)
+#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (0)
+#define MYSQL_HANDLER_UNLOCK_DONE(arg0)
+#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (0)
+#define MYSQL_FILESORT_START(arg0, arg1)
+#define MYSQL_FILESORT_START_ENABLED() (0)
+#define MYSQL_FILESORT_DONE(arg0, arg1)
+#define MYSQL_FILESORT_DONE_ENABLED() (0)
+#define MYSQL_SELECT_START(arg0)
+#define MYSQL_SELECT_START_ENABLED() (0)
+#define MYSQL_SELECT_DONE(arg0, arg1)
+#define MYSQL_SELECT_DONE_ENABLED() (0)
+#define MYSQL_INSERT_START(arg0)
+#define MYSQL_INSERT_START_ENABLED() (0)
+#define MYSQL_INSERT_DONE(arg0, arg1)
+#define MYSQL_INSERT_DONE_ENABLED() (0)
+#define MYSQL_INSERT_SELECT_START(arg0)
+#define MYSQL_INSERT_SELECT_START_ENABLED() (0)
+#define MYSQL_INSERT_SELECT_DONE(arg0, arg1)
+#define MYSQL_INSERT_SELECT_DONE_ENABLED() (0)
+#define MYSQL_UPDATE_START(arg0)
+#define MYSQL_UPDATE_START_ENABLED() (0)
+#define MYSQL_UPDATE_DONE(arg0, arg1, arg2)
+#define MYSQL_UPDATE_DONE_ENABLED() (0)
+#define MYSQL_MULTI_UPDATE_START(arg0)
+#define MYSQL_MULTI_UPDATE_START_ENABLED() (0)
+#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2)
+#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (0)
+#define MYSQL_DELETE_START(arg0)
+#define MYSQL_DELETE_START_ENABLED() (0)
+#define MYSQL_DELETE_DONE(arg0, arg1)
+#define MYSQL_DELETE_DONE_ENABLED() (0)
+#define MYSQL_MULTI_DELETE_START(arg0)
+#define MYSQL_MULTI_DELETE_START_ENABLED() (0)
+#define MYSQL_MULTI_DELETE_DONE(arg0, arg1)
+#define MYSQL_MULTI_DELETE_DONE_ENABLED() (0)
+#define MYSQL_NET_READ_START()
+#define MYSQL_NET_READ_START_ENABLED() (0)
+#define MYSQL_NET_READ_DONE(arg0, arg1)
+#define MYSQL_NET_READ_DONE_ENABLED() (0)
+#define MYSQL_NET_WRITE_START(arg0)
+#define MYSQL_NET_WRITE_START_ENABLED() (0)
+#define MYSQL_NET_WRITE_DONE(arg0)
+#define MYSQL_NET_WRITE_DONE_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3)
+#define MYSQL_KEYCACHE_READ_START_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_BLOCK(arg0)
+#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_HIT()
+#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_MISS()
+#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1)
+#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (0)
+#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3)
+#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (0)
+#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0)
+#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (0)
+#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1)
+#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (0)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PROBES_MYSQL_D */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/queues.h b/BuildTools/centos/dep/mysql-5.6.14/include/queues.h
new file mode 100644
index 000000000..3ece9c220
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/queues.h
@@ -0,0 +1,75 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ Code for generell handling of priority Queues.
+ Implemention of queues from "Algoritms in C" by Robert Sedgewick.
+ Copyright Monty Program KB.
+ By monty.
+*/
+
+#ifndef _queues_h
+#define _queues_h
+
+#include "my_global.h" /* uchar */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct st_queue {
+ uchar **root;
+ void *first_cmp_arg;
+ uint elements;
+ uint max_elements;
+ uint offset_to_key; /* compare is done on element+offset */
+ int max_at_top; /* Normally 1, set to -1 if queue_top gives max */
+ int (*compare)(void *, uchar *,uchar *);
+ uint auto_extent;
+} QUEUE;
+
+#define queue_top(queue) ((queue)->root[1])
+#define queue_element(queue,index) ((queue)->root[index+1])
+#define queue_end(queue) ((queue)->root[(queue)->elements])
+#define queue_replaced(queue) _downheap(queue,1)
+#define queue_set_cmp_arg(queue, set_arg) (queue)->first_cmp_arg= set_arg
+#define queue_set_max_at_top(queue, set_arg) \
+ (queue)->max_at_top= set_arg ? -1 : 1
+typedef int (*queue_compare)(void *,uchar *, uchar *);
+
+int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
+ pbool max_at_top, queue_compare compare,
+ void *first_cmp_arg);
+int init_queue_ex(QUEUE *queue,uint max_elements,uint offset_to_key,
+ pbool max_at_top, queue_compare compare,
+ void *first_cmp_arg, uint auto_extent);
+int reinit_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
+ pbool max_at_top, queue_compare compare,
+ void *first_cmp_arg);
+int resize_queue(QUEUE *queue, uint max_elements);
+void delete_queue(QUEUE *queue);
+void queue_insert(QUEUE *queue,uchar *element);
+int queue_insert_safe(QUEUE *queue, uchar *element);
+uchar *queue_remove(QUEUE *queue,uint idx);
+#define queue_remove_all(queue) { (queue)->elements= 0; }
+#define queue_is_full(queue) (queue->elements == queue->max_elements)
+void _downheap(QUEUE *queue,uint idx);
+void queue_fix(QUEUE *queue);
+#define is_queue_inited(queue) ((queue)->root != 0)
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/service_versions.h b/BuildTools/centos/dep/mysql-5.6.14/include/service_versions.h
new file mode 100644
index 000000000..5d3b97874
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/service_versions.h
@@ -0,0 +1,27 @@
+/* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifdef _WIN32
+#define SERVICE_VERSION __declspec(dllexport) void *
+#else
+#define SERVICE_VERSION void *
+#endif
+
+#define VERSION_my_snprintf 0x0100
+#define VERSION_thd_alloc 0x0100
+#define VERSION_thd_wait 0x0100
+#define VERSION_my_thread_scheduler 0x0100
+#define VERSION_my_plugin_log 0x0100
+#define VERSION_mysql_string 0x0100
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/sha1.h b/BuildTools/centos/dep/mysql-5.6.14/include/sha1.h
new file mode 100644
index 000000000..5e68333cf
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/sha1.h
@@ -0,0 +1,30 @@
+#ifndef SHA1_INCLUDED
+#define SHA1_INCLUDED
+
+/* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#define SHA1_HASH_SIZE 20 /* Hash size in bytes */
+
+C_MODE_START
+
+void compute_sha1_hash(uint8 *digest, const char *buf, int len);
+void compute_sha1_hash_multi(uint8 *digest, const char *buf1, int len1,
+ const char *buf2, int len2);
+
+C_MODE_END
+
+#endif /* SHA1_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/sha2.h b/BuildTools/centos/dep/mysql-5.6.14/include/sha2.h
new file mode 100644
index 000000000..737658e9c
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/sha2.h
@@ -0,0 +1,72 @@
+/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef included_sha2_h
+#define included_sha2_h
+
+#include
+
+#if defined(HAVE_YASSL) || defined(HAVE_OPENSSL)
+
+# ifdef HAVE_STDDEF_H
+# include
+# endif
+
+# ifndef HAVE_YASSL
+# include
+
+# else
+
+#include "../extra/yassl/taocrypt/include/sha.hpp"
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+#ifndef SHA512_DIGEST_LENGTH
+#define SHA512_DIGEST_LENGTH TaoCrypt::SHA512::DIGEST_SIZE
+#endif
+
+#ifndef SHA384_DIGEST_LENGTH
+#define SHA384_DIGEST_LENGTH TaoCrypt::SHA384::DIGEST_SIZE
+#endif
+
+#ifndef SHA256_DIGEST_LENGTH
+#define SHA256_DIGEST_LENGTH TaoCrypt::SHA256::DIGEST_SIZE
+#endif
+
+#ifndef SHA224_DIGEST_LENGTH
+#define SHA224_DIGEST_LENGTH TaoCrypt::SHA224::DIGEST_SIZE
+#endif
+
+#define GEN_YASSL_SHA2_BRIDGE(size) \
+unsigned char* SHA##size(const unsigned char *input_ptr, size_t input_length, \
+ char unsigned *output_ptr);
+
+GEN_YASSL_SHA2_BRIDGE(512);
+GEN_YASSL_SHA2_BRIDGE(384);
+GEN_YASSL_SHA2_BRIDGE(256);
+GEN_YASSL_SHA2_BRIDGE(224);
+
+#undef GEN_YASSL_SHA2_BRIDGE
+
+# ifdef __cplusplus
+}
+# endif
+
+# endif /* HAVE_YASSL */
+
+#endif /* HAVE_OPENSSL || HAVE_YASSL */
+#endif /* included_sha2_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/sql_common.h b/BuildTools/centos/dep/mysql-5.6.14/include/sql_common.h
new file mode 100644
index 000000000..c8ea820fb
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/sql_common.h
@@ -0,0 +1,123 @@
+#ifndef SQL_COMMON_INCLUDED
+#define SQL_COMMON_INCLUDED
+
+/* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#define SQL_COMMON_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+extern const char *unknown_sqlstate;
+extern const char *cant_connect_sqlstate;
+extern const char *not_error_sqlstate;
+
+struct st_mysql_options_extention {
+ char *plugin_dir;
+ char *default_auth;
+ char *ssl_crl; /* PEM CRL file */
+ char *ssl_crlpath; /* PEM directory of CRL-s? */
+ HASH connection_attributes;
+ char *server_public_key_path;
+ size_t connection_attributes_length;
+ my_bool enable_cleartext_plugin;
+};
+
+typedef struct st_mysql_methods
+{
+ my_bool (*read_query_result)(MYSQL *mysql);
+ my_bool (*advanced_command)(MYSQL *mysql,
+ enum enum_server_command command,
+ const unsigned char *header,
+ unsigned long header_length,
+ const unsigned char *arg,
+ unsigned long arg_length,
+ my_bool skip_check,
+ MYSQL_STMT *stmt);
+ MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+ unsigned int fields);
+ MYSQL_RES * (*use_result)(MYSQL *mysql);
+ void (*fetch_lengths)(unsigned long *to,
+ MYSQL_ROW column, unsigned int field_count);
+ void (*flush_use_result)(MYSQL *mysql, my_bool flush_all_results);
+ int (*read_change_user_result)(MYSQL *mysql);
+#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
+ MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
+ my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
+ int (*stmt_execute)(MYSQL_STMT *stmt);
+ int (*read_binary_rows)(MYSQL_STMT *stmt);
+ int (*unbuffered_fetch)(MYSQL *mysql, char **row);
+ void (*free_embedded_thd)(MYSQL *mysql);
+ const char *(*read_statistics)(MYSQL *mysql);
+ my_bool (*next_result)(MYSQL *mysql);
+ int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
+#endif
+} MYSQL_METHODS;
+
+#define simple_command(mysql, command, arg, length, skip_check) \
+ (*(mysql)->methods->advanced_command)(mysql, command, 0, \
+ 0, arg, length, skip_check, NULL)
+#define stmt_command(mysql, command, arg, length, stmt) \
+ (*(mysql)->methods->advanced_command)(mysql, command, 0, \
+ 0, arg, length, 1, stmt)
+
+extern CHARSET_INFO *default_client_charset_info;
+MYSQL_FIELD *unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,
+ uint fields, my_bool default_value,
+ uint server_capabilities);
+void free_rows(MYSQL_DATA *cur);
+void free_old_query(MYSQL *mysql);
+void end_server(MYSQL *mysql);
+my_bool mysql_reconnect(MYSQL *mysql);
+void mysql_read_default_options(struct st_mysql_options *options,
+ const char *filename,const char *group);
+my_bool
+cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
+ const unsigned char *header, ulong header_length,
+ const unsigned char *arg, ulong arg_length,
+ my_bool skip_check, MYSQL_STMT *stmt);
+unsigned long cli_safe_read(MYSQL *mysql);
+void net_clear_error(NET *net);
+void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net);
+void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
+ const char *err);
+void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
+void set_mysql_extended_error(MYSQL *mysql, int errcode, const char *sqlstate,
+ const char *format, ...);
+
+/* client side of the pluggable authentication */
+struct st_plugin_vio_info;
+void mpvio_info(Vio *vio, struct st_plugin_vio_info *info);
+int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
+ const char *data_plugin, const char *db);
+int mysql_client_plugin_init();
+void mysql_client_plugin_deinit();
+struct st_mysql_client_plugin;
+extern struct st_mysql_client_plugin *mysql_client_builtins[];
+uchar * send_client_connect_attrs(MYSQL *mysql, uchar *buf);
+extern my_bool libmysql_cleartext_plugin_enabled;
+
+#ifdef __cplusplus
+}
+#endif
+
+#define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41)
+
+#endif /* SQL_COMMON_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/sql_state.h b/BuildTools/centos/dep/mysql-5.6.14/include/sql_state.h
new file mode 100644
index 000000000..2e080b437
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/sql_state.h
@@ -0,0 +1,228 @@
+/* Autogenerated file, please don't edit */
+
+{ ER_DUP_KEY ,"23000", "" },
+{ ER_OUTOFMEMORY ,"HY001", "S1001" },
+{ ER_OUT_OF_SORTMEMORY ,"HY001", "S1001" },
+{ ER_CON_COUNT_ERROR ,"08004", "" },
+{ ER_BAD_HOST_ERROR ,"08S01", "" },
+{ ER_HANDSHAKE_ERROR ,"08S01", "" },
+{ ER_DBACCESS_DENIED_ERROR ,"42000", "" },
+{ ER_ACCESS_DENIED_ERROR ,"28000", "" },
+{ ER_NO_DB_ERROR ,"3D000", "" },
+{ ER_UNKNOWN_COM_ERROR ,"08S01", "" },
+{ ER_BAD_NULL_ERROR ,"23000", "" },
+{ ER_BAD_DB_ERROR ,"42000", "" },
+{ ER_TABLE_EXISTS_ERROR ,"42S01", "" },
+{ ER_BAD_TABLE_ERROR ,"42S02", "" },
+{ ER_NON_UNIQ_ERROR ,"23000", "" },
+{ ER_SERVER_SHUTDOWN ,"08S01", "" },
+{ ER_BAD_FIELD_ERROR ,"42S22", "S0022" },
+{ ER_WRONG_FIELD_WITH_GROUP ,"42000", "S1009" },
+{ ER_WRONG_GROUP_FIELD ,"42000", "S1009" },
+{ ER_WRONG_SUM_SELECT ,"42000", "S1009" },
+{ ER_WRONG_VALUE_COUNT ,"21S01", "" },
+{ ER_TOO_LONG_IDENT ,"42000", "S1009" },
+{ ER_DUP_FIELDNAME ,"42S21", "S1009" },
+{ ER_DUP_KEYNAME ,"42000", "S1009" },
+{ ER_DUP_ENTRY ,"23000", "S1009" },
+{ ER_WRONG_FIELD_SPEC ,"42000", "S1009" },
+{ ER_PARSE_ERROR ,"42000", "s1009" },
+{ ER_EMPTY_QUERY ,"42000", "" },
+{ ER_NONUNIQ_TABLE ,"42000", "S1009" },
+{ ER_INVALID_DEFAULT ,"42000", "S1009" },
+{ ER_MULTIPLE_PRI_KEY ,"42000", "S1009" },
+{ ER_TOO_MANY_KEYS ,"42000", "S1009" },
+{ ER_TOO_MANY_KEY_PARTS ,"42000", "S1009" },
+{ ER_TOO_LONG_KEY ,"42000", "S1009" },
+{ ER_KEY_COLUMN_DOES_NOT_EXITS ,"42000", "S1009" },
+{ ER_BLOB_USED_AS_KEY ,"42000", "S1009" },
+{ ER_TOO_BIG_FIELDLENGTH ,"42000", "S1009" },
+{ ER_WRONG_AUTO_KEY ,"42000", "S1009" },
+{ ER_FORCING_CLOSE ,"08S01", "" },
+{ ER_IPSOCK_ERROR ,"08S01", "" },
+{ ER_NO_SUCH_INDEX ,"42S12", "S1009" },
+{ ER_WRONG_FIELD_TERMINATORS ,"42000", "S1009" },
+{ ER_BLOBS_AND_NO_TERMINATED ,"42000", "S1009" },
+{ ER_CANT_REMOVE_ALL_FIELDS ,"42000", "" },
+{ ER_CANT_DROP_FIELD_OR_KEY ,"42000", "" },
+{ ER_BLOB_CANT_HAVE_DEFAULT ,"42000", "" },
+{ ER_WRONG_DB_NAME ,"42000", "" },
+{ ER_WRONG_TABLE_NAME ,"42000", "" },
+{ ER_TOO_BIG_SELECT ,"42000", "" },
+{ ER_UNKNOWN_PROCEDURE ,"42000", "" },
+{ ER_WRONG_PARAMCOUNT_TO_PROCEDURE ,"42000", "" },
+{ ER_UNKNOWN_TABLE ,"42S02", "" },
+{ ER_FIELD_SPECIFIED_TWICE ,"42000", "" },
+{ ER_UNSUPPORTED_EXTENSION ,"42000", "" },
+{ ER_TABLE_MUST_HAVE_COLUMNS ,"42000", "" },
+{ ER_UNKNOWN_CHARACTER_SET ,"42000", "" },
+{ ER_TOO_BIG_ROWSIZE ,"42000", "" },
+{ ER_WRONG_OUTER_JOIN ,"42000", "" },
+{ ER_NULL_COLUMN_IN_INDEX ,"42000", "" },
+{ ER_PASSWORD_ANONYMOUS_USER ,"42000", "" },
+{ ER_PASSWORD_NOT_ALLOWED ,"42000", "" },
+{ ER_PASSWORD_NO_MATCH ,"42000", "" },
+{ ER_WRONG_VALUE_COUNT_ON_ROW ,"21S01", "" },
+{ ER_INVALID_USE_OF_NULL ,"22004", "" },
+{ ER_REGEXP_ERROR ,"42000", "" },
+{ ER_MIX_OF_GROUP_FUNC_AND_FIELDS ,"42000", "" },
+{ ER_NONEXISTING_GRANT ,"42000", "" },
+{ ER_TABLEACCESS_DENIED_ERROR ,"42000", "" },
+{ ER_COLUMNACCESS_DENIED_ERROR ,"42000", "" },
+{ ER_ILLEGAL_GRANT_FOR_TABLE ,"42000", "" },
+{ ER_GRANT_WRONG_HOST_OR_USER ,"42000", "" },
+{ ER_NO_SUCH_TABLE ,"42S02", "" },
+{ ER_NONEXISTING_TABLE_GRANT ,"42000", "" },
+{ ER_NOT_ALLOWED_COMMAND ,"42000", "" },
+{ ER_SYNTAX_ERROR ,"42000", "" },
+{ ER_ABORTING_CONNECTION ,"08S01", "" },
+{ ER_NET_PACKET_TOO_LARGE ,"08S01", "" },
+{ ER_NET_READ_ERROR_FROM_PIPE ,"08S01", "" },
+{ ER_NET_FCNTL_ERROR ,"08S01", "" },
+{ ER_NET_PACKETS_OUT_OF_ORDER ,"08S01", "" },
+{ ER_NET_UNCOMPRESS_ERROR ,"08S01", "" },
+{ ER_NET_READ_ERROR ,"08S01", "" },
+{ ER_NET_READ_INTERRUPTED ,"08S01", "" },
+{ ER_NET_ERROR_ON_WRITE ,"08S01", "" },
+{ ER_NET_WRITE_INTERRUPTED ,"08S01", "" },
+{ ER_TOO_LONG_STRING ,"42000", "" },
+{ ER_TABLE_CANT_HANDLE_BLOB ,"42000", "" },
+{ ER_TABLE_CANT_HANDLE_AUTO_INCREMENT ,"42000", "" },
+{ ER_WRONG_COLUMN_NAME ,"42000", "" },
+{ ER_WRONG_KEY_COLUMN ,"42000", "" },
+{ ER_DUP_UNIQUE ,"23000", "" },
+{ ER_BLOB_KEY_WITHOUT_LENGTH ,"42000", "" },
+{ ER_PRIMARY_CANT_HAVE_NULL ,"42000", "" },
+{ ER_TOO_MANY_ROWS ,"42000", "" },
+{ ER_REQUIRES_PRIMARY_KEY ,"42000", "" },
+{ ER_KEY_DOES_NOT_EXITS ,"42000", "S1009" },
+{ ER_CHECK_NO_SUCH_TABLE ,"42000", "" },
+{ ER_CHECK_NOT_IMPLEMENTED ,"42000", "" },
+{ ER_CANT_DO_THIS_DURING_AN_TRANSACTION ,"25000", "" },
+{ ER_NEW_ABORTING_CONNECTION ,"08S01", "" },
+{ ER_MASTER_NET_READ ,"08S01", "" },
+{ ER_MASTER_NET_WRITE ,"08S01", "" },
+{ ER_TOO_MANY_USER_CONNECTIONS ,"42000", "" },
+{ ER_READ_ONLY_TRANSACTION ,"25000", "" },
+{ ER_NO_PERMISSION_TO_CREATE_USER ,"42000", "" },
+{ ER_LOCK_DEADLOCK ,"40001", "" },
+{ ER_NO_REFERENCED_ROW ,"23000", "" },
+{ ER_ROW_IS_REFERENCED ,"23000", "" },
+{ ER_CONNECT_TO_MASTER ,"08S01", "" },
+{ ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT ,"21000", "" },
+{ ER_USER_LIMIT_REACHED ,"42000", "" },
+{ ER_SPECIFIC_ACCESS_DENIED_ERROR ,"42000", "" },
+{ ER_NO_DEFAULT ,"42000", "" },
+{ ER_WRONG_VALUE_FOR_VAR ,"42000", "" },
+{ ER_WRONG_TYPE_FOR_VAR ,"42000", "" },
+{ ER_CANT_USE_OPTION_HERE ,"42000", "" },
+{ ER_NOT_SUPPORTED_YET ,"42000", "" },
+{ ER_WRONG_FK_DEF ,"42000", "" },
+{ ER_OPERAND_COLUMNS ,"21000", "" },
+{ ER_SUBQUERY_NO_1_ROW ,"21000", "" },
+{ ER_ILLEGAL_REFERENCE ,"42S22", "" },
+{ ER_DERIVED_MUST_HAVE_ALIAS ,"42000", "" },
+{ ER_SELECT_REDUCED ,"01000", "" },
+{ ER_TABLENAME_NOT_ALLOWED_HERE ,"42000", "" },
+{ ER_NOT_SUPPORTED_AUTH_MODE ,"08004", "" },
+{ ER_SPATIAL_CANT_HAVE_NULL ,"42000", "" },
+{ ER_COLLATION_CHARSET_MISMATCH ,"42000", "" },
+{ ER_WARN_TOO_FEW_RECORDS ,"01000", "" },
+{ ER_WARN_TOO_MANY_RECORDS ,"01000", "" },
+{ ER_WARN_NULL_TO_NOTNULL ,"22004", "" },
+{ ER_WARN_DATA_OUT_OF_RANGE ,"22003", "" },
+{ WARN_DATA_TRUNCATED ,"01000", "" },
+{ ER_WRONG_NAME_FOR_INDEX ,"42000", "" },
+{ ER_WRONG_NAME_FOR_CATALOG ,"42000", "" },
+{ ER_UNKNOWN_STORAGE_ENGINE ,"42000", "" },
+{ ER_TRUNCATED_WRONG_VALUE ,"22007", "" },
+{ ER_SP_NO_RECURSIVE_CREATE ,"2F003", "" },
+{ ER_SP_ALREADY_EXISTS ,"42000", "" },
+{ ER_SP_DOES_NOT_EXIST ,"42000", "" },
+{ ER_SP_LILABEL_MISMATCH ,"42000", "" },
+{ ER_SP_LABEL_REDEFINE ,"42000", "" },
+{ ER_SP_LABEL_MISMATCH ,"42000", "" },
+{ ER_SP_UNINIT_VAR ,"01000", "" },
+{ ER_SP_BADSELECT ,"0A000", "" },
+{ ER_SP_BADRETURN ,"42000", "" },
+{ ER_SP_BADSTATEMENT ,"0A000", "" },
+{ ER_UPDATE_LOG_DEPRECATED_IGNORED ,"42000", "" },
+{ ER_UPDATE_LOG_DEPRECATED_TRANSLATED ,"42000", "" },
+{ ER_QUERY_INTERRUPTED ,"70100", "" },
+{ ER_SP_WRONG_NO_OF_ARGS ,"42000", "" },
+{ ER_SP_COND_MISMATCH ,"42000", "" },
+{ ER_SP_NORETURN ,"42000", "" },
+{ ER_SP_NORETURNEND ,"2F005", "" },
+{ ER_SP_BAD_CURSOR_QUERY ,"42000", "" },
+{ ER_SP_BAD_CURSOR_SELECT ,"42000", "" },
+{ ER_SP_CURSOR_MISMATCH ,"42000", "" },
+{ ER_SP_CURSOR_ALREADY_OPEN ,"24000", "" },
+{ ER_SP_CURSOR_NOT_OPEN ,"24000", "" },
+{ ER_SP_UNDECLARED_VAR ,"42000", "" },
+{ ER_SP_FETCH_NO_DATA ,"02000", "" },
+{ ER_SP_DUP_PARAM ,"42000", "" },
+{ ER_SP_DUP_VAR ,"42000", "" },
+{ ER_SP_DUP_COND ,"42000", "" },
+{ ER_SP_DUP_CURS ,"42000", "" },
+{ ER_SP_SUBSELECT_NYI ,"0A000", "" },
+{ ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG ,"0A000", "" },
+{ ER_SP_VARCOND_AFTER_CURSHNDLR ,"42000", "" },
+{ ER_SP_CURSOR_AFTER_HANDLER ,"42000", "" },
+{ ER_SP_CASE_NOT_FOUND ,"20000", "" },
+{ ER_DIVISION_BY_ZERO ,"22012", "" },
+{ ER_ILLEGAL_VALUE_FOR_TYPE ,"22007", "" },
+{ ER_PROCACCESS_DENIED_ERROR ,"42000", "" },
+{ ER_XAER_NOTA ,"XAE04", "" },
+{ ER_XAER_INVAL ,"XAE05", "" },
+{ ER_XAER_RMFAIL ,"XAE07", "" },
+{ ER_XAER_OUTSIDE ,"XAE09", "" },
+{ ER_XAER_RMERR ,"XAE03", "" },
+{ ER_XA_RBROLLBACK ,"XA100", "" },
+{ ER_NONEXISTING_PROC_GRANT ,"42000", "" },
+{ ER_DATA_TOO_LONG ,"22001", "" },
+{ ER_SP_BAD_SQLSTATE ,"42000", "" },
+{ ER_CANT_CREATE_USER_WITH_GRANT ,"42000", "" },
+{ ER_SP_DUP_HANDLER ,"42000", "" },
+{ ER_SP_NOT_VAR_ARG ,"42000", "" },
+{ ER_SP_NO_RETSET ,"0A000", "" },
+{ ER_CANT_CREATE_GEOMETRY_OBJECT ,"22003", "" },
+{ ER_TOO_BIG_SCALE ,"42000", "S1009" },
+{ ER_TOO_BIG_PRECISION ,"42000", "S1009" },
+{ ER_M_BIGGER_THAN_D ,"42000", "S1009" },
+{ ER_TOO_LONG_BODY ,"42000", "S1009" },
+{ ER_TOO_BIG_DISPLAYWIDTH ,"42000", "S1009" },
+{ ER_XAER_DUPID ,"XAE08", "" },
+{ ER_DATETIME_FUNCTION_OVERFLOW ,"22008", "" },
+{ ER_ROW_IS_REFERENCED_2 ,"23000", "" },
+{ ER_NO_REFERENCED_ROW_2 ,"23000", "" },
+{ ER_SP_BAD_VAR_SHADOW ,"42000", "" },
+{ ER_SP_WRONG_NAME ,"42000", "" },
+{ ER_SP_NO_AGGREGATE ,"42000", "" },
+{ ER_MAX_PREPARED_STMT_COUNT_REACHED ,"42000", "" },
+{ ER_NON_GROUPING_FIELD_USED ,"42000", "" },
+{ ER_FOREIGN_DUPLICATE_KEY_OLD_UNUSED ,"23000", "S1009" },
+{ ER_CANT_CHANGE_TX_CHARACTERISTICS ,"25001", "" },
+{ ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT ,"42000", "" },
+{ ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" },
+{ ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" },
+{ ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" },
+{ ER_XA_RBTIMEOUT ,"XA106", "" },
+{ ER_XA_RBDEADLOCK ,"XA102", "" },
+{ ER_FUNC_INEXISTENT_NAME_COLLISION ,"42000", "" },
+{ ER_DUP_SIGNAL_SET ,"42000", "" },
+{ ER_SIGNAL_WARN ,"01000", "" },
+{ ER_SIGNAL_NOT_FOUND ,"02000", "" },
+{ ER_SIGNAL_EXCEPTION ,"HY000", "" },
+{ ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER ,"0K000", "" },
+{ ER_SPATIAL_MUST_HAVE_GEOM_COL ,"42000", "" },
+{ ER_DATA_OUT_OF_RANGE ,"22003", "" },
+{ ER_ACCESS_DENIED_NO_PASSWORD_ERROR ,"28000", "" },
+{ ER_TRUNCATE_ILLEGAL_FK ,"42000", "" },
+{ ER_DA_INVALID_CONDITION_NUMBER ,"35000", "" },
+{ ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO,"23000", "S1009" },
+{ ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO,"23000", "S1009" },
+{ ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION,"25006", "" },
+{ ER_ALTER_OPERATION_NOT_SUPPORTED ,"0A000", "" },
+{ ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ,"0A000", "" },
+{ ER_DUP_UNKNOWN_IN_INDEX ,"23000", "" },
+{ ER_ACCESS_DENIED_CHANGE_USER_ERROR ,"28000", "" },
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-case.h b/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-case.h
new file mode 100644
index 000000000..25817587a
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-case.h
@@ -0,0 +1,39 @@
+#ifndef SSLOPT_CASE_INCLUDED
+#define SSLOPT_CASE_INCLUDED
+
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+ case OPT_SSL_KEY:
+ case OPT_SSL_CERT:
+ case OPT_SSL_CA:
+ case OPT_SSL_CAPATH:
+ case OPT_SSL_CIPHER:
+ case OPT_SSL_CRL:
+ case OPT_SSL_CRLPATH:
+ /*
+ Enable use of SSL if we are using any ssl option
+ One can disable SSL later by using --skip-ssl or --ssl=0
+ */
+ opt_use_ssl= 1;
+ /* crl has no effect in yaSSL */
+#ifdef HAVE_YASSL
+ opt_ssl_crl= NULL;
+ opt_ssl_crlpath= NULL;
+#endif
+ break;
+#endif
+#endif /* SSLOPT_CASE_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-longopts.h b/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-longopts.h
new file mode 100644
index 000000000..8280f3b8f
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-longopts.h
@@ -0,0 +1,56 @@
+#ifndef SSLOPT_LONGOPTS_INCLUDED
+#define SSLOPT_LONGOPTS_INCLUDED
+
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+
+ {"ssl", OPT_SSL_SSL,
+ "Enable SSL for connection (automatically enabled with other flags).",
+ &opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ {"ssl-ca", OPT_SSL_CA,
+ "CA file in PEM format (check OpenSSL docs, implies --ssl).",
+ &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+ {"ssl-capath", OPT_SSL_CAPATH,
+ "CA directory (check OpenSSL docs, implies --ssl).",
+ &opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+ {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).",
+ &opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+ {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).",
+ &opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+ {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).",
+ &opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+ {"ssl-crl", OPT_SSL_CRL, "Certificate revocation list (implies --ssl).",
+ &opt_ssl_crl, &opt_ssl_crl, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+ {"ssl-crlpath", OPT_SSL_CRLPATH,
+ "Certificate revocation list path (implies --ssl).",
+ &opt_ssl_crlpath, &opt_ssl_crlpath, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+#ifdef MYSQL_CLIENT
+ {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
+ "Verify server's \"Common Name\" in its cert against hostname used "
+ "when connecting. This option is disabled by default.",
+ &opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert,
+ 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+#endif
+#endif /* HAVE_OPENSSL */
+#endif /* SSLOPT_LONGOPTS_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-vars.h b/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-vars.h
new file mode 100644
index 000000000..6da4dfd8a
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/sslopt-vars.h
@@ -0,0 +1,37 @@
+#ifndef SSLOPT_VARS_INCLUDED
+#define SSLOPT_VARS_INCLUDED
+
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+#ifdef SSL_VARS_NOT_STATIC
+#define SSL_STATIC
+#else
+#define SSL_STATIC static
+#endif
+SSL_STATIC my_bool opt_use_ssl = 0;
+SSL_STATIC char *opt_ssl_ca = 0;
+SSL_STATIC char *opt_ssl_capath = 0;
+SSL_STATIC char *opt_ssl_cert = 0;
+SSL_STATIC char *opt_ssl_cipher = 0;
+SSL_STATIC char *opt_ssl_key = 0;
+SSL_STATIC char *opt_ssl_crl = 0;
+SSL_STATIC char *opt_ssl_crlpath = 0;
+#ifdef MYSQL_CLIENT
+SSL_STATIC my_bool opt_ssl_verify_server_cert= 0;
+#endif
+#endif
+#endif /* SSLOPT_VARS_INCLUDED */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/t_ctype.h b/BuildTools/centos/dep/mysql-5.6.14/include/t_ctype.h
new file mode 100644
index 000000000..c019189d3
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/t_ctype.h
@@ -0,0 +1,254 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+/*
+ Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved.
+ Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved.
+ Permission to use, copy, modify, distribute and sell this software
+ and its documentation for any purpose is hereby granted without fee,
+ provided that the above copyright notice appear in all copies.
+ Smaphan Raruenrom and Pruet Boonma makes no representations about
+ the suitability of this software for any purpose. It is provided
+ "as is" without express or implied warranty.
+*/
+
+/* LC_COLLATE category + Level information */
+
+#ifndef _t_ctype_h
+#define _t_ctype_h
+
+#define TOT_LEVELS 5
+#define LAST_LEVEL 4 /* TOT_LEVELS - 1 */
+
+#define IGNORE 0
+
+
+/* level 1 symbols & order */
+enum l1_symbols {
+ L1_08 = TOT_LEVELS,
+ L1_18,
+ L1_28,
+ L1_38,
+ L1_48,
+ L1_58,
+ L1_68,
+ L1_78,
+ L1_88,
+ L1_98,
+ L1_A8,
+ L1_B8,
+ L1_C8,
+ L1_D8,
+ L1_E8,
+ L1_F8,
+ L1_G8,
+ L1_H8,
+ L1_I8,
+ L1_J8,
+ L1_K8,
+ L1_L8,
+ L1_M8,
+ L1_N8,
+ L1_O8,
+ L1_P8,
+ L1_Q8,
+ L1_R8,
+ L1_S8,
+ L1_T8,
+ L1_U8,
+ L1_V8,
+ L1_W8,
+ L1_X8,
+ L1_Y8,
+ L1_Z8,
+ L1_KO_KAI,
+ L1_KHO_KHAI,
+ L1_KHO_KHUAT,
+ L1_KHO_KHWAI,
+ L1_KHO_KHON,
+ L1_KHO_RAKHANG,
+ L1_NGO_NGU,
+ L1_CHO_CHAN,
+ L1_CHO_CHING,
+ L1_CHO_CHANG,
+ L1_SO_SO,
+ L1_CHO_CHOE,
+ L1_YO_YING,
+ L1_DO_CHADA,
+ L1_TO_PATAK,
+ L1_THO_THAN,
+ L1_THO_NANGMONTHO,
+ L1_THO_PHUTHAO,
+ L1_NO_NEN,
+ L1_DO_DEK,
+ L1_TO_TAO,
+ L1_THO_THUNG,
+ L1_THO_THAHAN,
+ L1_THO_THONG,
+ L1_NO_NU,
+ L1_BO_BAIMAI,
+ L1_PO_PLA,
+ L1_PHO_PHUNG,
+ L1_FO_FA,
+ L1_PHO_PHAN,
+ L1_FO_FAN,
+ L1_PHO_SAMPHAO,
+ L1_MO_MA,
+ L1_YO_YAK,
+ L1_RO_RUA,
+ L1_RU,
+ L1_LO_LING,
+ L1_LU,
+ L1_WO_WAEN,
+ L1_SO_SALA,
+ L1_SO_RUSI,
+ L1_SO_SUA,
+ L1_HO_HIP,
+ L1_LO_CHULA,
+ L1_O_ANG,
+ L1_HO_NOKHUK,
+ L1_NKHIT,
+ L1_SARA_A,
+ L1_MAI_HAN_AKAT,
+ L1_SARA_AA,
+ L1_SARA_AM,
+ L1_SARA_I,
+ L1_SARA_II,
+ L1_SARA_UE,
+ L1_SARA_UEE,
+ L1_SARA_U,
+ L1_SARA_UU,
+ L1_SARA_E,
+ L1_SARA_AE,
+ L1_SARA_O,
+ L1_SARA_AI_MAIMUAN,
+ L1_SARA_AI_MAIMALAI
+};
+
+/* level 2 symbols & order */
+enum l2_symbols {
+ L2_BLANK = TOT_LEVELS,
+ L2_THAII,
+ L2_YAMAK,
+ L2_PINTHU,
+ L2_GARAN,
+ L2_TYKHU,
+ L2_TONE1,
+ L2_TONE2,
+ L2_TONE3,
+ L2_TONE4
+};
+
+/* level 3 symbols & order */
+enum l3_symbols {
+ L3_BLANK = TOT_LEVELS,
+ L3_SPACE,
+ L3_NB_SACE,
+ L3_LOW_LINE,
+ L3_HYPHEN,
+ L3_COMMA,
+ L3_SEMICOLON,
+ L3_COLON,
+ L3_EXCLAMATION,
+ L3_QUESTION,
+ L3_SOLIDUS,
+ L3_FULL_STOP,
+ L3_PAIYAN_NOI,
+ L3_MAI_YAMOK,
+ L3_GRAVE,
+ L3_CIRCUMFLEX,
+ L3_TILDE,
+ L3_APOSTROPHE,
+ L3_QUOTATION,
+ L3_L_PARANTHESIS,
+ L3_L_BRACKET,
+ L3_L_BRACE,
+ L3_R_BRACE,
+ L3_R_BRACKET,
+ L3_R_PARENTHESIS,
+ L3_AT,
+ L3_BAHT,
+ L3_DOLLAR,
+ L3_FONGMAN,
+ L3_ANGKHANKHU,
+ L3_KHOMUT,
+ L3_ASTERISK,
+ L3_BK_SOLIDUS,
+ L3_AMPERSAND,
+ L3_NUMBER,
+ L3_PERCENT,
+ L3_PLUS,
+ L3_LESS_THAN,
+ L3_EQUAL,
+ L3_GREATER_THAN,
+ L3_V_LINE
+};
+
+/* level 4 symbols & order */
+enum l4_symbols {
+ L4_BLANK = TOT_LEVELS,
+ L4_MIN,
+ L4_CAP,
+ L4_EXT
+};
+
+enum level_symbols {
+ L_UPRUPR = TOT_LEVELS,
+ L_UPPER,
+ L_MIDDLE,
+ L_LOWER
+};
+
+#define _is(c) (t_ctype[(c)][LAST_LEVEL])
+#define _level 8
+#define _consnt 16
+#define _ldvowel 32
+#define _fllwvowel 64
+#define _uprvowel 128
+#define _lwrvowel 256
+#define _tone 512
+#define _diacrt1 1024
+#define _diacrt2 2048
+#define _combine 4096
+#define _stone 8192
+#define _tdig 16384
+#define _rearvowel (_fllwvowel | _uprvowel | _lwrvowel)
+#define _diacrt (_diacrt1 | _diacrt2)
+#define levelof(c) ( _is(c) & _level )
+#define isthai(c) ( (c) >= 128 )
+#define istalpha(c) ( _is(c) & (_consnt|_ldvowel|_rearvowel|\
+ _tone|_diacrt1|_diacrt2) )
+#define isconsnt(c) ( _is(c) & _consnt )
+#define isldvowel(c) ( _is(c) & _ldvowel )
+#define isfllwvowel(c) ( _is(c) & _fllwvowel )
+#define ismidvowel(c) ( _is(c) & (_ldvowel|_fllwvowel) )
+#define isuprvowel(c) ( _is(c) & _uprvowel )
+#define islwrvowel(c) ( _is(c) & _lwrvowel )
+#define isuprlwrvowel(c) ( _is(c) & (_lwrvowel | _uprvowel))
+#define isrearvowel(c) ( _is(c) & _rearvowel )
+#define isvowel(c) ( _is(c) & (_ldvowel|_rearvowel) )
+#define istone(c) ( _is(c) & _tone )
+#define isunldable(c) ( _is(c) & (_rearvowel|_tone|_diacrt1|_diacrt2) )
+#define iscombinable(c) ( _is(c) & _combine )
+#define istdigit(c) ( _is(c) & _tdig )
+#define isstone(c) ( _is(c) & _stone )
+#define isdiacrt1(c) ( _is(c) & _diacrt1)
+#define isdiacrt2(c) ( _is(c) & _diacrt2)
+#define isdiacrt(c) ( _is(c) & _diacrt)
+
+/* Function prototype called by sql/field.cc */
+void ThNormalize(uchar* ptr, uint field_length, const uchar* from, uint length);
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/thr_alarm.h b/BuildTools/centos/dep/mysql-5.6.14/include/thr_alarm.h
new file mode 100644
index 000000000..4d076b6de
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/thr_alarm.h
@@ -0,0 +1,110 @@
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* Prototypes when using thr_alarm library functions */
+
+#ifndef _thr_alarm_h
+#define _thr_alarm_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef USE_ALARM_THREAD
+#define USE_ONE_SIGNAL_HAND /* One must call process_alarm */
+#endif
+#ifdef HAVE_rts_threads
+#undef USE_ONE_SIGNAL_HAND
+#define USE_ALARM_THREAD
+#define THR_SERVER_ALARM SIGUSR1
+#else
+#define THR_SERVER_ALARM SIGALRM
+#endif
+
+typedef struct st_alarm_info
+{
+ ulong next_alarm_time;
+ uint active_alarms;
+ uint max_used_alarms;
+} ALARM_INFO;
+
+void thr_alarm_info(ALARM_INFO *info);
+
+#if defined(DONT_USE_THR_ALARM)
+
+#define USE_ALARM_THREAD
+#undef USE_ONE_SIGNAL_HAND
+
+typedef my_bool thr_alarm_t;
+typedef my_bool ALARM;
+
+#define thr_alarm_init(A) (*(A))=0
+#define thr_alarm_in_use(A) (*(A) != 0)
+#define thr_end_alarm(A)
+#define thr_alarm(A,B,C) ((*(A)=1)-1)
+/* The following should maybe be (*(A)) */
+#define thr_got_alarm(A) 0
+#define init_thr_alarm(A)
+#define thr_alarm_kill(A)
+#define resize_thr_alarm(N)
+#define end_thr_alarm(A)
+
+#else
+#if defined(__WIN__)
+typedef struct st_thr_alarm_entry
+{
+ UINT_PTR crono;
+} thr_alarm_entry;
+
+#else /* System with posix threads */
+
+typedef int thr_alarm_entry;
+
+#define thr_got_alarm(thr_alarm) (**(thr_alarm))
+
+#endif /* __WIN__ */
+
+typedef thr_alarm_entry* thr_alarm_t;
+
+typedef struct st_alarm {
+ ulong expire_time;
+ thr_alarm_entry alarmed; /* set when alarm is due */
+ pthread_t thread;
+ my_thread_id thread_id;
+ my_bool malloced;
+} ALARM;
+
+extern uint thr_client_alarm;
+extern pthread_t alarm_thread;
+
+#define thr_alarm_init(A) (*(A))=0
+#define thr_alarm_in_use(A) (*(A)!= 0)
+void init_thr_alarm(uint max_alarm);
+void resize_thr_alarm(uint max_alarms);
+my_bool thr_alarm(thr_alarm_t *alarmed, uint sec, ALARM *buff);
+void thr_alarm_kill(my_thread_id thread_id);
+void thr_end_alarm(thr_alarm_t *alarmed);
+void end_thr_alarm(my_bool free_structures);
+sig_handler process_alarm(int);
+#ifndef thr_got_alarm
+my_bool thr_got_alarm(thr_alarm_t *alrm);
+#endif
+
+
+#endif /* DONT_USE_THR_ALARM */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* _thr_alarm_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/thr_lock.h b/BuildTools/centos/dep/mysql-5.6.14/include/thr_lock.h
new file mode 100644
index 000000000..c5638ec2c
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/thr_lock.h
@@ -0,0 +1,163 @@
+/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/* For use with thr_lock:s */
+
+#ifndef _thr_lock_h
+#define _thr_lock_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+struct st_thr_lock;
+extern ulong locks_immediate,locks_waited ;
+
+/*
+ Important: if a new lock type is added, a matching lock description
+ must be added to sql_test.cc's lock_descriptions array.
+*/
+enum thr_lock_type { TL_IGNORE=-1,
+ TL_UNLOCK, /* UNLOCK ANY LOCK */
+ /*
+ Parser only! At open_tables() becomes TL_READ or
+ TL_READ_NO_INSERT depending on the binary log format
+ (SBR/RBR) and on the table category (log table).
+ Used for tables that are read by statements which
+ modify tables.
+ */
+ TL_READ_DEFAULT,
+ TL_READ, /* Read lock */
+ TL_READ_WITH_SHARED_LOCKS,
+ /* High prior. than TL_WRITE. Allow concurrent insert */
+ TL_READ_HIGH_PRIORITY,
+ /* READ, Don't allow concurrent insert */
+ TL_READ_NO_INSERT,
+ /*
+ Write lock, but allow other threads to read / write.
+ Used by BDB tables in MySQL to mark that someone is
+ reading/writing to the table.
+ */
+ TL_WRITE_ALLOW_WRITE,
+ /*
+ WRITE lock used by concurrent insert. Will allow
+ READ, if one could use concurrent insert on table.
+ */
+ TL_WRITE_CONCURRENT_INSERT,
+ /* Write used by INSERT DELAYED. Allows READ locks */
+ TL_WRITE_DELAYED,
+ /*
+ parser only! Late bound low_priority flag.
+ At open_tables() becomes thd->update_lock_default.
+ */
+ TL_WRITE_DEFAULT,
+ /* WRITE lock that has lower priority than TL_READ */
+ TL_WRITE_LOW_PRIORITY,
+ /* Normal WRITE lock */
+ TL_WRITE,
+ /* Abort new lock request with an error */
+ TL_WRITE_ONLY};
+
+enum enum_thr_lock_result { THR_LOCK_SUCCESS= 0, THR_LOCK_ABORTED= 1,
+ THR_LOCK_WAIT_TIMEOUT= 2, THR_LOCK_DEADLOCK= 3 };
+
+
+extern ulong max_write_lock_count;
+extern my_bool thr_lock_inited;
+extern enum thr_lock_type thr_upgraded_concurrent_insert_lock;
+
+/*
+ A description of the thread which owns the lock. The address
+ of an instance of this structure is used to uniquely identify the thread.
+*/
+
+typedef struct st_thr_lock_info
+{
+ pthread_t thread;
+ my_thread_id thread_id;
+} THR_LOCK_INFO;
+
+
+typedef struct st_thr_lock_data {
+ THR_LOCK_INFO *owner;
+ struct st_thr_lock_data *next,**prev;
+ struct st_thr_lock *lock;
+ mysql_cond_t *cond;
+ enum thr_lock_type type;
+ void *status_param; /* Param to status functions */
+ void *debug_print_param;
+ struct PSI_table *m_psi;
+} THR_LOCK_DATA;
+
+struct st_lock_list {
+ THR_LOCK_DATA *data,**last;
+};
+
+typedef struct st_thr_lock {
+ LIST list;
+ mysql_mutex_t mutex;
+ struct st_lock_list read_wait;
+ struct st_lock_list read;
+ struct st_lock_list write_wait;
+ struct st_lock_list write;
+ /* write_lock_count is incremented for write locks and reset on read locks */
+ ulong write_lock_count;
+ uint read_no_write_count;
+ void (*get_status)(void*, int); /* When one gets a lock */
+ void (*copy_status)(void*,void*);
+ void (*update_status)(void*); /* Before release of write */
+ void (*restore_status)(void*); /* Before release of read */
+ my_bool (*check_status)(void *);
+} THR_LOCK;
+
+
+extern LIST *thr_lock_thread_list;
+extern mysql_mutex_t THR_LOCK_lock;
+
+my_bool init_thr_lock(void); /* Must be called once/thread */
+void thr_lock_info_init(THR_LOCK_INFO *info);
+void thr_lock_init(THR_LOCK *lock);
+void thr_lock_delete(THR_LOCK *lock);
+void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data,
+ void *status_param);
+enum enum_thr_lock_result thr_lock(THR_LOCK_DATA *data,
+ THR_LOCK_INFO *owner,
+ enum thr_lock_type lock_type,
+ ulong lock_wait_timeout);
+void thr_unlock(THR_LOCK_DATA *data);
+enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
+ uint count, THR_LOCK_INFO *owner,
+ ulong lock_wait_timeout);
+void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
+void
+thr_lock_merge_status(THR_LOCK_DATA **data, uint count);
+void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock);
+my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
+void thr_print_locks(void); /* For debugging */
+my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data,
+ enum thr_lock_type new_lock_type,
+ ulong lock_wait_timeout);
+void thr_downgrade_write_lock(THR_LOCK_DATA *data,
+ enum thr_lock_type new_lock_type);
+my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data,
+ ulong lock_wait_timeout);
+void thr_set_lock_wait_callback(void (*before_wait)(void),
+ void (*after_wait)(void));
+#ifdef __cplusplus
+}
+#endif
+#endif /* _thr_lock_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/typelib.h b/BuildTools/centos/dep/mysql-5.6.14/include/typelib.h
new file mode 100644
index 000000000..919dd69d6
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/typelib.h
@@ -0,0 +1,54 @@
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+
+#ifndef _typelib_h
+#define _typelib_h
+
+#include "my_alloc.h"
+
+typedef struct st_typelib { /* Different types saved here */
+ unsigned int count; /* How many types */
+ const char *name; /* Name of typelib */
+ const char **type_names;
+ unsigned int *type_lengths;
+} TYPELIB;
+
+extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
+extern int find_type_or_exit(const char *x, TYPELIB *typelib,
+ const char *option);
+#define FIND_TYPE_BASIC 0
+/** makes @c find_type() require the whole name, no prefix */
+#define FIND_TYPE_NO_PREFIX (1 << 0)
+/** always implicitely on, so unused, but old code may pass it */
+#define FIND_TYPE_NO_OVERWRITE (1 << 1)
+/** makes @c find_type() accept a number */
+#define FIND_TYPE_ALLOW_NUMBER (1 << 2)
+/** makes @c find_type() treat ',' as terminator */
+#define FIND_TYPE_COMMA_TERM (1 << 3)
+
+extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags);
+extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
+extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
+
+extern TYPELIB sql_protocol_typelib;
+
+my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name,
+ my_ulonglong cur_set, my_ulonglong default_set,
+ const char *str, unsigned int length,
+ char **err_pos, unsigned int *err_len);
+
+#endif /* _typelib_h */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/violite.h b/BuildTools/centos/dep/mysql-5.6.14/include/violite.h
new file mode 100644
index 000000000..00e26e8a1
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/violite.h
@@ -0,0 +1,281 @@
+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/*
+ * Vio Lite.
+ * Purpose: include file for Vio that will work with C and C++
+ */
+
+#ifndef vio_violite_h_
+#define vio_violite_h_
+
+#include "my_net.h" /* needed because of struct in_addr */
+#include
+
+
+/* Simple vio interface in C; The functions are implemented in violite.c */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+typedef struct st_vio Vio;
+#endif /* __cplusplus */
+
+enum enum_vio_type
+{
+ VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL,
+ VIO_TYPE_SHARED_MEMORY
+};
+
+/**
+ VIO I/O events.
+*/
+enum enum_vio_io_event
+{
+ VIO_IO_EVENT_READ,
+ VIO_IO_EVENT_WRITE,
+ VIO_IO_EVENT_CONNECT
+};
+
+#define VIO_LOCALHOST 1 /* a localhost connection */
+#define VIO_BUFFERED_READ 2 /* use buffered read */
+#define VIO_READ_BUFFER_SIZE 16384 /* size of read buffer */
+#define VIO_DESCRIPTION_SIZE 30 /* size of description */
+
+Vio* vio_new(my_socket sd, enum enum_vio_type type, uint flags);
+Vio* mysql_socket_vio_new(MYSQL_SOCKET mysql_socket, enum enum_vio_type type, uint flags);
+#ifdef __WIN__
+Vio* vio_new_win32pipe(HANDLE hPipe);
+Vio* vio_new_win32shared_memory(HANDLE handle_file_map,
+ HANDLE handle_map,
+ HANDLE event_server_wrote,
+ HANDLE event_server_read,
+ HANDLE event_client_wrote,
+ HANDLE event_client_read,
+ HANDLE event_conn_closed);
+#else
+#define HANDLE void *
+#endif /* __WIN__ */
+
+void vio_delete(Vio* vio);
+int vio_shutdown(Vio* vio);
+my_bool vio_reset(Vio* vio, enum enum_vio_type type,
+ my_socket sd, void *ssl, uint flags);
+size_t vio_read(Vio *vio, uchar * buf, size_t size);
+size_t vio_read_buff(Vio *vio, uchar * buf, size_t size);
+size_t vio_write(Vio *vio, const uchar * buf, size_t size);
+/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */
+int vio_fastsend(Vio *vio);
+/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible */
+int vio_keepalive(Vio *vio, my_bool onoff);
+/* Whenever we should retry the last read/write operation. */
+my_bool vio_should_retry(Vio *vio);
+/* Check that operation was timed out */
+my_bool vio_was_timeout(Vio *vio);
+/* Short text description of the socket for those, who are curious.. */
+const char* vio_description(Vio *vio);
+/* Return the type of the connection */
+enum enum_vio_type vio_type(Vio* vio);
+/* Return last error number */
+int vio_errno(Vio*vio);
+/* Get socket number */
+my_socket vio_fd(Vio*vio);
+/* Remote peer's address and name in text form */
+my_bool vio_peer_addr(Vio *vio, char *buf, uint16 *port, size_t buflen);
+/* Wait for an I/O event notification. */
+int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout);
+my_bool vio_is_connected(Vio *vio);
+#ifndef DBUG_OFF
+ssize_t vio_pending(Vio *vio);
+#endif
+/* Set timeout for a network operation. */
+int vio_timeout(Vio *vio, uint which, int timeout_sec);
+/* Connect to a peer. */
+my_bool vio_socket_connect(Vio *vio, struct sockaddr *addr, socklen_t len,
+ int timeout);
+
+my_bool vio_get_normalized_ip_string(const struct sockaddr *addr, int addr_length,
+ char *ip_string, size_t ip_string_size);
+
+my_bool vio_is_no_name_error(int err_code);
+
+int vio_getnameinfo(const struct sockaddr *sa,
+ char *hostname, size_t hostname_size,
+ char *port, size_t port_size,
+ int flags);
+
+#ifdef HAVE_OPENSSL
+#include
+#if OPENSSL_VERSION_NUMBER < 0x0090700f
+#define DES_cblock des_cblock
+#define DES_key_schedule des_key_schedule
+#define DES_set_key_unchecked(k,ks) des_set_key_unchecked((k),*(ks))
+#define DES_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e) des_ede3_cbc_encrypt((i),(o),(l),*(k1),*(k2),*(k3),(iv),(e))
+#endif
+/* apple deprecated openssl in MacOSX Lion */
+#ifdef __APPLE__
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#define HEADER_DES_LOCL_H dummy_something
+#define YASSL_MYSQL_COMPATIBLE
+#ifndef YASSL_PREFIX
+#define YASSL_PREFIX
+#endif
+/* Set yaSSL to use same type as MySQL do for socket handles */
+typedef my_socket YASSL_SOCKET_T;
+#define YASSL_SOCKET_T_DEFINED
+#include
+#include
+
+#ifndef EMBEDDED_LIBRARY
+enum enum_ssl_init_error
+{
+ SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
+ SSL_INITERR_NOMATCH, SSL_INITERR_BAD_PATHS, SSL_INITERR_CIPHERS,
+ SSL_INITERR_MEMFAIL, SSL_INITERR_LASTERR
+};
+const char* sslGetErrString(enum enum_ssl_init_error err);
+
+struct st_VioSSLFd
+{
+ SSL_CTX *ssl_context;
+};
+
+int sslaccept(struct st_VioSSLFd*, Vio *, long timeout, unsigned long *errptr);
+int sslconnect(struct st_VioSSLFd*, Vio *, long timeout, unsigned long *errptr);
+
+struct st_VioSSLFd
+*new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
+ const char *ca_file, const char *ca_path,
+ const char *cipher, enum enum_ssl_init_error *error,
+ const char *crl_file, const char *crl_path);
+struct st_VioSSLFd
+*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
+ const char *ca_file,const char *ca_path,
+ const char *cipher, enum enum_ssl_init_error *error,
+ const char *crl_file, const char *crl_path);
+void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
+#endif /* ! EMBEDDED_LIBRARY */
+#endif /* HAVE_OPENSSL */
+
+void ssl_start(void);
+void vio_end(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#if !defined(DONT_MAP_VIO)
+#define vio_delete(vio) (vio)->viodelete(vio)
+#define vio_errno(vio) (vio)->vioerrno(vio)
+#define vio_read(vio, buf, size) ((vio)->read)(vio,buf,size)
+#define vio_write(vio, buf, size) ((vio)->write)(vio, buf, size)
+#define vio_fastsend(vio) (vio)->fastsend(vio)
+#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
+#define vio_should_retry(vio) (vio)->should_retry(vio)
+#define vio_was_timeout(vio) (vio)->was_timeout(vio)
+#define vio_shutdown(vio) ((vio)->vioshutdown)(vio)
+#define vio_peer_addr(vio, buf, prt, buflen) (vio)->peer_addr(vio, buf, prt, buflen)
+#define vio_io_wait(vio, event, timeout) (vio)->io_wait(vio, event, timeout)
+#define vio_is_connected(vio) (vio)->is_connected(vio)
+#endif /* !defined(DONT_MAP_VIO) */
+
+/* This enumerator is used in parser - should be always visible */
+enum SSL_type
+{
+ SSL_TYPE_NOT_SPECIFIED= -1,
+ SSL_TYPE_NONE,
+ SSL_TYPE_ANY,
+ SSL_TYPE_X509,
+ SSL_TYPE_SPECIFIED
+};
+
+
+/* HFTODO - hide this if we don't want client in embedded server */
+/* This structure is for every connection on both sides */
+struct st_vio
+{
+ MYSQL_SOCKET mysql_socket; /* Instrumented socket */
+ my_bool localhost; /* Are we from localhost? */
+ struct sockaddr_storage local; /* Local internet address */
+ struct sockaddr_storage remote; /* Remote internet address */
+ int addrLen; /* Length of remote address */
+ enum enum_vio_type type; /* Type of connection */
+ my_bool inactive; /* Connection inactive (has been shutdown) */
+ char desc[VIO_DESCRIPTION_SIZE]; /* Description string. This
+ member MUST NOT be
+ used directly, but only
+ via function
+ "vio_description" */
+ char *read_buffer; /* buffer for vio_read_buff */
+ char *read_pos; /* start of unfetched data in the
+ read buffer */
+ char *read_end; /* end of unfetched data */
+ int read_timeout; /* Timeout value (ms) for read ops. */
+ int write_timeout; /* Timeout value (ms) for write ops. */
+
+ /*
+ VIO vtable interface to be implemented by VIO's like SSL, Socket,
+ Named Pipe, etc.
+ */
+
+ /*
+ viodelete is responsible for cleaning up the VIO object by freeing
+ internal buffers, closing descriptors, handles.
+ */
+ void (*viodelete)(Vio*);
+ int (*vioerrno)(Vio*);
+ size_t (*read)(Vio*, uchar *, size_t);
+ size_t (*write)(Vio*, const uchar *, size_t);
+ int (*timeout)(Vio*, uint, my_bool);
+ int (*viokeepalive)(Vio*, my_bool);
+ int (*fastsend)(Vio*);
+ my_bool (*peer_addr)(Vio*, char *, uint16*, size_t);
+ void (*in_addr)(Vio*, struct sockaddr_storage*);
+ my_bool (*should_retry)(Vio*);
+ my_bool (*was_timeout)(Vio*);
+ /*
+ vioshutdown is resposnible to shutdown/close the channel, so that no
+ further communications can take place, however any related buffers,
+ descriptors, handles can remain valid after a shutdown.
+ */
+ int (*vioshutdown)(Vio*);
+ my_bool (*is_connected)(Vio*);
+ my_bool (*has_data) (Vio*);
+ int (*io_wait)(Vio*, enum enum_vio_io_event, int);
+ my_bool (*connect)(Vio*, struct sockaddr *, socklen_t, int);
+#ifdef _WIN32
+ OVERLAPPED overlapped;
+ HANDLE hPipe;
+#endif
+#ifdef HAVE_OPENSSL
+ void *ssl_arg;
+#endif
+#ifdef HAVE_SMEM
+ HANDLE handle_file_map;
+ char *handle_map;
+ HANDLE event_server_wrote;
+ HANDLE event_server_read;
+ HANDLE event_client_wrote;
+ HANDLE event_client_read;
+ HANDLE event_conn_closed;
+ size_t shared_memory_remain;
+ char *shared_memory_pos;
+#endif /* HAVE_SMEM */
+};
+#endif /* vio_violite_h_ */
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/waiting_threads.h b/BuildTools/centos/dep/mysql-5.6.14/include/waiting_threads.h
new file mode 100644
index 000000000..554df7433
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/waiting_threads.h
@@ -0,0 +1,130 @@
+/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _waiting_threads_h
+#define _waiting_threads_h
+
+#include
+#include
+
+#include
+
+C_MODE_START
+
+typedef struct st_wt_resource_id WT_RESOURCE_ID;
+typedef struct st_wt_resource WT_RESOURCE;
+
+typedef struct st_wt_resource_type {
+ my_bool (*compare)(const void *a, const void *b);
+ const void *(*make_key)(const WT_RESOURCE_ID *id, uint *len); /* not used */
+} WT_RESOURCE_TYPE;
+
+struct st_wt_resource_id {
+ ulonglong value;
+ const WT_RESOURCE_TYPE *type;
+};
+/* the below differs from sizeof(WT_RESOURCE_ID) by the amount of padding */
+#define sizeof_WT_RESOURCE_ID (sizeof(ulonglong)+sizeof(void*))
+
+#define WT_WAIT_STATS 24
+#define WT_CYCLE_STATS 32
+extern ulonglong wt_wait_table[WT_WAIT_STATS];
+extern uint32 wt_wait_stats[WT_WAIT_STATS+1];
+extern uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1];
+extern uint32 wt_success_stats;
+
+typedef struct st_wt_thd {
+ /*
+ XXX
+ there's no protection (mutex) against concurrent access of the
+ dynarray below. it is assumed that a caller will have it anyway
+ (not to protect this array but to protect its own - caller's -
+ data structures), and we'll get it for free. A caller needs to
+ ensure that a blocker won't release a resource before a blocked
+ thread starts waiting, which is usually done with a mutex.
+
+ If the above assumption is wrong, we'll need to add a mutex here.
+ */
+ DYNAMIC_ARRAY my_resources;
+ /*
+ 'waiting_for' is modified under waiting_for->lock, and only by thd itself
+ 'waiting_for' is read lock-free (using pinning protocol), but a thd object
+ can read its own 'waiting_for' without any locks or tricks.
+ */
+ WT_RESOURCE *waiting_for;
+ LF_PINS *pins;
+
+ /* pointers to values */
+ const ulong *timeout_short;
+ const ulong *deadlock_search_depth_short;
+ const ulong *timeout_long;
+ const ulong *deadlock_search_depth_long;
+
+ /*
+ weight relates to the desirability of a transaction being killed if it's
+ part of a deadlock. In a deadlock situation transactions with lower weights
+ are killed first.
+
+ Examples of using the weight to implement different selection strategies:
+
+ 1. Latest
+ Keep all weights equal.
+ 2. Random
+ Assight weights at random.
+ (variant: modify a weight randomly before every lock request)
+ 3. Youngest
+ Set weight to -NOW()
+ 4. Minimum locks
+ count locks granted in your lock manager, store the value as a weight
+ 5. Minimum work
+ depends on the definition of "work". For example, store the number
+ of rows modifies in this transaction (or a length of REDO log for a
+ transaction) as a weight.
+
+ It is only statistically relevant and is not protected by any locks.
+ */
+ ulong volatile weight;
+ /*
+ 'killed' is indirectly protected by waiting_for->lock because
+ a killed thread needs to clear its 'waiting_for' and thus needs a lock.
+ That is a thread needs an exclusive lock to read 'killed' reliably.
+ But other threads may change 'killed' from 0 to 1, a shared
+ lock is enough for that.
+ */
+ my_bool killed;
+#ifndef DBUG_OFF
+ const char *name;
+#endif
+} WT_THD;
+
+#define WT_TIMEOUT ETIMEDOUT
+#define WT_OK 0
+#define WT_DEADLOCK -1
+#define WT_DEPTH_EXCEEDED -2
+#define WT_FREE_TO_GO -3
+
+void wt_init(void);
+void wt_end(void);
+void wt_thd_lazy_init(WT_THD *, const ulong *, const ulong *, const ulong *, const ulong *);
+void wt_thd_destroy(WT_THD *);
+int wt_thd_will_wait_for(WT_THD *, WT_THD *, const WT_RESOURCE_ID *);
+int wt_thd_cond_timedwait(WT_THD *, mysql_mutex_t *);
+void wt_thd_release(WT_THD *, const WT_RESOURCE_ID *);
+#define wt_thd_release_all(THD) wt_thd_release((THD), 0)
+my_bool wt_resource_id_memcmp(const void *, const void *);
+
+C_MODE_END
+
+#endif
diff --git a/BuildTools/centos/dep/mysql-5.6.14/include/welcome_copyright_notice.h b/BuildTools/centos/dep/mysql-5.6.14/include/welcome_copyright_notice.h
new file mode 100644
index 000000000..73b2a1382
--- /dev/null
+++ b/BuildTools/centos/dep/mysql-5.6.14/include/welcome_copyright_notice.h
@@ -0,0 +1,36 @@
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef _welcome_copyright_notice_h_
+#define _welcome_copyright_notice_h_
+
+#define COPYRIGHT_NOTICE_CURRENT_YEAR "2013"
+
+/*
+ This define specifies copyright notice which is displayed by every MySQL
+ program on start, or on help screen.
+*/
+#define ORACLE_WELCOME_COPYRIGHT_NOTICE(first_year) \
+ (strcmp(first_year, COPYRIGHT_NOTICE_CURRENT_YEAR) ? \
+ "Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR ", " \
+ "Oracle and/or its affiliates. All rights reserved.\n\nOracle is a " \
+ "registered trademark of Oracle Corporation and/or its\naffiliates. " \
+ "Other names may be trademarks of their respective\nowners.\n" : \
+ "Copyright (c) " first_year ", Oracle and/or its affiliates. " \
+ "All rights reserved.\n\nOracle is a registered trademark of " \
+ "Oracle Corporation and/or its\naffiliates. Other names may be " \
+ "trademarks of their respective\nowners.\n")
+
+#endif /* _welcome_copyright_notice_h_ */
diff --git a/BuildTools/centos/readme.txt b/BuildTools/centos/readme.txt
new file mode 100644
index 000000000..46ed720b2
--- /dev/null
+++ b/BuildTools/centos/readme.txt
@@ -0,0 +1,31 @@
+*****************************************************************
+*** Build Instructions for GeoDa. Current as of GeoDa 1.5.23 ***
+*****************************************************************
+
+Overview: We assume the build machine hosts a recently-installed
+clean OS. This build guide contains notes on setting up the compile
+environment, obtaining the GeoDa source files and dependent libraries,
+compiling libraries and GeoDa, and finally packaging the program
+for distribution and installation.
+
+***************************************************
+*** Building GeoDa for 64-bit CentOS 6 or later ***
+***************************************************
+
+NOTE: This is just basic placeholder for now! Not currently complete.
+
+Build machine assumptions:
+- clean CentOS 64-bit installation with all OS updates
+
+1. Install C++ developer tools along with command-line subversion
+
+2. Use SVN to check out GeoDa trunk:
+ - From user's home directory: ~/
+ - svn co https://geodacenter.repositoryhosting.com/svn/geodacenter_geoda/trunk trunk
+
+3. cd to ~/trunk/BuildTools/centos
+
+4. run ./build64.sh to download and build GeoDa and everything it depends upon
+
+5. Package GeoDa for distribution / installation.
+
diff --git a/BuildTools/centos/run.sh b/BuildTools/centos/run.sh
new file mode 100755
index 000000000..b1079231c
--- /dev/null
+++ b/BuildTools/centos/run.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+GEODA_HOME=$(cd "$(dirname "$0")"; pwd)
+#GEODA_HOME=/usr/local/geoda
+
+export LD_LIBRARY_PATH=$GEODA_HOME/plugins:$ORACLE_HOME:$LD_LIBRARY_PATH
+export GDAL_DATA=$GEODA_HOME/gdaldata
+export OGR_DRIVER_PATH=$GEODA_HOME/plugins
+exec "$GEODA_HOME/GeoDa"
diff --git a/BuildTools/centos/run_geoda.sh b/BuildTools/centos/run_geoda.sh
new file mode 100755
index 000000000..911628fa3
--- /dev/null
+++ b/BuildTools/centos/run_geoda.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+#GEODA_HOME=$(cd "$(dirname "$0")"; pwd)
+GEODA_HOME=/usr/local/geoda
+
+export LD_LIBRARY_PATH=$GEODA_HOME/plugins:$ORACLE_HOME:$LD_LIBRARY_PATH
+export GDAL_DATA=$GEODA_HOME/gdaldata
+export OGR_DRIVER_PATH=$GEODA_HOME/plugins
+exec "$GEODA_HOME/GeoDa"
diff --git a/BuildTools/macosx/GNUmakefile b/BuildTools/macosx/GNUmakefile
new file mode 100644
index 000000000..ac8d364e9
--- /dev/null
+++ b/BuildTools/macosx/GNUmakefile
@@ -0,0 +1,129 @@
+ifndef GEODA_HOME
+A = $(shell ls -l)
+$(error You have to setup GEODA_HOME variable e.g. export GEODA_HOME=\$PWD, or run build.sh)
+endif
+
+include ../../GeoDamake.opt
+
+GeoDa_OBJ = $(wildcard $(GeoDa_ROOT)/o/*.o)
+
+default: compile-geoda
+
+app: build-geoda-mac
+
+compile-geoda: dataviewer-target generic-target dialogtools-target \
+ explore-target knn-target regression-target \
+ shapeoperations-target resource-target varcalc-target \
+ geoda-target
+
+test:
+ echo $(WX_HEADER)
+
+resource-target:
+ (cd $(GeoDa_ROOT)/rc; $(MAKE) xrc; $(MAKE))
+
+dataviewer-target:
+ (cd $(GeoDa_ROOT)/DataViewer; $(MAKE))
+
+generic-target:
+ (cd $(GeoDa_ROOT)/Generic; $(MAKE))
+
+dialogtools-target:
+ (cd $(GeoDa_ROOT)/DialogTools; $(MAKE))
+
+explore-target:
+ (cd $(GeoDa_ROOT)/Explore; $(MAKE))
+
+knn-target:
+ (cd $(GeoDa_ROOT)/kNN; $(MAKE))
+
+regression-target:
+ (cd $(GeoDa_ROOT)/Regression; $(MAKE))
+
+shapeoperations-target:
+ (cd $(GeoDa_ROOT)/ShapeOperations; $(MAKE))
+
+varcalc-target:
+ (cd $(GeoDa_ROOT)/VarCalc; $(MAKE))
+
+geoda-target:
+ (cd $(GeoDa_ROOT); $(MAKE))
+
+build-geoda-mac:
+ rm -rf build/GeoDa.app
+ mkdir -p build
+ mkdir -p build/GeoDa.app
+ mkdir -p build/GeoDa.app/Contents
+ mkdir -p build/GeoDa.app/Contents/MacOS
+ mkdir -p build/GeoDa.app/Contents/Resources
+ mkdir -p build/GeoDa.app/Contents/Resources/gdaldata
+ mkdir -p build/GeoDa.app/Contents/Resources/plugins
+ $(LD) $(LDFLAGS) $(GeoDa_OBJ) $(LIBS) -o build/GeoDa.app/Contents/MacOS/GeoDa
+ cp run.sh build/GeoDa.app/Contents/MacOS/run.sh
+ cp GeoDa-GDAL-Info.plist build/GeoDa.app/Contents/Info.plist
+ #sed -i '' 's/ORACLE_HOME_PATH/$(subst /,\/,$(ORACLE_HOME))/g' build/GeoDa.app/Contents/Info.plist
+ #sed -i '' 's/ORACLE_LIBRARY_PATH/$(subst /,\/,$(DYLD_LIBRARY_PATH))/g' build/GeoDa.app/Contents/Info.plist
+ cp $(GeoDa_ROOT)/rc/data_viewer_dialogs.xrc build/GeoDa.app/Contents/Resources
+ cp $(GeoDa_ROOT)/rc/dialogs.xrc build/GeoDa.app/Contents/Resources
+ cp $(GeoDa_ROOT)/rc/GeoDa.icns build/GeoDa.app/Contents/Resources
+ cp $(GeoDa_ROOT)/rc/menus.xrc build/GeoDa.app/Contents/Resources
+ cp $(GeoDa_ROOT)/rc/toolbar.xrc build/GeoDa.app/Contents/Resources
+ cp libraries/share/gdal/* build/GeoDa.app/Contents/Resources/gdaldata
+ cp libraries/lib/libgdal.1.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libkmlengine.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libkmldom.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libkmlbase.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libkmlconvenience.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libkmlregionator.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libkmlxsd.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libminizip.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/liburiparser.1.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libxerces-c-3.1.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libpq.5.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libspatialite.5.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libfreexl.1.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libproj.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libsqlite3.0.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libgeos_c.1.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libgeos-3.3.8.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp libraries/lib/libcurl.4.dylib build/GeoDa.app/Contents/Resources/plugins/
+ #cp libraries/lib/libmysqlclient.18.dylib build/GeoDa.app/Contents/Resources/plugins/
+ cp plugins/ogr_OCI.so build/GeoDa.app/Contents/Resources/plugins/ogr_OCI.so
+ cp plugins/ogr_FileGDB.so build/GeoDa.app/Contents/Resources/plugins/ogr_FileGDB.so
+ install_name_tool -change "$(GEODA_HOME)/libraries/lib/libgdal.1.dylib" "@executable_path/../Resources/plugins/libgdal.1.dylib" build/GeoDa.app/Contents/MacOS/GeoDa
+ install_name_tool -change "$(GEODA_HOME)/libraries/lib/libgdal.1.dylib" "@executable_path/../Resources/plugins/libgdal.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "libmysqlclient.18.dylib" "@executable_path/../Resources/plugins/libmysqlclient.18.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmlengine.0.dylib" "@executable_path/../Resources/plugins/libkmlengine.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmlregionator.0.dylib" "@executable_path/../Resources/plugins/libkmlregionator.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmlxsd.0.dylib" "@executable_path/../Resources/plugins/libkmlxsd.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmldom.0.dylib" "@executable_path/../Resources/plugins/libkmldom.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmlbase.0.dylib" "@executable_path/../Resources/plugins/libkmlbase.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmlconvenience.0.dylib" "@executable_path/../Resources/plugins/libkmlconvenience.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libminizip.0.dylib" "@executable_path/../Resources/plugins/libminizip.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ install_name_tool -change "$(GEODA_HOME)/libraries/lib/liburiparser.1.dylib" "@executable_path/../Resources/plugins/liburiparser.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libxerces-c-3.1.dylib" "@executable_path/../Resources/plugins/libxerces-c-3.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libpq.5.dylib" "@executable_path/../Resources/plugins/libpq.5.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libspatialite.5.dylib" "@executable_path/../Resources/plugins/libspatialite.5.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libfreexl.1.dylib" "@executable_path/../Resources/plugins/libfreexl.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libproj.0.dylib" "@executable_path/../Resources/plugins/libproj.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libsqlite3.0.dylib" "@executable_path/../Resources/plugins/libsqlite3.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libgeos_c.1.dylib" "@executable_path/../Resources/plugins/libgeos_c.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libgeos-3.3.8.dylib" "@executable_path/../Resources/plugins/libgeos-3.3.8.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libcurl.4.dylib" "@executable_path/../Resources/plugins/libcurl.4.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ install_name_tool -change "$(GEODA_HOME)/libraries/lib/libcurl.4.dylib" "@executable_path/../Resources/plugins/libcurl.4.dylib" build/GeoDa.app/Contents/Resources/plugins/libgdal.1.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmlengine.0.dylib" "@executable_path/../Resources/plugins/libkmlengine.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libkmlengine.0.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libkmlbase.0.dylib" "@executable_path/../Resources/plugins/libkmlbase.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libkmlengine.0.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libminizip.0.dylib" "@executable_path/../Resources/plugins/libminizip.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libkmlengine.0.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/liburiparser.1.dylib" "@executable_path/../Resources/plugins/liburiparser.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libkmlengine.0.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libminizip.0.dylib" "@executable_path/../Resources/plugins/libminizip.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libkmlbase.0.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/liburiparser.1.dylib" "@executable_path/../Resources/plugins/liburiparser.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libkmlbase.0.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libfreexl.1.dylib" "@executable_path/../Resources/plugins/libfreexl.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libspatialite.5.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libproj.0.dylib" "@executable_path/../Resources/plugins/libproj.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libspatialite.5.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libsqlite3.0.dylib" "@executable_path/../Resources/plugins/libsqlite3.0.dylib" build/GeoDa.app/Contents/Resources/plugins/libspatialite.5.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libgeos_c.1.dylib" "@executable_path/../Resources/plugins/libgeos_c.1.dylib" build/GeoDa.app/Contents/Resources/plugins/libspatialite.5.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libgeos-3.3.8.dylib" "@executable_path/../Resources/plugins/libgeos-3.3.8.dylib" build/GeoDa.app/Contents/Resources/plugins/libspatialite.5.dylib
+ #install_name_tool -change "$(GEODA_HOME)/libraries/lib/libgeos-3.3.8.dylib" "@executable_path/../Resources/plugins/libgeos-3.3.8.dylib" build/GeoDa.app/Contents/Resources/plugins/libgeos_c.1.dylib
+
+clean:
+ rm -f ../../o/*
+ rm -rf build/GeoDa.app
diff --git a/BuildTools/macosx/GeoDa-GDAL-Info.plist b/BuildTools/macosx/GeoDa-GDAL-Info.plist
new file mode 100644
index 000000000..ed808bd32
--- /dev/null
+++ b/BuildTools/macosx/GeoDa-GDAL-Info.plist
@@ -0,0 +1,57 @@
+
+
+
+
+ BuildMachineOSBuild
+ 10K549
+ CFBundleDevelopmentRegion
+ English
+ CFBundleName
+ GeoDa
+ CFBundleExecutable
+ run.sh
+ CFBundleIconFile
+ GeoDa.icns
+ CFBundleIdentifier
+ edu.asu.geodacenter.GeoDa
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ APPL
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ DTCompiler
+ 4.2
+ DTPlatformBuild
+ 10M2518
+ DTPlatformVersion
+ PG
+ DTSDKBuild
+ 10K549
+ DTSDKName
+
+ DTXcode
+ 0400
+ DTXcodeBuild
+ 10M2518
+ CFBundleDocumentTypes
+
+
+ CFBundleTypeExtensions
+
+ gda
+
+ CFBundleTypeIconFile
+ GeoDa
+ CFBundleTypeName
+ GeoDa project file
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Owner
+
+
+
+
diff --git a/BuildTools/macosx/GeoDa-Xcode-Info.plist b/BuildTools/macosx/GeoDa-Xcode-Info.plist
new file mode 100644
index 000000000..9df80b7d8
--- /dev/null
+++ b/BuildTools/macosx/GeoDa-Xcode-Info.plist
@@ -0,0 +1,55 @@
+
+
+
+
+ BuildMachineOSBuild
+ 10K549
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIconFile
+ GeoDa.icns
+ CFBundleIdentifier
+ edu.asu.geodacenter.GeoDa
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ APPL
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ DTCompiler
+ 4.2
+ DTPlatformBuild
+ 10M2518
+ DTPlatformVersion
+ PG
+ DTSDKBuild
+ 10K549
+ DTSDKName
+
+ DTXcode
+ 0400
+ DTXcodeBuild
+ 10M2518
+ CFBundleDocumentTypes
+
+
+ CFBundleTypeExtensions
+
+ gda
+
+ CFBundleTypeIconFile
+ GeoDa
+ CFBundleTypeName
+ GeoDa project file
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Owner
+
+
+
+
diff --git a/GeoDa.xcodeproj/project.pbxproj b/BuildTools/macosx/GeoDa.xcodeproj/project.pbxproj
similarity index 74%
rename from GeoDa.xcodeproj/project.pbxproj
rename to BuildTools/macosx/GeoDa.xcodeproj/project.pbxproj
index ce9647a07..0583c709f 100644
--- a/GeoDa.xcodeproj/project.pbxproj
+++ b/BuildTools/macosx/GeoDa.xcodeproj/project.pbxproj
@@ -7,30 +7,55 @@
objects = {
/* Begin PBXBuildFile section */
+ A11F1B7F184FDFB3006F5F98 /* OGRColumn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A11F1B7D184FDFB3006F5F98 /* OGRColumn.cpp */; };
+ A11F1B821850437A006F5F98 /* OGRTableOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A11F1B801850437A006F5F98 /* OGRTableOperation.cpp */; };
+ A12E0F4F1705087A00B6059C /* OGRDataAdapter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A12E0F4E1705087A00B6059C /* OGRDataAdapter.cpp */; };
+ A13B6B9418760CF100F93ACF /* SaveAsDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A13B6B9318760CF100F93ACF /* SaveAsDlg.cpp */; };
+ A16BA470183D626200D3B7DA /* DatasourceDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A16BA46E183D626200D3B7DA /* DatasourceDlg.cpp */; };
+ A19F51501756A11E006E31B4 /* plugins in Resources */ = {isa = PBXBuildFile; fileRef = A19F514D1756A11E006E31B4 /* plugins */; };
+ A1B93AC017D18735007F8195 /* ProjectConf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1B93ABF17D18735007F8195 /* ProjectConf.cpp */; };
+ A1BE9E4D174DD831007B9C64 /* GdaShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1BE9E4B174DD831007B9C64 /* GdaShape.cpp */; };
+ A1BE9E51174DD85F007B9C64 /* GdaAppResources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1BE9E4F174DD85F007B9C64 /* GdaAppResources.cpp */; };
+ A1C9F3ED18B55EE000E14394 /* FieldNameCorrectionDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1C9F3EC18B55EE000E14394 /* FieldNameCorrectionDlg.cpp */; };
+ A1CAD45E17A7334E0026AC55 /* QuadTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1CAD45D17A7334E0026AC55 /* QuadTree.cpp */; };
+ A1D82DEF174D3EB6003DE20A /* ConnectDatasourceDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1D82DEE174D3EB6003DE20A /* ConnectDatasourceDlg.cpp */; };
+ A1DA623A17BCBC070070CAAB /* AutoCompTextCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1DA623817BCBC070070CAAB /* AutoCompTextCtrl.cpp */; };
+ A1E77E1A177D6A2E00CC1037 /* ExportDataDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E77E18177D6A2E00CC1037 /* ExportDataDlg.cpp */; };
+ A1E77FDC17889BE200CC1037 /* OGRTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E77FDA17889BE200CC1037 /* OGRTable.cpp */; };
+ A1E78139178A90A100CC1037 /* OGRDatasourceProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E78133178A90A100CC1037 /* OGRDatasourceProxy.cpp */; };
+ A1E7813A178A90A100CC1037 /* OGRFieldProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E78135178A90A100CC1037 /* OGRFieldProxy.cpp */; };
+ A1E7813B178A90A100CC1037 /* OGRLayerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E78137178A90A100CC1037 /* OGRLayerProxy.cpp */; };
+ A1EF332F18E35D8300E19375 /* LocaleSetupDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1EF332D18E35D8300E19375 /* LocaleSetupDlg.cpp */; };
+ A1F1BA5C178D3B46005A46E5 /* GdaCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F1BA5A178D3B46005A46E5 /* GdaCache.cpp */; };
+ A1F1BA99178D46B8005A46E5 /* cache.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = A1F1BA98178D46B8005A46E5 /* cache.sqlite */; };
+ A1FD8C19186908B800C35C41 /* CustomClassifPtree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1FD8C17186908B800C35C41 /* CustomClassifPtree.cpp */; };
DD00ADE811138A2C008FE572 /* TemplateFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD00ADE711138A2C008FE572 /* TemplateFrame.cpp */; };
DD0DC4BA13CBA7B10022B65A /* RangeSelectionDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD0DC4B813CBA7B10022B65A /* RangeSelectionDlg.cpp */; };
+ DD0FEBBC1909B7A000930418 /* NumCategoriesDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD0FEBBA1909B7A000930418 /* NumCategoriesDlg.cpp */; };
DD115EA312BBDDA000E1CC73 /* ProgressDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD115EA212BBDDA000E1CC73 /* ProgressDlg.cpp */; };
- DD1472111394270C001A3D30 /* DataViewerApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1472101394270C001A3D30 /* DataViewerApp.cpp */; };
DD181BC813A90445004B0EC2 /* SaveToTableDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD181BC613A90445004B0EC2 /* SaveToTableDlg.cpp */; };
DD203F9D14C0C960006A731B /* MapNewView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD203F9B14C0C960006A731B /* MapNewView.cpp */; };
DD209598139F129900B9E648 /* GetisOrdChoiceDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD209596139F129900B9E648 /* GetisOrdChoiceDlg.cpp */; };
- DD26FC44111B8E3F005A410F /* MyShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD26FC40111B8E3F005A410F /* MyShape.cpp */; };
DD27ECBC0F2E43B5009C5C42 /* GenUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64A7240F2E26AA006B1E6D /* GenUtils.cpp */; };
DD27EF050F2F6CBE009C5C42 /* ShapeFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD27EF040F2F6CBE009C5C42 /* ShapeFile.cpp */; };
+ DD2A6FE0178C7F7C00197093 /* DataSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2A6FDE178C7F7C00197093 /* DataSource.cpp */; };
DD2B42B11522552B00888E51 /* BoxNewPlotView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2B42AF1522552B00888E51 /* BoxNewPlotView.cpp */; };
DD2B433F1522A93700888E51 /* HistogramView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2B433D1522A93700888E51 /* HistogramView.cpp */; };
DD2B43421522A95100888E51 /* PCPNewView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD2B43401522A95100888E51 /* PCPNewView.cpp */; };
+ DD3BA0D0187111DE00CA4152 /* WeightsManPtree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD3BA0CE187111DE00CA4152 /* WeightsManPtree.cpp */; };
+ DD3BA4481871EE9A00CA4152 /* DefaultVarsPtree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD3BA4461871EE9A00CA4152 /* DefaultVarsPtree.cpp */; };
+ DD40B083181894F20084173C /* VarGroupingEditorDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD40B081181894F20084173C /* VarGroupingEditorDlg.cpp */; };
+ DD49747A176F59670007BB9F /* DbfTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD497479176F59670007BB9F /* DbfTable.cpp */; };
+ DD4974B71770AC700007BB9F /* TableFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4974B61770AC700007BB9F /* TableFrame.cpp */; };
+ DD4974BA1770AC840007BB9F /* TableBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4974B91770AC840007BB9F /* TableBase.cpp */; };
+ DD4974E21770CE9E0007BB9F /* TableInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4974E11770CE9E0007BB9F /* TableInterface.cpp */; };
DD4E8B86164818A70014F1E7 /* ConnectivityHistView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD4E8B84164818A70014F1E7 /* ConnectivityHistView.cpp */; };
- DD575B471231B73800AA0C11 /* GeoDaConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD575B461231B73800AA0C11 /* GeoDaConst.cpp */; };
DD579B6A160BDAFE00BF8D53 /* DorlingCartogram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD579B68160BDAFE00BF8D53 /* DorlingCartogram.cpp */; };
DD5A579716E53EC40047DBB1 /* GeoDa.icns in Resources */ = {isa = PBXBuildFile; fileRef = DD5A579616E53EC40047DBB1 /* GeoDa.icns */; };
DD5FA1DA0F320DD50055A0E5 /* ShapeFileHdr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD5FA1D90F320DD50055A0E5 /* ShapeFileHdr.cpp */; };
DD5FA2360F3231940055A0E5 /* shp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD5FA2350F3231940055A0E5 /* shp.cpp */; };
DD60546816A83EEF0004BF02 /* CatClassifManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD60546616A83EEF0004BF02 /* CatClassifManager.cpp */; };
- DD62A7DF1407F2B40079F913 /* HighlightState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7B5E5E112606F400B6D0B0 /* HighlightState.cpp */; };
- DD6456C914881EA700AABF59 /* TimeChooserDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6456C714881EA700AABF59 /* TimeChooserDlg.cpp */; };
DD6456CA14881EA700AABF59 /* TimeChooserDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6456C714881EA700AABF59 /* TimeChooserDlg.cpp */; };
- DD64571F1488282900AABF59 /* FramesManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6B7288141A61400026D223 /* FramesManager.cpp */; };
DD64925C16DFF63400B3B0AB /* GeoDa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64925A16DFF63400B3B0AB /* GeoDa.cpp */; };
DD64A2880F20FE06006B1E6D /* GeneralWxUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64A2860F20FE06006B1E6D /* GeneralWxUtils.cpp */; };
DD64A5580F2910D2006B1E6D /* logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64A5570F2910D2006B1E6D /* logger.cpp */; };
@@ -39,10 +64,8 @@
DD6B7289141A61400026D223 /* FramesManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6B7288141A61400026D223 /* FramesManager.cpp */; };
DD6B74CC141ABC890026D223 /* menus.xrc in Resources */ = {isa = PBXBuildFile; fileRef = DD7976270F1D2C5E00496A84 /* menus.xrc */; };
DD6B74CD141ABC8C0026D223 /* toolbar.xrc in Resources */ = {isa = PBXBuildFile; fileRef = DD79761D0F1D2C5E00496A84 /* toolbar.xrc */; };
- DD6B74CE141ABCAC0026D223 /* data_viewer_dialogs.xrc in Resources */ = {isa = PBXBuildFile; fileRef = DDB056D813554EEC0044C441 /* data_viewer_dialogs.xrc */; };
DD6B74CF141ABCAD0026D223 /* data_viewer_dialogs.xrc in Resources */ = {isa = PBXBuildFile; fileRef = DDB056D813554EEC0044C441 /* data_viewer_dialogs.xrc */; };
DD6B74D0141ABCB40026D223 /* dialogs.xrc in Resources */ = {isa = PBXBuildFile; fileRef = DD7976200F1D2C5E00496A84 /* dialogs.xrc */; };
- DD7411021385B08B00554B0F /* DataViewerDeleteColDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7411001385B08B00554B0F /* DataViewerDeleteColDlg.cpp */; };
DD75A04115E81AF9008A7F8C /* VoronoiUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD75A04015E81AF9008A7F8C /* VoronoiUtils.cpp */; };
DD7974C80F1D250A00496A84 /* TemplateCanvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7974C30F1D250A00496A84 /* TemplateCanvas.cpp */; };
DD7974F30F1D292300496A84 /* ANN.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7974E10F1D292300496A84 /* ANN.cpp */; };
@@ -59,7 +82,6 @@
DD7975710F1D296F00496A84 /* CreatingWeightDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7975130F1D296F00496A84 /* CreatingWeightDlg.cpp */; };
DD79757C0F1D296F00496A84 /* HistIntervalDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7975290F1D296F00496A84 /* HistIntervalDlg.cpp */; };
DD79757F0F1D296F00496A84 /* LisaWhat2OpenDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD79752F0F1D296F00496A84 /* LisaWhat2OpenDlg.cpp */; };
- DD7975800F1D296F00496A84 /* MapQuantileDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7975310F1D296F00496A84 /* MapQuantileDlg.cpp */; };
DD7975820F1D296F00496A84 /* PCPDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7975350F1D296F00496A84 /* PCPDlg.cpp */; };
DD7975830F1D296F00496A84 /* PermutationCounterDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7975370F1D296F00496A84 /* PermutationCounterDlg.cpp */; };
DD7975850F1D296F00496A84 /* RandomizationDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD79753B0F1D296F00496A84 /* RandomizationDlg.cpp */; };
@@ -87,7 +109,7 @@
DD7976F30F1D2D3100496A84 /* Randik.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7976E60F1D2D3100496A84 /* Randik.cpp */; };
DD7976F50F1D2D3100496A84 /* shp2cnt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7976EB0F1D2D3100496A84 /* shp2cnt.cpp */; };
DD7976F60F1D2D3100496A84 /* shp2gwt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7976EE0F1D2D3100496A84 /* shp2gwt.cpp */; };
- DD79792A0F1E6CDB00496A84 /* MyAppResources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7979290F1E6CDB00496A84 /* MyAppResources.cpp */; };
+ DD7B2A9D185273FF00727A91 /* SaveButtonManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7B2A9B185273FF00727A91 /* SaveButtonManager.cpp */; };
DD7B5E60112606F400B6D0B0 /* HighlightState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7B5E5E112606F400B6D0B0 /* HighlightState.cpp */; };
DD7D5C711427F89B00DCFE5C /* LisaCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7D5C6F1427F89B00DCFE5C /* LisaCoordinator.cpp */; };
DD7E91D3151A8F3A001AAC4C /* LisaScatterPlotView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7E91D2151A8F3A001AAC4C /* LisaScatterPlotView.cpp */; };
@@ -97,29 +119,25 @@
DD89C87713D86BC7006C068D /* FieldNewCalcSheetDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD89C87013D86BC7006C068D /* FieldNewCalcSheetDlg.cpp */; };
DD89C87813D86BC7006C068D /* FieldNewCalcUniDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD89C87213D86BC7006C068D /* FieldNewCalcUniDlg.cpp */; };
DD8FACE11649595D007598CE /* DataMovieDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD8FACDF1649595D007598CE /* DataMovieDlg.cpp */; };
- DD975A43137C4C31009192A1 /* GenUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64A7240F2E26AA006B1E6D /* GenUtils.cpp */; };
+ DD92851C17F5FC7300B9481A /* VarOrderPtree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD92851A17F5FC7300B9481A /* VarOrderPtree.cpp */; };
+ DD92851F17F5FD4500B9481A /* VarOrderMapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD92851D17F5FD4500B9481A /* VarOrderMapper.cpp */; };
+ DD92853D17F5FE2E00B9481A /* VarGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD92853B17F5FE2E00B9481A /* VarGroup.cpp */; };
+ DD92D22417BAAF2300F8FE01 /* TimeEditorDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD92D22317BAAF2300F8FE01 /* TimeEditorDlg.cpp */; };
+ DD9C1B371910267900C0A427 /* GdaConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD9C1B351910267900C0A427 /* GdaConst.cpp */; };
DDA462FF164D785500EBBD8F /* TableState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA462FC164D785500EBBD8F /* TableState.cpp */; };
- DDA73B8013672821003783BC /* DataViewerResizeColDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA73B7E13672821003783BC /* DataViewerResizeColDlg.cpp */; };
DDA8D55214479228008156FB /* ScatterNewPlotView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD99BA1911D3F8D6003BB40E /* ScatterNewPlotView.cpp */; };
DDA8D5681447948B008156FB /* ShapeUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDC11EB1159783700E515BB /* ShapeUtils.cpp */; };
DDAA6540117F9B5D00D1010C /* Project.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAA653F117F9B5D00D1010C /* Project.cpp */; };
DDAD0218162754EA00748874 /* ConditionalNewView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDAD0216162754EA00748874 /* ConditionalNewView.cpp */; };
- DDB054891353B9DF0044C441 /* GeoDaConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD575B461231B73800AA0C11 /* GeoDaConst.cpp */; };
- DDB056DB13554F080044C441 /* MyDataViewerAppRes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB056DA13554F080044C441 /* MyDataViewerAppRes.cpp */; };
- DDB057461356318A0044C441 /* DataViewerAddColDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB057441356318A0044C441 /* DataViewerAddColDlg.cpp */; };
DDB0E42510B3181800F96D57 /* DbfFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB0E42310B3181800F96D57 /* DbfFile.cpp */; };
DDB0E42C10B34DBB00F96D57 /* AddIdVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB0E42A10B34DBB00F96D57 /* AddIdVariable.cpp */; };
- DDB252B413BBFD6700A7CE26 /* MergeTableDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB252B213BBFD6700A7CE26 /* MergeTableDlg.cpp */; };
DDB252B513BBFD6700A7CE26 /* MergeTableDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB252B213BBFD6700A7CE26 /* MergeTableDlg.cpp */; };
DDB2A75F15FA7DA900022ABE /* CartogramNewView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB2A75D15FA7DA900022ABE /* CartogramNewView.cpp */; };
DDB37A0811CBBB730020C8A9 /* TemplateLegend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB37A0711CBBB730020C8A9 /* TemplateLegend.cpp */; };
DDB77C0D139820CB00569A1E /* GStatCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB77C0B139820CB00569A1E /* GStatCoordinator.cpp */; };
DDB77F3E140D3CEF0032C7E4 /* FieldNewCalcSpecialDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB77F3C140D3CEF0032C7E4 /* FieldNewCalcSpecialDlg.cpp */; };
- DDBC145D15619DE8007CFAF7 /* CreateSpTmProjectDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDBC145B15619DE8007CFAF7 /* CreateSpTmProjectDlg.cpp */; };
- DDBC145E15619DE8007CFAF7 /* CreateSpTmProjectDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDBC145B15619DE8007CFAF7 /* CreateSpTmProjectDlg.cpp */; };
DDBC399A12300DEA007899A6 /* TestScrollWinView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDBC399812300DEA007899A6 /* TestScrollWinView.cpp */; };
- DDC60E72156ADF8400CBB233 /* TimeVariantImportDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC60E70156ADF8400CBB233 /* TimeVariantImportDlg.cpp */; };
- DDC60E73156ADF8400CBB233 /* TimeVariantImportDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC60E70156ADF8400CBB233 /* TimeVariantImportDlg.cpp */; };
+ DDC48EF618AE506400FD773F /* ProjectInfoDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC48EF418AE506400FD773F /* ProjectInfoDlg.cpp */; };
DDC9DD8515937AA000A0E5BA /* ExportCsvDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC9DD8315937AA000A0E5BA /* ExportCsvDlg.cpp */; };
DDC9DD8A15937B2F00A0E5BA /* CsvFileUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC9DD8815937B2F00A0E5BA /* CsvFileUtils.cpp */; };
DDC9DD9C15937C0200A0E5BA /* ImportCsvDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDC9DD9A15937C0200A0E5BA /* ImportCsvDlg.cpp */; };
@@ -132,41 +150,78 @@
DDD593B012E9F42100F7A7C4 /* WeightsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD593AF12E9F42100F7A7C4 /* WeightsManager.cpp */; };
DDD593C712E9F90000F7A7C4 /* GalWeight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD593C612E9F90000F7A7C4 /* GalWeight.cpp */; };
DDD593CA12E9F90C00F7A7C4 /* GwtWeight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD593C912E9F90C00F7A7C4 /* GwtWeight.cpp */; };
- DDD7E943134CA3D8003463F6 /* DbfGridTableBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD7E942134CA3D8003463F6 /* DbfGridTableBase.cpp */; };
- DDD7E985134CE5AF003463F6 /* logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64A5570F2910D2006B1E6D /* logger.cpp */; };
- DDD7EAFB134D2054003463F6 /* GeneralWxUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD64A2860F20FE06006B1E6D /* GeneralWxUtils.cpp */; };
- DDD7EBED134E8F82003463F6 /* DbfFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB0E42310B3181800F96D57 /* DbfFile.cpp */; };
DDDBF286163AD1D50070610C /* ConditionalMapView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDBF284163AD1D50070610C /* ConditionalMapView.cpp */; };
DDDBF29B163AD2BF0070610C /* ConditionalScatterPlotView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDBF29A163AD2BF0070610C /* ConditionalScatterPlotView.cpp */; };
DDDBF2AE163AD3AB0070610C /* ConditionalHistogramView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDBF2AC163AD3AB0070610C /* ConditionalHistogramView.cpp */; };
DDDC11F01159783700E515BB /* ShpFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDC11ED1159783700E515BB /* ShpFile.cpp */; };
- DDDFB970134B6BD6005EF636 /* DataViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDFB96F134B6BD6005EF636 /* DataViewer.cpp */; };
DDE3F5081677C46500D13A2C /* CatClassification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE3F5061677C46500D13A2C /* CatClassification.cpp */; };
- DDEB86CB1471C3D400FF781A /* OpenSpaceTimeDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDEB86C91471C3D400FF781A /* OpenSpaceTimeDlg.cpp */; };
- DDEB86CC1471C3D400FF781A /* OpenSpaceTimeDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDEB86C91471C3D400FF781A /* OpenSpaceTimeDlg.cpp */; };
+ DDEA3CBD193CEE5C0028B746 /* GdaFlexValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDEA3CB7193CEE5C0028B746 /* GdaFlexValue.cpp */; };
+ DDEA3CBE193CEE5C0028B746 /* GdaLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDEA3CB9193CEE5C0028B746 /* GdaLexer.cpp */; };
+ DDEA3CBF193CEE5C0028B746 /* GdaParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDEA3CBB193CEE5C0028B746 /* GdaParser.cpp */; };
+ DDEA3D01193D17130028B746 /* CalculatorDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDEA3CFF193D17130028B746 /* CalculatorDlg.cpp */; };
DDF14CDA139432B000363FA1 /* DataViewerDeleteColDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD7411001385B08B00554B0F /* DataViewerDeleteColDlg.cpp */; };
DDF14CDC139432C100363FA1 /* DataViewerResizeColDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDA73B7E13672821003783BC /* DataViewerResizeColDlg.cpp */; };
DDF14CDD139432CB00363FA1 /* DataViewerAddColDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB057441356318A0044C441 /* DataViewerAddColDlg.cpp */; };
- DDF14CDE139432D400363FA1 /* DataViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDDFB96F134B6BD6005EF636 /* DataViewer.cpp */; };
- DDF14CDF139432DB00363FA1 /* DbfGridTableBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDD7E942134CA3D8003463F6 /* DbfGridTableBase.cpp */; };
- DDF14DE11395551600363FA1 /* NewTableViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF14DE01395551600363FA1 /* NewTableViewer.cpp */; };
DDF1636B15064B7800E3E6BD /* LisaMapNewView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF1636A15064B7800E3E6BD /* LisaMapNewView.cpp */; };
DDF1637015064C2900E3E6BD /* GetisOrdMapNewView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF1636F15064C2900E3E6BD /* GetisOrdMapNewView.cpp */; };
DDF53FF3167A39520042B453 /* CatClassifState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF53FF0167A39520042B453 /* CatClassifState.cpp */; };
DDF5400B167A39CA0042B453 /* CatClassifDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF54009167A39CA0042B453 /* CatClassifDlg.cpp */; };
DDF85D1813B257B6006C1B08 /* DataViewerEditFieldPropertiesDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF85D1613B257B6006C1B08 /* DataViewerEditFieldPropertiesDlg.cpp */; };
- DDF85D1913B257B6006C1B08 /* DataViewerEditFieldPropertiesDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF85D1613B257B6006C1B08 /* DataViewerEditFieldPropertiesDlg.cpp */; };
+ DDFE0E0917502E810099FFEC /* DbfColContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDFE0E0817502E810099FFEC /* DbfColContainer.cpp */; };
+ DDFE0E2A175034EC0099FFEC /* TimeState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDFE0E27175034EC0099FFEC /* TimeState.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ A11F1B7D184FDFB3006F5F98 /* OGRColumn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OGRColumn.cpp; path = DataViewer/OGRColumn.cpp; sourceTree = ""; };
+ A11F1B7E184FDFB3006F5F98 /* OGRColumn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OGRColumn.h; path = DataViewer/OGRColumn.h; sourceTree = ""; };
+ A11F1B801850437A006F5F98 /* OGRTableOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OGRTableOperation.cpp; path = DataViewer/OGRTableOperation.cpp; sourceTree = ""; };
+ A11F1B811850437A006F5F98 /* OGRTableOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OGRTableOperation.h; path = DataViewer/OGRTableOperation.h; sourceTree = ""; };
+ A12E0F4D1705087A00B6059C /* OGRDataAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OGRDataAdapter.h; sourceTree = ""; };
+ A12E0F4E1705087A00B6059C /* OGRDataAdapter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OGRDataAdapter.cpp; sourceTree = ""; };
+ A13B6B9218760CF100F93ACF /* SaveAsDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaveAsDlg.h; sourceTree = ""; };
+ A13B6B9318760CF100F93ACF /* SaveAsDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SaveAsDlg.cpp; sourceTree = ""; };
+ A16BA46E183D626200D3B7DA /* DatasourceDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatasourceDlg.cpp; sourceTree = ""; };
+ A16BA46F183D626200D3B7DA /* DatasourceDlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatasourceDlg.h; sourceTree = ""; };
+ A171FBFE1792332A000DD5A0 /* GdaException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GdaException.h; sourceTree = ""; };
+ A19F514D1756A11E006E31B4 /* plugins */ = {isa = PBXFileReference; lastKnownFileType = folder; name = plugins; path = BuildTools/macosx/plugins; sourceTree = ""; };
+ A1B93ABE17D18735007F8195 /* ProjectConf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectConf.h; sourceTree = ""; };
+ A1B93ABF17D18735007F8195 /* ProjectConf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectConf.cpp; sourceTree = "