MariaDB 5.2 -> MariaDB 5.3 merge
This commit is contained in:
commit
27f9fc063c
@ -1,6 +1,6 @@
|
||||
[MYSQL]
|
||||
tree_location = lp:maria/5.2
|
||||
post_commit_to = maria-developers@lists.launchpad.net
|
||||
post_commit_to = commits@mariadb.org
|
||||
post_commit_url = lp:maria/5.2
|
||||
tree_name = maria/5.2
|
||||
project_name = "Mariadb 5.2, with Maria 2.0"
|
||||
|
@ -1935,3 +1935,8 @@ client/rpl_filter.cc
|
||||
client/rpl_filter.h
|
||||
client/sql_list.cc
|
||||
client/sql_list.h
|
||||
libmysqld/client_plugin.c
|
||||
sql/client_plugin.c
|
||||
*.dgcov
|
||||
libmysqld/create_options.cc
|
||||
storage/pbxt/bin/xtstat
|
||||
|
@ -204,7 +204,7 @@ if test -z "$CC" ; then
|
||||
fi
|
||||
|
||||
if test -z "$CXX" ; then
|
||||
CXX=gcc
|
||||
CXX=g++
|
||||
fi
|
||||
|
||||
# If ccache (a compiler cache which reduces build time)
|
||||
|
@ -32,8 +32,7 @@
|
||||
# .so files at runtime (either system stuff like NSS, or server
|
||||
# plugins).
|
||||
#
|
||||
# We link libgcc statically (and avoid linking libstdc++ at all by
|
||||
# CXX=gcc), to avoid reduce nasty library version dependencies.
|
||||
# We link libgcc statically to avoid reduce nasty library version dependencies.
|
||||
|
||||
test -f Makefile && make distclean
|
||||
|
||||
@ -52,13 +51,12 @@ get_cpuopt
|
||||
get_make_parallel_flag
|
||||
|
||||
# Use gcc rather than g++ to avoid linking libstdc++.so (which we don't need).
|
||||
COMP="gcc -static-libgcc"
|
||||
FLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall $CPUOPT"
|
||||
|
||||
# Don't press on in case of error.
|
||||
set -e
|
||||
|
||||
CC="$COMP" CXX="$COMP" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
|
||||
CC="gcc -static-libgcc" CXX="g++ -static-libgcc" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr/local/mysql \
|
||||
--exec-prefix=/usr/local/mysql \
|
||||
|
@ -9,6 +9,6 @@ PATH=$PATH:/usr/ccs/bin:/usr/local/bin
|
||||
path=`dirname $0`
|
||||
. "$path/autorun.sh"
|
||||
|
||||
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
|
||||
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
|
||||
|
||||
make -j 4
|
||||
|
@ -38,6 +38,7 @@ ADD_DEFINITIONS(-DMYSQL_DATADIR="c:/Program Files/MySQL/MySQL Server ${MYSQL_BAS
|
||||
ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
|
||||
ADD_DEFINITIONS(-DPACKAGE=mysql)
|
||||
ADD_DEFINITIONS(-DSHAREDIR="share")
|
||||
ADD_DEFINITIONS(-DPLUGINDIR="lib/plugin")
|
||||
|
||||
# Set debug options
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
|
||||
@ -260,7 +261,7 @@ FOREACH(SUBDIR ${STORAGE_SUBDIRS})
|
||||
ENDIF(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
|
||||
|
||||
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
|
||||
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${PLUGIN_NAME}_plugin")
|
||||
SET (maria_plugin_defs "${maria_plugin_defs},builtin_maria_${PLUGIN_NAME}_plugin")
|
||||
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${PLUGIN_NAME})
|
||||
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
|
||||
SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
|
||||
@ -279,7 +280,7 @@ ENDFOREACH(SUBDIR ${STORAGE_SUBDIRS})
|
||||
# Special handling for partition(not really pluggable)
|
||||
IF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
|
||||
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_PARTITION_STORAGE_ENGINE")
|
||||
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_partition_plugin")
|
||||
SET (maria_plugin_defs "${maria_plugin_defs},builtin_maria_partition_plugin")
|
||||
ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
|
||||
|
||||
# Special handling for tmp tables with the maria engine
|
||||
|
523
COPYING
523
COPYING
@ -1,352 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
Copyright (C) 1989, 1991 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.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
Preamble
|
||||
|
||||
Preamble
|
||||
========
|
||||
|
||||
The licenses for most software are designed to take away your freedom
|
||||
to share and change it. By contrast, the GNU General Public License is
|
||||
intended to guarantee your freedom to share and change free
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price.
|
||||
Our General Public Licenses are designed to make sure that you have
|
||||
the freedom to distribute copies of free software (and charge for this
|
||||
service if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs; and that you know you can do these things.
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone
|
||||
to deny you these rights or to ask you to surrender the rights. These
|
||||
restrictions translate to certain responsibilities for you if you
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that you
|
||||
have. You must make sure that they, too, receive or can get the source
|
||||
code. And you must show them these terms so they know their rights.
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents.
|
||||
We wish to avoid the danger that redistributors of a free program will
|
||||
individually obtain patent licenses, in effect making the program
|
||||
proprietary. To prevent this, we have made it clear that any patent
|
||||
must be licensed for everyone's free use or not licensed at all.
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
0. This License applies to any program or other work which contains a
|
||||
notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program",
|
||||
below, refers to any such program or work, and a "work based on
|
||||
the Program" means either the Program or any derivative work under
|
||||
copyright law: that is to say, a work containing the Program or a
|
||||
portion of it, either verbatim or with modifications and/or
|
||||
translated into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".) Each
|
||||
licensee is addressed as "you".
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
Activities other than copying, distribution and modification are
|
||||
not covered by this License; they are outside its scope. The act
|
||||
of running the Program is not restricted, and the output from the
|
||||
Program is covered only if its contents constitute a work based on
|
||||
the Program (independent of having been made by running the
|
||||
Program). Whether that is true depends on what the Program does.
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any
|
||||
warranty; and give any other recipients of the Program a copy of
|
||||
this License along with the Program.
|
||||
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 give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
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.
|
||||
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 Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
of it, thus forming a work based on the Program, 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. You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b. You must cause any work that you distribute or publish, that
|
||||
in whole or in part contains or is derived from the Program
|
||||
or any part thereof, to be licensed as a whole at no charge
|
||||
to all third parties under the terms of this License.
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c. If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display
|
||||
an announcement including an appropriate copyright notice and
|
||||
a notice that there is no warranty (or else, saying that you
|
||||
provide a warranty) and that users may redistribute the
|
||||
program under these conditions, and telling the user how to
|
||||
view a copy of this License. (Exception: if the Program
|
||||
itself is interactive but does not normally print such an
|
||||
announcement, your work based on the Program is not required
|
||||
to print an announcement.)
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the
|
||||
Program, 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 Program, 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.
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
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 Program, 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 Program.
|
||||
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 Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the
|
||||
Program with the Program (or with a work based on the Program) on
|
||||
a volume of a storage or distribution medium does not bring the
|
||||
other work under the scope of this License.
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms
|
||||
of Sections 1 and 2 above provided that you also do one of the
|
||||
following:
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a. 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; or,
|
||||
a) 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; or,
|
||||
|
||||
b. Accompany it with a written offer, valid for at least three
|
||||
years, to give any third-party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange; or,
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c. Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with
|
||||
such an offer, in accord with Subsection b above.)
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, 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 executable.
|
||||
However, as a special exception, the source code 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.
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, 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 executable. However, as a
|
||||
special exception, the source code 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.
|
||||
|
||||
If distribution of executable or 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 counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
If distribution of executable or 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 counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program 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.
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program 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.
|
||||
|
||||
5. 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 Program or its derivative works. These actions
|
||||
are prohibited by law if you do not accept this License.
|
||||
Therefore, by modifying or distributing the Program (or any work
|
||||
based on the Program), you indicate your acceptance of this
|
||||
License to do so, and all its terms and conditions for copying,
|
||||
distributing or modifying the Program or works based on it.
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program
|
||||
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 to this License.
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program 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 to
|
||||
this License.
|
||||
|
||||
7. 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
|
||||
Program at all. For example, if a patent license would not permit
|
||||
royalty-free redistribution of the Program 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 Program.
|
||||
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 Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program 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 Program.
|
||||
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces,
|
||||
the original copyright holder who places the Program 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.
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program 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.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new
|
||||
versions of the 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.
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies 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 Program
|
||||
does not specify a version number of this License, you may choose
|
||||
any version ever published by the Free Software Foundation.
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
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 Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, 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.
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, 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
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
|
||||
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
|
||||
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
|
||||
QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
|
||||
SERVICING, REPAIR OR CORRECTION.
|
||||
NO WARRANTY
|
||||
|
||||
12. 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 PROGRAM AS PERMITTED ABOVE, BE
|
||||
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
|
||||
OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
|
||||
OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
How to Apply These Terms to Your New Programs
|
||||
=============================================
|
||||
12. 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 PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively 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.
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
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 PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
|
||||
Copyright (C) YYYY NAME OF AUTHOR
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
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.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the
|
||||
appropriate parts of the General Public License. Of course, the
|
||||
commands you use may be called something other than `show w' and `show
|
||||
c'; they could even be mouse-clicks or menu items--whatever suits your
|
||||
program.
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
SIGNATURE OF TY COON, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library,
|
||||
you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use the
|
||||
GNU Library General Public License instead of this License.
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
@ -1075,7 +1075,7 @@
|
||||
'PIPES_AS_CONCAT',
|
||||
'ANSI_QUOTES',
|
||||
'IGNORE_SPACE',
|
||||
'NOT_USED',
|
||||
'IGNORE_BAD_TABLE_OPTIONS',
|
||||
'ONLY_FULL_GROUP_BY',
|
||||
'NO_UNSIGNED_SUBTRACTION',
|
||||
'NO_DIR_IN_CREATE',
|
||||
@ -1097,4 +1097,4 @@
|
||||
) comment='Stored Procedures';
|
||||
|
||||
--
|
||||
|
||||
|
||||
|
497
INSTALL-SOURCE
497
INSTALL-SOURCE
@ -17,8 +17,7 @@ Chapter 2. Installing and Upgrading MySQL
|
||||
platform.
|
||||
Please note that not all platforms are equally suitable for
|
||||
running MySQL, and that not all platforms on which MySQL is
|
||||
known to run are officially supported by Sun Microsystems,
|
||||
Inc.:
|
||||
known to run are officially supported by Oracle Corporation:
|
||||
|
||||
2. Choose which distribution to install.
|
||||
Several versions of MySQL are available, and most are
|
||||
@ -77,12 +76,11 @@ Chapter 2. Installing and Upgrading MySQL
|
||||
|
||||
Important
|
||||
|
||||
Sun Microsystems, Inc. does not necessarily provide official
|
||||
support for all the platforms listed in this section. For
|
||||
information about those platforms that are officially supported,
|
||||
see MySQL Server Supported Platforms
|
||||
(http://www.mysql.com/support/supportedplatforms.html) on the
|
||||
MySQL Web site.
|
||||
Oracle Corporation does not necessarily provide official support
|
||||
for all the platforms listed in this section. For information
|
||||
about those platforms that are officially supported, see
|
||||
http://www.mysql.com/support/supportedplatforms.html on the MySQL
|
||||
Web site.
|
||||
|
||||
We use GNU Autoconf, so it is possible to port MySQL to all modern
|
||||
systems that have a C++ compiler and a working implementation of
|
||||
@ -148,7 +146,7 @@ Important
|
||||
by the ability of the file system to deal with large files and
|
||||
dealing with them efficiently.
|
||||
|
||||
* Our level of expertise here at Sun Microsystems, Inc. with the
|
||||
* Our level of expertise here at Oracle Corporation with the
|
||||
platform. If we know a platform well, we enable
|
||||
platform-specific optimizations and fixes at compile time. We
|
||||
can also provide advice on configuring your system optimally
|
||||
@ -184,17 +182,16 @@ Important
|
||||
new features are being added that could affect stability.
|
||||
|
||||
* MySQL 5.0 is the previous stable (production-quality) release
|
||||
series.
|
||||
series. MySQL 5.0 is now at the end of the product lifecycle.
|
||||
Active development and support for this version has ended.
|
||||
Extended support for MySQL 5.0 remains available. According to
|
||||
the http://www.mysql.com/about/legal/lifecycle/, only Security
|
||||
and Severity Level 1 issues are still being fixed for MySQL
|
||||
5.0.
|
||||
|
||||
* MySQL 4.1, 4.0, and 3.23 are old stable (production-quality)
|
||||
release series. MySQL 4.1 is now at the end of the product
|
||||
lifecycle. Active development and support for these versions
|
||||
has ended.
|
||||
Extended support for MySQL 4.1 remains available. According to
|
||||
the MySQL Lifecycle Policy
|
||||
(http://www.mysql.com/about/legal/lifecycle/), only Security
|
||||
and Severity Level 1 issues are still being fixed for MySQL
|
||||
4.1.
|
||||
release series. Active development and support for these
|
||||
versions has ended.
|
||||
|
||||
We do not believe in a complete code freeze because this prevents
|
||||
us from making bugfixes and other fixes that must be done. By
|
||||
@ -228,7 +225,7 @@ Important
|
||||
the code on which future releases are to be based.
|
||||
|
||||
The MySQL naming scheme uses release names that consist of three
|
||||
numbers and a suffix; for example, mysql-5.0.12-beta. The numbers
|
||||
numbers and a suffix; for example, mysql-5.0.14-rc. The numbers
|
||||
within the release name are interpreted as follows:
|
||||
|
||||
* The first number (5) is the major version and describes the
|
||||
@ -238,7 +235,7 @@ Important
|
||||
the major version and release level constitute the release
|
||||
series number.
|
||||
|
||||
* The third number (12) is the version number within the release
|
||||
* The third number (14) is the version number within the release
|
||||
series. This is incremented for each new release. Usually you
|
||||
want the latest version for the series you have chosen.
|
||||
|
||||
@ -307,11 +304,6 @@ Important
|
||||
actually made the code faster. See Section 7.1.3, "The MySQL
|
||||
Benchmark Suite."
|
||||
|
||||
* The crash-me test
|
||||
This test tries to determine what features the database
|
||||
supports and what its capabilities and limitations are. See
|
||||
Section 7.1.3, "The MySQL Benchmark Suite."
|
||||
|
||||
We also test the newest MySQL version in our internal production
|
||||
environment, on at least one machine. We have more than 100GB of
|
||||
data to work with.
|
||||
@ -475,8 +467,8 @@ Important
|
||||
shell> md5sum package_name
|
||||
|
||||
Example:
|
||||
shell> md5sum mysql-standard-5.1.41-linux-i686.tar.gz
|
||||
aaab65abbec64d5e907dcd41b8699945 mysql-standard-5.1.41-linux-i686.ta
|
||||
shell> md5sum mysql-standard-5.1.46-linux-i686.tar.gz
|
||||
aaab65abbec64d5e907dcd41b8699945 mysql-standard-5.1.46-linux-i686.ta
|
||||
r.gz
|
||||
|
||||
You should verify that the resulting checksum (the string of
|
||||
@ -520,8 +512,7 @@ Note
|
||||
named build@mysql.com. Alternatively, you can cut and paste the
|
||||
key directly from the following text:
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.0.6 (GNU/Linux)
|
||||
Comment: For info see http://www.gnupg.org
|
||||
Version: GnuPG v1.4.5 (GNU/Linux)
|
||||
|
||||
mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
|
||||
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
|
||||
@ -533,81 +524,26 @@ kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
|
||||
QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
|
||||
rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q7TXlTUUwgUGFj
|
||||
a2FnZSBzaWduaW5nIGtleSAod3d3Lm15c3FsLmNvbSkgPGJ1aWxkQG15c3FsLmNv
|
||||
bT6IXQQTEQIAHQUCR6yUtAUJDTBYqAULBwoDBAMVAwIDFgIBAheAAAoJEIxxjTtQ
|
||||
cuH1rpIAn38+BlBI815Dou9VXMIAsQEk4G3tAJ9+Cz69Y/Xwm611lzteJrCAA32+
|
||||
aYhMBBMRAgAMBQI+PqPRBYMJZgC7AAoJEElQ4SqycpHyJOEAn1mxHijft00bKXvu
|
||||
bT6IXQQTEQIAHQULBwoDBAMVAwIDFgIBAheABQJLcC5lBQkQ8/JZAAoJEIxxjTtQ
|
||||
cuH1oD4AoIcOQ4EoGsZvy06D0Ei5vcsWEy8dAJ4g46i3WEcdSWxMhcBSsPz65sh5
|
||||
lohMBBMRAgAMBQI+PqPRBYMJZgC7AAoJEElQ4SqycpHyJOEAn1mxHijft00bKXvu
|
||||
cSo/pECUmppiAJ41M9MRVj5VcdH/KN/KjRtW6tHFPYhMBBMRAgAMBQI+QoIDBYMJ
|
||||
YiKJAAoJELb1zU3GuiQ/lpEAoIhpp6BozKI8p6eaabzF5MlJH58pAKCu/ROofK8J
|
||||
Eg2aLos+5zEYrB/LsohGBBARAgAGBQI/rOOvAAoJEK/FI0h4g3QP9pYAoNtSISDD
|
||||
AAU2HafyAYlLD/yUC4hKAJ0czMsBLbo0M/xPaJ6Ox9Q5Hmw2uIhGBBARAgAGBQI/
|
||||
tEN3AAoJEIWWr6swc05mxsMAnRag9X61Ygu1kbfBiqDku4czTd9pAJ4q5W8KZ0+2
|
||||
ujTrEPN55NdWtnXj4YhGBBARAgAGBQJDW7PqAAoJEIvYLm8wuUtcf3QAnRCyqF0C
|
||||
pMCTdIGc7bDO5I7CIMhTAJ0UTGx0O1d/VwvdDiKWj45N2tNbYIhGBBMRAgAGBQJE
|
||||
8TMmAAoJEPZJxPRgk1MMCnEAoIm2pP0sIcVh9Yo0YYGAqORrTOL3AJwIbcy+e8HM
|
||||
NSoNV5u51RnrVKie34hMBBARAgAMBQJBgcsBBYMGItmLAAoJEBhZ0B9ne6HsQo0A
|
||||
nA/LCTQ3P5kvJvDhg1DsfVTFnJxpAJ49WFjg/kIcaN5iP1JfaBAITZI3H4hMBBAR
|
||||
AgAMBQJBgcs0BYMGItlYAAoJEIHC9+viE7aSIiMAnRVTVVAfMXvJhV6D5uHfWeeD
|
||||
046TAJ4kjwP2bHyd6DjCymq+BdEDz63axohMBBARAgAMBQJBgctiBYMGItkqAAoJ
|
||||
EGtw7Nldw/RzCaoAmwWM6+Rj1zl4D/PIys5nW48Hql3hAJ0bLOBthv96g+7oUy9U
|
||||
j09Uh41lF4hMBBARAgAMBQJB0JMkBYMF1BFoAAoJEH0lygrBKafCYlUAoIb1r5D6
|
||||
qMLMPMO1krHk3MNbX5b5AJ4vryx5fw6iJctC5GWJ+Y8ytXab34hMBBARAgAMBQJC
|
||||
K1u6BYMFeUjSAAoJEOYbpIkV67mr8xMAoJMy+UJC0sqXMPSxh3BUsdcmtFS+AJ9+
|
||||
Z15LpoOnAidTT/K9iODXGViK6ohMBBIRAgAMBQJAKlk6BYMHektSAAoJEDyhHzSU
|
||||
+vhhJlwAnA/gOdwOThjO8O+dFtdbpKuImfXJAJ0TL53QKp92EzscZSz49lD2YkoE
|
||||
qohMBBIRAgAMBQJAPfq6BYMHZqnSAAoJEPLXXGPjnGWcst8AoLQ3MJWqttMNHDbl
|
||||
xSyzXhFGhRU8AJ4ukRzfNJqElQHQ00ZM2WnCVNzOUIhMBBIRAgAMBQJBDgqEBYMG
|
||||
lpoIAAoJEDnKK/Q9aopf/N0AniE2fcCKO1wDIwusuGVlC+JvnnWbAKDDoUSEYuNn
|
||||
5qzRbrzWW5zBno/Nb4hMBBIRAgAMBQJCgKU0BYMFI/9YAAoJEAQNwIV8g5+o4yQA
|
||||
nA9QOFLV5POCddyUMqB/fnctuO9eAJ4sJbLKP/Z3SAiTpKrNo+XZRxauqIhMBBMR
|
||||
AgAMBQI+TU2EBYMJV1cIAAoJEC27dr+t1MkzBQwAoJU+RuTVSn+TI+uWxUpT82/d
|
||||
s5NkAJ9bnNodffyMMK7GyMiv/TzifiTD+4hMBBMRAgAMBQJB14B2BYMFzSQWAAoJ
|
||||
EGbv28jNgv0+P7wAn13uu8YkhwfNMJJhWdpK2/qM/4AQAJ40drnKW2qJ5EEIJwtx
|
||||
pwapgrzWiYhMBBMRAgAMBQJCGIEOBYMFjCN+AAoJEHbBAxyiMW6hoO4An0Ith3Kx
|
||||
5/sixbjZR9aEjoePGTNKAJ94SldLiESaYaJx2lGIlD9bbVoHQYhdBBMRAgAdBQJH
|
||||
rJTPBQkNMFioBQsHCgMEAxUDAgMWAgECF4AACgkQjHGNO1By4fV0KgCgsLpG2wP0
|
||||
rc3s07Fync9g7MfairMAoIUefSNKrGTsTxvLeyH4DLzJW/QFiHsEMBECADsFAkJ3
|
||||
NfU0HQBPb3BzLi4uIHNob3VsZCBoYXZlIGJlZW4gbG9jYWwhIEknbSAqc28qIHN0
|
||||
dXBpZC4uLgAKCRA5yiv0PWqKX+9HAJ0WjTx/rqgouK4QCrOV/2IOU+jMQQCfYSC8
|
||||
JgsIIeN8aiyuStTdYrk0VWCIjwQwEQIATwUCRW8Av0gdAFNob3VsZCBoYXZlIGJl
|
||||
ZW4gYSBsb2NhbCBzaWduYXR1cmUsIG9yIHNvbWV0aGluZyAtIFdURiB3YXMgSSB0
|
||||
aGlua2luZz8ACgkQOcor9D1qil+g+wCfcFWoo5qUl4XTE9K8tH3Q+xGWeYYAnjii
|
||||
KxjtOXc0ls+BlqXxbfZ9uqBsiQIiBBABAgAMBQJBgcuFBYMGItkHAAoJEKrj5s5m
|
||||
oURoqC8QAIISudocbJRhrTAROOPoMsReyp46Jdp3iL1oFDGcPfkZSBwWh8L+cJjh
|
||||
dycIwwSeZ1D2h9S5Tc4EnoE0khsS6wBpuAuih5s//coRqIIiLKEdhTmNqulkCH5m
|
||||
imCzc5zXWZDW0hpLr2InGsZMuh2QCwAkB4RTBM+r18cUXMLV4YHKyjIVaDhsiPP/
|
||||
MKUj6rJNsUDmDq1GiJdOjySjtCFjYADlQYSD7zcd1vpqQLThnZBESvEoCqumEfOP
|
||||
xemNU6xAB0CL+pUpB40pE6Un6Krr5h6yZxYZ/N5vzt0Y3B5UUMkgYDSpjbulNvaU
|
||||
TFiOxEU3gJvXc1+h0BsxM7FwBZnuMA8LEA+UdQb76YcyuFBcROhmcEUTiducLu84
|
||||
E2BZ2NSBdymRQKSinhvXsEWlH6Txm1gtJLynYsvPi4B4JxKbb+awnFPusL8W+gfz
|
||||
jbygeKdyqzYgKj3M79R3geaY7Q75Kxl1UogiOKcbI5VZvg47OQCWeeERnejqEAdx
|
||||
EQiwGA/ARhVOP/1l0LQA7jg2P1xTtrBqqC2ufDB+v+jhXaCXxstKSW1lTbv/b0d6
|
||||
454UaOUV7RisN39pE2zFvJvY7bwfiwbUJVmYLm4rWJAEOJLIDtDRtt2h8JahDObm
|
||||
3CWkpadjw57S5v1c/mn+xV9yTgVx5YUfC/788L1HNKXfeVDq8zbAiQIiBBMBAgAM
|
||||
BQJCnwocBYMFBZpwAAoJENjCCglaJFfPIT4P/25zvPp8ixqV85igs3rRqMBtBsj+
|
||||
5EoEW6DJnlGhoi26yf1nasC2frVasWG7i4JIm0U3WfLZERGDjR/nqlOCEqsP5gS3
|
||||
43N7r4UpDkBsYh0WxH/ZtST5llFK3zd7XgtxvqKL98l/OSgijH2W2SJ9DGpjtO+T
|
||||
iegq7igtJzw7Vax9z/LQH2xhRQKZR9yernwMSYaJ72i9SyWbK3k0+e95fGnlR5pF
|
||||
zlGq320rYHgD7v9yoQ2t1klsAxK6e3b7Z+RiJG6cAU8o8F0kGxjWzF4v8D1op7S+
|
||||
IoRdB0Bap01ko0KLyt3+g4/33/2UxsW50BtfqcvYNJvU4bZns1YSqAgDOOanBhg8
|
||||
Ip5XPlDxH6J/3997n5JNj/nk5ojfd8nYfe/5TjflWNiput6tZ7frEki1wl6pTNbv
|
||||
V9C1eLUJMSXfDZyHtUXmiP9DKNpsucCUeBKWRKLqnsHLkLYydsIeUJ8+ciKc+EWh
|
||||
FxEY+Ml72cXAaz5BuW9L8KHNzZZfez/ZJabiARQpFfjOwAnmhzJ9r++TEKRLEr96
|
||||
taUI9/8nVPvT6LnBpcM38Td6dJ639YvuH3ilAqmPPw50YvglIEe4BUYD5r52Seqc
|
||||
8XQowouGOuBX4vs7zgWFuYA/s9ebfGaIw+uJd/56Xl9ll6q5CghqB/yt1EceFEnF
|
||||
CAjQc2SeRo6qzx22uQINBD4+ox0QCADv4Yl/Fsx1jjCyU+eMf2sXg3ap9awQ3+XF
|
||||
pmglhzdrozTZYKceXpqFPb+0ErbDVAjhgW15HjuAK+2Bvo7Ukd986jYd8uZENGJG
|
||||
N3UNMIep7JfsIeFyCGP901GVbZnSXlAURyZX1TRWGndoV9YLhSN+zctT6GQBbMTv
|
||||
NoPlwf0nvK//rG5lXDjXXHSHhSqxNxYy7SIzUHMQupfUNjsvCg8Rv871GRt/h+Yt
|
||||
7XUTMhoJrg+oBFdBlzh2FKKcy3ordfgGtGwpN+jMG7vgXjsPwiVt/m9Jgdu4Tmn/
|
||||
WggPOeSD+nyRb7cXG5avJxyKoVNw3PbXnLJff0tcWeUvMpRv8XkbAAMFB/4vCqpr
|
||||
wIatF+w4AnGKbrcId+3LmZRzmtRKdOyUZgQg4JHUF5Bq7I9ls8OwMP0xnVlpJp9q
|
||||
cW/AUbouXH3GRTu3Or68ouhaSbi7nF/e+fnlWOdJ3VpD15CdRxeIvhycEahNs5Yj
|
||||
f0RzLOCyXMF0L74w+NxBNwDunolRWw/qgAHcVBaDni25SjQRzxuwzxvcS/jYua5B
|
||||
Pk10ocbAexdM+2XSSWThtCTg5qMeyLLUExqGlPbuNaMmUyIlz4hYnSaCGQoe33bq
|
||||
z/KZ91/keR1DVzK+zPm2vJUjcXHvxd5Jh9C+67CqnYfXf2lcYSSDSfop1Q5611la
|
||||
F7vRgY0/DXKNYlPUiEwEGBECAAwFAkeslPwFCQ0wWN8ACgkQjHGNO1By4fWlzgCf
|
||||
Qj3rkfcljYZOuLOn50J7PFuF7FoAnjwWGhwVi9+Fm2B5RZvpo++BBkdP
|
||||
=Xquv
|
||||
Eg2aLos+5zEYrB/LsrkCDQQ+PqMdEAgA7+GJfxbMdY4wslPnjH9rF4N2qfWsEN/l
|
||||
xaZoJYc3a6M02WCnHl6ahT2/tBK2w1QI4YFteR47gCvtgb6O1JHffOo2HfLmRDRi
|
||||
Rjd1DTCHqeyX7CHhcghj/dNRlW2Z0l5QFEcmV9U0Vhp3aFfWC4Ujfs3LU+hkAWzE
|
||||
7zaD5cH9J7yv/6xuZVw411x0h4UqsTcWMu0iM1BzELqX1DY7LwoPEb/O9Rkbf4fm
|
||||
Le11EzIaCa4PqARXQZc4dhSinMt6K3X4BrRsKTfozBu74F47D8Ilbf5vSYHbuE5p
|
||||
/1oIDznkg/p8kW+3FxuWrycciqFTcNz215yyX39LXFnlLzKUb/F5GwADBQf+Lwqq
|
||||
a8CGrRfsOAJxim63CHfty5mUc5rUSnTslGYEIOCR1BeQauyPZbPDsDD9MZ1ZaSaf
|
||||
anFvwFG6Llx9xkU7tzq+vKLoWkm4u5xf3vn55VjnSd1aQ9eQnUcXiL4cnBGoTbOW
|
||||
I39EcyzgslzBdC++MPjcQTcA7p6JUVsP6oAB3FQWg54tuUo0Ec8bsM8b3Ev42Lmu
|
||||
QT5NdKHGwHsXTPtl0klk4bQk4OajHsiy1BMahpT27jWjJlMiJc+IWJ0mghkKHt92
|
||||
6s/ymfdf5HkdQ1cyvsz5tryVI3Fx78XeSYfQvuuwqp2H139pXGEkg0n6KdUOetdZ
|
||||
Whe70YGNPw1yjWJT1IhMBBgRAgAMBQI+PqMdBQkJZgGAAAoJEIxxjTtQcuH17p4A
|
||||
n3r1QpVC9yhnW2cSAjq+kr72GX0eAJ4295kl6NxYEuFApmr1+0uUq/SlsQ==
|
||||
=Mski
|
||||
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
To import the build key into your personal public GPG keyring, use
|
||||
@ -650,8 +586,8 @@ pg-signature.html
|
||||
signature, which also is available from the download page. The
|
||||
signature file has the same name as the distribution file with an
|
||||
.asc extension, as shown by the examples in the following table.
|
||||
Distribution file mysql-standard-5.1.41-linux-i686.tar.gz
|
||||
Signature file mysql-standard-5.1.41-linux-i686.tar.gz.asc
|
||||
Distribution file mysql-standard-5.1.46-linux-i686.tar.gz
|
||||
Signature file mysql-standard-5.1.46-linux-i686.tar.gz.asc
|
||||
|
||||
Make sure that both files are stored in the same directory and
|
||||
then run the following command to verify the signature for the
|
||||
@ -659,7 +595,7 @@ pg-signature.html
|
||||
shell> gpg --verify package_name.asc
|
||||
|
||||
Example:
|
||||
shell> gpg --verify mysql-standard-5.1.41-linux-i686.tar.gz.asc
|
||||
shell> gpg --verify mysql-standard-5.1.46-linux-i686.tar.gz.asc
|
||||
gpg: Signature made Tue 12 Jul 2005 23:35:41 EST using DSA key ID 507
|
||||
2E1F5
|
||||
gpg: Good signature from "MySQL Package signing key (www.mysql.com) <
|
||||
@ -679,8 +615,8 @@ build@mysql.com>"
|
||||
shell> rpm --checksig package_name.rpm
|
||||
|
||||
Example:
|
||||
shell> rpm --checksig MySQL-server-5.1.41-0.glibc23.i386.rpm
|
||||
MySQL-server-5.1.41-0.glibc23.i386.rpm: md5 gpg OK
|
||||
shell> rpm --checksig MySQL-server-5.1.46-0.glibc23.i386.rpm
|
||||
MySQL-server-5.1.46-0.glibc23.i386.rpm: md5 gpg OK
|
||||
|
||||
Note
|
||||
|
||||
@ -705,7 +641,7 @@ shell> rpm --import mysql_pubkey.asc
|
||||
|
||||
This section describes the default layout of the directories
|
||||
created by installing binary or source distributions provided by
|
||||
Sun Microsystems, Inc. A distribution provided by another vendor
|
||||
Oracle Corporation. A distribution provided by another vendor
|
||||
might use a layout different from those shown here.
|
||||
|
||||
Installations created from our Linux RPM distributions result in
|
||||
@ -773,9 +709,7 @@ shell> rpm --import mysql_pubkey.asc
|
||||
|
||||
This section covers the installation of MySQL binary distributions
|
||||
that are provided for various platforms in the form of compressed
|
||||
tar files (files with a .tar.gz extension). See Section 2.2,
|
||||
"Installing MySQL from Generic Binaries on Unix/Linux," for a
|
||||
detailed list.
|
||||
tar files (files with a .tar.gz extension).
|
||||
|
||||
To obtain MySQL, see Section 2.1.3, "How to Get MySQL."
|
||||
|
||||
@ -793,7 +727,7 @@ shell> rpm --import mysql_pubkey.asc
|
||||
|
||||
MySQL tar file binary distributions have names of the form
|
||||
mysql-VERSION-OS.tar.gz, where VERSION is a number (for example,
|
||||
5.1.41), and OS indicates the type of operating system for which
|
||||
5.1.46), and OS indicates the type of operating system for which
|
||||
the distribution is intended (for example, pc-linux-i686).
|
||||
|
||||
In addition to these generic packages, we also offer binaries in
|
||||
@ -818,7 +752,7 @@ shell> rpm --import mysql_pubkey.asc
|
||||
first.
|
||||
|
||||
If you run into problems and need to file a bug report, please use
|
||||
the instructions in Section 1.6, "How to Report Bugs or Problems."
|
||||
the instructions in Section 1.7, "How to Report Bugs or Problems."
|
||||
|
||||
The basic commands that you must execute to install and use a
|
||||
MySQL binary distribution are:
|
||||
@ -987,7 +921,7 @@ Note
|
||||
|
||||
MySQL source distributions are provided as compressed tar archives
|
||||
and have names of the form mysql-VERSION.tar.gz, where VERSION is
|
||||
a number like 5.1.41.
|
||||
a number like 5.1.46.
|
||||
|
||||
You need the following tools to build and install MySQL from
|
||||
source:
|
||||
@ -1005,15 +939,9 @@ Note
|
||||
systems with a deficient tar, you should install GNU tar
|
||||
first.
|
||||
|
||||
* A working ANSI C++ compiler. gcc 2.95.2 or later, SGI C++, and
|
||||
SunPro C++ are some of the compilers that are known to work.
|
||||
libg++ is not needed when using gcc. gcc 2.7.x has a bug that
|
||||
makes it impossible to compile some perfectly legal C++ files,
|
||||
such as sql/sql_base.cc. If you have only gcc 2.7.x, you must
|
||||
upgrade your gcc to be able to compile MySQL. gcc 2.8.1 is
|
||||
also known to have problems on some platforms, so it should be
|
||||
avoided if a newer compiler exists for the platform. gcc
|
||||
2.95.2 or later is recommended.
|
||||
* A working ANSI C++ compiler. GCC 3.2 or later, Sun Studio 10
|
||||
or later, Visual Studio 2005 or later, and many current
|
||||
vendor-supplied compilers are known to work.
|
||||
|
||||
* A good make program. GNU make is always recommended and is
|
||||
sometimes required. (BSD make fails, and vendor-provided make
|
||||
@ -1035,7 +963,7 @@ CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
|
||||
On most systems, this gives you a fast and stable binary.
|
||||
|
||||
If you run into problems and need to file a bug report, please use
|
||||
the instructions in Section 1.6, "How to Report Bugs or Problems."
|
||||
the instructions in Section 1.7, "How to Report Bugs or Problems."
|
||||
|
||||
2.3.1. Source Installation Overview
|
||||
|
||||
@ -1121,7 +1049,7 @@ shell> make
|
||||
from config.log that you think can help solve the problem.
|
||||
Also include the last couple of lines of output from
|
||||
configure. To file a bug report, please use the instructions
|
||||
in Section 1.6, "How to Report Bugs or Problems."
|
||||
in Section 1.7, "How to Report Bugs or Problems."
|
||||
If the compile fails, see Section 2.3.4, "Dealing with
|
||||
Problems Compiling MySQL," for help.
|
||||
|
||||
@ -1497,10 +1425,9 @@ shell> ./configure --with-charset=CHARSET
|
||||
cp1251, cp1256, cp1257, cp850, cp852, cp866, cp932, dec8,
|
||||
eucjpms, euckr, gb2312, gbk, geostd8, greek, hebrew, hp8,
|
||||
keybcs2, koi8r, koi8u, latin1, latin2, latin5, latin7, macce,
|
||||
macroman, sjis, swe7, tis620, ucs2, ujis, utf8. See Section
|
||||
9.2, "The Character Set Used for Data and Sorting."
|
||||
(Additional character sets might be available. Check the
|
||||
output from ./configure --help for the current list.)
|
||||
macroman, sjis, swe7, tis620, ucs2, ujis, utf8. (Additional
|
||||
character sets might be available. Check the output from
|
||||
./configure --help for the current list.)
|
||||
The default collation may also be specified. MySQL uses the
|
||||
latin1_swedish_ci collation by default. To change this, use
|
||||
the --with-collation option:
|
||||
@ -1602,7 +1529,7 @@ shell> ./configure --with-debug
|
||||
* When given with --enable-community-features, the
|
||||
--enable-profiling option enables the statement profiling
|
||||
capability exposed by the SHOW PROFILE and SHOW PROFILES
|
||||
statements. (See Section 12.5.5.33, "SHOW PROFILES Syntax.")
|
||||
statements. (See Section 12.4.5.33, "SHOW PROFILES Syntax.")
|
||||
This option was added in MySQL 5.1.24. It is enabled by
|
||||
default as of MySQL 5.1.28; to disable it, use
|
||||
--disable-profiling.
|
||||
@ -1610,7 +1537,7 @@ shell> ./configure --with-debug
|
||||
* See Section 2.1, "General Installation Guidance," for options
|
||||
that pertain to particular operating systems.
|
||||
|
||||
* See Section 5.5.7.2, "Using SSL Connections," for options that
|
||||
* See Section 5.5.6.2, "Using SSL Connections," for options that
|
||||
pertain to configuring MySQL to support secure (encrypted)
|
||||
connections.
|
||||
|
||||
@ -1664,12 +1591,12 @@ Caution
|
||||
(either a binary or source distribution).
|
||||
|
||||
To obtain the most recent development source tree, you must have
|
||||
Bazaar installed. You can obtain Bazaar from the Bazaar VCS
|
||||
Website (http://bazaar-vcs.org). Bazaar is supported by any
|
||||
platform that supports Python, and is therefore compatible with
|
||||
any Linux, Unix, Windows or Mac OS X host. Instructions for
|
||||
downloading and installing Bazaar on the different platforms are
|
||||
available on the Bazaar website.
|
||||
Bazaar installed. You can obtain Bazaar from the Bazaar VCS Web
|
||||
site (http://bazaar-vcs.org). Bazaar is supported by any platform
|
||||
that supports Python, and is therefore compatible with any Linux,
|
||||
Unix, Windows or Mac OS X host. Instructions for downloading and
|
||||
installing Bazaar on the different platforms are available on the
|
||||
Bazaar Web site.
|
||||
|
||||
All MySQL projects are hosted on Launchpad
|
||||
(http://launchpad.net/). MySQL projects, including MySQL server,
|
||||
@ -1752,7 +1679,7 @@ shell> bzr log
|
||||
page.
|
||||
If you see diffs (changes) or code that you have a question
|
||||
about, do not hesitate to send email to the MySQL internals
|
||||
mailing list. See Section 1.5.1, "MySQL Mailing Lists." Also,
|
||||
mailing list. See Section 1.6.1, "MySQL Mailing Lists." Also,
|
||||
if you think you have a better idea on how to do something,
|
||||
send an email message to the list with a patch.
|
||||
|
||||
@ -1816,7 +1743,7 @@ shell> make
|
||||
|
||||
6. If you have gotten to the make stage, but the distribution
|
||||
does not compile, please enter the problem into our bugs
|
||||
database using the instructions given in Section 1.6, "How to
|
||||
database using the instructions given in Section 1.7, "How to
|
||||
Report Bugs or Problems." If you have installed the latest
|
||||
versions of the required GNU tools, and they crash trying to
|
||||
process our configuration files, please report that also.
|
||||
@ -2092,7 +2019,7 @@ implicit declaration of function `int strtoul(...)'
|
||||
|
||||
* Before any upgrade, back up your databases, including the
|
||||
mysql database that contains the grant tables. See Section
|
||||
6.1, "Database Backup Methods."
|
||||
6.2, "Database Backup Methods."
|
||||
|
||||
* Read all the notes in Section 2.4.1.1, "Upgrading from MySQL
|
||||
5.0 to 5.1." These notes enable you to identify upgrade issues
|
||||
@ -2117,7 +2044,7 @@ implicit declaration of function `int strtoul(...)'
|
||||
* If you are running MySQL Server on Windows, see Section 2.5.7,
|
||||
"Upgrading MySQL on Windows."
|
||||
|
||||
* If you are using replication, see Section 16.3.3, "Upgrading a
|
||||
* If you are using replication, see Section 16.4.3, "Upgrading a
|
||||
Replication Setup," for information on upgrading your
|
||||
replication setup.
|
||||
|
||||
@ -2251,7 +2178,7 @@ Note
|
||||
done before upgrading. Use of this statement with a version of
|
||||
MySQL different from the one used to create the table (that
|
||||
is, using it after upgrading) may damage the table. See
|
||||
Section 12.5.2.6, "REPAIR TABLE Syntax."
|
||||
Section 12.4.2.6, "REPAIR TABLE Syntax."
|
||||
|
||||
* After you upgrade to a new version of MySQL, run mysql_upgrade
|
||||
(see Section 4.4.8, "mysql_upgrade --- Check Tables for MySQL
|
||||
@ -2274,7 +2201,7 @@ Note
|
||||
* If you are running MySQL Server on Windows, see Section 2.5.7,
|
||||
"Upgrading MySQL on Windows."
|
||||
|
||||
* If you are using replication, see Section 16.3.3, "Upgrading a
|
||||
* If you are using replication, see Section 16.4.3, "Upgrading a
|
||||
Replication Setup," for information on upgrading your
|
||||
replication setup.
|
||||
|
||||
@ -2322,13 +2249,13 @@ Note
|
||||
upgrading, and reload them into MySQL 5.1 after upgrading.
|
||||
|
||||
* Known issue: The fix for
|
||||
Bug#23491: http://bugs.mysql.com/23491 introduced a problem
|
||||
with SHOW CREATE VIEW, which is used by mysqldump. This causes
|
||||
an incompatibility when upgrading from versions affected by
|
||||
that bug fix (MySQL 5.0.40 through 5.0.43, MySQL 5.1.18
|
||||
through 5.1.19): If you use mysqldump before upgrading from an
|
||||
affected version and reload the data after upgrading to a
|
||||
higher version, you must drop and recreate your views.
|
||||
Bug#23491: http://bugs.mysql.com/bug.php?id=23491 introduced a
|
||||
problem with SHOW CREATE VIEW, which is used by mysqldump.
|
||||
This causes an incompatibility when upgrading from versions
|
||||
affected by that bug fix (MySQL 5.0.40 through 5.0.43, MySQL
|
||||
5.1.18 through 5.1.19): If you use mysqldump before upgrading
|
||||
from an affected version and reload the data after upgrading
|
||||
to a higher version, you must drop and recreate your views.
|
||||
|
||||
* Known issue: Dumps performed by using mysqldump to generate a
|
||||
dump file before the upgrade and reloading the file after
|
||||
@ -2456,11 +2383,11 @@ RENAME TABLE table_b TO `table b`;
|
||||
* Incompatible change: MySQL 5.1 implements support for a plugin
|
||||
API that allows the loading and unloading of components at
|
||||
runtime, without restarting the server. Section 22.2, "The
|
||||
MySQL Plugin Interface." The plugin API requires the
|
||||
mysql.plugin table. After upgrading from an older version of
|
||||
MySQL, you should run the mysql_upgrade command to create this
|
||||
table. See Section 4.4.8, "mysql_upgrade --- Check Tables for
|
||||
MySQL Upgrade."
|
||||
MySQL Plugin API." The plugin API requires the mysql.plugin
|
||||
table. After upgrading from an older version of MySQL, you
|
||||
should run the mysql_upgrade command to create this table. See
|
||||
Section 4.4.8, "mysql_upgrade --- Check Tables for MySQL
|
||||
Upgrade."
|
||||
Plugins are installed in the directory named by the plugin_dir
|
||||
system variable. This variable also controls the location from
|
||||
which the server loads user-defined functions (UDFs), which is
|
||||
@ -2718,7 +2645,7 @@ REPAIR TABLE tbl_name QUICK;
|
||||
specifies the locale that controls the language used to
|
||||
display day and month names and abbreviations. This variable
|
||||
affects the output from the DATE_FORMAT(), DAYNAME() and
|
||||
MONTHNAME() functions. See Section 9.8, "MySQL Server Locale
|
||||
MONTHNAME() functions. See Section 9.7, "MySQL Server Locale
|
||||
Support."
|
||||
|
||||
* As of MySQL 5.1.9, mysqld_safe no longer implicitly invokes
|
||||
@ -2749,7 +2676,7 @@ REPAIR TABLE tbl_name QUICK;
|
||||
to reload them into an upgraded server. Handlers that contain
|
||||
illegal label references will be rejected.
|
||||
For more information about condition handlers and writing them
|
||||
to avoid invalid jumps, see Section 12.8.4.2, "DECLARE for
|
||||
to avoid invalid jumps, see Section 12.7.4.2, "DECLARE for
|
||||
Handlers."
|
||||
|
||||
* Incompatible change: The parser accepted statements that
|
||||
@ -2758,13 +2685,13 @@ REPAIR TABLE tbl_name QUICK;
|
||||
contain unclosed /*-comments now are rejected with a syntax
|
||||
error.
|
||||
This fix has the potential to cause incompatibilities. Because
|
||||
of Bug#26302: http://bugs.mysql.com/26302, which caused the
|
||||
trailing */ to be truncated from comments in views, stored
|
||||
routines, triggers, and events, it is possible that objects of
|
||||
those types may have been stored with definitions that now
|
||||
will be rejected as syntactically invalid. Such objects should
|
||||
be dropped and re-created so that their definitions do not
|
||||
contain truncated comments.
|
||||
of Bug#26302: http://bugs.mysql.com/bug.php?id=26302, which
|
||||
caused the trailing */ to be truncated from comments in views,
|
||||
stored routines, triggers, and events, it is possible that
|
||||
objects of those types may have been stored with definitions
|
||||
that now will be rejected as syntactically invalid. Such
|
||||
objects should be dropped and re-created so that their
|
||||
definitions do not contain truncated comments.
|
||||
|
||||
* Incompatible change: Multiple-table DELETE statements
|
||||
containing ambiguous aliases could have unintended side
|
||||
@ -2851,21 +2778,20 @@ mysql> source /tmp/triggers.sql //
|
||||
mysqldump or mysqlhotcopy can be used as alternatives.
|
||||
|
||||
* The LOAD DATA FROM MASTER and LOAD TABLE FROM MASTER
|
||||
statements are deprecated. See Section 12.6.2.2, "LOAD DATA
|
||||
statements are deprecated. See Section 12.5.2.2, "LOAD DATA
|
||||
FROM MASTER Syntax," for recommended alternatives.
|
||||
|
||||
* The INSTALL PLUGIN and UNINSTALL PLUGIN statements that are
|
||||
used for the plugin API are new. So is the WITH PARSER clause
|
||||
for FULLTEXT index creation that associates a parser plugin
|
||||
with a full-text index. Section 22.2, "The MySQL Plugin
|
||||
Interface."
|
||||
with a full-text index. Section 22.2, "The MySQL Plugin API."
|
||||
|
||||
C API Changes:
|
||||
|
||||
* Incompatible change: As of MySQL 5.1.7, the
|
||||
mysql_stmt_attr_get() C API function returns a boolean rather
|
||||
than an unsigned int for STMT_ATTR_UPDATE_MAX_LENGTH.
|
||||
(Bug#16144: http://bugs.mysql.com/16144)
|
||||
(Bug#16144: http://bugs.mysql.com/bug.php?id=16144)
|
||||
|
||||
2.4.2. Downgrading MySQL
|
||||
|
||||
@ -2930,10 +2856,10 @@ mysql> source /tmp/triggers.sql //
|
||||
5. Reload the dump file into the older server. Your tables should
|
||||
be accessible.
|
||||
|
||||
It might also be the case that the structure of the system tables
|
||||
in the mysql database has changed and that downgrading introduces
|
||||
some loss of functionality or requires some adjustments. Here are
|
||||
some examples:
|
||||
It might also be the case that system tables in the mysql database
|
||||
have changed and that downgrading introduces some loss of
|
||||
functionality or requires some adjustments. Here are some
|
||||
examples:
|
||||
|
||||
* Trigger creation requires the TRIGGER privilege as of MySQL
|
||||
5.1. In MySQL 5.0, there is no TRIGGER privilege and SUPER is
|
||||
@ -2944,6 +2870,12 @@ mysql> source /tmp/triggers.sql //
|
||||
* Triggers were added in MySQL 5.0, so if you downgrade from 5.0
|
||||
to 4.1, you cannot use triggers at all.
|
||||
|
||||
* The mysql.proc.comment column definition changed between MySQL
|
||||
5.1 and 5.5. After a downgrade from 5.5 to 5.1, this table is
|
||||
seen as corrupt and in need of repair. To workaround this
|
||||
problem, execute mysql_upgrade from the version of MySQL to
|
||||
which you downgraded.
|
||||
|
||||
2.4.2.1. Downgrading to MySQL 5.0
|
||||
|
||||
When downgrading to MySQL 5.0 from MySQL 5.1, you should keep in
|
||||
@ -2979,9 +2911,10 @@ mysql> source /tmp/triggers.sql //
|
||||
--all-databases option). Instead, you should run mysqldump
|
||||
--routines prior to performing the downgrade and run the
|
||||
stored routines DDL statements following the downgrade.
|
||||
See Bug#11986: http://bugs.mysql.com/11986,
|
||||
Bug#30029: http://bugs.mysql.com/30029, and
|
||||
Bug#30660: http://bugs.mysql.com/30660, for more information.
|
||||
See Bug#11986: http://bugs.mysql.com/bug.php?id=11986,
|
||||
Bug#30029: http://bugs.mysql.com/bug.php?id=30029, and
|
||||
Bug#30660: http://bugs.mysql.com/bug.php?id=30660, for more
|
||||
information.
|
||||
|
||||
* Triggers. Trigger creation requires the TRIGGER privilege as
|
||||
of MySQL 5.1. In MySQL 5.0, there is no TRIGGER privilege and
|
||||
@ -3060,10 +2993,10 @@ mysql> source /tmp/triggers.sql //
|
||||
report, the bug number is given.
|
||||
|
||||
The list applies both for binary upgrades and downgrades. For
|
||||
example, Bug#27877: http://bugs.mysql.com/27877 was fixed in MySQL
|
||||
5.1.24 and 5.4.0, so it applies to upgrades from versions older
|
||||
than 5.1.24 to 5.1.24 or newer, and to downgrades from 5.1.24 or
|
||||
newer to versions older than 5.1.24.
|
||||
example, Bug#27877: http://bugs.mysql.com/bug.php?id=27877 was
|
||||
fixed in MySQL 5.1.24 and 5.4.0, so it applies to upgrades from
|
||||
versions older than 5.1.24 to 5.1.24 or newer, and to downgrades
|
||||
from 5.1.24 or newer to versions older than 5.1.24.
|
||||
|
||||
In many cases, you can use CHECK TABLE ... FOR UPGRADE to identify
|
||||
tables for which index rebuilding is required. (It will report:
|
||||
@ -3073,33 +3006,36 @@ mysql> source /tmp/triggers.sql //
|
||||
TABLE. However, the use of CHECK TABLE applies only after
|
||||
upgrades, not downgrades. Also, CHECK TABLE is not applicable to
|
||||
all storage engines. For details about which storage engines CHECK
|
||||
TABLE supports, see Section 12.5.2.3, "CHECK TABLE Syntax."
|
||||
TABLE supports, see Section 12.4.2.3, "CHECK TABLE Syntax."
|
||||
|
||||
Changes that cause index rebuilding to be necessary:
|
||||
|
||||
* MySQL 5.0.48, 5.1.21 (Bug#29461: http://bugs.mysql.com/29461)
|
||||
* MySQL 5.0.48, 5.1.21
|
||||
(Bug#29461: http://bugs.mysql.com/bug.php?id=29461)
|
||||
Affects indexes for columns that use any of these character
|
||||
sets: eucjpms, euc_kr, gb2312, latin7, macce, ujis
|
||||
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE
|
||||
as of MySQL 5.1.29, 5.4.0 (see
|
||||
Bug#39585: http://bugs.mysql.com/39585).
|
||||
Bug#39585: http://bugs.mysql.com/bug.php?id=39585).
|
||||
|
||||
* MySQL 5.0.48, 5.1.23 (Bug#27562: http://bugs.mysql.com/27562)
|
||||
* MySQL 5.0.48, 5.1.23
|
||||
(Bug#27562: http://bugs.mysql.com/bug.php?id=27562)
|
||||
Affects indexes that use the ascii_general_ci collation for
|
||||
columns that contain any of these characters: '`' GRAVE
|
||||
ACCENT, '[' LEFT SQUARE BRACKET, '\' REVERSE SOLIDUS, ']'
|
||||
RIGHT SQUARE BRACKET, '~' TILDE
|
||||
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE
|
||||
as of MySQL 5.1.29, 5.4.0 (see
|
||||
Bug#39585: http://bugs.mysql.com/39585).
|
||||
Bug#39585: http://bugs.mysql.com/bug.php?id=39585).
|
||||
|
||||
* MySQL 5.1.24, 5.4.0 (Bug#27877: http://bugs.mysql.com/27877)
|
||||
* MySQL 5.1.24, 5.4.0
|
||||
(Bug#27877: http://bugs.mysql.com/bug.php?id=27877)
|
||||
Affects indexes that use the utf8_general_ci or
|
||||
ucs2_general_ci collation for columns that contain 'ß' LATIN
|
||||
SMALL LETTER SHARP S (German).
|
||||
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE
|
||||
as of MySQL 5.1.30, 5.4.0 (see
|
||||
Bug#40053: http://bugs.mysql.com/40053).
|
||||
Bug#40053: http://bugs.mysql.com/bug.php?id=40053).
|
||||
|
||||
2.4.4. Rebuilding or Repairing Tables or Indexes
|
||||
|
||||
@ -3107,10 +3043,12 @@ mysql> source /tmp/triggers.sql //
|
||||
necessitated by changes to MySQL such as how data types are
|
||||
handled or changes to character set handling. For example, an
|
||||
error in a collation might have been corrected, necessitating a
|
||||
table rebuild to rebuild the indexes for character columns that
|
||||
use the collation. It might also be that a table repair or upgrade
|
||||
should be done as indicated by a table check operation such as
|
||||
that performed by CHECK TABLE, mysqlcheck, or mysql_upgrade.
|
||||
table rebuild to update the indexes for character columns that use
|
||||
the collation. (For examples, see Section 2.4.3, "Checking Whether
|
||||
Tables or Indexes Must Be Rebuilt.") It might also be that a table
|
||||
repair or upgrade should be done as indicated by a table check
|
||||
operation such as that performed by CHECK TABLE, mysqlcheck, or
|
||||
mysql_upgrade.
|
||||
|
||||
Methods for rebuilding a table include dumping and reloading it,
|
||||
or using ALTER TABLE or REPAIR TABLE.
|
||||
@ -3120,26 +3058,25 @@ Note
|
||||
If you are rebuilding tables because a different version of MySQL
|
||||
will not handle them after a binary (in-place) upgrade or
|
||||
downgrade, you must use the dump-and-reload method. Dump the
|
||||
tables before upgrading or downgrading (using your original
|
||||
version of MySQL), and reload the tables after upgrading or
|
||||
downgrading (after installing the new version).
|
||||
tables before upgrading or downgrading using your original version
|
||||
of MySQL. Then reload the tables after upgrading or downgrading.
|
||||
|
||||
If you use the dump-and-reload method of rebuilding tables only
|
||||
for the purpose of rebuilding indexes, you can perform the dump
|
||||
either before or after upgrading or downgrading. Reloading still
|
||||
must be done afterward.
|
||||
|
||||
To re-create a table by dumping and reloading it, use mysqldump to
|
||||
To rebuild a table by dumping and reloading it, use mysqldump to
|
||||
create a dump file and mysql to reload the file:
|
||||
shell> mysqldump db_name t1 > dump.sql
|
||||
shell> mysql db_name < dump.sql
|
||||
|
||||
To recreate all the tables in a single database, specify the
|
||||
To rebuild all the tables in a single database, specify the
|
||||
database name without any following table name:
|
||||
shell> mysqldump db_name > dump.sql
|
||||
shell> mysql db_name < dump.sql
|
||||
|
||||
To recreate all tables in all databases, use the --all-databases
|
||||
To rebuild all tables in all databases, use the --all-databases
|
||||
option:
|
||||
shell> mysqldump --all-databases > dump.sql
|
||||
shell> mysql < dump.sql
|
||||
@ -3165,7 +3102,7 @@ mysql> REPAIR TABLE t1;
|
||||
the file, as described earlier.
|
||||
|
||||
For specifics about which storage engines REPAIR TABLE supports,
|
||||
see Section 12.5.2.6, "REPAIR TABLE Syntax."
|
||||
see Section 12.4.2.6, "REPAIR TABLE Syntax."
|
||||
|
||||
mysqlcheck --repair provides command-line access to the REPAIR
|
||||
TABLE statement. This can be a more convenient means of repairing
|
||||
@ -3447,7 +3384,7 @@ Note
|
||||
below for reference:
|
||||
|
||||
* Windows Essentials --- this package has a file name similar to
|
||||
mysql-essential-5.1.41-win32.msi and is supplied as a
|
||||
mysql-essential-5.1.46-win32.msi and is supplied as a
|
||||
Microsoft Installer (MSI) package. The package includes the
|
||||
minimum set of files needed to install MySQL on Windows,
|
||||
including the MySQL Server Instance Config Wizard. This
|
||||
@ -3458,7 +3395,7 @@ Note
|
||||
MySQL with the MSI Package."
|
||||
|
||||
* Windows MSI Installer (Complete) --- this package has a file
|
||||
name similar to mysql-5.1.41-win32.zip and contains all files
|
||||
name similar to mysql-5.1.46-win32.zip and contains all files
|
||||
needed for a complete Windows installation, including the
|
||||
MySQL Server Instance Config Wizard. This package includes
|
||||
optional components such as the embedded server and benchmark
|
||||
@ -3467,7 +3404,7 @@ Note
|
||||
MySQL with the MSI Package."
|
||||
|
||||
* Without installer --- this package has a file name similar to
|
||||
mysql-noinstall-5.1.41-win32.zip and contains all the files
|
||||
mysql-noinstall-5.1.46-win32.zip and contains all the files
|
||||
found in the Complete install package, with the exception of
|
||||
the MySQL Server Instance Config Wizard. This package does not
|
||||
include an automated installer, and must be manually installed
|
||||
@ -3618,7 +3555,7 @@ Note
|
||||
feedback of users like you. If you find that the MySQL
|
||||
Installation Wizard is lacking some feature important to you, or
|
||||
if you discover a bug, please report it in our bugs database using
|
||||
the instructions given in Section 1.6, "How to Report Bugs or
|
||||
the instructions given in Section 1.7, "How to Report Bugs or
|
||||
Problems."
|
||||
|
||||
2.5.3.1.1. Downloading and Starting the MySQL Installation Wizard
|
||||
@ -3720,7 +3657,7 @@ Note
|
||||
directory. In a default installation it contains C:\Program
|
||||
Files\MySQL\MySQL Server 5.1\. The Version string contains the
|
||||
release number. For example, for an installation of MySQL Server
|
||||
5.1.41, the key contains a value of 5.1.41.
|
||||
5.1.46, the key contains a value of 5.1.46.
|
||||
|
||||
These registry keys are used to help external tools identify the
|
||||
installed location of the MySQL server, preventing a complete scan
|
||||
@ -3963,8 +3900,8 @@ shell> msiexec /x /quiet mysql-5.1.39.msi
|
||||
Apart from making changes to the my.ini file by running the MySQL
|
||||
Server Instance Config Wizard again, you can modify it by opening
|
||||
it with a text editor and making any necessary changes. You can
|
||||
also modify the server configuration with the MySQL Administrator
|
||||
(http://www.mysql.com/products/administrator/) utility. For more
|
||||
also modify the server configuration with the
|
||||
http://www.mysql.com/products/administrator/ utility. For more
|
||||
information about server configuration, see Section 5.1.2, "Server
|
||||
Command Options."
|
||||
|
||||
@ -4262,17 +4199,31 @@ Warning
|
||||
|
||||
2.5.4.11. The Security Options Dialog
|
||||
|
||||
It is strongly recommended that you set a root password for your
|
||||
MySQL server, and the MySQL Server Instance Config Wizard requires
|
||||
by default that you do so. If you do not wish to set a root
|
||||
password, uncheck the box next to the Modify Security Settings
|
||||
option.
|
||||
MySQL Server Instance Config Wizard: Security
|
||||
The content of the security options portion of the MySQL Server
|
||||
Instance Configuration Wizard will depend on whether this is a new
|
||||
installation, or modifying an existing installation.
|
||||
|
||||
To set the root password, enter the desired password into both the
|
||||
New root password and Confirm boxes. If you are reconfiguring an
|
||||
existing server, you need to enter the existing root password into
|
||||
the Current root password box.
|
||||
* Setting the root password for a new installation
|
||||
It is strongly recommended that you set a root password for
|
||||
your MySQL server, and the MySQL Server Instance Config Wizard
|
||||
requires by default that you do so. If you do not wish to set
|
||||
a root password, uncheck the box next to the Modify Security
|
||||
Settings option.
|
||||
MySQL Server Instance Config Wizard: Security
|
||||
|
||||
* To set the root password, enter the desired password into both
|
||||
the New root password and Confirm boxes.
|
||||
Setting the root password for an existing installation
|
||||
If you are modifying the configuration of an existing
|
||||
configuration, or you are installing an upgrade and the MySQL
|
||||
Server Instance Configuration Wizard has detected an existing
|
||||
MySQL system, then you must enter the existing password for
|
||||
root before changing the configuration information.
|
||||
MySQL Server Instance Config Wizard: Security (Existing
|
||||
Installation)
|
||||
If you want to change the current root password, enter the
|
||||
desired new password into both the New root password and
|
||||
Confirm boxes.
|
||||
|
||||
To allow root logins from across the network, check the box next
|
||||
to the Enable root access from remote machines option. This
|
||||
@ -4718,7 +4669,7 @@ InnoDB: foreign key constraint system tables created
|
||||
something like this, which indicates that the server is ready to
|
||||
service client connections:
|
||||
mysqld: ready for connections
|
||||
Version: '5.1.41' socket: '' port: 3306
|
||||
Version: '5.1.46' socket: '' port: 3306
|
||||
|
||||
The server continues to write to the console any further
|
||||
diagnostic output it produces. You can open a new console window
|
||||
@ -5104,7 +5055,7 @@ C:\> sc delete mysql
|
||||
Windows.
|
||||
|
||||
2. You should always back up your current MySQL installation
|
||||
before performing an upgrade. See Section 6.1, "Database
|
||||
before performing an upgrade. See Section 6.2, "Database
|
||||
Backup Methods."
|
||||
|
||||
3. Download the latest Windows distribution of MySQL from
|
||||
@ -5389,7 +5340,7 @@ ROM db" mysql
|
||||
names that are compatible with the current ANSI code pages.
|
||||
For example, the following Japanese directory name will not
|
||||
work in the Western locale (code page 1252):
|
||||
datadir="C:/维基百科关于中文维基百科"
|
||||
datadir="C:/私たちのプロジェクトのデータ"
|
||||
The same limitation applies to directory and file names
|
||||
referred to in SQL statements, such as the data file path name
|
||||
in LOAD DATA INFILE.
|
||||
@ -5451,10 +5402,9 @@ Note
|
||||
from the Bazaar tree. For production use, we do not advise using a
|
||||
MySQL server built by yourself from source. Normally, it is best
|
||||
to use precompiled binary distributions of MySQL that are built
|
||||
specifically for optimal performance on Windows by Sun
|
||||
Microsystems, Inc. Instructions for installing binary
|
||||
distributions are available in Section 2.5, "Installing MySQL on
|
||||
Windows."
|
||||
specifically for optimal performance on Windows by Oracle
|
||||
Corporation. Instructions for installing binary distributions are
|
||||
available in Section 2.5, "Installing MySQL on Windows."
|
||||
|
||||
To build MySQL on Windows from source, you must satisfy the
|
||||
following system, compiler, and resource requirements:
|
||||
@ -5514,8 +5464,8 @@ Note
|
||||
You also need a MySQL source distribution for Windows, which can
|
||||
be obtained two ways:
|
||||
|
||||
* Obtain a source distribution packaged by Sun Microsystems,
|
||||
Inc. These are available from http://dev.mysql.com/downloads/.
|
||||
* Obtain a source distribution packaged by Oracle Corporation.
|
||||
These are available from http://dev.mysql.com/downloads/.
|
||||
|
||||
* Package a source distribution yourself from the latest Bazaar
|
||||
developer source tree. For instructions on pulling the latest
|
||||
@ -5525,19 +5475,20 @@ Note
|
||||
If you find something not working as expected, or you have
|
||||
suggestions about ways to improve the current build process on
|
||||
Windows, please send a message to the win32 mailing list. See
|
||||
Section 1.5.1, "MySQL Mailing Lists."
|
||||
Section 1.6.1, "MySQL Mailing Lists."
|
||||
|
||||
2.5.10.1. Building MySQL from Source Using CMake and Visual Studio
|
||||
|
||||
You can build MySQL on Windows by using a combination of cmake and
|
||||
Microsoft Visual Studio .NET 2003 (7.1), Microsoft Visual Studio
|
||||
2005 (8.0) or Microsoft Visual C++ 2005 Express Edition. You must
|
||||
have the appropriate Microsoft Platform SDK installed.
|
||||
2005 (8.0), Microsoft Visual Studio 2008 (9.0) or Microsoft Visual
|
||||
C++ 2005 Express Edition. You must have the appropriate Microsoft
|
||||
Platform SDK installed.
|
||||
|
||||
Note
|
||||
|
||||
To compile from the source code on Windows you must use the
|
||||
standard source distribution (for example, mysql-5.1.41.tar.gz).
|
||||
standard source distribution (for example, mysql-5.1.46.tar.gz).
|
||||
You build from the same distribution as used to build MySQL on
|
||||
Unix, Linux and other platforms. Do not use the Windows Source
|
||||
distributions as they do not contain the necessary configuration
|
||||
@ -5551,8 +5502,19 @@ Note
|
||||
tool that can read .zip files. This directory is the work
|
||||
directory in the following instructions.
|
||||
|
||||
2. Using a command shell, navigate to the work directory and run
|
||||
the following command:
|
||||
Note
|
||||
You must run the commands in the win directory from the
|
||||
top-level source directory. Do not change into the win
|
||||
directory, as the commands will not be executed correctly.
|
||||
|
||||
2. Start a command shell. If you have not configured the PATH and
|
||||
other environment variables for all command shells, you may be
|
||||
able to start a command shell from the Start Menu within the
|
||||
Windows Visual Studio menu that contains the necessary
|
||||
environment changes.
|
||||
|
||||
3. Within the command shell, navigate to the work directory and
|
||||
run the following command:
|
||||
C:\workdir>win\configure.js options
|
||||
If you have associated the .js file extension with an
|
||||
application such as a text editor, then you may need to use
|
||||
@ -5603,16 +5565,19 @@ C:\workdir>cscript win\configure.js options
|
||||
C:\workdir>win\configure.js WITH_INNOBASE_STORAGE_ENGINE
|
||||
WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro
|
||||
|
||||
3. From the work directory, execute the win\build-vs8.bat or
|
||||
win\build-vs71.bat file, depending on the version of Visual
|
||||
4. From the work directory, execute the win\build-vs9.bat
|
||||
(Windows Visual Studio 2008), win\build-vs8.bat (Windows
|
||||
Visual Studio 2005), or win\build-vs71.bat (Windows Visual
|
||||
Stidion 2003) script, depending on the version of Visual
|
||||
Studio you have installed. The script invokes CMake, which
|
||||
generates the mysql.sln solution file.
|
||||
You can also use win\build-vs8_x64.bat to build the 64-bit
|
||||
version of MySQL. However, you cannot build the 64-bit version
|
||||
with Visual Studio Express Edition. You must use Visual Studio
|
||||
2005 (8.0) or higher.
|
||||
You can also use the corresponding 64-bit file (for example
|
||||
win\build-vs8_x64.bat or win\build-vs9_x64.bat) to build the
|
||||
64-bit version of MySQL. However, you cannot build the 64-bit
|
||||
version with Visual Studio Express Edition. You must use
|
||||
Visual Studio 2005 (8.0) or higher.
|
||||
|
||||
4. From the work directory, open the generated mysql.sln file
|
||||
5. From the work directory, open the generated mysql.sln file
|
||||
with Visual Studio and select the proper configuration using
|
||||
the Configuration menu. The menu provides Debug, Release,
|
||||
RelwithDebInfo, MinRelInfo options. Then select Solution >
|
||||
@ -5621,7 +5586,7 @@ C:\workdir>win\configure.js WITH_INNOBASE_STORAGE_ENGINE
|
||||
important later when you run the test script because that
|
||||
script needs to know which configuration you used.
|
||||
|
||||
5. Test the server. The server built using the preceding
|
||||
6. Test the server. The server built using the preceding
|
||||
instructions expects that the MySQL base directory and data
|
||||
directory are C:\mysql and C:\mysql\data by default. If you
|
||||
want to test your server using the source tree root directory
|
||||
@ -5681,29 +5646,36 @@ C:\> mkdir C:\mysql\sql-bench
|
||||
Installation Notes."
|
||||
|
||||
2. From the work directory, copy into the C:\mysql directory the
|
||||
following directories:
|
||||
following files and directories:
|
||||
C:\> cd \workdir
|
||||
C:\workdir> copy client_release\*.exe C:\mysql\bin
|
||||
C:\workdir> copy client_debug\mysqld.exe C:\mysql\bin\mysqld-debug.ex
|
||||
e
|
||||
C:\workdir> mkdir C:\mysql
|
||||
C:\workdir> mkdir C:\mysql\bin
|
||||
C:\workdir> copy client\Release\*.exe C:\mysql\bin
|
||||
C:\workdir> copy sql\Release\mysqld.exe C:\mysql\bin\mysqld.exe
|
||||
C:\workdir> xcopy scripts\*.* C:\mysql\scripts /E
|
||||
C:\workdir> xcopy share\*.* C:\mysql\share /E
|
||||
If you want to compile other clients and link them to MySQL,
|
||||
you should also copy several libraries and header files:
|
||||
C:\workdir> copy lib_debug\mysqlclient.lib C:\mysql\lib\debug
|
||||
C:\workdir> copy lib_debug\libmysql.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib_debug\zlib.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib_release\mysqlclient.lib C:\mysql\lib\opt
|
||||
C:\workdir> copy lib_release\libmysql.* C:\mysql\lib\opt
|
||||
C:\workdir> copy lib_release\zlib.* C:\mysql\lib\opt
|
||||
C:\workdir> copy lib\Release\mysqlclient.lib C:\mysql\lib\debug
|
||||
C:\workdir> copy lib\Release\libmysql.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib\Release\zlib.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib\Release\mysqlclient.lib C:\mysql\lib\opt
|
||||
C:\workdir> copy lib\Release\libmysql.* C:\mysql\lib\opt
|
||||
C:\workdir> copy lib\Release\zlib.* C:\mysql\lib\opt
|
||||
C:\workdir> copy include\*.h C:\mysql\include
|
||||
C:\workdir> copy libmysql\libmysql.def C:\mysql\include
|
||||
|
||||
Note
|
||||
If you have compiled a Debug, rather than Release solution,
|
||||
you can replace Release with Debug in the source file names
|
||||
shown above.
|
||||
If you want to benchmark MySQL, you should also do this:
|
||||
C:\workdir> xcopy sql-bench\*.* C:\mysql\bench /E
|
||||
|
||||
After installation, set up and start the server in the same way as
|
||||
for binary Windows distributions. See Section 2.5, "Installing
|
||||
MySQL on Windows."
|
||||
for binary Windows distributions. This includes creating the
|
||||
system tables by running mysql_install_db. For more information,
|
||||
see Section 2.5, "Installing MySQL on Windows."
|
||||
|
||||
2.5.11. Compiling MySQL Clients on Windows
|
||||
|
||||
@ -6626,14 +6598,23 @@ DLTLIB LIB(MYSQLINST)
|
||||
|
||||
Upgrading an existing MySQL instance
|
||||
|
||||
You need to execute the upgrade command, MYSQLINST/UPGMYSQL. You
|
||||
must specify 6 parameters to perform an upgrade:
|
||||
You need to execute the upgrade command, MYSQLINST/UPGMYSQL.
|
||||
|
||||
Note
|
||||
|
||||
You cannot use MYSQLINST/UPGMYSQL to upgrade between major
|
||||
versions of MySQL (for example from 5.0 to 5.1). For information
|
||||
and advice on migrating between major versions you can use the
|
||||
advice provided in Section 2.4.1.1, "Upgrading from MySQL 5.0 to
|
||||
5.1."
|
||||
|
||||
You must specify 6 parameters to perform an upgrade:
|
||||
|
||||
* DIR('/QOpenSys/usr/local/') --- sets the installation location
|
||||
for the MySQL files. The directory will be created if it does
|
||||
not already exist. This is the directory that the MySQL server
|
||||
will be installed into, inside a directory with a name
|
||||
matching the version and release. For example if installing
|
||||
matching the version and release. For example, if installing
|
||||
MySQL 5.1.39 with the DIR set to /QOpenSys/usr/local/ would
|
||||
result in /QOpenSys/usr/local/mysql-5.1.39-i5os-power64 and a
|
||||
symbolic link to this directory will be created in
|
||||
@ -7167,7 +7148,7 @@ shell> bin/mysqld_safe --user=mysql &
|
||||
logged in to the system as mysql, in which case you can omit
|
||||
the --user option from the command.
|
||||
Further instructions for running MySQL as an unprivileged user
|
||||
are given in Section 5.3.5, "How to Run MySQL as a Normal
|
||||
are given in Section 5.3.6, "How to Run MySQL as a Normal
|
||||
User."
|
||||
If you neglected to create the grant tables before proceeding
|
||||
to this step, the following message appears in the error log
|
||||
@ -7185,10 +7166,10 @@ shell> bin/mysqladmin variables
|
||||
on your platform and version of MySQL, but should be similar
|
||||
to that shown here:
|
||||
shell> bin/mysqladmin version
|
||||
mysqladmin Ver 14.12 Distrib 5.1.41, for pc-linux-gnu on i686
|
||||
mysqladmin Ver 14.12 Distrib 5.1.46, for pc-linux-gnu on i686
|
||||
...
|
||||
|
||||
Server version 5.1.41
|
||||
Server version 5.1.46
|
||||
Protocol version 10
|
||||
Connection Localhost via UNIX socket
|
||||
UNIX socket /var/lib/mysql/mysql.sock
|
||||
@ -7292,7 +7273,7 @@ shell> mysql -vvf test < ./tests/auto_increment.tst
|
||||
|
||||
The MySQL 5.1 installation procedure creates time zone tables in
|
||||
the mysql database. However, you must populate the tables manually
|
||||
using the instructions in Section 9.7, "MySQL Server Time Zone
|
||||
using the instructions in Section 9.6, "MySQL Server Time Zone
|
||||
Support."
|
||||
|
||||
2.13.1.1. Problems Running mysql_install_db
|
||||
@ -7323,7 +7304,7 @@ mysqld ended
|
||||
carefully. The log should be located in the directory XXXXXX
|
||||
named by the error message and should indicate why mysqld
|
||||
didn't start. If you do not understand what happened, include
|
||||
the log when you post a bug report. See Section 1.6, "How to
|
||||
the log when you post a bug report. See Section 1.7, "How to
|
||||
Report Bugs or Problems."
|
||||
|
||||
* There is a mysqld process running
|
||||
@ -7972,7 +7953,7 @@ Note
|
||||
MYSQL_PS1 The command prompt to use in the mysql command-line
|
||||
client.
|
||||
MYSQL_PWD The default password when connecting to mysqld. Note
|
||||
that using this is insecure. See Section 5.5.6.2, "End-User
|
||||
that using this is insecure. See Section 5.3.2.2, "End-User
|
||||
Guidelines for Password Security."
|
||||
MYSQL_TCP_PORT The default TCP/IP port number.
|
||||
MYSQL_UNIX_PORT The default Unix socket file name; used for
|
||||
|
@ -13,10 +13,9 @@ Note
|
||||
from the Bazaar tree. For production use, we do not advise using a
|
||||
MySQL server built by yourself from source. Normally, it is best
|
||||
to use precompiled binary distributions of MySQL that are built
|
||||
specifically for optimal performance on Windows by Sun
|
||||
Microsystems, Inc. Instructions for installing binary
|
||||
distributions are available in Section 2.5, "Installing MySQL on
|
||||
Windows."
|
||||
specifically for optimal performance on Windows by Oracle
|
||||
Corporation. Instructions for installing binary distributions are
|
||||
available in Section 2.5, "Installing MySQL on Windows."
|
||||
|
||||
To build MySQL on Windows from source, you must satisfy the
|
||||
following system, compiler, and resource requirements:
|
||||
@ -76,8 +75,8 @@ Note
|
||||
You also need a MySQL source distribution for Windows, which can
|
||||
be obtained two ways:
|
||||
|
||||
* Obtain a source distribution packaged by Sun Microsystems,
|
||||
Inc. These are available from http://dev.mysql.com/downloads/.
|
||||
* Obtain a source distribution packaged by Oracle Corporation.
|
||||
These are available from http://dev.mysql.com/downloads/.
|
||||
|
||||
* Package a source distribution yourself from the latest Bazaar
|
||||
developer source tree. For instructions on pulling the latest
|
||||
@ -87,19 +86,20 @@ Note
|
||||
If you find something not working as expected, or you have
|
||||
suggestions about ways to improve the current build process on
|
||||
Windows, please send a message to the win32 mailing list. See
|
||||
Section 1.5.1, "MySQL Mailing Lists."
|
||||
Section 1.6.1, "MySQL Mailing Lists."
|
||||
|
||||
2.5.10.1. Building MySQL from Source Using CMake and Visual Studio
|
||||
|
||||
You can build MySQL on Windows by using a combination of cmake and
|
||||
Microsoft Visual Studio .NET 2003 (7.1), Microsoft Visual Studio
|
||||
2005 (8.0) or Microsoft Visual C++ 2005 Express Edition. You must
|
||||
have the appropriate Microsoft Platform SDK installed.
|
||||
2005 (8.0), Microsoft Visual Studio 2008 (9.0) or Microsoft Visual
|
||||
C++ 2005 Express Edition. You must have the appropriate Microsoft
|
||||
Platform SDK installed.
|
||||
|
||||
Note
|
||||
|
||||
To compile from the source code on Windows you must use the
|
||||
standard source distribution (for example, mysql-5.1.41.tar.gz).
|
||||
standard source distribution (for example, mysql-5.1.46.tar.gz).
|
||||
You build from the same distribution as used to build MySQL on
|
||||
Unix, Linux and other platforms. Do not use the Windows Source
|
||||
distributions as they do not contain the necessary configuration
|
||||
@ -113,8 +113,19 @@ Note
|
||||
tool that can read .zip files. This directory is the work
|
||||
directory in the following instructions.
|
||||
|
||||
2. Using a command shell, navigate to the work directory and run
|
||||
the following command:
|
||||
Note
|
||||
You must run the commands in the win directory from the
|
||||
top-level source directory. Do not change into the win
|
||||
directory, as the commands will not be executed correctly.
|
||||
|
||||
2. Start a command shell. If you have not configured the PATH and
|
||||
other environment variables for all command shells, you may be
|
||||
able to start a command shell from the Start Menu within the
|
||||
Windows Visual Studio menu that contains the necessary
|
||||
environment changes.
|
||||
|
||||
3. Within the command shell, navigate to the work directory and
|
||||
run the following command:
|
||||
C:\workdir>win\configure.js options
|
||||
If you have associated the .js file extension with an
|
||||
application such as a text editor, then you may need to use
|
||||
@ -165,16 +176,19 @@ C:\workdir>cscript win\configure.js options
|
||||
C:\workdir>win\configure.js WITH_INNOBASE_STORAGE_ENGINE
|
||||
WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro
|
||||
|
||||
3. From the work directory, execute the win\build-vs8.bat or
|
||||
win\build-vs71.bat file, depending on the version of Visual
|
||||
4. From the work directory, execute the win\build-vs9.bat
|
||||
(Windows Visual Studio 2008), win\build-vs8.bat (Windows
|
||||
Visual Studio 2005), or win\build-vs71.bat (Windows Visual
|
||||
Stidion 2003) script, depending on the version of Visual
|
||||
Studio you have installed. The script invokes CMake, which
|
||||
generates the mysql.sln solution file.
|
||||
You can also use win\build-vs8_x64.bat to build the 64-bit
|
||||
version of MySQL. However, you cannot build the 64-bit version
|
||||
with Visual Studio Express Edition. You must use Visual Studio
|
||||
2005 (8.0) or higher.
|
||||
You can also use the corresponding 64-bit file (for example
|
||||
win\build-vs8_x64.bat or win\build-vs9_x64.bat) to build the
|
||||
64-bit version of MySQL. However, you cannot build the 64-bit
|
||||
version with Visual Studio Express Edition. You must use
|
||||
Visual Studio 2005 (8.0) or higher.
|
||||
|
||||
4. From the work directory, open the generated mysql.sln file
|
||||
5. From the work directory, open the generated mysql.sln file
|
||||
with Visual Studio and select the proper configuration using
|
||||
the Configuration menu. The menu provides Debug, Release,
|
||||
RelwithDebInfo, MinRelInfo options. Then select Solution >
|
||||
@ -183,7 +197,7 @@ C:\workdir>win\configure.js WITH_INNOBASE_STORAGE_ENGINE
|
||||
important later when you run the test script because that
|
||||
script needs to know which configuration you used.
|
||||
|
||||
5. Test the server. The server built using the preceding
|
||||
6. Test the server. The server built using the preceding
|
||||
instructions expects that the MySQL base directory and data
|
||||
directory are C:\mysql and C:\mysql\data by default. If you
|
||||
want to test your server using the source tree root directory
|
||||
@ -243,26 +257,33 @@ C:\> mkdir C:\mysql\sql-bench
|
||||
Installation Notes."
|
||||
|
||||
2. From the work directory, copy into the C:\mysql directory the
|
||||
following directories:
|
||||
following files and directories:
|
||||
C:\> cd \workdir
|
||||
C:\workdir> copy client_release\*.exe C:\mysql\bin
|
||||
C:\workdir> copy client_debug\mysqld.exe C:\mysql\bin\mysqld-debug.ex
|
||||
e
|
||||
C:\workdir> mkdir C:\mysql
|
||||
C:\workdir> mkdir C:\mysql\bin
|
||||
C:\workdir> copy client\Release\*.exe C:\mysql\bin
|
||||
C:\workdir> copy sql\Release\mysqld.exe C:\mysql\bin\mysqld.exe
|
||||
C:\workdir> xcopy scripts\*.* C:\mysql\scripts /E
|
||||
C:\workdir> xcopy share\*.* C:\mysql\share /E
|
||||
If you want to compile other clients and link them to MySQL,
|
||||
you should also copy several libraries and header files:
|
||||
C:\workdir> copy lib_debug\mysqlclient.lib C:\mysql\lib\debug
|
||||
C:\workdir> copy lib_debug\libmysql.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib_debug\zlib.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib_release\mysqlclient.lib C:\mysql\lib\opt
|
||||
C:\workdir> copy lib_release\libmysql.* C:\mysql\lib\opt
|
||||
C:\workdir> copy lib_release\zlib.* C:\mysql\lib\opt
|
||||
C:\workdir> copy lib\Release\mysqlclient.lib C:\mysql\lib\debug
|
||||
C:\workdir> copy lib\Release\libmysql.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib\Release\zlib.* C:\mysql\lib\debug
|
||||
C:\workdir> copy lib\Release\mysqlclient.lib C:\mysql\lib\opt
|
||||
C:\workdir> copy lib\Release\libmysql.* C:\mysql\lib\opt
|
||||
C:\workdir> copy lib\Release\zlib.* C:\mysql\lib\opt
|
||||
C:\workdir> copy include\*.h C:\mysql\include
|
||||
C:\workdir> copy libmysql\libmysql.def C:\mysql\include
|
||||
|
||||
Note
|
||||
If you have compiled a Debug, rather than Release solution,
|
||||
you can replace Release with Debug in the source file names
|
||||
shown above.
|
||||
If you want to benchmark MySQL, you should also do this:
|
||||
C:\workdir> xcopy sql-bench\*.* C:\mysql\bench /E
|
||||
|
||||
After installation, set up and start the server in the same way as
|
||||
for binary Windows distributions. See Section 2.5, "Installing
|
||||
MySQL on Windows."
|
||||
for binary Windows distributions. This includes creating the
|
||||
system tables by running mysql_install_db. For more information,
|
||||
see Section 2.5, "Installing MySQL on Windows."
|
||||
|
19
Makefile.am
19
Makefile.am
@ -140,14 +140,14 @@ smoke:
|
||||
test-full: test test-nr test-ps
|
||||
|
||||
test-force:
|
||||
$(MAKE) force=--force test
|
||||
$(MAKE) -k force=--force test
|
||||
|
||||
test-force-full:
|
||||
$(MAKE) force=--force test-full
|
||||
$(MAKE) -k force=--force test-full
|
||||
|
||||
#used by autopush.pl to run memory based tests
|
||||
test-force-mem:
|
||||
$(MAKE) force=--force mem=--mem test
|
||||
$(MAKE) -k force=--force mem=--mem test
|
||||
|
||||
test-bt:
|
||||
-cd mysql-test ; MTR_BUILD_THREAD=auto \
|
||||
@ -261,7 +261,7 @@ test-fast-prepare:
|
||||
$(MAKE) subset=--ps-protocol test-fast
|
||||
|
||||
test-full-qa:
|
||||
$(MAKE) force=--force test-pr \
|
||||
$(MAKE) -k force=--force test-pr \
|
||||
test-binlog-statement test-ext test-fast-view \
|
||||
test-fast-cursor test-unit
|
||||
|
||||
@ -271,12 +271,13 @@ test-full-qa:
|
||||
# after which TEST_PREPROCESSOR_HEADER will be used.
|
||||
#
|
||||
|
||||
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
|
||||
$(top_srcdir)/include/mysql.h
|
||||
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql.h \
|
||||
$(top_srcdir)/include/mysql/client_plugin.h \
|
||||
$(top_srcdir)/include/mysql/plugin_auth.h
|
||||
|
||||
TEST_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
|
||||
$(top_srcdir)/sql/mysql_priv.h \
|
||||
$(top_srcdir)/include/mysql.h
|
||||
TEST_PREPROCESSOR_HEADER = $(API_PREPROCESSOR_HEADER) \
|
||||
$(top_srcdir)/sql/mysql_priv.h
|
||||
|
||||
|
||||
#
|
||||
# Rules for checking that the abi/api has not changed.
|
||||
|
@ -83,3 +83,5 @@ IF(EMBED_MANIFESTS)
|
||||
MYSQL_EMBED_MANIFEST("echo" "asInvoker")
|
||||
ENDIF(EMBED_MANIFESTS)
|
||||
|
||||
ADD_DEFINITIONS(-DHAVE_DLOPEN)
|
||||
|
||||
|
@ -100,8 +100,8 @@ mysql_upgrade_SOURCES= mysql_upgrade.c \
|
||||
|
||||
# Fix for mit-threads
|
||||
DEFS = -DMYSQL_CLIENT_NO_THREADS \
|
||||
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
|
||||
-DMYSQL_DATADIR="\"$(localstatedir)\""
|
||||
-DDEFAULT_MYSQL_HOME='"$(prefix)"' \
|
||||
-DMYSQL_DATADIR='"$(localstatedir)"'
|
||||
|
||||
sql_src=log_event.h mysql_priv.h rpl_constants.h \
|
||||
rpl_utility.h rpl_tblmap.h rpl_tblmap.cc \
|
||||
|
@ -93,5 +93,7 @@ enum options_client
|
||||
OPT_FIRST_SLAVE,
|
||||
OPT_ALL,
|
||||
OPT_REWRITE_DB,
|
||||
OPT_MAX_CLIENT_OPTION
|
||||
OPT_PLUGIN_DIR,
|
||||
OPT_DEFAULT_PLUGIN,
|
||||
OPT_MAX_CLIENT_OPTION /* should be always the last */
|
||||
};
|
||||
|
131
client/mysql.cc
131
client/mysql.cc
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2000-2009 MySQL AB & Monty Program Ab
|
||||
Copyright 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -13,6 +14,11 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#define COPYRIGHT_NOTICE "\
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL v2 license\n"
|
||||
|
||||
/* mysql command tool
|
||||
* Commands compatible with mSQL by David J. Hughes
|
||||
*
|
||||
@ -167,6 +173,7 @@ static int wait_time = 5;
|
||||
static STATUS status;
|
||||
static ulong select_limit,max_join_size,opt_connect_timeout=0;
|
||||
static char mysql_charsets_dir[FN_REFLEN+1];
|
||||
static char *opt_plugin_dir= 0, *opt_default_auth;
|
||||
static const char *xmlmeta[] = {
|
||||
"&", "&",
|
||||
"<", "<",
|
||||
@ -1166,6 +1173,8 @@ int main(int argc,char *argv[])
|
||||
mysql_thread_id(&mysql), server_version_string(&mysql));
|
||||
put_info((char*) glob_buffer.ptr(),INFO_INFO);
|
||||
|
||||
put_info(COPYRIGHT_NOTICE, INFO_INFO);
|
||||
|
||||
#ifdef HAVE_READLINE
|
||||
initialize_readline((char*) my_progname);
|
||||
if (!status.batch && !quick && !opt_html && !opt_xml)
|
||||
@ -1208,13 +1217,11 @@ int main(int argc,char *argv[])
|
||||
sprintf(histfile_tmp, "%s.TMP", histfile);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
sprintf(buff, "%s",
|
||||
#ifndef NOT_YET
|
||||
"Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n");
|
||||
#else
|
||||
"Type 'help [[%]function name[%]]' to get help on usage of function.\n");
|
||||
#endif
|
||||
put_info(buff,INFO_INFO);
|
||||
status.exit_status= read_and_execute(!status.batch);
|
||||
if (opt_outfile)
|
||||
@ -1344,7 +1351,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &batch_abort_on_error, (uchar**) &batch_abort_on_error, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"auto-rehash", OPT_AUTO_REHASH,
|
||||
@ -1355,15 +1362,15 @@ static struct my_option my_long_options[] =
|
||||
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"batch", 'B',
|
||||
"Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Don't use history file. Disable interactive behavior. (Enables --silent.)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
|
||||
(uchar**) &column_types_flag, (uchar**) &column_types_flag,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"comments", 'c', "Preserve comments. Send comments to the server."
|
||||
" The default is --skip-comments (discard comments), enable with --comments",
|
||||
" The default is --skip-comments (discard comments), enable with --comments.",
|
||||
(uchar**) &preserve_comments, (uchar**) &preserve_comments,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
@ -1371,10 +1378,10 @@ static struct my_option my_long_options[] =
|
||||
0, 0, 0},
|
||||
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
@ -1389,12 +1396,12 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", (uchar**) &delimiter_str,
|
||||
(uchar**) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"execute", 'e', "Execute command and quit. (Disables --force and history file)", 0,
|
||||
{"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"vertical", 'E', "Print the output of a query (rows) vertically.",
|
||||
(uchar**) &vertical, (uchar**) &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"force", 'f', "Continue even if we get an sql error. Sets abort-source-on-error to 0",
|
||||
{"force", 'f', "Continue even if we get an SQL error. Sets abort-source-on-error to 0",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"named-commands", 'G',
|
||||
@ -1402,7 +1409,11 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &named_cmds, (uchar**) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"no-named-commands", 'g',
|
||||
"Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
|
||||
"Named commands are disabled. Use \\* form only, or use named commands "
|
||||
"only in the beginning of a line ending with a semicolon (;). Since "
|
||||
"version 10.9, the client now starts with this option ENABLED by default. "
|
||||
"Disable with '-G'. Long format commands still work from the first line. "
|
||||
"WARNING: option deprecated; use --disable-named-commands instead.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ignore-spaces", 'i', "Ignore space after function names.",
|
||||
(uchar**) &ignore_spaces, (uchar**) &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
@ -1416,7 +1427,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) ¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"html", 'H', "Produce HTML output.", (uchar**) &opt_html, (uchar**) &opt_html,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"xml", 'X', "Produce XML output", (uchar**) &opt_xml, (uchar**) &opt_xml, 0,
|
||||
{"xml", 'X', "Produce XML output.", (uchar**) &opt_xml, (uchar**) &opt_xml, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
|
||||
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
|
||||
@ -1434,7 +1445,7 @@ static struct my_option my_long_options[] =
|
||||
{"set-variable", 'O',
|
||||
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C)",
|
||||
{"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C).",
|
||||
(uchar**) &opt_sigint_ignore, (uchar**) &opt_sigint_ignore, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"one-database", 'o',
|
||||
@ -1442,7 +1453,7 @@ static struct my_option my_long_options[] =
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef USE_POPEN
|
||||
{"pager", OPT_PAGER,
|
||||
"Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default.",
|
||||
"Pager to use to display results. If you don't supply an option, the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-pager", OPT_NOPAGER,
|
||||
"Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option deprecated; use --disable-pager instead.",
|
||||
@ -1466,7 +1477,7 @@ static struct my_option my_long_options[] =
|
||||
{"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
|
||||
(uchar**) ¤t_prompt, (uchar**) ¤t_prompt, 0, GET_STR_ALLOC,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quick", 'q',
|
||||
"Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file.",
|
||||
@ -1483,7 +1494,7 @@ static struct my_option my_long_options[] =
|
||||
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR_ALLOC,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include "sslopt-longopts.h"
|
||||
@ -1492,7 +1503,7 @@ static struct my_option my_long_options[] =
|
||||
{"tee", OPT_TEE,
|
||||
"Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,
|
||||
{"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: Option deprecated; use --disable-tee instead.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) ¤t_user,
|
||||
@ -1516,32 +1527,39 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0,
|
||||
0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
||||
"Max packet length to send to, or receive from server",
|
||||
"The maximum packet length to send to or receive from server.",
|
||||
(uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096,
|
||||
(longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
||||
"Buffer for TCP/IP and socket communication",
|
||||
"The buffer size for TCP/IP and socket communication.",
|
||||
(uchar**) &opt_net_buffer_length, (uchar**) &opt_net_buffer_length, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||
{"select_limit", OPT_SELECT_LIMIT,
|
||||
"Automatic limit for SELECT when using --safe-updates",
|
||||
"Automatic limit for SELECT when using --safe-updates.",
|
||||
(uchar**) &select_limit,
|
||||
(uchar**) &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX,
|
||||
0, 1, 0},
|
||||
{"max_join_size", OPT_MAX_JOIN_SIZE,
|
||||
"Automatic limit for rows in a join when using --safe-updates",
|
||||
"Automatic limit for rows in a join when using --safe-updates.",
|
||||
(uchar**) &max_join_size,
|
||||
(uchar**) &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L, 1, ULONG_MAX,
|
||||
0, 1, 0},
|
||||
{"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
|
||||
" uses old (pre-4.1.1) protocol", (uchar**) &opt_secure_auth,
|
||||
" uses old (pre-4.1.1) protocol.", (uchar**) &opt_secure_auth,
|
||||
(uchar**) &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
|
||||
(uchar**) &show_warnings, (uchar**) &show_warnings, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
|
||||
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default_auth", OPT_PLUGIN_DIR,
|
||||
"Default authentication client-side plugin to use.",
|
||||
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@ -1570,10 +1588,7 @@ static void usage(int version)
|
||||
|
||||
if (version)
|
||||
return;
|
||||
printf("\
|
||||
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license\n");
|
||||
printf("%s", COPYRIGHT_NOTICE);
|
||||
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
print_defaults("my", load_default_groups);
|
||||
@ -3580,7 +3595,7 @@ static void print_warnings()
|
||||
mysql_store_result_for_lazy(&result);
|
||||
|
||||
/* Bail out when no warnings */
|
||||
if (!(num_rows= mysql_num_rows(result)))
|
||||
if (!result || !(num_rows= mysql_num_rows(result)))
|
||||
goto end;
|
||||
|
||||
cur= mysql_fetch_row(result);
|
||||
@ -4238,6 +4253,57 @@ char *get_arg(char *line, my_bool get_next_arg)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
An example of mysql_authentication_dialog_ask callback.
|
||||
|
||||
The C function with the name "mysql_authentication_dialog_ask", if exists,
|
||||
will be used by the "dialog" client authentication plugin when user
|
||||
input is needed. This function should be of mysql_authentication_dialog_ask_t
|
||||
type. If the function does not exists, a built-in implementation will be
|
||||
used.
|
||||
|
||||
@param mysql mysql
|
||||
@param type type of the input
|
||||
1 - normal string input
|
||||
2 - password string
|
||||
@param prompt prompt
|
||||
@param buf a buffer to store the use input
|
||||
@param buf_len the length of the buffer
|
||||
|
||||
@retval a pointer to the user input string.
|
||||
It may be equal to 'buf' or to 'mysql->password'.
|
||||
In all other cases it is assumed to be an allocated
|
||||
string, and the "dialog" plugin will free() it.
|
||||
*/
|
||||
|
||||
extern "C" char *mysql_authentication_dialog_ask(MYSQL *mysql, int type,
|
||||
const char *prompt,
|
||||
char *buf, int buf_len)
|
||||
{
|
||||
char *s=buf;
|
||||
|
||||
fputs("[mariadb] ", stdout);
|
||||
fputs(prompt, stdout);
|
||||
fputs(" ", stdout);
|
||||
|
||||
if (type == 2) /* password */
|
||||
{
|
||||
s= get_tty_password("");
|
||||
strnmov(buf, s, buf_len);
|
||||
buf[buf_len-1]= 0;
|
||||
my_free(s, MYF(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!fgets(buf, buf_len-1, stdin))
|
||||
buf[0]= 0;
|
||||
else if (buf[0] && (s= strend(buf))[-1] == '\n')
|
||||
s[-1]= 0;
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static int
|
||||
sql_real_connect(char *host,char *database,char *user,char *password,
|
||||
uint silent)
|
||||
@ -4283,6 +4349,13 @@ sql_real_connect(char *host,char *database,char *user,char *password,
|
||||
}
|
||||
if (default_charset_used)
|
||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||
|
||||
if (opt_plugin_dir && *opt_plugin_dir)
|
||||
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||
|
||||
if (opt_default_auth && *opt_default_auth)
|
||||
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
|
||||
|
||||
if (!mysql_real_connect(&mysql, host, user, password,
|
||||
database, opt_mysql_port, opt_mysql_unix_port,
|
||||
connect_flag | CLIENT_MULTI_STATEMENTS))
|
||||
|
@ -44,7 +44,7 @@ static DYNAMIC_STRING conn_args;
|
||||
static char *opt_password= 0;
|
||||
static my_bool tty_password= 0;
|
||||
|
||||
static char opt_tmpdir[FN_REFLEN];
|
||||
static char opt_tmpdir[FN_REFLEN] = "";
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
static char *default_dbug_option= (char*) "d:t:O,/tmp/mysql_upgrade.trace";
|
||||
@ -62,21 +62,21 @@ static struct my_option my_long_options[]=
|
||||
{
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"basedir", 'b', "Not used by mysql_upgrade. Only for backward compatibilty",
|
||||
{"basedir", 'b', "Not used by mysql_upgrade. Only for backward compatibility.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", 0,
|
||||
"Directory for character set files.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
|
||||
(uchar**)¬_used, (uchar**)¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"datadir", 'd',
|
||||
"Not used by mysql_upgrade. Only for backward compatibilty",
|
||||
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (uchar* *) & default_dbug_option,
|
||||
{"debug", '#', "Output debug log.", (uchar* *) & default_dbug_option,
|
||||
(uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
@ -94,7 +94,7 @@ static struct my_option my_long_options[]=
|
||||
{"host",'h', "Connect to host.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given"
|
||||
"Password to use when connecting to server. If password is not given,"
|
||||
" it's solicited on the tty.", (uchar**) &opt_password,(uchar**) &opt_password,
|
||||
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __WIN__
|
||||
@ -109,21 +109,21 @@ static struct my_option my_long_options[]=
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol of connection (tcp,socket,pipe,memory).",
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
"Base name of shared memory.", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"tmpdir", 't', "Directory for temporary files",
|
||||
{"tmpdir", 't', "Directory for temporary files.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &opt_user,
|
||||
(uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Display more output about the process",
|
||||
{"verbose", 'v', "Display more output about the process.",
|
||||
(uchar**) &opt_verbose, (uchar**) &opt_verbose, 0,
|
||||
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"write-binlog", OPT_WRITE_BINLOG,
|
||||
@ -228,7 +228,7 @@ get_one_option(int optid, const struct my_option *opt,
|
||||
case '?':
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
||||
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
||||
puts("MySQL utility for upgrading databases to new MySQL versions\n");
|
||||
puts("MySQL utility for upgrading databases to new MySQL versions.\n");
|
||||
my_print_help(my_long_options);
|
||||
exit(0);
|
||||
break;
|
||||
@ -459,7 +459,8 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
|
||||
|
||||
DBUG_ENTER("run_query");
|
||||
DBUG_PRINT("enter", ("query: %s", query));
|
||||
if ((fd= create_temp_file(query_file_path, opt_tmpdir,
|
||||
if ((fd= create_temp_file(query_file_path,
|
||||
opt_tmpdir[0] ? opt_tmpdir : NULL,
|
||||
"sql", O_CREAT | O_SHARE | O_RDWR,
|
||||
MYF(MY_WME))) < 0)
|
||||
die("Failed to create temporary file for defaults");
|
||||
|
@ -123,7 +123,7 @@ static TYPELIB command_typelib=
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"count", 'c',
|
||||
@ -134,7 +134,7 @@ static struct my_option my_long_options[] =
|
||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
|
||||
@ -148,7 +148,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
@ -174,10 +174,10 @@ static struct my_option my_long_options[] =
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &tcp_port,
|
||||
(uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"relative", 'r',
|
||||
"Show difference between current and previous values when used with -i. Currently works only with extended-status.",
|
||||
"Show difference between current and previous values when used with -i. Currently only works with extended-status.",
|
||||
(uchar**) &opt_relative, (uchar**) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"set-variable", 'O',
|
||||
@ -190,10 +190,10 @@ static struct my_option my_long_options[] =
|
||||
#endif
|
||||
{"silent", 's', "Silently exit if one can't connect to server.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &unix_port, (uchar**) &unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"sleep", 'i', "Execute commands again and again with a sleep between.",
|
||||
{"sleep", 'i', "Execute commands repeatedly with a sleep between.",
|
||||
(uchar**) &interval, (uchar**) &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
|
@ -777,10 +777,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
case QUERY_EVENT:
|
||||
{
|
||||
Query_log_event *qe= (Query_log_event*)ev;
|
||||
if (strncmp(qe->query, "BEGIN", 5) &&
|
||||
strncmp(qe->query, "COMMIT", 6) &&
|
||||
strncmp(qe->query, "ROLLBACK", 8) &&
|
||||
shall_skip_database(qe->db))
|
||||
if (!qe->is_trans_keyword() && shall_skip_database(qe->db))
|
||||
goto end;
|
||||
print_use_stmt(print_event_info, qe->db, qe->db_len);
|
||||
if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
|
||||
@ -881,7 +878,11 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
print_event_info->common_header_len=
|
||||
glob_description_event->common_header_len;
|
||||
ev->print(result_file, print_event_info);
|
||||
ev->temp_buf= 0; // as the event ref is zeroed
|
||||
if (!remote_opt)
|
||||
ev->free_temp_buf(); // free memory allocated in dump_local_log_entries
|
||||
else
|
||||
// disassociate but not free dump_remote_log_entries time memory
|
||||
ev->temp_buf= 0;
|
||||
/*
|
||||
We don't want this event to be deleted now, so let's hide it (I
|
||||
(Guilhem) should later see if this triggers a non-serious Valgrind
|
||||
@ -1048,7 +1049,7 @@ static struct my_option my_long_options[] =
|
||||
{"help", '?', "Display this help and exit.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"base64-output", OPT_BASE64_OUTPUT_MODE,
|
||||
@ -1072,7 +1073,7 @@ static struct my_option my_long_options[] =
|
||||
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
|
||||
*/
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"database", 'd', "List entries for just this database (local log only).",
|
||||
(uchar**) &database, (uchar**) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
@ -1126,9 +1127,9 @@ static struct my_option my_long_options[] =
|
||||
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
||||
(ulonglong)(~(uint32)0), 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol of connection (tcp,socket,pipe,memory).",
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server",
|
||||
{"read-from-remote-server", 'R', "Read binary logs from a MySQL server.",
|
||||
(uchar**) &remote_opt, (uchar**) &remote_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
|
||||
@ -1152,7 +1153,7 @@ static struct my_option my_long_options[] =
|
||||
"using --base64-output=never instead.",
|
||||
(uchar**) &short_form, (uchar**) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &sock, (uchar**) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"start-datetime", OPT_START_DATETIME,
|
||||
@ -1194,12 +1195,12 @@ that may lead to an endless loop.",
|
||||
(uchar**) &user, (uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"verbose", 'v', "Reconstruct SQL statements out of row events. "
|
||||
"-v -v adds comments on column data types",
|
||||
"-v -v adds comments on column data types.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
|
||||
"Used to reserve file descriptors for usage by this program",
|
||||
"Used to reserve file descriptors for use by this program.",
|
||||
(uchar**) &open_files_limit, (uchar**) &open_files_limit, 0, GET_ULONG,
|
||||
REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
|
||||
{"rewrite-db", OPT_REWRITE_DB,
|
||||
@ -1302,11 +1303,11 @@ static void usage()
|
||||
print_version();
|
||||
puts("By Monty and Sasha, for your professional use\n\
|
||||
This software comes with NO WARRANTY: This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license\n");
|
||||
and you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
|
||||
printf("\
|
||||
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
|
||||
the mysql command line client\n\n");
|
||||
the mysql command line client.\n\n");
|
||||
printf("Usage: %s [options] log-files\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
my_print_variables(my_long_options);
|
||||
@ -1472,7 +1473,6 @@ static int parse_args(int *argc, char*** argv)
|
||||
int ho_error;
|
||||
|
||||
result_file = stdout;
|
||||
load_defaults("my",load_default_groups,argc,argv);
|
||||
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||
exit(ho_error);
|
||||
if (debug_info_flag)
|
||||
@ -2142,8 +2142,11 @@ int main(int argc, char** argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (load_defaults("my", load_default_groups, &argc, &argv))
|
||||
exit(1);
|
||||
|
||||
defaults_argv= argv;
|
||||
parse_args(&argc, (char***)&argv);
|
||||
defaults_argv=argv;
|
||||
|
||||
if (!argc)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ enum operations { DO_CHECK, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE };
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
{"all-databases", 'A',
|
||||
"Check all the databases. This will be same as --databases with all databases selected.",
|
||||
"Check all the databases. This is the same as --databases with all databases selected.",
|
||||
(uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
||||
@ -63,7 +63,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_all_in_1, (uchar**) &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"auto-repair", OPT_AUTO_REPAIR,
|
||||
@ -71,7 +71,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_auto_repair, (uchar**) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
@ -85,7 +85,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"databases", 'B',
|
||||
"To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.",
|
||||
"Check several databases. Note the difference in usage; in this case no tables are given. All name arguments are regarded as database names.",
|
||||
(uchar**) &opt_databases, (uchar**) &opt_databases, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef DBUG_OFF
|
||||
@ -113,7 +113,7 @@ static struct my_option my_long_options[] =
|
||||
{"fix-table-names", OPT_FIX_TABLE_NAMES, "Fix table names.",
|
||||
(uchar**) &opt_fix_table_names, (uchar**) &opt_fix_table_names,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"force", 'f', "Continue even if we get an sql-error.",
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"extended", 'e',
|
||||
@ -134,7 +134,7 @@ static struct my_option my_long_options[] =
|
||||
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given it's solicited on the tty.",
|
||||
"Password to use when connecting to server. If password is not given, it's solicited on the tty.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __WIN__
|
||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||
@ -149,7 +149,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quick", 'q',
|
||||
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
|
||||
@ -165,7 +165,7 @@ static struct my_option my_long_options[] =
|
||||
#endif
|
||||
{"silent", 's', "Print only error messages.", (uchar**) &opt_silent,
|
||||
(uchar**) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
@ -221,14 +221,14 @@ static void print_version(void)
|
||||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team\n");
|
||||
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
|
||||
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
puts("This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)");
|
||||
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
|
||||
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
|
||||
puts("used at the same time. Not all options are supported by all storage engines.");
|
||||
puts("Please consult the MySQL manual for latest information about the");
|
||||
puts("above. The options -c,-r,-a and -o are exclusive to each other, which");
|
||||
puts("above. The options -c, -r, -a, and -o are exclusive to each other, which");
|
||||
puts("means that the last option will be used, if several was specified.\n");
|
||||
puts("The option -c will be used by default, if none was specified. You");
|
||||
puts("can change the default behavior by making a symbolic link, or");
|
||||
|
@ -194,24 +194,24 @@ static struct my_option my_long_options[] =
|
||||
"Do not dump any tablespace information.",
|
||||
(uchar**) &opt_notspcs, (uchar**) &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"add-drop-database", OPT_DROP_DATABASE, "Add a 'DROP DATABASE' before each create.",
|
||||
{"add-drop-database", OPT_DROP_DATABASE, "Add a DROP DATABASE before each create.",
|
||||
(uchar**) &opt_drop_database, (uchar**) &opt_drop_database, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"add-drop-table", OPT_DROP, "Add a 'drop table' before each create.",
|
||||
{"add-drop-table", OPT_DROP, "Add a DROP TABLE before each create.",
|
||||
(uchar**) &opt_drop, (uchar**) &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||
0},
|
||||
{"add-locks", OPT_LOCKS, "Add locks around insert statements.",
|
||||
{"add-locks", OPT_LOCKS, "Add locks around INSERT statements.",
|
||||
(uchar**) &opt_lock, (uchar**) &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||
0},
|
||||
{"allow-keywords", OPT_KEYWORDS,
|
||||
"Allow creation of column names that are keywords.", (uchar**) &opt_keywords,
|
||||
(uchar**) &opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"comments", 'i', "Write additional information.",
|
||||
(uchar**) &opt_comments, (uchar**) &opt_comments, 0, GET_BOOL, NO_ARG,
|
||||
@ -221,7 +221,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_compatible_mode_str, (uchar**) &opt_compatible_mode_str, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compact", OPT_COMPACT,
|
||||
"Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --skip-add-locks --skip-comments --skip-disable-keys --skip-set-charset",
|
||||
"Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --skip-add-locks --skip-comments --skip-disable-keys --skip-set-charset.",
|
||||
(uchar**) &opt_compact, (uchar**) &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"complete-insert", 'c', "Use complete insert statements.",
|
||||
@ -235,14 +235,14 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
{"databases", 'B',
|
||||
"To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.",
|
||||
"Dump several databases. Note the difference in usage; in this case no tables are given. All name arguments are regarded as database names. 'USE db_name;' will be included in the output.",
|
||||
(uchar**) &opt_databases, (uchar**) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
||||
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
@ -254,7 +254,7 @@ static struct my_option my_long_options[] =
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED; ",
|
||||
{"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED.",
|
||||
(uchar**) &opt_delayed, (uchar**) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"delete-master-logs", OPT_DELETE_MASTER_LOGS,
|
||||
@ -272,16 +272,21 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &extended_insert, (uchar**) &extended_insert, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
{"fields-terminated-by", OPT_FTB,
|
||||
"Fields in the textfile are terminated by ...", (uchar**) &fields_terminated,
|
||||
(uchar**) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the output file are terminated by the given string.",
|
||||
(uchar**) &fields_terminated, (uchar**) &fields_terminated, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-enclosed-by", OPT_ENC,
|
||||
"Fields in the importfile are enclosed by ...", (uchar**) &enclosed,
|
||||
(uchar**) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
"Fields in the output file are enclosed by the given character.",
|
||||
(uchar**) &enclosed, (uchar**) &enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||
"Fields in the i.file are opt. enclosed by ...", (uchar**) &opt_enclosed,
|
||||
(uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
|
||||
(uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the output file are optionally enclosed by the given character.",
|
||||
(uchar**) &opt_enclosed, (uchar**) &opt_enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-escaped-by", OPT_ESC,
|
||||
"Fields in the output file are escaped by the given character.",
|
||||
(uchar**) &escaped, (uchar**) &escaped, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"first-slave", OPT_FIRST_SLAVE, "Deprecated, renamed to --lock-all-tables.",
|
||||
(uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
@ -293,7 +298,7 @@ static struct my_option my_long_options[] =
|
||||
"in this case the logs will be flushed only once, corresponding "
|
||||
"to the moment all tables are locked. So if you want your dump and "
|
||||
"the log flush to happen at the same exact moment you should use "
|
||||
"--lock-all-tables or --master-data with --flush-logs",
|
||||
"--lock-all-tables or --master-data with --flush-logs.",
|
||||
(uchar**) &flush_logs, (uchar**) &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
|
||||
@ -302,7 +307,7 @@ static struct my_option my_long_options[] =
|
||||
"that depends on the data in the mysql database for proper restore. ",
|
||||
(uchar**) &flush_privileges, (uchar**) &flush_privileges, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"force", 'f', "Continue even if we get an sql-error.",
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
@ -315,12 +320,14 @@ static struct my_option my_long_options[] =
|
||||
{"ignore-table", OPT_IGNORE_TABLE,
|
||||
"Do not dump the specified table. To specify more than one table to ignore, "
|
||||
"use the directive multiple times, once for each table. Each table must "
|
||||
"be specified with both database and table names, e.g. --ignore-table=database.table",
|
||||
"be specified with both database and table names, e.g., "
|
||||
"--ignore-table=database.table.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.",
|
||||
(uchar**) &opt_ignore, (uchar**) &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...",
|
||||
{"lines-terminated-by", OPT_LTB,
|
||||
"Lines in the output file are terminated by the given string.",
|
||||
(uchar**) &lines_terminated, (uchar**) &lines_terminated, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"lock-all-tables", 'x', "Locks all tables across all databases. This "
|
||||
@ -339,17 +346,19 @@ static struct my_option my_long_options[] =
|
||||
" to 2, that command will be prefixed with a comment symbol. "
|
||||
"This option will turn --lock-all-tables on, unless "
|
||||
"--single-transaction is specified too (in which case a "
|
||||
"global read lock is only taken a short time at the beginning of the dump "
|
||||
"- don't forget to read about --single-transaction below). In all cases "
|
||||
"any action on logs will happen at the exact moment of the dump."
|
||||
"global read lock is only taken a short time at the beginning of the dump; "
|
||||
"don't forget to read about --single-transaction below). In all cases, "
|
||||
"any action on logs will happen at the exact moment of the dump. "
|
||||
"Option automatically turns --lock-tables off.",
|
||||
(uchar**) &opt_master_data, (uchar**) &opt_master_data, 0,
|
||||
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "",
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
|
||||
"The maximum packet length to send to or receive from server.",
|
||||
(uchar**) &opt_max_allowed_packet, (uchar**) &opt_max_allowed_packet, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
|
||||
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
|
||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH, "",
|
||||
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
|
||||
"The buffer size for TCP/IP and socket communication.",
|
||||
(uchar**) &opt_net_buffer_length, (uchar**) &opt_net_buffer_length, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L,
|
||||
MALLOC_OVERHEAD-1024, 1024, 0},
|
||||
@ -358,9 +367,11 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_autocommit, (uchar**) &opt_autocommit, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"no-create-db", 'n',
|
||||
"'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given.}.",
|
||||
(uchar**) &opt_create_db, (uchar**) &opt_create_db, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
"Suppress the CREATE DATABASE ... IF EXISTS statement that normally is "
|
||||
"output for each dumped database if --all-databases or --databases is "
|
||||
"given.",
|
||||
(uchar**) &opt_create_db, (uchar**) &opt_create_db, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-create-info", 't', "Don't write table creation info.",
|
||||
(uchar**) &opt_no_create_info, (uchar**) &opt_no_create_info, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -384,8 +395,9 @@ static struct my_option my_long_options[] =
|
||||
{"port", 'P', "Port number to use for connection.", (uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quick", 'q', "Don't buffer query, dump directly to stdout.",
|
||||
(uchar**) &quick, (uchar**) &quick, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"quote-names",'Q', "Quote table and column names with backticks (`).",
|
||||
@ -435,18 +447,20 @@ static struct my_option my_long_options[] =
|
||||
{"skip-opt", OPT_SKIP_OPTIMIZATION,
|
||||
"Disable --opt. Disables --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"tab",'T',
|
||||
"Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.",
|
||||
"Create tab-separated textfile for each table to given path. (Create .sql "
|
||||
"and .txt files.) NOTE: This only works if mysqldump is run on the same "
|
||||
"machine as the mysqld server.",
|
||||
(uchar**) &path, (uchar**) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"tables", OPT_TABLES, "Overrides option --databases (-B).",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table",
|
||||
(uchar**) &opt_dump_triggers, (uchar**) &opt_dump_triggers, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table.",
|
||||
(uchar**) &opt_dump_triggers, (uchar**) &opt_dump_triggers, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"tz-utc", OPT_TZ_UTC,
|
||||
"SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones.",
|
||||
(uchar**) &opt_tz_utc, (uchar**) &opt_tz_utc, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
@ -459,7 +473,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &verbose, (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version",'V', "Output version information and exit.", 0, 0, 0,
|
||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"where", 'w', "Dump only selected records; QUOTES mandatory!",
|
||||
{"where", 'w', "Dump only selected records. Quotes are mandatory.",
|
||||
(uchar**) &where, (uchar**) &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -553,9 +567,9 @@ static void short_usage_sub(void)
|
||||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("By Igor Romanenko, Monty, Jani & Sinisa");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("Dumping definition and data mysql database or table");
|
||||
puts("By Igor Romanenko, Monty, Jani & Sinisa.");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
puts("Dumping structure and contents of MySQL databases and tables.");
|
||||
short_usage_sub();
|
||||
print_defaults("my",load_default_groups);
|
||||
my_print_help(my_long_options);
|
||||
|
@ -69,11 +69,11 @@ static char *shared_memory_base_name=0;
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (uchar**) &charsets_dir,
|
||||
"Directory for character set files.", (uchar**) &charsets_dir,
|
||||
(uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
@ -96,18 +96,22 @@ static struct my_option my_long_options[] =
|
||||
{"delete", 'd', "First delete all rows from table.", (uchar**) &opt_delete,
|
||||
(uchar**) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-terminated-by", OPT_FTB,
|
||||
"Fields in the textfile are terminated by ...", (uchar**) &fields_terminated,
|
||||
(uchar**) &fields_terminated, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the input file are terminated by the given string.",
|
||||
(uchar**) &fields_terminated, (uchar**) &fields_terminated, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-enclosed-by", OPT_ENC,
|
||||
"Fields in the importfile are enclosed by ...", (uchar**) &enclosed,
|
||||
(uchar**) &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
"Fields in the import file are enclosed by the given character.",
|
||||
(uchar**) &enclosed, (uchar**) &enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-optionally-enclosed-by", OPT_O_ENC,
|
||||
"Fields in the i.file are opt. enclosed by ...", (uchar**) &opt_enclosed,
|
||||
(uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
|
||||
"Fields in the input file are optionally enclosed by the given character.",
|
||||
(uchar**) &opt_enclosed, (uchar**) &opt_enclosed, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"fields-escaped-by", OPT_ESC,
|
||||
"Fields in the input file are escaped by the given character.",
|
||||
(uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"force", 'f', "Continue even if we get an sql-error.",
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
(uchar**) &ignore_errors, (uchar**) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"help", '?', "Displays this help and exits.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
@ -119,7 +123,8 @@ static struct my_option my_long_options[] =
|
||||
{"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.",
|
||||
(uchar**) &opt_ignore_lines, (uchar**) &opt_ignore_lines, 0, GET_LL,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...",
|
||||
{"lines-terminated-by", OPT_LTB,
|
||||
"Lines in the input file are terminated by the given string.",
|
||||
(uchar**) &lines_terminated, (uchar**) &lines_terminated, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"local", 'L', "Read all files through the client.", (uchar**) &opt_local_file,
|
||||
@ -146,7 +151,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_mysql_port,
|
||||
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"replace", 'r', "If duplicate unique key was found, replace old row.",
|
||||
(uchar**) &replace, (uchar**) &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -157,7 +162,7 @@ static struct my_option my_long_options[] =
|
||||
#endif
|
||||
{"silent", 's', "Be more silent.", (uchar**) &silent, (uchar**) &silent, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
@ -194,7 +199,7 @@ static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
printf("\
|
||||
Loads tables from text files in various formats. The base name of the\n\
|
||||
text file must be the name of the table that should be used.\n\
|
||||
|
@ -160,17 +160,17 @@ int main(int argc, char **argv)
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
#ifdef __NETWARE__
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Auto close the screen on exit for Netware.",
|
||||
{"autoclose", OPT_AUTO_CLOSE, "Automatically close the screen on exit for Netware.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"character-sets-dir", 'c', "Directory where character sets are.",
|
||||
{"character-sets-dir", 'c', "Directory for character set files.",
|
||||
(uchar**) &charsets_dir, (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||
"Set the default character set.", (uchar**) &default_charset,
|
||||
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"count", OPT_COUNT,
|
||||
"Show number of rows per table (may be slow for not MyISAM tables)",
|
||||
"Show number of rows per table (may be slow for non-MyISAM tables).",
|
||||
(uchar**) &opt_count, (uchar**) &opt_count, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
@ -194,7 +194,8 @@ static struct my_option my_long_options[] =
|
||||
{"keys", 'k', "Show keys for table.", (uchar**) &opt_show_keys,
|
||||
(uchar**) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given it's asked from the tty.",
|
||||
"Password to use when connecting to server. If password is not given, it's "
|
||||
"solicited on the tty.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"port", 'P', "Port number to use for connection or 0 for default to, in "
|
||||
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
|
||||
@ -209,7 +210,8 @@ static struct my_option my_long_options[] =
|
||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef HAVE_SMEM
|
||||
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
|
||||
@ -219,7 +221,7 @@ static struct my_option my_long_options[] =
|
||||
{"show-table-type", 't', "Show table type column.",
|
||||
(uchar**) &opt_table_type, (uchar**) &opt_table_type, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
@ -228,7 +230,8 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"verbose", 'v',
|
||||
"More verbose output; You can use this multiple times to get even more verbose output.",
|
||||
"More verbose output; you can use this multiple times to get even more "
|
||||
"verbose output.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -250,16 +253,16 @@ static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("Shows the structure of a mysql database (databases,tables and columns)\n");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
|
||||
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
|
||||
puts("\n\
|
||||
If last argument contains a shell or SQL wildcard (*,?,% or _) then only\n\
|
||||
what\'s matched by the wildcard is shown.\n\
|
||||
If no database is given then all matching databases are shown.\n\
|
||||
If no table is given then all matching tables in database are shown\n\
|
||||
If no column is given then all matching columns and columntypes in table\n\
|
||||
are shown");
|
||||
If no table is given, then all matching tables in database are shown.\n\
|
||||
If no column is given, then all matching columns and column types in table\n\
|
||||
are shown.");
|
||||
print_defaults("my",load_default_groups);
|
||||
my_print_help(my_long_options);
|
||||
my_print_variables(my_long_options);
|
||||
|
@ -628,8 +628,8 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &num_of_query, (uchar**) &num_of_query, 0,
|
||||
GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"only-print", OPT_MYSQL_ONLY_PRINT,
|
||||
"This causes mysqlslap to not connect to the databases, but instead print "
|
||||
"out what it would have done instead.",
|
||||
"Do not connect to the databases, but instead print out what would have "
|
||||
"been done.",
|
||||
(uchar**) &opt_only_print, (uchar**) &opt_only_print, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
@ -663,7 +663,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &pre_system,
|
||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL,
|
||||
"The protocol of connection (tcp,socket,pipe,memory).",
|
||||
"The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"query", 'q', "Query to run or file containing query to run.",
|
||||
(uchar**) &user_supplied_query, (uchar**) &user_supplied_query,
|
||||
@ -677,7 +677,7 @@ static struct my_option my_long_options[] =
|
||||
{"silent", 's', "Run program in silent mode - no output.",
|
||||
(uchar**) &opt_silent, (uchar**) &opt_silent, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &opt_mysql_unix_port, (uchar**) &opt_mysql_unix_port, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
@ -708,8 +708,8 @@ static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright (C) 2005 MySQL AB");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("Run a query multiple times against the server\n");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
puts("Run a query multiple times against the server.\n");
|
||||
printf("Usage: %s [OPTIONS]\n",my_progname);
|
||||
print_defaults("my",load_default_groups);
|
||||
my_print_help(my_long_options);
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "client_priv.h"
|
||||
#include <mysql_version.h>
|
||||
#include <mysqld_error.h>
|
||||
#include <sql_common.h>
|
||||
#include <m_ctype.h>
|
||||
#include <my_dir.h>
|
||||
#include <hash.h>
|
||||
@ -67,6 +68,7 @@
|
||||
#define MAX_COLUMNS 256
|
||||
#define MAX_EMBEDDED_SERVER_ARGS 64
|
||||
#define MAX_DELIMITER_LENGTH 16
|
||||
#define DEFAULT_MAX_CONN 128
|
||||
|
||||
/* Flags controlling send and reap */
|
||||
#define QUERY_SEND_FLAG 1
|
||||
@ -75,7 +77,8 @@
|
||||
enum {
|
||||
OPT_SKIP_SAFEMALLOC=OPT_MAX_CLIENT_OPTION,
|
||||
OPT_PS_PROTOCOL, OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
|
||||
OPT_MAX_CONNECT_RETRIES, OPT_MARK_PROGRESS, OPT_LOG_DIR, OPT_TAIL_LINES,
|
||||
OPT_MAX_CONNECT_RETRIES, OPT_MAX_CONNECTIONS,
|
||||
OPT_MARK_PROGRESS, OPT_LOG_DIR, OPT_TAIL_LINES,
|
||||
OPT_GLOBAL_SUBST, OPT_MY_CONNECT_TIMEOUT
|
||||
};
|
||||
|
||||
@ -89,6 +92,7 @@ const char *opt_logdir= "";
|
||||
const char *opt_include= 0, *opt_charsets_dir;
|
||||
static int opt_port= 0;
|
||||
static int opt_max_connect_retries;
|
||||
static int opt_max_connections= DEFAULT_MAX_CONN;
|
||||
static my_bool opt_compress= 0, silent= 0, verbose= 0;
|
||||
static int opt_connect_timeout= -1;
|
||||
static my_bool debug_info_flag= 0, debug_check_flag= 0;
|
||||
@ -99,7 +103,7 @@ static my_bool sp_protocol= 0, sp_protocol_enabled= 0;
|
||||
static my_bool view_protocol= 0, view_protocol_enabled= 0;
|
||||
static my_bool cursor_protocol= 0, cursor_protocol_enabled= 0;
|
||||
static my_bool parsing_disabled= 0;
|
||||
static my_bool display_result_vertically= FALSE,
|
||||
static my_bool display_result_vertically= FALSE, display_result_lower= FALSE,
|
||||
display_metadata= FALSE, display_result_sorted= FALSE;
|
||||
static my_bool disable_query_log= 0, disable_result_log= 0;
|
||||
static my_bool disable_warnings= 0;
|
||||
@ -138,6 +142,7 @@ struct st_block
|
||||
int line; /* Start line of block */
|
||||
my_bool ok; /* Should block be executed */
|
||||
enum block_cmd cmd; /* Command owning the block */
|
||||
char delim[MAX_DELIMITER_LENGTH]; /* Delimiter before block */
|
||||
};
|
||||
|
||||
static struct st_block block_stack[32];
|
||||
@ -238,6 +243,8 @@ struct st_connection
|
||||
char *name;
|
||||
size_t name_len;
|
||||
MYSQL_STMT* stmt;
|
||||
/* Set after send to disallow other queries before reap */
|
||||
my_bool pending;
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
const char *cur_query;
|
||||
@ -247,7 +254,8 @@ struct st_connection
|
||||
int query_done;
|
||||
#endif /*EMBEDDED_LIBRARY*/
|
||||
};
|
||||
struct st_connection connections[128];
|
||||
|
||||
struct st_connection *connections= NULL;
|
||||
struct st_connection* cur_con= NULL, *next_con, *connections_end;
|
||||
|
||||
/*
|
||||
@ -282,6 +290,7 @@ enum enum_commands {
|
||||
Q_DISABLE_ABORT_ON_ERROR, Q_ENABLE_ABORT_ON_ERROR,
|
||||
Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS,
|
||||
Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_SORTED_RESULT,
|
||||
Q_LOWERCASE,
|
||||
Q_START_TIMER, Q_END_TIMER,
|
||||
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
|
||||
Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT,
|
||||
@ -293,7 +302,8 @@ enum enum_commands {
|
||||
Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR,
|
||||
Q_LIST_FILES, Q_LIST_FILES_WRITE_FILE, Q_LIST_FILES_APPEND_FILE,
|
||||
Q_SEND_SHUTDOWN, Q_SHUTDOWN_SERVER,
|
||||
Q_MOVE_FILE, Q_ENABLE_PREPARE_WARNINGS, Q_DISABLE_PREPARE_WARNINGS,
|
||||
Q_MOVE_FILE, Q_REMOVE_FILES_WILDCARD, Q_SEND_EVAL,
|
||||
Q_ENABLE_PREPARE_WARNINGS, Q_DISABLE_PREPARE_WARNINGS,
|
||||
|
||||
Q_UNKNOWN, /* Unknown command. */
|
||||
Q_COMMENT, /* Comments, ignored. */
|
||||
@ -356,6 +366,7 @@ const char *command_names[]=
|
||||
"query_vertical",
|
||||
"query_horizontal",
|
||||
"sorted_result",
|
||||
"lowercase_result",
|
||||
"start_timer",
|
||||
"end_timer",
|
||||
"character_set",
|
||||
@ -391,6 +402,8 @@ const char *command_names[]=
|
||||
"send_shutdown",
|
||||
"shutdown_server",
|
||||
"move_file",
|
||||
"remove_files_wildcard",
|
||||
"send_eval",
|
||||
"enable_prepare_warnings",
|
||||
"disable_prepare_warnings",
|
||||
|
||||
@ -496,6 +509,8 @@ void free_replace();
|
||||
void do_get_replace_regex(struct st_command *command);
|
||||
void free_replace_regex();
|
||||
|
||||
/* Used by sleep */
|
||||
void check_eol_junk_line(const char *eol);
|
||||
|
||||
void free_all_replace(){
|
||||
free_replace();
|
||||
@ -1052,7 +1067,7 @@ void check_command_args(struct st_command *command,
|
||||
}
|
||||
/* Check for too many arguments passed */
|
||||
ptr= command->last_argument;
|
||||
while(ptr <= command->end)
|
||||
while(ptr <= command->end && *ptr != '#')
|
||||
{
|
||||
if (*ptr && *ptr != ' ')
|
||||
die("Extra argument '%s' passed to '%.*s'",
|
||||
@ -1110,6 +1125,7 @@ void close_connections()
|
||||
mysql_close(next_con->util_mysql);
|
||||
my_free(next_con->name, MYF(MY_ALLOW_ZERO_PTR));
|
||||
}
|
||||
my_free(connections, MYF(MY_WME));
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -1136,7 +1152,7 @@ void close_files()
|
||||
if (cur_file->file && cur_file->file != stdin)
|
||||
{
|
||||
DBUG_PRINT("info", ("closing file: %s", cur_file->file_name));
|
||||
my_fclose(cur_file->file, MYF(0));
|
||||
fclose(cur_file->file);
|
||||
}
|
||||
my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
|
||||
cur_file->file_name= 0;
|
||||
@ -1150,7 +1166,8 @@ void free_used_memory()
|
||||
uint i;
|
||||
DBUG_ENTER("free_used_memory");
|
||||
|
||||
close_connections();
|
||||
if (connections)
|
||||
close_connections();
|
||||
close_files();
|
||||
hash_free(&var_hash);
|
||||
|
||||
@ -1255,7 +1272,7 @@ void die(const char *fmt, ...)
|
||||
Help debugging by displaying any warnings that might have
|
||||
been produced prior to the error
|
||||
*/
|
||||
if (cur_con)
|
||||
if (cur_con && !cur_con->pending)
|
||||
show_warnings_before_error(&cur_con->mysql);
|
||||
|
||||
cleanup_and_exit(1);
|
||||
@ -2479,7 +2496,7 @@ int open_file(const char *name)
|
||||
if (cur_file == file_stack_end)
|
||||
die("Source directives are nesting too deep");
|
||||
cur_file++;
|
||||
if (!(cur_file->file = my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0))))
|
||||
if (!(cur_file->file = fopen(buff, "rb")))
|
||||
{
|
||||
cur_file--;
|
||||
die("Could not open '%s' for reading, errno: %d", buff, errno);
|
||||
@ -2691,6 +2708,10 @@ void do_exec(struct st_command *command)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* exec command is interpreted externally and will not take newlines */
|
||||
while(replace(&ds_cmd, "\n", 1, " ", 1) == 0)
|
||||
;
|
||||
|
||||
DBUG_PRINT("info", ("Executing '%s' as '%s'",
|
||||
command->first_argument, ds_cmd.str));
|
||||
|
||||
@ -2914,6 +2935,81 @@ void do_remove_file(struct st_command *command)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
SYNOPSIS
|
||||
do_remove_files_wildcard
|
||||
command called command
|
||||
|
||||
DESCRIPTION
|
||||
remove_files_wildcard <directory> [<file_name_pattern>]
|
||||
Remove the files in <directory> optionally matching <file_name_pattern>
|
||||
*/
|
||||
|
||||
void do_remove_files_wildcard(struct st_command *command)
|
||||
{
|
||||
int error= 0;
|
||||
uint i;
|
||||
MY_DIR *dir_info;
|
||||
FILEINFO *file;
|
||||
char dir_separator[2];
|
||||
static DYNAMIC_STRING ds_directory;
|
||||
static DYNAMIC_STRING ds_wild;
|
||||
static DYNAMIC_STRING ds_file_to_remove;
|
||||
char dirname[FN_REFLEN];
|
||||
|
||||
const struct command_arg rm_args[] = {
|
||||
{ "directory", ARG_STRING, TRUE, &ds_directory,
|
||||
"Directory containing files to delete" },
|
||||
{ "filename", ARG_STRING, FALSE, &ds_wild, "File pattern to delete" }
|
||||
};
|
||||
DBUG_ENTER("do_remove_files_wildcard");
|
||||
|
||||
check_command_args(command, command->first_argument,
|
||||
rm_args, sizeof(rm_args)/sizeof(struct command_arg),
|
||||
' ');
|
||||
fn_format(dirname, ds_directory.str, "", "", MY_UNPACK_FILENAME);
|
||||
|
||||
DBUG_PRINT("info", ("listing directory: %s", dirname));
|
||||
/* Note that my_dir sorts the list if not given any flags */
|
||||
if (!(dir_info= my_dir(dirname, MYF(MY_DONT_SORT | MY_WANT_STAT))))
|
||||
{
|
||||
error= 1;
|
||||
goto end;
|
||||
}
|
||||
init_dynamic_string(&ds_file_to_remove, dirname, 1024, 1024);
|
||||
dir_separator[0]= FN_LIBCHAR;
|
||||
dir_separator[1]= 0;
|
||||
dynstr_append(&ds_file_to_remove, dir_separator);
|
||||
for (i= 0; i < (uint) dir_info->number_off_files; i++)
|
||||
{
|
||||
file= dir_info->dir_entry + i;
|
||||
/* Remove only regular files, i.e. no directories etc. */
|
||||
/* if (!MY_S_ISREG(file->mystat->st_mode)) */
|
||||
/* MY_S_ISREG does not work here on Windows, just skip directories */
|
||||
if (MY_S_ISDIR(file->mystat->st_mode))
|
||||
continue;
|
||||
if (ds_wild.length &&
|
||||
wild_compare(file->name, ds_wild.str, 0))
|
||||
continue;
|
||||
ds_file_to_remove.length= ds_directory.length + 1;
|
||||
ds_file_to_remove.str[ds_directory.length + 1]= 0;
|
||||
dynstr_append(&ds_file_to_remove, file->name);
|
||||
DBUG_PRINT("info", ("removing file: %s", ds_file_to_remove.str));
|
||||
error= my_delete(ds_file_to_remove.str, MYF(0)) != 0;
|
||||
if (error)
|
||||
break;
|
||||
}
|
||||
my_dirend(dir_info);
|
||||
|
||||
end:
|
||||
handle_command_error(command, error);
|
||||
dynstr_free(&ds_directory);
|
||||
dynstr_free(&ds_wild);
|
||||
dynstr_free(&ds_file_to_remove);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
SYNOPSIS
|
||||
do_copy_file
|
||||
@ -3610,13 +3706,15 @@ void do_change_user(struct st_command *command)
|
||||
}
|
||||
|
||||
if (!ds_user.length)
|
||||
{
|
||||
dynstr_set(&ds_user, mysql->user);
|
||||
|
||||
if (!ds_passwd.length)
|
||||
dynstr_set(&ds_passwd, mysql->passwd);
|
||||
if (!ds_passwd.length)
|
||||
dynstr_set(&ds_passwd, mysql->passwd);
|
||||
|
||||
if (!ds_db.length)
|
||||
dynstr_set(&ds_db, mysql->db);
|
||||
if (!ds_db.length)
|
||||
dynstr_set(&ds_db, mysql->db);
|
||||
}
|
||||
|
||||
DBUG_PRINT("info",("connection: '%s' user: '%s' password: '%s' database: '%s'",
|
||||
cur_con->name, ds_user.str, ds_passwd.str, ds_db.str));
|
||||
@ -3671,49 +3769,58 @@ void do_perl(struct st_command *command)
|
||||
sizeof(perl_args)/sizeof(struct command_arg),
|
||||
' ');
|
||||
|
||||
/* If no delimiter was provided, use EOF */
|
||||
if (ds_delimiter.length == 0)
|
||||
dynstr_set(&ds_delimiter, "EOF");
|
||||
|
||||
init_dynamic_string(&ds_script, "", 1024, 1024);
|
||||
read_until_delimiter(&ds_script, &ds_delimiter);
|
||||
|
||||
DBUG_PRINT("info", ("Executing perl: %s", ds_script.str));
|
||||
|
||||
/* Create temporary file name */
|
||||
if ((fd= create_temp_file(temp_file_path, getenv("MYSQLTEST_VARDIR"),
|
||||
"tmp", O_CREAT | O_SHARE | O_RDWR,
|
||||
MYF(MY_WME))) < 0)
|
||||
die("Failed to create temporary file for perl command");
|
||||
my_close(fd, MYF(0));
|
||||
|
||||
str_to_file(temp_file_path, ds_script.str, ds_script.length);
|
||||
|
||||
/* Format the "perl <filename>" command */
|
||||
my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path);
|
||||
|
||||
if (!(res_file= popen(buf, "r")) && command->abort_on_error)
|
||||
die("popen(\"%s\", \"r\") failed", buf);
|
||||
|
||||
while (fgets(buf, sizeof(buf), res_file))
|
||||
ds_script= command->content;
|
||||
/* If it hasn't been done already by a loop iteration, fill it in */
|
||||
if (! ds_script.str)
|
||||
{
|
||||
if (disable_result_log)
|
||||
{
|
||||
buf[strlen(buf)-1]=0;
|
||||
DBUG_PRINT("exec_result",("%s", buf));
|
||||
}
|
||||
else
|
||||
{
|
||||
replace_dynstr_append(&ds_res, buf);
|
||||
}
|
||||
/* If no delimiter was provided, use EOF */
|
||||
if (ds_delimiter.length == 0)
|
||||
dynstr_set(&ds_delimiter, "EOF");
|
||||
|
||||
init_dynamic_string(&ds_script, "", 1024, 1024);
|
||||
read_until_delimiter(&ds_script, &ds_delimiter);
|
||||
command->content= ds_script;
|
||||
}
|
||||
error= pclose(res_file);
|
||||
|
||||
/* Remove the temporary file */
|
||||
my_delete(temp_file_path, MYF(0));
|
||||
/* This function could be called even if "false", so check before doing */
|
||||
if (cur_block->ok)
|
||||
{
|
||||
DBUG_PRINT("info", ("Executing perl: %s", ds_script.str));
|
||||
|
||||
handle_command_error(command, WEXITSTATUS(error));
|
||||
dynstr_free(&ds_script);
|
||||
/* Create temporary file name */
|
||||
if ((fd= create_temp_file(temp_file_path, getenv("MYSQLTEST_VARDIR"),
|
||||
"tmp", O_CREAT | O_SHARE | O_RDWR,
|
||||
MYF(MY_WME))) < 0)
|
||||
die("Failed to create temporary file for perl command");
|
||||
my_close(fd, MYF(0));
|
||||
|
||||
str_to_file(temp_file_path, ds_script.str, ds_script.length);
|
||||
|
||||
/* Format the "perl <filename>" command */
|
||||
my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path);
|
||||
|
||||
if (!(res_file= popen(buf, "r")) && command->abort_on_error)
|
||||
die("popen(\"%s\", \"r\") failed", buf);
|
||||
|
||||
while (fgets(buf, sizeof(buf), res_file))
|
||||
{
|
||||
if (disable_result_log)
|
||||
{
|
||||
buf[strlen(buf)-1]=0;
|
||||
DBUG_PRINT("exec_result",("%s", buf));
|
||||
}
|
||||
else
|
||||
{
|
||||
replace_dynstr_append(&ds_res, buf);
|
||||
}
|
||||
}
|
||||
error= pclose(res_file);
|
||||
|
||||
/* Remove the temporary file */
|
||||
my_delete(temp_file_path, MYF(0));
|
||||
|
||||
handle_command_error(command, WEXITSTATUS(error));
|
||||
}
|
||||
dynstr_free(&ds_delimiter);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
@ -4152,10 +4259,19 @@ int do_disable_rpl_parse(struct st_command *command __attribute__((unused)))
|
||||
int do_sleep(struct st_command *command, my_bool real_sleep)
|
||||
{
|
||||
int error= 0;
|
||||
char *p= command->first_argument;
|
||||
char *sleep_start, *sleep_end= command->end;
|
||||
char *sleep_start, *sleep_end;
|
||||
double sleep_val;
|
||||
char *p;
|
||||
static DYNAMIC_STRING ds_sleep;
|
||||
const struct command_arg sleep_args[] = {
|
||||
{ "sleep_delay", ARG_STRING, TRUE, &ds_sleep, "Number of seconds to sleep." }
|
||||
};
|
||||
check_command_args(command, command->first_argument, sleep_args,
|
||||
sizeof(sleep_args)/sizeof(struct command_arg),
|
||||
' ');
|
||||
|
||||
p= ds_sleep.str;
|
||||
sleep_end= ds_sleep.str + ds_sleep.length;
|
||||
while (my_isspace(charset_info, *p))
|
||||
p++;
|
||||
if (!*p)
|
||||
@ -4164,11 +4280,13 @@ int do_sleep(struct st_command *command, my_bool real_sleep)
|
||||
/* Check that arg starts with a digit, not handled by my_strtod */
|
||||
if (!my_isdigit(charset_info, *sleep_start))
|
||||
die("Invalid argument to %.*s \"%s\"", command->first_word_len,
|
||||
command->query,command->first_argument);
|
||||
command->query, sleep_start);
|
||||
sleep_val= my_strtod(sleep_start, &sleep_end, &error);
|
||||
check_eol_junk_line(sleep_end);
|
||||
if (error)
|
||||
die("Invalid argument to %.*s \"%s\"", command->first_word_len,
|
||||
command->query, command->first_argument);
|
||||
dynstr_free(&ds_sleep);
|
||||
|
||||
/* Fixed sleep time selected by --sleep option */
|
||||
if (opt_sleep >= 0 && !real_sleep)
|
||||
@ -4177,7 +4295,6 @@ int do_sleep(struct st_command *command, my_bool real_sleep)
|
||||
DBUG_PRINT("info", ("sleep_val: %f", sleep_val));
|
||||
if (sleep_val)
|
||||
my_sleep((ulong) (sleep_val * 1000000L));
|
||||
command->last_argument= sleep_end;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4715,7 +4832,8 @@ void do_close_connection(struct st_command *command)
|
||||
if (con->util_mysql)
|
||||
mysql_close(con->util_mysql);
|
||||
con->util_mysql= 0;
|
||||
|
||||
con->pending= FALSE;
|
||||
|
||||
my_free(con->name, MYF(0));
|
||||
|
||||
/*
|
||||
@ -5051,7 +5169,7 @@ void do_connect(struct st_command *command)
|
||||
{
|
||||
if (!(con_slot= find_connection_by_name("-closed_connection-")))
|
||||
die("Connection limit exhausted, you can have max %d connections",
|
||||
(int) (sizeof(connections)/sizeof(struct st_connection)));
|
||||
opt_max_connections);
|
||||
}
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
@ -5167,6 +5285,12 @@ int do_done(struct st_command *command)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*cur_block->delim)
|
||||
{
|
||||
/* Restore "old" delimiter after false if block */
|
||||
strcpy (delimiter, cur_block->delim);
|
||||
delimiter_length= strlen(delimiter);
|
||||
}
|
||||
/* Pop block from stack, goto next line */
|
||||
cur_block--;
|
||||
parser.current_line++;
|
||||
@ -5225,6 +5349,7 @@ void do_block(enum block_cmd cmd, struct st_command* command)
|
||||
cur_block++;
|
||||
cur_block->cmd= cmd;
|
||||
cur_block->ok= FALSE;
|
||||
cur_block->delim[0]= '\0';
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -5261,6 +5386,15 @@ void do_block(enum block_cmd cmd, struct st_command* command)
|
||||
if (not_expr)
|
||||
cur_block->ok = !cur_block->ok;
|
||||
|
||||
if (cur_block->ok)
|
||||
{
|
||||
cur_block->delim[0]= '\0';
|
||||
} else
|
||||
{
|
||||
/* Remember "old" delimiter if entering a false if block */
|
||||
strcpy (cur_block->delim, delimiter);
|
||||
}
|
||||
|
||||
DBUG_PRINT("info", ("OK: %d", cur_block->ok));
|
||||
|
||||
var_free(&v);
|
||||
@ -5363,7 +5497,7 @@ int read_line(char *buf, int size)
|
||||
found_eof:
|
||||
if (cur_file->file != stdin)
|
||||
{
|
||||
my_fclose(cur_file->file, MYF(0));
|
||||
fclose(cur_file->file);
|
||||
cur_file->file= 0;
|
||||
}
|
||||
my_free((uchar*) cur_file->file_name, MYF(MY_ALLOW_ZERO_PTR));
|
||||
@ -5749,7 +5883,7 @@ static struct my_option my_long_options[] =
|
||||
{"basedir", 'b', "Basedir for tests.", (uchar**) &opt_basedir,
|
||||
(uchar**) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory where character sets are.", (uchar**) &opt_charsets_dir,
|
||||
"Directory for character set files.", (uchar**) &opt_charsets_dir,
|
||||
(uchar**) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compress", 'C', "Use the compressed server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
@ -5784,13 +5918,17 @@ static struct my_option my_long_options[] =
|
||||
{"logdir", OPT_LOG_DIR, "Directory for log files", (uchar**) &opt_logdir,
|
||||
(uchar**) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"mark-progress", OPT_MARK_PROGRESS,
|
||||
"Write linenumber and elapsed time to <testname>.progress ",
|
||||
"Write line number and elapsed time to <testname>.progress.",
|
||||
(uchar**) &opt_mark_progress, (uchar**) &opt_mark_progress, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"max-connect-retries", OPT_MAX_CONNECT_RETRIES,
|
||||
"Max number of connection attempts when connecting to server",
|
||||
"Maximum number of attempts to connect to server.",
|
||||
(uchar**) &opt_max_connect_retries, (uchar**) &opt_max_connect_retries, 0,
|
||||
GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0},
|
||||
{"max-connections", OPT_MAX_CONNECTIONS,
|
||||
"Max number of open connections to server",
|
||||
(uchar**) &opt_max_connections, (uchar**) &opt_max_connections, 0,
|
||||
GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0},
|
||||
{"password", 'p', "Password to use when connecting to server.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"port", 'P', "Port number to use for connection or 0 for default to, in "
|
||||
@ -5801,14 +5939,15 @@ static struct my_option my_long_options[] =
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &opt_port,
|
||||
(uchar**) &opt_port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ps-protocol", OPT_PS_PROTOCOL, "Use prepared statements protocol for communication",
|
||||
{"ps-protocol", OPT_PS_PROTOCOL,
|
||||
"Use prepared-statement protocol for communication.",
|
||||
(uchar**) &ps_protocol, (uchar**) &ps_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"quiet", 's', "Suppress all normal output.", (uchar**) &silent,
|
||||
(uchar**) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"record", 'r', "Record output of test_file into result file.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"result-file", 'R', "Read/Store result from/in this file.",
|
||||
{"result-file", 'R', "Read/store result from/in this file.",
|
||||
(uchar**) &result_file_name, (uchar**) &result_file_name, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"server-arg", 'A', "Send option value to embedded server as a parameter.",
|
||||
@ -5826,18 +5965,18 @@ static struct my_option my_long_options[] =
|
||||
{"skip-safemalloc", OPT_SKIP_SAFEMALLOC,
|
||||
"Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"sleep", 'T', "Sleep always this many seconds on sleep commands.",
|
||||
{"sleep", 'T', "Always sleep this many seconds on sleep commands.",
|
||||
(uchar**) &opt_sleep, (uchar**) &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, -1, 0,
|
||||
0, 0, 0},
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
(uchar**) &unix_sock, (uchar**) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"sp-protocol", OPT_SP_PROTOCOL, "Use stored procedures for select",
|
||||
{"sp-protocol", OPT_SP_PROTOCOL, "Use stored procedures for select.",
|
||||
(uchar**) &sp_protocol, (uchar**) &sp_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include "sslopt-longopts.h"
|
||||
{"tail-lines", OPT_TAIL_LINES,
|
||||
"Number of lines of the resul to include in a failure report",
|
||||
"Number of lines of the result to include in a failure report.",
|
||||
(uchar**) &opt_tail_lines, (uchar**) &opt_tail_lines, 0,
|
||||
GET_INT, REQUIRED_ARG, 0, 0, 10000, 0, 0, 0},
|
||||
{"test-file", 'x', "Read test from/in this file (default stdin).",
|
||||
@ -5845,7 +5984,7 @@ static struct my_option my_long_options[] =
|
||||
{"connect-timeout", OPT_MY_CONNECT_TIMEOUT, "Client connection timeout",
|
||||
(uchar**) &opt_connect_timeout, (uchar**) &opt_connect_timeout, 0,
|
||||
GET_INT, REQUIRED_ARG, -1, -1, 0, 0, 0, 0},
|
||||
{"timer-file", 'm', "File where the timing in micro seconds is stored.",
|
||||
{"timer-file", 'm', "File where the timing in microseconds is stored.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"tmpdir", 't', "Temporary directory where sockets are put.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -5855,7 +5994,7 @@ static struct my_option my_long_options[] =
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"view-protocol", OPT_VIEW_PROTOCOL, "Use views for select",
|
||||
{"view-protocol", OPT_VIEW_PROTOCOL, "Use views for select.",
|
||||
(uchar**) &view_protocol, (uchar**) &view_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
@ -5956,7 +6095,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
fn_format(buff, argument, "", "", MY_UNPACK_FILENAME);
|
||||
DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0);
|
||||
if (!(cur_file->file=
|
||||
my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0))))
|
||||
fopen(buff, "rb")))
|
||||
die("Could not open '%s' for reading, errno: %d", buff, errno);
|
||||
cur_file->file_name= my_strdup(buff, MYF(MY_FAE));
|
||||
cur_file->lineno= 1;
|
||||
@ -6577,8 +6716,11 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
|
||||
wait_query_thread_end(cn);
|
||||
#endif /*EMBEDDED_LIBRARY*/
|
||||
if (!(flags & QUERY_REAP_FLAG))
|
||||
{
|
||||
cn->pending= TRUE;
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
/*
|
||||
@ -6667,6 +6809,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
|
||||
|
||||
end:
|
||||
|
||||
cn->pending= FALSE;
|
||||
/*
|
||||
We save the return code (mysql_errno(mysql)) from the last call sent
|
||||
to the server into the mysqltest builtin variable $mysql_errno. This
|
||||
@ -7151,10 +7294,13 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
|
||||
|
||||
init_dynamic_string(&ds_warnings, NULL, 0, 256);
|
||||
|
||||
if (cn->pending && (flags & QUERY_SEND_FLAG))
|
||||
die ("Cannot run query on connection between send and reap");
|
||||
|
||||
/*
|
||||
Evaluate query if this is an eval command
|
||||
*/
|
||||
if (command->type == Q_EVAL)
|
||||
if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
|
||||
{
|
||||
init_dynamic_string(&eval_query, "", command->query_len+256, 1024);
|
||||
do_eval(&eval_query, command->query, command->end, FALSE);
|
||||
@ -7672,12 +7818,6 @@ int main(int argc, char **argv)
|
||||
/* Init expected errors */
|
||||
memset(&saved_expected_errors, 0, sizeof(saved_expected_errors));
|
||||
|
||||
/* Init connections */
|
||||
memset(connections, 0, sizeof(connections));
|
||||
connections_end= connections +
|
||||
(sizeof(connections)/sizeof(struct st_connection)) - 1;
|
||||
next_con= connections + 1;
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
/* set appropriate stack for the 'query' threads */
|
||||
(void) pthread_attr_init(&cn_thd_attrib);
|
||||
@ -7704,7 +7844,14 @@ int main(int argc, char **argv)
|
||||
1024, 0, 0, get_var_key, var_free, MYF(0)))
|
||||
die("Variable hash initialization failed");
|
||||
|
||||
var_set_string("$MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION);
|
||||
var_set_string("MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION);
|
||||
var_set_string("MYSQL_SYSTEM_TYPE", SYSTEM_TYPE);
|
||||
var_set_string("MYSQL_MACHINE_TYPE", MACHINE_TYPE);
|
||||
if (sizeof(void *) == 8) {
|
||||
var_set_string("MYSQL_SYSTEM_ARCHITECTURE", "64");
|
||||
} else {
|
||||
var_set_string("MYSQL_SYSTEM_ARCHITECTURE", "32");
|
||||
}
|
||||
|
||||
memset(&master_pos, 0, sizeof(master_pos));
|
||||
|
||||
@ -7732,6 +7879,13 @@ int main(int argc, char **argv)
|
||||
verbose_msg("Tracing progress in '%s'.", progress_file.file_name());
|
||||
}
|
||||
|
||||
/* Init connections, allocate 1 extra as buffer + 1 for default */
|
||||
connections= (struct st_connection*)
|
||||
my_malloc((opt_max_connections+2) * sizeof(struct st_connection),
|
||||
MYF(MY_WME | MY_ZEROFILL));
|
||||
connections_end= connections + opt_max_connections +1;
|
||||
next_con= connections + 1;
|
||||
|
||||
var_set_int("$PS_PROTOCOL", ps_protocol);
|
||||
var_set_int("$SP_PROTOCOL", sp_protocol);
|
||||
var_set_int("$VIEW_PROTOCOL", view_protocol);
|
||||
@ -7832,7 +7986,8 @@ int main(int argc, char **argv)
|
||||
command->type= Q_COMMENT;
|
||||
}
|
||||
|
||||
ok_to_do= cur_block->ok;
|
||||
/* delimiter needs to be executed so we can continue to parse */
|
||||
ok_to_do= cur_block->ok || command->type == Q_DELIMITER;
|
||||
/*
|
||||
Some commands need to be "done" the first time if they may get
|
||||
re-iterated over in a true context. This can only happen if there's
|
||||
@ -7895,6 +8050,7 @@ int main(int argc, char **argv)
|
||||
case Q_ECHO: do_echo(command); command_executed++; break;
|
||||
case Q_SYSTEM: do_system(command); break;
|
||||
case Q_REMOVE_FILE: do_remove_file(command); break;
|
||||
case Q_REMOVE_FILES_WILDCARD: do_remove_files_wildcard(command); break;
|
||||
case Q_MKDIR: do_mkdir(command); break;
|
||||
case Q_RMDIR: do_rmdir(command); break;
|
||||
case Q_LIST_FILES: do_list_files(command); break;
|
||||
@ -7931,6 +8087,13 @@ int main(int argc, char **argv)
|
||||
*/
|
||||
display_result_sorted= TRUE;
|
||||
break;
|
||||
case Q_LOWERCASE:
|
||||
/*
|
||||
Turn on lowercasing of result, will be reset after next
|
||||
command
|
||||
*/
|
||||
display_result_lower= TRUE;
|
||||
break;
|
||||
case Q_LET: do_let(command); break;
|
||||
case Q_EVAL_RESULT:
|
||||
die("'eval_result' command is deprecated");
|
||||
@ -7980,6 +8143,7 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
case Q_SEND:
|
||||
case Q_SEND_EVAL:
|
||||
if (!*command->first_argument)
|
||||
{
|
||||
/*
|
||||
@ -8148,8 +8312,9 @@ int main(int argc, char **argv)
|
||||
*/
|
||||
free_all_replace();
|
||||
|
||||
/* Also reset "sorted_result" */
|
||||
/* Also reset "sorted_result" and "lowercase"*/
|
||||
display_result_sorted= FALSE;
|
||||
display_result_lower= FALSE;
|
||||
}
|
||||
last_command_executed= command_executed;
|
||||
|
||||
@ -9487,7 +9652,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
if (pa->length+length >= pa->max_length)
|
||||
{
|
||||
if (!(new_pos= (uchar*) my_realloc((uchar*) pa->str,
|
||||
(uint) (pa->max_length+PS_MALLOC),
|
||||
(uint) (pa->length+length+PS_MALLOC),
|
||||
MYF(MY_WME))))
|
||||
DBUG_RETURN(1);
|
||||
if (new_pos != pa->str)
|
||||
@ -9498,7 +9663,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
char*);
|
||||
pa->str=new_pos;
|
||||
}
|
||||
pa->max_length+=PS_MALLOC;
|
||||
pa->max_length= pa->length+length+PS_MALLOC;
|
||||
}
|
||||
if (pa->typelib.count >= pa->max_count-1)
|
||||
{
|
||||
@ -9551,6 +9716,18 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
|
||||
fix_win_paths(val, len);
|
||||
#endif
|
||||
|
||||
if (display_result_lower)
|
||||
{
|
||||
/* Convert to lower case, and do this first */
|
||||
char lower[512];
|
||||
char *c= lower;
|
||||
for (const char *v= val; *v; v++)
|
||||
*c++= my_tolower(charset_info, *v);
|
||||
*c= '\0';
|
||||
/* Copy from this buffer instead */
|
||||
val= lower;
|
||||
}
|
||||
|
||||
if (glob_replace_regex)
|
||||
{
|
||||
/* Regex replace */
|
||||
|
@ -95,10 +95,9 @@ static char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@', '$',
|
||||
char *
|
||||
fn_tilde_expand(const char *txt)
|
||||
{
|
||||
struct passwd pwres, *pass;
|
||||
struct passwd *pass;
|
||||
char *temp;
|
||||
size_t len = 0;
|
||||
char pwbuf[1024];
|
||||
|
||||
if (txt[0] != '~')
|
||||
return (strdup(txt));
|
||||
|
@ -109,8 +109,8 @@ extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
|
||||
extern wchar_t _rl_char_value PARAMS((char *, int));
|
||||
extern int _rl_walphabetic PARAMS((wchar_t));
|
||||
|
||||
#define _rl_to_wupper(wc) (iswlower (wc) ? (wchar_t) towupper (wc) : (wc))
|
||||
#define _rl_to_wlower(wc) (iswupper (wc) ? (wchar_t) towlower (wc) : (wc))
|
||||
#define _rl_to_wupper(wc) (iswlower (wc) ? (wchar_t)towupper (wc) : (wc))
|
||||
#define _rl_to_wlower(wc) (iswupper (wc) ? (wchar_t)towlower (wc) : (wc))
|
||||
|
||||
#define MB_NEXTCHAR(b,s,c,f) \
|
||||
((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
|
||||
|
@ -38,6 +38,7 @@ AC_DEFUN([_MYSQL_PLUGIN],[
|
||||
_MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
|
||||
m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
|
||||
m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
|
||||
m4_ifdef([_AC_ENABLE_IF], [_AC_ENABLE_IF([with],[plugin-$1])])
|
||||
_MYSQL_PLUGAPPEND_META([$1], $5)
|
||||
ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
|
||||
MYSQL_PLUGIN_DIRECTORY([$1],
|
||||
@ -459,7 +460,7 @@ dnl Although this is "pretty", it breaks libmysqld build
|
||||
])
|
||||
])
|
||||
])
|
||||
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
|
||||
maria_plugin_defs="$maria_plugin_defs, [builtin_maria_]$2[_plugin]"
|
||||
[with_plugin_]$2=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
m4_ifdef([$11], [
|
||||
|
32
configure.in
32
configure.in
@ -4,18 +4,21 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# Minimum Autoconf version required.
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
# Minimum Autoconf version required.
|
||||
AC_PREREQ(2.59)
|
||||
dnl Various people throughout the community may parse configure.in to
|
||||
dnl get the MySQL version from the source branch. If the formatting
|
||||
dnl of this line is going to be changed, please announce the change to
|
||||
dnl internals@lists.mysql.com in advance of pushing the change.
|
||||
dnl
|
||||
dnl When changing the major version number please also check the switch
|
||||
dnl statement in mysqlbinlog::check_master_version(). You may also need
|
||||
dnl to update version.c in ndb.
|
||||
dnl
|
||||
dnl When merging new MySQL releases, update the version number to match the
|
||||
dnl MySQL version number.
|
||||
dnl
|
||||
dnl Note: the following line must be parseable by win/configure.js:GetVersion()
|
||||
AC_INIT([MariaDB Server], [5.2.1-MariaDB-beta], [], [mysql])
|
||||
|
||||
# Remember to also update version.c in ndb.
|
||||
# When changing major version number please also check switch statement
|
||||
# in client/mysqlbinlog.cc / check_master_version().
|
||||
#
|
||||
# When merging new MySQL releases, update the version number to match the
|
||||
# MySQL version number.
|
||||
#
|
||||
# Note: the following line must be parseable by win/configure.js:GetVersion()
|
||||
AC_INIT([MariaDB Server], [5.2.0-MariaDB], [], [mysql])
|
||||
AC_CONFIG_SRCDIR([sql/mysqld.cc])
|
||||
AC_CANONICAL_SYSTEM
|
||||
# USTAR format gives us the possibility to store longer path names in
|
||||
@ -833,7 +836,7 @@ AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h ieeefp.h limits.h \
|
||||
memory.h pwd.h select.h fnmatch.h \
|
||||
stdlib.h stddef.h sys/stat.h \
|
||||
stdlib.h stddef.h sys/stat.h valgrind/memcheck.h \
|
||||
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
|
||||
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
|
||||
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
|
||||
@ -1608,9 +1611,8 @@ case "$with_mysqld_ldflags " in
|
||||
;;
|
||||
|
||||
*)
|
||||
# Check for dlopen, needed for user definable functions
|
||||
# Check for dlopen, needed for user definable functions and plugins
|
||||
# This must be checked after threads on AIX
|
||||
# We only need this for mysqld, not for the clients.
|
||||
|
||||
my_save_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
@ -2876,7 +2878,7 @@ AC_SUBST(server_scripts)
|
||||
|
||||
AC_SUBST(mysql_plugin_dirs)
|
||||
AC_SUBST(mysql_plugin_libs)
|
||||
AC_SUBST(mysql_plugin_defs)
|
||||
AC_SUBST(maria_plugin_defs)
|
||||
|
||||
|
||||
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
|
||||
|
@ -660,7 +660,7 @@ static ha_checksum checksum_format_specifier(const char* msg)
|
||||
case 'u':
|
||||
case 'x':
|
||||
case 's':
|
||||
chksum= my_checksum(chksum, start, (uint) (p + 1 - start));
|
||||
chksum= my_checksum(chksum, (uchar*) start, (uint) (p + 1 - start));
|
||||
start= 0; /* Not in format specifier anymore */
|
||||
break;
|
||||
|
||||
|
@ -36,4 +36,4 @@ event-config.h: $(top_builddir)/include/config.h
|
||||
-e 's/#ifndef /#ifndef _EVENT_/' < $(top_builddir)/include/config.h >> $@
|
||||
echo "#endif" >> $@
|
||||
|
||||
AM_CPPFLAGS = -Icompat -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -I$(srcdir)/compat -I$(top_srcdir)/include
|
||||
|
@ -75,8 +75,7 @@ bufferevent_add(struct event *ev, int timeout)
|
||||
*/
|
||||
|
||||
void
|
||||
bufferevent_read_pressure_cb(struct evbuffer *buf,
|
||||
size_t old __attribute__((unused)), size_t now,
|
||||
bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now,
|
||||
void *arg) {
|
||||
struct bufferevent *bufev = arg;
|
||||
/*
|
||||
|
@ -69,15 +69,17 @@ struct event_base {
|
||||
};
|
||||
|
||||
/* Internal use only: Functions that might be missing from <sys/queue.h> */
|
||||
#ifndef HAVE_TAILQFOREACH
|
||||
/* These following macros are copied from BSD sys/queue.h
|
||||
Copyright (c) 1991, 1993, The Regents of the University of California.
|
||||
All rights reserved.
|
||||
*/
|
||||
#ifndef TAILQ_EMPTY
|
||||
#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
|
||||
#define TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define TAILQ_END(head) NULL
|
||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
#endif /* TAILQ_EMPTY */
|
||||
#ifndef HAVE_TAILQFOREACH
|
||||
#define TAILQ_FOREACH(var, head, field) \
|
||||
for((var) = TAILQ_FIRST(head); \
|
||||
(var) != TAILQ_END(head); \
|
||||
|
@ -394,8 +394,7 @@ event_base_get_method(struct event_base *base)
|
||||
}
|
||||
|
||||
static void
|
||||
event_loopexit_cb(int fd __attribute__((unused)),
|
||||
short what __attribute__((unused)), void *arg)
|
||||
event_loopexit_cb(int fd, short what, void *arg)
|
||||
{
|
||||
struct event_base *base = arg;
|
||||
base->event_gotterm = 1;
|
||||
|
@ -144,7 +144,7 @@ kq_init(struct event_base *base)
|
||||
*/
|
||||
if (kevent(kq,
|
||||
kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
|
||||
kqueueop->events[0].ident != -1 ||
|
||||
((int) kqueueop->events[0].ident) != -1 ||
|
||||
kqueueop->events[0].flags != EV_ERROR) {
|
||||
event_warn("%s: detected broken kqueue; not using.", __func__);
|
||||
free(kqueueop->changes);
|
||||
|
@ -69,7 +69,7 @@ static void evsignal_handler(int sig);
|
||||
|
||||
/* Callback for when the signal handler write a byte to our signaling socket */
|
||||
static void
|
||||
evsignal_cb(int fd, short what __attribute((unused)), void *arg __attribute((unused)))
|
||||
evsignal_cb(int fd, short what, void *arg)
|
||||
{
|
||||
static char signals[100];
|
||||
#ifdef WIN32
|
||||
|
@ -64,7 +64,7 @@ enum YasslError {
|
||||
enum Library { yaSSL_Lib = 0, CryptoLib, SocketLib };
|
||||
enum { MAX_ERROR_SZ = 80 };
|
||||
|
||||
void SetErrorString(YasslError, char*);
|
||||
void SetErrorString(unsigned long, char*);
|
||||
|
||||
/* remove for now, if go back to exceptions use this wrapper
|
||||
// Base class for all yaSSL exceptions
|
||||
|
@ -991,7 +991,7 @@ char* ERR_error_string(unsigned long errNumber, char* buffer)
|
||||
static char* msg = (char*)"Please supply a buffer for error string";
|
||||
|
||||
if (buffer) {
|
||||
SetErrorString(YasslError(errNumber), buffer);
|
||||
SetErrorString(errNumber, buffer);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ Library Error::get_lib() const
|
||||
*/
|
||||
|
||||
|
||||
void SetErrorString(YasslError error, char* buffer)
|
||||
void SetErrorString(unsigned long error, char* buffer)
|
||||
{
|
||||
using namespace TaoCrypt;
|
||||
const int max = MAX_ERROR_SZ; // shorthand
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
/* based on Wei Dai's algebra.cpp from CryptoPP */
|
||||
#undef NDEBUG
|
||||
#define DEBUG // GCC 4.0 bug if NDEBUG and Optimize > 1
|
||||
|
||||
#include "runtime.hpp"
|
||||
#include "algebra.hpp"
|
||||
|
@ -24,7 +24,9 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
||||
my_xml.h mysql_embed.h mysql/services.h \
|
||||
mysql/service_my_snprintf.h mysql/service_thd_alloc.h \
|
||||
my_pthread.h my_no_pthread.h \
|
||||
decimal.h errmsg.h my_global.h my_net.h \
|
||||
mysql/plugin_auth.h mysql/client_plugin.h \
|
||||
mysql/plugin_auth_common.h \
|
||||
decimal.h errmsg.h my_global.h my_valgrind.h my_net.h \
|
||||
my_getopt.h sslopt-longopts.h my_dir.h \
|
||||
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
|
||||
m_ctype.h my_attribute.h $(HEADERS_GEN_CONFIGURE) \
|
||||
@ -42,7 +44,7 @@ noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
|
||||
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
|
||||
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
|
||||
wqueue.h waiting_threads.h
|
||||
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp
|
||||
EXTRA_DIST = mysql.h.pp mysql/plugin_auth.h.pp mysql/client_plugin.h.pp
|
||||
|
||||
# Remove built files and the symlinked directories
|
||||
CLEANFILES = $(BUILT_SOURCES) readline openssl
|
||||
|
@ -97,6 +97,7 @@ extern const char *client_errors[]; /* Error messages */
|
||||
#define CR_SERVER_LOST_EXTENDED 2055
|
||||
#define CR_STMT_CLOSED 2056
|
||||
#define CR_NEW_STMT_METADATA 2057
|
||||
#define CR_ERROR_LAST /*Copy last error nr:*/ 2057
|
||||
#define CR_AUTH_PLUGIN_CANNOT_LOAD 2058
|
||||
#define CR_ERROR_LAST /*Copy last error nr:*/ 2058
|
||||
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
|
||||
|
||||
|
@ -19,96 +19,156 @@
|
||||
#define _keycache_h
|
||||
C_MODE_START
|
||||
|
||||
/* declare structures that is used by st_key_cache */
|
||||
|
||||
struct st_block_link;
|
||||
typedef struct st_block_link BLOCK_LINK;
|
||||
struct st_keycache_page;
|
||||
typedef struct st_keycache_page KEYCACHE_PAGE;
|
||||
struct st_hash_link;
|
||||
typedef struct st_hash_link HASH_LINK;
|
||||
|
||||
/* info about requests in a waiting queue */
|
||||
typedef struct st_keycache_wqueue
|
||||
/*
|
||||
Currently the default key cache is created as non-partitioned at
|
||||
the start of the server unless the server is started with the parameter
|
||||
--key-cache-partitions that is greater than 0
|
||||
*/
|
||||
|
||||
#define DEFAULT_KEY_CACHE_PARTITIONS 0
|
||||
|
||||
/*
|
||||
MAX_KEY_CACHE_PARTITIONS cannot be greater than
|
||||
sizeof(MYISAM_SHARE::dirty_part_map)
|
||||
Currently sizeof(MYISAM_SHARE::dirty_part_map)=sizeof(ulonglong)
|
||||
*/
|
||||
|
||||
#define MAX_KEY_CACHE_PARTITIONS 64
|
||||
|
||||
/* The structure to get statistical data about a key cache */
|
||||
|
||||
typedef struct st_key_cache_statistics
|
||||
{
|
||||
struct st_my_thread_var *last_thread; /* circular list of waiting threads */
|
||||
} KEYCACHE_WQUEUE;
|
||||
ulonglong mem_size; /* memory for cache buffers/auxiliary structures */
|
||||
ulonglong block_size; /* size of the each buffers in the key cache */
|
||||
ulonglong blocks_used; /* maximum number of used blocks/buffers */
|
||||
ulonglong blocks_unused; /* number of currently unused blocks */
|
||||
ulonglong blocks_changed; /* number of currently dirty blocks */
|
||||
ulonglong read_requests; /* number of read requests (read hits) */
|
||||
ulonglong reads; /* number of actual reads from files into buffers */
|
||||
ulonglong write_requests; /* number of write requests (write hits) */
|
||||
ulonglong writes; /* number of actual writes from buffers into files */
|
||||
} KEY_CACHE_STATISTICS;
|
||||
|
||||
#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */
|
||||
#define NUM_LONG_KEY_CACHE_STAT_VARIABLES 3
|
||||
|
||||
/* The type of a key cache object */
|
||||
typedef enum key_cache_type
|
||||
{
|
||||
SIMPLE_KEY_CACHE,
|
||||
PARTITIONED_KEY_CACHE
|
||||
} KEY_CACHE_TYPE;
|
||||
|
||||
|
||||
typedef
|
||||
int (*INIT_KEY_CACHE)
|
||||
(void *, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit, uint age_threshold);
|
||||
typedef
|
||||
int (*RESIZE_KEY_CACHE)
|
||||
(void *, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit, uint age_threshold);
|
||||
typedef
|
||||
void (*CHANGE_KEY_CACHE_PARAM)
|
||||
(void *keycache_cb,
|
||||
uint division_limit, uint age_threshold);
|
||||
typedef
|
||||
uchar* (*KEY_CACHE_READ)
|
||||
(void *keycache_cb,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length, int return_buffer);
|
||||
typedef
|
||||
int (*KEY_CACHE_INSERT)
|
||||
(void *keycache_cb,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length);
|
||||
typedef
|
||||
int (*KEY_CACHE_WRITE)
|
||||
(void *keycache_cb,
|
||||
File file, void *file_extra,
|
||||
my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length, int force_write);
|
||||
typedef
|
||||
int (*FLUSH_KEY_BLOCKS)
|
||||
(void *keycache_cb,
|
||||
int file, void *file_extra,
|
||||
enum flush_type type);
|
||||
typedef
|
||||
int (*RESET_KEY_CACHE_COUNTERS)
|
||||
(const char *name, void *keycache_cb);
|
||||
typedef
|
||||
void (*END_KEY_CACHE)
|
||||
(void *keycache_cb, my_bool cleanup);
|
||||
typedef
|
||||
void (*GET_KEY_CACHE_STATISTICS)
|
||||
(void *keycache_cb, uint partition_no,
|
||||
KEY_CACHE_STATISTICS *key_cache_stats);
|
||||
typedef
|
||||
ulonglong (*GET_KEY_CACHE_STAT_VALUE)
|
||||
(void *keycache_cb, uint var_no);
|
||||
|
||||
/*
|
||||
The key cache structure
|
||||
It also contains read-only statistics parameters.
|
||||
An object of the type KEY_CACHE_FUNCS contains pointers to all functions
|
||||
from the key cache interface.
|
||||
Currently a key cache can be of two types: simple and partitioned.
|
||||
For each of them its own static structure of the type KEY_CACHE_FUNCS is
|
||||
defined . The structures contain the pointers to the implementations of
|
||||
the interface functions used by simple key caches and partitioned key
|
||||
caches respectively. Pointers to these structures are assigned to key cache
|
||||
objects at the time of their creation.
|
||||
*/
|
||||
|
||||
typedef struct st_key_cache_funcs
|
||||
{
|
||||
INIT_KEY_CACHE init;
|
||||
RESIZE_KEY_CACHE resize;
|
||||
CHANGE_KEY_CACHE_PARAM change_param;
|
||||
KEY_CACHE_READ read;
|
||||
KEY_CACHE_INSERT insert;
|
||||
KEY_CACHE_WRITE write;
|
||||
FLUSH_KEY_BLOCKS flush;
|
||||
RESET_KEY_CACHE_COUNTERS reset_counters;
|
||||
END_KEY_CACHE end;
|
||||
GET_KEY_CACHE_STATISTICS get_stats;
|
||||
GET_KEY_CACHE_STAT_VALUE get_stat_val;
|
||||
} KEY_CACHE_FUNCS;
|
||||
|
||||
|
||||
typedef struct st_key_cache
|
||||
{
|
||||
my_bool key_cache_inited;
|
||||
my_bool in_resize; /* true during resize operation */
|
||||
my_bool resize_in_flush; /* true during flush of resize operation */
|
||||
KEY_CACHE_TYPE key_cache_type; /* type of the key cache used for debugging */
|
||||
void *keycache_cb; /* control block of the used key cache */
|
||||
KEY_CACHE_FUNCS *interface_funcs; /* interface functions of the key cache */
|
||||
ulonglong param_buff_size; /* size the memory allocated for the cache */
|
||||
ulong param_block_size; /* size of the blocks in the key cache */
|
||||
ulong param_division_limit; /* min. percentage of warm blocks */
|
||||
ulong param_age_threshold; /* determines when hot block is downgraded */
|
||||
ulong param_partitions; /* number of the key cache partitions */
|
||||
my_bool key_cache_inited; /* <=> key cache has been created */
|
||||
my_bool can_be_used; /* usage of cache for read/write is allowed */
|
||||
size_t key_cache_mem_size; /* specified size of the cache memory */
|
||||
uint key_cache_block_size; /* size of the page buffer of a cache block */
|
||||
ulong min_warm_blocks; /* min number of warm blocks; */
|
||||
ulong age_threshold; /* age threshold for hot blocks */
|
||||
ulonglong keycache_time; /* total number of block link operations */
|
||||
uint hash_entries; /* max number of entries in the hash table */
|
||||
int hash_links; /* max number of hash links */
|
||||
int hash_links_used; /* number of hash links currently used */
|
||||
int disk_blocks; /* max number of blocks in the cache */
|
||||
ulong blocks_used; /* maximum number of concurrently used blocks */
|
||||
ulong blocks_unused; /* number of currently unused blocks */
|
||||
ulong blocks_changed; /* number of currently dirty blocks */
|
||||
ulong warm_blocks; /* number of blocks in warm sub-chain */
|
||||
ulong cnt_for_resize_op; /* counter to block resize operation */
|
||||
long blocks_available; /* number of blocks available in the LRU chain */
|
||||
HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
|
||||
HASH_LINK *hash_link_root; /* memory for hash table links */
|
||||
HASH_LINK *free_hash_list; /* list of free hash links */
|
||||
BLOCK_LINK *free_block_list; /* list of free blocks */
|
||||
BLOCK_LINK *block_root; /* memory for block links */
|
||||
uchar HUGE_PTR *block_mem; /* memory for block buffers */
|
||||
BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */
|
||||
BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
|
||||
pthread_mutex_t cache_lock; /* to lock access to the cache structure */
|
||||
KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */
|
||||
/*
|
||||
Waiting for a zero resize count. Using a queue for symmetry though
|
||||
only one thread can wait here.
|
||||
*/
|
||||
KEYCACHE_WQUEUE waiting_for_resize_cnt;
|
||||
KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */
|
||||
KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free block */
|
||||
BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/
|
||||
BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file bl.*/
|
||||
|
||||
/*
|
||||
The following variables are and variables used to hold parameters for
|
||||
initializing the key cache.
|
||||
*/
|
||||
|
||||
ulonglong param_buff_size; /* size the memory allocated for the cache */
|
||||
ulong param_block_size; /* size of the blocks in the key cache */
|
||||
ulong param_division_limit; /* min. percentage of warm blocks */
|
||||
ulong param_age_threshold; /* determines when hot block is downgraded */
|
||||
|
||||
/* Statistics variables. These are reset in reset_key_cache_counters(). */
|
||||
ulong global_blocks_changed; /* number of currently dirty blocks */
|
||||
my_bool in_init; /* Set to 1 in MySQL during init/resize */
|
||||
uint partitions; /* actual number of partitions */
|
||||
size_t key_cache_mem_size; /* specified size of the cache memory */
|
||||
ulong blocks_used; /* maximum number of concurrently used blocks */
|
||||
ulong blocks_unused; /* number of currently unused blocks */
|
||||
ulong global_blocks_changed; /* number of currently dirty blocks */
|
||||
ulonglong global_cache_w_requests;/* number of write requests (write hits) */
|
||||
ulonglong global_cache_write; /* number of writes from cache to files */
|
||||
ulonglong global_cache_r_requests;/* number of read requests (read hits) */
|
||||
ulonglong global_cache_read; /* number of reads from files to cache */
|
||||
|
||||
int blocks; /* max number of blocks in the cache */
|
||||
my_bool in_init; /* Set to 1 in MySQL during init/resize */
|
||||
} KEY_CACHE;
|
||||
|
||||
|
||||
/* The default key cache */
|
||||
extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
|
||||
|
||||
extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit,
|
||||
uint age_threshold);
|
||||
uint age_threshold, uint partitions);
|
||||
extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit,
|
||||
uint age_threshold);
|
||||
@ -122,12 +182,18 @@ extern int key_cache_insert(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length);
|
||||
extern int key_cache_write(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
File file, void *file_extra,
|
||||
my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length,int force_write);
|
||||
uint block_length, int force_write);
|
||||
extern int flush_key_blocks(KEY_CACHE *keycache,
|
||||
int file, enum flush_type type);
|
||||
int file, void *file_extra,
|
||||
enum flush_type type);
|
||||
extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
|
||||
extern void get_key_cache_statistics(KEY_CACHE *keycache,
|
||||
uint partition_no,
|
||||
KEY_CACHE_STATISTICS *key_cache_stats);
|
||||
extern ulonglong get_key_cache_stat_value(KEY_CACHE *keycache, uint var_no);
|
||||
|
||||
/* Functions to handle multiple key caches */
|
||||
extern my_bool multi_keycache_init(void);
|
||||
@ -140,5 +206,11 @@ extern void multi_key_cache_change(KEY_CACHE *old_data,
|
||||
KEY_CACHE *new_data);
|
||||
extern int reset_key_cache_counters(const char *name,
|
||||
KEY_CACHE *key_cache);
|
||||
extern int repartition_key_cache(KEY_CACHE *keycache,
|
||||
uint key_cache_block_size,
|
||||
size_t use_mem,
|
||||
uint division_limit,
|
||||
uint age_threshold,
|
||||
uint partitions);
|
||||
C_MODE_END
|
||||
#endif /* _keycache_h */
|
||||
|
@ -291,7 +291,7 @@ struct charset_info_st
|
||||
const uint16 *const *sort_order_big;
|
||||
const uint16 *tab_to_uni;
|
||||
MY_UNI_IDX *tab_from_uni;
|
||||
const MY_UNICASE_INFO *const *caseinfo;
|
||||
MY_UNICASE_INFO *const *caseinfo;
|
||||
const uchar *state_map;
|
||||
const uchar *ident_map;
|
||||
uint strxfrm_multiply;
|
||||
@ -311,7 +311,9 @@ struct charset_info_st
|
||||
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
|
||||
|
||||
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin;
|
||||
extern struct charset_info_st my_charset_bin;
|
||||
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1;
|
||||
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename;
|
||||
|
||||
extern struct charset_info_st my_charset_big5_chinese_ci;
|
||||
extern struct charset_info_st my_charset_big5_bin;
|
||||
extern struct charset_info_st my_charset_cp932_japanese_ci;
|
||||
@ -324,7 +326,6 @@ extern struct charset_info_st my_charset_gb2312_chinese_ci;
|
||||
extern struct charset_info_st my_charset_gb2312_bin;
|
||||
extern struct charset_info_st my_charset_gbk_chinese_ci;
|
||||
extern struct charset_info_st my_charset_gbk_bin;
|
||||
extern struct charset_info_st my_charset_latin1;
|
||||
extern struct charset_info_st my_charset_latin1_german2_ci;
|
||||
extern struct charset_info_st my_charset_latin1_bin;
|
||||
extern struct charset_info_st my_charset_latin2_czech_ci;
|
||||
@ -341,7 +342,6 @@ extern struct charset_info_st my_charset_utf8_general_ci;
|
||||
extern struct charset_info_st my_charset_utf8_unicode_ci;
|
||||
extern struct charset_info_st my_charset_utf8_bin;
|
||||
extern struct charset_info_st my_charset_cp1250_czech_ci;
|
||||
extern struct charset_info_st my_charset_filename;
|
||||
|
||||
/* declarations for simple charsets */
|
||||
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
||||
|
@ -300,6 +300,7 @@ enum ha_base_keytype {
|
||||
*/
|
||||
#define HA_END_SPACE_ARE_EQUAL 512
|
||||
#define HA_BIT_PART 1024
|
||||
#define HA_CAN_MEMCMP 2048 /* internal, never stored in frm */
|
||||
|
||||
/* optionbits for database */
|
||||
#define HA_OPTION_PACK_RECORD 1
|
||||
@ -314,6 +315,8 @@ enum ha_base_keytype {
|
||||
#define HA_OPTION_RELIES_ON_SQL_LAYER 512
|
||||
#define HA_OPTION_NULL_FIELDS 1024
|
||||
#define HA_OPTION_PAGE_CHECKSUM 2048
|
||||
/* .frm has extra create options in linked-list format */
|
||||
#define HA_OPTION_TEXT_CREATE_OPTIONS (1L << 14)
|
||||
#define HA_OPTION_TEMP_COMPRESS_RECORD (1L << 15) /* set by isamchk */
|
||||
#define HA_OPTION_READ_ONLY_DATA (1L << 16) /* Set by isamchk */
|
||||
#define HA_OPTION_NO_CHECKSUM (1L << 17)
|
||||
|
@ -566,16 +566,20 @@ int __void__;
|
||||
#define LINT_INIT(var)
|
||||
#endif
|
||||
|
||||
#include <my_valgrind.h>
|
||||
|
||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_valgrind)
|
||||
#define VALGRIND_OR_LINT_INIT(var) var=0
|
||||
#else
|
||||
#define VALGRIND_OR_LINT_INIT(var)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_valgrind
|
||||
#define IF_VALGRIND(A,B) (A)
|
||||
#ifdef _WIN32
|
||||
#define SO_EXT ".dll"
|
||||
#elif defined(__APPLE__)
|
||||
#define SO_EXT ".dylib"
|
||||
#else
|
||||
#define IF_VALGRIND(A,B) (B)
|
||||
#define SO_EXT ".so"
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -772,7 +776,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#endif
|
||||
#define MY_NFILE 64 /* This is only used to save filenames */
|
||||
#ifndef OS_FILE_LIMIT
|
||||
#define OS_FILE_LIMIT 65535
|
||||
#define OS_FILE_LIMIT UINT_MAX
|
||||
#endif
|
||||
|
||||
/* #define EXT_IN_LIBNAME */
|
||||
@ -1514,6 +1518,9 @@ do { doubleget_union _tmp; \
|
||||
#elif defined(HAVE_DLFCN_H)
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#ifndef HAVE_DLERROR
|
||||
#define dlerror() ""
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* FreeBSD 2.2.2 does not define RTLD_NOW) */
|
||||
@ -1521,11 +1528,13 @@ do { doubleget_union _tmp; \
|
||||
#define RTLD_NOW 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DLERROR
|
||||
#define dlerror() ""
|
||||
#ifndef HAVE_DLOPEN
|
||||
#define dlerror() "No support for dynamic loading (static build?)"
|
||||
#define dlopen(A,B) 0
|
||||
#define dlsym(A,B) 0
|
||||
#define dlclose(A) 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __NETWARE__
|
||||
/*
|
||||
* Include standard definitions of operator new and delete.
|
||||
|
@ -46,6 +46,7 @@
|
||||
#define rw_wrlock(A)
|
||||
#define rw_unlock(A)
|
||||
#define rwlock_destroy(A)
|
||||
#define safe_mutex_assert_owner(mp)
|
||||
|
||||
typedef int my_pthread_once_t;
|
||||
#define MY_PTHREAD_ONCE_INIT 0
|
||||
|
@ -145,7 +145,6 @@ extern int NEAR my_errno; /* Last error in mysys */
|
||||
#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
|
||||
#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
|
||||
#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C)
|
||||
#define TRASH(A,B) bfill(A, B, 0x8F)
|
||||
#define QUICK_SAFEMALLOC sf_malloc_quick=1
|
||||
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
|
||||
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
|
||||
@ -173,7 +172,6 @@ extern char *my_strndup(const char *from, size_t length,
|
||||
#define CALLER_INFO_PROTO /* nothing */
|
||||
#define CALLER_INFO /* nothing */
|
||||
#define ORIG_CALLER_INFO /* nothing */
|
||||
#define TRASH(A,B) /* nothing */
|
||||
#endif
|
||||
|
||||
#if defined(ENABLED_DEBUG_SYNC)
|
||||
@ -208,10 +206,14 @@ extern void my_large_free(uchar * ptr, myf my_flags);
|
||||
#define alloca __builtin_alloca
|
||||
#endif /* GNUC */
|
||||
#define my_alloca(SZ) alloca((size_t) (SZ))
|
||||
#define my_afree(PTR) {}
|
||||
#define my_afree(PTR) ((void)0)
|
||||
#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
|
||||
#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? (void)0 : my_free(ptr,MYF(MY_WME)))
|
||||
#else
|
||||
#define my_alloca(SZ) my_malloc(SZ,MYF(0))
|
||||
#define my_alloca(SZ) my_malloc(SZ,MYF(MY_FAE))
|
||||
#define my_afree(PTR) my_free(PTR,MYF(MY_WME))
|
||||
#define my_safe_alloca(size, min_length) my_alloca(size)
|
||||
#define my_safe_afree(ptr, size, min_length) my_afree(ptr)
|
||||
#endif /* HAVE_ALLOCA */
|
||||
|
||||
#ifndef errno /* did we already get it? */
|
||||
@ -870,6 +872,10 @@ extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
|
||||
extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
|
||||
size_t prealloc_size);
|
||||
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
||||
static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
|
||||
{
|
||||
return str ? strdup_root(root, str) : 0;
|
||||
}
|
||||
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
|
||||
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
|
||||
extern int get_defaults_options(int argc, char **argv,
|
||||
@ -999,7 +1005,7 @@ extern my_bool resolve_charset(const char *cs_name,
|
||||
extern my_bool resolve_collation(const char *cl_name,
|
||||
CHARSET_INFO *default_cl,
|
||||
CHARSET_INFO **cl);
|
||||
|
||||
extern void free_charsets(void);
|
||||
extern char *get_charsets_dir(char *buf);
|
||||
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
|
||||
extern my_bool init_compiled_charsets(myf flags);
|
||||
|
38
include/my_valgrind.h
Normal file
38
include/my_valgrind.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* Copyright (C) 2010 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
/* Some defines to make it easier to use valgrind */
|
||||
|
||||
#ifdef HAVE_valgrind
|
||||
#define IF_VALGRIND(A,B) (A)
|
||||
#else
|
||||
#define IF_VALGRIND(A,B) (B)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_valgrind)&& defined(HAVE_VALGRIND_MEMCHECK_H)
|
||||
#include <valgrind/memcheck.h>
|
||||
#else
|
||||
#define VALGRIND_MAKE_MEM_DEFINED(addr, size) do { } while(0)
|
||||
#define VALGRIND_MAKE_MEM_NOACCESS(addr, size) do { } while(0)
|
||||
#ifdef SAFEMALLOC
|
||||
#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) bfill(addr, size, 0x8F)
|
||||
#else
|
||||
#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) do { } while(0)
|
||||
#endif /* SAFEMALLOC */
|
||||
#endif /* HAVE_valgrind */
|
||||
|
||||
/* Compatibility with old source */
|
||||
#define TRASH(A,B) VALGRIND_MAKE_MEM_UNDEFINED(A, B)
|
@ -167,9 +167,15 @@ enum mysql_option
|
||||
MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
|
||||
MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
|
||||
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
|
||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
|
||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH
|
||||
};
|
||||
|
||||
/**
|
||||
@todo remove the "extension", move st_mysql_options completely
|
||||
out of mysql.h
|
||||
*/
|
||||
struct st_mysql_options_extention;
|
||||
|
||||
struct st_mysql_options {
|
||||
unsigned int connect_timeout, read_timeout, write_timeout;
|
||||
unsigned int port, protocol;
|
||||
@ -217,7 +223,7 @@ struct st_mysql_options {
|
||||
void (*local_infile_end)(void *);
|
||||
int (*local_infile_error)(void *, char *, unsigned int);
|
||||
void *local_infile_userdata;
|
||||
void *extension;
|
||||
struct st_mysql_options_extention *extension;
|
||||
};
|
||||
|
||||
enum mysql_status
|
||||
@ -752,38 +758,6 @@ enum enum_stmt_attr_type
|
||||
};
|
||||
|
||||
|
||||
typedef struct st_mysql_methods
|
||||
{
|
||||
my_bool (*read_query_result)(MYSQL *mysql);
|
||||
my_bool (*advanced_command)(MYSQL *mysql,
|
||||
enum enum_server_command command,
|
||||
const unsigned char *header,
|
||||
unsigned long header_length,
|
||||
const unsigned char *arg,
|
||||
unsigned long arg_length,
|
||||
my_bool skip_check,
|
||||
MYSQL_STMT *stmt);
|
||||
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
|
||||
unsigned int fields);
|
||||
MYSQL_RES * (*use_result)(MYSQL *mysql);
|
||||
void (*fetch_lengths)(unsigned long *to,
|
||||
MYSQL_ROW column, unsigned int field_count);
|
||||
void (*flush_use_result)(MYSQL *mysql);
|
||||
#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
|
||||
MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
|
||||
my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
|
||||
int (*stmt_execute)(MYSQL_STMT *stmt);
|
||||
int (*read_binary_rows)(MYSQL_STMT *stmt);
|
||||
int (*unbuffered_fetch)(MYSQL *mysql, char **row);
|
||||
void (*free_embedded_thd)(MYSQL *mysql);
|
||||
const char *(*read_statistics)(MYSQL *mysql);
|
||||
my_bool (*next_result)(MYSQL *mysql);
|
||||
int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
|
||||
int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
|
||||
#endif
|
||||
} MYSQL_METHODS;
|
||||
|
||||
|
||||
MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
|
||||
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
|
||||
unsigned long length);
|
||||
@ -846,18 +820,6 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
|
||||
#endif
|
||||
#define HAVE_MYSQL_REAL_CONNECT
|
||||
|
||||
/*
|
||||
The following functions are mainly exported because of mysqlbinlog;
|
||||
They are not for general usage
|
||||
*/
|
||||
|
||||
#define simple_command(mysql, command, arg, length, skip_check) \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, skip_check, NULL)
|
||||
#define stmt_command(mysql, command, arg, length, stmt) \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, 1, stmt)
|
||||
|
||||
#ifdef __NETWARE__
|
||||
#pragma pack(pop) /* restore alignment */
|
||||
#endif
|
||||
|
@ -128,13 +128,13 @@ void create_random_string(char *to, unsigned int length,
|
||||
void hash_password(unsigned long *to, const char *password, unsigned int password_len);
|
||||
void make_scrambled_password_323(char *to, const char *password);
|
||||
void scramble_323(char *to, const char *message, const char *password);
|
||||
my_bool check_scramble_323(const char *, const char *message,
|
||||
my_bool check_scramble_323(const unsigned char *reply, const char *message,
|
||||
unsigned long *salt);
|
||||
void get_salt_from_password_323(unsigned long *res, const char *password);
|
||||
void make_password_from_salt_323(char *to, const unsigned long *salt);
|
||||
void make_scrambled_password(char *to, const char *password);
|
||||
void scramble(char *to, const char *message, const char *password);
|
||||
my_bool check_scramble(const char *reply, const char *message,
|
||||
my_bool check_scramble(const unsigned char *reply, const char *message,
|
||||
const unsigned char *hash_stage2);
|
||||
void get_salt_from_password(unsigned char *res, const char *password);
|
||||
void make_password_from_salt(char *to, const unsigned char *hash_stage2);
|
||||
@ -258,8 +258,9 @@ enum mysql_option
|
||||
MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
|
||||
MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
|
||||
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
|
||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
|
||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH
|
||||
};
|
||||
struct st_mysql_options_extention;
|
||||
struct st_mysql_options {
|
||||
unsigned int connect_timeout, read_timeout, write_timeout;
|
||||
unsigned int port, protocol;
|
||||
@ -289,7 +290,7 @@ struct st_mysql_options {
|
||||
void (*local_infile_end)(void *);
|
||||
int (*local_infile_error)(void *, char *, unsigned int);
|
||||
void *local_infile_userdata;
|
||||
void *extension;
|
||||
struct st_mysql_options_extention *extension;
|
||||
};
|
||||
enum mysql_status
|
||||
{
|
||||
@ -601,34 +602,6 @@ enum enum_stmt_attr_type
|
||||
STMT_ATTR_CURSOR_TYPE,
|
||||
STMT_ATTR_PREFETCH_ROWS
|
||||
};
|
||||
typedef struct st_mysql_methods
|
||||
{
|
||||
my_bool (*read_query_result)(MYSQL *mysql);
|
||||
my_bool (*advanced_command)(MYSQL *mysql,
|
||||
enum enum_server_command command,
|
||||
const unsigned char *header,
|
||||
unsigned long header_length,
|
||||
const unsigned char *arg,
|
||||
unsigned long arg_length,
|
||||
my_bool skip_check,
|
||||
MYSQL_STMT *stmt);
|
||||
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
|
||||
unsigned int fields);
|
||||
MYSQL_RES * (*use_result)(MYSQL *mysql);
|
||||
void (*fetch_lengths)(unsigned long *to,
|
||||
MYSQL_ROW column, unsigned int field_count);
|
||||
void (*flush_use_result)(MYSQL *mysql);
|
||||
MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
|
||||
my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
|
||||
int (*stmt_execute)(MYSQL_STMT *stmt);
|
||||
int (*read_binary_rows)(MYSQL_STMT *stmt);
|
||||
int (*unbuffered_fetch)(MYSQL *mysql, char **row);
|
||||
void (*free_embedded_thd)(MYSQL *mysql);
|
||||
const char *(*read_statistics)(MYSQL *mysql);
|
||||
my_bool (*next_result)(MYSQL *mysql);
|
||||
int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
|
||||
int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
|
||||
} MYSQL_METHODS;
|
||||
MYSQL_STMT * mysql_stmt_init(MYSQL *mysql);
|
||||
int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
|
||||
unsigned long length);
|
||||
|
164
include/mysql/client_plugin.h
Normal file
164
include/mysql/client_plugin.h
Normal file
@ -0,0 +1,164 @@
|
||||
#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED
|
||||
/* Copyright (C) 2010 Sergei Golubchik and 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file
|
||||
|
||||
MySQL Client Plugin API
|
||||
|
||||
This file defines the API for plugins that work on the client side
|
||||
*/
|
||||
#define MYSQL_CLIENT_PLUGIN_INCLUDED
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* known plugin types */
|
||||
#define MYSQL_CLIENT_reserved1 0
|
||||
#define MYSQL_CLIENT_reserved2 1
|
||||
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2
|
||||
|
||||
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0100
|
||||
|
||||
#define MYSQL_CLIENT_MAX_PLUGINS 3
|
||||
|
||||
#define mysql_declare_client_plugin(X) \
|
||||
struct st_mysql_client_plugin_ ## X \
|
||||
_mysql_client_plugin_declaration_ = { \
|
||||
MYSQL_CLIENT_ ## X ## _PLUGIN, \
|
||||
MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
|
||||
#define mysql_end_client_plugin }
|
||||
|
||||
/* generic plugin header structure */
|
||||
#define MYSQL_CLIENT_PLUGIN_HEADER \
|
||||
int type; \
|
||||
unsigned int interface_version; \
|
||||
const char *name; \
|
||||
const char *author; \
|
||||
const char *desc; \
|
||||
unsigned int version[3]; \
|
||||
int (*init)(char *, size_t, int, va_list); \
|
||||
int (*deinit)();
|
||||
|
||||
struct st_mysql_client_plugin
|
||||
{
|
||||
MYSQL_CLIENT_PLUGIN_HEADER
|
||||
};
|
||||
|
||||
struct st_mysql;
|
||||
|
||||
/******** authentication plugin specific declarations *********/
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
|
||||
struct st_mysql_client_plugin_AUTHENTICATION
|
||||
{
|
||||
MYSQL_CLIENT_PLUGIN_HEADER
|
||||
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
|
||||
};
|
||||
|
||||
/**
|
||||
type of the mysql_authentication_dialog_ask function
|
||||
|
||||
@param mysql mysql
|
||||
@param type type of the input
|
||||
1 - ordinary string input
|
||||
2 - password string
|
||||
@param prompt prompt
|
||||
@param buf a buffer to store the use input
|
||||
@param buf_len the length of the buffer
|
||||
|
||||
@retval a pointer to the user input string.
|
||||
It may be equal to 'buf' or to 'mysql->password'.
|
||||
In all other cases it is assumed to be an allocated
|
||||
string, and the "dialog" plugin will free() it.
|
||||
*/
|
||||
typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
|
||||
int type, const char *prompt, char *buf, int buf_len);
|
||||
/******** using plugins ************/
|
||||
|
||||
/**
|
||||
loads a plugin and initializes it
|
||||
|
||||
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
|
||||
and last_errno/last_error, for error reporting
|
||||
@param name a name of the plugin to load
|
||||
@param type type of plugin that should be loaded, -1 to disable type check
|
||||
@param argc number of arguments to pass to the plugin initialization
|
||||
function
|
||||
@param ... arguments for the plugin initialization function
|
||||
|
||||
@retval
|
||||
a pointer to the loaded plugin, or NULL in case of a failure
|
||||
*/
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
|
||||
int argc, ...);
|
||||
|
||||
/**
|
||||
loads a plugin and initializes it, taking va_list as an argument
|
||||
|
||||
This is the same as mysql_load_plugin, but take va_list instead of
|
||||
a list of arguments.
|
||||
|
||||
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
|
||||
and last_errno/last_error, for error reporting
|
||||
@param name a name of the plugin to load
|
||||
@param type type of plugin that should be loaded, -1 to disable type check
|
||||
@param argc number of arguments to pass to the plugin initialization
|
||||
function
|
||||
@param args arguments for the plugin initialization function
|
||||
|
||||
@retval
|
||||
a pointer to the loaded plugin, or NULL in case of a failure
|
||||
*/
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
|
||||
int argc, va_list args);
|
||||
|
||||
/**
|
||||
finds an already loaded plugin by name, or loads it, if necessary
|
||||
|
||||
@param mysql MYSQL structure. only MYSQL_PLUGIN_DIR option value is used,
|
||||
and last_errno/last_error, for error reporting
|
||||
@param name a name of the plugin to load
|
||||
@param type type of plugin that should be loaded
|
||||
|
||||
@retval
|
||||
a pointer to the plugin, or NULL in case of a failure
|
||||
*/
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
|
||||
|
||||
/**
|
||||
adds a plugin structure to the list of loaded plugins
|
||||
|
||||
This is useful if an application has the necessary functionality
|
||||
(for example, a special load data handler) statically linked into
|
||||
the application binary. It can use this function to register the plugin
|
||||
directly, avoiding the need to factor it out into a shared object.
|
||||
|
||||
@param mysql MYSQL structure. It is only used for error reporting
|
||||
@param plugin an st_mysql_client_plugin structure to register
|
||||
|
||||
@retval
|
||||
a pointer to the plugin, or NULL in case of a failure
|
||||
*/
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_client_register_plugin(struct st_mysql *mysql,
|
||||
struct st_mysql_client_plugin *plugin);
|
||||
|
||||
#endif
|
||||
|
41
include/mysql/client_plugin.h.pp
Normal file
41
include/mysql/client_plugin.h.pp
Normal file
@ -0,0 +1,41 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
struct st_mysql_client_plugin
|
||||
{
|
||||
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; int (*init)(char *, size_t, int, va_list); int (*deinit)();
|
||||
};
|
||||
struct st_mysql;
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
typedef struct st_plugin_vio_info
|
||||
{
|
||||
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
||||
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
|
||||
int socket;
|
||||
} MYSQL_PLUGIN_VIO_INFO;
|
||||
typedef struct st_plugin_vio
|
||||
{
|
||||
int (*read_packet)(struct st_plugin_vio *vio,
|
||||
unsigned char **buf);
|
||||
int (*write_packet)(struct st_plugin_vio *vio,
|
||||
const unsigned char *packet,
|
||||
int packet_len);
|
||||
void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
|
||||
} MYSQL_PLUGIN_VIO;
|
||||
struct st_mysql_client_plugin_AUTHENTICATION
|
||||
{
|
||||
int type; unsigned int interface_version; const char *name; const char *author; const char *desc; unsigned int version[3]; int (*init)(char *, size_t, int, va_list); int (*deinit)();
|
||||
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
|
||||
};
|
||||
typedef char *(*mysql_authentication_dialog_ask_t)(struct st_mysql *mysql,
|
||||
int type, const char *prompt, char *buf, int buf_len);
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_load_plugin(struct st_mysql *mysql, const char *name, int type,
|
||||
int argc, ...);
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_load_plugin_v(struct st_mysql *mysql, const char *name, int type,
|
||||
int argc, va_list args);
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_client_find_plugin(struct st_mysql *mysql, const char *name, int type);
|
||||
struct st_mysql_client_plugin *
|
||||
mysql_client_register_plugin(struct st_mysql *mysql,
|
||||
struct st_mysql_client_plugin *plugin);
|
@ -57,7 +57,10 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
Plugin API. Common for all plugin types.
|
||||
*/
|
||||
|
||||
/* MySQL plugin interface version */
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0101
|
||||
/* MariaDB plugin interface version */
|
||||
#define MARIA_PLUGIN_INTERFACE_VERSION 0x0100
|
||||
|
||||
/*
|
||||
The allowable types of plugins
|
||||
@ -67,7 +70,10 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
#define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */
|
||||
#define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */
|
||||
#define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */
|
||||
#define MYSQL_MAX_PLUGIN_TYPE_NUM 5 /* The number of plugin types */
|
||||
#define MYSQL_AUDIT_PLUGIN 5 /* The Audit plugin type */
|
||||
#define MYSQL_REPLICATION_PLUGIN 6 /* The replication plugin type */
|
||||
#define MYSQL_AUTHENTICATION_PLUGIN 7 /* The authentication plugin type */
|
||||
#define MYSQL_MAX_PLUGIN_TYPE_NUM 8 /* The number of plugin types */
|
||||
|
||||
/* We use the following strings to define licenses for plugins */
|
||||
#define PLUGIN_LICENSE_PROPRIETARY 0
|
||||
@ -78,6 +84,14 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
#define PLUGIN_LICENSE_GPL_STRING "GPL"
|
||||
#define PLUGIN_LICENSE_BSD_STRING "BSD"
|
||||
|
||||
/* definitions of code maturity for plugins */
|
||||
#define MariaDB_PLUGIN_MATURITY_UNKNOWN 0
|
||||
#define MariaDB_PLUGIN_MATURITY_EXPERIMENTAL 1
|
||||
#define MariaDB_PLUGIN_MATURITY_ALPHA 2
|
||||
#define MariaDB_PLUGIN_MATURITY_BETA 3
|
||||
#define MariaDB_PLUGIN_MATURITY_GAMMA 4
|
||||
#define MariaDB_PLUGIN_MATURITY_STABLE 5
|
||||
|
||||
/*
|
||||
Macros for beginning and ending plugin declarations. Between
|
||||
mysql_declare_plugin and mysql_declare_plugin_end there should
|
||||
@ -90,11 +104,24 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \
|
||||
int PSIZE= sizeof(struct st_mysql_plugin); \
|
||||
struct st_mysql_plugin DECLS[]= {
|
||||
|
||||
#define MARIA_DECLARE_PLUGIN__(NAME, VERSION, PSIZE, DECLS) \
|
||||
int VERSION= MARIA_PLUGIN_INTERFACE_VERSION; \
|
||||
int PSIZE= sizeof(struct st_maria_plugin); \
|
||||
struct st_maria_plugin DECLS[]= {
|
||||
|
||||
#else
|
||||
|
||||
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
|
||||
MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \
|
||||
MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \
|
||||
MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= {
|
||||
|
||||
#define MARIA_DECLARE_PLUGIN__(NAME, VERSION, PSIZE, DECLS) \
|
||||
MYSQL_PLUGIN_EXPORT int _maria_plugin_interface_version_= MARIA_PLUGIN_INTERFACE_VERSION; \
|
||||
MYSQL_PLUGIN_EXPORT int _maria_sizeof_struct_st_plugin_= sizeof(struct st_maria_plugin); \
|
||||
MYSQL_PLUGIN_EXPORT struct st_maria_plugin _maria_plugin_declarations_[]= {
|
||||
|
||||
#endif
|
||||
|
||||
#define mysql_declare_plugin(NAME) \
|
||||
@ -103,7 +130,14 @@ __MYSQL_DECLARE_PLUGIN(NAME, \
|
||||
builtin_ ## NAME ## _sizeof_struct_st_plugin, \
|
||||
builtin_ ## NAME ## _plugin)
|
||||
|
||||
#define maria_declare_plugin(NAME) \
|
||||
MARIA_DECLARE_PLUGIN__(NAME, \
|
||||
builtin_maria_ ## NAME ## _plugin_interface_version, \
|
||||
builtin_maria_ ## NAME ## _sizeof_struct_st_plugin, \
|
||||
builtin_maria_ ## NAME ## _plugin)
|
||||
|
||||
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
#define maria_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
|
||||
/*
|
||||
declarations for SHOW STATUS support in plugins
|
||||
@ -385,6 +419,29 @@ DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long long) = { \
|
||||
*/
|
||||
|
||||
struct st_mysql_plugin
|
||||
{
|
||||
int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
|
||||
void *info; /* pointer to type-specific plugin descriptor */
|
||||
const char *name; /* plugin name */
|
||||
const char *author; /* plugin author (for I_S.PLUGINS) */
|
||||
const char *descr; /* general descriptive text (for I_S.PLUGINS) */
|
||||
int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
|
||||
int (*init)(void *); /* the function to invoke when plugin is loaded */
|
||||
int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
|
||||
unsigned int version; /* plugin version (for I_S.PLUGINS) */
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1; /* reserved for dependency checking */
|
||||
};
|
||||
|
||||
/*
|
||||
MariaDB extension for plugins declaration structure.
|
||||
|
||||
It also copy current MySQL plugin fields to have more independency
|
||||
in plugins extension
|
||||
*/
|
||||
|
||||
struct st_maria_plugin
|
||||
{
|
||||
int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
|
||||
void *info; /* pointer to type-specific plugin descriptor */
|
||||
@ -397,7 +454,8 @@ struct st_mysql_plugin
|
||||
unsigned int version; /* plugin version (for SHOW PLUGINS) */
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1; /* reserved for dependency checking */
|
||||
const char *version_info; /* plugin version string */
|
||||
int maturity; /* MariaDB_PLUGIN_MATURITY_XXX */
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
@ -752,30 +810,37 @@ void mysql_query_cache_invalidate4(MYSQL_THD thd,
|
||||
const char *key, unsigned int key_length,
|
||||
int using_trx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
/**
|
||||
Provide a handler data getter to simplify coding
|
||||
*/
|
||||
inline
|
||||
void *
|
||||
thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton)
|
||||
{
|
||||
return *thd_ha_data(thd, hton);
|
||||
}
|
||||
void *thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
|
||||
|
||||
|
||||
/**
|
||||
Provide a handler data setter to simplify coding
|
||||
|
||||
@details
|
||||
Set ha_data pointer (storage engine per-connection information).
|
||||
|
||||
To avoid unclean deactivation (uninstall) of storage engine plugin
|
||||
in the middle of transaction, additional storage engine plugin
|
||||
lock is acquired.
|
||||
|
||||
If ha_data is not null and storage engine plugin was not locked
|
||||
by thd_set_ha_data() in this connection before, storage engine
|
||||
plugin gets locked.
|
||||
|
||||
If ha_data is null and storage engine plugin was locked by
|
||||
thd_set_ha_data() in this connection before, storage engine
|
||||
plugin lock gets released.
|
||||
|
||||
If handlerton::close_connection() didn't reset ha_data, server does
|
||||
it immediately after calling handlerton::close_connection().
|
||||
*/
|
||||
inline
|
||||
void
|
||||
thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton,
|
||||
const void *ha_data)
|
||||
{
|
||||
*thd_ha_data(thd, hton)= (void*) ha_data;
|
||||
void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton,
|
||||
const void *ha_data);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
83
include/mysql/plugin_auth.h
Normal file
83
include/mysql/plugin_auth.h
Normal file
@ -0,0 +1,83 @@
|
||||
#ifndef MYSQL_PLUGIN_AUTH_INCLUDED
|
||||
/* Copyright (C) 2010 Sergei Golubchik and 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file
|
||||
|
||||
Authentication Plugin API.
|
||||
|
||||
This file defines the API for server authentication plugins.
|
||||
*/
|
||||
|
||||
#define MYSQL_PLUGIN_AUTH_INCLUDED
|
||||
|
||||
#include <mysql/plugin.h>
|
||||
|
||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0100
|
||||
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
|
||||
/**
|
||||
Provides server plugin access to authentication information
|
||||
*/
|
||||
typedef struct st_mysql_server_auth_info
|
||||
{
|
||||
/**
|
||||
User name as sent by the client and shown in USER().
|
||||
NULL if the client packet with the user name was not received yet.
|
||||
*/
|
||||
const char *user_name;
|
||||
/**
|
||||
A corresponding column value from the mysql.user table for the
|
||||
matching account name
|
||||
*/
|
||||
const char *auth_string;
|
||||
|
||||
/**
|
||||
Matching account name as found in the mysql.user table.
|
||||
A plugin can override it with another name that will be
|
||||
used by MySQL for authorization, and shown in CURRENT_USER()
|
||||
*/
|
||||
char authenticated_as[MYSQL_USERNAME_LENGTH+1];
|
||||
/**
|
||||
This only affects the "Authentication failed. Password used: %s"
|
||||
error message. If set, %s will be YES, otherwise - NO.
|
||||
Set it as appropriate or ignore at will.
|
||||
*/
|
||||
int password_used;
|
||||
} MYSQL_SERVER_AUTH_INFO;
|
||||
|
||||
/**
|
||||
Server authentication plugin descriptor
|
||||
*/
|
||||
struct st_mysql_auth
|
||||
{
|
||||
int interface_version; /**< version plugin uses */
|
||||
/**
|
||||
A plugin that a client must use for authentication with this server
|
||||
plugin. Can be NULL to mean "any plugin".
|
||||
*/
|
||||
const char *client_auth_plugin;
|
||||
/**
|
||||
Function provided by the plugin which should perform authentication (using
|
||||
the vio functions if necessary) and return 0 if successful. The plugin can
|
||||
also fill the info.authenticated_as field if a different username should be
|
||||
used for authorization.
|
||||
*/
|
||||
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
|
||||
};
|
||||
#endif
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <mysql/plugin.h>
|
||||
#include <mysql/services.h>
|
||||
#include <mysql/service_my_snprintf.h>
|
||||
#include <stdarg.h>
|
||||
@ -76,6 +77,22 @@ struct st_mysql_plugin
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
};
|
||||
struct st_maria_plugin
|
||||
{
|
||||
int type;
|
||||
void *info;
|
||||
const char *name;
|
||||
const char *author;
|
||||
const char *descr;
|
||||
int license;
|
||||
int (*init)(void *);
|
||||
int (*deinit)(void *);
|
||||
unsigned int version;
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
const char *version_info;
|
||||
int maturity;
|
||||
};
|
||||
enum enum_ftparser_mode
|
||||
{
|
||||
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
||||
@ -161,3 +178,35 @@ void thd_get_xid(const void* thd, MYSQL_XID *xid);
|
||||
void mysql_query_cache_invalidate4(void* thd,
|
||||
const char *key, unsigned int key_length,
|
||||
int using_trx);
|
||||
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
|
||||
void thd_set_ha_data(void* thd, const struct handlerton *hton,
|
||||
const void *ha_data);
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
typedef struct st_plugin_vio_info
|
||||
{
|
||||
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
||||
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
|
||||
int socket;
|
||||
} MYSQL_PLUGIN_VIO_INFO;
|
||||
typedef struct st_plugin_vio
|
||||
{
|
||||
int (*read_packet)(struct st_plugin_vio *vio,
|
||||
unsigned char **buf);
|
||||
int (*write_packet)(struct st_plugin_vio *vio,
|
||||
const unsigned char *packet,
|
||||
int packet_len);
|
||||
void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
|
||||
} MYSQL_PLUGIN_VIO;
|
||||
typedef struct st_mysql_server_auth_info
|
||||
{
|
||||
const char *user_name;
|
||||
const char *auth_string;
|
||||
char authenticated_as[48 +1];
|
||||
int password_used;
|
||||
} MYSQL_SERVER_AUTH_INFO;
|
||||
struct st_mysql_auth
|
||||
{
|
||||
int interface_version;
|
||||
const char *client_auth_plugin;
|
||||
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info);
|
||||
};
|
105
include/mysql/plugin_auth_common.h
Normal file
105
include/mysql/plugin_auth_common.h
Normal file
@ -0,0 +1,105 @@
|
||||
#ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
|
||||
/* Copyright (C) 2010 Sergei Golubchik and 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file
|
||||
|
||||
This file defines constants and data structures that are the same for
|
||||
both client- and server-side authentication plugins.
|
||||
*/
|
||||
#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
|
||||
|
||||
/** the max allowed length for a user name */
|
||||
#define MYSQL_USERNAME_LENGTH 48
|
||||
|
||||
/**
|
||||
return values of the plugin authenticate_user() method.
|
||||
*/
|
||||
|
||||
/**
|
||||
Authentication failed. Additionally, all other CR_xxx values
|
||||
(libmysql error code) can be used too.
|
||||
|
||||
The client plugin may set the error code and the error message directly
|
||||
in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
|
||||
code was returned, an error message in the MYSQL structure will be
|
||||
overwritten. If CR_ERROR is returned without setting the error in MYSQL,
|
||||
CR_UNKNOWN_ERROR will be user.
|
||||
*/
|
||||
#define CR_ERROR 0
|
||||
/**
|
||||
Authentication (client part) was successful. It does not mean that the
|
||||
authentication as a whole was successful, usually it only means
|
||||
that the client was able to send the user name and the password to the
|
||||
server. If CR_OK is returned, the libmysql reads the next packet expecting
|
||||
it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
|
||||
*/
|
||||
#define CR_OK -1
|
||||
/**
|
||||
Authentication was successful.
|
||||
It means that the client has done its part successfully and also that
|
||||
a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
|
||||
In this case, libmysql will not read a packet from the server,
|
||||
but it will use the data at mysql->net.read_pos.
|
||||
|
||||
A plugin may return this value if the number of roundtrips in the
|
||||
authentication protocol is not known in advance, and the client plugin
|
||||
needs to read one packet more to determine if the authentication is finished
|
||||
or not.
|
||||
*/
|
||||
#define CR_OK_HANDSHAKE_COMPLETE -2
|
||||
|
||||
typedef struct st_plugin_vio_info
|
||||
{
|
||||
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
||||
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
|
||||
int socket; /**< it's set, if the protocol is SOCKET or TCP */
|
||||
#ifdef _WIN32
|
||||
HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */
|
||||
#endif
|
||||
} MYSQL_PLUGIN_VIO_INFO;
|
||||
|
||||
/**
|
||||
Provides plugin access to communication channel
|
||||
*/
|
||||
typedef struct st_plugin_vio
|
||||
{
|
||||
/**
|
||||
Plugin provides a pointer reference and this function sets it to the
|
||||
contents of any incoming packet. Returns the packet length, or -1 if
|
||||
the plugin should terminate.
|
||||
*/
|
||||
int (*read_packet)(struct st_plugin_vio *vio,
|
||||
unsigned char **buf);
|
||||
|
||||
/**
|
||||
Plugin provides a buffer with data and the length and this
|
||||
function sends it as a packet. Returns 0 on success, 1 on failure.
|
||||
*/
|
||||
int (*write_packet)(struct st_plugin_vio *vio,
|
||||
const unsigned char *packet,
|
||||
int packet_len);
|
||||
|
||||
/**
|
||||
Fills in a st_plugin_vio_info structure, providing the information
|
||||
about the connection.
|
||||
*/
|
||||
void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
|
||||
|
||||
} MYSQL_PLUGIN_VIO;
|
||||
|
||||
#endif
|
||||
|
@ -152,9 +152,17 @@ enum enum_server_command
|
||||
#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
|
||||
#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
|
||||
|
||||
#define CLIENT_PLUGIN_AUTH (1UL << 19) /* Client supports plugin authentication */
|
||||
|
||||
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
|
||||
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
|
||||
|
||||
#ifdef HAVE_COMPRESS
|
||||
#define CAN_CLIENT_COMPRESS CLIENT_COMPRESS
|
||||
#else
|
||||
#define CAN_CLIENT_COMPRESS 0
|
||||
#endif
|
||||
|
||||
/* Gather all possible capabilites (flags) supported by the server */
|
||||
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
|
||||
CLIENT_FOUND_ROWS | \
|
||||
@ -175,7 +183,8 @@ enum enum_server_command
|
||||
CLIENT_MULTI_STATEMENTS | \
|
||||
CLIENT_MULTI_RESULTS | \
|
||||
CLIENT_SSL_VERIFY_SERVER_CERT | \
|
||||
CLIENT_REMEMBER_OPTIONS)
|
||||
CLIENT_REMEMBER_OPTIONS | \
|
||||
CLIENT_PLUGIN_AUTH)
|
||||
|
||||
/*
|
||||
Switch off the flags that are optional and depending on build flags
|
||||
@ -488,14 +497,14 @@ void create_random_string(char *to, unsigned int length,
|
||||
void hash_password(unsigned long *to, const char *password, unsigned int password_len);
|
||||
void make_scrambled_password_323(char *to, const char *password);
|
||||
void scramble_323(char *to, const char *message, const char *password);
|
||||
my_bool check_scramble_323(const char *, const char *message,
|
||||
my_bool check_scramble_323(const unsigned char *reply, const char *message,
|
||||
unsigned long *salt);
|
||||
void get_salt_from_password_323(unsigned long *res, const char *password);
|
||||
void make_password_from_salt_323(char *to, const unsigned long *salt);
|
||||
|
||||
void make_scrambled_password(char *to, const char *password);
|
||||
void scramble(char *to, const char *message, const char *password);
|
||||
my_bool check_scramble(const char *reply, const char *message,
|
||||
my_bool check_scramble(const unsigned char *reply, const char *message,
|
||||
const unsigned char *hash_stage2);
|
||||
void get_salt_from_password(unsigned char *res, const char *password);
|
||||
void make_password_from_salt(char *to, const unsigned char *hash_stage2);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#ifndef SQL_COMMON_INCLUDED
|
||||
/* Copyright (C) 2003-2004, 2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -13,14 +14,60 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#define SQL_COMMON_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <mysql.h>
|
||||
|
||||
extern const char *unknown_sqlstate;
|
||||
extern const char *cant_connect_sqlstate;
|
||||
extern const char *not_error_sqlstate;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
struct st_mysql_options_extention {
|
||||
char *plugin_dir;
|
||||
char *default_auth;
|
||||
};
|
||||
|
||||
typedef struct st_mysql_methods
|
||||
{
|
||||
my_bool (*read_query_result)(MYSQL *mysql);
|
||||
my_bool (*advanced_command)(MYSQL *mysql,
|
||||
enum enum_server_command command,
|
||||
const unsigned char *header,
|
||||
unsigned long header_length,
|
||||
const unsigned char *arg,
|
||||
unsigned long arg_length,
|
||||
my_bool skip_check,
|
||||
MYSQL_STMT *stmt);
|
||||
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
|
||||
unsigned int fields);
|
||||
MYSQL_RES * (*use_result)(MYSQL *mysql);
|
||||
void (*fetch_lengths)(unsigned long *to,
|
||||
MYSQL_ROW column, unsigned int field_count);
|
||||
void (*flush_use_result)(MYSQL *mysql);
|
||||
int (*read_change_user_result)(MYSQL *mysql);
|
||||
#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
|
||||
MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
|
||||
my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
|
||||
int (*stmt_execute)(MYSQL_STMT *stmt);
|
||||
int (*read_binary_rows)(MYSQL_STMT *stmt);
|
||||
int (*unbuffered_fetch)(MYSQL *mysql, char **row);
|
||||
void (*free_embedded_thd)(MYSQL *mysql);
|
||||
const char *(*read_statistics)(MYSQL *mysql);
|
||||
my_bool (*next_result)(MYSQL *mysql);
|
||||
int (*read_rows_from_cursor)(MYSQL_STMT *stmt);
|
||||
#endif
|
||||
} MYSQL_METHODS;
|
||||
|
||||
#define simple_command(mysql, command, arg, length, skip_check) \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, skip_check, NULL)
|
||||
#define stmt_command(mysql, command, arg, length, stmt) \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, 1, stmt)
|
||||
|
||||
extern CHARSET_INFO *default_client_charset_info;
|
||||
MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
|
||||
@ -42,9 +89,23 @@ void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net);
|
||||
void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
|
||||
const char *err);
|
||||
void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
|
||||
void set_mysql_extended_error(MYSQL *mysql, int errcode, const char *sqlstate,
|
||||
const char *format, ...);
|
||||
|
||||
/* client side of the pluggable authentication */
|
||||
struct st_plugin_vio_info;
|
||||
void mpvio_info(Vio *vio, struct st_plugin_vio_info *info);
|
||||
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
|
||||
const char *data_plugin, const char *db);
|
||||
int mysql_client_plugin_init();
|
||||
void mysql_client_plugin_deinit();
|
||||
struct st_mysql_client_plugin;
|
||||
extern struct st_mysql_client_plugin *mysql_client_builtins[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41)
|
||||
|
||||
#endif
|
||||
|
@ -98,7 +98,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
|
||||
../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c
|
||||
../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c
|
||||
../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c ../mysys/mf_qsort.c
|
||||
../mysys/my_getsystime.c ../mysys/my_sync.c ${LIB_SOURCES})
|
||||
../mysys/my_getsystime.c ../mysys/my_sync.c ../sql-common/client_plugin.c ${LIB_SOURCES})
|
||||
|
||||
# Need to set USE_TLS for building the DLL, since __declspec(thread)
|
||||
# approach to thread local storage does not work properly in DLLs.
|
||||
@ -125,6 +125,7 @@ IF(WIN32)
|
||||
ENDIF(WIN32)
|
||||
ADD_DEPENDENCIES(libmysql GenError)
|
||||
TARGET_LINK_LIBRARIES(libmysql wsock32)
|
||||
ADD_DEFINITIONS(-DHAVE_DLOPEN)
|
||||
|
||||
IF(EMBED_MANIFESTS)
|
||||
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
|
||||
|
@ -23,6 +23,7 @@
|
||||
MYSQLDATAdir = $(localstatedir)
|
||||
MYSQLSHAREdir = $(pkgdatadir)
|
||||
MYSQLBASEdir= $(prefix)
|
||||
pkgplugindir = $(pkglibdir)/plugin
|
||||
## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
|
||||
## until someone complains that they need separate options.
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target)
|
||||
@ -71,26 +72,27 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
|
||||
my_getopt.lo my_gethostbyname.lo my_port.lo \
|
||||
my_rename.lo my_chsize.lo my_sync.lo my_getsystime.lo
|
||||
sqlobjects = net.lo
|
||||
sql_cmn_objects = pack.lo client.lo my_time.lo
|
||||
sql_cmn_objects = pack.lo client.lo my_time.lo client_plugin.lo
|
||||
|
||||
# Not needed in the minimum library
|
||||
mysysobjects2 = my_lib.lo mf_qsort.lo
|
||||
mysysobjects = $(mysysobjects1) $(mysysobjects2)
|
||||
target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \
|
||||
$(sql_cmn_objects) $(vio_objects) $(sqlobjects)
|
||||
target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@
|
||||
target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@ @LIBDL@
|
||||
vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo
|
||||
|
||||
BUILT_SOURCES = link_sources
|
||||
|
||||
CLEANFILES = $(target_libadd) $(SHLIBOBJS) \
|
||||
$(target) $(BUILT_SOURCES)
|
||||
DEFS = -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
|
||||
-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
|
||||
DEFS = -DDEFAULT_CHARSET_HOME='"$(MYSQLBASEdir)"' \
|
||||
-DMYSQL_DATADIR='"$(MYSQLDATAdir)"' \
|
||||
-DDEFAULT_HOME_ENV=MYSQL_HOME \
|
||||
-DPLUGINDIR='"$(pkgplugindir)"' \
|
||||
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
|
||||
-DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \
|
||||
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" $(target_defs)
|
||||
-DDEFAULT_SYSCONFDIR='"$(sysconfdir)"' \
|
||||
-DSHAREDIR='"$(MYSQLSHAREdir)"' $(target_defs)
|
||||
|
||||
if HAVE_YASSL
|
||||
yassl_las = $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
|
@ -18,7 +18,8 @@ extern char * mysql_unix_port;
|
||||
|
||||
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \
|
||||
CLIENT_TRANSACTIONS | \
|
||||
CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION)
|
||||
CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION | \
|
||||
CLIENT_PLUGIN_AUTH)
|
||||
|
||||
sig_handler my_pipe_sig_handler(int sig);
|
||||
void read_user_name(char *name);
|
||||
@ -57,7 +58,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt);
|
||||
int cli_read_binary_rows(MYSQL_STMT *stmt);
|
||||
int cli_unbuffered_fetch(MYSQL *mysql, char **row);
|
||||
const char * cli_read_statistics(MYSQL *mysql);
|
||||
int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd);
|
||||
int cli_read_change_user_result(MYSQL *mysql);
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
int init_embedded_server(int argc, char **argv, char **groups);
|
||||
|
@ -85,6 +85,7 @@ const char *client_errors[]=
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
"The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
|
||||
"Authentication plugin '%s' cannot be loaded: %s",
|
||||
""
|
||||
};
|
||||
|
||||
@ -151,6 +152,7 @@ const char *client_errors[]=
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
"The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
|
||||
"Authentication plugin '%s' cannot be loaded: %s",
|
||||
""
|
||||
};
|
||||
|
||||
@ -215,6 +217,7 @@ const char *client_errors[]=
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
"The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
|
||||
"Authentication plugin '%s' cannot be loaded: %s",
|
||||
""
|
||||
};
|
||||
#endif
|
||||
|
@ -126,12 +126,13 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
||||
if (my_init()) /* Will init threads */
|
||||
return 1;
|
||||
init_client_errs();
|
||||
if (mysql_client_plugin_init())
|
||||
return 1;
|
||||
if (!mysql_port)
|
||||
{
|
||||
mysql_port = MYSQL_PORT;
|
||||
#ifndef MSDOS
|
||||
{
|
||||
struct servent *serv_ptr;
|
||||
char *env;
|
||||
|
||||
/*
|
||||
@ -145,6 +146,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
||||
*/
|
||||
|
||||
#if MYSQL_PORT_DEFAULT == 0
|
||||
struct servent *serv_ptr;
|
||||
if ((serv_ptr = getservbyname("mysql", "tcp")))
|
||||
mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
|
||||
#endif
|
||||
@ -198,6 +200,8 @@ void STDCALL mysql_server_end()
|
||||
if (!mysql_client_init)
|
||||
return;
|
||||
|
||||
mysql_client_plugin_deinit();
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
end_embedded_server();
|
||||
#endif
|
||||
@ -211,6 +215,7 @@ void STDCALL mysql_server_end()
|
||||
}
|
||||
else
|
||||
{
|
||||
free_charsets();
|
||||
mysql_thread_end();
|
||||
}
|
||||
|
||||
@ -662,44 +667,14 @@ mysql_connect(MYSQL *mysql,const char *host,
|
||||
Change user and database
|
||||
**************************************************************************/
|
||||
|
||||
int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd)
|
||||
{
|
||||
NET *net= &mysql->net;
|
||||
ulong pkt_length;
|
||||
|
||||
pkt_length= cli_safe_read(mysql);
|
||||
|
||||
if (pkt_length == packet_error)
|
||||
return 1;
|
||||
|
||||
if (pkt_length == 1 && net->read_pos[0] == 254 &&
|
||||
mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
|
||||
{
|
||||
/*
|
||||
By sending this very specific reply server asks us to send scrambled
|
||||
password in old format. The reply contains scramble_323.
|
||||
*/
|
||||
scramble_323(buff, mysql->scramble, passwd);
|
||||
if (my_net_write(net, (uchar*) buff, SCRAMBLE_LENGTH_323 + 1) ||
|
||||
net_flush(net))
|
||||
{
|
||||
set_mysql_error(mysql, CR_SERVER_LOST, unknown_sqlstate);
|
||||
return 1;
|
||||
}
|
||||
/* Read what server thinks about out new auth message report */
|
||||
if (cli_safe_read(mysql) == packet_error)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
|
||||
const char *passwd, const char *db)
|
||||
{
|
||||
char buff[USERNAME_LENGTH+SCRAMBLED_PASSWORD_CHAR_LENGTH+NAME_LEN+2];
|
||||
char *end= buff;
|
||||
int rc;
|
||||
CHARSET_INFO *saved_cs= mysql->charset;
|
||||
char *saved_user= mysql->user;
|
||||
char *saved_passwd= mysql->passwd;
|
||||
char *saved_db= mysql->db;
|
||||
|
||||
DBUG_ENTER("mysql_change_user");
|
||||
|
||||
@ -713,49 +688,11 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
|
||||
|
||||
/* Use an empty string instead of NULL. */
|
||||
|
||||
if (!user)
|
||||
user="";
|
||||
if (!passwd)
|
||||
passwd="";
|
||||
mysql->user= (char*)(user ? user : "");
|
||||
mysql->passwd= (char*)(passwd ? passwd : "");
|
||||
mysql->db= 0;
|
||||
|
||||
/*
|
||||
Store user into the buffer.
|
||||
Advance position as strmake returns a pointer to the closing NUL.
|
||||
*/
|
||||
end= strmake(end, user, USERNAME_LENGTH) + 1;
|
||||
|
||||
/* write scrambled password according to server capabilities */
|
||||
if (passwd[0])
|
||||
{
|
||||
if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
|
||||
{
|
||||
*end++= SCRAMBLE_LENGTH;
|
||||
scramble(end, mysql->scramble, passwd);
|
||||
end+= SCRAMBLE_LENGTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
scramble_323(end, mysql->scramble, passwd);
|
||||
end+= SCRAMBLE_LENGTH_323 + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
*end++= '\0'; /* empty password */
|
||||
/* Add database if needed */
|
||||
end= strmake(end, db ? db : "", NAME_LEN) + 1;
|
||||
|
||||
/* Add character set number. */
|
||||
|
||||
if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
|
||||
{
|
||||
int2store(end, (ushort) mysql->charset->number);
|
||||
end+= 2;
|
||||
}
|
||||
|
||||
/* Write authentication package */
|
||||
simple_command(mysql,COM_CHANGE_USER, (uchar*) buff, (ulong) (end-buff), 1);
|
||||
|
||||
rc= (*mysql->methods->read_change_user_result)(mysql, buff, passwd);
|
||||
rc= run_plugin_auth(mysql, 0, 0, 0, db);
|
||||
|
||||
/*
|
||||
The server will close all statements no matter was the attempt
|
||||
@ -765,18 +702,21 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
|
||||
if (rc == 0)
|
||||
{
|
||||
/* Free old connect information */
|
||||
my_free(mysql->user,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->passwd,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(mysql->db,MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(saved_user, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(saved_passwd, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(saved_db, MYF(MY_ALLOW_ZERO_PTR));
|
||||
|
||||
/* alloc new connect information */
|
||||
mysql->user= my_strdup(user,MYF(MY_WME));
|
||||
mysql->passwd=my_strdup(passwd,MYF(MY_WME));
|
||||
mysql->db= db ? my_strdup(db,MYF(MY_WME)) : 0;
|
||||
mysql->user= my_strdup(mysql->user, MYF(MY_WME));
|
||||
mysql->passwd= my_strdup(mysql->passwd, MYF(MY_WME));
|
||||
mysql->db= db ? my_strdup(db, MYF(MY_WME)) : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
mysql->charset= saved_cs;
|
||||
mysql->user= saved_user;
|
||||
mysql->passwd= saved_passwd;
|
||||
mysql->db= saved_db;
|
||||
}
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
|
@ -104,7 +104,7 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
||||
../sql-common/client.c ../sql-common/my_time.c
|
||||
../sql-common/my_user.c ../sql-common/pack.c
|
||||
../sql/password.c ../sql/discover.cc ../sql/derror.cc
|
||||
../sql/field.cc ../sql/field_conv.cc
|
||||
../sql/field.cc ../sql/field_conv.cc ../sql-common/client_plugin.c
|
||||
../sql/filesort.cc ../sql/gstream.cc ../sql/ha_partition.cc
|
||||
../sql/handler.cc ../sql/hash_filo.cc ../sql/hostname.cc
|
||||
../sql/init.cc ../sql/item_buff.cc ../sql/item_cmpfunc.cc
|
||||
@ -140,8 +140,9 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
||||
../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
|
||||
../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
|
||||
../sql/partition_info.cc ../sql/sql_connect.cc
|
||||
../sql/scheduler.cc ../sql/event_parse_data.cc
|
||||
../sql/ds_mrr.cc
|
||||
../sql/scheduler.cc ../sql/event_parse_data.cc
|
||||
../sql/multi_range_read.cc
|
||||
../sql/create_options.cc
|
||||
${GEN_SOURCES}
|
||||
${LIB_SOURCES})
|
||||
|
||||
|
@ -25,10 +25,10 @@ pkgplugindir = $(pkglibdir)/plugin
|
||||
|
||||
EXTRA_DIST = libmysqld.def CMakeLists.txt
|
||||
DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
|
||||
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
|
||||
-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
|
||||
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
|
||||
-DPLUGINDIR="\"$(pkgplugindir)\""
|
||||
-DDEFAULT_MYSQL_HOME='"$(MYSQLBASEdir)"' \
|
||||
-DMYSQL_DATADIR='"$(MYSQLDATAdir)"' \
|
||||
-DSHAREDIR='"$(MYSQLSHAREdir)"' \
|
||||
-DPLUGINDIR='"$(pkgplugindir)"'
|
||||
INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/sql -I$(top_srcdir)/sql \
|
||||
-I$(top_srcdir)/sql/examples \
|
||||
@ -41,7 +41,7 @@ pkglib_LIBRARIES = libmysqld.a
|
||||
SUBDIRS = . examples
|
||||
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
|
||||
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
|
||||
my_time.c
|
||||
my_time.c client_plugin.c
|
||||
|
||||
noinst_HEADERS = embedded_priv.h emb_qcache.h
|
||||
|
||||
@ -77,7 +77,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
||||
parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
|
||||
rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \
|
||||
debug_sync.cc \
|
||||
sql_tablespace.cc \
|
||||
sql_tablespace.cc create_options.cc \
|
||||
rpl_injector.cc my_user.c partition_info.cc \
|
||||
sql_servers.cc event_parse_data.cc opt_table_elimination.cc \
|
||||
multi_range_read.cc opt_index_cond_pushdown.cc
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
/* Prototypes for the embedded version of MySQL */
|
||||
|
||||
#include <sql_common.h>
|
||||
|
||||
C_MODE_START
|
||||
void lib_connection_phase(NET *net, int phase);
|
||||
void init_embedded_mysql(MYSQL *mysql, int client_flag);
|
||||
|
@ -35,7 +35,6 @@ C_MODE_START
|
||||
#include <mysql.h>
|
||||
#undef ER
|
||||
#include "errmsg.h"
|
||||
#include <sql_common.h>
|
||||
#include "embedded_priv.h"
|
||||
|
||||
extern unsigned int mysql_server_last_errno;
|
||||
@ -413,11 +412,10 @@ static MYSQL_RES * emb_store_result(MYSQL *mysql)
|
||||
return mysql_store_result(mysql);
|
||||
}
|
||||
|
||||
int emb_read_change_user_result(MYSQL *mysql,
|
||||
char *buff __attribute__((unused)),
|
||||
const char *passwd __attribute__((unused)))
|
||||
int emb_read_change_user_result(MYSQL *mysql)
|
||||
{
|
||||
return mysql_errno(mysql);
|
||||
mysql->net.read_pos= (uchar*)""; // fake an OK packet
|
||||
return mysql_errno(mysql) ? packet_error : 1 /* length of the OK packet */;
|
||||
}
|
||||
|
||||
MYSQL_METHODS embedded_methods=
|
||||
@ -428,6 +426,7 @@ MYSQL_METHODS embedded_methods=
|
||||
emb_store_result,
|
||||
emb_fetch_lengths,
|
||||
emb_flush_use_result,
|
||||
emb_read_change_user_result,
|
||||
emb_list_fields,
|
||||
emb_read_prepare_result,
|
||||
emb_stmt_execute,
|
||||
@ -436,7 +435,6 @@ MYSQL_METHODS embedded_methods=
|
||||
emb_free_embedded_thd,
|
||||
emb_read_statistics,
|
||||
emb_read_query_result,
|
||||
emb_read_change_user_result,
|
||||
emb_read_rows_from_cursor
|
||||
};
|
||||
|
||||
@ -584,6 +582,8 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
|
||||
THD *thd = (THD *)mysql->thd;
|
||||
thd->mysql= mysql;
|
||||
mysql->server_version= server_version;
|
||||
mysql->client_flag= client_flag;
|
||||
mysql->server_capabilities= client_flag;
|
||||
init_alloc_root(&mysql->field_alloc, 8192, 0);
|
||||
}
|
||||
|
||||
@ -648,14 +648,19 @@ err:
|
||||
int check_embedded_connection(MYSQL *mysql, const char *db)
|
||||
{
|
||||
int result;
|
||||
LEX_STRING db_str = { (char*)db, db ? strlen(db) : 0 };
|
||||
THD *thd= (THD*)mysql->thd;
|
||||
thd_init_client_charset(thd, mysql->charset->number);
|
||||
thd->update_charset();
|
||||
Security_context *sctx= thd->security_ctx;
|
||||
sctx->host_or_ip= sctx->host= (char*) my_localhost;
|
||||
strmake(sctx->priv_host, (char*) my_localhost, MAX_HOSTNAME-1);
|
||||
sctx->priv_user= sctx->user= my_strdup(mysql->user, MYF(0));
|
||||
result= check_user(thd, COM_CONNECT, NULL, 0, db, true);
|
||||
strmake(sctx->priv_user, mysql->user, USERNAME_LENGTH-1);
|
||||
sctx->user= my_strdup(mysql->user, MYF(0));
|
||||
sctx->master_access= GLOBAL_ACLS; // Full rights
|
||||
/* Change database if necessary */
|
||||
if (!(result= (db && db[0] && mysql_change_db(thd, &db_str, FALSE))))
|
||||
my_ok(thd);
|
||||
net_end_statement(thd);
|
||||
emb_read_query_result(mysql);
|
||||
return result;
|
||||
@ -664,14 +669,15 @@ int check_embedded_connection(MYSQL *mysql, const char *db)
|
||||
#else
|
||||
int check_embedded_connection(MYSQL *mysql, const char *db)
|
||||
{
|
||||
/*
|
||||
we emulate a COM_CHANGE_USER user here,
|
||||
it's easier than to emulate the complete 3-way handshake
|
||||
*/
|
||||
char buf[USERNAME_LENGTH + SCRAMBLE_LENGTH + 1 + 2*NAME_LEN + 2], *end;
|
||||
NET *net= &mysql->net;
|
||||
THD *thd= (THD*)mysql->thd;
|
||||
Security_context *sctx= thd->security_ctx;
|
||||
int result;
|
||||
char scramble_buff[SCRAMBLE_LENGTH];
|
||||
int passwd_len;
|
||||
|
||||
thd_init_client_charset(thd, mysql->charset->number);
|
||||
thd->update_charset();
|
||||
if (mysql->options.client_ip)
|
||||
{
|
||||
sctx->host= my_strdup(mysql->options.client_ip, MYF(0));
|
||||
@ -682,36 +688,45 @@ int check_embedded_connection(MYSQL *mysql, const char *db)
|
||||
sctx->host_or_ip= sctx->host;
|
||||
|
||||
if (acl_check_host(sctx->host, sctx->ip))
|
||||
{
|
||||
result= ER_HOST_NOT_PRIVILEGED;
|
||||
goto err;
|
||||
}
|
||||
|
||||
sctx->user= my_strdup(mysql->user, MYF(0));
|
||||
/* construct a COM_CHANGE_USER packet */
|
||||
end= strmake(buf, mysql->user, USERNAME_LENGTH) + 1;
|
||||
|
||||
memset(thd->scramble, 55, SCRAMBLE_LENGTH); // dummy scramble
|
||||
thd->scramble[SCRAMBLE_LENGTH]= 0;
|
||||
strcpy(mysql->scramble, thd->scramble);
|
||||
|
||||
if (mysql->passwd && mysql->passwd[0])
|
||||
{
|
||||
memset(thd->scramble, 55, SCRAMBLE_LENGTH); // dummy scramble
|
||||
thd->scramble[SCRAMBLE_LENGTH]= 0;
|
||||
scramble(scramble_buff, thd->scramble, mysql->passwd);
|
||||
passwd_len= SCRAMBLE_LENGTH;
|
||||
*end++= SCRAMBLE_LENGTH;
|
||||
scramble(end, thd->scramble, mysql->passwd);
|
||||
end+= SCRAMBLE_LENGTH;
|
||||
}
|
||||
else
|
||||
passwd_len= 0;
|
||||
*end++= 0;
|
||||
|
||||
if((result= check_user(thd, COM_CONNECT,
|
||||
scramble_buff, passwd_len, db, true)))
|
||||
goto err;
|
||||
end= strmake(end, db ? db : "", NAME_LEN) + 1;
|
||||
|
||||
return 0;
|
||||
err:
|
||||
int2store(end, (ushort) mysql->charset->number);
|
||||
end+= 2;
|
||||
|
||||
/* acl_authenticate() takes the data from thd->net->read_pos */
|
||||
thd->net.read_pos= (uchar*)buf;
|
||||
|
||||
if (acl_authenticate(thd, 0, end - buf))
|
||||
{
|
||||
NET *net= &mysql->net;
|
||||
strmake(net->last_error, thd->main_da.message(), sizeof(net->last_error)-1);
|
||||
memcpy(net->sqlstate,
|
||||
mysql_errno_to_sqlstate(thd->main_da.sql_errno()),
|
||||
sizeof(net->sqlstate)-1);
|
||||
x_free(thd->security_ctx->user);
|
||||
goto err;
|
||||
}
|
||||
return result;
|
||||
return 0;
|
||||
|
||||
err:
|
||||
strmake(net->last_error, thd->main_da.message(), sizeof(net->last_error)-1);
|
||||
memcpy(net->sqlstate,
|
||||
mysql_errno_to_sqlstate(thd->main_da.sql_errno()),
|
||||
sizeof(net->sqlstate)-1);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <mysql_embed.h>
|
||||
#include <mysqld_error.h>
|
||||
#include <my_pthread.h>
|
||||
#include "embedded_priv.h"
|
||||
#include <my_sys.h>
|
||||
#include <mysys_err.h>
|
||||
#include <m_string.h>
|
||||
@ -28,6 +27,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include "embedded_priv.h"
|
||||
#include "client_settings.h"
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
@ -81,9 +81,9 @@ static my_bool is_NT(void)
|
||||
** Shut down connection
|
||||
**************************************************************************/
|
||||
|
||||
static void end_server(MYSQL *mysql)
|
||||
void embedded_end_server(MYSQL *mysql)
|
||||
{
|
||||
DBUG_ENTER("end_server");
|
||||
DBUG_ENTER("embedded_end_server");
|
||||
free_old_query(mysql);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
@ -169,7 +169,11 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
||||
client_flag|=CLIENT_CAPABILITIES;
|
||||
if (client_flag & CLIENT_MULTI_STATEMENTS)
|
||||
client_flag|= CLIENT_MULTI_RESULTS;
|
||||
client_flag&= ~CLIENT_COMPRESS;
|
||||
/*
|
||||
no compression in embedded as we don't send any data,
|
||||
and no pluggable auth, as we cannot do a client-server dialog
|
||||
*/
|
||||
client_flag&= ~(CLIENT_COMPRESS | CLIENT_PLUGIN_AUTH);
|
||||
if (db)
|
||||
client_flag|=CLIENT_CONNECT_WITH_DB;
|
||||
|
||||
@ -216,7 +220,7 @@ error:
|
||||
{
|
||||
/* Free alloced memory */
|
||||
my_bool free_me=mysql->free_me;
|
||||
end_server(mysql);
|
||||
embedded_end_server(mysql);
|
||||
mysql->free_me=0;
|
||||
mysql_close(mysql);
|
||||
mysql->free_me=free_me;
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBcomp_err\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBCOMP_ERR\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBCOMP_ERR\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -63,7 +63,7 @@ shell> \fBcomp_err [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||
.\}
|
||||
.PP
|
||||
\fBcomp_err\fR
|
||||
supports the options described in the following list\&.
|
||||
supports the following options\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -254,7 +254,7 @@ Display version information and exit\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBinnochecksum\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBINNOCHECKSUM\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBINNOCHECKSUM\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -59,7 +59,7 @@ shell> \fBinnochecksum [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIfile_name\fR\fR
|
||||
.\}
|
||||
.PP
|
||||
\fBinnochecksum\fR
|
||||
supports the options described in the following list\&. For options that refer to page numbers, the numbers are zero\-based\&.
|
||||
supports the following options\&. For options that refer to page numbers, the numbers are zero\-based\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -141,7 +141,7 @@ Verbose mode; print a progress indicator every five seconds\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmake_win_bin_dist\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMAKE_WIN_BIN_DIST" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMAKE_WIN_BIN_DIST" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -67,7 +67,7 @@ bin/mysqld\-max\&.exe=\&.\&./my\-max\-build/sql/release/mysqld\&.exe
|
||||
If you specify a directory, the entire directory will be copied\&.
|
||||
.PP
|
||||
\fBmake_win_bin_dist\fR
|
||||
supports the following options:
|
||||
supports the following options\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -169,7 +169,7 @@ directories)\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmsql2mysql\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMSQL2MYSQL\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMSQL2MYSQL\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -60,7 +60,7 @@ utility to make the function name substitutions\&. See
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmy_print_defaults\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMY_PRINT_DEFAULTS" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMY_PRINT_DEFAULTS" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -53,7 +53,7 @@ shell> \fBmy_print_defaults mysqlcheck client\fR
|
||||
The output consists of options, one per line, in the form that they would be specified on the command line\&.
|
||||
.PP
|
||||
\fBmy_print_defaults\fR
|
||||
supports the following options:
|
||||
supports the following options\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -195,7 +195,7 @@ Display version information and exit\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmyisam_ftdump\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYISAM_FTDUMP\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYISAM_FTDUMP\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -33,7 +33,13 @@ indexes in
|
||||
MyISAM
|
||||
tables\&. It reads the
|
||||
MyISAM
|
||||
index file directly, so it must be run on the server host where the table is located
|
||||
index file directly, so it must be run on the server host where the table is located\&. Before using
|
||||
\fBmyisam_ftdump\fR, be sure to issue a
|
||||
FLUSH TABLES
|
||||
statement first if the server is running\&.
|
||||
.PP
|
||||
\fBmyisam_ftdump\fR
|
||||
scans and dumps the entire index, which is not particularly fast\&. On the other hand, the distribution of words changes infrequently, so it need not be run often\&.
|
||||
.PP
|
||||
Invoke
|
||||
\fBmyisam_ftdump\fR
|
||||
@ -120,6 +126,20 @@ shell> \fBmyisam_ftdump /usr/local/mysql/data/test/mytexttable 1\fR
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
You can use
|
||||
\fBmyisam_ftdump\fR
|
||||
to generate a list of index entries in order of frequency of occurrence like this:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
shell> \fBmyisam_ftdump \-c mytexttable 1 | sort \-r\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
\fBmyisam_ftdump\fR
|
||||
supports the following options:
|
||||
.sp
|
||||
@ -222,7 +242,7 @@ Verbose mode\&. Print more output about what the program does\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmyisamchk\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYISAMCHK\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYISAMCHK\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -219,12 +219,16 @@ CHECK TABLE
|
||||
instead of
|
||||
\fBmyisamchk\fR
|
||||
to check tables\&. See
|
||||
Section\ \&12.5.2.3, \(lqCHECK TABLE Syntax\(rq\&.
|
||||
Section\ \&12.4.2.3, \(lqCHECK TABLE Syntax\(rq\&.
|
||||
.sp .5v
|
||||
.RE
|
||||
.PP
|
||||
\fBmyisamchk\fR
|
||||
supports the options in the following table\&. It also reads option files and supports the options for processing them described at
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[myisamchk]
|
||||
option file group\&.
|
||||
\fBmyisamchk\fR
|
||||
also supports the options for processing option files described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
.SH "MYISAMCHK GENERAL OPTIONS"
|
||||
.\" options: myisamchk
|
||||
@ -521,18 +525,7 @@ system variable\&. For more information, see the description of
|
||||
myisam_stats_method
|
||||
in
|
||||
Section\ \&5.1.4, \(lqServer System Variables\(rq, and
|
||||
Section\ \&7.4.7, \(lqMyISAM Index Statistics Collection\(rq\&. For MySQL 5\&.1,
|
||||
stats_method
|
||||
was added in MySQL 5\&.0\&.14\&. For older versions, the statistics collection method is equivalent to
|
||||
nulls_equal\&.
|
||||
.PP
|
||||
The
|
||||
ft_min_word_len
|
||||
and
|
||||
ft_max_word_len
|
||||
variables are available as of MySQL 4\&.0\&.0\&.
|
||||
ft_stopword_file
|
||||
is available as of MySQL 4\&.0\&.19\&.
|
||||
Section\ \&7.4.7, \(lqMyISAM Index Statistics Collection\(rq\&.
|
||||
.PP
|
||||
ft_min_word_len
|
||||
and
|
||||
@ -824,7 +817,7 @@ file as
|
||||
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
|
||||
.sp
|
||||
The directory where character sets are installed\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -981,7 +974,7 @@ and
|
||||
\fB\-\-quick\fR,
|
||||
\fB\-q\fR
|
||||
.sp
|
||||
Achieve a faster repair by not modifying the data file\&. You can specify this option twice to force
|
||||
Achieve a faster repair by modifying only the index file, not the data file\&. You can specify this option twice to force
|
||||
\fBmyisamchk\fR
|
||||
to modify the original data file in case of duplicate keys\&.
|
||||
.RE
|
||||
@ -1469,7 +1462,11 @@ The format used to store table rows\&. The preceding examples use
|
||||
Fixed length\&. Other possible values are
|
||||
Compressed
|
||||
and
|
||||
Packed\&.
|
||||
Packed\&. (Packed
|
||||
corresponds to what
|
||||
SHOW TABLE STATUS
|
||||
reports as
|
||||
Dynamic\&.)
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -1585,7 +1582,7 @@ The number of rows in the table\&.
|
||||
Deleted blocks
|
||||
.sp
|
||||
How many deleted blocks still have reserved space\&. You can optimize your table to minimize this space\&. See
|
||||
Section\ \&6.4.4, \(lqTable Optimization\(rq\&.
|
||||
Section\ \&6.6.4, \(lqMyISAM Table Optimization\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -1613,7 +1610,7 @@ Data records\&.
|
||||
Deleted data
|
||||
.sp
|
||||
How many bytes of unreclaimed deleted data there are\&. You can optimize your table to minimize this space\&. See
|
||||
Section\ \&6.4.4, \(lqTable Optimization\(rq\&.
|
||||
Section\ \&6.6.4, \(lqMyISAM Table Optimization\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -2100,7 +2097,7 @@ The number of rows in the table\&.
|
||||
Deleted blocks
|
||||
.sp
|
||||
How many deleted blocks still have reserved space\&. You can optimize your table to minimize this space\&. See
|
||||
Section\ \&6.4.4, \(lqTable Optimization\(rq\&.
|
||||
Section\ \&6.6.4, \(lqMyISAM Table Optimization\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -2238,7 +2235,7 @@ What percentage of the data file is unused\&.
|
||||
Blocks/Record
|
||||
.sp
|
||||
Average number of blocks per row (that is, how many links a fragmented row is composed of)\&. This is always 1\&.0 for fixed\-format tables\&. This value should stay as close to 1\&.0 as possible\&. If it gets too large, you can reorganize the table\&. See
|
||||
Section\ \&6.4.4, \(lqTable Optimization\(rq\&.
|
||||
Section\ \&6.6.4, \(lqMyISAM Table Optimization\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -2447,7 +2444,7 @@ instead of
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmyisamlog\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYISAMLOG\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYISAMLOG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -225,7 +225,7 @@ Display version information\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmyisampack\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYISAMPACK\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYISAMPACK\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -100,7 +100,7 @@ to rebuild its indexes\&.
|
||||
\fBmyisamchk\fR(1)\&.
|
||||
.PP
|
||||
\fBmyisampack\fR
|
||||
supports the options in the following list\&. It also reads option files and supports the options for processing them described at
|
||||
supports the following options\&. It also reads option files and supports the options for processing them described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
.sp
|
||||
.RS 4
|
||||
@ -149,7 +149,7 @@ Make a backup of each table\'s data file using the name
|
||||
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
|
||||
.sp
|
||||
The directory where character sets are installed\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -832,7 +832,7 @@ option to
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql-stress-test.pl\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 10/29/2009
|
||||
.\" Date: 03/31/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL\-STRESS\-TE" "1" "10/29/2009" "MySQL" "MySQL Database System"
|
||||
.TH "\FBMYSQL\-STRESS\-TE" "1" "03/31/2010" "MySQL" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -75,9 +75,9 @@ Display a help message and exit\&.
|
||||
.\}
|
||||
.\" mysql-stress-test.pl: abort-on-error option
|
||||
.\" abort-on-error option: mysql-stress-test.pl
|
||||
\fB\-\-abort\-on\-error\fR
|
||||
\fB\-\-abort\-on\-error=\fR\fB\fIN\fR\fR
|
||||
.sp
|
||||
Unknown\&.
|
||||
Causes the program to abort if an error with severity less than or equal to N was encountered\&. Set to 1 to abort on any error\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -169,7 +169,8 @@ program\&.
|
||||
.\" server-database option: mysql-stress-test.pl
|
||||
\fB\-\-server\-database=\fR\fB\fIdb_name\fR\fR
|
||||
.sp
|
||||
The database to use for the tests\&.
|
||||
The database to use for the tests\&. The default is
|
||||
test\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -333,7 +334,7 @@ option\&.
|
||||
\fB\-\-stress\-init\-file[=\fR\fB\fIpath\fR\fR\fB]\fR
|
||||
.sp
|
||||
\fIfile_name\fR
|
||||
is the location of the file that contains the list of tests\&. If missing, the default file is
|
||||
is the location of the file that contains the list of tests to be run once to initialize the database for the testing\&. If missing, the default file is
|
||||
stress_init\&.txt
|
||||
in the test suite directory\&.
|
||||
.RE
|
||||
@ -464,21 +465,6 @@ The duration of stress testing in seconds\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysql-stress-test.pl: test-suffix option
|
||||
.\" test-suffix option: mysql-stress-test.pl
|
||||
\fB\-\-test\-suffix=\fR\fB\fIstr\fR\fR
|
||||
.sp
|
||||
Unknown\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysql-stress-test.pl: threads option
|
||||
.\" threads option: mysql-stress-test.pl
|
||||
\fB\-\-threads=\fR\fB\fIN\fR\fR
|
||||
@ -503,7 +489,7 @@ Verbose mode\&. Print more information about what the program does\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright \(co 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
.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
|
||||
|
File diff suppressed because it is too large
Load Diff
60
man/mysql.1
60
man/mysql.1
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -103,7 +103,13 @@ shell> \fBmysql \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fIscript\&.sql\fR\fR\fB > \fR
|
||||
.\" startup parameters: mysql
|
||||
.PP
|
||||
\fBmysql\fR
|
||||
supports the options in the following list\&. It also reads option files and supports the options for processing them described at
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[mysql]
|
||||
and
|
||||
[client]
|
||||
option file groups\&.
|
||||
\fBmysql\fR
|
||||
also supports the options for processing option files described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
.sp
|
||||
.RS 4
|
||||
@ -182,7 +188,7 @@ option\&.
|
||||
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
|
||||
.sp
|
||||
The directory where character sets are installed\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -345,7 +351,7 @@ latin1
|
||||
character set by default\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&.
|
||||
.sp
|
||||
See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq, for more information\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq, for more information\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -550,10 +556,8 @@ the section called \(lqMYSQL COMMANDS\(rq\&.
|
||||
\fB\-\-no\-auto\-rehash\fR,
|
||||
\fB\-A\fR
|
||||
.sp
|
||||
Deprecated form of
|
||||
\fB\-skip\-auto\-rehash\fR\&. Use
|
||||
\fB\-\-disable\-auto\-rehash\fR
|
||||
instead\&. See the description for
|
||||
This has the same effect as
|
||||
\fB\-skip\-auto\-rehash\fR\&. See the description for
|
||||
\fB\-\-auto\-rehash\fR\&.
|
||||
.RE
|
||||
.sp
|
||||
@ -589,6 +593,8 @@ Do not beep when errors occur\&.
|
||||
Deprecated, use
|
||||
\fB\-\-disable\-named\-commands\fR
|
||||
instead\&.
|
||||
\fB\-\-no\-named\-commands\fR
|
||||
is removed in MySQL 5\&.5\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -607,6 +613,8 @@ Deprecated form of
|
||||
\fB\-\-skip\-pager\fR\&. See the
|
||||
\fB\-\-pager\fR
|
||||
option\&.
|
||||
\fB\-\-no\-pager\fR
|
||||
is removed in MySQL 5\&.5\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -621,8 +629,12 @@ option\&.
|
||||
.\" no-tee option: mysql
|
||||
\fB\-\-no\-tee\fR
|
||||
.sp
|
||||
Do not copy output to a file\&.
|
||||
the section called \(lqMYSQL COMMANDS\(rq, discusses tee files further\&.
|
||||
Deprecated form of
|
||||
\fB\-\-skip\-tee\fR\&. See the
|
||||
\fB\-\-tee\fR
|
||||
option\&.
|
||||
\fB\-\-no\-tee\fR
|
||||
is removed in MySQL 5\&.5\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -684,10 +696,12 @@ value following the
|
||||
\fB\-\-password\fR
|
||||
or
|
||||
\fB\-p\fR
|
||||
option on the command line, you are prompted for one\&.
|
||||
option on the command line,
|
||||
\fBmysql\fR
|
||||
prompts for one\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -703,7 +717,7 @@ Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
\fB\-\-pipe\fR,
|
||||
\fB\-W\fR
|
||||
.sp
|
||||
On Windows, connect to the server via a named pipe\&. This option applies only for connections to a local server, and only if the server supports named\-pipe connections\&.
|
||||
On Windows, connect to the server via a named pipe\&. This option applies only if the server supports named\-pipe connections\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -950,9 +964,7 @@ option\&.
|
||||
\fB\-\-skip\-column\-names\fR,
|
||||
\fB\-N\fR
|
||||
.sp
|
||||
Do not write column names in results\&. The short format,
|
||||
\fB\-N\fR
|
||||
is deprecated, use the long format instead\&.
|
||||
Do not write column names in results\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -968,9 +980,7 @@ is deprecated, use the long format instead\&.
|
||||
\fB\-\-skip\-line\-numbers\fR,
|
||||
\fB\-L\fR
|
||||
.sp
|
||||
Do not write line numbers for errors\&. Useful when you want to compare result files that include error messages\&. The short format,
|
||||
\fB\-L\fR
|
||||
is deprecated, use the long format instead\&.
|
||||
Do not write line numbers for errors\&. Useful when you want to compare result files that include error messages\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -1005,7 +1015,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
|
||||
Options that begin with
|
||||
\fB\-\-ssl\fR
|
||||
specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
|
||||
Section\ \&5.5.7.3, \(lqSSL Command Options\(rq\&.
|
||||
Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -1229,7 +1239,7 @@ shell> \fBmysql \-\-xml \-uroot \-e "SHOW VARIABLES LIKE \'version%\'"\fR
|
||||
You can also set the following variables by using
|
||||
\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR\&. The
|
||||
\fB\-\-set\-variable\fR
|
||||
format is deprecated\&.
|
||||
format is deprecated and is removed in MySQL 5\&.5\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -1325,7 +1335,7 @@ environment variable\&.
|
||||
The
|
||||
\&.mysql_history
|
||||
should be protected with a restrictive access mode because sensitive information might be written to it, such as the text of SQL statements that contain passwords\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
.PP
|
||||
If you do not want to maintain a history file, first remove
|
||||
\&.mysql_history
|
||||
@ -2805,7 +2815,7 @@ Section\ \&21.9.11, \(lqControlling Automatic Reconnection Behavior\(rq\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
@ -2817,7 +2827,7 @@ You should have received a copy of the GNU General Public License along with the
|
||||
.IP " 1." 4
|
||||
Bug#25946
|
||||
.RS 4
|
||||
\%http://bugs.mysql.com/25946
|
||||
\%http://bugs.mysql.com/bug.php?id=25946
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
For more information, please refer to the MySQL Reference Manual,
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql.server\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL\&.SERVER\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL\&.SERVER\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -62,7 +62,7 @@ sections, although you should rename such sections to
|
||||
when using MySQL 5\&.1\&.
|
||||
.PP
|
||||
\fBmysql\&.server\fR
|
||||
supports the following options:
|
||||
supports the following options\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -176,7 +176,7 @@ The login user name to use for running
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_client_test\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 10/29/2009
|
||||
.\" Date: 03/31/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_CLIENT_TEST" "1" "10/29/2009" "MySQL" "MySQL Database System"
|
||||
.TH "\FBMYSQL_CLIENT_TEST" "1" "03/31/2010" "MySQL" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -40,10 +40,15 @@ and its test language\&.
|
||||
is similar but used for testing the embedded server\&. Both programs are run as part of the test suite\&.
|
||||
.PP
|
||||
The source code for the programs can be found in in
|
||||
test/mysql_client_test\&.c
|
||||
tests/mysql_client_test\&.c
|
||||
in a source distribution\&. The program serves as a good source of examples illustrating how to use various features of the client API\&.
|
||||
.PP
|
||||
\fBmysql_client_test\fR
|
||||
is used in a test by the same name in the main tests suite of
|
||||
\fBmysql\-test\-run\&.pl\fR
|
||||
but may also be run directly\&. Unlike the other programs listed here, it does not read an external description of what tests to run\&. Instead, all tests are coded into the program, which is written to cover all aspects of the C language API\&.
|
||||
.PP
|
||||
\fBmysql_client_test\fR
|
||||
supports the following options:
|
||||
.sp
|
||||
.RS 4
|
||||
@ -70,10 +75,10 @@ Display a help message and exit\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fB\-b \fR\fB\fIdir_name\fR\fR,
|
||||
\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR,
|
||||
.\" mysql_client_test: basedir option
|
||||
.\" basedir option: mysql_client_test
|
||||
\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR
|
||||
\fB\-b \fR\fB\fIdir_name\fR\fR
|
||||
.sp
|
||||
The base directory for the tests\&.
|
||||
.RE
|
||||
@ -86,10 +91,10 @@ The base directory for the tests\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fB\-t \fR\fB\fIcount\fR\fR,
|
||||
\fB\-\-count=\fR\fB\fIcount\fR\fR,
|
||||
.\" mysql_client_test: count option
|
||||
.\" count option: mysql_client_test
|
||||
\fB\-\-count=\fR\fB\fIcount\fR\fR
|
||||
\fB\-t \fR\fB\fIcount\fR\fR
|
||||
.sp
|
||||
The number of times to execute the tests\&.
|
||||
.RE
|
||||
@ -137,10 +142,10 @@ value is
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fB\-g \fR\fB\fIoption\fR\fR,
|
||||
\fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR,
|
||||
.\" mysql_client_test: getopt-ll-test option
|
||||
.\" getopt-ll-test option: mysql_client_test
|
||||
\fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR
|
||||
\fB\-g \fR\fB\fIoption\fR\fR
|
||||
.sp
|
||||
Option to use for testing bugs in the
|
||||
getopt
|
||||
@ -213,10 +218,10 @@ The TCP/IP port number to use for the connection\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fB\-A \fR\fB\fIarg\fR\fR,
|
||||
\fB\-\-server\-arg=\fR\fB\fIarg\fR\fR,
|
||||
.\" mysql_client_test: server-arg option
|
||||
.\" server-arg option: mysql_client_test
|
||||
\fB\-\-server\-arg=\fR\fB\fIarg\fR\fR
|
||||
\fB\-A \fR\fB\fIarg\fR\fR
|
||||
.sp
|
||||
Argument to send to the embedded server\&.
|
||||
.RE
|
||||
@ -229,8 +234,8 @@ Argument to send to the embedded server\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fB\-T\fR,
|
||||
\fB\-\-show\-tests\fR
|
||||
\fB\-\-show\-tests\fR,
|
||||
\fB\-T\fR
|
||||
.sp
|
||||
Show all test names\&.
|
||||
.RE
|
||||
@ -277,12 +282,13 @@ localhost
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fB\-c\fR,
|
||||
\fB\-\-testcase\fR
|
||||
\fB\-\-testcase\fR,
|
||||
\fB\-c\fR
|
||||
.sp
|
||||
The option may disable some code when run as a
|
||||
\fBmysql\-test\-run\&.pl\fR
|
||||
test case\&.
|
||||
The option is used when called from
|
||||
\fBmysql\-test\-run\&.pl\fR, so that
|
||||
\fBmysql_client_test\fR
|
||||
may optionally behave in a different way than if called manually, for example by skipping some tests\&. Currently, there is no difference in behavior but the option is included in order to make this possible\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -320,7 +326,7 @@ mysql\-test/var\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright \(co 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_config\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_CONFIG\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_CONFIG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -30,7 +30,7 @@ mysql_config \- get compile options for compiling clients
|
||||
provides you with useful information for compiling your MySQL client and connecting it to MySQL\&.
|
||||
.PP
|
||||
\fBmysql_config\fR
|
||||
supports the following options:
|
||||
supports the following options\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -224,7 +224,7 @@ this way, be sure to invoke it within backtick (\(lq`\(rq) characters\&. That te
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_convert_table_format\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_CONVERT_TAB" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_CONVERT_TAB" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -115,10 +115,10 @@ Connect to the MySQL server on the given host\&.
|
||||
.\" password option: mysql_convert_table_format
|
||||
\fB\-\-password=\fR\fB\fIpassword\fR\fR
|
||||
.sp
|
||||
The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -216,7 +216,7 @@ Display version information and exit\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_find_rows\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_FIND_ROWS\F" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_FIND_ROWS\F" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -151,7 +151,7 @@ Start output from this row\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_fix_extensions\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_FIX_EXTENSI" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_FIX_EXTENSI" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -61,7 +61,7 @@ shell> \fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_fix_privilege_tables\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_FIX_PRIVILE" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_FIX_PRIVILE" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -131,7 +131,9 @@ mysql> \fBSOURCE share/mysql_fix_privilege_tables\&.sql\fR
|
||||
.ps -1
|
||||
.br
|
||||
.PP
|
||||
Prior to version 5\&.1\&.17, this script is found in the
|
||||
Prior to version 5\&.1\&.17, the
|
||||
mysql_fix_privilege_tables\&.sql
|
||||
script is found in the
|
||||
scripts
|
||||
directory\&.
|
||||
.sp .5v
|
||||
@ -157,7 +159,7 @@ After running the script, stop the server and restart it\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_install_db\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_INSTALL_DB\" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_INSTALL_DB\" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -94,8 +94,12 @@ environment variable to the full path name of a server that has all options enab
|
||||
will use that server\&.
|
||||
.PP
|
||||
\fBmysql_install_db\fR
|
||||
supports the options in the following list\&. It also reads option files and supports the options for processing them described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[mysql_install_db]
|
||||
and (if they are common to
|
||||
\fBmysqld\fR)
|
||||
[mysqld]
|
||||
option file groups\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -248,7 +252,7 @@ For internal use\&. This option is used for creating Windows distributions\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_secure_installation\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_SECURE_INST" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_SECURE_INST" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -96,7 +96,7 @@ The script will prompt you to determine which actions to perform\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_setpermission\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_SETPERMISSI" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_SETPERMISSI" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -109,10 +109,10 @@ Connect to the MySQL server on the given host\&.
|
||||
.\" password option: mysql_setpermission
|
||||
\fB\-\-password=\fR\fB\fIpassword\fR\fR
|
||||
.sp
|
||||
The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -163,7 +163,7 @@ The MySQL user name to use when connecting to the server\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_tzinfo_to_sql\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_TZINFO_TO_S" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_TZINFO_TO_S" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -33,11 +33,11 @@ program loads the time zone tables in the
|
||||
mysql
|
||||
database\&. It is used on systems that have a
|
||||
zoneinfo
|
||||
database (the set of files describing time zones)\&. Examples of such systems are Linux, FreeBSD, Sun Solaris, and Mac OS X\&. One likely location for these files is the
|
||||
database (the set of files describing time zones)\&. Examples of such systems are Linux, FreeBSD, Solaris, and Mac OS X\&. One likely location for these files is the
|
||||
/usr/share/zoneinfo
|
||||
directory (/usr/share/lib/zoneinfo
|
||||
on Solaris)\&. If your system does not have a zoneinfo database, you can use the downloadable package described in
|
||||
Section\ \&9.7, \(lqMySQL Server Time Zone Support\(rq\&.
|
||||
Section\ \&9.6, \(lqMySQL Server Time Zone Support\(rq\&.
|
||||
.PP
|
||||
\fBmysql_tzinfo_to_sql\fR
|
||||
can be invoked several ways:
|
||||
@ -113,7 +113,7 @@ After running
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_upgrade\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_UPGRADE\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_UPGRADE\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -52,6 +52,24 @@ for manual table repair strategies\&.
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBNote\fR
|
||||
.ps -1
|
||||
.br
|
||||
.PP
|
||||
On Windows Server 2008 and Windows Vista, you must run
|
||||
\fBmysql_upgrade\fR
|
||||
with administrator privileges\&. You can do this by running a Command Prompt as Administrator and running the command\&. Failure to do so may result in the upgrade failing to execute correctly\&.
|
||||
.sp .5v
|
||||
.RE
|
||||
.if n \{\
|
||||
.sp
|
||||
.\}
|
||||
.RS 4
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.br
|
||||
.ps +1
|
||||
\fBCaution\fR
|
||||
.ps -1
|
||||
.br
|
||||
@ -59,7 +77,7 @@ for manual table repair strategies\&.
|
||||
You should always back up your current MySQL installation
|
||||
\fIbefore\fR
|
||||
performing an upgrade\&. See
|
||||
Section\ \&6.1, \(lqDatabase Backup Methods\(rq\&.
|
||||
Section\ \&6.2, \(lqDatabase Backup Methods\(rq\&.
|
||||
.PP
|
||||
Some upgrade incompatibilities may require special handling before you upgrade your MySQL installation and run
|
||||
\fBmysql_upgrade\fR\&. See
|
||||
@ -132,7 +150,7 @@ FOR UPGRADE
|
||||
option of the
|
||||
CHECK TABLE
|
||||
statement (see
|
||||
Section\ \&12.5.2.3, \(lqCHECK TABLE Syntax\(rq)\&.
|
||||
Section\ \&12.4.2.3, \(lqCHECK TABLE Syntax\(rq)\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -144,7 +162,7 @@ Section\ \&12.5.2.3, \(lqCHECK TABLE Syntax\(rq)\&.
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fIfix_priv_tables\fR
|
||||
represents a script generated interally by
|
||||
represents a script generated internally by
|
||||
\fBmysql_upgrade\fR
|
||||
that contains SQL statements to upgrade the tables in the
|
||||
mysql
|
||||
@ -198,15 +216,17 @@ was added as a shell script and worked only for Unix systems\&. As of MySQL 5\&.
|
||||
is an executable binary and is available on all systems\&.
|
||||
.PP
|
||||
\fBmysql_upgrade\fR
|
||||
supports the options in the following list\&. It also reads option files (the
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[mysql_upgrade]
|
||||
and
|
||||
[client]
|
||||
groups) and supports the options for processing them described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. Other options are passed to
|
||||
option file groups\&. Other options are passed to
|
||||
\fBmysqlcheck\fR\&. For example, it might be necessary to specify the
|
||||
\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR
|
||||
option\&.
|
||||
\fBmysql_upgrade\fR
|
||||
also supports the options for processing option files described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -375,7 +395,7 @@ This option was introduced in MySQL 5\&.1\&.40\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_waitpid\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_WAITPID\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_WAITPID\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -120,7 +120,7 @@ Display version information and exit\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysql_zap\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQL_ZAP\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQL_ZAP\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -116,7 +116,7 @@ Test mode\&. Display information about each process but do not kill it\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysqlaccess\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQLACCESS\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQLACCESS\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -54,7 +54,7 @@ shell> \fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB
|
||||
.\}
|
||||
.PP
|
||||
\fBmysqlaccess\fR
|
||||
supports the following options:
|
||||
supports the following options\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -221,10 +221,12 @@ value following the
|
||||
\fB\-\-password\fR
|
||||
or
|
||||
\fB\-p\fR
|
||||
option on the command line, you are prompted for one\&.
|
||||
option on the command line,
|
||||
\fBmysqlaccess\fR
|
||||
prompts for one\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -319,13 +321,15 @@ Undo the most recent changes to the temporary grant tables\&.
|
||||
The password to use when connecting to the server as the superuser\&. If you omit the
|
||||
\fIpassword\fR
|
||||
value following the
|
||||
\fB\-\-password\fR
|
||||
\fB\-\-spassword\fR
|
||||
or
|
||||
\fB\-p\fR
|
||||
option on the command line, you are prompted for one\&.
|
||||
option on the command line,
|
||||
\fBmysqlaccess\fR
|
||||
prompts for one\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -419,7 +423,7 @@ error will occur when you run
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysqladmin\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQLADMIN\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQLADMIN\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -46,7 +46,7 @@ shell> \fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\
|
||||
.\}
|
||||
.PP
|
||||
\fBmysqladmin\fR
|
||||
supports the commands described in the following list\&. Some of the commands take an argument following the command name\&.
|
||||
supports the following commands\&. Some of the commands take an argument following the command name\&.
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -211,7 +211,7 @@ old\-password \fInew\-password\fR
|
||||
This is like the
|
||||
password
|
||||
command but stores the password using the old (pre\-4\&.1) password\-hashing format\&. (See
|
||||
Section\ \&5.5.6.3, \(lqPassword Hashing in MySQL\(rq\&.)
|
||||
Section\ \&5.3.2.3, \(lqPassword Hashing in MySQL\(rq\&.)
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -304,7 +304,7 @@ statement\&. If the
|
||||
\fB\-\-verbose\fR
|
||||
option is given, the output is like that of
|
||||
SHOW FULL PROCESSLIST\&. (See
|
||||
Section\ \&12.5.5.31, \(lqSHOW PROCESSLIST Syntax\(rq\&.)
|
||||
Section\ \&12.4.5.31, \(lqSHOW PROCESSLIST Syntax\(rq\&.)
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -586,7 +586,13 @@ waits until the server\'s process ID file has been removed, to ensure that the s
|
||||
.\" startup parameters: mysqladmin
|
||||
.PP
|
||||
\fBmysqladmin\fR
|
||||
supports the options in the following list\&. It also reads option files and supports the options for processing them described at
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[mysqladmin]
|
||||
and
|
||||
[client]
|
||||
option file groups\&.
|
||||
\fBmysqladmin\fR
|
||||
also supports the options for processing option files described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
.sp
|
||||
.RS 4
|
||||
@ -618,7 +624,7 @@ Display a help message and exit\&.
|
||||
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
|
||||
.sp
|
||||
The directory where character sets are installed\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -720,7 +726,7 @@ Print debugging information and memory and CPU usage statistics when the program
|
||||
Use
|
||||
\fIcharset_name\fR
|
||||
as the default character set\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -794,10 +800,12 @@ value following the
|
||||
\fB\-\-password\fR
|
||||
or
|
||||
\fB\-p\fR
|
||||
option on the command line, you are prompted for one\&.
|
||||
option on the command line,
|
||||
\fBmysqladmin\fR
|
||||
prompts for one\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -813,7 +821,7 @@ Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
\fB\-\-pipe\fR,
|
||||
\fB\-W\fR
|
||||
.sp
|
||||
On Windows, connect to the server via a named pipe\&. This option applies only for connections to a local server, and only if the server supports named\-pipe connections\&.
|
||||
On Windows, connect to the server via a named pipe\&. This option applies only if the server supports named\-pipe connections\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -940,7 +948,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
|
||||
Options that begin with
|
||||
\fB\-\-ssl\fR
|
||||
specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
|
||||
Section\ \&5.5.7.3, \(lqSSL Command Options\(rq\&.
|
||||
Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -1030,7 +1038,7 @@ You can also set the following variables by using
|
||||
\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
|
||||
The
|
||||
\fB\-\-set\-variable\fR
|
||||
format is deprecated\&. syntax:
|
||||
format is deprecated and is removed in MySQL 5\&.5\&. syntax:
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -1064,7 +1072,7 @@ The maximum number of seconds to wait for server shutdown\&. The default value i
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysqlbinlog\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQLBINLOG\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQLBINLOG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -34,7 +34,7 @@ utility\&. You can also use
|
||||
\fBmysqlbinlog\fR
|
||||
to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&. The binary log and relay log are discussed further in
|
||||
Section\ \&5.2.4, \(lqThe Binary Log\(rq, and
|
||||
Section\ \&16.4.2, \(lqReplication Relay and Status Files\(rq\&.
|
||||
Section\ \&16.2.2, \(lqReplication Relay and Status Files\(rq\&.
|
||||
.PP
|
||||
Invoke
|
||||
\fBmysqlbinlog\fR
|
||||
@ -64,18 +64,52 @@ shell> \fBmysqlbinlog binlog\&.0000003\fR
|
||||
.\}
|
||||
.PP
|
||||
The output includes events contained in
|
||||
binlog\&.000003\&. Event information includes the statement, the ID of the server on which it was executed, the timestamp when the statement was executed, how much time it took, and so forth\&.
|
||||
binlog\&.000003\&. For statement\-based logging, event information includes the SQL statement, the ID of the server on which it was executed, the timestamp when the statement was executed, how much time it took, and so forth\&. For row\-based logging, the event indicates a row change rather than an SQL statement\&. See
|
||||
Section\ \&16.1.2, \(lqReplication Formats\(rq, for information about logging modes\&.
|
||||
.PP
|
||||
Events are preceded by header comments that provide additional information\&. For example:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
# at 141
|
||||
#100309 9:28:36 server id 123 end_log_pos 245
|
||||
Query thread_id=3350 exec_time=11 error_code=0
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
In the first line, the number following
|
||||
at
|
||||
indicates the starting position of the event in the binary log file\&.
|
||||
.PP
|
||||
The second line starts with a date and time indicating when the statement started on the server where the event originated\&. For replication, this timestamp is propagated to slave servers\&.
|
||||
server id
|
||||
is the
|
||||
server_id
|
||||
value of the server where the event originated\&.
|
||||
end_log_pos
|
||||
indicates where the next event starts (that is, it is the end position of the current event + 1)\&.
|
||||
thread_id
|
||||
indicates which thread executed the event\&.
|
||||
exec_time
|
||||
is the time spent executing the event, on a master server\&. On a slave, it is the difference of the end execution time on the slave minus the beginning execution time on the master\&. The difference serves as an indicator of how much replication lags behind the master\&.
|
||||
error_code
|
||||
indicates the result from executing the event\&. Zero means that no error occurred\&.
|
||||
.PP
|
||||
The output from
|
||||
\fBmysqlbinlog\fR
|
||||
can be re\-executed (for example, by using it as input to
|
||||
\fBmysql\fR) to reapply the statements in the log\&. This is useful for recovery operations after a server crash\&. For other usage examples, see the discussion later in this section\&.
|
||||
\fBmysql\fR) to redo the statements in the log\&. This is useful for recovery operations after a server crash\&. For other usage examples, see the discussion later in this section and
|
||||
Section\ \&6.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq\&.
|
||||
.PP
|
||||
Normally, you use
|
||||
\fBmysqlbinlog\fR
|
||||
to read binary log files directly and apply them to the local MySQL server\&. It is also possible to read binary logs from a remote server by using the
|
||||
\fB\-\-read\-from\-remote\-server\fR
|
||||
option\&. When you read remote binary logs, the connection parameter options can be given to indicate how to connect to the server\&. These options are
|
||||
option\&. To read remote binary logs, the connection parameter options can be given to indicate how to connect to the server\&. These options are
|
||||
\fB\-\-host\fR,
|
||||
\fB\-\-password\fR,
|
||||
\fB\-\-port\fR,
|
||||
@ -86,7 +120,13 @@ option\&. When you read remote binary logs, the connection parameter options can
|
||||
option\&.
|
||||
.PP
|
||||
\fBmysqlbinlog\fR
|
||||
supports the following options\&. It also reads option files and supports the options for processing them described at
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[mysqlbinlog]
|
||||
and
|
||||
[client]
|
||||
option file groups\&.
|
||||
\fBmysqlbinlog\fR
|
||||
also supports the options for processing option files described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
.sp
|
||||
.RS 4
|
||||
@ -248,7 +288,7 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&.
|
||||
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
|
||||
.sp
|
||||
The directory where character sets are installed\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -264,15 +304,140 @@ Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
\fB\-\-database=\fR\fB\fIdb_name\fR\fR,
|
||||
\fB\-d \fR\fB\fIdb_name\fR\fR
|
||||
.sp
|
||||
List entries for just this database (local log only)\&. You can only specify one database with this option \- if you specify multiple
|
||||
\fB\-\-database\fR
|
||||
options, only the last one is used\&. This option forces
|
||||
This option causes
|
||||
\fBmysqlbinlog\fR
|
||||
to output entries from the binary log where the default database (that is, the one selected by
|
||||
USE) is
|
||||
\fIdb_name\fR\&. Note that this does not replicate cross\-database statements such as
|
||||
UPDATE \fIsome_db\&.some_table\fR SET foo=\'bar\'
|
||||
while having selected a different database or no database\&.
|
||||
to output entries from the binary log (local log only) that occur while
|
||||
\fIdb_name\fR
|
||||
is been selected as the default database by
|
||||
USE\&.
|
||||
.sp
|
||||
The
|
||||
\fB\-\-database\fR
|
||||
option for
|
||||
\fBmysqlbinlog\fR
|
||||
is similar to the
|
||||
\fB\-\-binlog\-do\-db\fR
|
||||
option for
|
||||
\fBmysqld\fR, but can be used to specify only one database\&. If
|
||||
\fB\-\-database\fR
|
||||
is given multiple times, only the last instance is used\&.
|
||||
.sp
|
||||
The effects of this option depend on whether the statement\-based or row\-based logging format is in use, in the same way that the effects of
|
||||
\fB\-\-binlog\-do\-db\fR
|
||||
depend on whether statement\-based or row\-based logging is in use\&.
|
||||
.PP
|
||||
\fBStatement-based logging\fR. The
|
||||
\fB\-\-database\fR
|
||||
option works as follows:
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
While
|
||||
\fIdb_name\fR
|
||||
is the default database, statements are output whether they modify tables in
|
||||
\fIdb_name\fR
|
||||
or a different database\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
Unless
|
||||
\fIdb_name\fR
|
||||
is selected as the default database, statements are not output, even if they modify tables in
|
||||
\fIdb_name\fR\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
There is an exception for
|
||||
CREATE DATABASE,
|
||||
ALTER DATABASE, and
|
||||
DROP DATABASE\&. The database being
|
||||
\fIcreated, altered, or dropped\fR
|
||||
is considered to be the default database when determining whether to output the statement\&.
|
||||
.RE
|
||||
.RS 4
|
||||
Suppose that the binary log was created by executing these statements using statement\-based\-logging:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
INSERT INTO test\&.t1 (i) VALUES(100);
|
||||
INSERT INTO db2\&.t2 (j) VALUES(200);
|
||||
USE test;
|
||||
INSERT INTO test\&.t1 (i) VALUES(101);
|
||||
INSERT INTO t1 (i) VALUES(102);
|
||||
INSERT INTO db2\&.t2 (j) VALUES(201);
|
||||
USE db2;
|
||||
INSERT INTO test\&.t1 (i) VALUES(103);
|
||||
INSERT INTO db2\&.t2 (j) VALUES(202);
|
||||
INSERT INTO t2 (j) VALUES(203);
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
\fBmysqlbinlog \-\-database=test\fR
|
||||
does not output the first two
|
||||
INSERT
|
||||
statements because there is no default database\&. It outputs the three
|
||||
INSERT
|
||||
statements following
|
||||
USE test, but not the three
|
||||
INSERT
|
||||
statements following
|
||||
USE db2\&.
|
||||
.sp
|
||||
\fBmysqlbinlog \-\-database=db2\fR
|
||||
does not output the first two
|
||||
INSERT
|
||||
statements because there is no default database\&. It does not output the three
|
||||
INSERT
|
||||
statements following
|
||||
USE test, but does output the three
|
||||
INSERT
|
||||
statements following
|
||||
USE db2\&.
|
||||
.PP
|
||||
\fBRow-based logging\fR.
|
||||
\fBmysqlbinlog\fR
|
||||
outputs only entries that change tables belonging to
|
||||
\fIdb_name\fR\&. The default database has no effect on this\&. Suppose that the binary log just described was created using row\-based logging rather than statement\-based logging\&.
|
||||
\fBmysqlbinlog \-\-database=test\fR
|
||||
outputs only those entries that modify
|
||||
t1
|
||||
in the test database, regardless of whether
|
||||
USE
|
||||
was issued or what the default database is\&.
|
||||
If a server is running with
|
||||
binlog_format
|
||||
set to
|
||||
MIXED
|
||||
and you want it to be possible to use
|
||||
\fBmysqlbinlog\fR
|
||||
with the
|
||||
\fB\-\-database\fR
|
||||
option, you must ensure that tables that are modified are in the database selected by
|
||||
USE\&. (In particular, no cross\-database updates should be used\&.)
|
||||
.if n \{\
|
||||
.sp
|
||||
.\}
|
||||
@ -406,7 +571,7 @@ stops if it reads such an event\&.
|
||||
\fB\-H\fR
|
||||
.sp
|
||||
Display a hex dump of the log in comments, as described in
|
||||
the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. This output can be helpful for replication debugging\&. This option was added in MySQL 5\&.1\&.2\&.
|
||||
the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be helpful for replication debugging\&. This option was added in MySQL 5\&.1\&.2\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -482,10 +647,12 @@ value following the
|
||||
\fB\-\-password\fR
|
||||
or
|
||||
\fB\-p\fR
|
||||
option on the command line, you are prompted for one\&.
|
||||
option on the command line,
|
||||
\fBmysqlbinlog\fR
|
||||
prompts for one\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -514,12 +681,13 @@ The TCP/IP port number to use for connecting to a remote server\&.
|
||||
.\}
|
||||
.\" mysqlbinlog: position option
|
||||
.\" position option: mysqlbinlog
|
||||
\fB\-\-position=\fR\fB\fIN\fR\fR,
|
||||
\fB\-j \fR\fB\fIN\fR\fR
|
||||
\fB\-\-position=\fR\fB\fIN\fR\fR
|
||||
.sp
|
||||
Deprecated\&. Use
|
||||
\fB\-\-start\-position\fR
|
||||
instead\&.
|
||||
\fB\-\-position\fR
|
||||
is removed in MySQL 5\&.5\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -590,7 +758,7 @@ Direct output to the given file\&.
|
||||
.\" server-id option: mysqlbinlog
|
||||
\fB\-\-server\-id=\fR\fB\fIid\fR\fR
|
||||
.sp
|
||||
Extract only those events created by the server having the given server ID\&. This option is available as of MySQL 5\&.1\&.4\&.
|
||||
Display only those events created by the server having the given server ID\&. This option is available as of MySQL 5\&.1\&.4\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -677,7 +845,7 @@ shell> \fBmysqlbinlog \-\-start\-datetime="2005\-12\-25 11:25:56" binlog\&.00000
|
||||
.\}
|
||||
.sp
|
||||
This option is useful for point\-in\-time recovery\&. See
|
||||
Section\ \&6.2, \(lqExample Backup and Recovery Strategy\(rq\&.
|
||||
Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -690,10 +858,14 @@ Section\ \&6.2, \(lqExample Backup and Recovery Strategy\(rq\&.
|
||||
.\}
|
||||
.\" mysqlbinlog: start-position option
|
||||
.\" start-position option: mysqlbinlog
|
||||
\fB\-\-start\-position=\fR\fB\fIN\fR\fR
|
||||
\fB\-\-start\-position=\fR\fB\fIN\fR\fR,
|
||||
\fB\-j \fR\fB\fIN\fR\fR
|
||||
.sp
|
||||
Start reading the binary log at the first event having a position equal to or greater than
|
||||
\fIN\fR\&. This option applies to the first log file named on the command line\&.
|
||||
.sp
|
||||
This option is useful for point\-in\-time recovery\&. See
|
||||
Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -715,6 +887,9 @@ argument\&. This option is useful for point\-in\-time recovery\&. See the descri
|
||||
option for information about the
|
||||
\fIdatetime\fR
|
||||
value\&.
|
||||
.sp
|
||||
This option is useful for point\-in\-time recovery\&. See
|
||||
Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -731,6 +906,9 @@ value\&.
|
||||
.sp
|
||||
Stop reading the binary log at the first event having a position equal to or greater than
|
||||
\fIN\fR\&. This option applies to the last log file named on the command line\&.
|
||||
.sp
|
||||
This option is useful for point\-in\-time recovery\&. See
|
||||
Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -779,7 +957,7 @@ The MySQL user name to use when connecting to a remote server\&.
|
||||
\fB\-\-verbose\fR,
|
||||
\fB\-v\fR
|
||||
.sp
|
||||
Reconstruct row events and display them as commented SQL statements\&. If given twice, the output includes comments to indicate column data types and some metadata\&. This option was added in MySQL 5\&.1\&.28\&.
|
||||
Reconstruct row events and display them as commented SQL statements\&. If this option is given twice, the output includes comments to indicate column data types and some metadata\&. This option was added in MySQL 5\&.1\&.28\&.
|
||||
.sp
|
||||
For examples that show the effect of
|
||||
\fB\-\-base64\-output\fR
|
||||
@ -804,33 +982,6 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&.
|
||||
.sp
|
||||
Display version information and exit\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysqlbinlog: write-binlog option
|
||||
.\" write-binlog option: mysqlbinlog
|
||||
\fB\-\-write\-binlog\fR
|
||||
.sp
|
||||
This option is enabled by default, so that
|
||||
ANALYZE TABLE,
|
||||
OPTIMIZE TABLE, and
|
||||
REPAIR TABLE
|
||||
statements generated by
|
||||
\fBmysqlcheck\fR
|
||||
are written to the binary log\&. Use
|
||||
\fB\-\-skip\-write\-binlog\fR
|
||||
to cause
|
||||
NO_WRITE_TO_BINLOG
|
||||
to be added to the statements so that they are not logged\&. Use the
|
||||
\fB\-\-skip\-write\-binlog\fR
|
||||
when these statements should not be sent to replication slaves or run when using the binary logs for recovery from backup\&. This option was added in MySQL 5\&.1\&.18\&.
|
||||
.RE
|
||||
.PP
|
||||
You can also set the following variable by using
|
||||
\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
|
||||
@ -854,14 +1005,14 @@ You can pipe the output of
|
||||
\fBmysqlbinlog\fR
|
||||
into the
|
||||
\fBmysql\fR
|
||||
client to execute the statements contained in the binary log\&. This is used to recover from a crash when you have an old backup (see
|
||||
Section\ \&6.1, \(lqDatabase Backup Methods\(rq)\&. For example:
|
||||
client to execute the events contained in the binary log\&. This technique is used to recover from a crash when you have an old backup (see
|
||||
Section\ \&6.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq)\&. For example:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
shell> \fBmysqlbinlog binlog\&.000001 | mysql\fR
|
||||
shell> \fBmysqlbinlog binlog\&.000001 | mysql \-u root \-p\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -873,7 +1024,7 @@ Or:
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
shell> \fBmysqlbinlog binlog\&.[0\-9]* | mysql\fR
|
||||
shell> \fBmysqlbinlog binlog\&.[0\-9]* | mysql \-u root \-p\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -883,12 +1034,25 @@ You can also redirect the output of
|
||||
\fBmysqlbinlog\fR
|
||||
to a text file instead, if you need to modify the statement log first (for example, to remove statements that you do not want to execute for some reason)\&. After editing the file, execute the statements that it contains by using it as input to the
|
||||
\fBmysql\fR
|
||||
program\&.
|
||||
program:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
shell> \fBmysqlbinlog binlog\&.000001 > tmpfile\fR
|
||||
shell> \&.\&.\&. \fIedit tmpfile\fR \&.\&.\&.
|
||||
shell> \fBmysql \-u root \-p < tmpfile\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
When
|
||||
\fBmysqlbinlog\fR
|
||||
has the
|
||||
is invoked with the
|
||||
\fB\-\-start\-position\fR
|
||||
option, which prints only those statements with an offset in the binary log greater than or equal to a given position (the given position must match the start of one event)\&. It also has options to stop and start when it sees an event with a given date and time\&. This enables you to perform point\-in\-time recovery using the
|
||||
option, it displays only those events with an offset in the binary log greater than or equal to a given position (the given position must match the start of one event)\&. It also has options to stop and start when it sees an event with a given date and time\&. This enables you to perform point\-in\-time recovery using the
|
||||
\fB\-\-stop\-datetime\fR
|
||||
option (to be able to say, for example,
|
||||
\(lqroll forward my databases to how they were today at 10:30 a\&.m\&.\(rq)\&.
|
||||
@ -900,8 +1064,8 @@ If you have more than one binary log to execute on the MySQL server, the safe me
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
shell> \fBmysqlbinlog binlog\&.000001 | mysql # DANGER!!\fR
|
||||
shell> \fBmysqlbinlog binlog\&.000002 | mysql # DANGER!!\fR
|
||||
shell> \fBmysqlbinlog binlog\&.000001 | mysql \-u root \-p # DANGER!!\fR
|
||||
shell> \fBmysqlbinlog binlog\&.000002 | mysql \-u root \-p # DANGER!!\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -918,13 +1082,14 @@ process attempts to use the table, the server reports
|
||||
.PP
|
||||
To avoid problems like this, use a
|
||||
\fIsingle\fR
|
||||
connection to execute the contents of all binary logs that you want to process\&. Here is one way to do so:
|
||||
\fBmysql\fR
|
||||
process to execute the contents of all binary logs that you want to process\&. Here is one way to do so:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
shell> \fBmysqlbinlog binlog\&.000001 binlog\&.000002 | mysql\fR
|
||||
shell> \fBmysqlbinlog binlog\&.000001 binlog\&.000002 | mysql \-u root \-p\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -938,7 +1103,7 @@ Another approach is to write all the logs to a single file and then process the
|
||||
.nf
|
||||
shell> \fBmysqlbinlog binlog\&.000001 > /tmp/statements\&.sql\fR
|
||||
shell> \fBmysqlbinlog binlog\&.000002 >> /tmp/statements\&.sql\fR
|
||||
shell> \fBmysql \-e "source /tmp/statements\&.sql"\fR
|
||||
shell> \fBmysql \-u root \-p \-e "source /tmp/statements\&.sql"\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -962,10 +1127,10 @@ LOAD DATA INFILE
|
||||
statements to
|
||||
LOAD DATA LOCAL INFILE
|
||||
statements (that is, it adds
|
||||
LOCAL), both the client and the server that you use to process the statements must be configured to allow
|
||||
LOCAL), both the client and the server that you use to process the statements must be configured with the
|
||||
LOCAL
|
||||
capability\&. See
|
||||
Section\ \&5.3.4, \(lqSecurity Issues with LOAD DATA LOCAL\(rq\&.
|
||||
capability enabled\&. See
|
||||
Section\ \&5.3.5, \(lqSecurity Issues with LOAD DATA LOCAL\(rq\&.
|
||||
.if n \{\
|
||||
.sp
|
||||
.\}
|
||||
@ -991,7 +1156,9 @@ automatically deleted because they are needed until you actually execute those s
|
||||
.PP
|
||||
The
|
||||
\fB\-\-hexdump\fR
|
||||
option produces a hex dump of the log contents:
|
||||
option causes
|
||||
\fBmysqlbinlog\fR
|
||||
to produce a hex dump of the binary log contents:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
@ -1029,7 +1196,8 @@ ROLLBACK;
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
Hex dump output currently contains the following elements\&. This format is subject to change\&.
|
||||
Hex dump output currently contains the elements in the following list\&. This format is subject to change\&. (For more information about binary log format, see
|
||||
\m[blue]\fB\%http://forge.mysql.com/wiki/MySQL_Internals_Binary_Log\fR\m[]\&.)
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -1796,7 +1964,7 @@ option can be used to prevent this header from being written\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
@ -1808,7 +1976,7 @@ You should have received a copy of the GNU General Public License along with the
|
||||
.IP " 1." 4
|
||||
Bug#42941
|
||||
.RS 4
|
||||
\%http://bugs.mysql.com/42941
|
||||
\%http://bugs.mysql.com/bug.php?id=42941
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
For more information, please refer to the MySQL Reference Manual,
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysqlbug\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQLBUG\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQLBUG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -26,7 +26,7 @@ mysqlbug \- generate bug report
|
||||
\fBmysqlbug\fR
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This program enables you to generate a bug report and send it to Sun Microsystems, Inc\&. It is a shell script and runs on Unix\&.
|
||||
This program enables you to generate a bug report and send it to Oracle Corporation\&. It is a shell script and runs on Unix\&.
|
||||
.PP
|
||||
The normal way to report bugs is to visit
|
||||
\m[blue]\fB\%http://bugs.mysql.com/\fR\m[], which is the address for our bugs database\&. This database is public and can be browsed and searched by anyone\&. If you log in to the system, you can enter new reports\&. If you have no Web access, you can generate a bug report by using the
|
||||
@ -62,7 +62,7 @@ will send the report by email\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysqlcheck\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQLCHECK\FR" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQLCHECK\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -37,7 +37,7 @@ client performs table maintenance: It checks, repairs, optimizes, or analyzes ta
|
||||
Each table is locked and therefore unavailable to other sessions while it is being processed, although for check operations, the table is locked with a
|
||||
READ
|
||||
lock only (see
|
||||
Section\ \&12.4.5, \(lqLOCK TABLES and UNLOCK TABLES Syntax\(rq, for more information about
|
||||
Section\ \&12.3.5, \(lqLOCK TABLES and UNLOCK TABLES Syntax\(rq, for more information about
|
||||
READ
|
||||
and
|
||||
WRITE
|
||||
@ -72,7 +72,7 @@ REPAIR TABLE,
|
||||
ANALYZE TABLE, and
|
||||
OPTIMIZE TABLE
|
||||
in a convenient way for the user\&. It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed\&. For details about which storage engines each statement works with, see the descriptions for those statements in
|
||||
Section\ \&12.5.2, \(lqTable Maintenance Statements\(rq\&.
|
||||
Section\ \&12.4.2, \(lqTable Maintenance Statements\(rq\&.
|
||||
.PP
|
||||
The
|
||||
MyISAM
|
||||
@ -135,8 +135,8 @@ There are three general ways to invoke
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItables\fR\fR\fB]\fR
|
||||
shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \-\-databases \fR\fB\fIdb_name1\fR\fR\fB [\fR\fB\fIdb_name2\fR\fR\fB \fR\fB\fIdb_name3\fR\fR\fB\&.\&.\&.]\fR
|
||||
shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]\fR
|
||||
shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \-\-databases \fR\fB\fIdb_name\fR\fR\fB \&.\&.\&.\fR
|
||||
shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \-\-all\-databases\fR
|
||||
.fi
|
||||
.if n \{\
|
||||
@ -188,7 +188,13 @@ T}
|
||||
.sp 1
|
||||
.PP
|
||||
\fBmysqlcheck\fR
|
||||
supports the options in the following list\&. It also reads option files and supports the options for processing them described at
|
||||
supports the following options, which can be specified on the command line or in the
|
||||
[mysqlcheck]
|
||||
and
|
||||
[client]
|
||||
option file groups\&.
|
||||
\fBmysqlcheck\fR
|
||||
also supports the options for processing option files described at
|
||||
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
|
||||
.sp
|
||||
.RS 4
|
||||
@ -285,7 +291,7 @@ If a checked table is corrupted, automatically fix it\&. Any necessary repairs a
|
||||
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
|
||||
.sp
|
||||
The directory where character sets are installed\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -444,7 +450,7 @@ Print debugging information and memory and CPU usage statistics when the program
|
||||
Use
|
||||
\fIcharset_name\fR
|
||||
as the default character set\&. See
|
||||
Section\ \&9.2, \(lqThe Character Set Used for Data and Sorting\(rq\&.
|
||||
Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -598,10 +604,12 @@ value following the
|
||||
\fB\-\-password\fR
|
||||
or
|
||||
\fB\-p\fR
|
||||
option on the command line, you are prompted for one\&.
|
||||
option on the command line,
|
||||
\fBmysqlcheck\fR
|
||||
prompts for one\&.
|
||||
.sp
|
||||
Specifying a password on the command line should be considered insecure\&. See
|
||||
Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -617,7 +625,7 @@ Section\ \&5.5.6.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
|
||||
\fB\-\-pipe\fR,
|
||||
\fB\-W\fR
|
||||
.sp
|
||||
On Windows, connect to the server via a named pipe\&. This option applies only for connections to a local server, and only if the server supports named\-pipe connections\&.
|
||||
On Windows, connect to the server via a named pipe\&. This option applies only if the server supports named\-pipe connections\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -734,7 +742,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
|
||||
Options that begin with
|
||||
\fB\-\-ssl\fR
|
||||
specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
|
||||
Section\ \&5.5.7.3, \(lqSSL Command Options\(rq\&.
|
||||
Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
@ -824,10 +832,37 @@ Verbose mode\&. Print information about the various stages of program operation\
|
||||
.sp
|
||||
Display version information and exit\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysqlcheck: write-binlog option
|
||||
.\" write-binlog option: mysqlcheck
|
||||
\fB\-\-write\-binlog\fR
|
||||
.sp
|
||||
This option is enabled by default, so that
|
||||
ANALYZE TABLE,
|
||||
OPTIMIZE TABLE, and
|
||||
REPAIR TABLE
|
||||
statements generated by
|
||||
\fBmysqlcheck\fR
|
||||
are written to the binary log\&. Use
|
||||
\fB\-\-skip\-write\-binlog\fR
|
||||
to cause
|
||||
NO_WRITE_TO_BINLOG
|
||||
to be added to the statements so that they are not logged\&. Use the
|
||||
\fB\-\-skip\-write\-binlog\fR
|
||||
when these statements should not be sent to replication slaves or run when using the binary logs for recovery from backup\&. This option was added in MySQL 5\&.1\&.18\&.
|
||||
.RE
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
@ -2,12 +2,12 @@
|
||||
.\" Title: \fBmysqld\fR
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 11/04/2009
|
||||
.\" Date: 04/06/2010
|
||||
.\" Manual: MySQL Database System
|
||||
.\" Source: MySQL 5.1
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "\FBMYSQLD\FR" "8" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
|
||||
.TH "\FBMYSQLD\FR" "8" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -53,7 +53,7 @@ Chapter\ \&2, Installing and Upgrading MySQL\&.
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
.PP
|
||||
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||
.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
|
||||
|
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