Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
This commit is contained in:
commit
15d98ddc2a
@ -14,7 +14,7 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA.
|
||||||
|
|
||||||
|
|
||||||
# This script's purpose is to build the binary tarball packages for MariaDB
|
# This script's purpose is to build the binary tarball packages for MariaDB
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Library General Public
|
# You should have received a copy of the GNU Library General Public
|
||||||
# License along with this library; if not, write to the Free
|
# License along with this library; if not, write to the Free
|
||||||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
# MA 02111-1307, USA
|
# MA 02111-1301, USA
|
||||||
|
|
||||||
path=`dirname $0`
|
path=`dirname $0`
|
||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA.
|
||||||
|
|
||||||
# Setting cpu options.
|
# Setting cpu options.
|
||||||
get_cpuopt () {
|
get_cpuopt () {
|
||||||
|
@ -318,6 +318,9 @@ SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
|||||||
|
|
||||||
# Common defines and includes
|
# Common defines and includes
|
||||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||||
|
IF(_FILE_OFFSET_BITS)
|
||||||
|
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS})
|
||||||
|
ENDIF()
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||||
|
|
||||||
# Add bundled or system zlib.
|
# Add bundled or system zlib.
|
||||||
@ -448,8 +451,9 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
|
|||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.LESSER COPYING.thirdparty
|
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.thirdparty
|
||||||
EXCEPTIONS-CLIENT COMPONENT Readme)
|
EXCEPTIONS-CLIENT COMPONENT Readme)
|
||||||
|
|
||||||
# MDEV-6526 these files are not installed anymore
|
# MDEV-6526 these files are not installed anymore
|
||||||
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
|
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
|
||||||
# ${CMAKE_BINARY_DIR}/Docs/INFO_BIN)
|
# ${CMAKE_BINARY_DIR}/Docs/INFO_BIN)
|
||||||
|
516
COPYING.LESSER
516
COPYING.LESSER
@ -1,516 +0,0 @@
|
|||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations
|
|
||||||
below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
|
||||||
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 this service if you wish); that you receive source code or can get
|
|
||||||
it if you want it; that you can change the software and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link other code with the library, you must provide
|
|
||||||
complete object files to the recipients, so that they can relink them
|
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
|
||||||
library, and (2) we offer you this license, which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
^L
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
|
||||||
any free program. We wish to make sure that a company cannot
|
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
|
||||||
a shared library, the combination of the two is legally speaking a
|
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
|
||||||
does Less to protect the user's freedom than the ordinary General
|
|
||||||
Public License. It also provides other free software developers Less
|
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
|
||||||
encourage the widest possible use of a certain library, so that it
|
|
||||||
becomes
|
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
|
||||||
allowed to use the library. A more frequent case is that a free
|
|
||||||
library does the same job as widely used non-free libraries. In this
|
|
||||||
case, there is little to gain by limiting the free library to free
|
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
|
||||||
users' freedom, it does ensure that the user of a program that is
|
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
|
||||||
that program using a modified version of the Library.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
^L
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control
|
|
||||||
compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
^L
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
^L
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be distributed need not include anything that is
|
|
||||||
normally distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
^L
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties with
|
|
||||||
this License.
|
|
||||||
^L
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
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
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply, and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding those
|
|
||||||
countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser 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 Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
^L
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY 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
|
|
||||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
^L
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms
|
|
||||||
of the ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library.
|
|
||||||
It is safest to attach them to the start of each source file to most
|
|
||||||
effectively convey the exclusion of warranty; and each file should
|
|
||||||
have at least the "copyright" line and a pointer to where the full
|
|
||||||
notice is found.
|
|
||||||
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it
|
|
||||||
does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library 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
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
MA 02110-1301, USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper
|
|
||||||
mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or
|
|
||||||
your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James
|
|
||||||
Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
|
|
||||||
|
|
@ -1187,7 +1187,7 @@ Use of any of this software is governed by the terms of the license below:
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1999 Kungliga Tekniska H366gskolan
|
* Copyright (c) 1997, 1999 Kungliga Tekniska H366gskolan
|
||||||
|
22
CREDITS
22
CREDITS
@ -3,16 +3,18 @@ organization registered in the USA.
|
|||||||
|
|
||||||
The current main sponsors of the MariaDB Foundation are:
|
The current main sponsors of the MariaDB Foundation are:
|
||||||
|
|
||||||
Booking.com http://www.booking.com (2013 - 2016)
|
Alibaba Cloud https://intl.aliyun.com (2017)
|
||||||
Development Bank of Singapore http://dbs.com (2016)
|
Booking.com https://www.booking.com (2013 - 2017)
|
||||||
MariaDB Corporation https://www.mariadb.com (2013 - 2016)
|
Development Bank of Singapore https://dbs.com (2016 - 2017)
|
||||||
Visma http://visma.com (2015 - 2016)
|
MariaDB Corporation https://www.mariadb.com (2013 - 2017)
|
||||||
Acronis http://acronis.com (2016)
|
Visma https://visma.com (2015 - 2017)
|
||||||
Nexedi https://www.nexedi.com (2016)
|
Acronis http://acronis.com (2016 - 2017)
|
||||||
Automattic https://automattic.com (2014 - 2016)
|
Nexedi https://www.nexedi.com (2016 - 2017)
|
||||||
Tencent Game DBA http://tencentdba.com/about (2016)
|
Automattic https://automattic.com (2014 - 2017)
|
||||||
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2016)
|
Tencent Game DBA http://tencentdba.com/about (2016 - 2017)
|
||||||
Virtuozzo https://virtuozzo.com (2016)
|
Tencent TDSQL http://tdsql.org/ (2016 - 2017)
|
||||||
|
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2017)
|
||||||
|
Virtuozzo https://virtuozzo.com (2016 - 2017)
|
||||||
|
|
||||||
For a full list of sponsors, see
|
For a full list of sponsors, see
|
||||||
https://mariadb.org/about/supporters/
|
https://mariadb.org/about/supporters/
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/* mysql command tool
|
/* mysql command tool
|
||||||
* Commands compatible with mSQL by David J. Hughes
|
* Commands compatible with mSQL by David J. Hughes
|
||||||
|
@ -1003,7 +1003,7 @@ found:
|
|||||||
|
|
||||||
static int find_plugin(char *tp_path)
|
static int find_plugin(char *tp_path)
|
||||||
{
|
{
|
||||||
/* Check for existance of plugin */
|
/* Check for existence of plugin */
|
||||||
fn_format(tp_path, plugin_data.so_name, opt_plugin_dir, "", MYF(0));
|
fn_format(tp_path, plugin_data.so_name, opt_plugin_dir, "", MYF(0));
|
||||||
if (!file_exists(tp_path))
|
if (!file_exists(tp_path))
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int phase = 0;
|
static int phase = 0;
|
||||||
static int phases_total = 6;
|
static const int phases_total = 7;
|
||||||
static char mysql_path[FN_REFLEN];
|
static char mysql_path[FN_REFLEN];
|
||||||
static char mysqlcheck_path[FN_REFLEN];
|
static char mysqlcheck_path[FN_REFLEN];
|
||||||
|
|
||||||
@ -69,6 +69,8 @@ static char **defaults_argv;
|
|||||||
|
|
||||||
static my_bool not_used; /* Can't use GET_BOOL without a value pointer */
|
static my_bool not_used; /* Can't use GET_BOOL without a value pointer */
|
||||||
|
|
||||||
|
char upgrade_from_version[sizeof("10.20.456-MariaDB")+1];
|
||||||
|
|
||||||
static my_bool opt_write_binlog;
|
static my_bool opt_write_binlog;
|
||||||
|
|
||||||
#define OPT_SILENT OPT_MAX_CLIENT_OPTION
|
#define OPT_SILENT OPT_MAX_CLIENT_OPTION
|
||||||
@ -545,7 +547,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
|
|||||||
But mysql_upgrade is tightly bound to a specific server version
|
But mysql_upgrade is tightly bound to a specific server version
|
||||||
anyway - it was mysql_fix_privilege_tables_sql script embedded
|
anyway - it was mysql_fix_privilege_tables_sql script embedded
|
||||||
into its binary - so even if it won't assume anything about server
|
into its binary - so even if it won't assume anything about server
|
||||||
wsrep-ness, it won't be any less server-dependend.
|
wsrep-ness, it won't be any less server-dependent.
|
||||||
*/
|
*/
|
||||||
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0, WSREP_ON=OFF;";
|
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0, WSREP_ON=OFF;";
|
||||||
#else
|
#else
|
||||||
@ -675,7 +677,6 @@ static int upgrade_already_done(void)
|
|||||||
{
|
{
|
||||||
FILE *in;
|
FILE *in;
|
||||||
char upgrade_info_file[FN_REFLEN]= {0};
|
char upgrade_info_file[FN_REFLEN]= {0};
|
||||||
char buf[sizeof(MYSQL_SERVER_VERSION)+1];
|
|
||||||
|
|
||||||
if (get_upgrade_info_file_name(upgrade_info_file))
|
if (get_upgrade_info_file_name(upgrade_info_file))
|
||||||
return 0; /* Could not get filename => not sure */
|
return 0; /* Could not get filename => not sure */
|
||||||
@ -683,15 +684,15 @@ static int upgrade_already_done(void)
|
|||||||
if (!(in= my_fopen(upgrade_info_file, O_RDONLY, MYF(0))))
|
if (!(in= my_fopen(upgrade_info_file, O_RDONLY, MYF(0))))
|
||||||
return 0; /* Could not open file => not sure */
|
return 0; /* Could not open file => not sure */
|
||||||
|
|
||||||
bzero(buf, sizeof(buf));
|
bzero(upgrade_from_version, sizeof(upgrade_from_version));
|
||||||
if (!fgets(buf, sizeof(buf), in))
|
if (!fgets(upgrade_from_version, sizeof(upgrade_from_version), in))
|
||||||
{
|
{
|
||||||
/* Ignore, will be detected by strncmp() below */
|
/* Ignore, will be detected by strncmp() below */
|
||||||
}
|
}
|
||||||
|
|
||||||
my_fclose(in, MYF(0));
|
my_fclose(in, MYF(0));
|
||||||
|
|
||||||
return (strncmp(buf, MYSQL_SERVER_VERSION,
|
return (strncmp(upgrade_from_version, MYSQL_SERVER_VERSION,
|
||||||
sizeof(MYSQL_SERVER_VERSION)-1)==0);
|
sizeof(MYSQL_SERVER_VERSION)-1)==0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -756,9 +757,8 @@ static void print_conn_args(const char *tool_name)
|
|||||||
verbose("Running '%s with default connection arguments", tool_name);
|
verbose("Running '%s with default connection arguments", tool_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Check and upgrade(if neccessary) all tables
|
Check and upgrade(if necessary) all tables
|
||||||
in the server using "mysqlcheck --check-upgrade .."
|
in the server using "mysqlcheck --check-upgrade .."
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -925,6 +925,80 @@ static void print_line(char* line)
|
|||||||
fputc('\n', stderr);
|
fputc('\n', stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static my_bool from_before_10_1()
|
||||||
|
{
|
||||||
|
my_bool ret= TRUE;
|
||||||
|
DYNAMIC_STRING ds_events_struct;
|
||||||
|
|
||||||
|
if (upgrade_from_version[0])
|
||||||
|
{
|
||||||
|
return upgrade_from_version[1] == '.' ||
|
||||||
|
strncmp(upgrade_from_version, "10.1.", 5) < 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (init_dynamic_string(&ds_events_struct, NULL, 2048, 2048))
|
||||||
|
die("Out of memory");
|
||||||
|
|
||||||
|
if (run_query("show create table mysql.user", &ds_events_struct, FALSE) ||
|
||||||
|
strstr(ds_events_struct.str, "default_role") != NULL)
|
||||||
|
ret= FALSE;
|
||||||
|
else
|
||||||
|
verbose("Upgrading from a version before MariaDB-10.1");
|
||||||
|
|
||||||
|
dynstr_free(&ds_events_struct);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check for entries with "Unknown storage engine" in I_S.TABLES,
|
||||||
|
try to load plugins for these tables if available (MDEV-11942)
|
||||||
|
*/
|
||||||
|
static int install_used_engines(void)
|
||||||
|
{
|
||||||
|
char buf[512];
|
||||||
|
DYNAMIC_STRING ds_result;
|
||||||
|
const char *query = "SELECT DISTINCT LOWER(engine) FROM information_schema.tables"
|
||||||
|
" WHERE table_comment LIKE 'Unknown storage engine%'";
|
||||||
|
|
||||||
|
if (opt_systables_only || !from_before_10_1())
|
||||||
|
{
|
||||||
|
verbose("Phase %d/%d: Installing used storage engines... Skipped", ++phase, phases_total);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
verbose("Phase %d/%d: Installing used storage engines", ++phase, phases_total);
|
||||||
|
|
||||||
|
if (init_dynamic_string(&ds_result, "", 512, 512))
|
||||||
|
die("Out of memory");
|
||||||
|
|
||||||
|
verbose("Checking for tables with unknown storage engine");
|
||||||
|
|
||||||
|
run_query(query, &ds_result, TRUE);
|
||||||
|
|
||||||
|
if (ds_result.length)
|
||||||
|
{
|
||||||
|
char *line= ds_result.str, *next=get_line(line);
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (next[-1] == '\n')
|
||||||
|
next[-1]=0;
|
||||||
|
|
||||||
|
verbose("installing plugin for '%s' storage engine", line);
|
||||||
|
|
||||||
|
// we simply assume soname=ha_enginename
|
||||||
|
strxnmov(buf, sizeof(buf)-1, "install soname 'ha_", line, "'", NULL);
|
||||||
|
|
||||||
|
|
||||||
|
if (run_query(buf, NULL, TRUE))
|
||||||
|
fprintf(stderr, "... can't %s\n", buf);
|
||||||
|
line=next;
|
||||||
|
next=get_line(line);
|
||||||
|
} while (*line);
|
||||||
|
}
|
||||||
|
dynstr_free(&ds_result);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Update all system tables in MySQL Server to current
|
Update all system tables in MySQL Server to current
|
||||||
@ -1132,6 +1206,7 @@ int main(int argc, char **argv)
|
|||||||
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
|
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
|
||||||
*/
|
*/
|
||||||
if (run_mysqlcheck_upgrade(TRUE) ||
|
if (run_mysqlcheck_upgrade(TRUE) ||
|
||||||
|
install_used_engines() ||
|
||||||
run_mysqlcheck_views() ||
|
run_mysqlcheck_views() ||
|
||||||
run_sql_fix_privilege_tables() ||
|
run_sql_fix_privilege_tables() ||
|
||||||
run_mysqlcheck_fixnames() ||
|
run_mysqlcheck_fixnames() ||
|
||||||
@ -1154,4 +1229,3 @@ end:
|
|||||||
my_end(my_end_arg);
|
my_end(my_end_arg);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
|
|||||||
ulonglong last_values[MAX_MYSQL_VAR];
|
ulonglong last_values[MAX_MYSQL_VAR];
|
||||||
static int interval=0;
|
static int interval=0;
|
||||||
static my_bool option_force=0,interrupted=0,new_line=0,
|
static my_bool option_force=0,interrupted=0,new_line=0,
|
||||||
opt_compress=0, opt_relative=0, opt_verbose=0, opt_vertical=0,
|
opt_compress= 0, opt_local= 0, opt_relative= 0, opt_verbose= 0,
|
||||||
tty_password= 0, opt_nobeep;
|
opt_vertical= 0, tty_password= 0, opt_nobeep;
|
||||||
static my_bool debug_info_flag= 0, debug_check_flag= 0;
|
static my_bool debug_info_flag= 0, debug_check_flag= 0;
|
||||||
static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
|
static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
|
||||||
static uint opt_count_iterations= 0, my_end_arg;
|
static uint opt_count_iterations= 0, my_end_arg;
|
||||||
@ -103,9 +103,12 @@ enum commands {
|
|||||||
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
|
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
|
||||||
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
|
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
|
||||||
ADMIN_START_ALL_SLAVES, ADMIN_STOP_ALL_SLAVES,
|
ADMIN_START_ALL_SLAVES, ADMIN_STOP_ALL_SLAVES,
|
||||||
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD, ADMIN_FLUSH_SLOW_LOG,
|
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD, ADMIN_FLUSH_BINARY_LOG,
|
||||||
|
ADMIN_FLUSH_ENGINE_LOG, ADMIN_FLUSH_ERROR_LOG, ADMIN_FLUSH_GENERAL_LOG,
|
||||||
|
ADMIN_FLUSH_RELAY_LOG, ADMIN_FLUSH_SLOW_LOG,
|
||||||
ADMIN_FLUSH_TABLE_STATISTICS, ADMIN_FLUSH_INDEX_STATISTICS,
|
ADMIN_FLUSH_TABLE_STATISTICS, ADMIN_FLUSH_INDEX_STATISTICS,
|
||||||
ADMIN_FLUSH_USER_STATISTICS, ADMIN_FLUSH_CLIENT_STATISTICS,
|
ADMIN_FLUSH_USER_STATISTICS, ADMIN_FLUSH_CLIENT_STATISTICS,
|
||||||
|
ADMIN_FLUSH_USER_RESOURCES,
|
||||||
ADMIN_FLUSH_ALL_STATUS, ADMIN_FLUSH_ALL_STATISTICS
|
ADMIN_FLUSH_ALL_STATUS, ADMIN_FLUSH_ALL_STATISTICS
|
||||||
};
|
};
|
||||||
static const char *command_names[]= {
|
static const char *command_names[]= {
|
||||||
@ -117,9 +120,10 @@ static const char *command_names[]= {
|
|||||||
"ping", "extended-status", "flush-status",
|
"ping", "extended-status", "flush-status",
|
||||||
"flush-privileges", "start-slave", "stop-slave",
|
"flush-privileges", "start-slave", "stop-slave",
|
||||||
"start-all-slaves", "stop-all-slaves",
|
"start-all-slaves", "stop-all-slaves",
|
||||||
"flush-threads", "old-password", "flush-slow-log",
|
"flush-threads", "old-password", "flush-binary-log", "flush-engine-log",
|
||||||
|
"flush-error-log", "flush-general-log", "flush-relay-log", "flush-slow-log",
|
||||||
"flush-table-statistics", "flush-index-statistics",
|
"flush-table-statistics", "flush-index-statistics",
|
||||||
"flush-user-statistics", "flush-client-statistics",
|
"flush-user-statistics", "flush-client-statistics", "flush-user-resources",
|
||||||
"flush-all-status", "flush-all-statistics",
|
"flush-all-status", "flush-all-statistics",
|
||||||
NullS
|
NullS
|
||||||
};
|
};
|
||||||
@ -161,6 +165,9 @@ static struct my_option my_long_options[] =
|
|||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
|
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"local", 'l', "Local command, don't write to binlog.",
|
||||||
|
&opt_local, &opt_local, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||||
|
0, 0, 0},
|
||||||
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
|
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
|
||||||
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
@ -619,6 +626,18 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
struct my_rnd_struct rand_st;
|
struct my_rnd_struct rand_st;
|
||||||
|
char buff[FN_REFLEN + 20];
|
||||||
|
|
||||||
|
if (opt_local)
|
||||||
|
{
|
||||||
|
sprintf(buff, "set local sql_log_bin=0");
|
||||||
|
if (mysql_query(mysql, buff))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "SET LOCAL SQL_LOG_BIN=0 failed; error: '%-.200s'",
|
||||||
|
error_flags, mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (; argc > 0 ; argv++,argc--)
|
for (; argc > 0 ; argv++,argc--)
|
||||||
{
|
{
|
||||||
@ -626,7 +645,6 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
switch ((command= find_type(argv[0],&command_typelib,FIND_TYPE_BASIC))) {
|
switch ((command= find_type(argv[0],&command_typelib,FIND_TYPE_BASIC))) {
|
||||||
case ADMIN_CREATE:
|
case ADMIN_CREATE:
|
||||||
{
|
{
|
||||||
char buff[FN_REFLEN+20];
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
my_printf_error(0, "Too few arguments to create", error_flags);
|
my_printf_error(0, "Too few arguments to create", error_flags);
|
||||||
@ -901,6 +919,56 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ADMIN_FLUSH_BINARY_LOG:
|
||||||
|
{
|
||||||
|
if (mysql_query(mysql, "flush binary logs"))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||||
|
mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ADMIN_FLUSH_ENGINE_LOG:
|
||||||
|
{
|
||||||
|
if (mysql_query(mysql,"flush engine logs"))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||||
|
mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ADMIN_FLUSH_ERROR_LOG:
|
||||||
|
{
|
||||||
|
if (mysql_query(mysql, "flush error logs"))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||||
|
mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ADMIN_FLUSH_GENERAL_LOG:
|
||||||
|
{
|
||||||
|
if (mysql_query(mysql, "flush general logs"))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||||
|
mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ADMIN_FLUSH_RELAY_LOG:
|
||||||
|
{
|
||||||
|
if (mysql_query(mysql, "flush relay logs"))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||||
|
mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ADMIN_FLUSH_SLOW_LOG:
|
case ADMIN_FLUSH_SLOW_LOG:
|
||||||
{
|
{
|
||||||
if (mysql_query(mysql,"flush slow logs"))
|
if (mysql_query(mysql,"flush slow logs"))
|
||||||
@ -971,6 +1039,16 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ADMIN_FLUSH_USER_RESOURCES:
|
||||||
|
{
|
||||||
|
if (mysql_query(mysql, "flush user_resources"))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||||
|
mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ADMIN_FLUSH_CLIENT_STATISTICS:
|
case ADMIN_FLUSH_CLIENT_STATISTICS:
|
||||||
{
|
{
|
||||||
if (mysql_query(mysql,"flush client_statistics"))
|
if (mysql_query(mysql,"flush client_statistics"))
|
||||||
@ -1299,12 +1377,18 @@ static void usage(void)
|
|||||||
flush-index-statistics Flush index statistics\n\
|
flush-index-statistics Flush index statistics\n\
|
||||||
flush-logs Flush all logs\n\
|
flush-logs Flush all logs\n\
|
||||||
flush-privileges Reload grant tables (same as reload)\n\
|
flush-privileges Reload grant tables (same as reload)\n\
|
||||||
|
flush-binary-log Flush binary log\n\
|
||||||
|
flush-engine-log Flush engine log(s)\n\
|
||||||
|
flush-error-log Flush error log\n\
|
||||||
|
flush-general-log Flush general log\n\
|
||||||
|
flush-relay-log Flush relay log\n\
|
||||||
flush-slow-log Flush slow query log\n\
|
flush-slow-log Flush slow query log\n\
|
||||||
flush-status Clear status variables\n\
|
flush-status Clear status variables\n\
|
||||||
flush-table-statistics Clear table statistics\n\
|
flush-table-statistics Clear table statistics\n\
|
||||||
flush-tables Flush all tables\n\
|
flush-tables Flush all tables\n\
|
||||||
flush-threads Flush the thread cache\n\
|
flush-threads Flush the thread cache\n\
|
||||||
flush-user-statistics Flush user statistics\n\
|
flush-user-statistics Flush user statistics\n\
|
||||||
|
flush-user-resources Flush user resources\n\
|
||||||
kill id,id,... Kill mysql threads");
|
kill id,id,... Kill mysql threads");
|
||||||
#if MYSQL_VERSION_ID >= 32200
|
#if MYSQL_VERSION_ID >= 32200
|
||||||
puts("\
|
puts("\
|
||||||
|
@ -118,7 +118,7 @@ static const char* sock= 0;
|
|||||||
static char *opt_plugindir= 0, *opt_default_auth= 0;
|
static char *opt_plugindir= 0, *opt_default_auth= 0;
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
static char *shared_memory_base_name= 0;
|
static const char *shared_memory_base_name= 0;
|
||||||
#endif
|
#endif
|
||||||
static char* user = 0;
|
static char* user = 0;
|
||||||
static char* pass = 0;
|
static char* pass = 0;
|
||||||
@ -2770,7 +2770,7 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
|
|||||||
/* read from stdin */
|
/* read from stdin */
|
||||||
/*
|
/*
|
||||||
Windows opens stdin in text mode by default. Certain characters
|
Windows opens stdin in text mode by default. Certain characters
|
||||||
such as CTRL-Z are interpeted as events and the read() method
|
such as CTRL-Z are interpreted as events and the read() method
|
||||||
will stop. CTRL-Z is the EOF marker in Windows. to get past this
|
will stop. CTRL-Z is the EOF marker in Windows. to get past this
|
||||||
you have to open stdin in binary mode. Setmode() is used to set
|
you have to open stdin in binary mode. Setmode() is used to set
|
||||||
stdin in binary mode. Errors on setting this mode result in
|
stdin in binary mode. Errors on setting this mode result in
|
||||||
|
@ -700,8 +700,9 @@ static void write_header(FILE *sql_file, char *db_name)
|
|||||||
"-- MySQL dump %s Distrib %s, for %s (%s)\n--\n",
|
"-- MySQL dump %s Distrib %s, for %s (%s)\n--\n",
|
||||||
DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
|
DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
|
||||||
MACHINE_TYPE);
|
MACHINE_TYPE);
|
||||||
print_comment(sql_file, 0, "-- Host: %s Database: %s\n",
|
print_comment(sql_file, 0, "-- Host: %s ",
|
||||||
fix_for_comment(current_host ? current_host : "localhost"),
|
fix_for_comment(current_host ? current_host : "localhost"));
|
||||||
|
print_comment(sql_file, 0, "Database: %s\n",
|
||||||
fix_for_comment(db_name ? db_name : ""));
|
fix_for_comment(db_name ? db_name : ""));
|
||||||
print_comment(sql_file, 0,
|
print_comment(sql_file, 0,
|
||||||
"-- ------------------------------------------------------\n"
|
"-- ------------------------------------------------------\n"
|
||||||
|
@ -2489,7 +2489,7 @@ VAR *var_obtain(const char *name, int len)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- if variable starts with a $ it is regarded as a local test varable
|
- if variable starts with a $ it is regarded as a local test variable
|
||||||
- if not it is treated as a environment variable, and the corresponding
|
- if not it is treated as a environment variable, and the corresponding
|
||||||
environment variable will be updated
|
environment variable will be updated
|
||||||
*/
|
*/
|
||||||
@ -3322,7 +3322,7 @@ static int replace(DYNAMIC_STRING *ds_str,
|
|||||||
NOTE
|
NOTE
|
||||||
Although mysqltest is executed from cygwin shell, the command will be
|
Although mysqltest is executed from cygwin shell, the command will be
|
||||||
executed in "cmd.exe". Thus commands like "rm" etc can NOT be used, use
|
executed in "cmd.exe". Thus commands like "rm" etc can NOT be used, use
|
||||||
mysqltest commmand(s) like "remove_file" for that
|
mysqltest command(s) like "remove_file" for that
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void do_exec(struct st_command *command)
|
void do_exec(struct st_command *command)
|
||||||
@ -3336,6 +3336,8 @@ void do_exec(struct st_command *command)
|
|||||||
DBUG_ENTER("do_exec");
|
DBUG_ENTER("do_exec");
|
||||||
DBUG_PRINT("enter", ("cmd: '%s'", cmd));
|
DBUG_PRINT("enter", ("cmd: '%s'", cmd));
|
||||||
|
|
||||||
|
var_set_int("$sys_errno",0);
|
||||||
|
|
||||||
/* Skip leading space */
|
/* Skip leading space */
|
||||||
while (*cmd && my_isspace(charset_info, *cmd))
|
while (*cmd && my_isspace(charset_info, *cmd))
|
||||||
cmd++;
|
cmd++;
|
||||||
@ -3452,6 +3454,7 @@ void do_exec(struct st_command *command)
|
|||||||
report_or_die("command \"%s\" failed with wrong error: %d",
|
report_or_die("command \"%s\" failed with wrong error: %d",
|
||||||
command->first_argument, status);
|
command->first_argument, status);
|
||||||
}
|
}
|
||||||
|
var_set_int("$sys_errno",status);
|
||||||
}
|
}
|
||||||
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
|
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
|
||||||
command->expected_errors.err[0].code.errnum != 0)
|
command->expected_errors.err[0].code.errnum != 0)
|
||||||
@ -7908,7 +7911,7 @@ void handle_error(struct st_command *command,
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
The query after a "--require" failed. This is fine as long the server
|
The query after a "--require" failed. This is fine as long the server
|
||||||
returned a valid reponse. Don't allow 2013 or 2006 to trigger an
|
returned a valid response. Don't allow 2013 or 2006 to trigger an
|
||||||
abort_not_supported_test
|
abort_not_supported_test
|
||||||
*/
|
*/
|
||||||
if (err_errno == CR_SERVER_LOST ||
|
if (err_errno == CR_SERVER_LOST ||
|
||||||
@ -8997,7 +9000,7 @@ int main(int argc, char **argv)
|
|||||||
var_set_string("MYSQLTEST_FILE", cur_file->file_name);
|
var_set_string("MYSQLTEST_FILE", cur_file->file_name);
|
||||||
init_re();
|
init_re();
|
||||||
|
|
||||||
/* Cursor protcol implies ps protocol */
|
/* Cursor protocol implies ps protocol */
|
||||||
if (cursor_protocol)
|
if (cursor_protocol)
|
||||||
ps_protocol= 1;
|
ps_protocol= 1;
|
||||||
|
|
||||||
@ -9095,7 +9098,7 @@ int main(int argc, char **argv)
|
|||||||
abort_on_error);
|
abort_on_error);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
some commmands need to be executed or at least parsed unconditionally,
|
some commands need to be executed or at least parsed unconditionally,
|
||||||
because they change the grammar.
|
because they change the grammar.
|
||||||
*/
|
*/
|
||||||
ok_to_do= cur_block->ok || command->type == Q_DELIMITER
|
ok_to_do= cur_block->ok || command->type == Q_DELIMITER
|
||||||
@ -9525,7 +9528,7 @@ int main(int argc, char **argv)
|
|||||||
die("Test ended with parsing disabled");
|
die("Test ended with parsing disabled");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The whole test has been executed _sucessfully_.
|
The whole test has been executed _successfully_.
|
||||||
Time to compare result or save it to record file.
|
Time to compare result or save it to record file.
|
||||||
The entire output from test is in the log file
|
The entire output from test is in the log file
|
||||||
*/
|
*/
|
||||||
@ -9571,7 +9574,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
verbose_msg("Test has succeeded!");
|
verbose_msg("Test has succeeded!");
|
||||||
timer_output();
|
timer_output();
|
||||||
/* Yes, if we got this far the test has suceeded! Sakila smiles */
|
/* Yes, if we got this far the test has succeeded! Sakila smiles */
|
||||||
cleanup_and_exit(0);
|
cleanup_and_exit(0);
|
||||||
return 0; /* Keep compiler happy too */
|
return 0; /* Keep compiler happy too */
|
||||||
}
|
}
|
||||||
@ -10064,7 +10067,7 @@ void free_replace_regex()
|
|||||||
buf_len_p - result buffer length. Will change if the buffer is reallocated
|
buf_len_p - result buffer length. Will change if the buffer is reallocated
|
||||||
pattern - regexp pattern to match
|
pattern - regexp pattern to match
|
||||||
replace - replacement expression
|
replace - replacement expression
|
||||||
string - the string to perform substituions in
|
string - the string to perform substitutions in
|
||||||
icase - flag, if set to 1 the match is case insensitive
|
icase - flag, if set to 1 the match is case insensitive
|
||||||
*/
|
*/
|
||||||
int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
|
int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
|
||||||
|
@ -267,7 +267,7 @@ bool String::set_or_copy_aligned(const char *str,uint32 arg_length,
|
|||||||
return copy_aligned(str, arg_length, offset, cs);
|
return copy_aligned(str, arg_length, offset, cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy with charset convertion */
|
/* Copy with charset conversion */
|
||||||
|
|
||||||
bool String::copy(const char *str, uint32 arg_length,
|
bool String::copy(const char *str, uint32 arg_length,
|
||||||
CHARSET_INFO *from_cs, CHARSET_INFO *to_cs, uint *errors)
|
CHARSET_INFO *from_cs, CHARSET_INFO *to_cs, uint *errors)
|
||||||
|
@ -86,10 +86,13 @@ IF(FEATURE_SET)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
OPTION(ENABLED_LOCAL_INFILE "" ON)
|
OPTION(ENABLED_LOCAL_INFILE "" ON)
|
||||||
|
SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
ELSEIF(RPM)
|
ELSEIF(RPM)
|
||||||
SET(WITH_SSL system CACHE STRING "")
|
SET(WITH_SSL system CACHE STRING "")
|
||||||
SET(WITH_ZLIB system CACHE STRING "")
|
SET(WITH_ZLIB system CACHE STRING "")
|
||||||
|
SET(CHECKMODULE /usr/bin/checkmodule CACHE STRING "")
|
||||||
|
SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE STRING "")
|
||||||
ELSEIF(DEB)
|
ELSEIF(DEB)
|
||||||
SET(WITH_SSL system CACHE STRING "")
|
SET(WITH_SSL system CACHE STRING "")
|
||||||
SET(WITH_ZLIB system CACHE STRING "")
|
SET(WITH_ZLIB system CACHE STRING "")
|
||||||
|
@ -39,6 +39,14 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
|
|||||||
|
|
||||||
SET(sources ${ARG_UNPARSED_ARGUMENTS})
|
SET(sources ${ARG_UNPARSED_ARGUMENTS})
|
||||||
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
ADD_VERSION_INFO(${target} EXECUTABLE sources)
|
||||||
|
|
||||||
|
IF(MSVC)
|
||||||
|
# Add compatibility manifest, to fix GetVersionEx on Windows 8.1 and later
|
||||||
|
IF (CMAKE_VERSION VERSION_GREATER 3.3)
|
||||||
|
SET(sources ${sources} ${PROJECT_SOURCE_DIR}/cmake/win_compatibility.manifest)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF (ARG_WIN32)
|
IF (ARG_WIN32)
|
||||||
SET(WIN32 WIN32)
|
SET(WIN32 WIN32)
|
||||||
ELSE()
|
ELSE()
|
||||||
|
@ -186,8 +186,11 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||||||
ADD_LIBRARY(${target} MODULE ${SOURCES})
|
ADD_LIBRARY(${target} MODULE ${SOURCES})
|
||||||
DTRACE_INSTRUMENT(${target})
|
DTRACE_INSTRUMENT(${target})
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""
|
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "")
|
||||||
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
|
IF (NOT ARG_CLIENT)
|
||||||
|
SET_TARGET_PROPERTIES (${target} PROPERTIES
|
||||||
|
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
|
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ INCLUDE(FindPkgConfig)
|
|||||||
|
|
||||||
MACRO(CHECK_SYSTEMD)
|
MACRO(CHECK_SYSTEMD)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
SET(WITH_SYSTEMD "auto" CACHE STRING "Compile with systemd socket activation and notification")
|
SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support")
|
||||||
IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto")
|
IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto")
|
||||||
IF(PKG_CONFIG_FOUND)
|
IF(PKG_CONFIG_FOUND)
|
||||||
IF(WITH_SYSTEMD STREQUAL "yes")
|
IF(WITH_SYSTEMD STREQUAL "yes")
|
||||||
|
22
cmake/win_compatibility.manifest
Normal file
22
cmake/win_compatibility.manifest
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows Vista and Windows Server 2008 -->
|
||||||
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
|
|
||||||
|
<!-- Windows 7 and Windows Server 2008 R2 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
|
||||||
|
<!-- Windows 8 and Windows Server 2012 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
|
||||||
|
<!-- Windows 8.1 and Windows Server 2012 R2 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</asmv1:assembly>
|
@ -400,7 +400,6 @@
|
|||||||
#cmakedefine _LARGE_FILES 1
|
#cmakedefine _LARGE_FILES 1
|
||||||
#cmakedefine _LARGEFILE_SOURCE 1
|
#cmakedefine _LARGEFILE_SOURCE 1
|
||||||
#cmakedefine _LARGEFILE64_SOURCE 1
|
#cmakedefine _LARGEFILE64_SOURCE 1
|
||||||
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
|
|
||||||
|
|
||||||
#cmakedefine TIME_WITH_SYS_TIME 1
|
#cmakedefine TIME_WITH_SYS_TIME 1
|
||||||
|
|
||||||
|
@ -1882,7 +1882,7 @@ static void DBUGOpenFile(CODE_STATE *cs,
|
|||||||
cs->stack->name[len]=0;
|
cs->stack->name[len]=0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
strmov(cs->stack->name,name);
|
strmov(cs->stack->name,name);
|
||||||
name=cs->stack->name;
|
name=cs->stack->name;
|
||||||
if (strcmp(name, "-") == 0)
|
if (strcmp(name, "-") == 0)
|
||||||
{
|
{
|
||||||
|
84
debian/additions/innotop/changelog.innotop
vendored
84
debian/additions/innotop/changelog.innotop
vendored
@ -1,10 +1,94 @@
|
|||||||
Changelog for innotop:
|
Changelog for innotop:
|
||||||
|
|
||||||
|
2017-01-20: version 1.11.4
|
||||||
|
* add SUM function for ONLY_FULL_GROUP_BY
|
||||||
|
|
||||||
|
2017-01-20: version 1.11.3
|
||||||
|
|
||||||
|
* Undisplay handlersocket's threads in hide_inactive
|
||||||
|
* fix runtime error regarding redundant sprintf argument #122
|
||||||
|
* added sort on connection-name in display M, after sql/io running, seconds behind master and channel_name
|
||||||
|
* fixed bug that removed value for cxn and channel_name columns in display M
|
||||||
|
* added sort on replication delay, so that the replication-display will sort on slave_sql_running, timelag (in minutes) and channel_name.
|
||||||
|
* support for MariaDB 10.0 in InnoDB row (issue 93)
|
||||||
|
|
||||||
|
2013-07-12: version 1.9.1
|
||||||
|
|
||||||
|
Bugs fixed:
|
||||||
|
* Support of MySQL 5.6 was broken on some pages (issue 82, 83)
|
||||||
|
* Deadlock clearing transactions is now not included in binary log
|
||||||
|
(issue 84)
|
||||||
|
* New spec file with requirements and build requirements for
|
||||||
|
CentOS/RHEL and Fedora
|
||||||
|
|
||||||
|
2012-09-07: version 1.9.0
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
* A new Health Dashboard (A) mode is the default mode.
|
||||||
|
* Added a new InnoDB Locked (K) mode.
|
||||||
|
* Added a new 'spark' config variable for sparklines.
|
||||||
|
* Added a new fuzzy_time formatting function.
|
||||||
|
* Added "query distill" summarizing.
|
||||||
|
* Handled more types of errors connecting to the server.
|
||||||
|
* Displayed some data more compactly.
|
||||||
|
|
||||||
|
Bugs fixed:
|
||||||
|
* Double-quotes were used to terminate strings in SQL (issue 57).
|
||||||
|
* T mode didn't show InnoDB transaction times (issue 67).
|
||||||
|
* Killing a query didn't suggest the longest-running one automatically.
|
||||||
|
* Connections weren't closed on exit (issue 64).
|
||||||
|
* Q mode didn't have connections in its header (issue 63).
|
||||||
|
* Connections and server groups were poorly handled (issue 68).
|
||||||
|
* The RPM spec file was buggy (issue 59).
|
||||||
|
* Event filters were defined wrong (issue 54).
|
||||||
|
|
||||||
|
2012-02-25: version 1.8.1
|
||||||
|
|
||||||
|
Bugs fixed:
|
||||||
|
* Various parsing errors with MySQL 5.5 (issue 23, 45, 47, 51, 52, 53).
|
||||||
|
* RPM spec file prevented building on CentOS 5.5 using mock (issue 44).
|
||||||
|
* Tests worked only from the test subdirectory (issue 43).
|
||||||
|
|
||||||
|
2010-11-06: version 1.8.0
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
* Don't re-fetch SHOW VARIABLES every iteration; it's too slow on many hosts.
|
||||||
|
* Add a filter to remove EVENT threads in SHOW PROCESSLIST (issue 32).
|
||||||
|
* Add a timestamp to output in -n mode, when -t is specified (issue 37).
|
||||||
|
* Add a new U mode, for Percona/MariaDB USER_STATISTICS (issue 39).
|
||||||
|
* Add support for millisecond query time in Percona Server (issue 39).
|
||||||
|
* Display a summary of queries executed in Query List mode (issue 26).
|
||||||
|
|
||||||
|
Bugs fixed:
|
||||||
|
* Made config-file reading more robust (issue 41).
|
||||||
|
* Hostname parsing wasn't standards compliant (issue 30).
|
||||||
|
* MKDEBUG didn't work on some Perl versions (issue 22).
|
||||||
|
* Don't try to get InnoDB status if have_innodb != YES (issue 33).
|
||||||
|
* Status text from the InnoDB plugin wasn't parsed correctly (issue 36).
|
||||||
|
* Transaction ID from InnoDB plugin wasn't subtracted correctly (issue 38).
|
||||||
|
* Switching modes and pressing ? for help caused a crash (issue 40).
|
||||||
|
|
||||||
|
2009-09-06: version 1.7.2
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
* add support for --socket
|
||||||
|
|
||||||
|
Bugs fixed:
|
||||||
|
* remove cxn from $meta->{group_by} if there's only one connection displayed
|
||||||
|
* fix for issue 19 - cxn column won't become visible when viewing two
|
||||||
|
connections after having viewed one connection
|
||||||
|
* supress errors resulting from the addition of a 'BACKGROUND THREAD'
|
||||||
|
section in the output of 'show innodb status'
|
||||||
|
* possible fix for issue 22 - Useless use of a constant in void context
|
||||||
|
* small change to set_to_tbl() around hiding the cxn column if there
|
||||||
|
aren't two or more connections
|
||||||
|
|
||||||
2009-03-09: version 1.7.1
|
2009-03-09: version 1.7.1
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
* Don't display the CXN column if only one connection is active in
|
* Don't display the CXN column if only one connection is active in
|
||||||
the current view
|
the current view
|
||||||
|
* the 'state' column is now visible by default in Query List mode
|
||||||
|
|
||||||
Bugs fixed:
|
Bugs fixed:
|
||||||
* fixed bug where trying to aggregate the time column would result
|
* fixed bug where trying to aggregate the time column would result
|
||||||
|
1918
debian/additions/innotop/innotop
vendored
1918
debian/additions/innotop/innotop
vendored
File diff suppressed because it is too large
Load Diff
490
debian/additions/innotop/innotop.1
vendored
490
debian/additions/innotop/innotop.1
vendored
File diff suppressed because it is too large
Load Diff
4
debian/additions/mysqlreport
vendored
4
debian/additions/mysqlreport
vendored
@ -357,7 +357,7 @@ sub read_relative_infiles
|
|||||||
|
|
||||||
select $tmpfile_fh[$i];
|
select $tmpfile_fh[$i];
|
||||||
|
|
||||||
# Read infile again and copy each set of status values to seperate tmp files
|
# Read infile again and copy each set of status values to separate tmp files
|
||||||
open INFILE, "< $infile" or warn and next;
|
open INFILE, "< $infile" or warn and next;
|
||||||
while(<INFILE>)
|
while(<INFILE>)
|
||||||
{
|
{
|
||||||
@ -365,7 +365,7 @@ sub read_relative_infiles
|
|||||||
next if /^$/;
|
next if /^$/;
|
||||||
|
|
||||||
# The infile must begin with the system variable values.
|
# The infile must begin with the system variable values.
|
||||||
# Therefore, the first occurance of Aborted_clients indicates the beginning
|
# Therefore, the first occurrence of Aborted_clients indicates the beginning
|
||||||
# of the first set of status values if no sets have occurred yet ($stat_n == 0).
|
# of the first set of status values if no sets have occurred yet ($stat_n == 0).
|
||||||
# In this case, the following status values are printed to the current fh,
|
# In this case, the following status values are printed to the current fh,
|
||||||
# along with the system variable values read thus far, until Aborted_clients
|
# along with the system variable values read thus far, until Aborted_clients
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
test -x /usr/bin/mysqladmin || exit 0
|
test -x /usr/bin/mysqladmin || exit 0
|
||||||
if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
|
if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
|
||||||
# If this fails, check debian.conf!
|
# If this fails, check debian.conf!
|
||||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
|
mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
|
||||||
|
flush-engine-log flush-general-log flush-slow-log
|
||||||
fi
|
fi
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ static void print_cs(CHARSET_INFO *cs)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Control characters 0x0080..0x009F are dysplayed by some
|
Control characters 0x0080..0x009F are dysplayed by some
|
||||||
browers as if they were letters. Don't print them to
|
browsers as if they were letters. Don't print them to
|
||||||
avoid confusion.
|
avoid confusion.
|
||||||
*/
|
*/
|
||||||
printf("<TD>ctrl<TD>ctrl<TD>ctrl");
|
printf("<TD>ctrl<TD>ctrl<TD>ctrl");
|
||||||
|
@ -51,6 +51,7 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
|
|||||||
#include "fut0lst.h" /* FLST_NODE_SIZE */
|
#include "fut0lst.h" /* FLST_NODE_SIZE */
|
||||||
#include "buf0checksum.h" /* buf_calc_page_*() */
|
#include "buf0checksum.h" /* buf_calc_page_*() */
|
||||||
#include "fil0fil.h" /* FIL_* */
|
#include "fil0fil.h" /* FIL_* */
|
||||||
|
#include "fil0crypt.h"
|
||||||
#include "os0file.h"
|
#include "os0file.h"
|
||||||
#include "fsp0fsp.h" /* fsp_flags_get_page_size() &
|
#include "fsp0fsp.h" /* fsp_flags_get_page_size() &
|
||||||
fsp_flags_get_zip_size() */
|
fsp_flags_get_zip_size() */
|
||||||
@ -64,24 +65,6 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
|
|||||||
#define PRIuMAX "llu"
|
#define PRIuMAX "llu"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
Verify checksum for a page (iff it's encrypted)
|
|
||||||
NOTE: currently this function can only be run in single threaded mode
|
|
||||||
as it modifies srv_checksum_algorithm (temporarily)
|
|
||||||
@param[in] src_fame page to verify
|
|
||||||
@param[in] page_size page_size
|
|
||||||
@param[in] page_no page number of given read_buf
|
|
||||||
@param[in] strict_check true if strict-check option is enabled
|
|
||||||
@return true if page is encrypted AND OK, false otherwise */
|
|
||||||
UNIV_INTERN
|
|
||||||
bool
|
|
||||||
fil_space_verify_crypt_checksum(
|
|
||||||
/*============================*/
|
|
||||||
const byte* src_frame, /*!< in: page the verify */
|
|
||||||
const page_size_t& page_size /*!< in: page size */
|
|
||||||
,uintmax_t page_no,
|
|
||||||
bool strict_check);
|
|
||||||
|
|
||||||
/* Global variables */
|
/* Global variables */
|
||||||
static bool verbose;
|
static bool verbose;
|
||||||
static bool just_count;
|
static bool just_count;
|
||||||
@ -576,6 +559,9 @@ is_page_corrupted(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: Read the page number from the tablespace header,
|
||||||
|
and check that every page carries the same page number. */
|
||||||
|
|
||||||
/* If page is encrypted, use different checksum calculation
|
/* If page is encrypted, use different checksum calculation
|
||||||
as innochecksum can't decrypt pages. Note that some old InnoDB
|
as innochecksum can't decrypt pages. Note that some old InnoDB
|
||||||
versions did not initialize FIL_PAGE_FILE_FLUSH_LSN field
|
versions did not initialize FIL_PAGE_FILE_FLUSH_LSN field
|
||||||
@ -583,15 +569,19 @@ is_page_corrupted(
|
|||||||
normal method.
|
normal method.
|
||||||
*/
|
*/
|
||||||
if (mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0) {
|
if (mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0) {
|
||||||
is_corrupted = fil_space_verify_crypt_checksum(buf, page_size,
|
is_corrupted = fil_space_verify_crypt_checksum(
|
||||||
cur_page_num, strict_verify);
|
const_cast<byte*>(buf), page_size,
|
||||||
|
strict_verify, is_log_enabled ? log_file : NULL,
|
||||||
|
mach_read_from_4(buf
|
||||||
|
+ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID),
|
||||||
|
cur_page_num);
|
||||||
} else {
|
} else {
|
||||||
is_corrupted = true;
|
is_corrupted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_corrupted) {
|
if (is_corrupted) {
|
||||||
is_corrupted = buf_page_is_corrupted(
|
is_corrupted = buf_page_is_corrupted(
|
||||||
true, buf, page_size, false,
|
true, buf, page_size, NULL,
|
||||||
cur_page_num, strict_verify,
|
cur_page_num, strict_verify,
|
||||||
is_log_enabled, log_file);
|
is_log_enabled, log_file);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
The programs make a DFA-state-machine of the strings and the speed isn't
|
The programs make a DFA-state-machine of the strings and the speed isn't
|
||||||
dependent on the count of replace-strings (only of the number of replaces).
|
dependent on the count of replace-strings (only of the number of replaces).
|
||||||
A line is assumed ending with \n or \0.
|
A line is assumed ending with \n or \0.
|
||||||
There are no limit exept memory on length of strings.
|
There are no limit except memory on length of strings.
|
||||||
|
|
||||||
Written by Monty.
|
Written by Monty.
|
||||||
fill_buffer_retaining() is taken from gnu-grep and modified.
|
fill_buffer_retaining() is taken from gnu-grep and modified.
|
||||||
|
@ -774,7 +774,6 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
|
|||||||
const char* path)
|
const char* path)
|
||||||
{
|
{
|
||||||
int ret = SSL_FAILURE;
|
int ret = SSL_FAILURE;
|
||||||
const int HALF_PATH = 128;
|
|
||||||
|
|
||||||
if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA);
|
if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA);
|
||||||
|
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
/* Copyright (c) 2003-2006 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 */
|
|
||||||
|
|
||||||
#ifndef __BASE64_H_INCLUDED__
|
|
||||||
#define __BASE64_H_INCLUDED__
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
Calculate how much memory needed for dst of my_base64_encode()
|
|
||||||
*/
|
|
||||||
int my_base64_needed_encoded_length(int length_of_data);
|
|
||||||
|
|
||||||
/*
|
|
||||||
Maximum length my_base64_encode_needed_length() can accept with no overflow.
|
|
||||||
*/
|
|
||||||
int my_base64_encode_max_arg_length(void);
|
|
||||||
|
|
||||||
/*
|
|
||||||
Calculate how much memory needed for dst of my_base64_decode()
|
|
||||||
*/
|
|
||||||
int my_base64_needed_decoded_length(int length_of_encoded_data);
|
|
||||||
|
|
||||||
/*
|
|
||||||
Maximum length my_base64_decode_needed_length() can accept with no overflow.
|
|
||||||
*/
|
|
||||||
int my_base64_decode_max_arg_length();
|
|
||||||
|
|
||||||
/*
|
|
||||||
Encode data as a base64 string
|
|
||||||
*/
|
|
||||||
int my_base64_encode(const void *src, size_t src_len, char *dst);
|
|
||||||
|
|
||||||
/*
|
|
||||||
Decode a base64 string into data
|
|
||||||
*/
|
|
||||||
int my_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__ */
|
|
@ -74,11 +74,13 @@ extern void *(*my_str_malloc)(size_t);
|
|||||||
extern void *(*my_str_realloc)(void *, size_t);
|
extern void *(*my_str_realloc)(void *, size_t);
|
||||||
extern void (*my_str_free)(void *);
|
extern void (*my_str_free)(void *);
|
||||||
|
|
||||||
|
#ifdef DBUG_OFF
|
||||||
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
|
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
|
||||||
#define strmov(A,B) __builtin_stpcpy((A),(B))
|
#define strmov(A,B) __builtin_stpcpy((A),(B))
|
||||||
#elif defined(HAVE_STPCPY)
|
#elif defined(HAVE_STPCPY)
|
||||||
#define strmov(A,B) stpcpy((A),(B))
|
#define strmov(A,B) stpcpy((A),(B))
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Declared in int2str() */
|
/* Declared in int2str() */
|
||||||
extern const char _dig_vec_upper[];
|
extern const char _dig_vec_upper[];
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/* This file should be included when using maria functions */
|
/* This file should be included when using maria functions */
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#define DECIMAL_LONGLONG_DIGITS 22
|
#define DECIMAL_LONGLONG_DIGITS 22
|
||||||
#define DECIMAL_LONG_DIGITS 10
|
#define DECIMAL_LONG_DIGITS 10
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/* Definitions for mysys/my_default.c */
|
/* Definitions for mysys/my_default.c */
|
||||||
|
|
||||||
|
@ -1076,10 +1076,9 @@ typedef ulong myf; /* Type of MyFlags in my_funcs */
|
|||||||
static inline char *dlerror(void)
|
static inline char *dlerror(void)
|
||||||
{
|
{
|
||||||
static char win_errormsg[2048];
|
static char win_errormsg[2048];
|
||||||
if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
||||||
0, GetLastError(), 0, win_errormsg, 2048, NULL))
|
0, GetLastError(), 0, win_errormsg, 2048, NULL);
|
||||||
return win_errormsg;
|
return win_errormsg;
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
#define HAVE_DLOPEN 1
|
#define HAVE_DLOPEN 1
|
||||||
#define HAVE_DLERROR 1
|
#define HAVE_DLERROR 1
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#ifndef _my_rnd_h
|
#ifndef _my_rnd_h
|
||||||
#define _my_rnd_h
|
#define _my_rnd_h
|
||||||
|
@ -66,9 +66,10 @@ typedef struct my_aio_result {
|
|||||||
#define MY_FAE 8U /* Fatal if any error */
|
#define MY_FAE 8U /* Fatal if any error */
|
||||||
#define MY_WME 16U /* Write message on error */
|
#define MY_WME 16U /* Write message on error */
|
||||||
#define MY_WAIT_IF_FULL 32U /* Wait and try again if disk full error */
|
#define MY_WAIT_IF_FULL 32U /* Wait and try again if disk full error */
|
||||||
#define MY_IGNORE_BADFD 32U /* my_sync: ignore 'bad descriptor' errors */
|
#define MY_IGNORE_BADFD 32U /* my_sync(): ignore 'bad descriptor' errors */
|
||||||
#define MY_ENCRYPT 64U /* Encrypt IO_CACHE temporary files */
|
#define MY_ENCRYPT 64U /* Encrypt IO_CACHE temporary files */
|
||||||
#define MY_FULL_IO 512U /* For my_read - loop intil I/O is complete */
|
#define MY_NOSYMLINKS 512U /* my_open(): don't follow symlinks */
|
||||||
|
#define MY_FULL_IO 512U /* my_read(): loop until I/O is complete */
|
||||||
#define MY_DONT_CHECK_FILESIZE 128U /* Option to init_io_cache() */
|
#define MY_DONT_CHECK_FILESIZE 128U /* Option to init_io_cache() */
|
||||||
#define MY_LINK_WARNING 32U /* my_redel() gives warning if links */
|
#define MY_LINK_WARNING 32U /* my_redel() gives warning if links */
|
||||||
#define MY_COPYTIME 64U /* my_redel() copys time */
|
#define MY_COPYTIME 64U /* my_redel() copys time */
|
||||||
@ -269,7 +270,7 @@ extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
|||||||
extern ulong my_file_total_opened;
|
extern ulong my_file_total_opened;
|
||||||
extern ulong my_sync_count;
|
extern ulong my_sync_count;
|
||||||
extern uint mysys_usage_id;
|
extern uint mysys_usage_id;
|
||||||
extern my_bool my_init_done;
|
extern my_bool my_init_done, my_thr_key_mysys_exists;
|
||||||
extern my_bool my_assert_on_error;
|
extern my_bool my_assert_on_error;
|
||||||
extern myf my_global_flags; /* Set to MY_WME for more error messages */
|
extern myf my_global_flags; /* Set to MY_WME for more error messages */
|
||||||
/* Point to current my_message() */
|
/* Point to current my_message() */
|
||||||
@ -625,6 +626,7 @@ int my_b_pread(IO_CACHE *info, uchar *Buffer, size_t Count, my_off_t pos);
|
|||||||
|
|
||||||
typedef uint32 ha_checksum;
|
typedef uint32 ha_checksum;
|
||||||
|
|
||||||
|
extern int (*mysys_test_invalid_symlink)(const char *filename);
|
||||||
#include <my_alloc.h>
|
#include <my_alloc.h>
|
||||||
|
|
||||||
/* Prototypes for mysys and my_func functions */
|
/* Prototypes for mysys and my_func functions */
|
||||||
@ -652,9 +654,10 @@ extern int my_realpath(char *to, const char *filename, myf MyFlags);
|
|||||||
extern File my_create_with_symlink(const char *linkname, const char *filename,
|
extern File my_create_with_symlink(const char *linkname, const char *filename,
|
||||||
int createflags, int access_flags,
|
int createflags, int access_flags,
|
||||||
myf MyFlags);
|
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_rename_with_symlink(const char *from,const char *to,myf MyFlags);
|
||||||
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
|
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
|
||||||
|
extern int my_handler_delete_with_symlink(const char *filename, myf sync_dir);
|
||||||
|
|
||||||
extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,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,
|
extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset,
|
||||||
myf MyFlags);
|
myf MyFlags);
|
||||||
@ -1009,6 +1012,8 @@ void my_uuid(uchar *guid);
|
|||||||
void my_uuid2str(const uchar *guid, char *s);
|
void my_uuid2str(const uchar *guid, char *s);
|
||||||
void my_uuid_end(void);
|
void my_uuid_end(void);
|
||||||
|
|
||||||
|
const char *my_dlerror(const char *dlpath);
|
||||||
|
|
||||||
/* character sets */
|
/* character sets */
|
||||||
extern void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader);
|
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_charset_number(const char *cs_name, uint cs_flags);
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#ifdef HAVE_valgrind
|
#ifdef HAVE_valgrind
|
||||||
#define IF_VALGRIND(A,B) A
|
#define IF_VALGRIND(A,B) A
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/* Definitions needed for myisamchk/mariachk.c */
|
/* Definitions needed for myisamchk/mariachk.c */
|
||||||
|
|
||||||
|
@ -48,7 +48,11 @@ extern "C" {
|
|||||||
#ifndef MYSQL_ABI_CHECK
|
#ifndef MYSQL_ABI_CHECK
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MYSQL_PLUGIN_INCLUDED
|
||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
|
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
|
||||||
#define __WIN__
|
#define __WIN__
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2005, 2013, Oracle and/or its affiliates
|
/* Copyright (c) 2005, 2013, Oracle and/or its affiliates
|
||||||
Copyright (C) 2009, 2013, Monty Program Ab
|
Copyright (C) 2009, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -14,8 +14,8 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#ifndef _my_plugin_h
|
#ifndef MYSQL_PLUGIN_INCLUDED
|
||||||
#define _my_plugin_h
|
#define MYSQL_PLUGIN_INCLUDED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
On Windows, exports from DLL need to be declared
|
On Windows, exports from DLL need to be declared
|
||||||
@ -75,7 +75,7 @@ typedef struct st_mysql_xid MYSQL_XID;
|
|||||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0104
|
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0104
|
||||||
|
|
||||||
/* MariaDB plugin interface version */
|
/* MariaDB plugin interface version */
|
||||||
#define MARIA_PLUGIN_INTERFACE_VERSION 0x010b
|
#define MARIA_PLUGIN_INTERFACE_VERSION 0x010c
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The allowable types of plugins
|
The allowable types of plugins
|
||||||
|
@ -1,186 +1,22 @@
|
|||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
typedef void * MYSQL_PLUGIN;
|
typedef void * MYSQL_PLUGIN;
|
||||||
extern struct my_snprintf_service_st {
|
extern struct base64_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
int (*base64_needed_encoded_length_ptr)(int length_of_data);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
int (*base64_encode_max_arg_length_ptr)(void);
|
||||||
} *my_snprintf_service;
|
int (*base64_needed_decoded_length_ptr)(int length_of_encoded_data);
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
int (*base64_decode_max_arg_length_ptr)();
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
int (*base64_encode_ptr)(const void *src, size_t src_len, char *dst);
|
||||||
struct st_mysql_lex_string
|
int (*base64_decode_ptr)(const char *src, size_t src_len,
|
||||||
{
|
void *dst, const char **end_ptr, int flags);
|
||||||
char *str;
|
} *base64_service;
|
||||||
size_t length;
|
int my_base64_needed_encoded_length(int length_of_data);
|
||||||
};
|
int my_base64_encode_max_arg_length(void);
|
||||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
int my_base64_needed_decoded_length(int length_of_encoded_data);
|
||||||
extern struct thd_alloc_service_st {
|
int my_base64_decode_max_arg_length();
|
||||||
void *(*thd_alloc_func)(void*, unsigned int);
|
int my_base64_encode(const void *src, size_t src_len, char *dst);
|
||||||
void *(*thd_calloc_func)(void*, unsigned int);
|
int my_base64_decode(const char *src, size_t src_len,
|
||||||
char *(*thd_strdup_func)(void*, const char *);
|
void *dst, const char **end_ptr, int flags);
|
||||||
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);
|
|
||||||
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_NET= 11,
|
|
||||||
THD_WAIT_LAST= 12
|
|
||||||
} 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);
|
|
||||||
extern struct progress_report_service_st {
|
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
|
||||||
void (*thd_progress_report_func)(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void (*thd_progress_next_stage_func)(void* thd);
|
|
||||||
void (*thd_progress_end_func)(void* thd);
|
|
||||||
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
|
||||||
const char *func,
|
|
||||||
const char *file,
|
|
||||||
unsigned int line);
|
|
||||||
} *progress_report_service;
|
|
||||||
void thd_progress_init(void* thd, unsigned int max_stage);
|
|
||||||
void thd_progress_report(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void thd_progress_next_stage(void* thd);
|
|
||||||
void thd_progress_end(void* thd);
|
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
|
||||||
const char *file, unsigned int line);
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
enum thd_kill_levels {
|
|
||||||
THD_IS_NOT_KILLED=0,
|
|
||||||
THD_ABORT_SOFTLY=50,
|
|
||||||
THD_ABORT_ASAP=100,
|
|
||||||
};
|
|
||||||
extern struct kill_statement_service_st {
|
|
||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
|
||||||
} *thd_kill_statement_service;
|
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
|
||||||
typedef long my_time_t;
|
|
||||||
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;
|
|
||||||
extern struct thd_timezone_service_st {
|
|
||||||
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
} *thd_timezone_service;
|
|
||||||
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
extern struct my_sha1_service_st {
|
|
||||||
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_sha1_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_sha1_context_size_type)();
|
|
||||||
void (*my_sha1_init_type)(void *);
|
|
||||||
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_sha1_result_type)(void *, unsigned char *);
|
|
||||||
} *my_sha1_service;
|
|
||||||
void my_sha1(unsigned char*, const char*, size_t);
|
|
||||||
void my_sha1_multi(unsigned char*, ...);
|
|
||||||
size_t my_sha1_context_size();
|
|
||||||
void my_sha1_init(void *context);
|
|
||||||
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_sha1_result(void *context, unsigned char *digest);
|
|
||||||
extern struct my_md5_service_st {
|
|
||||||
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_md5_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_md5_context_size_type)();
|
|
||||||
void (*my_md5_init_type)(void *);
|
|
||||||
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_md5_result_type)(void *, unsigned char *);
|
|
||||||
} *my_md5_service;
|
|
||||||
void my_md5(unsigned char*, const char*, size_t);
|
|
||||||
void my_md5_multi(unsigned char*, ...);
|
|
||||||
size_t my_md5_context_size();
|
|
||||||
void my_md5_init(void *context);
|
|
||||||
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_md5_result(void *context, unsigned char *digest);
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
|
||||||
extern struct logger_service_st {
|
|
||||||
void (*logger_init_mutexes)();
|
|
||||||
LOGGER_HANDLE* (*open)(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int (*close)(LOGGER_HANDLE *log);
|
|
||||||
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int (*rotate)(LOGGER_HANDLE *log);
|
|
||||||
} *logger_service;
|
|
||||||
void logger_init_mutexes();
|
|
||||||
LOGGER_HANDLE *logger_open(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int logger_close(LOGGER_HANDLE *log);
|
|
||||||
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int logger_rotate(LOGGER_HANDLE *log);
|
|
||||||
extern struct thd_autoinc_service_st {
|
|
||||||
void (*thd_get_autoinc_func)(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
} *thd_autoinc_service;
|
|
||||||
void thd_get_autoinc(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
extern struct thd_error_context_service_st {
|
|
||||||
const char *(*thd_get_error_message_func)(const void* thd);
|
|
||||||
unsigned int (*thd_get_error_number_func)(const void* thd);
|
|
||||||
unsigned long (*thd_get_error_row_func)(const void* thd);
|
|
||||||
void (*thd_inc_error_row_func)(void* thd);
|
|
||||||
char *(*thd_get_error_context_description_func)(void* thd,
|
|
||||||
char *buffer,
|
|
||||||
unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
} *thd_error_context_service;
|
|
||||||
const char *thd_get_error_message(const void* thd);
|
|
||||||
unsigned int thd_get_error_number(const void* thd);
|
|
||||||
unsigned long thd_get_error_row(const void* thd);
|
|
||||||
void thd_inc_error_row(void* thd);
|
|
||||||
char *thd_get_error_context_description(void* thd,
|
|
||||||
char *buffer, unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
typedef int MYSQL_THD_KEY_T;
|
|
||||||
extern struct thd_specifics_service_st {
|
|
||||||
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
} *thd_specifics_service;
|
|
||||||
int thd_key_create(MYSQL_THD_KEY_T *key);
|
|
||||||
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
|
||||||
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
struct encryption_service_st {
|
struct encryption_service_st {
|
||||||
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
||||||
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
||||||
@ -257,6 +93,242 @@ int encryption_scheme_decrypt(const unsigned char* src, unsigned int slen,
|
|||||||
struct st_encryption_scheme *scheme,
|
struct st_encryption_scheme *scheme,
|
||||||
unsigned int key_version, unsigned int i32_1,
|
unsigned int key_version, unsigned int i32_1,
|
||||||
unsigned int i32_2, unsigned long long i64);
|
unsigned int i32_2, unsigned long long i64);
|
||||||
|
enum thd_kill_levels {
|
||||||
|
THD_IS_NOT_KILLED=0,
|
||||||
|
THD_ABORT_SOFTLY=50,
|
||||||
|
THD_ABORT_ASAP=100,
|
||||||
|
};
|
||||||
|
extern struct kill_statement_service_st {
|
||||||
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
|
} *thd_kill_statement_service;
|
||||||
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
|
extern struct logger_service_st {
|
||||||
|
void (*logger_init_mutexes)();
|
||||||
|
LOGGER_HANDLE* (*open)(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int (*close)(LOGGER_HANDLE *log);
|
||||||
|
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int (*rotate)(LOGGER_HANDLE *log);
|
||||||
|
} *logger_service;
|
||||||
|
void logger_init_mutexes();
|
||||||
|
LOGGER_HANDLE *logger_open(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int logger_close(LOGGER_HANDLE *log);
|
||||||
|
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int logger_rotate(LOGGER_HANDLE *log);
|
||||||
|
extern struct my_md5_service_st {
|
||||||
|
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_md5_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_md5_context_size_type)();
|
||||||
|
void (*my_md5_init_type)(void *);
|
||||||
|
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_md5_result_type)(void *, unsigned char *);
|
||||||
|
} *my_md5_service;
|
||||||
|
void my_md5(unsigned char*, const char*, size_t);
|
||||||
|
void my_md5_multi(unsigned char*, ...);
|
||||||
|
size_t my_md5_context_size();
|
||||||
|
void my_md5_init(void *context);
|
||||||
|
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_md5_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct progress_report_service_st {
|
||||||
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
void (*thd_progress_report_func)(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void (*thd_progress_next_stage_func)(void* thd);
|
||||||
|
void (*thd_progress_end_func)(void* thd);
|
||||||
|
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
||||||
|
const char *func,
|
||||||
|
const char *file,
|
||||||
|
unsigned int line);
|
||||||
|
} *progress_report_service;
|
||||||
|
void thd_progress_init(void* thd, unsigned int max_stage);
|
||||||
|
void thd_progress_report(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void thd_progress_next_stage(void* thd);
|
||||||
|
void thd_progress_end(void* thd);
|
||||||
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
|
const char *file, unsigned int line);
|
||||||
|
extern struct my_sha1_service_st {
|
||||||
|
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha1_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha1_context_size_type)();
|
||||||
|
void (*my_sha1_init_type)(void *);
|
||||||
|
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha1_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha1_service;
|
||||||
|
void my_sha1(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha1_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha1_context_size();
|
||||||
|
void my_sha1_init(void *context);
|
||||||
|
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha1_result(void *context, unsigned char *digest);
|
||||||
|
extern struct my_sha2_service_st {
|
||||||
|
void (*my_sha224_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha224_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha224_context_size_type)();
|
||||||
|
void (*my_sha224_init_type)(void *);
|
||||||
|
void (*my_sha224_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha224_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha256_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha256_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha256_context_size_type)();
|
||||||
|
void (*my_sha256_init_type)(void *);
|
||||||
|
void (*my_sha256_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha256_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha384_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha384_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha384_context_size_type)();
|
||||||
|
void (*my_sha384_init_type)(void *);
|
||||||
|
void (*my_sha384_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha384_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha512_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha512_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha512_context_size_type)();
|
||||||
|
void (*my_sha512_init_type)(void *);
|
||||||
|
void (*my_sha512_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha512_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha2_service;
|
||||||
|
void my_sha224(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha224_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha224_context_size();
|
||||||
|
void my_sha224_init(void *context);
|
||||||
|
void my_sha224_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha224_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha256(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha256_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha256_context_size();
|
||||||
|
void my_sha256_init(void *context);
|
||||||
|
void my_sha256_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha256_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha384(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha384_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha384_context_size();
|
||||||
|
void my_sha384_init(void *context);
|
||||||
|
void my_sha384_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha384_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha512(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha512_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha512_context_size();
|
||||||
|
void my_sha512_init(void *context);
|
||||||
|
void my_sha512_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha512_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct thd_autoinc_service_st {
|
||||||
|
void (*thd_get_autoinc_func)(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
} *thd_autoinc_service;
|
||||||
|
void thd_get_autoinc(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
extern struct thd_error_context_service_st {
|
||||||
|
const char *(*thd_get_error_message_func)(const void* thd);
|
||||||
|
unsigned int (*thd_get_error_number_func)(const void* thd);
|
||||||
|
unsigned long (*thd_get_error_row_func)(const void* thd);
|
||||||
|
void (*thd_inc_error_row_func)(void* thd);
|
||||||
|
char *(*thd_get_error_context_description_func)(void* thd,
|
||||||
|
char *buffer,
|
||||||
|
unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
} *thd_error_context_service;
|
||||||
|
const char *thd_get_error_message(const void* thd);
|
||||||
|
unsigned int thd_get_error_number(const void* thd);
|
||||||
|
unsigned long thd_get_error_row(const void* thd);
|
||||||
|
void thd_inc_error_row(void* thd);
|
||||||
|
char *thd_get_error_context_description(void* thd,
|
||||||
|
char *buffer, unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
extern struct thd_rnd_service_st {
|
||||||
|
double (*thd_rnd_ptr)(void* thd);
|
||||||
|
void (*thd_c_r_p_ptr)(void* thd, char *to, size_t length);
|
||||||
|
} *thd_rnd_service;
|
||||||
|
double thd_rnd(void* thd);
|
||||||
|
void thd_create_random_password(void* thd, char *to, size_t length);
|
||||||
|
typedef int MYSQL_THD_KEY_T;
|
||||||
|
extern struct thd_specifics_service_st {
|
||||||
|
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
} *thd_specifics_service;
|
||||||
|
int thd_key_create(MYSQL_THD_KEY_T *key);
|
||||||
|
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
||||||
|
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
typedef long my_time_t;
|
||||||
|
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;
|
||||||
|
extern struct thd_timezone_service_st {
|
||||||
|
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
} *thd_timezone_service;
|
||||||
|
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
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_NET= 11,
|
||||||
|
THD_WAIT_LAST= 12
|
||||||
|
} 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);
|
||||||
struct st_mysql_xid {
|
struct st_mysql_xid {
|
||||||
long formatID;
|
long formatID;
|
||||||
long gtrid_length;
|
long gtrid_length;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <mysql/plugin.h>
|
#include <mysql/plugin.h>
|
||||||
|
|
||||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0200
|
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0201
|
||||||
|
|
||||||
#include <mysql/plugin_auth_common.h>
|
#include <mysql/plugin_auth_common.h>
|
||||||
|
|
||||||
@ -105,6 +105,11 @@ typedef struct st_mysql_server_auth_info
|
|||||||
*/
|
*/
|
||||||
unsigned int host_or_ip_length;
|
unsigned int host_or_ip_length;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Current THD pointer (to use with various services)
|
||||||
|
*/
|
||||||
|
MYSQL_THD thd;
|
||||||
|
|
||||||
} MYSQL_SERVER_AUTH_INFO;
|
} MYSQL_SERVER_AUTH_INFO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,186 +1,22 @@
|
|||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
typedef void * MYSQL_PLUGIN;
|
typedef void * MYSQL_PLUGIN;
|
||||||
extern struct my_snprintf_service_st {
|
extern struct base64_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
int (*base64_needed_encoded_length_ptr)(int length_of_data);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
int (*base64_encode_max_arg_length_ptr)(void);
|
||||||
} *my_snprintf_service;
|
int (*base64_needed_decoded_length_ptr)(int length_of_encoded_data);
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
int (*base64_decode_max_arg_length_ptr)();
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
int (*base64_encode_ptr)(const void *src, size_t src_len, char *dst);
|
||||||
struct st_mysql_lex_string
|
int (*base64_decode_ptr)(const char *src, size_t src_len,
|
||||||
{
|
void *dst, const char **end_ptr, int flags);
|
||||||
char *str;
|
} *base64_service;
|
||||||
size_t length;
|
int my_base64_needed_encoded_length(int length_of_data);
|
||||||
};
|
int my_base64_encode_max_arg_length(void);
|
||||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
int my_base64_needed_decoded_length(int length_of_encoded_data);
|
||||||
extern struct thd_alloc_service_st {
|
int my_base64_decode_max_arg_length();
|
||||||
void *(*thd_alloc_func)(void*, unsigned int);
|
int my_base64_encode(const void *src, size_t src_len, char *dst);
|
||||||
void *(*thd_calloc_func)(void*, unsigned int);
|
int my_base64_decode(const char *src, size_t src_len,
|
||||||
char *(*thd_strdup_func)(void*, const char *);
|
void *dst, const char **end_ptr, int flags);
|
||||||
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);
|
|
||||||
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_NET= 11,
|
|
||||||
THD_WAIT_LAST= 12
|
|
||||||
} 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);
|
|
||||||
extern struct progress_report_service_st {
|
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
|
||||||
void (*thd_progress_report_func)(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void (*thd_progress_next_stage_func)(void* thd);
|
|
||||||
void (*thd_progress_end_func)(void* thd);
|
|
||||||
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
|
||||||
const char *func,
|
|
||||||
const char *file,
|
|
||||||
unsigned int line);
|
|
||||||
} *progress_report_service;
|
|
||||||
void thd_progress_init(void* thd, unsigned int max_stage);
|
|
||||||
void thd_progress_report(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void thd_progress_next_stage(void* thd);
|
|
||||||
void thd_progress_end(void* thd);
|
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
|
||||||
const char *file, unsigned int line);
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
enum thd_kill_levels {
|
|
||||||
THD_IS_NOT_KILLED=0,
|
|
||||||
THD_ABORT_SOFTLY=50,
|
|
||||||
THD_ABORT_ASAP=100,
|
|
||||||
};
|
|
||||||
extern struct kill_statement_service_st {
|
|
||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
|
||||||
} *thd_kill_statement_service;
|
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
|
||||||
typedef long my_time_t;
|
|
||||||
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;
|
|
||||||
extern struct thd_timezone_service_st {
|
|
||||||
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
} *thd_timezone_service;
|
|
||||||
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
extern struct my_sha1_service_st {
|
|
||||||
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_sha1_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_sha1_context_size_type)();
|
|
||||||
void (*my_sha1_init_type)(void *);
|
|
||||||
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_sha1_result_type)(void *, unsigned char *);
|
|
||||||
} *my_sha1_service;
|
|
||||||
void my_sha1(unsigned char*, const char*, size_t);
|
|
||||||
void my_sha1_multi(unsigned char*, ...);
|
|
||||||
size_t my_sha1_context_size();
|
|
||||||
void my_sha1_init(void *context);
|
|
||||||
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_sha1_result(void *context, unsigned char *digest);
|
|
||||||
extern struct my_md5_service_st {
|
|
||||||
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_md5_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_md5_context_size_type)();
|
|
||||||
void (*my_md5_init_type)(void *);
|
|
||||||
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_md5_result_type)(void *, unsigned char *);
|
|
||||||
} *my_md5_service;
|
|
||||||
void my_md5(unsigned char*, const char*, size_t);
|
|
||||||
void my_md5_multi(unsigned char*, ...);
|
|
||||||
size_t my_md5_context_size();
|
|
||||||
void my_md5_init(void *context);
|
|
||||||
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_md5_result(void *context, unsigned char *digest);
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
|
||||||
extern struct logger_service_st {
|
|
||||||
void (*logger_init_mutexes)();
|
|
||||||
LOGGER_HANDLE* (*open)(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int (*close)(LOGGER_HANDLE *log);
|
|
||||||
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int (*rotate)(LOGGER_HANDLE *log);
|
|
||||||
} *logger_service;
|
|
||||||
void logger_init_mutexes();
|
|
||||||
LOGGER_HANDLE *logger_open(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int logger_close(LOGGER_HANDLE *log);
|
|
||||||
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int logger_rotate(LOGGER_HANDLE *log);
|
|
||||||
extern struct thd_autoinc_service_st {
|
|
||||||
void (*thd_get_autoinc_func)(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
} *thd_autoinc_service;
|
|
||||||
void thd_get_autoinc(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
extern struct thd_error_context_service_st {
|
|
||||||
const char *(*thd_get_error_message_func)(const void* thd);
|
|
||||||
unsigned int (*thd_get_error_number_func)(const void* thd);
|
|
||||||
unsigned long (*thd_get_error_row_func)(const void* thd);
|
|
||||||
void (*thd_inc_error_row_func)(void* thd);
|
|
||||||
char *(*thd_get_error_context_description_func)(void* thd,
|
|
||||||
char *buffer,
|
|
||||||
unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
} *thd_error_context_service;
|
|
||||||
const char *thd_get_error_message(const void* thd);
|
|
||||||
unsigned int thd_get_error_number(const void* thd);
|
|
||||||
unsigned long thd_get_error_row(const void* thd);
|
|
||||||
void thd_inc_error_row(void* thd);
|
|
||||||
char *thd_get_error_context_description(void* thd,
|
|
||||||
char *buffer, unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
typedef int MYSQL_THD_KEY_T;
|
|
||||||
extern struct thd_specifics_service_st {
|
|
||||||
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
} *thd_specifics_service;
|
|
||||||
int thd_key_create(MYSQL_THD_KEY_T *key);
|
|
||||||
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
|
||||||
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
struct encryption_service_st {
|
struct encryption_service_st {
|
||||||
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
||||||
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
||||||
@ -257,6 +93,242 @@ int encryption_scheme_decrypt(const unsigned char* src, unsigned int slen,
|
|||||||
struct st_encryption_scheme *scheme,
|
struct st_encryption_scheme *scheme,
|
||||||
unsigned int key_version, unsigned int i32_1,
|
unsigned int key_version, unsigned int i32_1,
|
||||||
unsigned int i32_2, unsigned long long i64);
|
unsigned int i32_2, unsigned long long i64);
|
||||||
|
enum thd_kill_levels {
|
||||||
|
THD_IS_NOT_KILLED=0,
|
||||||
|
THD_ABORT_SOFTLY=50,
|
||||||
|
THD_ABORT_ASAP=100,
|
||||||
|
};
|
||||||
|
extern struct kill_statement_service_st {
|
||||||
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
|
} *thd_kill_statement_service;
|
||||||
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
|
extern struct logger_service_st {
|
||||||
|
void (*logger_init_mutexes)();
|
||||||
|
LOGGER_HANDLE* (*open)(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int (*close)(LOGGER_HANDLE *log);
|
||||||
|
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int (*rotate)(LOGGER_HANDLE *log);
|
||||||
|
} *logger_service;
|
||||||
|
void logger_init_mutexes();
|
||||||
|
LOGGER_HANDLE *logger_open(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int logger_close(LOGGER_HANDLE *log);
|
||||||
|
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int logger_rotate(LOGGER_HANDLE *log);
|
||||||
|
extern struct my_md5_service_st {
|
||||||
|
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_md5_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_md5_context_size_type)();
|
||||||
|
void (*my_md5_init_type)(void *);
|
||||||
|
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_md5_result_type)(void *, unsigned char *);
|
||||||
|
} *my_md5_service;
|
||||||
|
void my_md5(unsigned char*, const char*, size_t);
|
||||||
|
void my_md5_multi(unsigned char*, ...);
|
||||||
|
size_t my_md5_context_size();
|
||||||
|
void my_md5_init(void *context);
|
||||||
|
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_md5_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct progress_report_service_st {
|
||||||
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
void (*thd_progress_report_func)(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void (*thd_progress_next_stage_func)(void* thd);
|
||||||
|
void (*thd_progress_end_func)(void* thd);
|
||||||
|
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
||||||
|
const char *func,
|
||||||
|
const char *file,
|
||||||
|
unsigned int line);
|
||||||
|
} *progress_report_service;
|
||||||
|
void thd_progress_init(void* thd, unsigned int max_stage);
|
||||||
|
void thd_progress_report(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void thd_progress_next_stage(void* thd);
|
||||||
|
void thd_progress_end(void* thd);
|
||||||
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
|
const char *file, unsigned int line);
|
||||||
|
extern struct my_sha1_service_st {
|
||||||
|
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha1_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha1_context_size_type)();
|
||||||
|
void (*my_sha1_init_type)(void *);
|
||||||
|
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha1_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha1_service;
|
||||||
|
void my_sha1(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha1_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha1_context_size();
|
||||||
|
void my_sha1_init(void *context);
|
||||||
|
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha1_result(void *context, unsigned char *digest);
|
||||||
|
extern struct my_sha2_service_st {
|
||||||
|
void (*my_sha224_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha224_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha224_context_size_type)();
|
||||||
|
void (*my_sha224_init_type)(void *);
|
||||||
|
void (*my_sha224_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha224_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha256_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha256_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha256_context_size_type)();
|
||||||
|
void (*my_sha256_init_type)(void *);
|
||||||
|
void (*my_sha256_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha256_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha384_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha384_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha384_context_size_type)();
|
||||||
|
void (*my_sha384_init_type)(void *);
|
||||||
|
void (*my_sha384_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha384_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha512_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha512_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha512_context_size_type)();
|
||||||
|
void (*my_sha512_init_type)(void *);
|
||||||
|
void (*my_sha512_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha512_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha2_service;
|
||||||
|
void my_sha224(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha224_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha224_context_size();
|
||||||
|
void my_sha224_init(void *context);
|
||||||
|
void my_sha224_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha224_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha256(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha256_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha256_context_size();
|
||||||
|
void my_sha256_init(void *context);
|
||||||
|
void my_sha256_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha256_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha384(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha384_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha384_context_size();
|
||||||
|
void my_sha384_init(void *context);
|
||||||
|
void my_sha384_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha384_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha512(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha512_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha512_context_size();
|
||||||
|
void my_sha512_init(void *context);
|
||||||
|
void my_sha512_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha512_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct thd_autoinc_service_st {
|
||||||
|
void (*thd_get_autoinc_func)(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
} *thd_autoinc_service;
|
||||||
|
void thd_get_autoinc(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
extern struct thd_error_context_service_st {
|
||||||
|
const char *(*thd_get_error_message_func)(const void* thd);
|
||||||
|
unsigned int (*thd_get_error_number_func)(const void* thd);
|
||||||
|
unsigned long (*thd_get_error_row_func)(const void* thd);
|
||||||
|
void (*thd_inc_error_row_func)(void* thd);
|
||||||
|
char *(*thd_get_error_context_description_func)(void* thd,
|
||||||
|
char *buffer,
|
||||||
|
unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
} *thd_error_context_service;
|
||||||
|
const char *thd_get_error_message(const void* thd);
|
||||||
|
unsigned int thd_get_error_number(const void* thd);
|
||||||
|
unsigned long thd_get_error_row(const void* thd);
|
||||||
|
void thd_inc_error_row(void* thd);
|
||||||
|
char *thd_get_error_context_description(void* thd,
|
||||||
|
char *buffer, unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
extern struct thd_rnd_service_st {
|
||||||
|
double (*thd_rnd_ptr)(void* thd);
|
||||||
|
void (*thd_c_r_p_ptr)(void* thd, char *to, size_t length);
|
||||||
|
} *thd_rnd_service;
|
||||||
|
double thd_rnd(void* thd);
|
||||||
|
void thd_create_random_password(void* thd, char *to, size_t length);
|
||||||
|
typedef int MYSQL_THD_KEY_T;
|
||||||
|
extern struct thd_specifics_service_st {
|
||||||
|
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
} *thd_specifics_service;
|
||||||
|
int thd_key_create(MYSQL_THD_KEY_T *key);
|
||||||
|
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
||||||
|
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
typedef long my_time_t;
|
||||||
|
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;
|
||||||
|
extern struct thd_timezone_service_st {
|
||||||
|
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
} *thd_timezone_service;
|
||||||
|
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
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_NET= 11,
|
||||||
|
THD_WAIT_LAST= 12
|
||||||
|
} 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);
|
||||||
struct st_mysql_xid {
|
struct st_mysql_xid {
|
||||||
long formatID;
|
long formatID;
|
||||||
long gtrid_length;
|
long gtrid_length;
|
||||||
@ -438,6 +510,7 @@ typedef struct st_mysql_server_auth_info
|
|||||||
int password_used;
|
int password_used;
|
||||||
const char *host_or_ip;
|
const char *host_or_ip;
|
||||||
unsigned int host_or_ip_length;
|
unsigned int host_or_ip_length;
|
||||||
|
void* thd;
|
||||||
} MYSQL_SERVER_AUTH_INFO;
|
} MYSQL_SERVER_AUTH_INFO;
|
||||||
struct st_mysql_auth
|
struct st_mysql_auth
|
||||||
{
|
{
|
||||||
|
@ -1,186 +1,22 @@
|
|||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
typedef void * MYSQL_PLUGIN;
|
typedef void * MYSQL_PLUGIN;
|
||||||
extern struct my_snprintf_service_st {
|
extern struct base64_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
int (*base64_needed_encoded_length_ptr)(int length_of_data);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
int (*base64_encode_max_arg_length_ptr)(void);
|
||||||
} *my_snprintf_service;
|
int (*base64_needed_decoded_length_ptr)(int length_of_encoded_data);
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
int (*base64_decode_max_arg_length_ptr)();
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
int (*base64_encode_ptr)(const void *src, size_t src_len, char *dst);
|
||||||
struct st_mysql_lex_string
|
int (*base64_decode_ptr)(const char *src, size_t src_len,
|
||||||
{
|
void *dst, const char **end_ptr, int flags);
|
||||||
char *str;
|
} *base64_service;
|
||||||
size_t length;
|
int my_base64_needed_encoded_length(int length_of_data);
|
||||||
};
|
int my_base64_encode_max_arg_length(void);
|
||||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
int my_base64_needed_decoded_length(int length_of_encoded_data);
|
||||||
extern struct thd_alloc_service_st {
|
int my_base64_decode_max_arg_length();
|
||||||
void *(*thd_alloc_func)(void*, unsigned int);
|
int my_base64_encode(const void *src, size_t src_len, char *dst);
|
||||||
void *(*thd_calloc_func)(void*, unsigned int);
|
int my_base64_decode(const char *src, size_t src_len,
|
||||||
char *(*thd_strdup_func)(void*, const char *);
|
void *dst, const char **end_ptr, int flags);
|
||||||
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);
|
|
||||||
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_NET= 11,
|
|
||||||
THD_WAIT_LAST= 12
|
|
||||||
} 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);
|
|
||||||
extern struct progress_report_service_st {
|
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
|
||||||
void (*thd_progress_report_func)(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void (*thd_progress_next_stage_func)(void* thd);
|
|
||||||
void (*thd_progress_end_func)(void* thd);
|
|
||||||
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
|
||||||
const char *func,
|
|
||||||
const char *file,
|
|
||||||
unsigned int line);
|
|
||||||
} *progress_report_service;
|
|
||||||
void thd_progress_init(void* thd, unsigned int max_stage);
|
|
||||||
void thd_progress_report(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void thd_progress_next_stage(void* thd);
|
|
||||||
void thd_progress_end(void* thd);
|
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
|
||||||
const char *file, unsigned int line);
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
enum thd_kill_levels {
|
|
||||||
THD_IS_NOT_KILLED=0,
|
|
||||||
THD_ABORT_SOFTLY=50,
|
|
||||||
THD_ABORT_ASAP=100,
|
|
||||||
};
|
|
||||||
extern struct kill_statement_service_st {
|
|
||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
|
||||||
} *thd_kill_statement_service;
|
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
|
||||||
typedef long my_time_t;
|
|
||||||
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;
|
|
||||||
extern struct thd_timezone_service_st {
|
|
||||||
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
} *thd_timezone_service;
|
|
||||||
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
extern struct my_sha1_service_st {
|
|
||||||
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_sha1_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_sha1_context_size_type)();
|
|
||||||
void (*my_sha1_init_type)(void *);
|
|
||||||
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_sha1_result_type)(void *, unsigned char *);
|
|
||||||
} *my_sha1_service;
|
|
||||||
void my_sha1(unsigned char*, const char*, size_t);
|
|
||||||
void my_sha1_multi(unsigned char*, ...);
|
|
||||||
size_t my_sha1_context_size();
|
|
||||||
void my_sha1_init(void *context);
|
|
||||||
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_sha1_result(void *context, unsigned char *digest);
|
|
||||||
extern struct my_md5_service_st {
|
|
||||||
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_md5_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_md5_context_size_type)();
|
|
||||||
void (*my_md5_init_type)(void *);
|
|
||||||
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_md5_result_type)(void *, unsigned char *);
|
|
||||||
} *my_md5_service;
|
|
||||||
void my_md5(unsigned char*, const char*, size_t);
|
|
||||||
void my_md5_multi(unsigned char*, ...);
|
|
||||||
size_t my_md5_context_size();
|
|
||||||
void my_md5_init(void *context);
|
|
||||||
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_md5_result(void *context, unsigned char *digest);
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
|
||||||
extern struct logger_service_st {
|
|
||||||
void (*logger_init_mutexes)();
|
|
||||||
LOGGER_HANDLE* (*open)(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int (*close)(LOGGER_HANDLE *log);
|
|
||||||
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int (*rotate)(LOGGER_HANDLE *log);
|
|
||||||
} *logger_service;
|
|
||||||
void logger_init_mutexes();
|
|
||||||
LOGGER_HANDLE *logger_open(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int logger_close(LOGGER_HANDLE *log);
|
|
||||||
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int logger_rotate(LOGGER_HANDLE *log);
|
|
||||||
extern struct thd_autoinc_service_st {
|
|
||||||
void (*thd_get_autoinc_func)(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
} *thd_autoinc_service;
|
|
||||||
void thd_get_autoinc(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
extern struct thd_error_context_service_st {
|
|
||||||
const char *(*thd_get_error_message_func)(const void* thd);
|
|
||||||
unsigned int (*thd_get_error_number_func)(const void* thd);
|
|
||||||
unsigned long (*thd_get_error_row_func)(const void* thd);
|
|
||||||
void (*thd_inc_error_row_func)(void* thd);
|
|
||||||
char *(*thd_get_error_context_description_func)(void* thd,
|
|
||||||
char *buffer,
|
|
||||||
unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
} *thd_error_context_service;
|
|
||||||
const char *thd_get_error_message(const void* thd);
|
|
||||||
unsigned int thd_get_error_number(const void* thd);
|
|
||||||
unsigned long thd_get_error_row(const void* thd);
|
|
||||||
void thd_inc_error_row(void* thd);
|
|
||||||
char *thd_get_error_context_description(void* thd,
|
|
||||||
char *buffer, unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
typedef int MYSQL_THD_KEY_T;
|
|
||||||
extern struct thd_specifics_service_st {
|
|
||||||
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
} *thd_specifics_service;
|
|
||||||
int thd_key_create(MYSQL_THD_KEY_T *key);
|
|
||||||
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
|
||||||
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
struct encryption_service_st {
|
struct encryption_service_st {
|
||||||
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
||||||
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
||||||
@ -257,6 +93,242 @@ int encryption_scheme_decrypt(const unsigned char* src, unsigned int slen,
|
|||||||
struct st_encryption_scheme *scheme,
|
struct st_encryption_scheme *scheme,
|
||||||
unsigned int key_version, unsigned int i32_1,
|
unsigned int key_version, unsigned int i32_1,
|
||||||
unsigned int i32_2, unsigned long long i64);
|
unsigned int i32_2, unsigned long long i64);
|
||||||
|
enum thd_kill_levels {
|
||||||
|
THD_IS_NOT_KILLED=0,
|
||||||
|
THD_ABORT_SOFTLY=50,
|
||||||
|
THD_ABORT_ASAP=100,
|
||||||
|
};
|
||||||
|
extern struct kill_statement_service_st {
|
||||||
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
|
} *thd_kill_statement_service;
|
||||||
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
|
extern struct logger_service_st {
|
||||||
|
void (*logger_init_mutexes)();
|
||||||
|
LOGGER_HANDLE* (*open)(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int (*close)(LOGGER_HANDLE *log);
|
||||||
|
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int (*rotate)(LOGGER_HANDLE *log);
|
||||||
|
} *logger_service;
|
||||||
|
void logger_init_mutexes();
|
||||||
|
LOGGER_HANDLE *logger_open(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int logger_close(LOGGER_HANDLE *log);
|
||||||
|
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int logger_rotate(LOGGER_HANDLE *log);
|
||||||
|
extern struct my_md5_service_st {
|
||||||
|
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_md5_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_md5_context_size_type)();
|
||||||
|
void (*my_md5_init_type)(void *);
|
||||||
|
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_md5_result_type)(void *, unsigned char *);
|
||||||
|
} *my_md5_service;
|
||||||
|
void my_md5(unsigned char*, const char*, size_t);
|
||||||
|
void my_md5_multi(unsigned char*, ...);
|
||||||
|
size_t my_md5_context_size();
|
||||||
|
void my_md5_init(void *context);
|
||||||
|
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_md5_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct progress_report_service_st {
|
||||||
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
void (*thd_progress_report_func)(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void (*thd_progress_next_stage_func)(void* thd);
|
||||||
|
void (*thd_progress_end_func)(void* thd);
|
||||||
|
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
||||||
|
const char *func,
|
||||||
|
const char *file,
|
||||||
|
unsigned int line);
|
||||||
|
} *progress_report_service;
|
||||||
|
void thd_progress_init(void* thd, unsigned int max_stage);
|
||||||
|
void thd_progress_report(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void thd_progress_next_stage(void* thd);
|
||||||
|
void thd_progress_end(void* thd);
|
||||||
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
|
const char *file, unsigned int line);
|
||||||
|
extern struct my_sha1_service_st {
|
||||||
|
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha1_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha1_context_size_type)();
|
||||||
|
void (*my_sha1_init_type)(void *);
|
||||||
|
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha1_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha1_service;
|
||||||
|
void my_sha1(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha1_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha1_context_size();
|
||||||
|
void my_sha1_init(void *context);
|
||||||
|
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha1_result(void *context, unsigned char *digest);
|
||||||
|
extern struct my_sha2_service_st {
|
||||||
|
void (*my_sha224_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha224_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha224_context_size_type)();
|
||||||
|
void (*my_sha224_init_type)(void *);
|
||||||
|
void (*my_sha224_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha224_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha256_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha256_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha256_context_size_type)();
|
||||||
|
void (*my_sha256_init_type)(void *);
|
||||||
|
void (*my_sha256_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha256_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha384_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha384_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha384_context_size_type)();
|
||||||
|
void (*my_sha384_init_type)(void *);
|
||||||
|
void (*my_sha384_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha384_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha512_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha512_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha512_context_size_type)();
|
||||||
|
void (*my_sha512_init_type)(void *);
|
||||||
|
void (*my_sha512_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha512_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha2_service;
|
||||||
|
void my_sha224(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha224_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha224_context_size();
|
||||||
|
void my_sha224_init(void *context);
|
||||||
|
void my_sha224_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha224_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha256(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha256_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha256_context_size();
|
||||||
|
void my_sha256_init(void *context);
|
||||||
|
void my_sha256_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha256_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha384(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha384_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha384_context_size();
|
||||||
|
void my_sha384_init(void *context);
|
||||||
|
void my_sha384_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha384_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha512(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha512_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha512_context_size();
|
||||||
|
void my_sha512_init(void *context);
|
||||||
|
void my_sha512_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha512_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct thd_autoinc_service_st {
|
||||||
|
void (*thd_get_autoinc_func)(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
} *thd_autoinc_service;
|
||||||
|
void thd_get_autoinc(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
extern struct thd_error_context_service_st {
|
||||||
|
const char *(*thd_get_error_message_func)(const void* thd);
|
||||||
|
unsigned int (*thd_get_error_number_func)(const void* thd);
|
||||||
|
unsigned long (*thd_get_error_row_func)(const void* thd);
|
||||||
|
void (*thd_inc_error_row_func)(void* thd);
|
||||||
|
char *(*thd_get_error_context_description_func)(void* thd,
|
||||||
|
char *buffer,
|
||||||
|
unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
} *thd_error_context_service;
|
||||||
|
const char *thd_get_error_message(const void* thd);
|
||||||
|
unsigned int thd_get_error_number(const void* thd);
|
||||||
|
unsigned long thd_get_error_row(const void* thd);
|
||||||
|
void thd_inc_error_row(void* thd);
|
||||||
|
char *thd_get_error_context_description(void* thd,
|
||||||
|
char *buffer, unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
extern struct thd_rnd_service_st {
|
||||||
|
double (*thd_rnd_ptr)(void* thd);
|
||||||
|
void (*thd_c_r_p_ptr)(void* thd, char *to, size_t length);
|
||||||
|
} *thd_rnd_service;
|
||||||
|
double thd_rnd(void* thd);
|
||||||
|
void thd_create_random_password(void* thd, char *to, size_t length);
|
||||||
|
typedef int MYSQL_THD_KEY_T;
|
||||||
|
extern struct thd_specifics_service_st {
|
||||||
|
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
} *thd_specifics_service;
|
||||||
|
int thd_key_create(MYSQL_THD_KEY_T *key);
|
||||||
|
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
||||||
|
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
typedef long my_time_t;
|
||||||
|
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;
|
||||||
|
extern struct thd_timezone_service_st {
|
||||||
|
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
} *thd_timezone_service;
|
||||||
|
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
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_NET= 11,
|
||||||
|
THD_WAIT_LAST= 12
|
||||||
|
} 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);
|
||||||
struct st_mysql_xid {
|
struct st_mysql_xid {
|
||||||
long formatID;
|
long formatID;
|
||||||
long gtrid_length;
|
long gtrid_length;
|
||||||
|
@ -1,186 +1,22 @@
|
|||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
typedef void * MYSQL_PLUGIN;
|
typedef void * MYSQL_PLUGIN;
|
||||||
extern struct my_snprintf_service_st {
|
extern struct base64_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
int (*base64_needed_encoded_length_ptr)(int length_of_data);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
int (*base64_encode_max_arg_length_ptr)(void);
|
||||||
} *my_snprintf_service;
|
int (*base64_needed_decoded_length_ptr)(int length_of_encoded_data);
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
int (*base64_decode_max_arg_length_ptr)();
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
int (*base64_encode_ptr)(const void *src, size_t src_len, char *dst);
|
||||||
struct st_mysql_lex_string
|
int (*base64_decode_ptr)(const char *src, size_t src_len,
|
||||||
{
|
void *dst, const char **end_ptr, int flags);
|
||||||
char *str;
|
} *base64_service;
|
||||||
size_t length;
|
int my_base64_needed_encoded_length(int length_of_data);
|
||||||
};
|
int my_base64_encode_max_arg_length(void);
|
||||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
int my_base64_needed_decoded_length(int length_of_encoded_data);
|
||||||
extern struct thd_alloc_service_st {
|
int my_base64_decode_max_arg_length();
|
||||||
void *(*thd_alloc_func)(void*, unsigned int);
|
int my_base64_encode(const void *src, size_t src_len, char *dst);
|
||||||
void *(*thd_calloc_func)(void*, unsigned int);
|
int my_base64_decode(const char *src, size_t src_len,
|
||||||
char *(*thd_strdup_func)(void*, const char *);
|
void *dst, const char **end_ptr, int flags);
|
||||||
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);
|
|
||||||
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_NET= 11,
|
|
||||||
THD_WAIT_LAST= 12
|
|
||||||
} 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);
|
|
||||||
extern struct progress_report_service_st {
|
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
|
||||||
void (*thd_progress_report_func)(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void (*thd_progress_next_stage_func)(void* thd);
|
|
||||||
void (*thd_progress_end_func)(void* thd);
|
|
||||||
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
|
||||||
const char *func,
|
|
||||||
const char *file,
|
|
||||||
unsigned int line);
|
|
||||||
} *progress_report_service;
|
|
||||||
void thd_progress_init(void* thd, unsigned int max_stage);
|
|
||||||
void thd_progress_report(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void thd_progress_next_stage(void* thd);
|
|
||||||
void thd_progress_end(void* thd);
|
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
|
||||||
const char *file, unsigned int line);
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
enum thd_kill_levels {
|
|
||||||
THD_IS_NOT_KILLED=0,
|
|
||||||
THD_ABORT_SOFTLY=50,
|
|
||||||
THD_ABORT_ASAP=100,
|
|
||||||
};
|
|
||||||
extern struct kill_statement_service_st {
|
|
||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
|
||||||
} *thd_kill_statement_service;
|
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
|
||||||
typedef long my_time_t;
|
|
||||||
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;
|
|
||||||
extern struct thd_timezone_service_st {
|
|
||||||
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
} *thd_timezone_service;
|
|
||||||
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
extern struct my_sha1_service_st {
|
|
||||||
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_sha1_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_sha1_context_size_type)();
|
|
||||||
void (*my_sha1_init_type)(void *);
|
|
||||||
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_sha1_result_type)(void *, unsigned char *);
|
|
||||||
} *my_sha1_service;
|
|
||||||
void my_sha1(unsigned char*, const char*, size_t);
|
|
||||||
void my_sha1_multi(unsigned char*, ...);
|
|
||||||
size_t my_sha1_context_size();
|
|
||||||
void my_sha1_init(void *context);
|
|
||||||
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_sha1_result(void *context, unsigned char *digest);
|
|
||||||
extern struct my_md5_service_st {
|
|
||||||
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_md5_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_md5_context_size_type)();
|
|
||||||
void (*my_md5_init_type)(void *);
|
|
||||||
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_md5_result_type)(void *, unsigned char *);
|
|
||||||
} *my_md5_service;
|
|
||||||
void my_md5(unsigned char*, const char*, size_t);
|
|
||||||
void my_md5_multi(unsigned char*, ...);
|
|
||||||
size_t my_md5_context_size();
|
|
||||||
void my_md5_init(void *context);
|
|
||||||
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_md5_result(void *context, unsigned char *digest);
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
|
||||||
extern struct logger_service_st {
|
|
||||||
void (*logger_init_mutexes)();
|
|
||||||
LOGGER_HANDLE* (*open)(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int (*close)(LOGGER_HANDLE *log);
|
|
||||||
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int (*rotate)(LOGGER_HANDLE *log);
|
|
||||||
} *logger_service;
|
|
||||||
void logger_init_mutexes();
|
|
||||||
LOGGER_HANDLE *logger_open(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int logger_close(LOGGER_HANDLE *log);
|
|
||||||
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int logger_rotate(LOGGER_HANDLE *log);
|
|
||||||
extern struct thd_autoinc_service_st {
|
|
||||||
void (*thd_get_autoinc_func)(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
} *thd_autoinc_service;
|
|
||||||
void thd_get_autoinc(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
extern struct thd_error_context_service_st {
|
|
||||||
const char *(*thd_get_error_message_func)(const void* thd);
|
|
||||||
unsigned int (*thd_get_error_number_func)(const void* thd);
|
|
||||||
unsigned long (*thd_get_error_row_func)(const void* thd);
|
|
||||||
void (*thd_inc_error_row_func)(void* thd);
|
|
||||||
char *(*thd_get_error_context_description_func)(void* thd,
|
|
||||||
char *buffer,
|
|
||||||
unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
} *thd_error_context_service;
|
|
||||||
const char *thd_get_error_message(const void* thd);
|
|
||||||
unsigned int thd_get_error_number(const void* thd);
|
|
||||||
unsigned long thd_get_error_row(const void* thd);
|
|
||||||
void thd_inc_error_row(void* thd);
|
|
||||||
char *thd_get_error_context_description(void* thd,
|
|
||||||
char *buffer, unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
typedef int MYSQL_THD_KEY_T;
|
|
||||||
extern struct thd_specifics_service_st {
|
|
||||||
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
} *thd_specifics_service;
|
|
||||||
int thd_key_create(MYSQL_THD_KEY_T *key);
|
|
||||||
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
|
||||||
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
struct encryption_service_st {
|
struct encryption_service_st {
|
||||||
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
||||||
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
||||||
@ -257,6 +93,242 @@ int encryption_scheme_decrypt(const unsigned char* src, unsigned int slen,
|
|||||||
struct st_encryption_scheme *scheme,
|
struct st_encryption_scheme *scheme,
|
||||||
unsigned int key_version, unsigned int i32_1,
|
unsigned int key_version, unsigned int i32_1,
|
||||||
unsigned int i32_2, unsigned long long i64);
|
unsigned int i32_2, unsigned long long i64);
|
||||||
|
enum thd_kill_levels {
|
||||||
|
THD_IS_NOT_KILLED=0,
|
||||||
|
THD_ABORT_SOFTLY=50,
|
||||||
|
THD_ABORT_ASAP=100,
|
||||||
|
};
|
||||||
|
extern struct kill_statement_service_st {
|
||||||
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
|
} *thd_kill_statement_service;
|
||||||
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
|
extern struct logger_service_st {
|
||||||
|
void (*logger_init_mutexes)();
|
||||||
|
LOGGER_HANDLE* (*open)(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int (*close)(LOGGER_HANDLE *log);
|
||||||
|
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int (*rotate)(LOGGER_HANDLE *log);
|
||||||
|
} *logger_service;
|
||||||
|
void logger_init_mutexes();
|
||||||
|
LOGGER_HANDLE *logger_open(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int logger_close(LOGGER_HANDLE *log);
|
||||||
|
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int logger_rotate(LOGGER_HANDLE *log);
|
||||||
|
extern struct my_md5_service_st {
|
||||||
|
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_md5_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_md5_context_size_type)();
|
||||||
|
void (*my_md5_init_type)(void *);
|
||||||
|
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_md5_result_type)(void *, unsigned char *);
|
||||||
|
} *my_md5_service;
|
||||||
|
void my_md5(unsigned char*, const char*, size_t);
|
||||||
|
void my_md5_multi(unsigned char*, ...);
|
||||||
|
size_t my_md5_context_size();
|
||||||
|
void my_md5_init(void *context);
|
||||||
|
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_md5_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct progress_report_service_st {
|
||||||
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
void (*thd_progress_report_func)(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void (*thd_progress_next_stage_func)(void* thd);
|
||||||
|
void (*thd_progress_end_func)(void* thd);
|
||||||
|
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
||||||
|
const char *func,
|
||||||
|
const char *file,
|
||||||
|
unsigned int line);
|
||||||
|
} *progress_report_service;
|
||||||
|
void thd_progress_init(void* thd, unsigned int max_stage);
|
||||||
|
void thd_progress_report(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void thd_progress_next_stage(void* thd);
|
||||||
|
void thd_progress_end(void* thd);
|
||||||
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
|
const char *file, unsigned int line);
|
||||||
|
extern struct my_sha1_service_st {
|
||||||
|
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha1_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha1_context_size_type)();
|
||||||
|
void (*my_sha1_init_type)(void *);
|
||||||
|
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha1_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha1_service;
|
||||||
|
void my_sha1(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha1_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha1_context_size();
|
||||||
|
void my_sha1_init(void *context);
|
||||||
|
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha1_result(void *context, unsigned char *digest);
|
||||||
|
extern struct my_sha2_service_st {
|
||||||
|
void (*my_sha224_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha224_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha224_context_size_type)();
|
||||||
|
void (*my_sha224_init_type)(void *);
|
||||||
|
void (*my_sha224_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha224_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha256_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha256_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha256_context_size_type)();
|
||||||
|
void (*my_sha256_init_type)(void *);
|
||||||
|
void (*my_sha256_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha256_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha384_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha384_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha384_context_size_type)();
|
||||||
|
void (*my_sha384_init_type)(void *);
|
||||||
|
void (*my_sha384_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha384_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha512_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha512_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha512_context_size_type)();
|
||||||
|
void (*my_sha512_init_type)(void *);
|
||||||
|
void (*my_sha512_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha512_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha2_service;
|
||||||
|
void my_sha224(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha224_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha224_context_size();
|
||||||
|
void my_sha224_init(void *context);
|
||||||
|
void my_sha224_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha224_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha256(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha256_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha256_context_size();
|
||||||
|
void my_sha256_init(void *context);
|
||||||
|
void my_sha256_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha256_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha384(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha384_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha384_context_size();
|
||||||
|
void my_sha384_init(void *context);
|
||||||
|
void my_sha384_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha384_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha512(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha512_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha512_context_size();
|
||||||
|
void my_sha512_init(void *context);
|
||||||
|
void my_sha512_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha512_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct thd_autoinc_service_st {
|
||||||
|
void (*thd_get_autoinc_func)(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
} *thd_autoinc_service;
|
||||||
|
void thd_get_autoinc(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
extern struct thd_error_context_service_st {
|
||||||
|
const char *(*thd_get_error_message_func)(const void* thd);
|
||||||
|
unsigned int (*thd_get_error_number_func)(const void* thd);
|
||||||
|
unsigned long (*thd_get_error_row_func)(const void* thd);
|
||||||
|
void (*thd_inc_error_row_func)(void* thd);
|
||||||
|
char *(*thd_get_error_context_description_func)(void* thd,
|
||||||
|
char *buffer,
|
||||||
|
unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
} *thd_error_context_service;
|
||||||
|
const char *thd_get_error_message(const void* thd);
|
||||||
|
unsigned int thd_get_error_number(const void* thd);
|
||||||
|
unsigned long thd_get_error_row(const void* thd);
|
||||||
|
void thd_inc_error_row(void* thd);
|
||||||
|
char *thd_get_error_context_description(void* thd,
|
||||||
|
char *buffer, unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
extern struct thd_rnd_service_st {
|
||||||
|
double (*thd_rnd_ptr)(void* thd);
|
||||||
|
void (*thd_c_r_p_ptr)(void* thd, char *to, size_t length);
|
||||||
|
} *thd_rnd_service;
|
||||||
|
double thd_rnd(void* thd);
|
||||||
|
void thd_create_random_password(void* thd, char *to, size_t length);
|
||||||
|
typedef int MYSQL_THD_KEY_T;
|
||||||
|
extern struct thd_specifics_service_st {
|
||||||
|
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
} *thd_specifics_service;
|
||||||
|
int thd_key_create(MYSQL_THD_KEY_T *key);
|
||||||
|
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
||||||
|
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
typedef long my_time_t;
|
||||||
|
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;
|
||||||
|
extern struct thd_timezone_service_st {
|
||||||
|
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
} *thd_timezone_service;
|
||||||
|
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
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_NET= 11,
|
||||||
|
THD_WAIT_LAST= 12
|
||||||
|
} 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);
|
||||||
struct st_mysql_xid {
|
struct st_mysql_xid {
|
||||||
long formatID;
|
long formatID;
|
||||||
long gtrid_length;
|
long gtrid_length;
|
||||||
|
@ -1,186 +1,22 @@
|
|||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
typedef void * MYSQL_PLUGIN;
|
typedef void * MYSQL_PLUGIN;
|
||||||
extern struct my_snprintf_service_st {
|
extern struct base64_service_st {
|
||||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
int (*base64_needed_encoded_length_ptr)(int length_of_data);
|
||||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
int (*base64_encode_max_arg_length_ptr)(void);
|
||||||
} *my_snprintf_service;
|
int (*base64_needed_decoded_length_ptr)(int length_of_encoded_data);
|
||||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
int (*base64_decode_max_arg_length_ptr)();
|
||||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
int (*base64_encode_ptr)(const void *src, size_t src_len, char *dst);
|
||||||
struct st_mysql_lex_string
|
int (*base64_decode_ptr)(const char *src, size_t src_len,
|
||||||
{
|
void *dst, const char **end_ptr, int flags);
|
||||||
char *str;
|
} *base64_service;
|
||||||
size_t length;
|
int my_base64_needed_encoded_length(int length_of_data);
|
||||||
};
|
int my_base64_encode_max_arg_length(void);
|
||||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
int my_base64_needed_decoded_length(int length_of_encoded_data);
|
||||||
extern struct thd_alloc_service_st {
|
int my_base64_decode_max_arg_length();
|
||||||
void *(*thd_alloc_func)(void*, unsigned int);
|
int my_base64_encode(const void *src, size_t src_len, char *dst);
|
||||||
void *(*thd_calloc_func)(void*, unsigned int);
|
int my_base64_decode(const char *src, size_t src_len,
|
||||||
char *(*thd_strdup_func)(void*, const char *);
|
void *dst, const char **end_ptr, int flags);
|
||||||
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);
|
|
||||||
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_NET= 11,
|
|
||||||
THD_WAIT_LAST= 12
|
|
||||||
} 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);
|
|
||||||
extern struct progress_report_service_st {
|
|
||||||
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
|
||||||
void (*thd_progress_report_func)(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void (*thd_progress_next_stage_func)(void* thd);
|
|
||||||
void (*thd_progress_end_func)(void* thd);
|
|
||||||
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
|
||||||
const char *func,
|
|
||||||
const char *file,
|
|
||||||
unsigned int line);
|
|
||||||
} *progress_report_service;
|
|
||||||
void thd_progress_init(void* thd, unsigned int max_stage);
|
|
||||||
void thd_progress_report(void* thd,
|
|
||||||
unsigned long long progress,
|
|
||||||
unsigned long long max_progress);
|
|
||||||
void thd_progress_next_stage(void* thd);
|
|
||||||
void thd_progress_end(void* thd);
|
|
||||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
|
||||||
const char *file, unsigned int line);
|
|
||||||
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
|
||||||
enum thd_kill_levels {
|
|
||||||
THD_IS_NOT_KILLED=0,
|
|
||||||
THD_ABORT_SOFTLY=50,
|
|
||||||
THD_ABORT_ASAP=100,
|
|
||||||
};
|
|
||||||
extern struct kill_statement_service_st {
|
|
||||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
|
||||||
} *thd_kill_statement_service;
|
|
||||||
enum thd_kill_levels thd_kill_level(const void*);
|
|
||||||
typedef long my_time_t;
|
|
||||||
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;
|
|
||||||
extern struct thd_timezone_service_st {
|
|
||||||
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
} *thd_timezone_service;
|
|
||||||
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
|
||||||
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
|
||||||
extern struct my_sha1_service_st {
|
|
||||||
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_sha1_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_sha1_context_size_type)();
|
|
||||||
void (*my_sha1_init_type)(void *);
|
|
||||||
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_sha1_result_type)(void *, unsigned char *);
|
|
||||||
} *my_sha1_service;
|
|
||||||
void my_sha1(unsigned char*, const char*, size_t);
|
|
||||||
void my_sha1_multi(unsigned char*, ...);
|
|
||||||
size_t my_sha1_context_size();
|
|
||||||
void my_sha1_init(void *context);
|
|
||||||
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_sha1_result(void *context, unsigned char *digest);
|
|
||||||
extern struct my_md5_service_st {
|
|
||||||
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
|
||||||
void (*my_md5_multi_type)(unsigned char*, ...);
|
|
||||||
size_t (*my_md5_context_size_type)();
|
|
||||||
void (*my_md5_init_type)(void *);
|
|
||||||
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
|
||||||
void (*my_md5_result_type)(void *, unsigned char *);
|
|
||||||
} *my_md5_service;
|
|
||||||
void my_md5(unsigned char*, const char*, size_t);
|
|
||||||
void my_md5_multi(unsigned char*, ...);
|
|
||||||
size_t my_md5_context_size();
|
|
||||||
void my_md5_init(void *context);
|
|
||||||
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
|
||||||
void my_md5_result(void *context, unsigned char *digest);
|
|
||||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
|
||||||
extern struct logger_service_st {
|
|
||||||
void (*logger_init_mutexes)();
|
|
||||||
LOGGER_HANDLE* (*open)(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int (*close)(LOGGER_HANDLE *log);
|
|
||||||
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int (*rotate)(LOGGER_HANDLE *log);
|
|
||||||
} *logger_service;
|
|
||||||
void logger_init_mutexes();
|
|
||||||
LOGGER_HANDLE *logger_open(const char *path,
|
|
||||||
unsigned long long size_limit,
|
|
||||||
unsigned int rotations);
|
|
||||||
int logger_close(LOGGER_HANDLE *log);
|
|
||||||
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
|
||||||
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
|
||||||
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
|
||||||
int logger_rotate(LOGGER_HANDLE *log);
|
|
||||||
extern struct thd_autoinc_service_st {
|
|
||||||
void (*thd_get_autoinc_func)(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
} *thd_autoinc_service;
|
|
||||||
void thd_get_autoinc(const void* thd,
|
|
||||||
unsigned long* off, unsigned long* inc);
|
|
||||||
extern struct thd_error_context_service_st {
|
|
||||||
const char *(*thd_get_error_message_func)(const void* thd);
|
|
||||||
unsigned int (*thd_get_error_number_func)(const void* thd);
|
|
||||||
unsigned long (*thd_get_error_row_func)(const void* thd);
|
|
||||||
void (*thd_inc_error_row_func)(void* thd);
|
|
||||||
char *(*thd_get_error_context_description_func)(void* thd,
|
|
||||||
char *buffer,
|
|
||||||
unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
} *thd_error_context_service;
|
|
||||||
const char *thd_get_error_message(const void* thd);
|
|
||||||
unsigned int thd_get_error_number(const void* thd);
|
|
||||||
unsigned long thd_get_error_row(const void* thd);
|
|
||||||
void thd_inc_error_row(void* thd);
|
|
||||||
char *thd_get_error_context_description(void* thd,
|
|
||||||
char *buffer, unsigned int length,
|
|
||||||
unsigned int max_query_length);
|
|
||||||
typedef int MYSQL_THD_KEY_T;
|
|
||||||
extern struct thd_specifics_service_st {
|
|
||||||
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
|
||||||
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
} *thd_specifics_service;
|
|
||||||
int thd_key_create(MYSQL_THD_KEY_T *key);
|
|
||||||
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
|
||||||
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
|
||||||
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
|
||||||
struct encryption_service_st {
|
struct encryption_service_st {
|
||||||
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
unsigned int (*encryption_key_get_latest_version_func)(unsigned int key_id);
|
||||||
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
unsigned int (*encryption_key_get_func)(unsigned int key_id, unsigned int key_version,
|
||||||
@ -257,6 +93,242 @@ int encryption_scheme_decrypt(const unsigned char* src, unsigned int slen,
|
|||||||
struct st_encryption_scheme *scheme,
|
struct st_encryption_scheme *scheme,
|
||||||
unsigned int key_version, unsigned int i32_1,
|
unsigned int key_version, unsigned int i32_1,
|
||||||
unsigned int i32_2, unsigned long long i64);
|
unsigned int i32_2, unsigned long long i64);
|
||||||
|
enum thd_kill_levels {
|
||||||
|
THD_IS_NOT_KILLED=0,
|
||||||
|
THD_ABORT_SOFTLY=50,
|
||||||
|
THD_ABORT_ASAP=100,
|
||||||
|
};
|
||||||
|
extern struct kill_statement_service_st {
|
||||||
|
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||||
|
} *thd_kill_statement_service;
|
||||||
|
enum thd_kill_levels thd_kill_level(const void*);
|
||||||
|
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||||
|
extern struct logger_service_st {
|
||||||
|
void (*logger_init_mutexes)();
|
||||||
|
LOGGER_HANDLE* (*open)(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int (*close)(LOGGER_HANDLE *log);
|
||||||
|
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int (*write)(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int (*rotate)(LOGGER_HANDLE *log);
|
||||||
|
} *logger_service;
|
||||||
|
void logger_init_mutexes();
|
||||||
|
LOGGER_HANDLE *logger_open(const char *path,
|
||||||
|
unsigned long long size_limit,
|
||||||
|
unsigned int rotations);
|
||||||
|
int logger_close(LOGGER_HANDLE *log);
|
||||||
|
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||||
|
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||||
|
int logger_write(LOGGER_HANDLE *log, const char *buffer, size_t size);
|
||||||
|
int logger_rotate(LOGGER_HANDLE *log);
|
||||||
|
extern struct my_md5_service_st {
|
||||||
|
void (*my_md5_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_md5_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_md5_context_size_type)();
|
||||||
|
void (*my_md5_init_type)(void *);
|
||||||
|
void (*my_md5_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_md5_result_type)(void *, unsigned char *);
|
||||||
|
} *my_md5_service;
|
||||||
|
void my_md5(unsigned char*, const char*, size_t);
|
||||||
|
void my_md5_multi(unsigned char*, ...);
|
||||||
|
size_t my_md5_context_size();
|
||||||
|
void my_md5_init(void *context);
|
||||||
|
void my_md5_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_md5_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct progress_report_service_st {
|
||||||
|
void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
|
||||||
|
void (*thd_progress_report_func)(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void (*thd_progress_next_stage_func)(void* thd);
|
||||||
|
void (*thd_progress_end_func)(void* thd);
|
||||||
|
const char *(*set_thd_proc_info_func)(void*, const char *info,
|
||||||
|
const char *func,
|
||||||
|
const char *file,
|
||||||
|
unsigned int line);
|
||||||
|
} *progress_report_service;
|
||||||
|
void thd_progress_init(void* thd, unsigned int max_stage);
|
||||||
|
void thd_progress_report(void* thd,
|
||||||
|
unsigned long long progress,
|
||||||
|
unsigned long long max_progress);
|
||||||
|
void thd_progress_next_stage(void* thd);
|
||||||
|
void thd_progress_end(void* thd);
|
||||||
|
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||||
|
const char *file, unsigned int line);
|
||||||
|
extern struct my_sha1_service_st {
|
||||||
|
void (*my_sha1_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha1_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha1_context_size_type)();
|
||||||
|
void (*my_sha1_init_type)(void *);
|
||||||
|
void (*my_sha1_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha1_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha1_service;
|
||||||
|
void my_sha1(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha1_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha1_context_size();
|
||||||
|
void my_sha1_init(void *context);
|
||||||
|
void my_sha1_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha1_result(void *context, unsigned char *digest);
|
||||||
|
extern struct my_sha2_service_st {
|
||||||
|
void (*my_sha224_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha224_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha224_context_size_type)();
|
||||||
|
void (*my_sha224_init_type)(void *);
|
||||||
|
void (*my_sha224_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha224_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha256_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha256_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha256_context_size_type)();
|
||||||
|
void (*my_sha256_init_type)(void *);
|
||||||
|
void (*my_sha256_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha256_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha384_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha384_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha384_context_size_type)();
|
||||||
|
void (*my_sha384_init_type)(void *);
|
||||||
|
void (*my_sha384_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha384_result_type)(void *, unsigned char *);
|
||||||
|
void (*my_sha512_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha512_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha512_context_size_type)();
|
||||||
|
void (*my_sha512_init_type)(void *);
|
||||||
|
void (*my_sha512_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha512_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha2_service;
|
||||||
|
void my_sha224(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha224_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha224_context_size();
|
||||||
|
void my_sha224_init(void *context);
|
||||||
|
void my_sha224_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha224_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha256(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha256_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha256_context_size();
|
||||||
|
void my_sha256_init(void *context);
|
||||||
|
void my_sha256_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha256_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha384(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha384_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha384_context_size();
|
||||||
|
void my_sha384_init(void *context);
|
||||||
|
void my_sha384_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha384_result(void *context, unsigned char *digest);
|
||||||
|
void my_sha512(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha512_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha512_context_size();
|
||||||
|
void my_sha512_init(void *context);
|
||||||
|
void my_sha512_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha512_result(void *context, unsigned char *digest);
|
||||||
|
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);
|
||||||
|
extern struct thd_autoinc_service_st {
|
||||||
|
void (*thd_get_autoinc_func)(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
} *thd_autoinc_service;
|
||||||
|
void thd_get_autoinc(const void* thd,
|
||||||
|
unsigned long* off, unsigned long* inc);
|
||||||
|
extern struct thd_error_context_service_st {
|
||||||
|
const char *(*thd_get_error_message_func)(const void* thd);
|
||||||
|
unsigned int (*thd_get_error_number_func)(const void* thd);
|
||||||
|
unsigned long (*thd_get_error_row_func)(const void* thd);
|
||||||
|
void (*thd_inc_error_row_func)(void* thd);
|
||||||
|
char *(*thd_get_error_context_description_func)(void* thd,
|
||||||
|
char *buffer,
|
||||||
|
unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
} *thd_error_context_service;
|
||||||
|
const char *thd_get_error_message(const void* thd);
|
||||||
|
unsigned int thd_get_error_number(const void* thd);
|
||||||
|
unsigned long thd_get_error_row(const void* thd);
|
||||||
|
void thd_inc_error_row(void* thd);
|
||||||
|
char *thd_get_error_context_description(void* thd,
|
||||||
|
char *buffer, unsigned int length,
|
||||||
|
unsigned int max_query_length);
|
||||||
|
extern struct thd_rnd_service_st {
|
||||||
|
double (*thd_rnd_ptr)(void* thd);
|
||||||
|
void (*thd_c_r_p_ptr)(void* thd, char *to, size_t length);
|
||||||
|
} *thd_rnd_service;
|
||||||
|
double thd_rnd(void* thd);
|
||||||
|
void thd_create_random_password(void* thd, char *to, size_t length);
|
||||||
|
typedef int MYSQL_THD_KEY_T;
|
||||||
|
extern struct thd_specifics_service_st {
|
||||||
|
int (*thd_key_create_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void (*thd_key_delete_func)(MYSQL_THD_KEY_T *key);
|
||||||
|
void *(*thd_getspecific_func)(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int (*thd_setspecific_func)(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
} *thd_specifics_service;
|
||||||
|
int thd_key_create(MYSQL_THD_KEY_T *key);
|
||||||
|
void thd_key_delete(MYSQL_THD_KEY_T *key);
|
||||||
|
void* thd_getspecific(void* thd, MYSQL_THD_KEY_T key);
|
||||||
|
int thd_setspecific(void* thd, MYSQL_THD_KEY_T key, void *value);
|
||||||
|
typedef long my_time_t;
|
||||||
|
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;
|
||||||
|
extern struct thd_timezone_service_st {
|
||||||
|
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
} *thd_timezone_service;
|
||||||
|
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||||
|
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||||
|
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_NET= 11,
|
||||||
|
THD_WAIT_LAST= 12
|
||||||
|
} 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);
|
||||||
struct st_mysql_xid {
|
struct st_mysql_xid {
|
||||||
long formatID;
|
long formatID;
|
||||||
long gtrid_length;
|
long gtrid_length;
|
||||||
|
@ -442,17 +442,17 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@def mysql_file_delete_with_symlink(K, P1, P2)
|
@def mysql_file_delete_with_symlink(K, P1, P2, P3)
|
||||||
Instrumented delete with symbolic link.
|
Instrumented delete with symbolic link.
|
||||||
@c mysql_file_delete_with_symlink is a replacement
|
@c mysql_file_delete_with_symlink is a replacement
|
||||||
for @c my_delete_with_symlink.
|
for @c my_handler_delete_with_symlink.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||||
#define mysql_file_delete_with_symlink(K, P1, P2) \
|
#define mysql_file_delete_with_symlink(K, P1, P2, P3) \
|
||||||
inline_mysql_file_delete_with_symlink(K, __FILE__, __LINE__, P1, P2)
|
inline_mysql_file_delete_with_symlink(K, __FILE__, __LINE__, P1, P2, P3)
|
||||||
#else
|
#else
|
||||||
#define mysql_file_delete_with_symlink(K, P1, P2) \
|
#define mysql_file_delete_with_symlink(K, P1, P2, P3) \
|
||||||
inline_mysql_file_delete_with_symlink(P1, P2)
|
inline_mysql_file_delete_with_symlink(P1, P2, P3)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1308,6 +1308,7 @@ inline_mysql_file_rename(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline File
|
static inline File
|
||||||
inline_mysql_file_create_with_symlink(
|
inline_mysql_file_create_with_symlink(
|
||||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||||
@ -1337,32 +1338,36 @@ inline_mysql_file_create_with_symlink(
|
|||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
inline_mysql_file_delete_with_symlink(
|
inline_mysql_file_delete_with_symlink(
|
||||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||||
PSI_file_key key, const char *src_file, uint src_line,
|
PSI_file_key key, const char *src_file, uint src_line,
|
||||||
#endif
|
#endif
|
||||||
const char *name, myf flags)
|
const char *name, const char *ext, myf flags)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
char buf[FN_REFLEN];
|
||||||
|
char *fullname= fn_format(buf, name, "", ext, MY_UNPACK_FILENAME | MY_APPEND_EXT);
|
||||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||||
(&state, key, PSI_FILE_DELETE, name, &locker);
|
(&state, key, PSI_FILE_DELETE, fullname, &locker);
|
||||||
if (likely(locker != NULL))
|
if (likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||||
result= my_delete_with_symlink(name, flags);
|
result= my_handler_delete_with_symlink(fullname, flags);
|
||||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
result= my_delete_with_symlink(name, flags);
|
result= my_handler_delete_with_symlink(fullname, flags);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
inline_mysql_file_rename_with_symlink(
|
inline_mysql_file_rename_with_symlink(
|
||||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||||
|
@ -417,7 +417,7 @@ enum PSI_file_operation
|
|||||||
PSI_FILE_FSTAT= 12,
|
PSI_FILE_FSTAT= 12,
|
||||||
/** File chsize, as in @c my_chsize(). */
|
/** File chsize, as in @c my_chsize(). */
|
||||||
PSI_FILE_CHSIZE= 13,
|
PSI_FILE_CHSIZE= 13,
|
||||||
/** File delete, such as @c my_delete() or @c my_delete_with_symlink(). */
|
/** File delete, such as @c my_delete() or @c my_handler_delete_with_symlink(). */
|
||||||
PSI_FILE_DELETE= 14,
|
PSI_FILE_DELETE= 14,
|
||||||
/** File rename, such as @c my_rename() or @c my_rename_with_symlink(). */
|
/** File rename, such as @c my_rename() or @c my_rename_with_symlink(). */
|
||||||
PSI_FILE_RENAME= 15,
|
PSI_FILE_RENAME= 15,
|
||||||
|
82
include/mysql/service_base64.h
Normal file
82
include/mysql/service_base64.h
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#ifndef MYSQL_SERVICE_BASE64_INCLUDED
|
||||||
|
/* Copyright (c) 2017, MariaDB
|
||||||
|
|
||||||
|
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 base64 service
|
||||||
|
|
||||||
|
Functions for base64 en- and decoding
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MYSQL_ABI_CHECK
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Allow multuple chunks 'AAA= AA== AA==', binlog uses this */
|
||||||
|
#define MY_BASE64_DECODE_ALLOW_MULTIPLE_CHUNKS 1
|
||||||
|
|
||||||
|
extern struct base64_service_st {
|
||||||
|
int (*base64_needed_encoded_length_ptr)(int length_of_data);
|
||||||
|
int (*base64_encode_max_arg_length_ptr)(void);
|
||||||
|
int (*base64_needed_decoded_length_ptr)(int length_of_encoded_data);
|
||||||
|
int (*base64_decode_max_arg_length_ptr)();
|
||||||
|
int (*base64_encode_ptr)(const void *src, size_t src_len, char *dst);
|
||||||
|
int (*base64_decode_ptr)(const char *src, size_t src_len,
|
||||||
|
void *dst, const char **end_ptr, int flags);
|
||||||
|
} *base64_service;
|
||||||
|
|
||||||
|
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||||
|
|
||||||
|
#define my_base64_needed_encoded_length(A) base64_service->base64_needed_encoded_length_ptr(A)
|
||||||
|
#define my_base64_encode_max_arg_length() base64_service->base64_encode_max_arg_length_ptr()
|
||||||
|
#define my_base64_needed_decoded_length(A) base64_service->base64_needed_decoded_length_ptr(A)
|
||||||
|
#define my_base64_decode_max_arg_length() base64_service->base64_decode_max_arg_length_ptr()
|
||||||
|
#define my_base64_encode(A,B,C) base64_service->base64_encode_ptr(A,B,C)
|
||||||
|
#define my_base64_decode(A,B,C,D,E) base64_service->base64_decode_ptr(A,B,C,D,E)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* Calculate how much memory needed for dst of my_base64_encode() */
|
||||||
|
int my_base64_needed_encoded_length(int length_of_data);
|
||||||
|
|
||||||
|
/* Maximum length my_base64_encode_needed_length() can accept with no overflow. */
|
||||||
|
int my_base64_encode_max_arg_length(void);
|
||||||
|
|
||||||
|
/* Calculate how much memory needed for dst of my_base64_decode() */
|
||||||
|
int my_base64_needed_decoded_length(int length_of_encoded_data);
|
||||||
|
|
||||||
|
/* Maximum length my_base64_decode_needed_length() can accept with no overflow. */
|
||||||
|
int my_base64_decode_max_arg_length();
|
||||||
|
|
||||||
|
/* Encode data as a my_base64 string */
|
||||||
|
int my_base64_encode(const void *src, size_t src_len, char *dst);
|
||||||
|
|
||||||
|
/* Decode a my_base64 string into data */
|
||||||
|
int my_base64_decode(const char *src, size_t src_len,
|
||||||
|
void *dst, const char **end_ptr, int flags);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MYSQL_SERVICE_BASE64_INCLUDED
|
||||||
|
#endif
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#ifndef MYSQL_SERVICE_LOGGER_INCLUDED
|
#ifndef MYSQL_SERVICE_LOGGER_INCLUDED
|
||||||
#define MYSQL_SERVICE_LOGGER_INCLUDED
|
#define MYSQL_SERVICE_LOGGER_INCLUDED
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file
|
@file
|
||||||
|
130
include/mysql/service_sha2.h
Normal file
130
include/mysql/service_sha2.h
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
#ifndef MYSQL_SERVICE_SHA2_INCLUDED
|
||||||
|
/* Copyright (c) 2017, MariaDB
|
||||||
|
|
||||||
|
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 sha2 service
|
||||||
|
|
||||||
|
Functions to calculate SHA2 hash from a memory buffer
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MYSQL_ABI_CHECK
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern struct my_sha2_service_st {
|
||||||
|
void (*my_sha224_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha224_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha224_context_size_type)();
|
||||||
|
void (*my_sha224_init_type)(void *);
|
||||||
|
void (*my_sha224_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha224_result_type)(void *, unsigned char *);
|
||||||
|
|
||||||
|
void (*my_sha256_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha256_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha256_context_size_type)();
|
||||||
|
void (*my_sha256_init_type)(void *);
|
||||||
|
void (*my_sha256_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha256_result_type)(void *, unsigned char *);
|
||||||
|
|
||||||
|
void (*my_sha384_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha384_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha384_context_size_type)();
|
||||||
|
void (*my_sha384_init_type)(void *);
|
||||||
|
void (*my_sha384_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha384_result_type)(void *, unsigned char *);
|
||||||
|
|
||||||
|
void (*my_sha512_type)(unsigned char*, const char*, size_t);
|
||||||
|
void (*my_sha512_multi_type)(unsigned char*, ...);
|
||||||
|
size_t (*my_sha512_context_size_type)();
|
||||||
|
void (*my_sha512_init_type)(void *);
|
||||||
|
void (*my_sha512_input_type)(void *, const unsigned char *, size_t);
|
||||||
|
void (*my_sha512_result_type)(void *, unsigned char *);
|
||||||
|
} *my_sha2_service;
|
||||||
|
|
||||||
|
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||||
|
|
||||||
|
#define my_sha224(A,B,C) my_sha2_service->my_sha224_type(A,B,C)
|
||||||
|
#define my_sha224_multi my_sha2_service->my_sha224_multi_type
|
||||||
|
#define my_sha224_context_size() my_sha2_service->my_sha224_context_size_type()
|
||||||
|
#define my_sha224_init(A) my_sha2_service->my_sha224_init_type(A)
|
||||||
|
#define my_sha224_input(A,B,C) my_sha2_service->my_sha224_input_type(A,B,C)
|
||||||
|
#define my_sha224_result(A,B) my_sha2_service->my_sha224_result_type(A,B)
|
||||||
|
|
||||||
|
#define my_sha256(A,B,C) my_sha2_service->my_sha256_type(A,B,C)
|
||||||
|
#define my_sha256_multi my_sha2_service->my_sha256_multi_type
|
||||||
|
#define my_sha256_context_size() my_sha2_service->my_sha256_context_size_type()
|
||||||
|
#define my_sha256_init(A) my_sha2_service->my_sha256_init_type(A)
|
||||||
|
#define my_sha256_input(A,B,C) my_sha2_service->my_sha256_input_type(A,B,C)
|
||||||
|
#define my_sha256_result(A,B) my_sha2_service->my_sha256_result_type(A,B)
|
||||||
|
|
||||||
|
#define my_sha384(A,B,C) my_sha2_service->my_sha384_type(A,B,C)
|
||||||
|
#define my_sha384_multi my_sha2_service->my_sha384_multi_type
|
||||||
|
#define my_sha384_context_size() my_sha2_service->my_sha384_context_size_type()
|
||||||
|
#define my_sha384_init(A) my_sha2_service->my_sha384_init_type(A)
|
||||||
|
#define my_sha384_input(A,B,C) my_sha2_service->my_sha384_input_type(A,B,C)
|
||||||
|
#define my_sha384_result(A,B) my_sha2_service->my_sha384_result_type(A,B)
|
||||||
|
|
||||||
|
#define my_sha512(A,B,C) my_sha2_service->my_sha512_type(A,B,C)
|
||||||
|
#define my_sha512_multi my_sha2_service->my_sha512_multi_type
|
||||||
|
#define my_sha512_context_size() my_sha2_service->my_sha512_context_size_type()
|
||||||
|
#define my_sha512_init(A) my_sha2_service->my_sha512_init_type(A)
|
||||||
|
#define my_sha512_input(A,B,C) my_sha2_service->my_sha512_input_type(A,B,C)
|
||||||
|
#define my_sha512_result(A,B) my_sha2_service->my_sha512_result_type(A,B)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void my_sha224(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha224_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha224_context_size();
|
||||||
|
void my_sha224_init(void *context);
|
||||||
|
void my_sha224_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha224_result(void *context, unsigned char *digest);
|
||||||
|
|
||||||
|
void my_sha256(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha256_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha256_context_size();
|
||||||
|
void my_sha256_init(void *context);
|
||||||
|
void my_sha256_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha256_result(void *context, unsigned char *digest);
|
||||||
|
|
||||||
|
void my_sha384(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha384_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha384_context_size();
|
||||||
|
void my_sha384_init(void *context);
|
||||||
|
void my_sha384_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha384_result(void *context, unsigned char *digest);
|
||||||
|
|
||||||
|
void my_sha512(unsigned char*, const char*, size_t);
|
||||||
|
void my_sha512_multi(unsigned char*, ...);
|
||||||
|
size_t my_sha512_context_size();
|
||||||
|
void my_sha512_init(void *context);
|
||||||
|
void my_sha512_input(void *context, const unsigned char *buf, size_t len);
|
||||||
|
void my_sha512_result(void *context, unsigned char *digest);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MYSQL_SERVICE_SHA2_INCLUDED
|
||||||
|
#endif
|
||||||
|
|
62
include/mysql/service_thd_rnd.h
Normal file
62
include/mysql/service_thd_rnd.h
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#ifndef MYSQL_SERVICE_THD_RND_INCLUDED
|
||||||
|
/* Copyright (C) 2017 MariaDB Corporation
|
||||||
|
|
||||||
|
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 access to the thd-local random number generator.
|
||||||
|
|
||||||
|
It's preferrable over the global one, because concurrent threads
|
||||||
|
can generate random numbers without fighting each other over the access
|
||||||
|
to the shared rnd state.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef MYSQL_ABI_CHECK
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern struct thd_rnd_service_st {
|
||||||
|
double (*thd_rnd_ptr)(MYSQL_THD thd);
|
||||||
|
void (*thd_c_r_p_ptr)(MYSQL_THD thd, char *to, size_t length);
|
||||||
|
} *thd_rnd_service;
|
||||||
|
|
||||||
|
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||||
|
#define thd_rnd(A) thd_rnd_service->thd_rnd_ptr(A)
|
||||||
|
#define thd_create_random_password(A,B,C) thd_rnd_service->thd_c_r_p_ptr(A,B,C)
|
||||||
|
#else
|
||||||
|
|
||||||
|
double thd_rnd(MYSQL_THD thd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Generate string of printable random characters of requested length.
|
||||||
|
|
||||||
|
@param to[out] Buffer for generation; must be at least length+1 bytes
|
||||||
|
long; result string is always null-terminated
|
||||||
|
@param length[in] How many random characters to put in buffer
|
||||||
|
*/
|
||||||
|
void thd_create_random_password(MYSQL_THD thd, char *to, size_t length);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MYSQL_SERVICE_THD_RND_INCLUDED
|
||||||
|
#endif
|
@ -1,6 +1,6 @@
|
|||||||
#ifndef MYSQL_SERVICES_INCLUDED
|
#ifndef MYSQL_SERVICES_INCLUDED
|
||||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2012, 2013, Monty Program Ab
|
Copyright (c) 2012, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -19,21 +19,24 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <mysql/service_my_snprintf.h>
|
#include <mysql/service_base64.h>
|
||||||
#include <mysql/service_thd_alloc.h>
|
|
||||||
#include <mysql/service_thd_wait.h>
|
|
||||||
#include <mysql/service_progress_report.h>
|
|
||||||
#include <mysql/service_debug_sync.h>
|
#include <mysql/service_debug_sync.h>
|
||||||
#include <mysql/service_kill_statement.h>
|
|
||||||
#include <mysql/service_thd_timezone.h>
|
|
||||||
#include <mysql/service_sha1.h>
|
|
||||||
#include <mysql/service_md5.h>
|
|
||||||
#include <mysql/service_logger.h>
|
|
||||||
#include <mysql/service_thd_autoinc.h>
|
|
||||||
#include <mysql/service_thd_error_context.h>
|
|
||||||
#include <mysql/service_thd_specifics.h>
|
|
||||||
#include <mysql/service_encryption.h>
|
#include <mysql/service_encryption.h>
|
||||||
#include <mysql/service_encryption_scheme.h>
|
#include <mysql/service_encryption_scheme.h>
|
||||||
|
#include <mysql/service_kill_statement.h>
|
||||||
|
#include <mysql/service_logger.h>
|
||||||
|
#include <mysql/service_md5.h>
|
||||||
|
#include <mysql/service_my_snprintf.h>
|
||||||
|
#include <mysql/service_progress_report.h>
|
||||||
|
#include <mysql/service_sha1.h>
|
||||||
|
#include <mysql/service_sha2.h>
|
||||||
|
#include <mysql/service_thd_alloc.h>
|
||||||
|
#include <mysql/service_thd_autoinc.h>
|
||||||
|
#include <mysql/service_thd_error_context.h>
|
||||||
|
#include <mysql/service_thd_rnd.h>
|
||||||
|
#include <mysql/service_thd_specifics.h>
|
||||||
|
#include <mysql/service_thd_timezone.h>
|
||||||
|
#include <mysql/service_thd_wait.h>
|
||||||
/*#include <mysql/service_wsrep.h>*/
|
/*#include <mysql/service_wsrep.h>*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
/* Common definitions for MariaDB non-blocking client library. */
|
/* Common definitions for MariaDB non-blocking client library. */
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2012, 2013, Monty Program Ab
|
Copyright (c) 2012, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -23,18 +23,20 @@
|
|||||||
#define VERSION_debug_sync 0x1000
|
#define VERSION_debug_sync 0x1000
|
||||||
#define VERSION_kill_statement 0x1000
|
#define VERSION_kill_statement 0x1000
|
||||||
|
|
||||||
#define VERSION_my_snprintf 0x0100
|
#define VERSION_base64 0x0100
|
||||||
#define VERSION_thd_alloc 0x0100
|
|
||||||
#define VERSION_thd_wait 0x0100
|
|
||||||
#define VERSION_progress_report 0x0100
|
|
||||||
#define VERSION_thd_timezone 0x0100
|
|
||||||
#define VERSION_my_sha1 0x0101
|
|
||||||
#define VERSION_my_md5 0x0100
|
|
||||||
#define VERSION_wsrep 0x0201
|
|
||||||
#define VERSION_logger 0x0100
|
|
||||||
#define VERSION_thd_autoinc 0x0100
|
|
||||||
#define VERSION_thd_error_context 0x0100
|
|
||||||
#define VERSION_thd_specifics 0x0100
|
|
||||||
#define VERSION_encryption 0x0300
|
#define VERSION_encryption 0x0300
|
||||||
#define VERSION_encryption_scheme 0x0100
|
#define VERSION_encryption_scheme 0x0100
|
||||||
|
#define VERSION_logger 0x0100
|
||||||
|
#define VERSION_my_md5 0x0100
|
||||||
|
#define VERSION_my_sha1 0x0101
|
||||||
|
#define VERSION_my_sha2 0x0100
|
||||||
|
#define VERSION_my_snprintf 0x0100
|
||||||
|
#define VERSION_progress_report 0x0100
|
||||||
|
#define VERSION_thd_alloc 0x0100
|
||||||
|
#define VERSION_thd_autoinc 0x0100
|
||||||
|
#define VERSION_thd_error_context 0x0100
|
||||||
|
#define VERSION_thd_rnd 0x0100
|
||||||
|
#define VERSION_thd_specifics 0x0100
|
||||||
|
#define VERSION_thd_timezone 0x0100
|
||||||
|
#define VERSION_thd_wait 0x0100
|
||||||
|
#define VERSION_wsrep 0x0201
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
#ifndef SHA1_INCLUDED
|
|
||||||
#define SHA1_INCLUDED
|
|
||||||
|
|
||||||
/* Copyright (c) 2013, Monty Program 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <mysql/service_sha1.h>
|
|
||||||
#define SHA1_HASH_SIZE MY_SHA1_HASH_SIZE
|
|
||||||
#define compute_sha1_hash(A,B,C) my_sha1(A,B,C)
|
|
||||||
#define compute_sha1_hash_multi(A,B,C,D,E) my_sha1_multi(A,B,C,D,E,NULL)
|
|
||||||
|
|
||||||
#endif /* SHA__INCLUDED */
|
|
@ -1,72 +0,0 @@
|
|||||||
/* 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 <my_config.h>
|
|
||||||
|
|
||||||
#if defined(HAVE_YASSL) || defined(HAVE_OPENSSL)
|
|
||||||
|
|
||||||
# ifdef HAVE_STDDEF_H
|
|
||||||
# include <stddef.h>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef HAVE_YASSL
|
|
||||||
# include <openssl/sha.h>
|
|
||||||
|
|
||||||
# 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 */
|
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#ifndef _waiting_threads_h
|
#ifndef _waiting_threads_h
|
||||||
#define _waiting_threads_h
|
#define _waiting_threads_h
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#ifndef WQUEUE_INCLUDED
|
#ifndef WQUEUE_INCLUDED
|
||||||
#define WQUEUE_INCLUDED
|
#define WQUEUE_INCLUDED
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#include <my_config.h>
|
#include <my_config.h>
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit cae391f7bf47f17fb246cded8ddf0ef19dbfbdec
|
Subproject commit d1387356292fb840c7736aeb8f449310c3139087
|
@ -56,7 +56,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
|||||||
../sql/net_serv.cc ../sql/opt_range.cc ../sql/opt_sum.cc
|
../sql/net_serv.cc ../sql/opt_range.cc ../sql/opt_sum.cc
|
||||||
../sql/parse_file.cc ../sql/procedure.cc ../sql/protocol.cc
|
../sql/parse_file.cc ../sql/procedure.cc ../sql/protocol.cc
|
||||||
../sql/records.cc ../sql/repl_failsafe.cc ../sql/rpl_filter.cc
|
../sql/records.cc ../sql/repl_failsafe.cc ../sql/rpl_filter.cc
|
||||||
../sql/rpl_record.cc ../sql/sha2.cc ../sql/des_key_file.cc
|
../sql/rpl_record.cc ../sql/des_key_file.cc
|
||||||
../sql/rpl_injector.cc ../sql/set_var.cc ../sql/spatial.cc
|
../sql/rpl_injector.cc ../sql/set_var.cc ../sql/spatial.cc
|
||||||
../sql/sp_cache.cc ../sql/sp.cc ../sql/sp_head.cc
|
../sql/sp_cache.cc ../sql/sp.cc ../sql/sp_head.cc
|
||||||
../sql/sp_pcontext.cc ../sql/sp_rcontext.cc ../sql/sql_acl.cc
|
../sql/sp_pcontext.cc ../sql/sp_rcontext.cc ../sql/sql_acl.cc
|
||||||
|
@ -193,7 +193,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
|
|||||||
the library.
|
the library.
|
||||||
|
|
||||||
To make things simpler when used with windows dll's (which calls this
|
To make things simpler when used with windows dll's (which calls this
|
||||||
function automaticly), it's safe to call this function multiple times.
|
function automatically), it's safe to call this function multiple times.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -603,7 +603,7 @@ static int default_local_infile_init(void **ptr, const char *filename,
|
|||||||
default_local_infile_read()
|
default_local_infile_read()
|
||||||
ptr Points to handle allocated by _init
|
ptr Points to handle allocated by _init
|
||||||
buf Read data here
|
buf Read data here
|
||||||
buf_len Ammount of data to read
|
buf_len Amount of data to read
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
> 0 number of bytes read
|
> 0 number of bytes read
|
||||||
@ -658,7 +658,7 @@ static void default_local_infile_end(void *ptr)
|
|||||||
ptr Points to handle allocated by _init
|
ptr Points to handle allocated by _init
|
||||||
May be NULL if _init failed!
|
May be NULL if _init failed!
|
||||||
error_msg Store error text here
|
error_msg Store error text here
|
||||||
error_msg_len Max lenght of error_msg
|
error_msg_len Max length of error_msg
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
error message number
|
error message number
|
||||||
@ -1268,7 +1268,7 @@ static int stmt_read_row_no_result_set(MYSQL_STMT *stmt, unsigned char **row);
|
|||||||
static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data);
|
static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data);
|
||||||
static my_bool setup_one_fetch_function(MYSQL_BIND *, MYSQL_FIELD *field);
|
static my_bool setup_one_fetch_function(MYSQL_BIND *, MYSQL_FIELD *field);
|
||||||
|
|
||||||
/* Auxilary function used to reset statement handle. */
|
/* Auxiliary function used to reset statement handle. */
|
||||||
|
|
||||||
#define RESET_SERVER_SIDE 1
|
#define RESET_SERVER_SIDE 1
|
||||||
#define RESET_LONG_DATA 2
|
#define RESET_LONG_DATA 2
|
||||||
@ -1812,7 +1812,7 @@ static void update_stmt_fields(MYSQL_STMT *stmt)
|
|||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
NULL statement contains no result set or out of memory.
|
NULL statement contains no result set or out of memory.
|
||||||
In the latter case you can retreive error message
|
In the latter case you can retrieve error message
|
||||||
with mysql_stmt_error.
|
with mysql_stmt_error.
|
||||||
MYSQL_RES a result set with no rows
|
MYSQL_RES a result set with no rows
|
||||||
*/
|
*/
|
||||||
@ -1850,7 +1850,7 @@ mysql_stmt_result_metadata(MYSQL_STMT *stmt)
|
|||||||
Returns parameter columns meta information in the form of
|
Returns parameter columns meta information in the form of
|
||||||
result set.
|
result set.
|
||||||
|
|
||||||
SYNOPSYS
|
SYNOPSIS
|
||||||
mysql_stmt_param_metadata()
|
mysql_stmt_param_metadata()
|
||||||
stmt statement handle
|
stmt statement handle
|
||||||
|
|
||||||
@ -1899,7 +1899,7 @@ static void store_param_type(unsigned char **pos, MYSQL_BIND *param)
|
|||||||
param MySQL bind param
|
param MySQL bind param
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
These funtions are invoked from mysql_stmt_execute() by
|
These functions are invoked from mysql_stmt_execute() by
|
||||||
MYSQL_BIND::store_param_func pointer. This pointer is set once per
|
MYSQL_BIND::store_param_func pointer. This pointer is set once per
|
||||||
many executions in mysql_stmt_bind_param(). The caller must ensure
|
many executions in mysql_stmt_bind_param(). The caller must ensure
|
||||||
that network buffer have enough capacity to store parameter
|
that network buffer have enough capacity to store parameter
|
||||||
@ -2076,7 +2076,7 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Auxilary function to send COM_STMT_EXECUTE packet to server and read reply.
|
Auxiliary function to send COM_STMT_EXECUTE packet to server and read reply.
|
||||||
Used from cli_stmt_execute, which is in turn used by mysql_stmt_execute.
|
Used from cli_stmt_execute, which is in turn used by mysql_stmt_execute.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -4464,7 +4464,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
|
|||||||
if (stmt->update_max_length && !stmt->bind_result_done)
|
if (stmt->update_max_length && !stmt->bind_result_done)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
We must initalize the bind structure to be able to calculate
|
We must initialize the bind structure to be able to calculate
|
||||||
max_length
|
max_length
|
||||||
*/
|
*/
|
||||||
MYSQL_BIND *my_bind, *end;
|
MYSQL_BIND *my_bind, *end;
|
||||||
|
@ -16,22 +16,26 @@
|
|||||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
||||||
|
|
||||||
SET(MYSQLSERVICES_SOURCES
|
SET(MYSQLSERVICES_SOURCES
|
||||||
|
base64_service.c
|
||||||
|
debug_sync_service.c
|
||||||
|
encryption_scheme_service.c
|
||||||
|
encryption_service.c
|
||||||
|
kill_statement_service.c
|
||||||
|
logger_service.c
|
||||||
|
my_md5_service.c
|
||||||
|
my_sha1_service.c
|
||||||
|
my_sha2_service.c
|
||||||
my_snprintf_service.c
|
my_snprintf_service.c
|
||||||
|
progress_report_service.c
|
||||||
thd_alloc_service.c
|
thd_alloc_service.c
|
||||||
thd_wait_service.c
|
|
||||||
thd_timezone_service.c
|
|
||||||
thd_autoinc_service.c
|
thd_autoinc_service.c
|
||||||
thd_error_context_service.c
|
thd_error_context_service.c
|
||||||
|
thd_rnd_service.c
|
||||||
thd_specifics_service.c
|
thd_specifics_service.c
|
||||||
progress_report_service.c
|
thd_timezone_service.c
|
||||||
debug_sync_service.c
|
thd_wait_service.c
|
||||||
my_sha1_service.c
|
|
||||||
my_md5_service.c
|
|
||||||
wsrep_service.c
|
wsrep_service.c
|
||||||
encryption_service.c
|
)
|
||||||
encryption_scheme_service.c
|
|
||||||
kill_statement_service.c
|
|
||||||
logger_service.c)
|
|
||||||
|
|
||||||
ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
|
ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
|
||||||
INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)
|
INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)
|
||||||
|
@ -74,7 +74,7 @@ it should also declare all the accompanying data structures, as necessary
|
|||||||
#define VERSION_foo 0x0100
|
#define VERSION_foo 0x0100
|
||||||
==================================================================
|
==================================================================
|
||||||
|
|
||||||
6. create a new file libservices/foo_service.h using the following template:
|
6. create a new file libservices/foo_service.c using the following template:
|
||||||
==================================================================
|
==================================================================
|
||||||
/* GPL header */
|
/* GPL header */
|
||||||
#include <service_versions.h>
|
#include <service_versions.h>
|
||||||
@ -82,7 +82,7 @@ it should also declare all the accompanying data structures, as necessary
|
|||||||
==================================================================
|
==================================================================
|
||||||
|
|
||||||
7. add the new file to libservices/CMakeLists.txt (MYSQLSERVICES_SOURCES)
|
7. add the new file to libservices/CMakeLists.txt (MYSQLSERVICES_SOURCES)
|
||||||
8. Add all new files to repository (bzr add)
|
8. Add all new files to repository (git add)
|
||||||
9. and finally, register your service for dynamic linking in
|
9. and finally, register your service for dynamic linking in
|
||||||
sql/sql_plugin_services.ic as follows:
|
sql/sql_plugin_services.ic as follows:
|
||||||
9.1 fill in the service structure:
|
9.1 fill in the service structure:
|
||||||
|
18
libservices/base64_service.c
Normal file
18
libservices/base64_service.c
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/* Copyright (c) 2017 MariaDB
|
||||||
|
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 */
|
||||||
|
|
||||||
|
#include <service_versions.h>
|
||||||
|
SERVICE_VERSION base64_service= (void*)VERSION_base64;
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#include <service_versions.h>
|
#include <service_versions.h>
|
||||||
|
|
||||||
|
18
libservices/my_sha2_service.c
Normal file
18
libservices/my_sha2_service.c
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/* Copyright (c) 2017 MariaDB
|
||||||
|
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 */
|
||||||
|
|
||||||
|
#include <service_versions.h>
|
||||||
|
SERVICE_VERSION my_sha2_service= (void*)VERSION_my_sha2;
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#include <service_versions.h>
|
#include <service_versions.h>
|
||||||
SERVICE_VERSION progress_report_service= (void*)VERSION_progress_report;
|
SERVICE_VERSION progress_report_service= (void*)VERSION_progress_report;
|
||||||
|
17
libservices/thd_rnd_service.c
Normal file
17
libservices/thd_rnd_service.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright (C) 2017 MariaDB Corporation
|
||||||
|
|
||||||
|
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 */
|
||||||
|
|
||||||
|
#include <service_versions.h>
|
||||||
|
SERVICE_VERSION thd_rnd_service= (void *) VERSION_thd_rnd;
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||||
|
|
||||||
#include <service_versions.h>
|
#include <service_versions.h>
|
||||||
|
|
||||||
|
@ -22,7 +22,11 @@ SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
|
|||||||
mysql_tzinfo_to_sql.1 mysql_upgrade.1
|
mysql_tzinfo_to_sql.1 mysql_upgrade.1
|
||||||
mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1
|
mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1
|
||||||
mysqltest.1 perror.1 replace.1 resolve_stack_dump.1
|
mysqltest.1 perror.1 replace.1 resolve_stack_dump.1
|
||||||
resolveip.1)
|
resolveip.1 mariadb-service-convert.1
|
||||||
|
mysqld_safe_helper.1 tokuftdump.1 wsrep_sst_common.1
|
||||||
|
wsrep_sst_mysqldump.1 wsrep_sst_rsync.1
|
||||||
|
wsrep_sst_xtrabackup-v2.1 wsrep_sst_xtrabackup.1
|
||||||
|
galera_recovery.1 galera_new_cluster.1)
|
||||||
SET(MAN8_SERVER mysqld.8)
|
SET(MAN8_SERVER mysqld.8)
|
||||||
SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1
|
SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1
|
||||||
mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1
|
mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1
|
||||||
|
16
man/galera_new_cluster.1
Normal file
16
man/galera_new_cluster.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBGALERA_NEW_CLUSTER\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
galera_new_cluster \- starting a new Galera cluster
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: Starting a new Galera Cluster\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
16
man/galera_recovery.1
Normal file
16
man/galera_recovery.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBGALERA_RECOVERY\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
galera_recovery \- recover from non\-graceful shutdown
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: Recover from non\-graceful shutdown\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
20
man/mariadb-service-convert.1
Normal file
20
man/mariadb-service-convert.1
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBMARIADB-SERVICE-CONVERT\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
mariadb-service-convert \- generate a mariadb.service file based on the current mysql/mariadb settings
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: Generate a mariadb.service file based on the current mysql/mariadb settings\.
|
||||||
|
This is to assist distro maintainers in migrating to systemd service definations from
|
||||||
|
a user mysqld_safe settings in the my.cnf files\.
|
||||||
|
.PP
|
||||||
|
Redirect output to user directory like /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
@ -816,6 +816,18 @@ Connect to the MariaDB server on the given host\&.
|
|||||||
.sp -1
|
.sp -1
|
||||||
.IP \(bu 2.3
|
.IP \(bu 2.3
|
||||||
.\}
|
.\}
|
||||||
|
.\" mysqladmin: local option
|
||||||
|
.\" local option: mysqladmin
|
||||||
|
\fB\-\-local\fR,
|
||||||
|
\fB\-l\fR
|
||||||
|
.sp
|
||||||
|
Suppress the SQL command(s) from being written to the binary log by enabling sql_log_bin=0 for the session\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
.\" mysqladmin: no-beep option
|
.\" mysqladmin: no-beep option
|
||||||
.\" no-beep option: mysqladmin
|
.\" no-beep option: mysqladmin
|
||||||
\fB\-\-no\-beep\fR,
|
\fB\-\-no\-beep\fR,
|
||||||
|
16
man/mysqld_safe_helper.1
Normal file
16
man/mysqld_safe_helper.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBMYSQLD_SAFE_HELPER\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
mysqld_safe_helper \- helper script
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: Helper script\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
237
man/tokuftdump.1
Normal file
237
man/tokuftdump.1
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBTOKUFTDUMP\FR" "1" "9 March 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * MAIN CONTENT STARTS HERE *
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" tokuftdump
|
||||||
|
.\" upgrading MySQL
|
||||||
|
.SH "NAME"
|
||||||
|
tokuftdump \- look into the fractal tree file
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.HP \w'\fBtokuftdump\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
|
||||||
|
\fBtokuftdump [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
.PP
|
||||||
|
\fBtokuftdump\fR
|
||||||
|
Investigates and diagnoses the fractal tree\&.
|
||||||
|
.PP
|
||||||
|
\fBtokuftdump\fR
|
||||||
|
supports the following options for processing option files\&.
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: interactive option
|
||||||
|
.\" interactive option: tokuftdump
|
||||||
|
\fB\-\-interactive\fR
|
||||||
|
.sp
|
||||||
|
Interactive\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: support option
|
||||||
|
.\" support option: tokuftdump
|
||||||
|
\fB\-\-support \fI/path/to/fractal-tree/file\fR
|
||||||
|
.sp
|
||||||
|
An interactive way to see what messages and/or switch between FTs\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: json option
|
||||||
|
.\" json option: tokuftdump
|
||||||
|
\fB\-\-json \fI/path/to/fractal-tree/file [output_json_file]\fR
|
||||||
|
.sp
|
||||||
|
If the output json file is left empty, FT\&.json will be created automatically\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: nodata option
|
||||||
|
.\" nodata option: tokuftdump
|
||||||
|
\fB\-\-nodata\fR
|
||||||
|
.sp
|
||||||
|
Nodata\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: dumpdata option
|
||||||
|
.\" dumpdata option: tokuftdump
|
||||||
|
\fB\-\-dumpdata = \fR\fB\fI0|1\fR\fR
|
||||||
|
.sp
|
||||||
|
Dumpdata\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: header option
|
||||||
|
.\" header option: tokuftdump
|
||||||
|
\fB\-\-header\fR
|
||||||
|
.sp
|
||||||
|
Header\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: rootnode option
|
||||||
|
.\" rootnode option: tokuftdump
|
||||||
|
\fB\-\-rootnode\fR
|
||||||
|
.sp
|
||||||
|
Rootnode\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: node option
|
||||||
|
.\" node option: tokuftdump
|
||||||
|
\fB\-\-node \fIN\fR
|
||||||
|
.sp
|
||||||
|
Node\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: fragmentation option
|
||||||
|
.\" fragmentation option: tokuftdump
|
||||||
|
\fB\-\-fragmentation\fR
|
||||||
|
.sp
|
||||||
|
Fragmentation\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: garbage option
|
||||||
|
.\" garbage option: tokuftdump
|
||||||
|
\fB\-\-garbage\fR
|
||||||
|
.sp
|
||||||
|
Garbage\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: tsv option
|
||||||
|
.\" tsv option: tokuftdump
|
||||||
|
\fB\-\-tsv\fR
|
||||||
|
.sp
|
||||||
|
TSV\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: translation-table option
|
||||||
|
.\" translation-table option: tokuftdump
|
||||||
|
\fB\-\-translation\-table\fR
|
||||||
|
.sp
|
||||||
|
Translation table\&.
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.ie n \{\
|
||||||
|
\h'-04'\(bu\h'+03'\c
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
.sp -1
|
||||||
|
.IP \(bu 2.3
|
||||||
|
.\}
|
||||||
|
.\" tokuftdump: summary option
|
||||||
|
.\" summary option: tokuftdump
|
||||||
|
\fB\-\-summary\fR
|
||||||
|
.sp
|
||||||
|
Provide summary info\&.
|
||||||
|
.RE
|
||||||
|
.SH "COPYRIGHT"
|
||||||
|
.br
|
||||||
|
.PP
|
||||||
|
Copyright 2016 MariaDB Foundation
|
||||||
|
.PP
|
||||||
|
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
|
||||||
|
.PP
|
||||||
|
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
.PP
|
||||||
|
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
|
||||||
|
.sp
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
||||||
|
.SH AUTHOR
|
||||||
|
MariaDB Foundation (http://www.mariadb.org/).
|
16
man/wsrep_sst_common.1
Normal file
16
man/wsrep_sst_common.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBWSREP_SST_COMMON\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
wsrep_sst_common \- common command line parser to be sourced by other SST scripts
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: Common command line parser to be sourced by other SST scripts\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
16
man/wsrep_sst_mysqldump.1
Normal file
16
man/wsrep_sst_mysqldump.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBWSREP_SST_MYSQLDUMP\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
wsrep_sst_mysqldump \- mysqldump\-based state snapshot transfer
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: mysqldump-based state snapshot transfer\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
16
man/wsrep_sst_rsync.1
Normal file
16
man/wsrep_sst_rsync.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBWSREP_SST_RSYNC\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
wsrep_sst_mysqldump \- rsync-based state snapshot transfer
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: rsync-based state snapshot transfer\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
16
man/wsrep_sst_xtrabackup-v2.1
Normal file
16
man/wsrep_sst_xtrabackup-v2.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBWSREP_SST_XTRABACKUP-V2\FR" "1" "26 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
wsrep_sst_xtrabackup-v2 \- xtrabackup\-based state snapshot transfer
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: xtrabackup-based state snapshot transfer\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
16
man/wsrep_sst_xtrabackup.1
Normal file
16
man/wsrep_sst_xtrabackup.1
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'\" t
|
||||||
|
.\"
|
||||||
|
.TH "\FBWSREP_SST_XTRABACKUP\FR" "1" "24 January 2017" "MariaDB 10\&.1" "MariaDB Database System"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.SH NAME
|
||||||
|
wsrep_sst_xtrabackup \- xtrabackup\-based state snapshot transfer
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Use: xtrabackup-based state snapshot transfer\.
|
||||||
|
.PP
|
||||||
|
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
|
@ -79,5 +79,9 @@ if (!$tmp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
call mtr.check_testcase();
|
call mtr.check_testcase();
|
||||||
|
|
||||||
|
let $datadir=`select @@datadir`;
|
||||||
|
list_files $datadir mysql_upgrade_info;
|
||||||
|
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
27
mysql-test/include/gap_lock_error_all.inc
Normal file
27
mysql-test/include/gap_lock_error_all.inc
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--source include/have_partition.inc
|
||||||
|
--source include/gap_lock_error_init.inc
|
||||||
|
|
||||||
|
let $select_lock=for update;
|
||||||
|
let $autocommit = 0;
|
||||||
|
--source include/gap_lock_error_select.inc
|
||||||
|
let $autocommit = 1;
|
||||||
|
--source include/gap_lock_error_select.inc
|
||||||
|
|
||||||
|
let $select_lock=lock in share mode;
|
||||||
|
let $autocommit = 0;
|
||||||
|
--source include/gap_lock_error_select.inc
|
||||||
|
let $autocommit = 1;
|
||||||
|
--source include/gap_lock_error_select.inc
|
||||||
|
|
||||||
|
let $select_lock=;
|
||||||
|
let $autocommit = 0;
|
||||||
|
--source include/gap_lock_error_select.inc
|
||||||
|
let $autocommit = 1;
|
||||||
|
--source include/gap_lock_error_select.inc
|
||||||
|
|
||||||
|
let $autocommit = 0;
|
||||||
|
--source include/gap_lock_error_update.inc
|
||||||
|
let $autocommit = 1;
|
||||||
|
--source include/gap_lock_error_update.inc
|
||||||
|
|
||||||
|
--source include/gap_lock_error_cleanup.inc
|
1
mysql-test/include/gap_lock_error_cleanup.inc
Normal file
1
mysql-test/include/gap_lock_error_cleanup.inc
Normal file
@ -0,0 +1 @@
|
|||||||
|
drop table gap1, gap2, gap3, gap4;
|
24
mysql-test/include/gap_lock_error_init.inc
Normal file
24
mysql-test/include/gap_lock_error_init.inc
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
eval CREATE TABLE gap1 (id1 INT, id2 INT, id3 INT, c1 INT, value INT,
|
||||||
|
PRIMARY KEY (id1, id2, id3),
|
||||||
|
INDEX i (c1)) ENGINE=$engine;
|
||||||
|
CREATE TABLE gap2 like gap1;
|
||||||
|
eval CREATE TABLE gap3 (id INT, value INT,
|
||||||
|
PRIMARY KEY (id),
|
||||||
|
UNIQUE KEY ui(value)) ENGINE=$engine;
|
||||||
|
eval CREATE TABLE gap4 (id INT, value INT,
|
||||||
|
PRIMARY KEY (id)) ENGINE=$engine
|
||||||
|
PARTITION BY HASH(id) PARTITIONS 2;
|
||||||
|
--disable_query_log
|
||||||
|
let $max = 1000;
|
||||||
|
let $i = 1;
|
||||||
|
while ($i <= $max) {
|
||||||
|
eval INSERT INTO gap1 (id1, id2, id3, c1, value)
|
||||||
|
VALUES ($i div 2, $i div 10, $i, $i, $i);
|
||||||
|
eval INSERT INTO gap2 (id1, id2, id3, c1, value)
|
||||||
|
VALUES ($i div 2, $i div 10, $i, $i, $i);
|
||||||
|
inc $i;
|
||||||
|
}
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
insert into gap3 values (1,1), (2,2),(3,3),(4,4),(5,5);
|
||||||
|
insert into gap4 values (1,1), (2,2),(3,3),(4,4),(5,5);
|
89
mysql-test/include/gap_lock_error_select.inc
Normal file
89
mysql-test/include/gap_lock_error_select.inc
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
eval set session autocommit=$autocommit;
|
||||||
|
let $is_gaplock_target = `SELECT @@autocommit = 0 && '$select_lock' != '' && '$expect_gap_lock_errors' = 1`;
|
||||||
|
|
||||||
|
if ($is_gaplock_target)
|
||||||
|
{
|
||||||
|
# rnd_init
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 limit 1 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 where value != 100 limit 1 $select_lock;
|
||||||
|
# index_read_map
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 where id1=1 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 $select_lock;
|
||||||
|
# read_range_first
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 and id3 != 1 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 and id3
|
||||||
|
between 1 and 3 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 order by id3 asc
|
||||||
|
limit 1 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 order by id3 desc
|
||||||
|
limit 1 $select_lock;
|
||||||
|
# index_first
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 order by id1 asc limit 1 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 order by id1 asc, id2 asc, id3 asc limit 1 $select_lock;
|
||||||
|
# index_last
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 order by id1 desc limit 1 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 order by id1 desc, id2 desc, id3 desc
|
||||||
|
limit 1 $select_lock;
|
||||||
|
# secondary index lookup
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap1 force index(i) where c1=1 $select_lock;
|
||||||
|
# unique index lookup, ensure no gap lock errors as this is effectively a
|
||||||
|
# single point select that does not lock ranges or gaps of keys
|
||||||
|
eval select * from gap3 force index(ui) where value=1 $select_lock;
|
||||||
|
# primary key lookup, ensure no gap lock errors as these are effectively
|
||||||
|
# single point selects that do not lock ranges or gaps of keys
|
||||||
|
eval select * from gap1 where id1=1 and id2=1 and id3=1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2=1 and id3 in (1, 2, 3) $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2=1 and id3=1 and value=1
|
||||||
|
order by c1 $select_lock;
|
||||||
|
eval select * from gap3 where id=1 $select_lock;
|
||||||
|
eval select * from gap4 where id=1 $select_lock;
|
||||||
|
eval select * from gap4 where id in (1, 2, 3) $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap4 $select_lock;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
eval select * from gap4 where id between 3 and 7 $select_lock;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$is_gaplock_target)
|
||||||
|
{
|
||||||
|
eval select * from gap1 limit 1 $select_lock;
|
||||||
|
eval select * from gap1 where value != 100 limit 1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 and id3 != 1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 and id3
|
||||||
|
between 1 and 3 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 order by id3 asc
|
||||||
|
limit 1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2= 1 order by id3 desc
|
||||||
|
limit 1 $select_lock;
|
||||||
|
eval select * from gap1 order by id1 asc limit 1 $select_lock;
|
||||||
|
eval select * from gap1 order by id1 asc, id2 asc, id3 asc limit 1 $select_lock;
|
||||||
|
eval select * from gap1 order by id1 desc limit 1 $select_lock;
|
||||||
|
eval select * from gap1 order by id1 desc, id2 desc, id3 desc
|
||||||
|
limit 1 $select_lock;
|
||||||
|
eval select * from gap1 force index(i) where c1=1 $select_lock;
|
||||||
|
eval select * from gap3 force index(ui) where value=1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2=1 and id3=1 $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2=1 and id3 in (1, 2, 3) $select_lock;
|
||||||
|
eval select * from gap1 where id1=1 and id2=1 and id3=1 and value=1
|
||||||
|
order by c1 $select_lock;
|
||||||
|
eval select * from gap3 where id=1 $select_lock;
|
||||||
|
eval select * from gap4 where id=1 $select_lock;
|
||||||
|
eval select * from gap4 where id in (1, 2, 3) $select_lock;
|
||||||
|
eval select * from gap4 $select_lock;
|
||||||
|
eval select * from gap4 where id between 3 and 7 $select_lock;
|
||||||
|
}
|
91
mysql-test/include/gap_lock_error_update.inc
Normal file
91
mysql-test/include/gap_lock_error_update.inc
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
eval set session autocommit=$autocommit;
|
||||||
|
let $is_gaplock_target = `SELECT @@autocommit = 0 && '$expect_gap_lock_errors' = 1`;
|
||||||
|
|
||||||
|
if ($is_gaplock_target)
|
||||||
|
{
|
||||||
|
## single-table insert,update,delete
|
||||||
|
insert into gap1 (id1, id2, id3) values (-1,-1,-1);
|
||||||
|
insert into gap1 (id1, id2, id3) values (-1,-1,-1)
|
||||||
|
on duplicate key update value=100;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
update gap1 set value=100 where id1=1;
|
||||||
|
update gap1 set value=100 where id1=1 and id2=1 and id3=1;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
delete from gap1 where id1=2;
|
||||||
|
delete from gap1 where id1=-1 and id2=-1 and id3=-1;
|
||||||
|
commit;
|
||||||
|
|
||||||
|
## multi-table statements (preventing all gap locks with autocommit)
|
||||||
|
# insert into select
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
insert into gap2 select * from gap1;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
insert into gap2 select * from gap1 where id1=1;
|
||||||
|
insert into gap2 select * from gap1 where id1=1 and id2=1 and id3=1;
|
||||||
|
|
||||||
|
# create table select
|
||||||
|
create table t4 select * from gap1 where id1=1 and id2=1 and id3=1;
|
||||||
|
drop table t4;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
create table t4 select * from gap1;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
create table t4 select * from gap1 where id1=1;
|
||||||
|
|
||||||
|
# update join
|
||||||
|
update gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 set gap1.value=100 where gap2.id1=3
|
||||||
|
and gap2.id2=3 and gap2.id3=3;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
update gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 set gap1.value=100 where gap2.id1=3;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
update gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 join gap3 on gap1.id1=gap3.id
|
||||||
|
set gap1.value=100 where gap2.id1=3;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
update gap1 set gap1.value= (select count(*) from gap2);
|
||||||
|
|
||||||
|
# delete join
|
||||||
|
delete gap1 from gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 where gap2.id1=3
|
||||||
|
and gap2.id2=3 and gap2.id3=3;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
delete gap1 from gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 where gap2.id1=3;
|
||||||
|
|
||||||
|
# select join / self join
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
select * from gap1, gap2 limit 1 for update;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
select * from gap1 a, gap1 b limit 1 for update;
|
||||||
|
|
||||||
|
# unique secondary key
|
||||||
|
create table u1(
|
||||||
|
c1 int,
|
||||||
|
c2 int,
|
||||||
|
c3 int,
|
||||||
|
c4 int,
|
||||||
|
primary key (c1, c2, c3),
|
||||||
|
unique key (c3, c1)
|
||||||
|
);
|
||||||
|
begin;
|
||||||
|
insert into u1 values (1,1,1,1);
|
||||||
|
commit;
|
||||||
|
begin;
|
||||||
|
insert into u1 values (1,2,1,1) on duplicate key update c4=10;
|
||||||
|
commit;
|
||||||
|
begin;
|
||||||
|
select * from u1 where c3=1 and c1 = 1 for update;
|
||||||
|
--error ER_UNKNOWN_ERROR
|
||||||
|
select * from u1 where c3=1 for update;
|
||||||
|
commit;
|
||||||
|
drop table u1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$is_gaplock_target)
|
||||||
|
{
|
||||||
|
# autocommit doesn't prevent single table operations
|
||||||
|
insert into gap1 (id1, id2, id3) values (-1,-1,-1);
|
||||||
|
insert into gap1 (id1, id2, id3) values (-1,-1,-1)
|
||||||
|
on duplicate key update value=100;
|
||||||
|
update gap1 set value=100 where id1=1;
|
||||||
|
update gap1 set value=100 where id1=1 and id2=1 and id3=1;
|
||||||
|
delete from gap1 where id1=2;
|
||||||
|
delete from gap1 where id1=-1 and id2=-1 and id3=-1;
|
||||||
|
commit;
|
||||||
|
}
|
@ -284,6 +284,7 @@ CREATE DEFINER=root@localhost
|
|||||||
PROCEDURE add_suppression(pattern VARCHAR(255))
|
PROCEDURE add_suppression(pattern VARCHAR(255))
|
||||||
BEGIN
|
BEGIN
|
||||||
INSERT INTO test_suppressions (pattern) VALUES (pattern);
|
INSERT INTO test_suppressions (pattern) VALUES (pattern);
|
||||||
|
FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions;
|
||||||
END
|
END
|
||||||
*/||
|
*/||
|
||||||
|
|
||||||
|
@ -53,9 +53,19 @@ sub _verify_binpath {
|
|||||||
sub _gdb {
|
sub _gdb {
|
||||||
my ($core_name)= @_;
|
my ($core_name)= @_;
|
||||||
|
|
||||||
print "\nTrying 'gdb' to get a backtrace\n";
|
# Check that gdb exists
|
||||||
|
`gdb --version`;
|
||||||
|
if ($?) {
|
||||||
|
print "gdb not found, cannot get the stack trace\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return unless -f $core_name;
|
if (-f $core_name) {
|
||||||
|
print "\nTrying 'gdb' to get a backtrace from coredump $core_name\n";
|
||||||
|
} else {
|
||||||
|
print "\nCoredump $core_name does not exist, cannot run 'gdb'\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
# Find out name of binary that generated core
|
# Find out name of binary that generated core
|
||||||
`gdb -c '$core_name' --batch 2>&1` =~
|
`gdb -c '$core_name' --batch 2>&1` =~
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#/bin/sh -xe
|
#!/bin/sh -xe
|
||||||
|
|
||||||
# simply run me from mysql-test/
|
# simply run me from mysql-test/
|
||||||
cd std_data/
|
cd std_data/
|
||||||
|
@ -1028,7 +1028,7 @@ sub print_global_resfile {
|
|||||||
resfile_global("gprof", $opt_gprof ? 1 : 0);
|
resfile_global("gprof", $opt_gprof ? 1 : 0);
|
||||||
resfile_global("valgrind", $opt_valgrind ? 1 : 0);
|
resfile_global("valgrind", $opt_valgrind ? 1 : 0);
|
||||||
resfile_global("callgrind", $opt_callgrind ? 1 : 0);
|
resfile_global("callgrind", $opt_callgrind ? 1 : 0);
|
||||||
resfile_global("mem", $opt_mem ? 1 : 0);
|
resfile_global("mem", $opt_mem);
|
||||||
resfile_global("tmpdir", $opt_tmpdir);
|
resfile_global("tmpdir", $opt_tmpdir);
|
||||||
resfile_global("vardir", $opt_vardir);
|
resfile_global("vardir", $opt_vardir);
|
||||||
resfile_global("fast", $opt_fast ? 1 : 0);
|
resfile_global("fast", $opt_fast ? 1 : 0);
|
||||||
@ -1423,12 +1423,14 @@ sub command_line_setup {
|
|||||||
|
|
||||||
# Search through list of locations that are known
|
# Search through list of locations that are known
|
||||||
# to be "fast disks" to find a suitable location
|
# to be "fast disks" to find a suitable location
|
||||||
# Use --mem=<dir> as first location to look.
|
my @tmpfs_locations= ("/run/shm", "/dev/shm", "/tmp");
|
||||||
my @tmpfs_locations= ($opt_mem,"/run/shm", "/dev/shm", "/tmp");
|
|
||||||
|
# Use $ENV{'MTR_MEM'} as first location to look (if defined)
|
||||||
|
unshift(@tmpfs_locations, $ENV{'MTR_MEM'}) if defined $ENV{'MTR_MEM'};
|
||||||
|
|
||||||
foreach my $fs (@tmpfs_locations)
|
foreach my $fs (@tmpfs_locations)
|
||||||
{
|
{
|
||||||
if ( -d $fs )
|
if ( -d $fs && ! -l $fs )
|
||||||
{
|
{
|
||||||
my $template= "var_${opt_build_thread}_XXXX";
|
my $template= "var_${opt_build_thread}_XXXX";
|
||||||
$opt_mem= tempdir( $template, DIR => $fs, CLEANUP => 0);
|
$opt_mem= tempdir( $template, DIR => $fs, CLEANUP => 0);
|
||||||
@ -4348,7 +4350,7 @@ sub extract_warning_lines ($$) {
|
|||||||
qr/InnoDB: Warning: a long semaphore wait:/,
|
qr/InnoDB: Warning: a long semaphore wait:/,
|
||||||
qr/InnoDB: Dumping buffer pool.*/,
|
qr/InnoDB: Dumping buffer pool.*/,
|
||||||
qr/InnoDB: Buffer pool.*/,
|
qr/InnoDB: Buffer pool.*/,
|
||||||
qr/InnoDB: Warning: Writer thread is waiting this semaphore/,
|
qr/InnoDB: Warning: Writer thread is waiting this semaphore:/,
|
||||||
qr/Slave: Unknown table 't1' .* 1051/,
|
qr/Slave: Unknown table 't1' .* 1051/,
|
||||||
qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
|
qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
|
||||||
qr/slave SQL thread aborted/,
|
qr/slave SQL thread aborted/,
|
||||||
@ -5974,9 +5976,9 @@ Options to control directories to use
|
|||||||
vardir=DIR The directory where files generated from the test run
|
vardir=DIR The directory where files generated from the test run
|
||||||
is stored (default: ./var). Specifying a ramdisk or
|
is stored (default: ./var). Specifying a ramdisk or
|
||||||
tmpfs will speed up tests.
|
tmpfs will speed up tests.
|
||||||
mem Run testsuite in "memory" using tmpfs or ramdisk
|
mem[=DIR] Run testsuite in "memory" using tmpfs or ramdisk
|
||||||
Attempts to find a suitable location
|
Attempts to use DIR first if specified else
|
||||||
using a builtin list of standard locations
|
uses a builtin list of standard locations
|
||||||
for tmpfs (/run/shm, /dev/shm, /tmp)
|
for tmpfs (/run/shm, /dev/shm, /tmp)
|
||||||
The option can also be set using environment
|
The option can also be set using environment
|
||||||
variable MTR_MEM=[DIR]
|
variable MTR_MEM=[DIR]
|
||||||
|
@ -1925,8 +1925,8 @@ ALTER TABLE ti1 FORCE;
|
|||||||
affected rows: 0
|
affected rows: 0
|
||||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
ALTER TABLE tm1 FORCE;
|
ALTER TABLE tm1 FORCE;
|
||||||
affected rows: 2
|
affected rows: 0
|
||||||
info: Records: 2 Duplicates: 0 Warnings: 0
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
ALTER TABLE ti1 AUTO_INCREMENT 3;
|
ALTER TABLE ti1 AUTO_INCREMENT 3;
|
||||||
affected rows: 0
|
affected rows: 0
|
||||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
@ -2104,6 +2104,27 @@ Note 1061 Duplicate key name 'id1'
|
|||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-6390 CONVERT TO CHARACTER SET utf8 doesn't change DEFAULT CHARSET.
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (id int(11) NOT NULL, a int(11) NOT NULL, b int(11))
|
||||||
|
ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`a` int(11) NOT NULL,
|
||||||
|
`b` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`a` int(11) NOT NULL,
|
||||||
|
`b` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# Start of 10.1 tests
|
# Start of 10.1 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -140,3 +140,7 @@ create table t1 (a int, b int, check(a>0));
|
|||||||
alter table t1 drop column a;
|
alter table t1 drop column a;
|
||||||
ERROR 42S22: Unknown column 'a' in 'CHECK'
|
ERROR 42S22: Unknown column 'a' in 'CHECK'
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1 (a int check (@b in (select user from mysql.user)));
|
||||||
|
ERROR HY000: Function or expression 'select ...' cannot be used in the CHECK clause of `a`
|
||||||
|
create table t1 (a int check (a > @b));
|
||||||
|
ERROR HY000: Function or expression '@b' cannot be used in the CHECK clause of `a`
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user