Commit c4f441db authored by serg@infomag.ape.relarn.ru's avatar serg@infomag.ape.relarn.ru

Merge serg@work.mysql.com:/home/bk/mysql

into infomag.ape.relarn.ru:/usr/home/serg/src/mysql.safe/bk/mysql
parents c5f8d80e eb8ad157
...@@ -180,7 +180,7 @@ Installing MySQL ...@@ -180,7 +180,7 @@ Installing MySQL
* Source install system issues:: System-specific issues * Source install system issues:: System-specific issues
* Win32:: Win32 notes * Win32:: Win32 notes
* OS/2:: OS/2 notes * OS/2:: OS/2 notes
* MySQL binaries:: * MySQL binaries::
* Post-installation:: Post-installation setup and testing * Post-installation:: Post-installation setup and testing
* Upgrade:: Is there anything special to do when upgrading/downgrading @strong{MySQL}? * Upgrade:: Is there anything special to do when upgrading/downgrading @strong{MySQL}?
...@@ -238,7 +238,7 @@ Linux notes (all Linux versions) ...@@ -238,7 +238,7 @@ Linux notes (all Linux versions)
* Linux-Alpha:: Linux-Alpha notes * Linux-Alpha:: Linux-Alpha notes
* MKLinux:: MkLinux notes * MKLinux:: MkLinux notes
* Qube2:: Qube2 Linux notes * Qube2:: Qube2 Linux notes
* Linux-Ia64:: * Linux-Ia64::
BSD/OS notes BSD/OS notes
...@@ -254,7 +254,7 @@ Win32 notes ...@@ -254,7 +254,7 @@ Win32 notes
* Win32 running:: Running @strong{MySQL} on Win32 * Win32 running:: Running @strong{MySQL} on Win32
* Win32 and SSH:: Connecting to a remote @strong{MySQL} from Win32 with SSH * Win32 and SSH:: Connecting to a remote @strong{MySQL} from Win32 with SSH
* Win32 symbolic links:: Splitting data across different disks under Win32 * Win32 symbolic links:: Splitting data across different disks under Win32
* Win32 compiling:: * Win32 compiling::
* Win32 vs Unix:: @strong{MySQL}-Win32 compared to Unix @strong{MySQL} * Win32 vs Unix:: @strong{MySQL}-Win32 compared to Unix @strong{MySQL}
Post-installation setup and testing Post-installation setup and testing
...@@ -411,12 +411,12 @@ Functions for use in @code{SELECT} and @code{WHERE} clauses ...@@ -411,12 +411,12 @@ Functions for use in @code{SELECT} and @code{WHERE} clauses
@code{SHOW} syntax (Get information about tables, columns,...) @code{SHOW} syntax (Get information about tables, columns,...)
* SHOW DATABASE INFO:: * SHOW DATABASE INFO::
* SHOW TABLE STATUS:: * SHOW TABLE STATUS::
* SHOW STATUS:: * SHOW STATUS::
* SHOW VARIABLES:: * SHOW VARIABLES::
* SHOW PROCESSLIST:: * SHOW PROCESSLIST::
* SHOW GRANTS:: * SHOW GRANTS::
* SHOW CREATE TABLE:: * SHOW CREATE TABLE::
MySQL table types MySQL table types
...@@ -515,7 +515,7 @@ Getting maximum performance from MySQL ...@@ -515,7 +515,7 @@ Getting maximum performance from MySQL
* Portability:: Portability * Portability:: Portability
* Internal use:: What have we used MySQL for? * Internal use:: What have we used MySQL for?
System/Compile time and startup parameter tuning System/Compile time and startup parameter tuning
* Compile and link options:: How compiling and linking affects the speed of MySQL * Compile and link options:: How compiling and linking affects the speed of MySQL
* Disk issues:: Disk issues * Disk issues:: Disk issues
...@@ -567,10 +567,10 @@ Using @code{myisamchk} for table maintenance and crash recovery ...@@ -567,10 +567,10 @@ Using @code{myisamchk} for table maintenance and crash recovery
@code{myisamchk} invocation syntax @code{myisamchk} invocation syntax
* myisamchk general options:: * myisamchk general options::
* myisamchk check options:: * myisamchk check options::
* myisamchk repair options:: * myisamchk repair options::
* myisamchk other options:: * myisamchk other options::
Using @code{myisamchk} for crash recovery Using @code{myisamchk} for crash recovery
...@@ -641,7 +641,7 @@ Some common errors when using MySQL ...@@ -641,7 +641,7 @@ Some common errors when using MySQL
* Too many connections:: @code{Too many connections} error * Too many connections:: @code{Too many connections} error
* Out of memory:: @code{Out of memory} error * Out of memory:: @code{Out of memory} error
* Packet too large:: @code{Packet too large} error * Packet too large:: @code{Packet too large} error
* Communication errors:: * Communication errors::
* Full table:: @code{The table is full} error * Full table:: @code{The table is full} error
* Commands out of sync:: @code{Commands out of sync} error in client * Commands out of sync:: @code{Commands out of sync} error in client
* Ignoring user:: @code{Ignoring user} error * Ignoring user:: @code{Ignoring user} error
...@@ -785,7 +785,7 @@ Changes in release 3.23.x (Released as beta) ...@@ -785,7 +785,7 @@ Changes in release 3.23.x (Released as beta)
* News-3.23.4:: Changes in release 3.23.4 * News-3.23.4:: Changes in release 3.23.4
* News-3.23.3:: Changes in release 3.23.3 * News-3.23.3:: Changes in release 3.23.3
* News-3.23.2:: Changes in release 3.23.2 * News-3.23.2:: Changes in release 3.23.2
* News-3.23.1:: Changes in release 3.23.1 * News-3.23.1:: Changes in release 3.23.1
* News-3.23.0:: Changes in release 3.23.0 * News-3.23.0:: Changes in release 3.23.0
Changes in release 3.22.x Changes in release 3.22.x
...@@ -899,7 +899,7 @@ Comments on porting to other systems ...@@ -899,7 +899,7 @@ Comments on porting to other systems
* Debugging server:: Debugging a @strong{MySQL} server * Debugging server:: Debugging a @strong{MySQL} server
* Debugging client:: Debugging a @strong{MySQL} client * Debugging client:: Debugging a @strong{MySQL} client
* The DBUG package:: The DBUG package * The DBUG package:: The DBUG package
* Locking methods:: * Locking methods::
* RTS-threads:: Comments about RTS threads * RTS-threads:: Comments about RTS threads
* Thread packages:: Differences between different thread packages * Thread packages:: Differences between different thread packages
...@@ -1003,7 +1003,7 @@ see @ref{General-SQL}. For books that focus more specifically on ...@@ -1003,7 +1003,7 @@ see @ref{General-SQL}. For books that focus more specifically on
@table @asis @table @asis
@item @strong{MySQL} is a database management system. @item @strong{MySQL} is a database management system.
A database is a structured collection of data. It may be anything from a A database is a structured collection of data. It may be anything from a
simple shopping list to a picture gallery or the vast amounts of simple shopping list to a picture gallery or the vast amounts of
...@@ -1024,7 +1024,7 @@ language used to access databases. ...@@ -1024,7 +1024,7 @@ language used to access databases.
@item @strong{MySQL} is Open Source Software @item @strong{MySQL} is Open Source Software
Open source means that it is possible for anyone to use and modify. Open source means that it is possible for anyone to use and modify.
Anybody can download @strong{MySQL} from the Internet and use it Anybody can download @strong{MySQL} from the Internet and use it
without paying anything. Anybody so inclined can study the source code without paying anything. Anybody so inclined can study the source code
and change it to fit their needs. @strong{MySQL} uses the GPL (GNU and change it to fit their needs. @strong{MySQL} uses the GPL (GNU
...@@ -1049,14 +1049,14 @@ under constant development, @strong{MySQL} today offers a rich and very ...@@ -1049,14 +1049,14 @@ under constant development, @strong{MySQL} today offers a rich and very
useful set of functions. The connectivity, speed and security makes useful set of functions. The connectivity, speed and security makes
@strong{MySQL} highly suited for accessing databases on the Internet. @strong{MySQL} highly suited for accessing databases on the Internet.
@item The technical features of @strong{MySQL} @item The technical features of @strong{MySQL}
For advanced technical information, see @ref{Reference}. @strong{MySQL} is For advanced technical information, see @ref{Reference}. @strong{MySQL} is
a client/server system that consists of a multithreaded SQL server a client/server system that consists of a multithreaded SQL server
that supports different backends, several different client programs and that supports different backends, several different client programs and
libraries, administrative tools, and a programming interface. libraries, administrative tools, and a programming interface.
@item @strong{MySQL} has a lot of contributed software available. @item @strong{MySQL} has a lot of contributed software available.
It is very likely that you will find that your favorite It is very likely that you will find that your favorite
application/language already supports @strong{MySQL}. application/language already supports @strong{MySQL}.
...@@ -1125,7 +1125,7 @@ version is produced using @code{texi2dvi} and @code{dvips}. The PDF ...@@ -1125,7 +1125,7 @@ version is produced using @code{texi2dvi} and @code{dvips}. The PDF
version is produced with @code{pdftex}. version is produced with @code{pdftex}.
This manual is written and maintained by David Axmark, Michael (Monty) This manual is written and maintained by David Axmark, Michael (Monty)
Widenius, Jeremy Cole, and Paul DuBois. For other contributors, Widenius, Jeremy Cole, and Paul DuBois. For other contributors,
see @ref{Credits}. see @ref{Credits}.
@node Manual conventions, , Manual-info, Manual-info @node Manual conventions, , Manual-info, Manual-info
...@@ -1231,14 +1231,14 @@ DROP TABLE [IF EXISTS] tbl_name ...@@ -1231,14 +1231,14 @@ DROP TABLE [IF EXISTS] tbl_name
When a syntax element consists of a number of alternatives, the alternatives When a syntax element consists of a number of alternatives, the alternatives
are separated by vertical bars (@samp{|}). When one member from a set of are separated by vertical bars (@samp{|}). When one member from a set of
choices @strong{may} be chosen, the alternatives are listed within square choices @strong{may} be chosen, the alternatives are listed within square
brackets (@samp{[} and @samp{]}): brackets (@samp{[} and @samp{]}):
@example @example
TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str) TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)
@end example @end example
When one member from a set of choices @strong{must} be chosen, the When one member from a set of choices @strong{must} be chosen, the
alternatives are listed within braces (@samp{@{} and @samp{@}}): alternatives are listed within braces (@samp{@{} and @samp{@}}):
@example @example
...@@ -1282,7 +1282,7 @@ English): ...@@ -1282,7 +1282,7 @@ English):
@item Downloadable examples @tab @uref{http://www.mysql.com/Contrib/Examples/samp_db.tar.gz, @code{samp_db.tar.gz}} @item Downloadable examples @tab @uref{http://www.mysql.com/Contrib/Examples/samp_db.tar.gz, @code{samp_db.tar.gz}}
@item Errata @tab @uref{http://www.mysql.com/documentation/pauls-mysql-book-errata.html, are available here} @item Errata @tab @uref{http://www.mysql.com/documentation/pauls-mysql-book-errata.html, are available here}
@end multitable @end multitable
Foreword by Michael ``Monty'' Widenius, @strong{MySQL} Moderator Foreword by Michael ``Monty'' Widenius, @strong{MySQL} Moderator
In @strong{MySQL}, Paul DuBois provides you with a comprehensive guide to In @strong{MySQL}, Paul DuBois provides you with a comprehensive guide to
one of the most popular relational database systems. Paul has one of the most popular relational database systems. Paul has
...@@ -1290,7 +1290,7 @@ contributed to the online documentation for @strong{MySQL}, and is an ...@@ -1290,7 +1290,7 @@ contributed to the online documentation for @strong{MySQL}, and is an
active member of the @strong{MySQL} community. The principal @strong{MySQL} active member of the @strong{MySQL} community. The principal @strong{MySQL}
developer, Monty Widenius, and a network of his fellow developers developer, Monty Widenius, and a network of his fellow developers
reviewed the manuscript, providing Paul with the kind of insight reviewed the manuscript, providing Paul with the kind of insight
no one else could supply. no one else could supply.
Instead of merely giving you a general overview of @strong{MySQL}, Paul Instead of merely giving you a general overview of @strong{MySQL}, Paul
teaches you how to make the most of its capabilities. Through two teaches you how to make the most of its capabilities. Through two
...@@ -1305,25 +1305,25 @@ references to column types, operators, functions, SQL syntax, ...@@ -1305,25 +1305,25 @@ references to column types, operators, functions, SQL syntax,
@strong{MySQL} simply gives you the kind of information you won't find @strong{MySQL} simply gives you the kind of information you won't find
anywhere else. anywhere else.
If you use @strong{MySQL}, this book provides you with: If you use @strong{MySQL}, this book provides you with:
@itemize @bullet @itemize @bullet
@item @item
An introduction to @strong{MySQL} and SQL An introduction to @strong{MySQL} and SQL
@item @item
Coverage of @strong{MySQL}'s data types and how to use them Coverage of @strong{MySQL}'s data types and how to use them
@item @item
Thorough treatment of how to write client programs in C Thorough treatment of how to write client programs in C
@item @item
A guide to using the Perl @code{DBI} and PHP APIs for developing A guide to using the Perl @code{DBI} and PHP APIs for developing
command-line and Web-based applications command-line and Web-based applications
@item @item
Tips on administrative issues such as user accounts, backup, Tips on administrative issues such as user accounts, backup,
crash recovery, and security crash recovery, and security
@item @item
Help in choosing an ISP for @strong{MySQL} access Help in choosing an ISP for @strong{MySQL} access
@item @item
A comprehensive reference for @strong{MySQL}'s data types, operators, A comprehensive reference for @strong{MySQL}'s data types, operators,
functions, and SQL statements and utilities functions, and SQL statements and utilities
@item @item
Complete reference guides for @strong{MySQL}'s C API, the Perl @code{DBI} API, Complete reference guides for @strong{MySQL}'s C API, the Perl @code{DBI} API,
and PHP's @strong{MySQL}-related functions and PHP's @strong{MySQL}-related functions
...@@ -1472,9 +1472,9 @@ connect to your @strong{MySQL} server. @xref{ODBC}. ...@@ -1472,9 +1472,9 @@ connect to your @strong{MySQL} server. @xref{ODBC}.
Very fast B-tree disk tables with index compression. Very fast B-tree disk tables with index compression.
@item @item
Up to 32 indexes per table are allowed. Each index may consist of 1 to 16 Up to 32 indexes per table are allowed. Each index may consist of 1 to 16
columns or parts of columns. The maximum index length is 500 bytes (this columns or parts of columns. The maximum index length is 500 bytes (this
may be changed when compiling @strong{MySQL}). An index may use a prefix may be changed when compiling @strong{MySQL}). An index may use a prefix
of a @code{CHAR} or @code{VARCHAR} field. of a @code{CHAR} or @code{VARCHAR} field.
@item @item
...@@ -1886,7 +1886,7 @@ Running @strong{MySQL} on MacOSX ...@@ -1886,7 +1886,7 @@ Running @strong{MySQL} on MacOSX
@item @item
@uref{http://www.supportwizard.com/, SupportWizard; Interactive helpdesk @uref{http://www.supportwizard.com/, SupportWizard; Interactive helpdesk
on the web (This product includes a licensed copy of @strong{MySQL})} on the web (This product includes a licensed copy of @strong{MySQL})}
@item @item
@uref{http://www.stweb.org/, StWeb} @uref{http://www.stweb.org/, StWeb}
StWeb - Stratos Web and Application server - an easy-to-use, cross StWeb - Stratos Web and Application server - an easy-to-use, cross
platform, Internet/Intranet development and deployment system for platform, Internet/Intranet development and deployment system for
...@@ -2039,7 +2039,7 @@ low-level and time-consuming CGI programs. ...@@ -2039,7 +2039,7 @@ low-level and time-consuming CGI programs.
@itemize @bullet @itemize @bullet
@item @item
@uref{http://www.mysql.com/dezign/index.html, "DeZign for @uref{http://www.mysql.com/dezign/index.html, "DeZign for
databases" is a database development tool using an databases" is a database development tool using an
entity relationship diagram (ERD).} entity relationship diagram (ERD).}
@end itemize @end itemize
...@@ -2053,7 +2053,7 @@ authentication module} ...@@ -2053,7 +2053,7 @@ authentication module}
@uref{http://www.roxen.com/, The Roxen Challenger Web server} @uref{http://www.roxen.com/, The Roxen Challenger Web server}
@end itemize @end itemize
@subheading Extensions for other programs @subheading Extensions for other programs
@itemize @bullet @itemize @bullet
@item @item
...@@ -2081,10 +2081,10 @@ Sendmail and Procmail} ...@@ -2081,10 +2081,10 @@ Sendmail and Procmail}
@item @item
@uref{http://users.ids.net/~bjepson/freeODBC/,The FreeODBC Pages} @uref{http://users.ids.net/~bjepson/freeODBC/,The FreeODBC Pages}
@item @item
@uref{http:/http://genix.net/unixODBC/,unixodbc} @uref{http:/http://genix.net/unixODBC/,unixodbc}
The unixODBC Project goals are to develop and promote unixODBC to be the The unixODBC Project goals are to develop and promote unixODBC to be the
definitive standard for ODBC on the Linux platform. definitive standard for ODBC on the Linux platform.
This is to include GUI support for KDE. This is to include GUI support for KDE.
@item @item
@uref{http://www.sw-soft.com/products/BtrieveODBC/} @uref{http://www.sw-soft.com/products/BtrieveODBC/}
A @strong{MySQL}-based ODBC drivers for Btrieve A @strong{MySQL}-based ODBC drivers for Btrieve
...@@ -2105,7 +2105,7 @@ Partially implemented TDataset-compatible components for @strong{MySQL}. ...@@ -2105,7 +2105,7 @@ Partially implemented TDataset-compatible components for @strong{MySQL}.
@uref{http://www.riverstyx.net/qpopmysql/,qpopmysql} @uref{http://www.riverstyx.net/qpopmysql/,qpopmysql}
A patch to allow POP3 authentication from a @strong{MySQL} database. A patch to allow POP3 authentication from a @strong{MySQL} database.
There's also a link to Paul Khavkine's patch for Procmail to allow There's also a link to Paul Khavkine's patch for Procmail to allow
any MTA to deliver to users in a @strong{MySQL} database. any MTA to deliver to users in a @strong{MySQL} database.
@item @item
@uref{http://www.pbc.ottawa.on.ca,Visual Basic class generator for Active X} @uref{http://www.pbc.ottawa.on.ca,Visual Basic class generator for Active X}
@item @item
...@@ -2238,7 +2238,7 @@ same (or similar) query. Uses PHP and @strong{MySQL}. ...@@ -2238,7 +2238,7 @@ same (or similar) query. Uses PHP and @strong{MySQL}.
A technology news site using @strong{MySQL} and PHP A technology news site using @strong{MySQL} and PHP
@item @item
@c Added 990604 @c Added 990604
@c EMAIL: ah@dybdahl.dk @c EMAIL: ah@dybdahl.dk
@uref{http://www.jokes2000.com/scripts/, Example scripts at Jokes2000} @uref{http://www.jokes2000.com/scripts/, Example scripts at Jokes2000}
@item @item
@uref{http://www.linuxsupportline.com/~kalendar/ KDE based calendar manager} @uref{http://www.linuxsupportline.com/~kalendar/ KDE based calendar manager}
...@@ -2408,8 +2408,8 @@ A digest version of the @code{msql-mysql-modules} list. ...@@ -2408,8 +2408,8 @@ A digest version of the @code{msql-mysql-modules} list.
You subscribe or unsubscribe to all lists in the same way as described You subscribe or unsubscribe to all lists in the same way as described
above. In your subscribe or unsubscribe message, just put the appropriate above. In your subscribe or unsubscribe message, just put the appropriate
mailing list name rather than @code{mysql}. For example, to subscribe to or mailing list name rather than @code{mysql}. For example, to subscribe to or
unsubscribe from the @code{myodbc} list, send a message to unsubscribe from the @code{myodbc} list, send a message to
@email{myodbc-subscribe@@lists.mysql.com} or @email{myodbc-subscribe@@lists.mysql.com} or
@email{myodbc-unsubscribe@@lists.mysql.com}. @email{myodbc-unsubscribe@@lists.mysql.com}.
@cindex Net etiquette @cindex Net etiquette
...@@ -2624,7 +2624,7 @@ etc.! These cases are rare, perhaps, but it is better to be safe than ...@@ -2624,7 +2624,7 @@ etc.! These cases are rare, perhaps, but it is better to be safe than
sorry. After all, it should be easier for you to provide an example that sorry. After all, it should be easier for you to provide an example that
uses your actual situation and it is by all means better for us. In case you uses your actual situation and it is by all means better for us. In case you
have data you don't want to show to others, you can use @code{ftp} to have data you don't want to show to others, you can use @code{ftp} to
transfer it to @uref{ftp://support.mysql.com/pub/mysql/secret/}. If the data transfer it to @uref{ftp://support.mysql.com/pub/mysql/secret/}. If the data
are really top secret and you don't want to show them even to us, then go ahead are really top secret and you don't want to show them even to us, then go ahead
and provide an example using other names, but please regard this as the last and provide an example using other names, but please regard this as the last
choice. choice.
...@@ -2672,7 +2672,7 @@ where the patch won't work, the patch may be useless. ...@@ -2672,7 +2672,7 @@ where the patch won't work, the patch may be useless.
@item @item
Guesses about what the bug is, why it occurs, or what it depends on, Guesses about what the bug is, why it occurs, or what it depends on,
are usually wrong. Even the MySQL team can't guess such things without are usually wrong. Even the MySQL team can't guess such things without
first using a debugger to determine the real cause of a bug. first using a debugger to determine the real cause of a bug.
@item @item
...@@ -2685,8 +2685,8 @@ If you get a @code{parse error}, please check your syntax closely! If ...@@ -2685,8 +2685,8 @@ If you get a @code{parse error}, please check your syntax closely! If
you can't find something wrong with it, it's extremely likely that your you can't find something wrong with it, it's extremely likely that your
current version of @strong{MySQL} doesn't support the query you are current version of @strong{MySQL} doesn't support the query you are
using. If you are using the current version and the manual at using. If you are using the current version and the manual at
@uref{http://www.mysql.com/documentation/manual.php} doesn't cover the @uref{http://www.mysql.com/documentation/manual.php} doesn't cover the
syntax you are using, @strong{MySQL} doesn't support your query. In this syntax you are using, @strong{MySQL} doesn't support your query. In this
case, your only options are to implement the syntax yourself or email case, your only options are to implement the syntax yourself or email
@email{mysql-licensing@@mysql.com} and ask for an offer to implement it! @email{mysql-licensing@@mysql.com} and ask for an offer to implement it!
...@@ -2792,7 +2792,7 @@ Basically, our licensing policy and intepretation of the GPL is as follows: ...@@ -2792,7 +2792,7 @@ Basically, our licensing policy and intepretation of the GPL is as follows:
Note that older versions of @strong{MySQL} are still using a more strict Note that older versions of @strong{MySQL} are still using a more strict
license. See the documentation for that version for more information. license. See the documentation for that version for more information.
If you need a commercial @strong{MySQL} license, because the GPL license If you need a commercial @strong{MySQL} license, because the GPL license
doesn't suit your application, you can buy one at doesn't suit your application, you can buy one at
https://order.mysql.com/license.htmy. https://order.mysql.com/license.htmy.
For normal internal use, @strong{MySQL} costs nothing. You do not have For normal internal use, @strong{MySQL} costs nothing. You do not have
...@@ -2814,7 +2814,7 @@ You have a commercial application that ONLY works with @strong{MySQL} ...@@ -2814,7 +2814,7 @@ You have a commercial application that ONLY works with @strong{MySQL}
and ships the application with the @strong{MySQL} server. This is and ships the application with the @strong{MySQL} server. This is
because we view this a linking even if it is done over the network. because we view this a linking even if it is done over the network.
@item @item
You have a distribution of @code{MySQL} and you don't provide the You have a distribution of @code{MySQL} and you don't provide the
source code for your copy of the @strong{MySQL} server, as defined in source code for your copy of the @strong{MySQL} server, as defined in
the GPL license. the GPL license.
...@@ -2885,7 +2885,7 @@ by the ``GNU LIBRARY GENERAL PUBLIC LICENSE''. ...@@ -2885,7 +2885,7 @@ by the ``GNU LIBRARY GENERAL PUBLIC LICENSE''.
@item Some parts of the source (the @code{regexp} library) are covered @item Some parts of the source (the @code{regexp} library) are covered
by a Berkeley-style copyright. by a Berkeley-style copyright.
@item @item
All the source in the server and the (GNU @code{readline}) library All the source in the server and the (GNU @code{readline}) library
is covered by the ``GNU GENERAL PUBLIC LICENSE''. @xref{GPL is covered by the ``GNU GENERAL PUBLIC LICENSE''. @xref{GPL
license}. This is also available as the file @file{COPYING} in the license}. This is also available as the file @file{COPYING} in the
...@@ -2898,7 +2898,7 @@ so that it is possible to add @strong{MySQL} support in commercial products ...@@ -2898,7 +2898,7 @@ so that it is possible to add @strong{MySQL} support in commercial products
without any license. So in this case we choose the LGPL license. without any license. So in this case we choose the LGPL license.
This means that you can use @strong{MySQL} for free with any program that uses This means that you can use @strong{MySQL} for free with any program that uses
any of the free software licences. @strong{MySQL} is also free for any end any of the free software licences. @strong{MySQL} is also free for any end
user for his own or company usage. user for his own or company usage.
But if you use @strong{MySQL} for something important to you, you may But if you use @strong{MySQL} for something important to you, you may
...@@ -3159,7 +3159,7 @@ Voice Phone +46-18-10 22 80 ...@@ -3159,7 +3159,7 @@ Voice Phone +46-18-10 22 80
Basic email support is a very inexpensive support option and should be Basic email support is a very inexpensive support option and should be
thought of more as a way to support our development of @strong{MySQL} thought of more as a way to support our development of @strong{MySQL}
than as a real support option. We at @strong{MySQL} do give a lot of free than as a real support option. We at @strong{MySQL} do give a lot of free
support in all the different @strong{MySQL} lists and the money we get from support in all the different @strong{MySQL} lists and the money we get from
basic email support is largely used to make this possible. basic email support is largely used to make this possible.
...@@ -3358,7 +3358,7 @@ encounter per year, but we are as always very flexible towards our customers! ...@@ -3358,7 +3358,7 @@ encounter per year, but we are as always very flexible towards our customers!
* Source install system issues:: System-specific issues * Source install system issues:: System-specific issues
* Win32:: Win32 notes * Win32:: Win32 notes
* OS/2:: OS/2 notes * OS/2:: OS/2 notes
* MySQL binaries:: * MySQL binaries::
* Post-installation:: Post-installation setup and testing * Post-installation:: Post-installation setup and testing
* Upgrade:: Is there anything special to do when upgrading/downgrading @strong{MySQL}? * Upgrade:: Is there anything special to do when upgrading/downgrading @strong{MySQL}?
@end menu @end menu
...@@ -3413,34 +3413,34 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3413,34 +3413,34 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@item @item
@c EMAIL: sl@iuinfo.tuwien.ac.at (Tony Sprinzl) @c EMAIL: sl@iuinfo.tuwien.ac.at (Tony Sprinzl)
@image{Flags/austria} Austria [Univ. of Technology/Vienna] @ @image{Flags/austria} Austria [Univ. of Technology/Vienna] @
@uref{http://gd.tuwien.ac.at/db/mysql/, WWW} @uref{http://gd.tuwien.ac.at/db/mysql/, WWW}
@uref{ftp://gd.tuwien.ac.at/db/mysql/, FTP} @uref{ftp://gd.tuwien.ac.at/db/mysql/, FTP}
@item @item
@c EMAIL: delian@naturella.com (Delian Delchev) @c EMAIL: delian@naturella.com (Delian Delchev)
@image{Flags/bulgaria} Bulgaria [Naturella] @ @image{Flags/bulgaria} Bulgaria [Naturella] @
@uref{http://archive.nat.bg/pub/mirror/mysql/, WWW} @uref{http://archive.nat.bg/pub/mirror/mysql/, WWW}
@uref{ftp://ftp.ntrl.net/pub/mirror/mysql/, FTP} @uref{ftp://ftp.ntrl.net/pub/mirror/mysql/, FTP}
@item @item
@c Added: 990614 @c Added: 990614
@c EMAIL: vuksan@veus.hr (Vladimir Vuksan) @c EMAIL: vuksan@veus.hr (Vladimir Vuksan)
@image{Flags/croatia} Croatia [HULK] @ @image{Flags/croatia} Croatia [HULK] @
@uref{http://ftp.linux.hr/pub/mysql/, WWW} @uref{http://ftp.linux.hr/pub/mysql/, WWW}
@uref{ftp://ftp.linux.hr/pub/mysql/, FTP} @uref{ftp://ftp.linux.hr/pub/mysql/, FTP}
@item @item
@c Added: 990614 @c Added: 990614
@c EMAIL: kas@informatics.muni.cz (Jan Kasprzak) @c EMAIL: kas@informatics.muni.cz (Jan Kasprzak)
@image{Flags/czech-republic} Czech Republic [Masaryk University in Brno] @ @image{Flags/czech-republic} Czech Republic [Masaryk University in Brno] @
@uref{http://mysql.linux.cz/index.html, WWW} @uref{http://mysql.linux.cz/index.html, WWW}
@uref{ftp://ftp.fi.muni.cz/pub/mysql/, FTP} @uref{ftp://ftp.fi.muni.cz/pub/mysql/, FTP}
@item @item
@c Added: 990920 @c Added: 990920
@c EMAIL: <radek@sopik.cz> (Radek Libovicky) @c EMAIL: <radek@sopik.cz> (Radek Libovicky)
@image{Flags/czech-republic} Czech Republic [www.sopik.cz] @ @image{Flags/czech-republic} Czech Republic [www.sopik.cz] @
@uref{http://www.mysql.cz/, WWW} @uref{http://www.mysql.cz/, WWW}
@item @item
...@@ -3454,30 +3454,30 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3454,30 +3454,30 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@c removed 991020 (no DNS entry). New name 991026. Added 991121 @c removed 991020 (no DNS entry). New name 991026. Added 991121
@c Statistics at http://mirror.borsen.dk/ @c Statistics at http://mirror.borsen.dk/
@c EMAIL: mirrorman@borsen.dk (Michael Kyed) @c EMAIL: mirrorman@borsen.dk (Michael Kyed)
@image{Flags/denmark} Denmark [Borsen] @ @image{Flags/denmark} Denmark [Borsen] @
@uref{ http://mysql.borsen.dk/, WWW} @uref{ http://mysql.borsen.dk/, WWW}
@item @item
@c EMAIL: mkp@socsci.auc.dk (Martin Kasper Petersen) @c EMAIL: mkp@socsci.auc.dk (Martin Kasper Petersen)
@image{Flags/denmark} Denmark [SunSITE] @ @image{Flags/denmark} Denmark [SunSITE] @
@uref{http://SunSITE.auc.dk/mysql/, WWW} @uref{http://SunSITE.auc.dk/mysql/, WWW}
@uref{ftp://SunSITE.auc.dk/pub/databases/mysql/, FTP} @uref{ftp://SunSITE.auc.dk/pub/databases/mysql/, FTP}
@c @item @c @item
@c Tõnu does not work there anymore :-) 990720 @c Tõnu does not work there anymore :-) 990720
@c EMAIL: tonu@tradenet.ee (Tõnu Samuel) @c EMAIL: tonu@tradenet.ee (Tõnu Samuel)
@c @image{Flags/estonia} Estonia [Tradenet] @ @c @image{Flags/estonia} Estonia [Tradenet] @
@c @uref{http://mysql.tradenet.ee, WWW} @c @uref{http://mysql.tradenet.ee, WWW}
@item @item
@c EMAIL: tonu@spamm.ee (Tõnu Samuel) @c EMAIL: tonu@spamm.ee (Tõnu Samuel)
@image{Flags/estonia} Estonia [OKinteractive] @ @image{Flags/estonia} Estonia [OKinteractive] @
@uref{http://mysql.mirror.ok.ee, WWW} @uref{http://mysql.mirror.ok.ee, WWW}
@item @item
@c Changed 990531 @c Changed 990531
@c EMAIL: Steeve.Devergne@minet.net (Steeve Devergne) @c EMAIL: Steeve.Devergne@minet.net (Steeve Devergne)
@image{Flags/france} France [minet] @ @image{Flags/france} France [minet] @
@uref{http://www.minet.net/devel/mysql/, WWW} @uref{http://www.minet.net/devel/mysql/, WWW}
@item @item
...@@ -3494,125 +3494,125 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3494,125 +3494,125 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@item @item
@c Added 981208 @c Added 981208
@c EMAIL: noel@uni-bonn.de (Noel Koethe) @c EMAIL: noel@uni-bonn.de (Noel Koethe)
@image{Flags/germany} Germany [Bonn University, Bonn] @ @image{Flags/germany} Germany [Bonn University, Bonn] @
@uref{http://www.wipol.uni-bonn.de/MySQL//, WWW} @uref{http://www.wipol.uni-bonn.de/MySQL//, WWW}
@uref{ftp://ftp.wipol.uni-bonn.de/pub/mirror/MySQL/, FTP} @uref{ftp://ftp.wipol.uni-bonn.de/pub/mirror/MySQL/, FTP}
@item @item
@c EMAIL: th@rz.fh-wolfenbuettel.de (Thorsten Ludewig) @c EMAIL: th@rz.fh-wolfenbuettel.de (Thorsten Ludewig)
@image{Flags/germany} Germany [Wolfenbuettel] @ @image{Flags/germany} Germany [Wolfenbuettel] @
@uref{http://www.fh-wolfenbuettel.de/ftp/pub/database/mysql/, WWW} @uref{http://www.fh-wolfenbuettel.de/ftp/pub/database/mysql/, WWW}
@uref{ftp://ftp.fh-wolfenbuettel.de/pub/database/mysql/, FTP} @uref{ftp://ftp.fh-wolfenbuettel.de/pub/database/mysql/, FTP}
@item @item
@c Ok 980114. Removed 981208 (down > 3 days) ok 981214 @c Ok 980114. Removed 981208 (down > 3 days) ok 981214
@c EMAIL: straub@gks.de (Hans-Peter Straub) @c EMAIL: straub@gks.de (Hans-Peter Straub)
@image{Flags/germany} Germany [Staufen] @ @image{Flags/germany} Germany [Staufen] @
@uref{http://mysql.staufen.de/, WWW} @uref{http://mysql.staufen.de/, WWW}
@item @item
@c Added 990614 @c Added 990614
@c EMAIL: thomas.rohde@ecrc.de (Thomas Rohde) @c EMAIL: thomas.rohde@ecrc.de (Thomas Rohde)
@image{Flags/germany} Germany [Cable & Wireless] @ @image{Flags/germany} Germany [Cable & Wireless] @
@uref{ftp://ftp.ecrc.net/pub/database/mysql/, FTP} @uref{ftp://ftp.ecrc.net/pub/database/mysql/, FTP}
@item @item
@c Added 981208 @c Added 981208
@c EMAIL: christias@noc.ntua.gr (Panagiotis Christias) @c EMAIL: christias@noc.ntua.gr (Panagiotis Christias)
@image{Flags/greece} Greece [NTUA, Athens] @ @image{Flags/greece} Greece [NTUA, Athens] @
@uref{http://www.ntua.gr/mysql/, WWW} @uref{http://www.ntua.gr/mysql/, WWW}
@uref{ftp://ftp.ntua.gr/pub/databases/mysql/, FTP} @uref{ftp://ftp.ntua.gr/pub/databases/mysql/, FTP}
@c @item @c @item
@c File not found 990730 @c File not found 990730
@c EMAIL: torlasz@xenia.sote.hu (Laszlo L. Tornoc) @c EMAIL: torlasz@xenia.sote.hu (Laszlo L. Tornoc)
@c @image{Flags/hungary} Hungary [Xenia] @ @c @image{Flags/hungary} Hungary [Xenia] @
@c @uref{http://xenia.sote.hu/ftp/mirrors/www.mysql.com/, WWW} @c @uref{http://xenia.sote.hu/ftp/mirrors/www.mysql.com/, WWW}
@c @uref{ftp://xenia.sote.hu/pub/mirrors/www.mysql.com/,FTP} @c @uref{ftp://xenia.sote.hu/pub/mirrors/www.mysql.com/,FTP}
@item @item
@c EMAIL: mirrors@gm.is (Tomas Edwardsson) @c EMAIL: mirrors@gm.is (Tomas Edwardsson)
@image{Flags/iceland} Island [GM] @ @image{Flags/iceland} Island [GM] @
@uref{http://mysql.gm.is/, WWW} @uref{http://mysql.gm.is/, WWW}
@uref{ftp://ftp.gm.is/pub/mysql, WWW} @uref{ftp://ftp.gm.is/pub/mysql, WWW}
@c @item @c @item
@c Out of date 990906 @c Out of date 990906
@c EMAIL: bourbon@netvision.net.il (Zeev Suraski) @c EMAIL: bourbon@netvision.net.il (Zeev Suraski)
@c @image{Flags/israel} Israel [Netvision] @ @c @image{Flags/israel} Israel [Netvision] @
@c @uref{http://mysql.netvision.net.il/, WWW} @c @uref{http://mysql.netvision.net.il/, WWW}
@c @item @c @item
@c Not working 99.03.06 @c Not working 99.03.06
@c EMAIL: maruzz@matrice.it (Giovanni Maruzzelli) @c EMAIL: maruzz@matrice.it (Giovanni Maruzzelli)
@c @image{Flags/italy} Italy [Matrice] @ @c @image{Flags/italy} Italy [Matrice] @
@c @uref{http://www.matrice.it/risorse/mysql/, WWW} @c @uref{http://www.matrice.it/risorse/mysql/, WWW}
@item @item
@c EMAIL: irena@yacc.it @c EMAIL: irena@yacc.it
@image{Flags/italy} Italy [Teta Srl] @ @image{Flags/italy} Italy [Teta Srl] @
@uref{http://www.teta.it/mysql/, WWW} @uref{http://www.teta.it/mysql/, WWW}
@item @item
@c Added 991121 @c Added 991121
@c EMAIL: nick@iol.ie (Nick Hilliard) @c EMAIL: nick@iol.ie (Nick Hilliard)
@image{Flags/ireland} Ireland [Ireland On-Line/Dublin] @ @image{Flags/ireland} Ireland [Ireland On-Line/Dublin] @
@uref{http://mysql.iol.ie, WWW} @uref{http://mysql.iol.ie, WWW}
@uref{ftp://ftp.iol.ie/pub/mysql, FTP} @uref{ftp://ftp.iol.ie/pub/mysql, FTP}
@item @item
@c EMAIL: W.Sylwestrzak@icm.edu.pl (Wojtek Sylwestrzak) @c EMAIL: W.Sylwestrzak@icm.edu.pl (Wojtek Sylwestrzak)
@c mirroring nightly at 05:25 @c mirroring nightly at 05:25
@image{Flags/poland} Poland [Sunsite] @ @image{Flags/poland} Poland [Sunsite] @
@uref{http://sunsite.icm.edu.pl/mysql/, WWW} @uref{http://sunsite.icm.edu.pl/mysql/, WWW}
@uref{ftp://sunsite.icm.edu.pl/pub/unix/mysql/, FTP} @uref{ftp://sunsite.icm.edu.pl/pub/unix/mysql/, FTP}
@c @item @c @item
@c EMAIL: melo@co.telenet.pt (Pedro Melo) @c EMAIL: melo@co.telenet.pt (Pedro Melo)
@c Temp out of service (email from Pedro) @c Temp out of service (email from Pedro)
@c @image{Flags/portugal} Portugal [IP] @ @c @image{Flags/portugal} Portugal [IP] @
@c @uref{http://mysql.ip.pt, WWW} @c @uref{http://mysql.ip.pt, WWW}
@item @item
@c EMAIL: Equipa de suporte do Leirianet <support@leirianet.pt> @c EMAIL: Equipa de suporte do Leirianet <support@leirianet.pt>
@image{Flags/portugal} Portugal [lerianet] @ @image{Flags/portugal} Portugal [lerianet] @
@uref{http://mysql.leirianet.pt, WWW} @uref{http://mysql.leirianet.pt, WWW}
@uref{ftp://ftp.leirianet.pt/pub/mysql/,FTP} @uref{ftp://ftp.leirianet.pt/pub/mysql/,FTP}
@item @item
@c EMAIL: kuzmin@dn.ru (Roma Kuzmin) @c EMAIL: kuzmin@dn.ru (Roma Kuzmin)
@image{Flags/russia} Russia [DirectNet] @ @image{Flags/russia} Russia [DirectNet] @
@uref{http://mysql.directnet.ru, WWW} @uref{http://mysql.directnet.ru, WWW}
@uref{ftp://ftp.dn.ru/pub/MySQL, FTP} @uref{ftp://ftp.dn.ru/pub/MySQL, FTP}
@c @item @c @item
@c down 990113 @c down 990113
@c EMAIL: nikkic@cityline.ru (Nikki Chumakov) @c EMAIL: nikkic@cityline.ru (Nikki Chumakov)
@c @image{Flags/russia} Russia [Cityline] @ @c @image{Flags/russia} Russia [Cityline] @
@c @uref{ftp://mysql.cityline.ru/pub/mysql, FTP} @c @uref{ftp://mysql.cityline.ru/pub/mysql, FTP}
@c @uref{http://mysql.cityline.ru, WWW} @c @uref{http://mysql.cityline.ru, WWW}
@c EMAIL: bar@izhcom.ru (Alexander I Barkov) @c EMAIL: bar@izhcom.ru (Alexander I Barkov)
@item @item
@image{Flags/russia} Russia [IZHCOM] @ @image{Flags/russia} Russia [IZHCOM] @
@uref{http://mysql.udm.net/, WWW} @uref{http://mysql.udm.net/, WWW}
@uref{ftp://ftp.izhcom.ru/pub/mysql/,FTP} @uref{ftp://ftp.izhcom.ru/pub/mysql/,FTP}
@item @item
@c Added 990507 @c Added 990507
@c EMAIL: demon@gpad.ac.ru (Dima Sivachenko) @c EMAIL: demon@gpad.ac.ru (Dima Sivachenko)
@image{Flags/russia} Russia [Scientific Center/Chernogolovka] @ @image{Flags/russia} Russia [Scientific Center/Chernogolovka] @
@uref{ftp://ftp.chg.ru/pub/databases/mysql/, FTP} @uref{ftp://ftp.chg.ru/pub/databases/mysql/, FTP}
@item @item
@c EMAIL: sebi@dnttm.ro (Sebastian DEAC) @c EMAIL: sebi@dnttm.ro (Sebastian DEAC)
@image{Flags/romania} Romania [Timisoara] @ @image{Flags/romania} Romania [Timisoara] @
@uref{http://www.dnttm.ro/mysql, WWW} @uref{http://www.dnttm.ro/mysql, WWW}
@uref{ftp://ftp.dnttm.ro/pub/mysql, FTP} @uref{ftp://ftp.dnttm.ro/pub/mysql, FTP}
@item @item
@c EMAIL: tim@lbi.ro (Bogdan Surdu) @c EMAIL: tim@lbi.ro (Bogdan Surdu)
@image{Flags/romania} Romania [Bucharest] @ @image{Flags/romania} Romania [Bucharest] @
@uref{http://www.lbi.ro/MySQL, WWW} @uref{http://www.lbi.ro/MySQL, WWW}
@uref{ftp://ftp.lbi.ro/mirrors/ftp.tcx.se, FTP} @uref{ftp://ftp.lbi.ro/mirrors/ftp.tcx.se, FTP}
...@@ -3625,36 +3625,36 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3625,36 +3625,36 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@item @item
@c EMAIL: Patrik.Karen@sdi.slu.se (Patrik Karen) @c EMAIL: Patrik.Karen@sdi.slu.se (Patrik Karen)
@c ftp -> remove old files @c ftp -> remove old files
@image{Flags/sweden} Sweden [Sunet] @ @image{Flags/sweden} Sweden [Sunet] @
@uref{http://ftp.sunet.se/pub/unix/databases/relational/mysql/, WWW} @uref{http://ftp.sunet.se/pub/unix/databases/relational/mysql/, WWW}
@uref{ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/, FTP} @uref{ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/, FTP}
@item @item
@c EMAIL: archive@sunsite.cnlab-switch.ch (Thomas Lenggenhager) @c EMAIL: archive@sunsite.cnlab-switch.ch (Thomas Lenggenhager)
@image{Flags/switzerland} Switzerland [Sunsite] @ @image{Flags/switzerland} Switzerland [Sunsite] @
@uref{http://sunsite.cnlab-switch.ch/ftp/mirror/mysql/, WWW} @uref{http://sunsite.cnlab-switch.ch/ftp/mirror/mysql/, WWW}
@uref{ftp://sunsite.cnlab-switch.ch/mirror/mysql/, FTP} @uref{ftp://sunsite.cnlab-switch.ch/mirror/mysql/, FTP}
@c @item @c @item
@c @c simon@oyster.co.uk (Simon Gornall) @c @c simon@oyster.co.uk (Simon Gornall)
@c @image{Flags/great-britain} UK [Oyster/UK] @ @c @image{Flags/great-britain} UK [Oyster/UK] @
@c @uref{ftp://ftp.oyster.co.uk/pub/mysql, FTP} @c @uref{ftp://ftp.oyster.co.uk/pub/mysql, FTP}
@item @item
@c gareth@omnipotent.net (Gareth Watts) @c gareth@omnipotent.net (Gareth Watts)
@image{Flags/great-britain} UK [Omnipotent/UK] @ @image{Flags/great-britain} UK [Omnipotent/UK] @
@uref{http://mysql.omnipotent.net/, WWW} @uref{http://mysql.omnipotent.net/, WWW}
@uref{ftp://mysql.omnipotent.net/, FTP} @uref{ftp://mysql.omnipotent.net/, FTP}
@item @item
@c keet@mordor.plig.net (Christiaan Keet) @c keet@mordor.plig.net (Christiaan Keet)
@image{Flags/great-britain} UK [PLiG/UK] @ @image{Flags/great-britain} UK [PLiG/UK] @
@uref{http://ftp.plig.org/pub/mysql/, WWW} @uref{http://ftp.plig.org/pub/mysql/, WWW}
@uref{ftp://ftp.plig.org/pub/mysql/, FTP} @uref{ftp://ftp.plig.org/pub/mysql/, FTP}
@c @item @c @item
@c unknown @c unknown
@c @image{Flags/great-britain} UK [MicroMuse] @ @c @image{Flags/great-britain} UK [MicroMuse] @
@c @uref{ftp://ftp.micromuse.co.uk/pub/packages/unix/databases/mysql/, FTP} @c @uref{ftp://ftp.micromuse.co.uk/pub/packages/unix/databases/mysql/, FTP}
@item @item
...@@ -3677,79 +3677,79 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3677,79 +3677,79 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@c @item @c @item
@c Not ok 990101 (only to 981007) @c Not ok 990101 (only to 981007)
@c EMAIL: sysop@polarcom.com (Seamus Venasse) @c EMAIL: sysop@polarcom.com (Seamus Venasse)
@c @image{Flags/canada} Canada [Polaris Computing] @ @c @image{Flags/canada} Canada [Polaris Computing] @
@c @uref{http://mysql.polaris.ca/, WWW} @c @uref{http://mysql.polaris.ca/, WWW}
@item @item
@c Ok 980109 @c Ok 980109
@c EMAIL: wojtek@tryc.on.ca (Wojtjeck Tryc) @c EMAIL: wojtek@tryc.on.ca (Wojtjeck Tryc)
@image{Flags/canada} Canada [Tryc] @ @image{Flags/canada} Canada [Tryc] @
@uref{http://web.tryc.on.ca/mysql/, WWW} @uref{http://web.tryc.on.ca/mysql/, WWW}
@item @item
@c not updated 990218. Added again 990918 @c not updated 990218. Added again 990918
@c EMAIL: rhooper@cyberus.ca (Roy Hooper) @c EMAIL: rhooper@cyberus.ca (Roy Hooper)
@image{Flags/canada} Canada [Cyberus] @ @image{Flags/canada} Canada [Cyberus] @
@uref{http://mysql.cyberus.ca/, WWW} @uref{http://mysql.cyberus.ca/, WWW}
@uref{ftp://mysql.cyberus.ca/, FTP} @uref{ftp://mysql.cyberus.ca/, FTP}
@item @item
@c EMAIL: mleber@he.net (Mike Leber) @c EMAIL: mleber@he.net (Mike Leber)
@c Added 980312 @c Added 980312
@image{Flags/usa} USA [Hurricane Electric/San Jose] @ @image{Flags/usa} USA [Hurricane Electric/San Jose] @
@uref{http://mysql.he.net, WWW} @uref{http://mysql.he.net, WWW}
@item @item
@c EMAIL: meltzer@icsnet.com (Jeffrey Meltzer) @c EMAIL: meltzer@icsnet.com (Jeffrey Meltzer)
@c Added 000108 @c Added 000108
@image{Flags/usa} USA [Meltzer/New York State] @ @image{Flags/usa} USA [Meltzer/New York State] @
@uref{ftp://ftp.meltzer.org/pub/mysql/, FTP} @uref{ftp://ftp.meltzer.org/pub/mysql/, FTP}
@c @item @c @item
@c No such directory 990830 @c No such directory 990830
@c EMAIL: tps@users.buoy.com (Tim Sailer) @c EMAIL: tps@users.buoy.com (Tim Sailer)
@c @image{Flags/usa} USA [Buoy/New York] @ @c @image{Flags/usa} USA [Buoy/New York] @
@c @uref{http://www.buoy.com/mysql/, WWW} @c @uref{http://www.buoy.com/mysql/, WWW}
@c @item @c @item
@c EMAIL: db@hpnc.com (Douglas Bowyer) @c EMAIL: db@hpnc.com (Douglas Bowyer)
@c Added 980107, removed 981124 because of 'file not found' @c Added 980107, removed 981124 because of 'file not found'
@c @image{Flags/usa} USA [Hypernet Communications/Dallas] @ @c @image{Flags/usa} USA [Hypernet Communications/Dallas] @
@c @uref{http://epsilon.hpnc.com/mysql, WWW} @c @uref{http://epsilon.hpnc.com/mysql, WWW}
@c @item @c ********************************** @c @item @c **********************************
@c Not updated 980106 @c Not updated 980106
@c EX: twh@iquest.net (Thomas Holt) who no longer works there @c EX: twh@iquest.net (Thomas Holt) who no longer works there
@c @image{Flags/usa} USA [IQuest/Indiana] @ @c @image{Flags/usa} USA [IQuest/Indiana] @
@c @uref{http://mirrors.iquest.net/mysql/, WWW} @c @uref{http://mirrors.iquest.net/mysql/, WWW}
@c @item @c ********************************** @c @item @c **********************************
@c Only a partial mirror so we exclude it from the list @c Only a partial mirror so we exclude it from the list
@c EX: lindberg@id.wustl.edu (Fred Lindberg) @c EX: lindberg@id.wustl.edu (Fred Lindberg)
@c @image{Flags/usa} USA [Washington University/St. Louis] @ @c @image{Flags/usa} USA [Washington University/St. Louis] @
@c @uref{ftp://ftp.id.wustl.edu/pub/database/mysql/, FTP} @c @uref{ftp://ftp.id.wustl.edu/pub/database/mysql/, FTP}
@c removed 991111 -> no answer @c removed 991111 -> no answer
@c @item @c @item
@c EMAIL: andrew@netcasting.net (Andrew Sawyers) @c EMAIL: andrew@netcasting.net (Andrew Sawyers)
@c @image{Flags/usa} USA [Netcasting/West Coast] @ @c @image{Flags/usa} USA [Netcasting/West Coast] @
@c @uref{ftp://ftp.netcasting.net/pub/mysql/, FTP} @c @uref{ftp://ftp.netcasting.net/pub/mysql/, FTP}
@c @item @c @item
@c No mirror! 980809 David @c No mirror! 980809 David
@c EMAIL: savages@savages.com (Shaun Savage) @c EMAIL: savages@savages.com (Shaun Savage)
@c @image{Flags/usa} USA [Savages/Oregon] @ @c @image{Flags/usa} USA [Savages/Oregon] @
@c @uref{http://mysql.savages.com, WWW} @c @uref{http://mysql.savages.com, WWW}
@item @item
@c EMAIL: tcobb@staff.circle.net (Troy Cobb) @c EMAIL: tcobb@staff.circle.net (Troy Cobb)
@image{Flags/usa} USA [Circle Net/North Carolina] @ @image{Flags/usa} USA [Circle Net/North Carolina] @
@uref{http://www.mysql.net, WWW} @uref{http://www.mysql.net, WWW}
@item @item
@c EMAIL: paul@gina.net (Paul Vining) @c EMAIL: paul@gina.net (Paul Vining)
@c mirrors ftp.sunet.se @c mirrors ftp.sunet.se
@image{Flags/usa} USA [Gina net/Florida] @ @image{Flags/usa} USA [Gina net/Florida] @
@uref{http://www.gina.net/mysql/, WWW} @uref{http://www.gina.net/mysql/, WWW}
@c Out of date 2000-01-08 (Not updated since 1999-10) @c Out of date 2000-01-08 (Not updated since 1999-10)
...@@ -3767,7 +3767,7 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3767,7 +3767,7 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@item @item
@c EMAIL: ftp-admin@digex.net @c EMAIL: ftp-admin@digex.net
@image{Flags/usa} USA [DIGEX] @ @image{Flags/usa} USA [DIGEX] @
@uref{ftp://ftp.digex.net/pub/packages/database/mysql/, FTP} @uref{ftp://ftp.digex.net/pub/packages/database/mysql/, FTP}
@item @item
...@@ -3783,18 +3783,18 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3783,18 +3783,18 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@itemize @bullet @itemize @bullet
@item @item
@c EMAIL: gaiser@matrix.com.br (Roberto Gaiser) @c EMAIL: gaiser@matrix.com.br (Roberto Gaiser)
@image{Flags/brazil} Brazil [Matrix] @ @image{Flags/brazil} Brazil [Matrix] @
@uref{http://mysql.matrix.com.br, WWW} @uref{http://mysql.matrix.com.br, WWW}
@item @item
@c jpabuyer@vision.cl @c jpabuyer@vision.cl
@image{Flags/chile} Chile [Vision] @ @image{Flags/chile} Chile [Vision] @
@uref{http://mysql.vision.cl/, WWW} @uref{http://mysql.vision.cl/, WWW}
@c @item @c @item
@c Removed 990730 @c Removed 990730
@c @c EMAIL: dan@amerikanclaris.com (Danilo Lotina F.) @c @c EMAIL: dan@amerikanclaris.com (Danilo Lotina F.)
@c @image{Flags/chile} Chile [Amerikanclaris] @ @c @image{Flags/chile} Chile [Amerikanclaris] @
@c @uref{http://www.labs.amerikanclaris.cl/mysql, WWW} @c @uref{http://www.labs.amerikanclaris.cl/mysql, WWW}
@c @uref{ftp://ftp.amerikanclaris.cl/pub/mysql, FTP} @c @uref{ftp://ftp.amerikanclaris.cl/pub/mysql, FTP}
@end itemize @end itemize
...@@ -3804,54 +3804,54 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3804,54 +3804,54 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@itemize @bullet @itemize @bullet
@item @item
@c EMAIL: mirnshi@netchina.com.cn (Meng Lingbo) @c EMAIL: mirnshi@netchina.com.cn (Meng Lingbo)
@image{Flags/china} China [Freecode] @ @image{Flags/china} China [Freecode] @
@uref{http://mysql.freecode.com.cn, WWW} @uref{http://mysql.freecode.com.cn, WWW}
@item @item
@c EMAIL: Vincent_Fong@innovator.com.hk (Vincent Fong) @c EMAIL: Vincent_Fong@innovator.com.hk (Vincent Fong)
@image{Flags/china} China [Hong Kong] @ @image{Flags/china} China [Hong Kong] @
@uref{http://mysql.islnet.net, WWW} @uref{http://mysql.islnet.net, WWW}
@item @item
@c EMAIL: george@netfirm.net (Hongsheng Zhu) @c EMAIL: george@netfirm.net (Hongsheng Zhu)
@image{Flags/china} China [Netfirm] @ @image{Flags/china} China [Netfirm] @
@uref{http://mysql.netfirm.net, WWW} @uref{http://mysql.netfirm.net, WWW}
@item @item
@c EMAIL: ahmlhs@nmsvr.chosun.com (Ho-sun Lee) @c EMAIL: ahmlhs@nmsvr.chosun.com (Ho-sun Lee)
@image{Flags/south-korea} Korea [KREONet] @ @image{Flags/south-korea} Korea [KREONet] @
@uref{http://linux.kreonet.re.kr/mysql/, WWW} @uref{http://linux.kreonet.re.kr/mysql/, WWW}
@c @item @c @item
@c ftp -> remove old files @c ftp -> remove old files
@c EX: ahmlhs@nmsvr.chosun.com (Ho-sun Lee) @c EX: ahmlhs@nmsvr.chosun.com (Ho-sun Lee)
@c @image{Flags/south-korea} Korea [KREONet] @ @c @image{Flags/south-korea} Korea [KREONet] @
@c @uref{ftp://linux.kreonet.re.kr/pub/tools/db/mysql/, FTP} @c @uref{ftp://linux.kreonet.re.kr/pub/tools/db/mysql/, FTP}
@item @item
@c Ok 980805 @c Ok 980805
@c EMAIL: takeshi@SoftAgency.co.jp @c EMAIL: takeshi@SoftAgency.co.jp
@image{Flags/japan} Japan [Soft Agency] @ @image{Flags/japan} Japan [Soft Agency] @
@uref{http://www.softagency.co.jp/MySQL, WWW} @uref{http://www.softagency.co.jp/MySQL, WWW}
@c @item @c @item
@c Ok 980109 Removed 990730 @c Ok 980109 Removed 990730
@c EMAIL: satoshi@HappySize.co.jp (Satoshi TATSUOKA) @c EMAIL: satoshi@HappySize.co.jp (Satoshi TATSUOKA)
@c @image{Flags/japan} Japan [HappySize] @ @c @image{Flags/japan} Japan [HappySize] @
@c @uref{http://www.happysize.co.jp/mysql/, WWW} @c @uref{http://www.happysize.co.jp/mysql/, WWW}
@c @uref{ftp://ftp.happysize.co.jp/pub/mysql/, FTP} @c @uref{ftp://ftp.happysize.co.jp/pub/mysql/, FTP}
@item @item
@c Ok 981204 @c Ok 981204
@c EMAIL: hiroyuki@nucba.ac.jp (hiroyuki kurimoto) @c EMAIL: hiroyuki@nucba.ac.jp (hiroyuki kurimoto)
@image{Flags/japan} Japan [Nagoya Syouka University] @ @image{Flags/japan} Japan [Nagoya Syouka University] @
@uref{http://mirror.nucba.ac.jp/mirror/mysql, WWW} @uref{http://mirror.nucba.ac.jp/mirror/mysql, WWW}
@uref{ftp://mirror.nucba.ac.jp/mirror/mysql, FTP} @uref{ftp://mirror.nucba.ac.jp/mirror/mysql, FTP}
@c @item @c @item
@c Removed 990308 @c Removed 990308
@c EMAIL: terence@com5.net (Terence Chan) @c EMAIL: terence@com5.net (Terence Chan)
@c @image{Flags/singapore} Singapore [Com5 Productions] @ @c @image{Flags/singapore} Singapore [Com5 Productions] @
@c @uref{http://mysql.com5.net, WWW} @c @uref{http://mysql.com5.net, WWW}
@c @uref{ftp://ftp.com5.net/pub/mysql, FTP} @c @uref{ftp://ftp.com5.net/pub/mysql, FTP}
...@@ -3865,18 +3865,18 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3865,18 +3865,18 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@c 991118: Removed because a user complained about that the page contains @c 991118: Removed because a user complained about that the page contains
@c nothing about MySQL. 991119: Added again because it is a mirror again @c nothing about MySQL. 991119: Added again because it is a mirror again
@c EMAIL: dean@ht.net.tw (Dean Lin) @c EMAIL: dean@ht.net.tw (Dean Lin)
@image{Flags/taiwan} Taiwan [HT] @ @image{Flags/taiwan} Taiwan [HT] @
@uref{http://mysql.ht.net.tw, WWW} @uref{http://mysql.ht.net.tw, WWW}
@item @item
@c EMAIL: linda@ttn.com.tw (Linda Hu) @c EMAIL: linda@ttn.com.tw (Linda Hu)
@image{Flags/taiwan} Taiwan [TTN] @ @image{Flags/taiwan} Taiwan [TTN] @
@uref{http://mysql.ttn.net, WWW} @uref{http://mysql.ttn.net, WWW}
@c @item @c @item
@c Ok 980321 No connect -> removed 990730 @c Ok 980321 No connect -> removed 990730
@c EMAIL: tby@ccca.nctu.edu.tw (Bao-Yi Tuang) @c EMAIL: tby@ccca.nctu.edu.tw (Bao-Yi Tuang)
@c @image{Flags/taiwan} Taiwan [NCTU] @ @c @image{Flags/taiwan} Taiwan [NCTU] @
@c @uref{http://mysql.taconet.com.tw, WWW} @c @uref{http://mysql.taconet.com.tw, WWW}
@c @item @c @item
...@@ -3884,19 +3884,19 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3884,19 +3884,19 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@c @item @c ********************************** @c @item @c **********************************
@c Error 980106 @c Error 980106
@c EX: WolfySu@acer.net (Wolfy Su) @c EX: WolfySu@acer.net (Wolfy Su)
@c @image{Flags/taiwan} Taiwan [Acer] @ @c @image{Flags/taiwan} Taiwan [Acer] @
@c @uref{http://mysql.acer.net/, WWW} @c @uref{http://mysql.acer.net/, WWW}
@c @item @c ********************************** @c @item @c **********************************
@c files to delete @c files to delete
@c EX: service@wownet.net @c EX: service@wownet.net
@c @image{Flags/taiwan} Taiwan [Wownet] @ @c @image{Flags/taiwan} Taiwan [Wownet] @
@c @uref{ftp://ftp.wownet.net/mysql/, FTP} @c @uref{ftp://ftp.wownet.net/mysql/, FTP}
@c @item @c ********************************** @c @item @c **********************************
@c No conntact 980106 @c No conntact 980106
@c EX: serge@oneway.net @c EX: serge@oneway.net
@c @image{Flags/taiwan} Taiwan [Oneway] @ @c @image{Flags/taiwan} Taiwan [Oneway] @
@c @uref{ftp://ftp.oneway.com.tw/pub/mysql/, FTP} @c @uref{ftp://ftp.oneway.com.tw/pub/mysql/, FTP}
@end itemize @end itemize
...@@ -3906,21 +3906,21 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3906,21 +3906,21 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@item @item
@c Added 980610 @c Added 980610
@c EMAIL: jason@dstc.edu.au (Jason Andrade) @c EMAIL: jason@dstc.edu.au (Jason Andrade)
@image{Flags/australia} Australia [AARNet/Queensland] @ @image{Flags/australia} Australia [AARNet/Queensland] @
@uref{http://mirror.aarnet.edu.au/mysql, WWW} @uref{http://mirror.aarnet.edu.au/mysql, WWW}
@uref{ftp://mirror.aarnet.edu.au/pub/mysql, FTP} @uref{ftp://mirror.aarnet.edu.au/pub/mysql, FTP}
@c @item @c @item
@c Added 980805. Removed 000102 'no such directory' @c Added 980805. Removed 000102 'no such directory'
@c EMAIL: sdd@ntccc.tas.gov.au (Scott Donovan) @c EMAIL: sdd@ntccc.tas.gov.au (Scott Donovan)
@c @image{Flags/australia} Australia [Tas] @ @c @image{Flags/australia} Australia [Tas] @
@c @uref{http://ftp.tas.gov.au/mysql, WWW} @c @uref{http://ftp.tas.gov.au/mysql, WWW}
@c @uref{ftp://ftp.tas.gov.au/pub/mysql, FTP} @c @uref{ftp://ftp.tas.gov.au/pub/mysql, FTP}
@item @item
@c Ok 980623 @c Ok 980623
@c EMAIL: samh@bluep.com (Sam Hadzajlic) @c EMAIL: samh@bluep.com (Sam Hadzajlic)
@image{Flags/australia} Australia [Blue Planet/Melbourne] @ @image{Flags/australia} Australia [Blue Planet/Melbourne] @
@uref{http://mysql.bluep.com/, WWW} @uref{http://mysql.bluep.com/, WWW}
@c removed because ftp was not working 990729 & 30 @c removed because ftp was not working 990729 & 30
@c @uref{ftp://mysql.bluep.com/pub/mirror1/mysql/, FTP} @c @uref{ftp://mysql.bluep.com/pub/mirror1/mysql/, FTP}
...@@ -3928,13 +3928,13 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3928,13 +3928,13 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@item @item
@c Added 990531 @c Added 990531
@c EMAIL: gavin@itworks.com.au (Gavin Cameron) @c EMAIL: gavin@itworks.com.au (Gavin Cameron)
@image{Flags/australia} Australia [ITworks Consulting/Victoria] @ @image{Flags/australia} Australia [ITworks Consulting/Victoria] @
@uref{http://mysql.itworks.com.au, WWW} @uref{http://mysql.itworks.com.au, WWW}
@c @item @c @item
@c 980610 Only the toplevel dir! @c 980610 Only the toplevel dir!
@c EMAIL: lucifer@maths.uq.edu.au (David Conran) @c EMAIL: lucifer@maths.uq.edu.au (David Conran)
@c @image{Flags/australia} Australia FTP @ @c @image{Flags/australia} Australia FTP @
@c @uref{ftp://ftp.sage-au.org.au/pub/database/mysql, [Sage]} @c @uref{ftp://ftp.sage-au.org.au/pub/database/mysql, [Sage]}
@end itemize @end itemize
...@@ -3945,13 +3945,13 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}. ...@@ -3945,13 +3945,13 @@ Please report bad or out of date mirrors to @email{webmaster@@mysql.com}.
@item @item
@c Ok 981010 @c Ok 981010
@c EMAIL: nick@mweb.com (Nick Rosenberg) @c EMAIL: nick@mweb.com (Nick Rosenberg)
@image{Flags/south-africa1} South-Africa [Mweb/] @ @image{Flags/south-africa1} South-Africa [Mweb/] @
@uref{http://www.mysql.mweb.co.za, WWW} @uref{http://www.mysql.mweb.co.za, WWW}
@item @item
@c Ok 981010 @c Ok 981010
@c EMAIL: oskar@is.co.za (Oskar Pearson) @c EMAIL: oskar@is.co.za (Oskar Pearson)
@image{Flags/south-africa1} South-Africa [The Internet Solution/Johannesburg] @ @image{Flags/south-africa1} South-Africa [The Internet Solution/Johannesburg] @
@uref{ftp://ftp.is.co.za/linux/mysql/, FTP} @uref{ftp://ftp.is.co.za/linux/mysql/, FTP}
@end itemize @end itemize
...@@ -3991,7 +3991,7 @@ HP-UX 11.x with the native threads. @xref{HP-UX 11.x}. ...@@ -3991,7 +3991,7 @@ HP-UX 11.x with the native threads. @xref{HP-UX 11.x}.
@item @item
Linux 2.0+ with LinuxThreads 0.7.1+ or @code{glibc} 2.0.7+ . @xref{Linux}. Linux 2.0+ with LinuxThreads 0.7.1+ or @code{glibc} 2.0.7+ . @xref{Linux}.
@item @item
MacOS X Server. @xref{MacOSX}. MacOS X Server. @xref{MacOSX}.
@item @item
NetBSD 1.3/1.4 Intel and NetBSD 1.3 Alpha (Requires GNU make). @xref{NetBSD}. NetBSD 1.3/1.4 Intel and NetBSD 1.3 Alpha (Requires GNU make). @xref{NetBSD}.
@item @item
...@@ -4034,7 +4034,7 @@ distribution, we recommend going with the development release (currently ...@@ -4034,7 +4034,7 @@ distribution, we recommend going with the development release (currently
@value{mysql_version}. This is because there are usually no really @value{mysql_version}. This is because there are usually no really
serious bugs in the development release, and you can easily test it on serious bugs in the development release, and you can easily test it on
your machine with the @code{crash-me} and benchmark tests. your machine with the @code{crash-me} and benchmark tests.
@xref{Benchmarks}. Note that all @strong{MySQL} releases are @xref{Benchmarks}. Note that all @strong{MySQL} releases are
checked with the @strong{MySQL} benchmarks and an extensive test suite checked with the @strong{MySQL} benchmarks and an extensive test suite
before each release. before each release.
...@@ -4652,7 +4652,7 @@ The depot places binaries and libraries in @file{/opt/mysql} and data in ...@@ -4652,7 +4652,7 @@ The depot places binaries and libraries in @file{/opt/mysql} and data in
@file{/sbin/init.d} and @file{/sbin/rc2.d} to start the server automatically @file{/sbin/init.d} and @file{/sbin/rc2.d} to start the server automatically
at boot time. Obviously, this entails being @code{root} to install. at boot time. Obviously, this entails being @code{root} to install.
To install the HP-UX tar.gz distribution, you must have a copy of GNU To install the HP-UX tar.gz distribution, you must have a copy of GNU
@code{tar}. @code{tar}.
@node Installing source, Compilation problems, Installing binary, Installing @node Installing source, Compilation problems, Installing binary, Installing
...@@ -5430,7 +5430,7 @@ ODBC. ...@@ -5430,7 +5430,7 @@ ODBC.
@example @example
use DBI; use DBI;
$dbh= DBI->connect("DBI:ODBC:$dsn","$user","$password") || $dbh= DBI->connect("DBI:ODBC:$dsn","$user","$password") ||
die "Got error $DBI::errstr when connecting to $dsn\n"; die "Got error $DBI::errstr when connecting to $dsn\n";
@end example @end example
...@@ -5737,12 +5737,12 @@ include the libraries that @code{libwrap.a} needs: ...@@ -5737,12 +5737,12 @@ include the libraries that @code{libwrap.a} needs:
--with-libwrap="/opt/NUtcpwrapper-7.6/lib/libwrap.a -lnsl -lsocket --with-libwrap="/opt/NUtcpwrapper-7.6/lib/libwrap.a -lnsl -lsocket
@end example @end example
If you have problems with configure trying to link with @code{-lz} and If you have problems with configure trying to link with @code{-lz} and
you don't have @code{zlib} installed, you have two options: you don't have @code{zlib} installed, you have two options:
@itemize @bullet @itemize @bullet
@item @item
If you want to be able to use the compressed communication protocol, If you want to be able to use the compressed communication protocol,
you need to get and install zlib from ftp.gnu.org. you need to get and install zlib from ftp.gnu.org.
@item @item
Configure with @code{--with-named-z-libs=no} Configure with @code{--with-named-z-libs=no}
...@@ -5752,8 +5752,8 @@ If you are using gcc and have problems with loading @code{UDF} functions ...@@ -5752,8 +5752,8 @@ If you are using gcc and have problems with loading @code{UDF} functions
into @code{MySQL}, try adding @code{-lgcc} to the link line for the into @code{MySQL}, try adding @code{-lgcc} to the link line for the
@code{UDF} function. @code{UDF} function.
If you would like @strong{MySQL} to start automatically, you can copy If you would like @strong{MySQL} to start automatically, you can copy
@file{support-files/mysql.server} to @file{/etc/init.d} and create a @file{support-files/mysql.server} to @file{/etc/init.d} and create a
symbolic link to it named @code{/etc/rc3.d/S99mysql.server}. symbolic link to it named @code{/etc/rc3.d/S99mysql.server}.
@node Solaris 2.7, Solaris x86, Solaris, Source install system issues @node Solaris 2.7, Solaris x86, Solaris, Source install system issues
...@@ -6006,7 +6006,7 @@ CC=fcc CFLAGS="-O -K fast -K lib -K omitfp -Kpreex -D_GNU_SOURCE -DCONST=const - ...@@ -6006,7 +6006,7 @@ CC=fcc CFLAGS="-O -K fast -K lib -K omitfp -Kpreex -D_GNU_SOURCE -DCONST=const -
* Linux-Alpha:: Linux-Alpha notes * Linux-Alpha:: Linux-Alpha notes
* MKLinux:: MkLinux notes * MKLinux:: MkLinux notes
* Qube2:: Qube2 Linux notes * Qube2:: Qube2 Linux notes
* Linux-Ia64:: * Linux-Ia64::
@end menu @end menu
@node Linux-x86, Linux-RedHat50, Linux, Linux @node Linux-x86, Linux-RedHat50, Linux, Linux
...@@ -7013,7 +7013,7 @@ the MacOS X ports. @xref{Useful Links}. ...@@ -7013,7 +7013,7 @@ the MacOS X ports. @xref{Useful Links}.
@strong{MySQL} 3.23.7 should include all patches necessary to configure @strong{MySQL} 3.23.7 should include all patches necessary to configure
it on MacOSX. You must however first install the pthread package from it on MacOSX. You must however first install the pthread package from
@uref{http://www.prnet.de/RegEx/mysql.html,MySql for MacOSX Server} @uref{http://www.prnet.de/RegEx/mysql.html,MySql for MacOSX Server}
before configuring @strong{MySQL}. before configuring @strong{MySQL}.
You might want to also add aliases to your shell's resource file to You might want to also add aliases to your shell's resource file to
...@@ -7038,7 +7038,7 @@ is also described in the @file{README} file that comes with the ...@@ -7038,7 +7038,7 @@ is also described in the @file{README} file that comes with the
* Win32 running:: Running @strong{MySQL} on Win32 * Win32 running:: Running @strong{MySQL} on Win32
* Win32 and SSH:: Connecting to a remote @strong{MySQL} from Win32 with SSH * Win32 and SSH:: Connecting to a remote @strong{MySQL} from Win32 with SSH
* Win32 symbolic links:: Splitting data across different disks under Win32 * Win32 symbolic links:: Splitting data across different disks under Win32
* Win32 compiling:: * Win32 compiling::
* Win32 vs Unix:: @strong{MySQL}-Win32 compared to Unix @strong{MySQL} * Win32 vs Unix:: @strong{MySQL}-Win32 compared to Unix @strong{MySQL}
@end menu @end menu
...@@ -7279,7 +7279,7 @@ server, you can do so using this command: ...@@ -7279,7 +7279,7 @@ server, you can do so using this command:
@example @example
mysqladmin --user=root --password=your_password shutdown mysqladmin --user=root --password=your_password shutdown
@end example @end example
If you are using the old shareware version of @strong{MySQL} 3.21 under If you are using the old shareware version of @strong{MySQL} 3.21 under
Windows, the above command will fail with an error: @code{parse error Windows, the above command will fail with an error: @code{parse error
...@@ -8059,11 +8059,11 @@ NET STOP mysql ...@@ -8059,11 +8059,11 @@ NET STOP mysql
@end example @end example
Note that in this case you can't use any other options for @code{mysqld}! Note that in this case you can't use any other options for @code{mysqld}!
You can remove the service as follows: You can remove the service as follows:
@example @example
bin\mysqld-nt --remove # remove MySQL as a service bin\mysqld-nt --remove # remove MySQL as a service
@end example @end example
@item @item
By invoking @code{mysqld} directly. By invoking @code{mysqld} directly.
@end itemize @end itemize
...@@ -8491,7 +8491,7 @@ before it processes any command-line arguments.) ...@@ -8491,7 +8491,7 @@ before it processes any command-line arguments.)
@multitable @columnfractions .3 .7 @multitable @columnfractions .3 .7
@item @strong{Filename} @tab @strong{Purpose} @item @strong{Filename} @tab @strong{Purpose}
@item @code{windows-system-directory\my.ini} @item @code{windows-system-directory\my.ini}
@item @code{C:\my.cnf} @tab Global options @item @code{C:\my.cnf} @tab Global options
@item @code{C:\mysql\data\my.cnf} @tab Server-specific options @item @code{C:\mysql\data\my.cnf} @tab Server-specific options
@end multitable @end multitable
...@@ -9252,7 +9252,7 @@ available until subqueries are supported by @strong{MySQL}. ...@@ -9252,7 +9252,7 @@ available until subqueries are supported by @strong{MySQL}.
The first option is to use a procedural programming language (such as The first option is to use a procedural programming language (such as
Perl or PHP) to submit a @code{SELECT} query to obtain the primary keys Perl or PHP) to submit a @code{SELECT} query to obtain the primary keys
for the records to be deleted, and then use these values to construct for the records to be deleted, and then use these values to construct
the @code{DELETE} statement (@code{DELETE FROM ... WHERE ... IN (key1, the @code{DELETE} statement (@code{DELETE FROM ... WHERE ... IN (key1,
key2, ...)}). key2, ...)}).
The second option is to use interactive SQL to contruct a set of The second option is to use interactive SQL to contruct a set of
...@@ -9334,7 +9334,7 @@ atomic. In fact,we will go so far as to say that all integrity problems ...@@ -9334,7 +9334,7 @@ atomic. In fact,we will go so far as to say that all integrity problems
that transactions solve can be done with @code{LOCK TABLES} or atomic updates, that transactions solve can be done with @code{LOCK TABLES} or atomic updates,
ensuring that you never will get an automatic abort from the database, ensuring that you never will get an automatic abort from the database,
which is a common problem with transactional databases. which is a common problem with transactional databases.
Not even transactions can prevent all loss if the server goes down. In Not even transactions can prevent all loss if the server goes down. In
such cases even a transactional system can lose data. The difference such cases even a transactional system can lose data. The difference
between different systems lies in just how small the time-lap is where between different systems lies in just how small the time-lap is where
...@@ -9589,7 +9589,7 @@ the above table types would require a completely different table layout ...@@ -9589,7 +9589,7 @@ the above table types would require a completely different table layout
than @strong{MySQL} uses today. The table type would also need extra than @strong{MySQL} uses today. The table type would also need extra
threads that do automatic cleanups on the tables and the disk usage threads that do automatic cleanups on the tables and the disk usage
would be much higher. This would these table types about 2-4 times would be much higher. This would these table types about 2-4 times
slower than they are today. slower than they are today.
For the moment, we are much more for implementing the SQL server For the moment, we are much more for implementing the SQL server
language (something like stored procedures). With this you would very language (something like stored procedures). With this you would very
...@@ -9810,7 +9810,7 @@ have a good reason to keep it open. If @code{telnet} just hangs, ...@@ -9810,7 +9810,7 @@ have a good reason to keep it open. If @code{telnet} just hangs,
everything is OK, the port is blocked. everything is OK, the port is blocked.
@end itemize @end itemize
@item @item
Do not trust any data entered by your users. They can try to trick your Do not trust any data entered by your users. They can try to trick your
code by entering special or escaped character sequences in web forms, code by entering special or escaped character sequences in web forms,
URLs, or whatever application you have built. Be sure that your URLs, or whatever application you have built. Be sure that your
...@@ -11339,7 +11339,7 @@ shell> mysqladmin -u jeffrey password biscuit ...@@ -11339,7 +11339,7 @@ shell> mysqladmin -u jeffrey password biscuit
@strong{NOTE:} @code{PASSWORD()} does not perform password encryption in the @strong{NOTE:} @code{PASSWORD()} does not perform password encryption in the
same way that Unix passwords are encrypted. You should not assume that if same way that Unix passwords are encrypted. You should not assume that if
your Unix password and your @strong{MySQL} password are the same, that your Unix password and your @strong{MySQL} password are the same, that
@code{PASSWORD()} will result in the same encrypted value as is stored in the @code{PASSWORD()} will result in the same encrypted value as is stored in the
Unix password file. Unix password file.
@xref{User names}. @xref{User names}.
...@@ -12164,7 +12164,7 @@ the result is larger than @code{9223372036854775807}. ...@@ -12164,7 +12164,7 @@ the result is larger than @code{9223372036854775807}.
A floating-point number. Cannot be unsigned. @code{precision} can be A floating-point number. Cannot be unsigned. @code{precision} can be
@code{<=24} for a single precision floating point number and between 25 @code{<=24} for a single precision floating point number and between 25
and 53 for a double precision floating point number. and 53 for a double precision floating point number.
these types are like the @code{FLOAT} and @code{DOUBLE} types described these types are like the @code{FLOAT} and @code{DOUBLE} types described
immediately below. @code{FLOAT(X)} have the same ranges as the immediately below. @code{FLOAT(X)} have the same ranges as the
corresponding @code{FLOAT} and @code{DOUBLE} types, but the display corresponding @code{FLOAT} and @code{DOUBLE} types, but the display
...@@ -12484,35 +12484,35 @@ example: ...@@ -12484,35 +12484,35 @@ example:
@end example @end example
In this example, @code{9} (@code{precision}) represents the number of In this example, @code{9} (@code{precision}) represents the number of
significant decimal digits which will be stored for values, and significant decimal digits which will be stored for values, and
@code{2} (@code{scale}) represents the number of digits which will be @code{2} (@code{scale}) represents the number of digits which will be
stored following the decimal point. In this case, therefore, the range stored following the decimal point. In this case, therefore, the range
of values which can be stored in the @code{salary} column is from of values which can be stored in the @code{salary} column is from
@code{-9999999.99} to @code{9999999.99}. In ANSI/ISO SQL92, the syntax @code{-9999999.99} to @code{9999999.99}. In ANSI/ISO SQL92, the syntax
@code{DECIMAL(p)} is equivalent to @code{DECIMAL(p,0)}. Similarly, the @code{DECIMAL(p)} is equivalent to @code{DECIMAL(p,0)}. Similarly, the
syntax @code{DECIMAL} is equivalent to @code{DECIMAL(p,0)}, where the syntax @code{DECIMAL} is equivalent to @code{DECIMAL(p,0)}, where the
implementation is allowed to decide the value of @code{p}. implementation is allowed to decide the value of @code{p}.
@strong{MySQL} does not currently support either of these variant forms @strong{MySQL} does not currently support either of these variant forms
of the @code{DECIMAL}/@code{NUMERIC} data types. This is not generally of the @code{DECIMAL}/@code{NUMERIC} data types. This is not generally
a serious problem, as the principal benefits of these types derive from a serious problem, as the principal benefits of these types derive from
the ability to control both precision and scale explicitly. the ability to control both precision and scale explicitly.
@code{DECIMAL} and @code{NUMERIC} values are stored as strings, rather @code{DECIMAL} and @code{NUMERIC} values are stored as strings, rather
than as binary floating point numbers, in order to preserve the decimal than as binary floating point numbers, in order to preserve the decimal
precision of those values. One character is used for each digit of the precision of those values. One character is used for each digit of the
value, the decimal point (if @code{scale} > 0) and the @samp{-} sign value, the decimal point (if @code{scale} > 0) and the @samp{-} sign
(for negative numbers). If @code{scale} is 0, @code{DECIMAL} and (for negative numbers). If @code{scale} is 0, @code{DECIMAL} and
@code{NUMERIC} values contain no decimal point or fractional part. @code{NUMERIC} values contain no decimal point or fractional part.
The maximum range of @code{DECIMAL} and @code{NUMERIC} values is the The maximum range of @code{DECIMAL} and @code{NUMERIC} values is the
same as for @code{DOUBLE}, but the actual range for a given same as for @code{DOUBLE}, but the actual range for a given
@code{DECIMAL} or @code{NUMERIC} column can be constrained by the @code{DECIMAL} or @code{NUMERIC} column can be constrained by the
@code{precision} or @code{scale} for a given column. When such a column @code{precision} or @code{scale} for a given column. When such a column
is assigned a value with more digits following the decimal point than is assigned a value with more digits following the decimal point than
are allowed by the specified @code{scale}, the value is rounded to that are allowed by the specified @code{scale}, the value is rounded to that
@code{scale}. When a @code{DECIMAL} or @code{NUMERIC} column is @code{scale}. When a @code{DECIMAL} or @code{NUMERIC} column is
assigned a value whose magnitude exceeds the range implied by the assigned a value whose magnitude exceeds the range implied by the
specified (or defaulted) @code{precision} and @code{scale}, specified (or defaulted) @code{precision} and @code{scale},
@strong{MySQL} stores the value representing the corresponding end @strong{MySQL} stores the value representing the corresponding end
point of that range. point of that range.
...@@ -12528,16 +12528,16 @@ values which can be stored in the column, nor the number of digits which ...@@ -12528,16 +12528,16 @@ values which can be stored in the column, nor the number of digits which
will be displayed for values whose width exceeds that specified for the will be displayed for values whose width exceeds that specified for the
column. When used in conjunction with the optional extension attribute column. When used in conjunction with the optional extension attribute
@code{ZEROFILL} the default padding of spaces is replaced with zeroes. @code{ZEROFILL} the default padding of spaces is replaced with zeroes.
For example, for a column declared as @code{INT(5) ZEROFILL}, a value For example, for a column declared as @code{INT(5) ZEROFILL}, a value
of @code{4} is retrieved as @code{00004}. Note that if you store larger of @code{4} is retrieved as @code{00004}. Note that if you store larger
values than the display width in an integral column, you may experience values than the display width in an integral column, you may experience
problems when @strong{MySQL} generates temporary tables for some problems when @strong{MySQL} generates temporary tables for some
complicated joins as in these case @strong{MySQL} trust that the data complicated joins as in these case @strong{MySQL} trust that the data
did fit into the original column width. did fit into the original column width.
All integral types can have an optional (non-standard) attribute All integral types can have an optional (non-standard) attribute
@code{UNSIGNED}. Unsigned values can be used when you want to allow @code{UNSIGNED}. Unsigned values can be used when you want to allow
only positive numbers in a column and you need a little bigger numeric only positive numbers in a column and you need a little bigger numeric
range for the column. range for the column.
The @code{FLOAT} type is used to represent approximate numeric data The @code{FLOAT} type is used to represent approximate numeric data
...@@ -13435,6 +13435,13 @@ mysql> CREATE TABLE test ( ...@@ -13435,6 +13435,13 @@ mysql> CREATE TABLE test (
For @code{BLOB} and @code{TEXT} columns, you must index a prefix of the For @code{BLOB} and @code{TEXT} columns, you must index a prefix of the
column, you cannot index the entire thing. column, you cannot index the entire thing.
In @strong{MySQL} 3.23.23 or later, you can also create special
@strong{fulltext} indexes. They are used for full-text search. Only
@code{MyISAM} table type supports fulltext indexes. They can be created
only from @code{VARCHAR}, @code{BLOB}, and @code{TEXT} columns.
Indexing always happens over the entire column, partial indexing is not
supported. See @ref{MySQL full-text search} for details of operation.
@node Multiple-column indexes, Other-vendor column types, Indexes, Column types @node Multiple-column indexes, Other-vendor column types, Indexes, Column types
@subsection Multiple-column indexes @subsection Multiple-column indexes
...@@ -14150,6 +14157,17 @@ mysql> select STRCMP('text2', 'text'); ...@@ -14150,6 +14157,17 @@ mysql> select STRCMP('text2', 'text');
mysql> select STRCMP('text', 'text'); mysql> select STRCMP('text', 'text');
-> 0 -> 0
@end example @end example
@findex MATCH ... AGAINST()
@item MATCH (col1,col2,...) AGAINST (expr)
@code{MATCH ... AGAINST()} is used for full-text search and returns
relevance - similarity measure between the text in columns
@code{(col1,col2,...)} and the query @code{expr}. Relevance is a
positive floating point number. Zero relevance means no similarity.
For @code{MATCH ... AGAINST()} to work, a @strong{fulltext index}
must be created first. @xref{CREATE TABLE, , @code{CREATE TABLE}}.
@code{MATCH ... AGAINST()} is available in @code{MySQL} 3.23.23 or later.
For details and usage examples see @xref{MySQL full-text search}.
@end table @end table
@findex Casts @findex Casts
...@@ -15101,7 +15119,7 @@ every reset bit you get an 'off' string. Each string is separated with 'separato ...@@ -15101,7 +15119,7 @@ every reset bit you get an 'off' string. Each string is separated with 'separato
@example @example
mysql> select EXPORT_SET(5,'Y','N',',',4) mysql> select EXPORT_SET(5,'Y','N',',',4)
-> Y,N,Y,N -> Y,N,Y,N
@end example @end example
@findex LCASE() @findex LCASE()
...@@ -15412,7 +15430,7 @@ mysql> SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND; ...@@ -15412,7 +15430,7 @@ mysql> SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
mysql> SELECT INTERVAL 1 DAY + "1997-12-31"; mysql> SELECT INTERVAL 1 DAY + "1997-12-31";
-> 1998-01-01 -> 1998-01-01
mysql> SELECT "1998-01-01" - INTERVAL 1 SECOND; mysql> SELECT "1998-01-01" - INTERVAL 1 SECOND;
-> 1997-12-31 23:59:59 -> 1997-12-31 23:59:59
mysql> SELECT DATE_ADD("1997-12-31 23:59:59", mysql> SELECT DATE_ADD("1997-12-31 23:59:59",
INTERVAL 1 SECOND); INTERVAL 1 SECOND);
-> 1998-01-01 00:00:00 -> 1998-01-01 00:00:00
...@@ -16159,6 +16177,7 @@ create_definition: ...@@ -16159,6 +16177,7 @@ create_definition:
or KEY [index_name] (index_col_name,...) or KEY [index_name] (index_col_name,...)
or INDEX [index_name] (index_col_name,...) or INDEX [index_name] (index_col_name,...)
or UNIQUE [INDEX] [index_name] (index_col_name,...) or UNIQUE [INDEX] [index_name] (index_col_name,...)
or FULLTEXT [INDEX] [index_name] (index_col_name,...)
or [CONSTRAINT symbol] FOREIGN KEY index_name (index_col_name,...) or [CONSTRAINT symbol] FOREIGN KEY index_name (index_col_name,...)
[reference_definition] [reference_definition]
or CHECK (expr) or CHECK (expr)
...@@ -16389,7 +16408,7 @@ make the index file much smaller. ...@@ -16389,7 +16408,7 @@ make the index file much smaller.
@cindex Indexes, and @code{BLOB} columns @cindex Indexes, and @code{BLOB} columns
@cindex @code{TEXT} columns, indexing @cindex @code{TEXT} columns, indexing
@cindex Indexes, and @code{TEXT} columns @cindex Indexes, and @code{TEXT} columns
Only the @code{MyISAM} table type supports indexing on @code{BLOB} and Only the @code{MyISAM} table type supports indexing on @code{BLOB} and
@code{TEXT} columns. When putting an index on a @code{BLOB} or @code{TEXT} @code{TEXT} columns. When putting an index on a @code{BLOB} or @code{TEXT}
column you MUST always specify the length of the index: column you MUST always specify the length of the index:
@example @example
...@@ -16401,6 +16420,14 @@ When you use @code{ORDER BY} or @code{GROUP BY} with a @code{TEXT} or ...@@ -16401,6 +16420,14 @@ When you use @code{ORDER BY} or @code{GROUP BY} with a @code{TEXT} or
@code{BLOB} column, only the first @code{max_sort_length} bytes are used. @code{BLOB} column, only the first @code{max_sort_length} bytes are used.
@xref{BLOB, , @code{BLOB}}. @xref{BLOB, , @code{BLOB}}.
@item
In @strong{MySQL} 3.23.23 or later, you can also create special
@strong{fulltext} indexes. They are used for full-text search. Only
@code{MyISAM} table type supports fulltext indexes. They can be created
only from @code{VARCHAR}, @code{BLOB}, and @code{TEXT} columns.
Indexing always happens over the entire column, partial indexing is not
supported. See @ref{MySQL full-text search} for details of operation.
@item @item
The @code{FOREIGN KEY}, @code{CHECK} and @code{REFERENCES} clauses don't The @code{FOREIGN KEY}, @code{CHECK} and @code{REFERENCES} clauses don't
actually do anything. The syntax for them is provided only for compatibility, actually do anything. The syntax for them is provided only for compatibility,
...@@ -16570,6 +16597,7 @@ alter_specification: ...@@ -16570,6 +16597,7 @@ alter_specification:
or ADD INDEX [index_name] (index_col_name,...) or ADD INDEX [index_name] (index_col_name,...)
or ADD PRIMARY KEY (index_col_name,...) or ADD PRIMARY KEY (index_col_name,...)
or ADD UNIQUE [index_name] (index_col_name,...) or ADD UNIQUE [index_name] (index_col_name,...)
or ADD FULLTEXT [index_name] (index_col_name,...)
or ALTER [COLUMN] col_name @{SET DEFAULT literal | DROP DEFAULT@} or ALTER [COLUMN] col_name @{SET DEFAULT literal | DROP DEFAULT@}
or CHANGE [COLUMN] old_col_name create_definition or CHANGE [COLUMN] old_col_name create_definition
or MODIFY [COLUMN] create_definition or MODIFY [COLUMN] create_definition
...@@ -16708,7 +16736,7 @@ index exists, it drops the first @code{UNIQUE} index in the table. ...@@ -16708,7 +16736,7 @@ index exists, it drops the first @code{UNIQUE} index in the table.
if no @code{PRIMARY KEY} was specified explicitly.) if no @code{PRIMARY KEY} was specified explicitly.)
@item @item
If you use @code{ALTER TABLE} on a @code{MyISAM} table, all non-unique If you use @code{ALTER TABLE} on a @code{MyISAM} table, all non-unique
indexes are created in a separate batch (like in @code{REPAIR}). indexes are created in a separate batch (like in @code{REPAIR}).
This should make @code{ALTER TABLE} much faster when you have many indexes. This should make @code{ALTER TABLE} much faster when you have many indexes.
...@@ -17711,7 +17739,7 @@ table in the @code{db2} database: ...@@ -17711,7 +17739,7 @@ table in the @code{db2} database:
@example @example
mysql> USE db1; mysql> USE db1;
mysql> LOAD DATA INFILE "data.txt" INTO TABLE db2.my_table; mysql> LOAD DATA INFILE "data.txt" INTO TABLE db2.my_table;
@end example @end example
The @code{REPLACE} and @code{IGNORE} keywords control handling of input The @code{REPLACE} and @code{IGNORE} keywords control handling of input
...@@ -18296,12 +18324,12 @@ and @samp{_} wildcard characters. ...@@ -18296,12 +18324,12 @@ and @samp{_} wildcard characters.
@findex SHOW INDEX @findex SHOW INDEX
@findex SHOW KEYS @findex SHOW KEYS
@menu @menu
* SHOW DATABASE INFO:: * SHOW DATABASE INFO::
* SHOW TABLE STATUS:: * SHOW TABLE STATUS::
* SHOW STATUS:: * SHOW STATUS::
* SHOW VARIABLES:: * SHOW VARIABLES::
* SHOW PROCESSLIST:: * SHOW PROCESSLIST::
* SHOW GRANTS:: * SHOW GRANTS::
* SHOW CREATE TABLE:: * SHOW CREATE TABLE::
@end menu @end menu
...@@ -18413,7 +18441,7 @@ below, though the format and numbers probably differ: ...@@ -18413,7 +18441,7 @@ below, though the format and numbers probably differ:
| Handler_read_first | 1 | | Handler_read_first | 1 |
| Handler_read_key | 0 | | Handler_read_key | 0 |
| Handler_read_next | 2 | | Handler_read_next | 2 |
| Handler_read_prev | 0 | | Handler_read_prev | 0 |
| Handler_read_rnd | 0 | | Handler_read_rnd | 0 |
| Handler_read_rnd_next | 25 | | Handler_read_rnd_next | 25 |
| Handler_update | 0 | | Handler_update | 0 |
...@@ -18673,7 +18701,7 @@ you start the server. This is a file of SQL statements you want the ...@@ -18673,7 +18701,7 @@ you start the server. This is a file of SQL statements you want the
server to execute when it starts. server to execute when it starts.
@item @code{interactive_timeout} @item @code{interactive_timeout}
The number of seconds the server waits for activity on an interactive The number of seconds the server waits for activity on an interactive
connection before closing it. An interactive client is defined as a connection before closing it. An interactive client is defined as a
client that uses the @code{CLIENT_INTERACTIVE} option to client that uses the @code{CLIENT_INTERACTIVE} option to
@code{mysql_real_connect()}. See also @code{wait_timeout}. @code{mysql_real_connect()}. See also @code{wait_timeout}.
...@@ -18889,7 +18917,7 @@ mysql> SHOW GRANTS FOR root@@localhost; ...@@ -18889,7 +18917,7 @@ mysql> SHOW GRANTS FOR root@@localhost;
@node SHOW CREATE TABLE,,SHOW GRANTS, SHOW @node SHOW CREATE TABLE,,SHOW GRANTS, SHOW
@subsection SHOW CREATE TABLE @subsection SHOW CREATE TABLE
Shows a @code{CREATE TABLE} statement that will create the given table Shows a @code{CREATE TABLE} statement that will create the given table
@example @example
mysql> show create table foo; mysql> show create table foo;
+-------+-------------------------------------------------------------------------------------+ +-------+-------------------------------------------------------------------------------------+
...@@ -19338,7 +19366,7 @@ table locking is deadlock free. ...@@ -19338,7 +19366,7 @@ table locking is deadlock free.
Note that you should @strong{NOT} lock any tables that you are using with Note that you should @strong{NOT} lock any tables that you are using with
@code{INSERT DELAYED}. This is because that in this case the @code{INSERT} @code{INSERT DELAYED}. This is because that in this case the @code{INSERT}
is done by a separate thread. is done by a separate thread.
Normally, you don't have to lock tables, as all single @code{UPDATE} statements Normally, you don't have to lock tables, as all single @code{UPDATE} statements
are atomic; no other thread can interfere with any other currently executing are atomic; no other thread can interfere with any other currently executing
...@@ -19741,7 +19769,7 @@ dropped only with explicit @code{REVOKE} commands or by manipulating the ...@@ -19741,7 +19769,7 @@ dropped only with explicit @code{REVOKE} commands or by manipulating the
@section @code{CREATE INDEX} syntax @section @code{CREATE INDEX} syntax
@example @example
CREATE [UNIQUE] INDEX index_name ON tbl_name (col_name[(length)],... ) CREATE [UNIQUE|FULLTEXT] INDEX index_name ON tbl_name (col_name[(length)],... )
@end example @end example
The @code{CREATE INDEX} statement doesn't do anything in @strong{MySQL} prior The @code{CREATE INDEX} statement doesn't do anything in @strong{MySQL} prior
...@@ -19775,13 +19803,17 @@ which could save a lot of disk space and might also speed up @code{INSERT} ...@@ -19775,13 +19803,17 @@ which could save a lot of disk space and might also speed up @code{INSERT}
operations! operations!
Note that you can only add an index on a column that can have @code{NULL} Note that you can only add an index on a column that can have @code{NULL}
values or on a @code{BLOB}/@code{TEXT} column if you are useing values or on a @code{BLOB}/@code{TEXT} column if you are using
@strong{MySQL} version 3.23.2 or newer and are using the @code{MyISAM} @strong{MySQL} version 3.23.2 or newer and are using the @code{MyISAM}
table type. table type.
For more information about how @strong{MySQL} uses indexes, see For more information about how @strong{MySQL} uses indexes, see
@ref{MySQL indexes, , @strong{MySQL} indexes}. @ref{MySQL indexes, , @strong{MySQL} indexes}.
Fulltext indexes can index only @code{VARCHAR}, @code{BLOB}, and
@code{TEXT} columns, and only in @code{MyISAM} tables. Fulltext indexes
are available from @strong{MySQL} 3.23.23. @ref{MySQL full-text search}.
@findex DROP INDEX @findex DROP INDEX
@node DROP INDEX, Comments, CREATE INDEX, Reference @node DROP INDEX, Comments, CREATE INDEX, Reference
@section @code{DROP INDEX} syntax @section @code{DROP INDEX} syntax
...@@ -19806,7 +19838,7 @@ styles: ...@@ -19806,7 +19838,7 @@ styles:
@example @example
mysql> select 1+1; # This comment continues to the end of line mysql> select 1+1; # This comment continues to the end of line
mysql> select 1+1; -- This comment continues to the end of line mysql> select 1+1; -- This comment continues to the end of line
mysql> select 1 /* this is an in-line comment */ + 1; mysql> select 1 /* this is an in-line comment */ + 1;
mysql> select 1+ mysql> select 1+
/* /*
...@@ -19903,7 +19935,7 @@ A few are reserved because @strong{MySQL} needs them and is ...@@ -19903,7 +19935,7 @@ A few are reserved because @strong{MySQL} needs them and is
(currently) using a @code{yacc} parser: (currently) using a @code{yacc} parser:
@c This is fixed by including the symbols table from lex.h here and then running @c This is fixed by including the symbols table from lex.h here and then running
@c fix-mysql-reserved-words in emacs (or let David do it): @c fix-mysql-reserved-words in emacs (or let David do it):
@c (defun fix-mysql-reserved-words () @c (defun fix-mysql-reserved-words ()
@c (interactive) @c (interactive)
@c (let ((cnt 0)) @c (let ((cnt 0))
...@@ -20402,7 +20434,7 @@ Here are some things you should consider when you use @code{HEAP} tables: ...@@ -20402,7 +20434,7 @@ Here are some things you should consider when you use @code{HEAP} tables:
@itemize @bullet @itemize @bullet
@item @item
You should always use specify @code{MAX_ROWS} in the @code{CREATE} statement You should always use specify @code{MAX_ROWS} in the @code{CREATE} statement
to ensure that you accidently do not use all memory. to ensure that you accidently do not use all memory.
@item @item
Indexes will only be used with @code{=} and @code{<=>} (but are VERY fast). Indexes will only be used with @code{=} and @code{<=>} (but are VERY fast).
...@@ -20449,7 +20481,7 @@ To ensure that you accidentally don't do anything stupid, you can't create ...@@ -20449,7 +20481,7 @@ To ensure that you accidentally don't do anything stupid, you can't create
Memory needed for one row in a @code{HEAP} table is: Memory needed for one row in a @code{HEAP} table is:
SUM_OVER_ALL_KEYS(max_length_of_key + sizeof(char*)*2) + SUM_OVER_ALL_KEYS(max_length_of_key + sizeof(char*)*2) +
ALIGN(length_of_row+1,sizeof(char*)) ALIGN(length_of_row+1,sizeof(char*))
@code{sizeof(char*)} is 4 on 32 bit machines and 8 on 64 bit machines. @code{sizeof(char*)} is 4 on 32 bit machines and 8 on 64 bit machines.
...@@ -20653,7 +20685,7 @@ Your MySQL connection id is 459 to server version: 3.22.20a-log ...@@ -20653,7 +20685,7 @@ Your MySQL connection id is 459 to server version: 3.22.20a-log
Type 'help' for help. Type 'help' for help.
mysql> mysql>
@end example @end example
The prompt tells you that @code{mysql} is ready for you to enter commands. The prompt tells you that @code{mysql} is ready for you to enter commands.
...@@ -21112,7 +21144,7 @@ definition. If you use your keys like normal, it'll work just fine! ...@@ -21112,7 +21144,7 @@ definition. If you use your keys like normal, it'll work just fine!
@example @example
CREATE TABLE persons ( CREATE TABLE persons (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
name CHAR(60) NOT NULL, name CHAR(60) NOT NULL,
PRIMARY KEY (id) PRIMARY KEY (id)
); );
...@@ -23098,7 +23130,7 @@ this), you should set the @code{AVG_ROW_LENGTH} and @code{MAX_ROWS} ...@@ -23098,7 +23130,7 @@ this), you should set the @code{AVG_ROW_LENGTH} and @code{MAX_ROWS}
parameter when you create your table. @xref{CREATE TABLE}. You can parameter when you create your table. @xref{CREATE TABLE}. You can
also set these later with @code{ALTER TABLE}. @xref{ALTER TABLE}. also set these later with @code{ALTER TABLE}. @xref{ALTER TABLE}.
If you need to have bigger tables than 2G / 4G If you need to have bigger tables than 2G / 4G
If your big table is going to be read-only, you could use If your big table is going to be read-only, you could use
@code{myisampack} to merge and compress many tables to one. @code{myisampack} to merge and compress many tables to one.
...@@ -23158,7 +23190,7 @@ replication process, so it can use the info in the case it goes down and ...@@ -23158,7 +23190,7 @@ replication process, so it can use the info in the case it goes down and
gets restarted later. gets restarted later.
@node Replication HOWTO, Replication Features, Replication Implementation, Replication @node Replication HOWTO, Replication Features, Replication Implementation, Replication
@section HOWTO @section HOWTO
Below is a quick HOWTO on how to set up replication on your current system: Below is a quick HOWTO on how to set up replication on your current system:
@itemize @bullet @itemize @bullet
...@@ -23166,8 +23198,8 @@ Below is a quick HOWTO on how to set up replication on your current system: ...@@ -23166,8 +23198,8 @@ Below is a quick HOWTO on how to set up replication on your current system:
Upgrade both slave and master to 3.23.15 or higher. We recommend that Upgrade both slave and master to 3.23.15 or higher. We recommend that
you always use the latest 3.23 version on both the slave and the master. While you always use the latest 3.23 version on both the slave and the master. While
3.23 is in beta, the versions may be not backwards compatible. In 3.23 is in beta, the versions may be not backwards compatible. In
addition, the newer version will fix some bugs and add new features. Please, do not report bugs until you have verified that the problem is present in addition, the newer version will fix some bugs and add new features. Please, do not report bugs until you have verified that the problem is present in
the latest release. the latest release.
@item @item
Set up special replication user(s) on the master with the @code{FILE} Set up special replication user(s) on the master with the @code{FILE}
privilege and permission to connect from all the slaves. If the user is privilege and permission to connect from all the slaves. If the user is
...@@ -23177,7 +23209,7 @@ Take a snapshot of all the tables/databases on the master that could ...@@ -23177,7 +23209,7 @@ Take a snapshot of all the tables/databases on the master that could
possibly be involved in the update queries before taking the next step. possibly be involved in the update queries before taking the next step.
Starting in version 3.23.21, there is a command that allows you to Starting in version 3.23.21, there is a command that allows you to
take a snapshot of a table on the master and copy it to the slave, called take a snapshot of a table on the master and copy it to the slave, called
@code{LOAD TABLE FROM MASTER}. Until 3.23.23, though, it has a serious @code{LOAD TABLE FROM MASTER}. Until 3.23.23, though, it has a serious
bug, and we recommend that you should not use it until you have upgraded . bug, and we recommend that you should not use it until you have upgraded .
@item @item
...@@ -23270,7 +23302,7 @@ backup and to set up replication initially. ...@@ -23270,7 +23302,7 @@ backup and to set up replication initially.
@item @item
Starting in 3.23.23, you can change masters with @code{CHANGE MASTER Starting in 3.23.23, you can change masters with @code{CHANGE MASTER
TO } TO }
@item @item
Starting in 3.23.23, you tell the master that updates in certain Starting in 3.23.23, you tell the master that updates in certain
databases should not be logged to the binary log with @code{binlog-ignore-db} databases should not be logged to the binary log with @code{binlog-ignore-db}
@end itemize @end itemize
...@@ -23323,12 +23355,12 @@ versa. @tab Master @tab @code{sql-bin-update-same} ...@@ -23323,12 +23355,12 @@ versa. @tab Master @tab @code{sql-bin-update-same}
@item @code{log-slave-updates} @tab Tells the slave to log the updates from the slave thread to the binary log. Off by default. You will need to turn it on if you plan to daisy-chain the slaves @tab Slave @tab @code{log-slave-updates} @item @code{log-slave-updates} @tab Tells the slave to log the updates from the slave thread to the binary log. Off by default. You will need to turn it on if you plan to daisy-chain the slaves @tab Slave @tab @code{log-slave-updates}
@item @code{binlog-do-db} @tab Tells the master it should log updates @item @code{binlog-do-db} @tab Tells the master it should log updates
for the specified database, and exclude all others not explicitly for the specified database, and exclude all others not explicitly
mentioned. @tab Master @tab @code{binlog-do-db=some_database} mentioned. @tab Master @tab @code{binlog-do-db=some_database}
@item @code{binlog-ignore-db} @tab Tells the master that updates to the given database @item @code{binlog-ignore-db} @tab Tells the master that updates to the given database
should not be logged to the binary log @tab Master @tab should not be logged to the binary log @tab Master @tab
@code{binlog-ignore-db=some_database} @code{binlog-ignore-db=some_database}
@end multitable @end multitable
@node Replication SQL, , Replication Options, Replication @node Replication SQL, , Replication Options, Replication
...@@ -23363,13 +23395,13 @@ reset them to empty string and 0 respectively ( the start values). Note that ...@@ -23363,13 +23395,13 @@ reset them to empty string and 0 respectively ( the start values). Note that
if you restart the slave, it will remember its last master. If this is not desirable, if you restart the slave, it will remember its last master. If this is not desirable,
you should delete @code{master.info} file before restarting, and the slave will read you should delete @code{master.info} file before restarting, and the slave will read
its master from @code{my.cnf} or command line. its master from @code{my.cnf} or command line.
@tab Slave @tab Slave
@item @code{SHOW MASTER STATUS} @tab Provides status info on the binlog of the @item @code{SHOW MASTER STATUS} @tab Provides status info on the binlog of the
master @tab Master master @tab Master
@item @code{SHOW SLAVE STATUS} @tab Provides status info on essential parameters @item @code{SHOW SLAVE STATUS} @tab Provides status info on essential parameters
of the slave thread @tab Slave of the slave thread @tab Slave
@end multitable @end multitable
...@@ -23434,7 +23466,7 @@ for most systems but one should be aware of it. ...@@ -23434,7 +23466,7 @@ for most systems but one should be aware of it.
@end itemize @end itemize
@node System, Data size, Optimize Basics, Performance @node System, Data size, Optimize Basics, Performance
@section System/Compile time and startup parameter tuning @section System/Compile time and startup parameter tuning
We start with the system level things since some of these decisions have We start with the system level things since some of these decisions have
to be made very early. In other cases a fast look at this part may to be made very early. In other cases a fast look at this part may
...@@ -23512,7 +23544,7 @@ all x586 type processors (Like AMD). ...@@ -23512,7 +23544,7 @@ all x586 type processors (Like AMD).
By just using a better compiler and/or better compiler options you can By just using a better compiler and/or better compiler options you can
get a 10-30 % speed increase in your application. This is particularly get a 10-30 % speed increase in your application. This is particularly
important if you compile the SQL server yourself! important if you compile the SQL server yourself!
We have tested the both Cygnus CodeFusion and the Fujitsu compiler but We have tested the both Cygnus CodeFusion and the Fujitsu compiler but
when we tested them, neither was enough bug free enough to compile when we tested them, neither was enough bug free enough to compile
...@@ -23530,12 +23562,12 @@ If you use @code{pgcc} and compile everything with @code{-O6}, the ...@@ -23530,12 +23562,12 @@ If you use @code{pgcc} and compile everything with @code{-O6}, the
@code{mysqld} server is 11% faster than with @code{gcc} versions @code{mysqld} server is 11% faster than with @code{gcc} versions
older than @code{gcc} 2.95.2. older than @code{gcc} 2.95.2.
@item @item
If you link dynamically (without @code{-static}), the result is 13% If you link dynamically (without @code{-static}), the result is 13%
slower. Note that you still can use a dynamic linked @strong{MySQL} slower. Note that you still can use a dynamic linked @strong{MySQL}
library. It is only the server that is critical for performance. library. It is only the server that is critical for performance.
@item @item
If you connect using TCP/IP rather than Unix sockets, the result is 7.5% If you connect using TCP/IP rather than Unix sockets, the result is 7.5%
slower on the same computer. (If you are connection to @code{localhost}, slower on the same computer. (If you are connection to @code{localhost},
@strong{MySQL} will by default use sockets). @strong{MySQL} will by default use sockets).
...@@ -23543,7 +23575,7 @@ slower on the same computer. (If you are connection to @code{localhost}, ...@@ -23543,7 +23575,7 @@ slower on the same computer. (If you are connection to @code{localhost},
@item @item
On a Sun SPARCstation 10, @code{gcc} 2.7.3 is 13% faster than Sun Pro C++ 4.2. On a Sun SPARCstation 10, @code{gcc} 2.7.3 is 13% faster than Sun Pro C++ 4.2.
@item @item
On Solaris 2.5.1, MIT-pthreads is 8-12% slower than Solaris native On Solaris 2.5.1, MIT-pthreads is 8-12% slower than Solaris native
threads on a single processor. With more load/CPUs the difference should threads on a single processor. With more load/CPUs the difference should
get bigger. get bigger.
...@@ -23615,7 +23647,7 @@ not uncommon) by using hdpram to configure your disks interface! The ...@@ -23615,7 +23647,7 @@ not uncommon) by using hdpram to configure your disks interface! The
following should be quite good hdparm options for @code{MySQL} (and following should be quite good hdparm options for @code{MySQL} (and
probably many other applications): probably many other applications):
@example @example
hdparm -m 16 -d 1 hdparm -m 16 -d 1
@end example @end example
...@@ -23936,7 +23968,7 @@ All joins are done in one pass and most joins can be done without even ...@@ -23936,7 +23968,7 @@ All joins are done in one pass and most joins can be done without even
using a temporary table. Most temporary tables are memory-based (HEAP) using a temporary table. Most temporary tables are memory-based (HEAP)
tables. Temporary tables with a big record length (calculated as the tables. Temporary tables with a big record length (calculated as the
sum of all column lengths) or that contain @code{BLOB} columns are sum of all column lengths) or that contain @code{BLOB} columns are
stored on disk. stored on disk.
One problem in @strong{MySQL} versions before 3.23.2 is that if a HEAP table One problem in @strong{MySQL} versions before 3.23.2 is that if a HEAP table
exceeds the size of @code{tmp_table_size}, you get the error @code{The exceeds the size of @code{tmp_table_size}, you get the error @code{The
...@@ -24206,8 +24238,8 @@ will give you more hits in the index cache and thus fewer disk ...@@ -24206,8 +24238,8 @@ will give you more hits in the index cache and thus fewer disk
seeks. @xref{Server parameters}. seeks. @xref{Server parameters}.
@item @item
In some circumstances it can be beneficial to split a table that is In some circumstances it can be beneficial to split a table that is
scanned very often into two. This is especially true if it is a dynamic scanned very often into two. This is especially true if it is a dynamic
format table and it is possible to use a smaller static format table that format table and it is possible to use a smaller static format table that
can be used to find the relevant rows when scanning the table. can be used to find the relevant rows when scanning the table.
@end itemize @end itemize
...@@ -24264,7 +24296,7 @@ SELECT * FROM foo WHERE column=constant ORDER BY column, key_part1; ...@@ -24264,7 +24296,7 @@ SELECT * FROM foo WHERE column=constant ORDER BY column, key_part1;
SELECT * FROM foo WHERE key_part1=const GROUP BY key_part2; SELECT * FROM foo WHERE key_part1=const GROUP BY key_part2;
@end example @end example
@item @item
In some cases a query can be optimized to retrieve values without In some cases a query can be optimized to retrieve values without
consulting the data file. If all used columns for some table are numeric consulting the data file. If all used columns for some table are numeric
and form a leftmost prefix for some key, the values may be retrieved and form a leftmost prefix for some key, the values may be retrieved
...@@ -24385,7 +24417,7 @@ way much more quickly find the few rows to return in the result. ...@@ -24385,7 +24417,7 @@ way much more quickly find the few rows to return in the result.
@section Speed of queries that access or update data @section Speed of queries that access or update data
First, one thing that affects all queries: The more complex permission First, one thing that affects all queries: The more complex permission
system setup you have, the more overhead you get. system setup you have, the more overhead you get.
If you do not have any @code{GRANT} statements done @strong{MySQL} will If you do not have any @code{GRANT} statements done @strong{MySQL} will
optimize the permission checking somewhat. So if you have a very high optimize the permission checking somewhat. So if you have a very high
...@@ -24491,8 +24523,8 @@ time for a large table! ...@@ -24491,8 +24523,8 @@ time for a large table!
@node Where optimizations, LEFT JOIN optimization, SELECT speed, Query Speed @node Where optimizations, LEFT JOIN optimization, SELECT speed, Query Speed
@subsection How MySQL optimizes @code{WHERE} clauses @subsection How MySQL optimizes @code{WHERE} clauses
The @code{WHERE} optimizations are put in the @code{SELECT} part here because The @code{WHERE} optimizations are put in the @code{SELECT} part here because
they are mostly used with @code{SELECT}, but the same optimizations apply for they are mostly used with @code{SELECT}, but the same optimizations apply for
@code{WHERE} in @code{DELETE} and @code{UPDATE} statements. @code{WHERE} in @code{DELETE} and @code{UPDATE} statements.
Also note that this section is incomplete. @strong{MySQL} does many Also note that this section is incomplete. @strong{MySQL} does many
...@@ -24529,7 +24561,7 @@ expression when used with only one table. ...@@ -24529,7 +24561,7 @@ expression when used with only one table.
Early detection of invalid constant expressions. @strong{MySQL} quickly Early detection of invalid constant expressions. @strong{MySQL} quickly
detects that some @code{SELECT} statements are impossible and returns no rows. detects that some @code{SELECT} statements are impossible and returns no rows.
@item @item
@code{HAVING} is merged with @code{WHERE} if you don't use @code{GROUP BY} @code{HAVING} is merged with @code{WHERE} if you don't use @code{GROUP BY}
or group functions (@code{COUNT()}, @code{MIN()}...) or group functions (@code{COUNT()}, @code{MIN()}...)
@item @item
For each sub-join, a simpler @code{WHERE} is constructed to get a fast For each sub-join, a simpler @code{WHERE} is constructed to get a fast
...@@ -24686,7 +24718,7 @@ the whole table. ...@@ -24686,7 +24718,7 @@ the whole table.
When combining @code{LIMIT #} with @code{DISTINCT}, @strong{MySQL} will stop When combining @code{LIMIT #} with @code{DISTINCT}, @strong{MySQL} will stop
as soon as it finds @code{#} unique rows. as soon as it finds @code{#} unique rows.
@item @item
In some cases a @code{GROUP BY} can be resolved by reading the key in order In some cases a @code{GROUP BY} can be resolved by reading the key in order
(or do a sort on the key) and then calculate summaries until the (or do a sort on the key) and then calculate summaries until the
key value changes. In this case @code{LIMIT #} will not calculate any key value changes. In this case @code{LIMIT #} will not calculate any
unnecessary @code{GROUP BY}'s. unnecessary @code{GROUP BY}'s.
...@@ -24755,11 +24787,11 @@ faster when the table has many indexes. Use the following procedure: ...@@ -24755,11 +24787,11 @@ faster when the table has many indexes. Use the following procedure:
Optionally create the table with @code{CREATE TABLE}. For example using Optionally create the table with @code{CREATE TABLE}. For example using
@code{mysql} or Perl-DBI. @code{mysql} or Perl-DBI.
@item @item
Execute a @code{FLUSH TABLES} statement or the shell command @code{mysqladmin Execute a @code{FLUSH TABLES} statement or the shell command @code{mysqladmin
flush-tables}. flush-tables}.
@item @item
Use @code{myisamchk --keys-used=0 -rq /path/to/db/tbl_name}. This will Use @code{myisamchk --keys-used=0 -rq /path/to/db/tbl_name}. This will
remove all usage of all indexes from the table. remove all usage of all indexes from the table.
...@@ -24841,8 +24873,8 @@ many updates in a row later. Doing many updates in a row is much quicker ...@@ -24841,8 +24873,8 @@ many updates in a row later. Doing many updates in a row is much quicker
than doing one at a time if you lock the table. than doing one at a time if you lock the table.
Note that, with dynamic record format, updating a record to Note that, with dynamic record format, updating a record to
a longer total length may split the record. So if you do this often a longer total length may split the record. So if you do this often
it is very important to @code{OPTIMIZE TABLE} sometimes. it is very important to @code{OPTIMIZE TABLE} sometimes.
@xref{OPTIMIZE TABLE, , @code{OPTIMIZE TABLE}}. @xref{OPTIMIZE TABLE, , @code{OPTIMIZE TABLE}}.
@node Delete speed, , Update speed, Query Speed @node Delete speed, , Update speed, Query Speed
...@@ -25138,7 +25170,7 @@ from this benchmark. ...@@ -25138,7 +25170,7 @@ from this benchmark.
As you can see in these results all databases have some weak points. That As you can see in these results all databases have some weak points. That
is, they have different design compromises that lead to different is, they have different design compromises that lead to different
behavior. behavior.
If you strive for database independence you need to get a good feeling If you strive for database independence you need to get a good feeling
of each SQL server's bottlenecks. @strong{MySQL} is VERY fast in of each SQL server's bottlenecks. @strong{MySQL} is VERY fast in
...@@ -25167,7 +25199,7 @@ web applications, a possibility is to create an application layer that ...@@ -25167,7 +25199,7 @@ web applications, a possibility is to create an application layer that
caches all results to give you even higher performance. By letting caches all results to give you even higher performance. By letting
old results 'expire' after a while you can keep the cache reasonably old results 'expire' after a while you can keep the cache reasonably
fresh. This is quite nice in case of extremely high load, in which case fresh. This is quite nice in case of extremely high load, in which case
you can dynamically increase the cache and set the expire timeout higher you can dynamically increase the cache and set the expire timeout higher
until things get back to normal. until things get back to normal.
In this case the table creation information should contain information In this case the table creation information should contain information
...@@ -25253,7 +25285,7 @@ time for the operations. ...@@ -25253,7 +25285,7 @@ time for the operations.
For example (run on the same NT 4.0 machine): For example (run on the same NT 4.0 machine):
@multitable @columnfractions .6 .2 .2 @multitable @columnfractions .6 .2 .2
@strong{Reading 2000000 rows by index} @tab @strong{Seconds} @tab @strong{Seconds} @strong{Reading 2000000 rows by index} @tab @strong{Seconds} @tab @strong{Seconds}
@item mysql @tab 367 @tab 249 @item mysql @tab 367 @tab 249
@item mysql_odbc @tab 464 @item mysql_odbc @tab 464
...@@ -25265,7 +25297,7 @@ For example (run on the same NT 4.0 machine): ...@@ -25265,7 +25297,7 @@ For example (run on the same NT 4.0 machine):
@item sybase_odbc @tab 17614 @item sybase_odbc @tab 17614
@end multitable @end multitable
@multitable @columnfractions .6 .2 .2 @multitable @columnfractions .6 .2 .2
@strong{Inserting (350768) rows} @tab @strong{Seconds} @tab @strong{Seconds} @strong{Inserting (350768) rows} @tab @strong{Seconds} @tab @strong{Seconds}
@item mysql @tab 381 @tab 206 @item mysql @tab 381 @tab 206
@item mysql_odbc @tab 619 @item mysql_odbc @tab 619
...@@ -25277,7 +25309,7 @@ For example (run on the same NT 4.0 machine): ...@@ -25277,7 +25309,7 @@ For example (run on the same NT 4.0 machine):
@item sybase_odbc @tab 4802 @item sybase_odbc @tab 4802
@end multitable @end multitable
In the above test @strong{MySQL} was run with a 8M index cache. In the above test @strong{MySQL} was run with a 8M index cache.
Note that Oracle is not included because they asked to be removed. All Note that Oracle is not included because they asked to be removed. All
Oracle benchmarks has to be passed by Oracle! We believe that makes Oracle benchmarks has to be passed by Oracle! We believe that makes
...@@ -25486,7 +25518,7 @@ history file. ...@@ -25486,7 +25518,7 @@ history file.
Use compression in server/client protocol. Use compression in server/client protocol.
@item -#, --debug[=...] @item -#, --debug[=...]
Debug log. Default is 'd:t:o,/tmp/mysql.trace' Debug log. Default is 'd:t:o,/tmp/mysql.trace'
@item -D, --database=.. @item -D, --database=..
Database to use; This is mainly useful in the @code{my.cnf} file. Database to use; This is mainly useful in the @code{my.cnf} file.
@item -e, --execute=... @item -e, --execute=...
Execute command and quit. (Output like with --batch) Execute command and quit. (Output like with --batch)
...@@ -25711,7 +25743,7 @@ Add @code{LOCK TABLES} before and @code{UNLOCK TABLE} after each table dump. ...@@ -25711,7 +25743,7 @@ Add @code{LOCK TABLES} before and @code{UNLOCK TABLE} after each table dump.
(To get faster inserts into @strong{MySQL}). (To get faster inserts into @strong{MySQL}).
@item --add-drop-table @item --add-drop-table
Add a @code{drop table} before each create statement. Add a @code{drop table} before each create statement.
@item -A, --all-databases @item -A, --all-databases
Dump all the databases. This will be same as @code{--databases} with all Dump all the databases. This will be same as @code{--databases} with all
databases selected. databases selected.
@item -a, --all @item -a, --all
...@@ -25864,7 +25896,7 @@ all be imported into a table named @code{patient}. ...@@ -25864,7 +25896,7 @@ all be imported into a table named @code{patient}.
@code{mysqlimport} supports the following options: @code{mysqlimport} supports the following options:
@table @code @table @code
@item -c, --columns=... @item -c, --columns=...
This option takes a comma separated list of field names as an argument. This option takes a comma separated list of field names as an argument.
The field list is passed to LOAD DATA INFILE MySQL sql command, which The field list is passed to LOAD DATA INFILE MySQL sql command, which
mysqlimport calls MySQL to execute. For more information, please see mysqlimport calls MySQL to execute. For more information, please see
...@@ -26484,10 +26516,10 @@ shell> myisamchk /path/to/datadir/*/*.MYI ...@@ -26484,10 +26516,10 @@ shell> myisamchk /path/to/datadir/*/*.MYI
@code{myisamchk} supports the following options: @code{myisamchk} supports the following options:
@menu @menu
* myisamchk general options:: * myisamchk general options::
* myisamchk check options:: * myisamchk check options::
* myisamchk repair options:: * myisamchk repair options::
* myisamchk other options:: * myisamchk other options::
@end menu @end menu
@node myisamchk general options, myisamchk check options, myisamchk syntax, myisamchk syntax @node myisamchk general options, myisamchk check options, myisamchk syntax, myisamchk syntax
...@@ -26623,11 +26655,11 @@ If you have lot's of memory, you should increase the size of ...@@ -26623,11 +26655,11 @@ If you have lot's of memory, you should increase the size of
Directory where character sets are stored. Directory where character sets are stored.
@item --set-character-set=name @item --set-character-set=name
Change the character set used by the index Change the character set used by the index
@item .t or --tmpdir=path @item .t or --tmpdir=path
Path where to store temporary files. If this is not set, @code{myisamchk} will Path where to store temporary files. If this is not set, @code{myisamchk} will
use the environment variable @code{TMPDIR} for this. use the environment variable @code{TMPDIR} for this.
@item -q or --quick @item -q or --quick
Faster repair by not modifying the data file. One can give a second Faster repair by not modifying the data file. One can give a second
@code{-q} to force @code{myisamchk} to modify the original datafile in case @code{-q} to force @code{myisamchk} to modify the original datafile in case
of duplicate keys of duplicate keys
@item -u or --unpack @item -u or --unpack
...@@ -27243,7 +27275,7 @@ be writable by you. ...@@ -27243,7 +27275,7 @@ be writable by you.
If you are using @strong{MySQL} 3.23.16 and above you can (and should) use the If you are using @strong{MySQL} 3.23.16 and above you can (and should) use the
@code{CHECK} and @code{REPAIR} commands to check and repair @code{MyISAM} @code{CHECK} and @code{REPAIR} commands to check and repair @code{MyISAM}
tables. @xref{CHECK TABLE}. @xref{REPAIR TABLE}. tables. @xref{CHECK TABLE}. @xref{REPAIR TABLE}.
The manual section about table maintenence includes the options to The manual section about table maintenence includes the options to
@code{isamchk}/@code{myisamchk}. @xref{Table maintenance}. @code{isamchk}/@code{myisamchk}. @xref{Table maintenance}.
...@@ -28016,7 +28048,7 @@ program. ...@@ -28016,7 +28048,7 @@ program.
@strong{MyODBC} is a 32-bit ODBC (2.50) level 0 driver for connecting @strong{MyODBC} is a 32-bit ODBC (2.50) level 0 driver for connecting
an ODBC-aware application to @strong{MySQL}. @strong{MyODBC} works on an ODBC-aware application to @strong{MySQL}. @strong{MyODBC} works on
Windows95, Windows98, NT and on most Unix platforms. Windows95, Windows98, NT and on most Unix platforms.
Normally you only need to install @strong{MyODBC} on Windows machines. Normally you only need to install @strong{MyODBC} on Windows machines.
You only need @strong{MyODBC} for Unix if you have a program like You only need @strong{MyODBC} for Unix if you have a program like
...@@ -28077,7 +28109,7 @@ The @strong{MySQL} Driver default configuration screen is shown. ...@@ -28077,7 +28109,7 @@ The @strong{MySQL} Driver default configuration screen is shown.
@end itemize @end itemize
@item @item
Now start your application and select the ODBC driver with the DSN you Now start your application and select the ODBC driver with the DSN you
specified in the ODBC administrator. specified in the ODBC administrator.
@end itemize @end itemize
...@@ -28230,7 +28262,7 @@ ColdFusion 4.5.1. Before the @strong{MySQL} driver will appear in the ODBC ...@@ -28230,7 +28262,7 @@ ColdFusion 4.5.1. Before the @strong{MySQL} driver will appear in the ODBC
datasources drop-down list, you must build and copy the @strong{MyODBC} driver datasources drop-down list, you must build and copy the @strong{MyODBC} driver
to @file{/opt/coldfusion/lib/libmyodbc.so}. to @file{/opt/coldfusion/lib/libmyodbc.so}.
@item DataJunction @item DataJunction
You have to change it to output @code{VARCHAR} rather than @code{ENUM}, as You have to change it to output @code{VARCHAR} rather than @code{ENUM}, as
it exports the latter in a manner that causes @strong{MySQL} grief. it exports the latter in a manner that causes @strong{MySQL} grief.
@item Excel @item Excel
...@@ -28406,7 +28438,7 @@ LogFormat \ ...@@ -28406,7 +28438,7 @@ LogFormat \
In @strong{MySQL} you can do something like this: In @strong{MySQL} you can do something like this:
@example @example
LOAD DATA INFILE '/local/access_log' INTO TABLE table_name LOAD DATA INFILE '/local/access_log' INTO TABLE table_name
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
@end example @end example
...@@ -28474,7 +28506,7 @@ Check also that all your libraries (like glibc) are up to date. ...@@ -28474,7 +28506,7 @@ Check also that all your libraries (like glibc) are up to date.
It's always good to use a machine with ECC memory to discover It's always good to use a machine with ECC memory to discover
memory problems early! memory problems early!
@item @item
If your keyboard is locked up, you may be able to fix this by If your keyboard is locked up, you may be able to fix this by
logging into your machine from another machine and execute logging into your machine from another machine and execute
@code{kbd_mode -a} on it. @code{kbd_mode -a} on it.
...@@ -28577,7 +28609,7 @@ without locking the table properly. ...@@ -28577,7 +28609,7 @@ without locking the table properly.
@item @item
If you are running many @code{mysqld} servers on the same data on a If you are running many @code{mysqld} servers on the same data on a
system that doesn't support good file system locks (normally handled by system that doesn't support good file system locks (normally handled by
the @code{lockd} deamon.) or if you are running the @code{lockd} deamon.) or if you are running
multiple servers with @code{--skip-locking} multiple servers with @code{--skip-locking}
@item @item
You have a crashed index/data file that contains very wrong data that You have a crashed index/data file that contains very wrong data that
...@@ -28825,7 +28857,7 @@ sure that no other programs is using the dynamic libraries! ...@@ -28825,7 +28857,7 @@ sure that no other programs is using the dynamic libraries!
* Too many connections:: @code{Too many connections} error * Too many connections:: @code{Too many connections} error
* Out of memory:: @code{Out of memory} error * Out of memory:: @code{Out of memory} error
* Packet too large:: @code{Packet too large} error * Packet too large:: @code{Packet too large} error
* Communication errors:: * Communication errors::
* Full table:: @code{The table is full} error * Full table:: @code{The table is full} error
* Commands out of sync:: @code{Commands out of sync} error in client * Commands out of sync:: @code{Commands out of sync} error in client
* Ignoring user:: @code{Ignoring user} error * Ignoring user:: @code{Ignoring user} error
...@@ -28887,7 +28919,7 @@ with named pipes. The name of the named pipe is @code{MySQL}. If you ...@@ -28887,7 +28919,7 @@ with named pipes. The name of the named pipe is @code{MySQL}. If you
don't give a hostname when connecting to @code{mysqld}, a @strong{MySQL} client don't give a hostname when connecting to @code{mysqld}, a @strong{MySQL} client
will first try to connect to the named pipe and if this doesn't work it will first try to connect to the named pipe and if this doesn't work it
will connect to the TCP/IP port. You can force the use of named pipes will connect to the TCP/IP port. You can force the use of named pipes
on Windows by using @code{.} as the hostname. on Windows by using @code{.} as the hostname.
The error (2002) @code{Can't connect to ...} normally means that there The error (2002) @code{Can't connect to ...} normally means that there
isn't a @strong{MySQL} server running on the system or that you are isn't a @strong{MySQL} server running on the system or that you are
...@@ -28968,7 +29000,7 @@ some_hostname}, you can try the following things to find out what is the ...@@ -28968,7 +29000,7 @@ some_hostname}, you can try the following things to find out what is the
problem: problem:
@itemize @bullet @itemize @bullet
@item @item
Check if the server up by doing @code{telnet your-host-name Check if the server up by doing @code{telnet your-host-name
tcp-ip-port-number} and press @code{RETURN} a couple of times. If there tcp-ip-port-number} and press @code{RETURN} a couple of times. If there
is a @strong{MySQL} server running on this port you should get a is a @strong{MySQL} server running on this port you should get a
...@@ -29088,7 +29120,7 @@ The client program did not call @code{mysql_close()} before exit ...@@ -29088,7 +29120,7 @@ The client program did not call @code{mysql_close()} before exit
Usage of duplex Ethernet protocol, both half and full with Usage of duplex Ethernet protocol, both half and full with
Linux. Many Linux Ethernet drivers have this bug. You should test Linux. Many Linux Ethernet drivers have this bug. You should test
for this bug by transferring a huge file via ftp between these tow for this bug by transferring a huge file via ftp between these tow
machines. If a transfer goes in burst-pause-burst-pause .. mode then machines. If a transfer goes in burst-pause-burst-pause .. mode then
you are experiencing a Linux duplex syndrome. The only solution to you are experiencing a Linux duplex syndrome. The only solution to
this problem is switching of both half and full duplexing on hubs this problem is switching of both half and full duplexing on hubs
and switches and switches
...@@ -30853,7 +30885,7 @@ The database didn't exists. ...@@ -30853,7 +30885,7 @@ The database didn't exists.
@item ER_DBACCESS_DENIED_ERROR @item ER_DBACCESS_DENIED_ERROR
The user did not have access rights to the database. The user did not have access rights to the database.
@item ER_WRONG_DB_NAME @item ER_WRONG_DB_NAME
The database name was too long. The database name was too long.
@end table @end table
@subsubheading Example @subsubheading Example
...@@ -30874,7 +30906,7 @@ if (mysql_change_user(&mysql, "user", "password", "new_database")) ...@@ -30874,7 +30906,7 @@ if (mysql_change_user(&mysql, "user", "password", "new_database"))
@subsubheading Description @subsubheading Description
Returns the default character set for the current connection. Returns the default character set for the current connection.
@subsubheading Return values @subsubheading Return values
...@@ -32022,7 +32054,7 @@ The specified group in the option file may contain the following options: ...@@ -32022,7 +32054,7 @@ The specified group in the option file may contain the following options:
@item @code{password} @tab Default password. @item @code{password} @tab Default password.
@item @code{pipe} @tab Use named pipes to connect to a @strong{MySQL} server on NT. @item @code{pipe} @tab Use named pipes to connect to a @strong{MySQL} server on NT.
@item @code{port} @tab Default port number. @item @code{port} @tab Default port number.
@item @code{return-found-rows} @tab Tell @code{mysql_info()} to return found rows instead of updated rows when using @code{UPDATE}. @item @code{return-found-rows} @tab Tell @code{mysql_info()} to return found rows instead of updated rows when using @code{UPDATE}.
@item @code{socket} @tab Default socket number. @item @code{socket} @tab Default socket number.
@item @code{timeout} @tab Connect timeout in seconds. @item @code{timeout} @tab Connect timeout in seconds.
@item @code{user} @tab Default user. @item @code{user} @tab Default user.
...@@ -32814,7 +32846,7 @@ that the subroutines in @file{net.c} that read from sockets are not ...@@ -32814,7 +32846,7 @@ that the subroutines in @file{net.c} that read from sockets are not
interrupt-safe. This was done with the thought that you might want to interrupt-safe. This was done with the thought that you might want to
have your own alarm that can break a long read to a server. If you have your own alarm that can break a long read to a server. If you
install an interrupt handlers for the @code{SIGPIPE} interrupt, install an interrupt handlers for the @code{SIGPIPE} interrupt,
the socket handling should be thread safe. the socket handling should be thread safe.
In the older binaries we distribute on our web site, the client In the older binaries we distribute on our web site, the client
libraries are not normally compiled with the thread safe option (the libraries are not normally compiled with the thread safe option (the
...@@ -34010,9 +34042,10 @@ working on the @strong{MySQL} code. ...@@ -34010,9 +34042,10 @@ working on the @strong{MySQL} code.
@menu @menu
* MySQL threads:: MySQL threads * MySQL threads:: MySQL threads
* MySQL full-text search:: MySQL full-text search
@end menu @end menu
@node MySQL threads, , MySQL internals, MySQL internals @node MySQL threads, MySQL full-text search, MySQL internals, MySQL internals
@section MySQL threads @section MySQL threads
The @strong{MySQL} server creates the the following threads: The @strong{MySQL} server creates the the following threads:
...@@ -34051,6 +34084,77 @@ started to read and apply updates from the master. ...@@ -34051,6 +34084,77 @@ started to read and apply updates from the master.
@code{mysqladmin processlist} only shows the connection and @code{INSERT @code{mysqladmin processlist} only shows the connection and @code{INSERT
DELAYED} threads. DELAYED} threads.
@node MySQL full-text search, , MySQL threads, MySQL internals
@section MySQL full-text search
Since version 3.23.23, @strong{MySQL} has support for full-text indexing
and searching. Full-text index in @strong{MySQL} is an
index of type @code{FULLTEXT}. Fulltext indexes can be created from
@code{VARCHAR}, @code{TEXT}, and @code{BLOB} columns at
@code{CREATE TABLE} time or added later with @code{ALTER TABLE} or
@code{CREATE INDEX}. Full-text search is performed with @code{MATCH} function.
@example
mysql> CREATE TABLE t (a VARCHAR(200), b TEXT, FULLTEXT (a,b));
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t VALUES
-> ('MySQL has now support', 'for full-text search'),
-> ('Full-text indexes', 'are called collections'),
-> ('Only MyISAM tables','support collections'),
-> ('Function MATCH ... AGAINST()','is used to do a search'),
-> ('Full-text search in MySQL', 'implements vector space model');
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM t WHERE MATCH (a,b) AGAINST ('MySQL');
+---------------------------+-------------------------------+
| a | b |
+---------------------------+-------------------------------+
| MySQL has now support | for full-text search |
| Full-text search in MySQL | implements vector-space-model |
+---------------------------+-------------------------------+
2 rows in set (0.00 sec)
mysql> SELECT *,MATCH a,b AGAINST ('collections support') as x FROM t;
+------------------------------+-------------------------------+--------+
| a | b | x |
+------------------------------+-------------------------------+--------+
| MySQL has now support | for full-text search | 0.3834 |
| Full-text indexes | are called collections | 0.3834 |
| Only MyISAM tables | support collections | 0.7668 |
| Function MATCH ... AGAINST() | is used to do a search | 0 |
| Full-text search in MySQL | implements vector space model | 0 |
+------------------------------+-------------------------------+--------+
5 rows in set (0.00 sec)
@end example
Function @code{MATCH} matches a natural language query @code{AGAINST} a
text collection (which is simply the columns that are covered
by fulltext index). For every row in a table it returns relevance -
similarity measure between the text in that row (in the columns, that
are part of the collection) and the query. When it used in a
@code{WHERE} clause (see example above) the rows returned are
automatically sorted with relevance decreasing. Relevance is a non-
negative floating point number. Zero relevance means no similarity.
Relevance is computed based on number of words in the row and number of
unique words in that row, total number of words in the collection,
number of documents (rows), that contain a particular word, etc.
MySQL uses very simple parser to split text into words. "Word" is
any sequence of letters, numbers, @code{'}, and @code{_}. Any "word"
that is present in stopword list or just too short (3 characters or less)
is ignored.
Every correct word in the collection and in the query is weighted,
according to their significance in the query or collection. This way, a
word that is present in many documents will have lower weight (and may
even have a zero weight), because it has lower semantic value in this
particular collection. Otherwise, if the word is rare, it will receive a
higher weight. Weights of the words are then combined to compute the
relevance.
Such a technique works best with big collections (in fact, it was
carefully tuned up this way). For very small tables word distribution
does not reflect adequately their semantical value, and this model
may sometimes produce bizarre results.
@page @page
@node Environment variables, Users, MySQL internals, Top @node Environment variables, Users, MySQL internals, Top
...@@ -34141,7 +34245,7 @@ variables to modify the behaviour of @strong{MySQL}. @xref{Option files}. ...@@ -34141,7 +34245,7 @@ variables to modify the behaviour of @strong{MySQL}. @xref{Option files}.
@itemize @bullet @itemize @bullet
@item @uref{http://www.yahoo.com/, Yahoo!} @item @uref{http://www.yahoo.com/, Yahoo!}
@item @uref{http://slashdot.org/, Slashdot: A pro-Linux/tech news and comment/discussion site} @item @uref{http://slashdot.org/, Slashdot: A pro-Linux/tech news and comment/discussion site}
@item @uref{http://www.linux.com/, All about Linux} @item @uref{http://www.linux.com/, All about Linux}
...@@ -34346,7 +34450,7 @@ Schedule System at Pensacola Junior College} ...@@ -34346,7 +34450,7 @@ Schedule System at Pensacola Junior College}
@item @uref{http://www.32bit.com/, 32bit.com; An extensive shareware / freeware archive} @item @uref{http://www.32bit.com/, 32bit.com; An extensive shareware / freeware archive}
@item @uref{http://www.jokes2000.com/, Jokes 2000} @item @uref{http://www.jokes2000.com/, Jokes 2000}
@c Added 990604; EMAIL: ah@dybdahl.dk @c Added 990604; EMAIL: ah@dybdahl.dk
@item @uref{http://www.burken.nu/ , Burken.NU} Burken is a webhotel that @item @uref{http://www.burken.nu/ , Burken.NU} Burken is a webhotel that
...@@ -34545,7 +34649,7 @@ interface, you should fetch the @code{Data-Dumper}, @code{DBI}, and ...@@ -34545,7 +34649,7 @@ interface, you should fetch the @code{Data-Dumper}, @code{DBI}, and
@uref{http://www.mysql.com/Downloads/Contrib/00-README, 00-README} @uref{http://www.mysql.com/Downloads/Contrib/00-README, 00-README}
This listing. This listing.
@appendixsec API's @appendixsec API's
@itemize @bullet @itemize @bullet
...@@ -34641,7 +34745,7 @@ A library to use @strong{MySQL} with Delphi} ...@@ -34641,7 +34745,7 @@ A library to use @strong{MySQL} with Delphi}
@item @uref{http://www.mysql.com/Downloads/Contrib/mysql-ruby-2.2.0.tar.gz, mysql-ruby-2.2.0.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/mysql-ruby-2.2.0.tar.gz, mysql-ruby-2.2.0.tar.gz}
@strong{MySQL} Ruby module. By TOMITA Masahiro @email{tommy@@tmtm.org} @strong{MySQL} Ruby module. By TOMITA Masahiro @email{tommy@@tmtm.org}
@uref{http://www.netlab.co.jp/ruby/,Ruby} is an Object-Oriented Interpreter Language. @uref{http://www.netlab.co.jp/ruby/,Ruby} is an Object-Oriented Interpreter Language.
@item @uref{http://www.mysql.com/Downloads/Contrib/JdmMysqlDriver-0.1.0.tar.gz,JdmMysqlDriver-0.1.0.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/JdmMysqlDriver-0.1.0.tar.gz,JdmMysqlDriver-0.1.0.tar.gz}
A VisualWorks 3.0 Smalltalk driver for @strong{MySQL}. By A VisualWorks 3.0 Smalltalk driver for @strong{MySQL}. By
@email{joshmiller@@earthlink.net} @email{joshmiller@@earthlink.net}
...@@ -34657,14 +34761,14 @@ An interface program for the Matlab program by MathWorks. The interface ...@@ -34657,14 +34761,14 @@ An interface program for the Matlab program by MathWorks. The interface
is done by Kimmo Uutela and John Fisher (not by Mathworks). is done by Kimmo Uutela and John Fisher (not by Mathworks).
Check @uref{http://boojum.hut.fi/~kuutela/mysqlmex.html,mysqlmex.html} Check @uref{http://boojum.hut.fi/~kuutela/mysqlmex.html,mysqlmex.html}
for more information. for more information.
@item @uref{http://www.mysql.com/Downloads/Contrib/mysqltcl-1.53.tar.gz, mysqltcl-1.53.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/mysqltcl-1.53.tar.gz, mysqltcl-1.53.tar.gz}
Tcl interface for @strong{MySQL}. Based on @file{msqltcl-1.50.tar.gz}. Tcl interface for @strong{MySQL}. Based on @file{msqltcl-1.50.tar.gz}.
Updated by Tobias Ritzau, @email{tobri@@ida.liu.se}. Updated by Tobias Ritzau, @email{tobri@@ida.liu.se}.
@item @uref{http://www.mysql.com/Downloads/Contrib/MyC-0.1.tar.gz, MyC-0.1.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/MyC-0.1.tar.gz, MyC-0.1.tar.gz}
A Visual Basic-like API, by Ed Carp. A Visual Basic-like API, by Ed Carp.
@item @uref{http://www.mysql.com/Downloads/Contrib/sqlscreens-1.0.1.tar.gz, sqlscreens-1.0.1.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/sqlscreens-1.0.1.tar.gz, sqlscreens-1.0.1.tar.gz}
Tcl/Tk code to generate database screens. By Jean-Francois Dockes. Tcl/Tk code to generate database screens. By Jean-Francois Dockes.
...@@ -34811,12 +34915,12 @@ database. By Tomas Zeman. ...@@ -34811,12 +34915,12 @@ database. By Tomas Zeman.
@uref{http://futurerealm.com/opensource/futuresql.htm, FutureSQL Web Database Administration Tool}. @uref{http://futurerealm.com/opensource/futuresql.htm, FutureSQL Web Database Administration Tool}.
FutureSQL by Peter F. Brown, is a Free, Open Source Rapid Application FutureSQL by Peter F. Brown, is a Free, Open Source Rapid Application
Development web database administration tool, written in Perl, Development web database administration tool, written in Perl,
using @strong{MySQL}. It uses @code{DBI:DBD} and @code{CGI.pm}. using @strong{MySQL}. It uses @code{DBI:DBD} and @code{CGI.pm}.
FutureSQL allows one to easily setup config files to view, edit, delete FutureSQL allows one to easily setup config files to view, edit, delete
and otherwise process records from a @strong{MySQL} database. It uses a data and otherwise process records from a @strong{MySQL} database. It uses a data
dictionary, configuration files and templates, and allows "pre-processing" dictionary, configuration files and templates, and allows "pre-processing"
and "post-processing" on both fields, records and operations. and "post-processing" on both fields, records and operations.
@end itemize @end itemize
@appendixsec Web tools @appendixsec Web tools
...@@ -34861,7 +34965,7 @@ Perl SQL database interface package for html. ...@@ -34861,7 +34965,7 @@ Perl SQL database interface package for html.
A macro-processor to simply writing CGI/Database programs in C++ by Sasha Pachev. A macro-processor to simply writing CGI/Database programs in C++ by Sasha Pachev.
@item @uref{http://www.mysql.com/Downloads/Contrib/webboard-1.0.zip, WebBoard 1.0} @item @uref{http://www.mysql.com/Downloads/Contrib/webboard-1.0.zip, WebBoard 1.0}
EU-Industries Internet-Message-Board. EU-Industries Internet-Message-Board.
@item @uref{http://www.mysql.com/Downloads/Contrib/DBIx-TextIndex-0.02.tar.gz, DBIx-TextIndex-0.02.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/DBIx-TextIndex-0.02.tar.gz, DBIx-TextIndex-0.02.tar.gz}
Full-text searching with Perl on @code{BLOB}/@code{TEXT} columns by Daniel Koch. Full-text searching with Perl on @code{BLOB}/@code{TEXT} columns by Daniel Koch.
...@@ -35105,7 +35209,7 @@ Patches to add logging to @strong{MySQL} for WU-ftpd. By Zeev Suraski, ...@@ -35105,7 +35209,7 @@ Patches to add logging to @strong{MySQL} for WU-ftpd. By Zeev Suraski,
@email{bourbon@@netvision.net.il}. @email{bourbon@@netvision.net.il}.
@item @uref{http://www.mysql.com/Downloads/Contrib/wu-ftpd-2.6.0-mysql.4.tar.gz,wu-ftpd-2.6.0-mysql.4.tar.gz} @item @uref{http://www.mysql.com/Downloads/Contrib/wu-ftpd-2.6.0-mysql.4.tar.gz,wu-ftpd-2.6.0-mysql.4.tar.gz}
Patches to add logging to @strong{MySQL} for WU-ftpd 2.6.0. By, Patches to add logging to @strong{MySQL} for WU-ftpd 2.6.0. By,
@email{takeshi@@SoftAgency.co.jp}, based on Zeev Suraski wuftpd patches. @email{takeshi@@SoftAgency.co.jp}, based on Zeev Suraski wuftpd patches.
@item @uref{http://www.mysql.com/Downloads/Contrib/Old-Versions, Old-Versions} @item @uref{http://www.mysql.com/Downloads/Contrib/Old-Versions, Old-Versions}
...@@ -35458,7 +35562,7 @@ though, so 3.23 is not released as a stable version yet. ...@@ -35458,7 +35562,7 @@ though, so 3.23 is not released as a stable version yet.
* News-3.23.4:: Changes in release 3.23.4 * News-3.23.4:: Changes in release 3.23.4
* News-3.23.3:: Changes in release 3.23.3 * News-3.23.3:: Changes in release 3.23.3
* News-3.23.2:: Changes in release 3.23.2 * News-3.23.2:: Changes in release 3.23.2
* News-3.23.1:: Changes in release 3.23.1 * News-3.23.1:: Changes in release 3.23.1
* News-3.23.0:: Changes in release 3.23.0 * News-3.23.0:: Changes in release 3.23.0
@end menu @end menu
...@@ -35498,7 +35602,7 @@ Fixed a lock in our thr_rwlock code, which could make selects that run ...@@ -35498,7 +35602,7 @@ Fixed a lock in our thr_rwlock code, which could make selects that run
at the same time as concurrent inserts crash. This only affects systems at the same time as concurrent inserts crash. This only affects systems
that don't have the @code{pthread_rwlock_rdlock} code. that don't have the @code{pthread_rwlock_rdlock} code.
@item @item
When deleting rows with a non-unique key in a HEAP table, all rows weren't When deleting rows with a non-unique key in a HEAP table, all rows weren't
always deleted. always deleted.
@item @item
Fixed that @code{SELECT} on part keys works with BDB tables. Fixed that @code{SELECT} on part keys works with BDB tables.
...@@ -35527,7 +35631,7 @@ Changed @code{myisamchk} so that @code{--fast} and ...@@ -35527,7 +35631,7 @@ Changed @code{myisamchk} so that @code{--fast} and
@item @item
Fixed fatal bug in @code{LOAD TABLE FROM MASTER} that did not lock the table during index re-build Fixed fatal bug in @code{LOAD TABLE FROM MASTER} that did not lock the table during index re-build
@item @item
@code{LOAD DATA INFILE} broke replication if the database was excluded from replication @code{LOAD DATA INFILE} broke replication if the database was excluded from replication
@item @item
More variables in @code{SHOW SLAVE STATUS} and @code{SHOW MASTER STATUS} More variables in @code{SHOW SLAVE STATUS} and @code{SHOW MASTER STATUS}
@item @item
...@@ -35734,7 +35838,7 @@ is not the same as @code{int}. ...@@ -35734,7 +35838,7 @@ is not the same as @code{int}.
@item @item
Fixed master shutdown aborting the slave thread. Fixed master shutdown aborting the slave thread.
@item @item
Fixed a race condition in @code{INSERT DELAYED} code when doing Fixed a race condition in @code{INSERT DELAYED} code when doing
@code{ALTER TABLE}. @code{ALTER TABLE}.
@item @item
Added deadlock detection sanity checks to @code{INSERT DELAYED} Added deadlock detection sanity checks to @code{INSERT DELAYED}
...@@ -35765,7 +35869,7 @@ Fixed bug with @code{delayed_key_writes} tables and @code{CHECK TABLE}. ...@@ -35765,7 +35869,7 @@ Fixed bug with @code{delayed_key_writes} tables and @code{CHECK TABLE}.
@item @item
Added @code{replicate-do-db} and @code{replicate-ignore-db} options to Added @code{replicate-do-db} and @code{replicate-ignore-db} options to
restrict which databases get replicated restrict which databases get replicated
@item @item
Added @code{SQL_LOG_BIN} option Added @code{SQL_LOG_BIN} option
@end itemize @end itemize
...@@ -35813,7 +35917,7 @@ Fixed a bug in reconnect (at the client side) where it didn't free memory ...@@ -35813,7 +35917,7 @@ Fixed a bug in reconnect (at the client side) where it didn't free memory
properly in some contexts. properly in some contexts.
@item @item
Fixed problems in update log when using @code{LAST_INSERT_ID()} to update Fixed problems in update log when using @code{LAST_INSERT_ID()} to update
a table with an auto_increment key. a table with an auto_increment key.
@item @item
Added function @code{NULLIF()}. Added function @code{NULLIF()}.
@item @item
...@@ -36024,7 +36128,7 @@ Fixed problem with timestamps and @code{INSERT DELAYED}. ...@@ -36024,7 +36128,7 @@ Fixed problem with timestamps and @code{INSERT DELAYED}.
Fixed that @code{date_column BETWEEN const_date AND const_date} works. Fixed that @code{date_column BETWEEN const_date AND const_date} works.
@item @item
Fixed problem when only changing a 0 to @code{NULL} in a table with Fixed problem when only changing a 0 to @code{NULL} in a table with
@code{BLOB/TEXT} columns. @code{BLOB/TEXT} columns.
@item @item
Fixed bug in range optimizer when using many key parts and or on the middle Fixed bug in range optimizer when using many key parts and or on the middle
key parts: @code{WHERE K1=1 and K3=2 and (K2=2 and K4=4 or K2=3 and K4=5)} key parts: @code{WHERE K1=1 and K3=2 and (K2=2 and K4=4 or K2=3 and K4=5)}
...@@ -36082,7 +36186,7 @@ Fixed problem with 8-bit characters as separators in @code{LOAD DATA INFILE}. ...@@ -36082,7 +36186,7 @@ Fixed problem with 8-bit characters as separators in @code{LOAD DATA INFILE}.
@item @item
Fixed problem when handling indexfiles larger than 8G. Fixed problem when handling indexfiles larger than 8G.
@item @item
Added latest patches to mit-pthreads for NetBSD. Added latest patches to mit-pthreads for NetBSD.
@item @item
Fixed problem with timezones that are < GMT -11. Fixed problem with timezones that are < GMT -11.
@item @item
...@@ -36152,7 +36256,7 @@ Fix core dump when releasing a lock from a non-existant table. ...@@ -36152,7 +36256,7 @@ Fix core dump when releasing a lock from a non-existant table.
@item @item
Remove locks on tables before starting to remove duplicates. Remove locks on tables before starting to remove duplicates.
@item @item
Added option @code{FULL} to @code{SHOW PROCESSLIST}. Added option @code{FULL} to @code{SHOW PROCESSLIST}.
@item @item
Added option @code{--verbose} to @code{mysqladmin}. Added option @code{--verbose} to @code{mysqladmin}.
@item @item
...@@ -36176,7 +36280,7 @@ Changed the argument to @code{mysql_data_seek()} from @code{ulong} to ...@@ -36176,7 +36280,7 @@ Changed the argument to @code{mysql_data_seek()} from @code{ulong} to
@item @item
Added @code{mysqld} option @code{-O lower_case_table_names=@{0|1@}} to allow Added @code{mysqld} option @code{-O lower_case_table_names=@{0|1@}} to allow
users to force table names to lower case. users to force table names to lower case.
@item @item
Added @code{SELECT ... INTO DUMPFILE}. Added @code{SELECT ... INTO DUMPFILE}.
@item @item
Added mysqld option @code{--ansi} to make some functions @code{ANSI SQL} Added mysqld option @code{--ansi} to make some functions @code{ANSI SQL}
...@@ -36303,7 +36407,7 @@ Fixed problem with @code{LIKE} "%" on an index that may have @code{NULL} values. ...@@ -36303,7 +36407,7 @@ Fixed problem with @code{LIKE} "%" on an index that may have @code{NULL} values.
Allow creation of temporary tables with same name as the original table. Allow creation of temporary tables with same name as the original table.
@item @item
When granting a user a grant option for a database, he couldn't grant When granting a user a grant option for a database, he couldn't grant
privileges to other users. privileges to other users.
@item @item
New command: @code{SHOW GRANTS FOR user} (by Sinisa). New command: @code{SHOW GRANTS FOR user} (by Sinisa).
@item @item
...@@ -36409,7 +36513,7 @@ Changed heap tables to be stored in low_byte_first order (to make it easy ...@@ -36409,7 +36513,7 @@ Changed heap tables to be stored in low_byte_first order (to make it easy
to convert to MyISAM tables) to convert to MyISAM tables)
@item @item
Automatic change of HEAP temporary tables to MyISAM tables in case of Automatic change of HEAP temporary tables to MyISAM tables in case of
'table is full' errors. 'table is full' errors.
@item @item
Added option @code{--init-file=file_name} to @code{mysqld}. Added option @code{--init-file=file_name} to @code{mysqld}.
@item @item
...@@ -36490,7 +36594,7 @@ This will describe the data in your query. Try the following: ...@@ -36490,7 +36594,7 @@ This will describe the data in your query. Try the following:
@example @example
SELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max elements,[max memory]]) SELECT ... FROM ... WHERE ... PROCEDURE ANALYSE([max elements,[max memory]])
@end example @end example
This procedure is extremely useful when you want to check the data in your This procedure is extremely useful when you want to check the data in your
table! table!
@item @item
...@@ -36718,7 +36822,7 @@ Fixed non-critical Y2K problem when writing short date to log files. ...@@ -36718,7 +36822,7 @@ Fixed non-critical Y2K problem when writing short date to log files.
Upgraded the configure and include files to match the latest 3.23 version. Upgraded the configure and include files to match the latest 3.23 version.
This should increase portability and make it easier to build shared libraries. This should increase portability and make it easier to build shared libraries.
@item @item
Added latest patches to mit-pthreads for NetBSD. Added latest patches to mit-pthreads for NetBSD.
@item @item
Fixed problem with timezones that are < GMT -11. Fixed problem with timezones that are < GMT -11.
@item @item
...@@ -36806,7 +36910,7 @@ Fixed some small problems with the installation. ...@@ -36806,7 +36910,7 @@ Fixed some small problems with the installation.
@itemize @bullet @itemize @bullet
@item @item
@code{DATA} is not a reserved word anymore. @code{DATA} is not a reserved word anymore.
@item @item
Fixed optimizer bug with tables with only one row. Fixed optimizer bug with tables with only one row.
@item @item
...@@ -39983,7 +40087,7 @@ will ensure that your thread installation has even a remote chance to work! ...@@ -39983,7 +40087,7 @@ will ensure that your thread installation has even a remote chance to work!
* Debugging server:: Debugging a @strong{MySQL} server * Debugging server:: Debugging a @strong{MySQL} server
* Debugging client:: Debugging a @strong{MySQL} client * Debugging client:: Debugging a @strong{MySQL} client
* The DBUG package:: The DBUG package * The DBUG package:: The DBUG package
* Locking methods:: * Locking methods::
* RTS-threads:: Comments about RTS threads * RTS-threads:: Comments about RTS threads
* Thread packages:: Differences between different thread packages * Thread packages:: Differences between different thread packages
@end menu @end menu
...@@ -41268,7 +41372,7 @@ such a program is covered only if its contents constitute a work based ...@@ -41268,7 +41372,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does. and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's 1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an you conspicuously and appropriately publish on each copy an
...@@ -45,6 +45,7 @@ my_config.h: ../config.h ...@@ -45,6 +45,7 @@ my_config.h: ../config.h
# This should be changed in the source and removed. # This should be changed in the source and removed.
my_global.h: global.h my_global.h: global.h
-$(RM) my_global.h
$(CP) global.h my_global.h $(CP) global.h my_global.h
# These files should not be included in distributions since they are # These files should not be included in distributions since they are
......
...@@ -40,6 +40,8 @@ typedef struct st_ft_doclist { ...@@ -40,6 +40,8 @@ typedef struct st_ft_doclist {
FT_DOC doc[1]; FT_DOC doc[1];
} FT_DOCLIST; } FT_DOCLIST;
extern const char *ft_precompiled_stopwords[];
int ft_init_stopwords(const char **); int ft_init_stopwords(const char **);
FT_DOCLIST * ft_init_search(void *, uint, byte *, uint, my_bool); FT_DOCLIST * ft_init_search(void *, uint, byte *, uint, my_bool);
......
...@@ -158,6 +158,7 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, ...@@ -158,6 +158,7 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key,
ALL_IN_ONE aio; ALL_IN_ONE aio;
FT_DOCLIST *dlist; FT_DOCLIST *dlist;
FT_DOC *dptr; FT_DOC *dptr;
my_off_t saved_lastpos;
/* black magic ON */ /* black magic ON */
if ((int) (keynr = _mi_check_index((MI_INFO *)info,keynr)) < 0) if ((int) (keynr = _mi_check_index((MI_INFO *)info,keynr)) < 0)
...@@ -173,6 +174,8 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, ...@@ -173,6 +174,8 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key,
aio.keyinfo=aio.info->s->keyinfo+keynr; aio.keyinfo=aio.info->s->keyinfo+keynr;
aio.key_root=aio.info->s->state.key_root[keynr]; aio.key_root=aio.info->s->state.key_root[keynr];
saved_lastpos=aio.info->lastpos;
if(!(wtree=ft_parse(NULL,key,key_len))) return NULL; if(!(wtree=ft_parse(NULL,key,key_len))) return NULL;
init_tree(&aio.dtree,0,sizeof(FT_SUPERDOC),(qsort_cmp)&FT_SUPERDOC_cmp,0, init_tree(&aio.dtree,0,sizeof(FT_SUPERDOC),(qsort_cmp)&FT_SUPERDOC_cmp,0,
...@@ -199,6 +202,7 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, ...@@ -199,6 +202,7 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key,
} }
err: err:
aio.info->lastpos=saved_lastpos;
delete_tree(&aio.dtree); delete_tree(&aio.dtree);
delete_tree(wtree); delete_tree(wtree);
free(wtree); free(wtree);
...@@ -217,7 +221,8 @@ int ft_read_next(FT_DOCLIST *handler, char *record) ...@@ -217,7 +221,8 @@ int ft_read_next(FT_DOCLIST *handler, char *record)
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
if (!(*info->read_record)(info,handler->doc[handler->curdoc].dpos,record)) info->lastpos=handler->doc[handler->curdoc].dpos;
if (!(*info->read_record)(info,info->lastpos,record))
{ {
info->update|= HA_STATE_AKTIV; /* Record is read */ info->update|= HA_STATE_AKTIV; /* Record is read */
return 0; return 0;
......
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
extern const MI_KEYSEG ft_keysegs[FT_SEGS]; extern const MI_KEYSEG ft_keysegs[FT_SEGS];
extern const char *ft_precompiled_stopwords[];
int _mi_ft_cmp(MI_INFO *, uint, const byte *, const byte *); int _mi_ft_cmp(MI_INFO *, uint, const byte *, const byte *);
int _mi_ft_add(MI_INFO *, uint, byte *, const byte *, my_off_t); int _mi_ft_add(MI_INFO *, uint, byte *, const byte *, my_off_t);
int _mi_ft_del(MI_INFO *, uint, byte *, const byte *, my_off_t); int _mi_ft_del(MI_INFO *, uint, byte *, const byte *, my_off_t);
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...@@ -1083,7 +1083,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, ...@@ -1083,7 +1083,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
if (!(sort_info->record=(byte*) my_malloc((uint) share->base.pack_reclength, if (!(sort_info->record=(byte*) my_malloc((uint) share->base.pack_reclength,
MYF(0)))) MYF(0))))
{ {
mi_check_print_error(param,"Not Enough memory for extra record"); mi_check_print_error(param,"Not enough memory for extra record");
goto err; goto err;
} }
...@@ -1141,6 +1141,14 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, ...@@ -1141,6 +1141,14 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
for (i=0 ; i < share->state.header.max_block_size ; i++) for (i=0 ; i < share->state.header.max_block_size ; i++)
share->state.key_del[i]= HA_OFFSET_ERROR; share->state.key_del[i]= HA_OFFSET_ERROR;
/* I think mi_repair and mi_repair_by_sort should do the same
(according, e.g. to ha_myisam::repair), but as mi_repair doesn't
touch key_map it cannot be used to T_CREATE_MISSING_KEYS.
That is the next line for... (serg)
*/
share->state.key_map= ((ulonglong)1L << share->base.keys)-1;
info->state->key_file_length=share->base.keystart; info->state->key_file_length=share->base.keystart;
lock_memory(param); /* Everything is alloced */ lock_memory(param); /* Everything is alloced */
...@@ -1271,8 +1279,15 @@ static int writekeys(register MI_INFO *info,byte *buff,my_off_t filepos) ...@@ -1271,8 +1279,15 @@ static int writekeys(register MI_INFO *info,byte *buff,my_off_t filepos)
{ {
if (((ulonglong) 1 << i) & info->s->state.key_map) if (((ulonglong) 1 << i) & info->s->state.key_map)
{ {
uint key_length=_mi_make_key(info,i,key,buff,filepos); if (info->s->keyinfo[i].flag & HA_FULLTEXT )
if (_mi_ck_write(info,i,key,key_length)) goto err; {
if (_mi_ft_add(info,i,(char*) key,buff,filepos)) goto err;
}
else
{
uint key_length=_mi_make_key(info,i,key,buff,filepos);
if (_mi_ck_write(info,i,key,key_length)) goto err;
}
} }
} }
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -1285,8 +1300,15 @@ static int writekeys(register MI_INFO *info,byte *buff,my_off_t filepos) ...@@ -1285,8 +1300,15 @@ static int writekeys(register MI_INFO *info,byte *buff,my_off_t filepos)
{ {
if (((ulonglong) 1 << i) & info->s->state.key_map) if (((ulonglong) 1 << i) & info->s->state.key_map)
{ {
uint key_length=_mi_make_key(info,i,key,buff,filepos); if (info->s->keyinfo[i].flag & HA_FULLTEXT)
if (_mi_ck_delete(info,i,key,key_length)) break; {
if (_mi_ft_del(info,i,(char*) key,buff,filepos)) break;
}
else
{
uint key_length=_mi_make_key(info,i,key,buff,filepos);
if (_mi_ck_delete(info,i,key,key_length)) break;
}
} }
} }
} }
...@@ -1919,8 +1941,22 @@ static int sort_key_read(SORT_INFO *sort_info, void *key) ...@@ -1919,8 +1941,22 @@ static int sort_key_read(SORT_INFO *sort_info, void *key)
"Found too many records; Can`t continue"); "Found too many records; Can`t continue");
DBUG_RETURN(1); DBUG_RETURN(1);
} }
VOID(_mi_make_key(info,sort_info->key,key,sort_info->record, /* Hmm, repair_by_sort uses find_all_keys, and find_all_keys strictly
sort_info->filepos)); implies "one row - one key per keynr", while for ft_key one row/keynr
can produce as many keys as the number of unique words in the text
that's why I disabled repair_by_sort for ft-keys. (serg)
*/
if (sort_info->keyinfo->flag & HA_FULLTEXT )
{
mi_check_print_error(sort_info->param,
"Can`t use repair_by_sort with FULLTEXT key");
DBUG_RETURN(1);
}
else
{
VOID(_mi_make_key(info,sort_info->key,key,sort_info->record,
sort_info->filepos));
}
DBUG_RETURN(sort_write_record(sort_info)); DBUG_RETURN(sort_write_record(sort_info));
} /* sort_key_read */ } /* sort_key_read */
...@@ -2984,7 +3020,14 @@ my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows) ...@@ -2984,7 +3020,14 @@ my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows)
return FALSE; /* Can't use sort */ return FALSE; /* Can't use sort */
for (i=0 ; i < share->base.keys ; i++,key++) for (i=0 ; i < share->base.keys ; i++,key++)
{ {
if (mi_too_big_key_for_sort(key,rows)) /* It's to disable repair_by_sort for ft-keys.
Another solution would be to make ft-keys just too_big_key_for_sort,
but then they won't be disabled by dectivate_non_unique_index
and so they will be created at the first stage. As ft-key creation
is very time-consuming process, it's better to leave it to repair stage
but this repair shouldn't be repair_by_sort (serg)
*/
if (mi_too_big_key_for_sort(key,rows) || (key->flag & HA_FULLTEXT))
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
......
...@@ -372,6 +372,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param) ...@@ -372,6 +372,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param)
param.table_name = table->table_name; param.table_name = table->table_name;
param.tmpfile_createflag = O_RDWR | O_TRUNC; param.tmpfile_createflag = O_RDWR | O_TRUNC;
param.using_global_keycache = 1; param.using_global_keycache = 1;
param.thd=thd;
VOID(fn_format(fixed_name,file->filename,"",MI_NAME_IEXT, VOID(fn_format(fixed_name,file->filename,"",MI_NAME_IEXT,
4+ (param.opt_follow_links ? 16 : 0))); 4+ (param.opt_follow_links ? 16 : 0)));
......
...@@ -1837,26 +1837,8 @@ err: ...@@ -1837,26 +1837,8 @@ err:
double Item_func_match::val() double Item_func_match::val()
{ {
my_off_t docid=table->file->row_position(); // HAVE to do it here...
if (first_call) if (first_call)
{ init_search();
if (join_key=(table->file->get_index() == key &&
(ft_handler=(FT_DOCLIST *)table->file->ft_handler)))
;
else
{
/* join won't use this ft-key, but we must to init it anyway */
String *ft_tmp=0;
char tmp1[FT_QUERY_MAXLEN];
String tmp2(tmp1,sizeof(tmp1));
ft_tmp=key_item()->val_str(&tmp2);
ft_handler=(FT_DOCLIST *)
table->file->ft_init_ext(key, (byte*) ft_tmp->ptr(), ft_tmp->length());
}
first_call=0;
}
// Don't know how to return an error from val(), so NULL will be returned // Don't know how to return an error from val(), so NULL will be returned
if ((null_value=(ft_handler==NULL))) if ((null_value=(ft_handler==NULL)))
...@@ -1873,6 +1855,7 @@ double Item_func_match::val() ...@@ -1873,6 +1855,7 @@ double Item_func_match::val()
int a,b,c; int a,b,c;
FT_DOC *docs=ft_handler->doc; FT_DOC *docs=ft_handler->doc;
my_off_t docid=table->file->row_position();
if ((null_value=(docid==HA_OFFSET_ERROR))) if ((null_value=(docid==HA_OFFSET_ERROR)))
return 0.0; return 0.0;
...@@ -1893,6 +1876,36 @@ double Item_func_match::val() ...@@ -1893,6 +1876,36 @@ double Item_func_match::val()
} }
} }
void Item_func_match::init_search()
{
if (!first_call)
return;
first_call=false;
if (master)
{
master->init_search();
ft_handler=master->ft_handler;
join_key=master->join_key;
return;
}
if (join_key)
{
ft_handler=((FT_DOCLIST *)table->file->ft_handler);
return;
}
/* join won't use this ft-key, but we must to init it anyway */
String *ft_tmp=0;
char tmp1[FT_QUERY_MAXLEN];
String tmp2(tmp1,sizeof(tmp1));
ft_tmp=key_item()->val_str(&tmp2);
ft_handler=(FT_DOCLIST *)
table->file->ft_init_ext(key, (byte*) ft_tmp->ptr(), ft_tmp->length());
}
bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist)
{ {
List_iterator<Item> li(fields); List_iterator<Item> li(fields);
...@@ -1982,6 +1995,24 @@ bool Item_func_match::fix_index() ...@@ -1982,6 +1995,24 @@ bool Item_func_match::fix_index()
this->key=max_key; this->key=max_key;
first_call=1; first_call=1;
maybe_null=1; maybe_null=1;
join_key=0;
return 0;
}
bool Item_func_match::eq(const Item *item) const
{
if (item->type() != FUNC_ITEM)
return 0;
if (func_name() != ((Item_func*)item)->func_name())
return 0;
Item_func_match *ifm=(Item_func_match*) item;
if (key == ifm->key && table == ifm->table &&
key_item()->eq(ifm->key_item()))
return 1;
return 0; return 0;
} }
......
...@@ -839,19 +839,28 @@ public: ...@@ -839,19 +839,28 @@ public:
TABLE *table; TABLE *table;
uint key; uint key;
bool first_call, join_key; bool first_call, join_key;
Item_func_match *master;
FT_DOCLIST *ft_handler; FT_DOCLIST *ft_handler;
Item_func_match(List<Item> &a, Item *b): Item_real_func(b), Item_func_match(List<Item> &a, Item *b): Item_real_func(b),
fields(a), table(0), ft_handler(0) fields(a), table(0), ft_handler(0), master(0) {}
{} ~Item_func_match()
~Item_func_match() { ft_close_search(ft_handler); {
if(join_key) table->file->ft_handler=0; } if (!master)
{
ft_close_search(ft_handler);
if(join_key)
table->file->ft_handler=0;
}
}
const char *func_name() const { return "match"; } const char *func_name() const { return "match"; }
enum Functype functype() const { return FT_FUNC; } enum Functype functype() const { return FT_FUNC; }
void update_used_tables() {} void update_used_tables() {}
bool fix_fields(THD *thd,struct st_table_list *tlist); bool fix_fields(THD *thd,struct st_table_list *tlist);
bool fix_index(); bool eq(const Item *) const;
double val(); double val();
longlong val_int() { return val()!=0.0; } longlong val_int() { return val()!=0.0; }
bool fix_index();
void init_search();
}; };
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...@@ -81,7 +81,6 @@ static SYMBOL symbols[] = { ...@@ -81,7 +81,6 @@ static SYMBOL symbols[] = {
{ "CHANGED", SYM(CHANGED),0,0}, { "CHANGED", SYM(CHANGED),0,0},
{ "CHECK", SYM(CHECK_SYM),0,0}, { "CHECK", SYM(CHECK_SYM),0,0},
{ "CHECKSUM", SYM(CHECKSUM_SYM),0,0}, { "CHECKSUM", SYM(CHECKSUM_SYM),0,0},
{ "COLLECTION", SYM(COLLECTION),0,0},
{ "COLUMN", SYM(COLUMN_SYM),0,0}, { "COLUMN", SYM(COLUMN_SYM),0,0},
{ "COLUMNS", SYM(COLUMNS),0,0}, { "COLUMNS", SYM(COLUMNS),0,0},
{ "COMMENT", SYM(COMMENT_SYM),0,0}, { "COMMENT", SYM(COMMENT_SYM),0,0},
...@@ -142,6 +141,7 @@ static SYMBOL symbols[] = { ...@@ -142,6 +141,7 @@ static SYMBOL symbols[] = {
{ "FROM", SYM(FROM),0,0}, { "FROM", SYM(FROM),0,0},
{ "FOR", SYM(FOR_SYM),0,0}, { "FOR", SYM(FOR_SYM),0,0},
{ "FULL", SYM(FULL),0,0}, { "FULL", SYM(FULL),0,0},
{ "FULLTEXT", SYM(FULLTEXT_SYM),0,0},
{ "FUNCTION", SYM(UDF_SYM),0,0}, { "FUNCTION", SYM(UDF_SYM),0,0},
{ "GRANT", SYM(GRANT),0,0}, { "GRANT", SYM(GRANT),0,0},
{ "GRANTS", SYM(GRANTS),0,0}, { "GRANTS", SYM(GRANTS),0,0},
...@@ -191,14 +191,14 @@ static SYMBOL symbols[] = { ...@@ -191,14 +191,14 @@ static SYMBOL symbols[] = {
{ "LONGBLOB", SYM(LONGBLOB),0,0}, { "LONGBLOB", SYM(LONGBLOB),0,0},
{ "LONGTEXT", SYM(LONGTEXT),0,0}, { "LONGTEXT", SYM(LONGTEXT),0,0},
{ "LOW_PRIORITY", SYM(LOW_PRIORITY),0,0}, { "LOW_PRIORITY", SYM(LOW_PRIORITY),0,0},
{ "MASTER", SYM(MASTER_SYM),0,0}, { "MASTER", SYM(MASTER_SYM),0,0},
{ "MASTER_CONNECT_RETRY", SYM(MASTER_CONNECT_RETRY_SYM),0,0}, { "MASTER_CONNECT_RETRY", SYM(MASTER_CONNECT_RETRY_SYM),0,0},
{ "MASTER_HOST", SYM(MASTER_HOST_SYM),0,0}, { "MASTER_HOST", SYM(MASTER_HOST_SYM),0,0},
{ "MASTER_LOG_FILE", SYM(MASTER_LOG_FILE_SYM),0,0}, { "MASTER_LOG_FILE", SYM(MASTER_LOG_FILE_SYM),0,0},
{ "MASTER_LOG_POS", SYM(MASTER_LOG_POS_SYM),0,0}, { "MASTER_LOG_POS", SYM(MASTER_LOG_POS_SYM),0,0},
{ "MASTER_PASSWORD", SYM(MASTER_PASSWORD_SYM),0,0}, { "MASTER_PASSWORD", SYM(MASTER_PASSWORD_SYM),0,0},
{ "MASTER_PORT", SYM(MASTER_PORT_SYM),0,0}, { "MASTER_PORT", SYM(MASTER_PORT_SYM),0,0},
{ "MASTER_USER", SYM(MASTER_USER_SYM),0,0}, { "MASTER_USER", SYM(MASTER_USER_SYM),0,0},
{ "MAX_ROWS", SYM(MAX_ROWS),0,0}, { "MAX_ROWS", SYM(MAX_ROWS),0,0},
{ "MATCH", SYM(MATCH),0,0}, { "MATCH", SYM(MATCH),0,0},
{ "MEDIUMBLOB", SYM(MEDIUMBLOB),0,0}, { "MEDIUMBLOB", SYM(MEDIUMBLOB),0,0},
......
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...@@ -875,7 +875,7 @@ void end_thread(THD *thd, bool put_in_cache) ...@@ -875,7 +875,7 @@ void end_thread(THD *thd, bool put_in_cache)
(void) pthread_mutex_lock(&LOCK_thread_count); (void) pthread_mutex_lock(&LOCK_thread_count);
thread_count--; thread_count--;
delete thd; delete thd;
if (put_in_cache && cached_thread_count < thread_cache_size && if (put_in_cache && cached_thread_count < thread_cache_size &&
! abort_loop && !kill_cached_threads) ! abort_loop && !kill_cached_threads)
{ {
...@@ -1455,7 +1455,7 @@ int main(int argc, char **argv) ...@@ -1455,7 +1455,7 @@ int main(int argc, char **argv)
sql_print_error("Can't init databases"); sql_print_error("Can't init databases");
exit(1); exit(1);
} }
ft_init_stopwords(NULL); /* SerG */ ft_init_stopwords(ft_precompiled_stopwords); /* SerG */
#ifdef __WIN__ #ifdef __WIN__
#define MYSQL_ERR_FILE "mysql.err" #define MYSQL_ERR_FILE "mysql.err"
...@@ -1531,12 +1531,12 @@ int main(int argc, char **argv) ...@@ -1531,12 +1531,12 @@ int main(int argc, char **argv)
// slave thread // slave thread
if(master_host) if(master_host)
{ {
pthread_t hThread; pthread_t hThread;
if(pthread_create(&hThread, &connection_attrib, handle_slave, 0)) if(pthread_create(&hThread, &connection_attrib, handle_slave, 0))
sql_print_error("Warning: Can't create thread to handle slave"); sql_print_error("Warning: Can't create thread to handle slave");
} }
printf(ER(ER_READY),my_progname,server_version,""); printf(ER(ER_READY),my_progname,server_version,"");
fflush(stdout); fflush(stdout);
...@@ -2179,7 +2179,7 @@ static struct option long_options[] = ...@@ -2179,7 +2179,7 @@ static struct option long_options[] =
{"log-update", optional_argument, 0, (int) OPT_UPDATE_LOG}, {"log-update", optional_argument, 0, (int) OPT_UPDATE_LOG},
{"log-slow-queries", optional_argument, 0, (int) OPT_SLOW_QUERY_LOG}, {"log-slow-queries", optional_argument, 0, (int) OPT_SLOW_QUERY_LOG},
{"log-long-format", no_argument, 0, (int) OPT_LONG_FORMAT}, {"log-long-format", no_argument, 0, (int) OPT_LONG_FORMAT},
{"log-slave-updates", no_argument,0, (int) OPT_LOG_SLAVE_UPDATES}, {"log-slave-updates", no_argument,0, (int) OPT_LOG_SLAVE_UPDATES},
{"low-priority-updates", no_argument, 0, (int) OPT_LOW_PRIORITY_UPDATES}, {"low-priority-updates", no_argument, 0, (int) OPT_LOW_PRIORITY_UPDATES},
{"master-host", required_argument, 0, (int) OPT_MASTER_HOST}, {"master-host", required_argument, 0, (int) OPT_MASTER_HOST},
{"master-user", required_argument, 0, (int) OPT_MASTER_USER}, {"master-user", required_argument, 0, (int) OPT_MASTER_USER},
...@@ -2209,7 +2209,7 @@ static struct option long_options[] = ...@@ -2209,7 +2209,7 @@ static struct option long_options[] =
{"skip-show-database",no_argument,0, (int) OPT_SKIP_SHOW_DB}, {"skip-show-database",no_argument,0, (int) OPT_SKIP_SHOW_DB},
{"skip-networking", no_argument,0, (int) OPT_SKIP_NETWORKING}, {"skip-networking", no_argument,0, (int) OPT_SKIP_NETWORKING},
{"skip-thread-priority", no_argument,0,(int) OPT_SKIP_PRIOR}, {"skip-thread-priority", no_argument,0,(int) OPT_SKIP_PRIOR},
{"sql-bin-update-same", no_argument, 0, (int)OPT_SQL_BIN_UPDATE_SAME}, {"sql-bin-update-same", no_argument, 0, (int)OPT_SQL_BIN_UPDATE_SAME},
#include "sslopt-longopts.h" #include "sslopt-longopts.h"
#ifdef __WIN__ #ifdef __WIN__
{"standalone", no_argument,0, (int) OPT_STANDALONE}, {"standalone", no_argument,0, (int) OPT_STANDALONE},
...@@ -2393,7 +2393,7 @@ struct show_var_st status_vars[]= { ...@@ -2393,7 +2393,7 @@ struct show_var_st status_vars[]= {
{"Questions", (char*) 0, SHOW_QUESTION}, {"Questions", (char*) 0, SHOW_QUESTION},
{"Slow_launch_threads", (char*) &slow_launch_threads, SHOW_LONG}, {"Slow_launch_threads", (char*) &slow_launch_threads, SHOW_LONG},
{"Slow_queries", (char*) &long_query_count, SHOW_LONG}, {"Slow_queries", (char*) &long_query_count, SHOW_LONG},
{"Slave_running", (char*) &slave_running, SHOW_BOOL}, {"Slave_running", (char*) &slave_running, SHOW_BOOL},
{"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_CONST}, {"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_CONST},
{"Threads_connected", (char*) &thread_count, SHOW_INT_CONST}, {"Threads_connected", (char*) &thread_count, SHOW_INT_CONST},
{"Threads_running", (char*) &thread_running, SHOW_INT_CONST}, {"Threads_running", (char*) &thread_running, SHOW_INT_CONST},
...@@ -2502,7 +2502,7 @@ static void usage(void) ...@@ -2502,7 +2502,7 @@ static void usage(void)
--bdb-tmpdir=directory Berkeley DB tempfile name\n\ --bdb-tmpdir=directory Berkeley DB tempfile name\n\
--skip-bdb Don't use berkeley db (will save memory)\n\ --skip-bdb Don't use berkeley db (will save memory)\n\
"); ");
#endif #endif
print_defaults("my",load_default_groups); print_defaults("my",load_default_groups);
puts(""); puts("");
...@@ -2687,39 +2687,39 @@ static void get_options(int argc,char **argv) ...@@ -2687,39 +2687,39 @@ static void get_options(int argc,char **argv)
break; break;
case (int) OPT_BIN_LOG: case (int) OPT_BIN_LOG:
opt_bin_log=1; opt_bin_log=1;
opt_bin_logname=optarg; opt_bin_logname=optarg;
break; break;
case (int) OPT_LOG_SLAVE_UPDATES: case (int) OPT_LOG_SLAVE_UPDATES:
opt_log_slave_updates = 1; opt_log_slave_updates = 1;
break; break;
case (int)OPT_REPLICATE_IGNORE_DB: case (int)OPT_REPLICATE_IGNORE_DB:
{ {
i_string *db = new i_string(optarg); i_string *db = new i_string(optarg);
replicate_ignore_db.push_back(db); replicate_ignore_db.push_back(db);
break; break;
} }
case (int)OPT_REPLICATE_DO_DB: case (int)OPT_REPLICATE_DO_DB:
{ {
i_string *db = new i_string(optarg); i_string *db = new i_string(optarg);
replicate_do_db.push_back(db); replicate_do_db.push_back(db);
break; break;
} }
case (int)OPT_BINLOG_IGNORE_DB: case (int)OPT_BINLOG_IGNORE_DB:
{ {
i_string *db = new i_string(optarg); i_string *db = new i_string(optarg);
binlog_ignore_db.push_back(db); binlog_ignore_db.push_back(db);
break; break;
} }
case (int)OPT_BINLOG_DO_DB: case (int)OPT_BINLOG_DO_DB:
{ {
i_string *db = new i_string(optarg); i_string *db = new i_string(optarg);
binlog_do_db.push_back(db); binlog_do_db.push_back(db);
break; break;
} }
case (int) OPT_SQL_BIN_UPDATE_SAME: case (int) OPT_SQL_BIN_UPDATE_SAME:
opt_sql_bin_update = 1; opt_sql_bin_update = 1;
break; break;
...@@ -2878,7 +2878,7 @@ static void get_options(int argc,char **argv) ...@@ -2878,7 +2878,7 @@ static void get_options(int argc,char **argv)
if (test_if_int(optarg,(uint) strlen(optarg))) if (test_if_int(optarg,(uint) strlen(optarg)))
berkeley_lock_scan_time=atoi(optarg); berkeley_lock_scan_time=atoi(optarg);
else else
{ {
fprintf(stderr,"Unknown lock type: %s\n",optarg); fprintf(stderr,"Unknown lock type: %s\n",optarg);
exit(1); exit(1);
} }
...@@ -3314,7 +3314,7 @@ static int get_service_parameters() ...@@ -3314,7 +3314,7 @@ static int get_service_parameters()
0 ) 0 )
{ {
SET_CHANGEABLE_VARVAL( "thread_concurrency" ); SET_CHANGEABLE_VARVAL( "thread_concurrency" );
} }
else else
{ {
TCHAR szErrorMsg [ 512 ]; TCHAR szErrorMsg [ 512 ];
...@@ -3341,7 +3341,7 @@ static int get_service_parameters() ...@@ -3341,7 +3341,7 @@ static int get_service_parameters()
static char *get_relative_path(const char *path) static char *get_relative_path(const char *path)
{ {
if (test_if_hard_path(path) && if (test_if_hard_path(path) &&
is_prefix(path,DEFAULT_MYSQL_HOME) && is_prefix(path,DEFAULT_MYSQL_HOME) &&
strcmp(DEFAULT_MYSQL_HOME,FN_ROOTDIR)) strcmp(DEFAULT_MYSQL_HOME,FN_ROOTDIR))
{ {
path+=(uint) strlen(DEFAULT_MYSQL_HOME); path+=(uint) strlen(DEFAULT_MYSQL_HOME);
......
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...@@ -58,7 +58,7 @@ static int send_file(THD *thd) ...@@ -58,7 +58,7 @@ static int send_file(THD *thd)
// the job // the job
old_timeout = thd->net.timeout; old_timeout = thd->net.timeout;
thd->net.timeout = thd->inactive_timeout; thd->net.timeout = thd->inactive_timeout;
// we need net_flush here because the client will not know it needs to send // we need net_flush here because the client will not know it needs to send
// us the file name until it has processed the load event entry // us the file name until it has processed the load event entry
if (net_flush(net) || (packet_len = my_net_read(net)) == packet_error) if (net_flush(net) || (packet_len = my_net_read(net)) == packet_error)
...@@ -67,16 +67,16 @@ static int send_file(THD *thd) ...@@ -67,16 +67,16 @@ static int send_file(THD *thd)
goto err; goto err;
} }
fn_format(fname, (char*)net->read_pos + 1, "", "", 4); fn_format(fname, (char*)net->read_pos + 1, "", "", 4);
if(!strcmp(fname,"/dev/null")) goto end; // this is needed to make replicate-ignore-db if(!strcmp(fname,"/dev/null")) goto end; // this is needed to make replicate-ignore-db
// work on the well-known system that does not have a /dev/null :-) // work on the well-known system that does not have a /dev/null :-)
if ((fd = my_open(fname, O_RDONLY, MYF(MY_WME))) < 0) if ((fd = my_open(fname, O_RDONLY, MYF(MY_WME))) < 0)
{ {
errmsg = "Failed on my_open()"; errmsg = "Failed on my_open()";
goto err; goto err;
} }
while ((bytes = (int) my_read(fd, (byte*) buf, sizeof(buf), while ((bytes = (int) my_read(fd, (byte*) buf, sizeof(buf),
MYF(MY_WME))) > 0) MYF(MY_WME))) > 0)
{ {
...@@ -87,7 +87,7 @@ static int send_file(THD *thd) ...@@ -87,7 +87,7 @@ static int send_file(THD *thd)
} }
} }
end: end:
if (my_net_write(net, "", 0) || net_flush(net) || if (my_net_write(net, "", 0) || net_flush(net) ||
(my_net_read(net) == packet_error)) (my_net_read(net) == packet_error))
{ {
...@@ -95,7 +95,7 @@ static int send_file(THD *thd) ...@@ -95,7 +95,7 @@ static int send_file(THD *thd)
goto err; goto err;
} }
error = 0; error = 0;
err: err:
thd->net.timeout = old_timeout; thd->net.timeout = old_timeout;
if(fd >= 0) if(fd >= 0)
...@@ -104,7 +104,7 @@ static int send_file(THD *thd) ...@@ -104,7 +104,7 @@ static int send_file(THD *thd)
{ {
sql_print_error("failed in send_file() : %s", errmsg); sql_print_error("failed in send_file() : %s", errmsg);
DBUG_PRINT("error", (errmsg)); DBUG_PRINT("error", (errmsg));
} }
DBUG_RETURN(error); DBUG_RETURN(error);
} }
...@@ -195,12 +195,12 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -195,12 +195,12 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
errmsg = "Binary log is not open"; errmsg = "Binary log is not open";
goto err; goto err;
} }
if(log_ident[0]) if(log_ident[0])
mysql_bin_log.make_log_name(search_file_name, log_ident); mysql_bin_log.make_log_name(search_file_name, log_ident);
else else
search_file_name[0] = 0; search_file_name[0] = 0;
if(mysql_bin_log.find_first_log(&linfo, search_file_name)) if(mysql_bin_log.find_first_log(&linfo, search_file_name))
{ {
errmsg = "Could not find first log"; errmsg = "Could not find first log";
...@@ -219,8 +219,8 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -219,8 +219,8 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
errmsg = "Error on fseek()"; errmsg = "Error on fseek()";
goto err; goto err;
} }
packet->length(0); packet->length(0);
packet->append("\0", 1); // we need to start a packet with something other than 255 packet->append("\0", 1); // we need to start a packet with something other than 255
// to distiquish it from error // to distiquish it from error
...@@ -251,7 +251,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -251,7 +251,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
errmsg = "error reading log event"; errmsg = "error reading log event";
goto err; goto err;
} }
if(!(flags & BINLOG_DUMP_NON_BLOCK) && mysql_bin_log.is_active(log_file_name)) if(!(flags & BINLOG_DUMP_NON_BLOCK) && mysql_bin_log.is_active(log_file_name))
// block until there is more data in the log // block until there is more data in the log
// unless non-blocking mode requested // unless non-blocking mode requested
...@@ -267,10 +267,10 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -267,10 +267,10 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
// if we did not miss anything, we just wait for other threads // if we did not miss anything, we just wait for other threads
// to signal us // to signal us
{ {
pthread_mutex_t *log_lock = mysql_bin_log.get_log_lock(); pthread_mutex_t *log_lock = mysql_bin_log.get_log_lock();
clearerr(log); clearerr(log);
// tell the kill thread how to wake us up // tell the kill thread how to wake us up
pthread_mutex_lock(&thd->mysys_var->mutex); pthread_mutex_lock(&thd->mysys_var->mutex);
thd->mysys_var->current_mutex = log_lock; thd->mysys_var->current_mutex = log_lock;
thd->mysys_var->current_cond = &COND_binlog_update; thd->mysys_var->current_cond = &COND_binlog_update;
...@@ -283,7 +283,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -283,7 +283,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
pthread_mutex_lock(log_lock); // no one will update the log while we are reading pthread_mutex_lock(log_lock); // no one will update the log while we are reading
// now, but we'll be quick and just read one record // now, but we'll be quick and just read one record
switch(Log_event::read_log_event(log, packet)) switch(Log_event::read_log_event(log, packet))
{ {
case 0: case 0:
...@@ -300,7 +300,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -300,7 +300,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
} }
pthread_mutex_unlock(log_lock); pthread_mutex_unlock(log_lock);
pthread_mutex_lock(&thd->mysys_var->mutex); pthread_mutex_lock(&thd->mysys_var->mutex);
thd->mysys_var->current_mutex= 0; thd->mysys_var->current_mutex= 0;
thd->mysys_var->current_cond= 0; thd->mysys_var->current_cond= 0;
...@@ -314,7 +314,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -314,7 +314,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
errmsg = "Failed on my_net_write()"; errmsg = "Failed on my_net_write()";
goto err; goto err;
} }
if((*packet)[LOG_EVENT_OFFSET+1] == LOAD_EVENT) if((*packet)[LOG_EVENT_OFFSET+1] == LOAD_EVENT)
{ {
if(send_file(thd)) if(send_file(thd))
...@@ -334,14 +334,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -334,14 +334,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
errmsg = "error reading log entry"; errmsg = "error reading log entry";
goto err; goto err;
} }
clearerr(log); clearerr(log);
} }
} }
else else
{ {
bool loop_breaker = 0; // need this to break out of the for loop from switch bool loop_breaker = 0; // need this to break out of the for loop from switch
switch(mysql_bin_log.find_next_log(&linfo)) switch(mysql_bin_log.find_next_log(&linfo))
{ {
case LOG_INFO_EOF: case LOG_INFO_EOF:
...@@ -367,12 +367,12 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -367,12 +367,12 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
char header[9]; char header[9];
memset(header, 0, 4); // when does not matter memset(header, 0, 4); // when does not matter
header[4] = ROTATE_EVENT; header[4] = ROTATE_EVENT;
char* p = strrchr(log_file_name, FN_LIBCHAR); // find the last slash char* p = strrchr(log_file_name, FN_LIBCHAR); // find the last slash
if(p) if(p)
p++; p++;
else else
p = log_file_name; p = log_file_name;
uint ident_len = (uint) strlen(p); uint ident_len = (uint) strlen(p);
ulong event_len = ident_len + sizeof(header); ulong event_len = ident_len + sizeof(header);
int4store(header + 5, event_len); int4store(header + 5, event_len);
...@@ -388,9 +388,9 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags) ...@@ -388,9 +388,9 @@ void mysql_binlog_send(THD* thd, char* log_ident, ulong pos, ushort flags)
} }
} }
} }
(void)my_fclose(log, MYF(MY_WME)); (void)my_fclose(log, MYF(MY_WME));
send_eof(&thd->net); send_eof(&thd->net);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
err: err:
...@@ -646,7 +646,7 @@ void close_thread_tables(THD *thd, bool locked) ...@@ -646,7 +646,7 @@ void close_thread_tables(THD *thd, bool locked)
VOID(pthread_mutex_lock(&LOCK_open)); VOID(pthread_mutex_lock(&LOCK_open));
DBUG_PRINT("info", ("thd->open_tables=%p", thd->open_tables)); DBUG_PRINT("info", ("thd->open_tables=%p", thd->open_tables));
for (table=thd->open_tables ; table ; table=next) for (table=thd->open_tables ; table ; table=next)
{ {
next=table->next; next=table->next;
...@@ -820,7 +820,7 @@ TABLE *unlink_open_table(THD *thd, TABLE *list, TABLE *find) ...@@ -820,7 +820,7 @@ TABLE *unlink_open_table(THD *thd, TABLE *list, TABLE *find)
} }
/* /*
When we call the following function we must have a lock on When we call the following function we must have a lock on
LOCK_OPEN ; This lock will be unlocked on return. LOCK_OPEN ; This lock will be unlocked on return.
*/ */
...@@ -957,7 +957,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, ...@@ -957,7 +957,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
{ {
MEM_ROOT* glob_alloc; MEM_ROOT* glob_alloc;
LINT_INIT(glob_alloc); LINT_INIT(glob_alloc);
if(errno == ENOENT && if(errno == ENOENT &&
(glob_alloc = my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC))) (glob_alloc = my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC)))
// Sasha: needed for replication // Sasha: needed for replication
...@@ -1288,7 +1288,7 @@ bool wait_for_tables(THD *thd) ...@@ -1288,7 +1288,7 @@ bool wait_for_tables(THD *thd)
while (table_is_used(thd->open_tables) && ! thd->killed) while (table_is_used(thd->open_tables) && ! thd->killed)
{ {
(void) pthread_cond_wait(&COND_refresh,&LOCK_open); (void) pthread_cond_wait(&COND_refresh,&LOCK_open);
} }
if (thd->killed) if (thd->killed)
...@@ -1298,7 +1298,7 @@ bool wait_for_tables(THD *thd) ...@@ -1298,7 +1298,7 @@ bool wait_for_tables(THD *thd)
/* Now we can open all tables without any interference */ /* Now we can open all tables without any interference */
thd->proc_info="Reopen tables"; thd->proc_info="Reopen tables";
result=reopen_tables(thd,0,0); result=reopen_tables(thd,0,0);
} }
pthread_mutex_unlock(&LOCK_open); pthread_mutex_unlock(&LOCK_open);
thd->proc_info=0; thd->proc_info=0;
DBUG_RETURN(result); DBUG_RETURN(result);
...@@ -1744,7 +1744,7 @@ find_item_in_list(Item *find,List<Item> &items) ...@@ -1744,7 +1744,7 @@ find_item_in_list(Item *find,List<Item> &items)
} }
} }
} }
else if (!table_name && (item->eq(find) || else if (!table_name && (item->eq(find) ||
find->name && find->name &&
!my_strcasecmp(item->name,find->name))) !my_strcasecmp(item->name,find->name)))
{ {
...@@ -1824,7 +1824,7 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List<Item> &fields, ...@@ -1824,7 +1824,7 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List<Item> &fields,
} }
DBUG_RETURN(test(thd->fatal_error)); DBUG_RETURN(test(thd->fatal_error));
} }
static key_map get_key_map_from_key_list(THD *thd, TABLE *table, static key_map get_key_map_from_key_list(THD *thd, TABLE *table,
List<String> *index_list) List<String> *index_list)
...@@ -2172,18 +2172,22 @@ bool remove_table_from_cache(THD *thd, const char *db,const char *table_name) ...@@ -2172,18 +2172,22 @@ bool remove_table_from_cache(THD *thd, const char *db,const char *table_name)
DBUG_RETURN(result); DBUG_RETURN(result);
} }
/*
Will be used for ft-query optimization someday.
SerG.
*/
int setup_ftfuncs(THD *thd,TABLE_LIST *tables, List<Item_func_match> &ftfuncs) int setup_ftfuncs(THD *thd,TABLE_LIST *tables, List<Item_func_match> &ftfuncs)
{ {
List_iterator<Item_func_match> li(ftfuncs); List_iterator<Item_func_match> li(ftfuncs), li2(ftfuncs);
Item_func_match *ftf; Item_func_match *ftf, *ftf2;
while ((ftf=li++)) while ((ftf=li++))
{
if (ftf->fix_index()) if (ftf->fix_index())
return 1; return 1;
li2.rewind();
while ((ftf2=li2++) != ftf)
{
if (ftf->eq(ftf2) && !ftf2->master)
ftf2->master=ftf;
}
}
return 0; return 0;
} }
...@@ -1284,11 +1284,11 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, ...@@ -1284,11 +1284,11 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
KEYUSE keyuse; KEYUSE keyuse;
keyuse.table= cond_func->table; keyuse.table= cond_func->table;
keyuse.val = cond_func->key_item(); keyuse.val = cond_func;
keyuse.key = cond_func->key; keyuse.key = cond_func->key;
#define FT_KEYPART (MAX_REF_PARTS+10) #define FT_KEYPART (MAX_REF_PARTS+10)
keyuse.keypart=FT_KEYPART; keyuse.keypart=FT_KEYPART;
keyuse.used_tables=keyuse.val->used_tables(); keyuse.used_tables=cond_func->key_item()->used_tables();
VOID(insert_dynamic(keyuse_array,(gptr) &keyuse)); VOID(insert_dynamic(keyuse_array,(gptr) &keyuse));
} }
...@@ -1670,7 +1670,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, ...@@ -1670,7 +1670,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
else else
tmp=best_time; // Do nothing tmp=best_time; // Do nothing
} }
} /* not ftkey */ } /* not ft_key */
if (tmp < best_time - records/(double) TIME_FOR_COMPARE) if (tmp < best_time - records/(double) TIME_FOR_COMPARE)
{ {
best_time=tmp + records/(double) TIME_FOR_COMPARE; best_time=tmp + records/(double) TIME_FOR_COMPARE;
...@@ -1882,26 +1882,29 @@ get_best_combination(JOIN *join) ...@@ -1882,26 +1882,29 @@ get_best_combination(JOIN *join)
keyinfo=table->key_info+key; keyinfo=table->key_info+key;
if (ftkey) if (ftkey)
{ {
ft_tmp=keyuse->val->val_str(&tmp2); Item_func_match *ifm=(Item_func_match *)keyuse->val;
ft_tmp=ifm->key_item()->val_str(&tmp2);
length=ft_tmp->length(); length=ft_tmp->length();
keyparts=1; keyparts=1;
ifm->join_key=1;
} }
else else
{ {
keyparts=length=0; keyparts=length=0;
do do
{ {
if (!((~used_tables) & keyuse->used_tables)) if (!((~used_tables) & keyuse->used_tables))
{ {
if (keyparts == keyuse->keypart) if (keyparts == keyuse->keypart)
{ {
keyparts++; keyparts++;
length+=keyinfo->key_part[keyuse->keypart].length + length+=keyinfo->key_part[keyuse->keypart].length +
test(keyinfo->key_part[keyuse->keypart].null_bit); test(keyinfo->key_part[keyuse->keypart].null_bit);
} }
} }
keyuse++; keyuse++;
} while (keyuse->table == table && keyuse->key == key); } while (keyuse->table == table && keyuse->key == key);
} /* not ftkey */ } /* not ftkey */
/* set up fieldref */ /* set up fieldref */
...@@ -1924,7 +1927,7 @@ get_best_combination(JOIN *join) ...@@ -1924,7 +1927,7 @@ get_best_combination(JOIN *join)
byte *key_buff=j->ref.key_buff; byte *key_buff=j->ref.key_buff;
if (ftkey) if (ftkey)
{ {
j->ref.items[0]=keyuse->val; j->ref.items[0]=((Item_func*)(keyuse->val))->key_item();
if (!keyuse->used_tables && if (!keyuse->used_tables &&
!(join->select_options & SELECT_DESCRIBE)) !(join->select_options & SELECT_DESCRIBE))
{ {
......
...@@ -137,7 +137,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); ...@@ -137,7 +137,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token CHANGED_FILES %token CHANGED_FILES
%token CHECKSUM_SYM %token CHECKSUM_SYM
%token CHECK_SYM %token CHECK_SYM
%token COLLECTION
%token COLUMNS %token COLUMNS
%token COLUMN_SYM %token COLUMN_SYM
%token CONSTRAINT %token CONSTRAINT
...@@ -162,6 +161,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); ...@@ -162,6 +161,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token FOREIGN %token FOREIGN
%token FROM %token FROM
%token FULL %token FULL
%token FULLTEXT_SYM
%token GRANT %token GRANT
%token GRANTS %token GRANTS
%token GREATEST_SYM %token GREATEST_SYM
...@@ -457,7 +457,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); ...@@ -457,7 +457,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
expr_list udf_expr_list when_list ident_list expr_list udf_expr_list when_list ident_list
%type <key_type> %type <key_type>
key_type opt_unique key_type opt_unique_or_fulltext
%type <string_list> %type <string_list>
key_usage_list key_usage_list
...@@ -628,7 +628,7 @@ create: ...@@ -628,7 +628,7 @@ create:
} }
create2 create2
| CREATE opt_unique INDEX ident ON table_ident | CREATE opt_unique_or_fulltext INDEX ident ON table_ident
{ {
Lex->sql_command= SQLCOM_CREATE_INDEX; Lex->sql_command= SQLCOM_CREATE_INDEX;
if (!add_table_to_list($6,NULL)) if (!add_table_to_list($6,NULL))
...@@ -643,21 +643,6 @@ create: ...@@ -643,21 +643,6 @@ create:
Lex->key_list.push_back(new Key($2,$4.str,Lex->col_list)); Lex->key_list.push_back(new Key($2,$4.str,Lex->col_list));
Lex->col_list.empty(); Lex->col_list.empty();
} }
| CREATE COLLECTION ident ON table_ident
{
Lex->sql_command= SQLCOM_CREATE_INDEX;
if (!add_table_to_list($5,NULL))
YYABORT;
Lex->create_list.empty();
Lex->key_list.empty();
Lex->col_list.empty();
Lex->change=NullS;
}
'(' key_list ')'
{
Lex->key_list.push_back(new Key(Key::FULLTEXT,$3.str,Lex->col_list));
Lex->col_list.empty();
}
| CREATE DATABASE opt_if_not_exists ident | CREATE DATABASE opt_if_not_exists ident
{ {
Lex->sql_command=SQLCOM_CREATE_DB; Lex->sql_command=SQLCOM_CREATE_DB;
...@@ -964,7 +949,8 @@ delete_option: ...@@ -964,7 +949,8 @@ delete_option:
key_type: key_type:
opt_constraint PRIMARY_SYM KEY_SYM { $$= Key::PRIMARY; } opt_constraint PRIMARY_SYM KEY_SYM { $$= Key::PRIMARY; }
| key_or_index { $$= Key::MULTIPLE; } | key_or_index { $$= Key::MULTIPLE; }
| COLLECTION { $$= Key::FULLTEXT; } | FULLTEXT_SYM { $$= Key::FULLTEXT; }
| FULLTEXT_SYM key_or_index { $$= Key::FULLTEXT; }
| opt_constraint UNIQUE_SYM { $$= Key::UNIQUE; } | opt_constraint UNIQUE_SYM { $$= Key::UNIQUE; }
| opt_constraint UNIQUE_SYM key_or_index { $$= Key::UNIQUE; } | opt_constraint UNIQUE_SYM key_or_index { $$= Key::UNIQUE; }
...@@ -976,9 +962,10 @@ keys_or_index: ...@@ -976,9 +962,10 @@ keys_or_index:
KEYS {} KEYS {}
| INDEX {} | INDEX {}
opt_unique: opt_unique_or_fulltext:
/* empty */ { $$= Key::MULTIPLE; } /* empty */ { $$= Key::MULTIPLE; }
| UNIQUE_SYM { $$= Key::UNIQUE; } | UNIQUE_SYM { $$= Key::UNIQUE; }
| FULLTEXT_SYM { $$= Key::FULLTEXT; }
key_list: key_list:
key_list ',' key_part order_dir { Lex->col_list.push_back($3); } key_list ',' key_part order_dir { Lex->col_list.push_back($3); }
...@@ -2443,7 +2430,6 @@ keyword: ...@@ -2443,7 +2430,6 @@ keyword:
| WORK_SYM {} | WORK_SYM {}
| YEAR_SYM {} | YEAR_SYM {}
| SLAVE {} | SLAVE {}
| COLLECTION {}
/* Option functions */ /* Option functions */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment