Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
012e8ff6
Commit
012e8ff6
authored
Sep 28, 2000
by
nusphere@main.burghcom.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
95606fa3
0cbb67bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
428 additions
and
64 deletions
+428
-64
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
Docs/manual.texi
Docs/manual.texi
+427
-64
No files found.
BitKeeper/etc/logging_ok
View file @
012e8ff6
...
@@ -21,3 +21,4 @@ sinisa@work.mysql.com
...
@@ -21,3 +21,4 @@ sinisa@work.mysql.com
tim@localhost.polyesthetic.msg
tim@localhost.polyesthetic.msg
tim@work.mysql.com
tim@work.mysql.com
tonu@work.mysql.com
tonu@work.mysql.com
spurr@nslinux.bedford.progress.com
Docs/manual.texi
View file @
012e8ff6
...
@@ -959,6 +959,9 @@ Comments on porting to other systems
...
@@ -959,6 +959,9 @@ Comments on porting to other systems
@cindex overview
@cindex overview
@cindex general information
@cindex general information
@cindex online location of manual
@cindex manual, online location
@node Introduction, Questions, Top, Top
@node Introduction, Questions, Top, Top
@chapter General Information About MySQL
@chapter General Information About MySQL
...
@@ -1057,7 +1060,8 @@ or relational database concepts. If you want general information about SQL,
...
@@ -1057,7 +1060,8 @@ or relational database concepts. If you want general information about SQL,
see @ref{General-SQL}. For books that focus more specifically on
see @ref{General-SQL}. For books that focus more specifically on
@strong{MySQL}, see @ref{MySQL-Books}.
@strong{MySQL}, see @ref{MySQL-Books}.
@cindex @strong{MySQL}, what it is
@cindex @strong{MySQL}, defined
@cindex @strong{MySQL}, introduction
@node What-is, Manual-info, Introduction, Introduction
@node What-is, Manual-info, Introduction, Introduction
@section What Is MySQL
@section What Is MySQL
...
@@ -1084,6 +1088,8 @@ data from several tables on request. The SQL part of @strong{MySQL}
...
@@ -1084,6 +1088,8 @@ data from several tables on request. The SQL part of @strong{MySQL}
stands for "Structured Query Language" - the most common standardized
stands for "Structured Query Language" - the most common standardized
language used to access databases.
language used to access databases.
@cindex relational databases, defined
@cindex SQL, defined
@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.
...
@@ -1654,7 +1660,7 @@ information about databases, tables, and indexes. The @code{EXPLAIN} command
...
@@ -1654,7 +1660,7 @@ information about databases, tables, and indexes. The @code{EXPLAIN} command
can be used to determine how the optimizer resolves a query.
can be used to determine how the optimizer resolves a query.
@end itemize
@end itemize
@cindex
S
tability
@cindex
s
tability
@node Stability, Year 2000 compliance, Features, Introduction
@node Stability, Year 2000 compliance, Features, Introduction
@section How Stable Is MySQL?
@section How Stable Is MySQL?
...
@@ -1804,6 +1810,8 @@ usually fixed right away with a patch; for serious bugs, there is almost
...
@@ -1804,6 +1810,8 @@ usually fixed right away with a patch; for serious bugs, there is almost
always a new release.
always a new release.
@cindex Year 2000 compliance
@cindex Year 2000 compliance
@cindex compliance, Y2K
@cindex date functions, Y2K compliance
@node Year 2000 compliance, General-SQL, Stability, Introduction
@node Year 2000 compliance, General-SQL, Stability, Introduction
@section Year 2000 Compliance
@section Year 2000 Compliance
...
@@ -1892,6 +1900,8 @@ provide unambiguous input. See @ref{Y2K issues} for @strong{MySQL}'s rules
...
@@ -1892,6 +1900,8 @@ provide unambiguous input. See @ref{Y2K issues} for @strong{MySQL}'s rules
for dealing with ambiguous date input data (data containing 2-digit year
for dealing with ambiguous date input data (data containing 2-digit year
values).
values).
@cindex manuals, about @strong{MySQL}
@cindex books, about @strong{MySQL}
@node General-SQL, Useful Links, Year 2000 compliance, Introduction
@node General-SQL, Useful Links, Year 2000 compliance, Introduction
@section General SQL Information and Tutorials
@section General SQL Information and Tutorials
...
@@ -2015,6 +2025,7 @@ Right Now Web; Web automation for customer service.
...
@@ -2015,6 +2025,7 @@ Right Now Web; Web automation for customer service.
@item @uref{http://www.icaap.org/Bazaar/}@*
@item @uref{http://www.icaap.org/Bazaar/}@*
Bazaar; Interactive Discussion Forums with Web interface.
Bazaar; Interactive Discussion Forums with Web interface.
@cindex PhoneSweep
@item @uref{http://www.phonesweep.com/}@*
@item @uref{http://www.phonesweep.com/}@*
PhoneSweepT is the world's first commercial Telephone Scanner. Many break-ins
PhoneSweepT is the world's first commercial Telephone Scanner. Many break-ins
in recent years have come not through the Internet, but through unauthorized
in recent years have come not through the Internet, but through unauthorized
...
@@ -2087,6 +2098,7 @@ SmartWorker is a platform for Web application development.
...
@@ -2087,6 +2098,7 @@ SmartWorker is a platform for Web application development.
XSP: e(X)tendible (S)erver (P)ages and is a HTML embedded tag language
XSP: e(X)tendible (S)erver (P)ages and is a HTML embedded tag language
written in Java (previously known as XTAGS.)
written in Java (previously known as XTAGS.)
@cindex dbServ
@item @uref{http://www.dbServ.de/}@*
@item @uref{http://www.dbServ.de/}@*
dbServ is an extension to a web server to integrate database output into
dbServ is an extension to a web server to integrate database output into
your HTML code. You may use any HTML function in your output. Only the
your HTML code. You may use any HTML function in your output. Only the
...
@@ -2143,6 +2155,7 @@ How to use @strong{MySQL} with ColdFusion on Solaris.
...
@@ -2143,6 +2155,7 @@ How to use @strong{MySQL} with ColdFusion on Solaris.
@item @uref{http://calistra.com/MySQL/}@*
@item @uref{http://calistra.com/MySQL/}@*
Calistra's ODBC @strong{MySQL} Administrator.
Calistra's ODBC @strong{MySQL} Administrator.
@cindex Webmerger
@item @uref{http://www.webmerger.com}@*
@item @uref{http://www.webmerger.com}@*
Webmerger - This CGI tool interprets files and generates dynamic output
Webmerger - This CGI tool interprets files and generates dynamic output
based on a set of simple tags. Ready-to-run drivers for @strong{MySQL} and
based on a set of simple tags. Ready-to-run drivers for @strong{MySQL} and
...
@@ -2160,6 +2173,7 @@ The Widgetchuck; Web Site Tools and Gadgets
...
@@ -2160,6 +2173,7 @@ The Widgetchuck; Web Site Tools and Gadgets
@item @uref{http://www.adcycle.com/}@*
@item @uref{http://www.adcycle.com/}@*
AdCycle - advertising management software.
AdCycle - advertising management software.
@cindex pwPage
@item @uref{http://www.bidsystems.com/pwPage}@*
@item @uref{http://www.bidsystems.com/pwPage}@*
pwPage - provides an extremely
pwPage - provides an extremely
fast and simple approach to the creation of database forms. That is,
fast and simple approach to the creation of database forms. That is,
...
@@ -2171,6 +2185,7 @@ reviewing.
...
@@ -2171,6 +2185,7 @@ reviewing.
@item @uref{http://www.omnis-software.com/products/studio/studio.html}@*
@item @uref{http://www.omnis-software.com/products/studio/studio.html}@*
OMNIS Studio is a rapid application development (RAD) tool.
OMNIS Studio is a rapid application development (RAD) tool.
@cindex Web+
@item @uref{http://www.webplus.com}@*
@item @uref{http://www.webplus.com}@*
talentsoft Web+ 4.6 - a powerful and comprehensive development language for
talentsoft Web+ 4.6 - a powerful and comprehensive development language for
use in creating web-based client/server applications without writing
use in creating web-based client/server applications without writing
...
@@ -2382,6 +2397,7 @@ Object Oriented Concepts Inc; CORBA applications with examples in source.
...
@@ -2382,6 +2397,7 @@ Object Oriented Concepts Inc; CORBA applications with examples in source.
@item @uref{http://www.pbc.ottawa.on.ca/}@*
@item @uref{http://www.pbc.ottawa.on.ca/}@*
DBWiz; Includes an example of how to manage cursors in VB.
DBWiz; Includes an example of how to manage cursors in VB.
@cindex Pluribus
@item @uref{http://keilor.cs.umass.edu/pluribus/}@*
@item @uref{http://keilor.cs.umass.edu/pluribus/}@*
Pluribus is a free search engine that learns to improve
Pluribus is a free search engine that learns to improve
the quality of its results over time. Pluribus works by recording
the quality of its results over time. Pluribus works by recording
...
@@ -2409,7 +2425,9 @@ Example of storing/retrieving images with @strong{MySQL} and CGI.
...
@@ -2409,7 +2425,9 @@ Example of storing/retrieving images with @strong{MySQL} and CGI.
@item @uref{http://www.penguinservices.com/scripts}@*
@item @uref{http://www.penguinservices.com/scripts}@*
Online shopping cart system.
Online shopping cart system.
@c Added 990928 from editor@city-gallery.com
@c Added 990928 from editor@city-gallery.com
@cindex Old Photo Album
@item @uref{http://www.city-gallery.com/album/}@*
@item @uref{http://www.city-gallery.com/album/}@*
Old Photo Album - The album is a collaborative popular history of photography
Old Photo Album - The album is a collaborative popular history of photography
project that generates all pages from data stored in a @strong{MySQL}
project that generates all pages from data stored in a @strong{MySQL}
...
@@ -2437,6 +2455,8 @@ Cygwin tools. UNIX on top of Windows.
...
@@ -2437,6 +2455,8 @@ Cygwin tools. UNIX on top of Windows.
dbasecentral.com; Development and distribution of powerful and easy-to-use
dbasecentral.com; Development and distribution of powerful and easy-to-use
database applications and systems.
database applications and systems.
@cindex Tek-Tips forums
@cindex forums, Tek-Tips
@item @uref{http://www.Tek-Tips.com}@*
@item @uref{http://www.Tek-Tips.com}@*
Tek-Tips Forums are 800+ independent peer-to-peer non-commercial support
Tek-Tips Forums are 800+ independent peer-to-peer non-commercial support
forums for Computer Professionals. Features include automatic e-mail
forums for Computer Professionals. Features include automatic e-mail
...
@@ -2652,6 +2672,7 @@ missing, please include it with your message! Please read this section
...
@@ -2652,6 +2672,7 @@ missing, please include it with your message! Please read this section
carefully and make sure that all the information described here is included
carefully and make sure that all the information described here is included
in your report.
in your report.
@cindex bug reports, email address
If you can make a test case that clearly shows the bug, you should post
If you can make a test case that clearly shows the bug, you should post
it to the @email{bugs@@lists.mysql.com} list. Note that on this list you
it to the @email{bugs@@lists.mysql.com} list. Note that on this list you
should only post a full, repeatable bug report using the @code{mysqlbug}
should only post a full, repeatable bug report using the @code{mysqlbug}
...
@@ -2970,7 +2991,10 @@ arrangements:
...
@@ -2970,7 +2991,10 @@ arrangements:
@item Commercial licensing costs
@item Commercial licensing costs
@end itemize
@end itemize
@cindex Licensing policy
@cindex licensing policy
@cindex technical support, licensing
@cindex support, licensing
@cindex General Public License, @strong{MysQL}
@node Licensing policy, Copyright, Licensing and Support, Licensing and Support
@node Licensing policy, Copyright, Licensing and Support, Licensing and Support
@section MySQL Licensing Policy
@section MySQL Licensing Policy
...
@@ -3193,6 +3217,8 @@ it should give its customers at least read access to the source of
...
@@ -3193,6 +3217,8 @@ it should give its customers at least read access to the source of
the @strong{MySQL} installation so that its customer can verify that
the @strong{MySQL} installation so that its customer can verify that
it is patched correctly.
it is patched correctly.
@cindexweb server, running
@cindex running, a web server
@node Web server, , ISP, Licensing examples
@node Web server, , ISP, Licensing examples
@subsection Running a Web Server Using @strong{MySQL}
@subsection Running a Web Server Using @strong{MySQL}
...
@@ -3376,6 +3402,8 @@ please send e-mail to @email{webmaster@@mysql.com}.
...
@@ -3376,6 +3402,8 @@ please send e-mail to @email{webmaster@@mysql.com}.
* Extended login support:: Extended login support
* Extended login support:: Extended login support
@end menu
@end menu
@cindex email, technical support
@cindex technical support, by email
@node Basic email support, Extended email support, Support, Support
@node Basic email support, Extended email support, Support, Support
@subsection Basic E-mail Support
@subsection Basic E-mail Support
...
@@ -3448,6 +3476,7 @@ higher level of support.
...
@@ -3448,6 +3476,7 @@ higher level of support.
@end itemize
@end itemize
@cindex extended email support
@node Extended email support, Login support, Basic email support, Support
@node Extended email support, Login support, Basic email support, Support
@subsection Extended E-mail Support
@subsection Extended E-mail Support
...
@@ -3493,6 +3522,7 @@ TODO List. @xref{TODO}. This will ensure that the features you really need
...
@@ -3493,6 +3522,7 @@ TODO List. @xref{TODO}. This will ensure that the features you really need
will be implemented sooner than they might be otherwise.
will be implemented sooner than they might be otherwise.
@end itemize
@end itemize
@cindex login support
@node Login support, Extended login support, Extended email support, Support
@node Login support, Extended login support, Extended email support, Support
@subsection Login Support
@subsection Login Support
...
@@ -4266,6 +4296,12 @@ South Africa [The Internet Solution/Johannesburg] @
...
@@ -4266,6 +4296,12 @@ South Africa [The Internet Solution/Johannesburg] @
@c END_OF_MIRROR_LISTING
@c END_OF_MIRROR_LISTING
@cindex operating systems, supported
@cindex native thread support
@cindex thread support
@cindex process support
@cindex support, for operating systems
@node Which OS, Which version, Getting MySQL, Installing
@node Which OS, Which version, Getting MySQL, Installing
@section Operating Systems Supported by MySQL
@section Operating Systems Supported by MySQL
...
@@ -4458,6 +4494,8 @@ Another test is that we use the newest @strong{MySQL} version in our internal
...
@@ -4458,6 +4494,8 @@ Another test is that we use the newest @strong{MySQL} version in our internal
production environment, on at least one machine. We have more than 100
production environment, on at least one machine. We have more than 100
gigabytes of data to work with.
gigabytes of data to work with.
@cindex releases, updating
@cindex updating, releases of @strong{MySQL}
@node Many versions, Installation layouts, Which version, Installing
@node Many versions, Installation layouts, Which version, Installing
@section How and When Updates Are Released
@section How and When Updates Are Released
...
@@ -4581,6 +4619,8 @@ The header file and library directories are @file{include/mysql} and
...
@@ -4581,6 +4619,8 @@ The header file and library directories are @file{include/mysql} and
You can create your own binary installation from a compiled source
You can create your own binary installation from a compiled source
distribution by executing the script @file{scripts/make_binary_distribution}.
distribution by executing the script @file{scripts/make_binary_distribution}.
@cindex installing, binary distribution
@cindex binary distribution, installing
@node Installing binary, Installing source, Installation layouts, Installing
@node Installing binary, Installing source, Installation layouts, Installing
@section Installing a MySQL Binary Distribution
@section Installing a MySQL Binary Distribution
...
@@ -4889,6 +4929,8 @@ The following sections indicate some of the issues that have been observed
...
@@ -4889,6 +4929,8 @@ The following sections indicate some of the issues that have been observed
on particular systems when installing @strong{MySQL} from a binary
on particular systems when installing @strong{MySQL} from a binary
distribution.
distribution.
@cindex binary distribution, on Linux
@cindex Linux, binary distribution
@node Binary notes-Linux, Binary notes-HP-UX, Binary install system issues, Binary install system issues
@node Binary notes-Linux, Binary notes-HP-UX, Binary install system issues, Binary install system issues
@subsubsection Linux Notes for Binary Distributions
@subsubsection Linux Notes for Binary Distributions
...
@@ -4965,6 +5007,8 @@ your clients or use sockets, if you are running the database server
...
@@ -4965,6 +5007,8 @@ your clients or use sockets, if you are running the database server
and clients on the same machine. We hope that the @code{Linux 2.4}
and clients on the same machine. We hope that the @code{Linux 2.4}
kernel will fix this problem in the future.
kernel will fix this problem in the future.
@cindex HP-UX, binary distribution
@cindexbinary distribution, on HP-UX
@node Binary notes-HP-UX, , Binary notes-Linux, Binary install system issues
@node Binary notes-HP-UX, , Binary notes-Linux, Binary install system issues
@subsubsection HP-UX Notes for Binary Distributions
@subsubsection HP-UX Notes for Binary Distributions
...
@@ -5038,6 +5082,10 @@ at boot time. Obviously, this entails being @code{root} to install.
...
@@ -5038,6 +5082,10 @@ 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}.
@cindex installing, source distribution
@cindex source distribtuion, installing
@cindex installation, overview
@node Installing source, Compilation problems, Installing binary, Installing
@node Installing source, Compilation problems, Installing binary, Installing
@section Installing a MySQL Source Distribution
@section Installing a MySQL Source Distribution
...
@@ -5243,6 +5291,8 @@ servers}.
...
@@ -5243,6 +5291,8 @@ servers}.
@xref{Post-installation}.
@xref{Post-installation}.
@cindex patches, applying
@cindex applying, patches
@node Applying patches, configure options, Quick install, Installing source
@node Applying patches, configure options, Quick install, Installing source
@subsection Applying Patches
@subsection Applying Patches
...
@@ -5281,6 +5331,12 @@ You may need to bring down any currently running server before you run
...
@@ -5281,6 +5331,12 @@ You may need to bring down any currently running server before you run
systems do not allow you to install a new version of a program if it replaces
systems do not allow you to install a new version of a program if it replaces
the version that is currently executing.
the version that is currently executing.
@cindex configure script
@cindex options, configure
@cindex configuration options
@findex without-server option
@cindex log file
@cindex files, log
@node configure options, , Applying patches, Installing source
@node configure options, , Applying patches, Installing source
@subsection Typical @code{configure} Options
@subsection Typical @code{configure} Options
...
@@ -5446,6 +5502,11 @@ system-specific sections later in this chapter.
...
@@ -5446,6 +5502,11 @@ system-specific sections later in this chapter.
@xref{Source install system issues}.
@xref{Source install system issues}.
@end itemize
@end itemize
@cindex compiling, problems
@cindex problems, compiling
@cindex reconfiguring
@cindex config.cache file
@cindex files, config,.cache
@node Compilation problems, MIT-pthreads, Installing source, Installing
@node Compilation problems, MIT-pthreads, Installing source, Installing
@section Problems Compiling?
@section Problems Compiling?
...
@@ -5658,6 +5719,8 @@ link your clients with the new client library.
...
@@ -5658,6 +5719,8 @@ link your clients with the new client library.
@xref{Debugging client}.
@xref{Debugging client}.
@end itemize
@end itemize
@cindex MIT-pthreads
@cindex thread support, non-native
@node MIT-pthreads, Perl support, Compilation problems, Installing
@node MIT-pthreads, Perl support, Compilation problems, Installing
@section MIT-pthreads Notes
@section MIT-pthreads Notes
...
@@ -5756,6 +5819,8 @@ We haven't gotten @code{readline} to work with MIT-pthreads. (This isn't
...
@@ -5756,6 +5819,8 @@ We haven't gotten @code{readline} to work with MIT-pthreads. (This isn't
needed, but may be interesting for someone.)
needed, but may be interesting for someone.)
@end itemize
@end itemize
@cindex Perl, installing
@cindex installing, Perl
@node Perl support, Source install system issues, MIT-pthreads, Installing
@node Perl support, Source install system issues, MIT-pthreads, Installing
@section Perl Installation Comments
@section Perl Installation Comments
...
@@ -5882,6 +5947,8 @@ The @strong{MySQL} Perl distribution contains @code{DBI},
...
@@ -5882,6 +5947,8 @@ The @strong{MySQL} Perl distribution contains @code{DBI},
@item Test that @code{perl} works by executing @code{perl -v} in a DOS shell.
@item Test that @code{perl} works by executing @code{perl -v} in a DOS shell.
@end itemize
@end itemize
@cindex problems, installing Perl
@cindex Perl DBI/DBD, installation problems
@node Perl support problems, , Windows Perl, Perl support
@node Perl support problems, , Windows Perl, Perl support
@subsection Problems Using the Perl @code{DBI}/@code{DBD} Interface
@subsection Problems Using the Perl @code{DBI}/@code{DBD} Interface
...
@@ -6028,6 +6095,12 @@ distribution.
...
@@ -6028,6 +6095,12 @@ distribution.
* BEOS::
* BEOS::
@end menu
@end menu
@cindex Solaris, installation problems
@cindex problems, installing on Solaris
@cindex tar, problems on Solaris
@cindex errors, directory checksum
@cindex checksum errors
@node Solaris, Solaris 2.7, Source install system issues, Source install system issues
@node Solaris, Solaris 2.7, Source install system issues, Source install system issues
@subsection Solaris Notes
@subsection Solaris Notes
...
@@ -7775,6 +7848,8 @@ With the newer @strong{MySQL} versions you can easily add new users
...
@@ -7775,6 +7848,8 @@ With the newer @strong{MySQL} versions you can easily add new users
and change privileges with @code{GRANT} and @code{REVOKE} commands.
and change privileges with @code{GRANT} and @code{REVOKE} commands.
@xref{GRANT}.
@xref{GRANT}.
@cindex SSH
@cindex connecting, remotely with SSH
@node Windows and SSH, Windows symbolic links, Windows running, Windows
@node Windows and SSH, Windows symbolic links, Windows running, Windows
@subsection Connecting to a Remote MySQL from Windows with SSH
@subsection Connecting to a Remote MySQL from Windows with SSH
...
@@ -7832,6 +7907,8 @@ should create the file @file{C:\mysql\data\foo.sym} that contains the
...
@@ -7832,6 +7907,8 @@ should create the file @file{C:\mysql\data\foo.sym} that contains the
text @code{D:\data\foo}. After this, all tables created in the database
text @code{D:\data\foo}. After this, all tables created in the database
@code{foo} will be created in @file{D:\data\foo}.
@code{foo} will be created in @file{D:\data\foo}.
@cindex compiling, on Windows
@cindex Windows, compiling on
@node Windows compiling, Windows and BDB tables., Windows symbolic links, Windows
@node Windows compiling, Windows and BDB tables., Windows symbolic links, Windows
@subsection Compiling MySQL Clients on Windows
@subsection Compiling MySQL Clients on Windows
...
@@ -7852,6 +7929,8 @@ with the static @file{mysqlclient.lib} library.
...
@@ -7852,6 +7929,8 @@ with the static @file{mysqlclient.lib} library.
Note that as the mysqlclient libraries are compiled as threaded libraries,
Note that as the mysqlclient libraries are compiled as threaded libraries,
you should also compile your code to be multi-threaded!
you should also compile your code to be multi-threaded!
@cindex BDB tables
@cindex tables, BDB
@node Windows and BDB tables., Windows vs Unix, Windows compiling, Windows
@node Windows and BDB tables., Windows vs Unix, Windows compiling, Windows
@subsection Windows and BDB Tables
@subsection Windows and BDB Tables
...
@@ -7862,6 +7941,8 @@ test suite on it. When the above is done we will start to release binary
...
@@ -7862,6 +7941,8 @@ test suite on it. When the above is done we will start to release binary
distributions (for Windows and UNIX) of @strong{MySQL} that will include
distributions (for Windows and UNIX) of @strong{MySQL} that will include
support for BDB tables.
support for BDB tables.
@cindex Windows, versus UNIX
@cindex operating systems, WIndows versus UNIX
@node Windows vs Unix, , Windows and BDB tables., Windows
@node Windows vs Unix, , Windows and BDB tables., Windows
@subsection MySQL-Windows Compared to UNIX MySQL
@subsection MySQL-Windows Compared to UNIX MySQL
...
@@ -8102,6 +8183,7 @@ specify the module extension:
...
@@ -8102,6 +8183,7 @@ specify the module extension:
CREATE FUNCTION metaphon RETURNS STRING SONAME "example";
CREATE FUNCTION metaphon RETURNS STRING SONAME "example";
@end example
@end example
@cindex binary distributions
@node MySQL binaries, Post-installation, OS/2, Installing
@node MySQL binaries, Post-installation, OS/2, Installing
@section MySQL Binaries
@section MySQL Binaries
...
@@ -8162,6 +8244,9 @@ If you want to compile a debug version of @strong{MySQL}, you should add
...
@@ -8162,6 +8244,9 @@ If you want to compile a debug version of @strong{MySQL}, you should add
@code{--with-debug} or @code{--with-debug=full} to the above configure lines
@code{--with-debug} or @code{--with-debug=full} to the above configure lines
and remove any @code{-fomit-frame-pointer} options.
and remove any @code{-fomit-frame-pointer} options.
@cindex post-installation, setup and testing
@cindex testing, post-installation
@cindex setup, post-installation
@node Post-installation, Upgrade, MySQL binaries, Installing
@node Post-installation, Upgrade, MySQL binaries, Installing
@section Post-installation Setup and Testing
@section Post-installation Setup and Testing
...
@@ -9374,14 +9459,13 @@ There are some new reserved words. The most notable are @code{DATE},
...
@@ -9374,14 +9459,13 @@ There are some new reserved words. The most notable are @code{DATE},
@node Upgrading-to-arch, , Upgrading-from-3.20, Upgrade
@node Upgrading-to-arch, , Upgrading-from-3.20, Upgrade
@subsection Upgrading to Another Architecture
@subsection Upgrading to Another Architecture
If you are using @strong{MySQL} Version 3.23, you can copy the @code{.frm},
If you are using @strong{MySQL} Version 3.23, you can copy the @code{.frm},
@code{.MYI}, and @code{.MYD} files between different architectures that
@code{.MYI}, and @code{.MYD} files between different architectures that
support the same floating point format. (@strong{MySQL} takes care of any
support the same floating point format. (@strong{MySQL} takes care of any
byte swapping issues.)
byte swapping issues.)
The @strong{MySQL} @code{ISAM} data and index files (@file{.ISD} and
The @strong{MySQL} @code{ISAM} data and index files (@file{.ISD} and
@file{*.ISM}, respectively) are architecture-dependent and in some case
@file{*.ISM}, respectively) are architecture-dependent and in some case
s
OS-dependent. If you want to move your applications to another machine
OS-dependent. If you want to move your applications to another machine
that has a different architecture or OS than your current machine, you
that has a different architecture or OS than your current machine, you
should not try to move a database by simply copying the files to the
should not try to move a database by simply copying the files to the
...
@@ -11557,7 +11641,11 @@ have the necessary privileges to perform the request, but the server cannot
...
@@ -11557,7 +11641,11 @@ have the necessary privileges to perform the request, but the server cannot
tell that from either table by itself; the privileges granted by the entries
tell that from either table by itself; the privileges granted by the entries
in both tables must be combined.
in both tables must be combined.
@cindex host table
@cindex tables, host
The @code{host} table can be used to maintain a list of secure servers.
The @code{host} table can be used to maintain a list of secure servers.
At TcX, the @code{host} table contains a list of all machines on the local
At TcX, the @code{host} table contains a list of all machines on the local
network. These are granted all privileges.
network. These are granted all privileges.
...
@@ -11577,6 +11665,11 @@ like this:
...
@@ -11577,6 +11665,11 @@ like this:
+--------------------+----+-
+--------------------+----+-
@end example
@end example
@cindex privilege, changes
@cindex changes, to privileges
@cindex tables, grant
@cindex grant tables
Naturally, you should always test your entries in the grant tables (for
Naturally, you should always test your entries in the grant tables (for
example, using @code{mysqlaccess}) to make sure your access privileges are
example, using @code{mysqlaccess}) to make sure your access privileges are
actually set up the way you think they are.
actually set up the way you think they are.
...
@@ -11614,6 +11707,13 @@ command.
...
@@ -11614,6 +11707,13 @@ command.
Global privilege changes and password changes take effect the next time the
Global privilege changes and password changes take effect the next time the
client connects.
client connects.
@cindex privileges, default
@cindex default, privileges
@cindex root password
@cindex superuser
@cindex users, root
@cindex anonymous user
@cindex password, root user
@node Default privileges, Adding users, Privilege changes, Privilege system
@node Default privileges, Adding users, Privilege changes, Privilege system
@section Setting Up the Initial MySQL Privileges
@section Setting Up the Initial MySQL Privileges
...
@@ -11697,6 +11797,8 @@ add other users.
...
@@ -11697,6 +11797,8 @@ add other users.
If you want the initial privileges to be different than those just described
If you want the initial privileges to be different than those just described
above, you can modify @code{mysql_install_db} before you run it.
above, you can modify @code{mysql_install_db} before you run it.
@cindex grant tables, recreating
@cindex recreating, grant tables
To re-create the grant tables completely, remove all the @file{.frm},
To re-create the grant tables completely, remove all the @file{.frm},
@file{.MYI}, and @file{.MYD} files in the directory containing the
@file{.MYI}, and @file{.MYD} files in the directory containing the
@code{mysql} database. (This is the directory named @file{mysql} under
@code{mysql} database. (This is the directory named @file{mysql} under
...
@@ -11709,6 +11811,11 @@ you should NOT delete the @file{.frm} files. If you accidentally do this,
...
@@ -11709,6 +11811,11 @@ you should NOT delete the @file{.frm} files. If you accidentally do this,
you should copy them back from your @strong{MySQL} distribution before
you should copy them back from your @strong{MySQL} distribution before
running @code{mysql_install_db}.
running @code{mysql_install_db}.
@cindex privileges, adding
@cindex adding, new user privileges
@cindex user privileges, adding
@findex GRANT statement
@findex statements, GRANT
@node Adding users, Passwords, Default privileges, Privilege system
@node Adding users, Passwords, Default privileges, Privilege system
@section Adding New User Privileges to MySQL
@section Adding New User Privileges to MySQL
...
@@ -11767,6 +11874,8 @@ type allows you to create a user with no privileges. It is assumed that you
...
@@ -11767,6 +11874,8 @@ type allows you to create a user with no privileges. It is assumed that you
will grant database-specific privileges later.
will grant database-specific privileges later.
@end table
@end table
@findex INSERT statement, grant privileges
@findex statements, INSERT
You can also add the same user access information directly by issuing
You can also add the same user access information directly by issuing
@code{INSERT} statements and then telling the server to reload the grant
@code{INSERT} statements and then telling the server to reload the grant
tables:
tables:
...
@@ -11886,10 +11995,11 @@ You can find these utilities in the
...
@@ -11886,10 +11995,11 @@ You can find these utilities in the
@uref{http://www.mysql.com/Downloads/Contrib/,Contrib directory of the @strong{MySQL}
@uref{http://www.mysql.com/Downloads/Contrib/,Contrib directory of the @strong{MySQL}
Website}.
Website}.
@node Passwords, Access denied, Adding users, Privilege system
@cindex passwords, setting
@section How to Set Up Passwords
@cindex Passwords, setting
@findex PASSWORD()
@findex PASSWORD()
@findex SET PASSWORD statement
@cindex setting, passwords
@node Passwords, Access denied, Adding users, Privilege system
In most cases you should use @code{GRANT} to set up your users/passwords,
In most cases you should use @code{GRANT} to set up your users/passwords,
so the following only applies for advanced users. @xref{GRANT, , @code{GRANT}}.
so the following only applies for advanced users. @xref{GRANT, , @code{GRANT}}.
...
@@ -12293,8 +12403,11 @@ to restart @code{mysqld} with @code{--skip-grant-tables} to run
...
@@ -12293,8 +12403,11 @@ to restart @code{mysqld} with @code{--skip-grant-tables} to run
@end menu
@end menu
@cindex Strings
@cindex strings, defined
@cindex Strings, escaping characters
@cindex strings, escaping characters
@cindex literals
@cindex escape characters
@cindex backslash, escape character
@node Literals, Variables, Reference, Reference
@node Literals, Variables, Reference, Reference
@section Literals: How to Write Strings and Numbers
@section Literals: How to Write Strings and Numbers
...
@@ -12384,6 +12497,7 @@ Note that if you use @samp{\%} or @samp{\_} in some string contexts, these
...
@@ -12384,6 +12497,7 @@ Note that if you use @samp{\%} or @samp{\_} in some string contexts, these
will return the strings @samp{\%} and @samp{\_} and not @samp{%} and
will return the strings @samp{\%} and @samp{\_} and not @samp{%} and
@samp{_}.
@samp{_}.
@cindex quotes, in strings
@noindent
@noindent
There are several ways to include quotes within a string:
There are several ways to include quotes within a string:
...
@@ -12455,6 +12569,11 @@ characters to the proper escape sequences. @xref{Perl DBI Class, , Perl
...
@@ -12455,6 +12569,11 @@ characters to the proper escape sequences. @xref{Perl DBI Class, , Perl
You should use an escape function on any string that might contain any of the
You should use an escape function on any string that might contain any of the
special characters listed above!
special characters listed above!
@cindex numbers
@cindex valid numbers, examples
@cindex integers
@cindex floats
@cindex negative values
@node Number syntax, Hexadecimal values, String syntax, Literals
@node Number syntax, Hexadecimal values, String syntax, Literals
@subsection Numbers
@subsection Numbers
...
@@ -12481,7 +12600,7 @@ Examples of valid floating-point numbers:
...
@@ -12481,7 +12600,7 @@ Examples of valid floating-point numbers:
An integer may be used in a floating-point context; it is interpreted
An integer may be used in a floating-point context; it is interpreted
as the equivalent floating-point number.
as the equivalent floating-point number.
@tindex
H
exadecimal values
@tindex
h
exadecimal values
@node Hexadecimal values, NULL values, Number syntax, Literals
@node Hexadecimal values, NULL values, Number syntax, Literals
@subsection Hexadecimal Values
@subsection Hexadecimal Values
...
@@ -12510,6 +12629,13 @@ as @code{0} for numeric types or the empty string for string types.
...
@@ -12510,6 +12629,13 @@ as @code{0} for numeric types or the empty string for string types.
or export formats (@code{LOAD DATA INFILE}, @code{SELECT ... INTO OUTFILE}).
or export formats (@code{LOAD DATA INFILE}, @code{SELECT ... INTO OUTFILE}).
@xref{LOAD DATA, , @code{LOAD DATA}}.
@xref{LOAD DATA, , @code{LOAD DATA}}.
@cindex names
@cindex legal names
@cindex databases, names
@cindex tables, names
@cindex indexes, names
@cindex columns, names
@cindex aliases, names
@node Legal names, , NULL values, Literals
@node Legal names, , NULL values, Literals
@subsection Database, Table, Index, Column, and Alias Names
@subsection Database, Table, Index, Column, and Alias Names
...
@@ -12520,7 +12646,8 @@ or export formats (@code{LOAD DATA INFILE}, @code{SELECT ... INTO OUTFILE}).
...
@@ -12520,7 +12646,8 @@ or export formats (@code{LOAD DATA INFILE}, @code{SELECT ... INTO OUTFILE}).
Database, table, index, column, and alias names all follow the same rules in
Database, table, index, column, and alias names all follow the same rules in
@strong{MySQL}.
@strong{MySQL}.
@tindex Quoting of identifiers
@tindex, identifiers, quoting
@tindex quoting of identifiers
@tindex `
@tindex `
@tindex "
@tindex "
Note that the rules changed starting with @strong{MySQL} Version 3.23.6 when we
Note that the rules changed starting with @strong{MySQL} Version 3.23.6 when we
...
@@ -12602,6 +12729,8 @@ The syntax @code{.tbl_name} means the table @code{tbl_name} in the current
...
@@ -12602,6 +12729,8 @@ The syntax @code{.tbl_name} means the table @code{tbl_name} in the current
database. This syntax is accepted for ODBC compatibility, because some ODBC
database. This syntax is accepted for ODBC compatibility, because some ODBC
programs prefix table names with a @samp{.} character.
programs prefix table names with a @samp{.} character.
@cindex names, case-sensitivity
@cindex case-sensitivity, in names
@node Name case sensitivity, , Legal names, Legal names
@node Name case sensitivity, , Legal names, Legal names
@subsubsection Case Sensitivity in Names
@subsubsection Case Sensitivity in Names
@cindex Database names, case sensitivity
@cindex Database names, case sensitivity
...
@@ -12640,6 +12769,9 @@ mysql> SELECT col_name FROM tbl_name AS a
...
@@ -12640,6 +12769,9 @@ mysql> SELECT col_name FROM tbl_name AS a
Aliases on columns are case insensitive.
Aliases on columns are case insensitive.
@cindex variables, user
@cindex user variables
@cindex names, variables
@node Variables, Column types, Literals, Reference
@node Variables, Column types, Literals, Reference
@section User Variables
@section User Variables
...
@@ -12695,6 +12827,8 @@ SELECT (@@aa:=id) AS a, (@@aa+3) AS b FROM table_name HAVING b=5;
...
@@ -12695,6 +12827,8 @@ SELECT (@@aa:=id) AS a, (@@aa+3) AS b FROM table_name HAVING b=5;
The reason is that @code{@@aa} will not contain the value of the current
The reason is that @code{@@aa} will not contain the value of the current
row, but the value of @code{id} for the previous accepted row.
row, but the value of @code{id} for the previous accepted row.
@cindex columns, types
@cindex types, columns
@node Column types, Functions, Variables, Reference
@node Column types, Functions, Variables, Reference
@section Column Types
@section Column Types
...
@@ -12710,6 +12844,12 @@ as the allowable formats in which you can specify values.
...
@@ -12710,6 +12844,12 @@ as the allowable formats in which you can specify values.
The column types supported by @strong{MySQL} are listed below.
The column types supported by @strong{MySQL} are listed below.
The following code letters are used in the descriptions:
The following code letters are used in the descriptions:
@cindex display size
@cindex sizes, display
@cindex digits
@cindex decimal point
@cindex brackets, square
@cindex square brackets
@table @code
@table @code
@item M
@item M
Indicates the maximum display size. The maximum legal display size is 255.
Indicates the maximum display size. The maximum legal display size is 255.
...
@@ -12775,6 +12915,7 @@ values! This means that if you multiply two big integers (or results
...
@@ -12775,6 +12915,7 @@ values! This means that if you multiply two big integers (or results
from functions that return integers) you may get unexpected results if
from functions that return integers) you may get unexpected results if
the result is larger than @code{9223372036854775807}.
the result is larger than @code{9223372036854775807}.
@cindex floating point number
@tindex FLOAT
@tindex FLOAT
@tindex FLOAT(precision)
@tindex FLOAT(precision)
@item FLOAT(precision) [ZEROFILL]
@item FLOAT(precision) [ZEROFILL]
...
@@ -12790,7 +12931,7 @@ In @strong{MySQL} Version 3.23, this is a true floating-point value. In
...
@@ -12790,7 +12931,7 @@ In @strong{MySQL} Version 3.23, this is a true floating-point value. In
earlier @strong{MySQL} versions, @code{FLOAT(precision)} always has 2 decimals.
earlier @strong{MySQL} versions, @code{FLOAT(precision)} always has 2 decimals.
@cindex ODBC compatibility
@cindex ODBC compatibility
@cindex
C
ompatibility, with ODBC
@cindex
c
ompatibility, with ODBC
This syntax is provided for ODBC compatibility.
This syntax is provided for ODBC compatibility.
@tindex FLOAT
@tindex FLOAT
...
@@ -13000,13 +13141,16 @@ be chosen from the list of values @code{'value1'}, @code{'value2'},
...
@@ -13000,13 +13141,16 @@ be chosen from the list of values @code{'value1'}, @code{'value2'},
* Other-vendor column types:: Using column types from other database engines
* Other-vendor column types:: Using column types from other database engines
@end menu
@end menu
@cindex Storage requirements
@cindex storage requirements, column type
@cindex columns, storage requirements
@node Storage requirements, Numeric types, Column types, Column types
@node Storage requirements, Numeric types, Column types, Column types
@subsection Column Type Storage Requirements
@subsection Column Type Storage Requirements
The storage requirements for each of the column types supported by
The storage requirements for each of the column types supported by
@strong{MySQL} are listed below by category.
@strong{MySQL} are listed below by category.
@cindex numeric types
@cindex types, numeric
@subheading Numeric types
@subheading Numeric types
@multitable @columnfractions .5 .5
@multitable @columnfractions .5 .5
...
@@ -13026,6 +13170,10 @@ The storage requirements for each of the column types supported by
...
@@ -13026,6 +13170,10 @@ The storage requirements for each of the column types supported by
@item @code{NUMERIC(M,D)} @tab @code{M} bytes (@code{D}+2, if @code{M < D})
@item @code{NUMERIC(M,D)} @tab @code{M} bytes (@code{D}+2, if @code{M < D})
@end multitable
@end multitable
@cindex date types
@cindex time types
@cindex types, date
@cindex types, time
@subheading Date and time types
@subheading Date and time types
@multitable @columnfractions .5 .5
@multitable @columnfractions .5 .5
...
@@ -13293,6 +13441,7 @@ because ODBC can't handle such values.
...
@@ -13293,6 +13441,7 @@ because ODBC can't handle such values.
@end itemize
@end itemize
@cindex Year 2000 issues
@cindex Year 2000 issues
@cindex date types, Y2K issues
@node Y2K issues, DATETIME, Date and time types, Date and time types
@node Y2K issues, DATETIME, Date and time types, Date and time types
@subsubsection Y2K Issues and Date Types
@subsubsection Y2K Issues and Date Types
...
@@ -13491,6 +13640,8 @@ digits. If the number is 6 or 12 digits long, it is assumed to be in
...
@@ -13491,6 +13640,8 @@ digits. If the number is 6 or 12 digits long, it is assumed to be in
first 2 digits. Numbers that are not one of these lengths are interpreted
first 2 digits. Numbers that are not one of these lengths are interpreted
as though padded with leading zeros to the closest length.
as though padded with leading zeros to the closest length.
@cindex non-delimited strings
@cindex strings, non-delimited
Values specified as non-delimited strings are interpreted using their length
Values specified as non-delimited strings are interpreted using their length
as given. If the string is 8 or 14 characters long, the year is assumed to
as given. If the string is 8 or 14 characters long, the year is assumed to
be given by the first 4 characters. Otherwise the year is assumed to be
be given by the first 4 characters. Otherwise the year is assumed to be
...
@@ -13559,6 +13710,8 @@ that a date such as @code{'1968-01-01'}, while legal as a @code{DATETIME} or
...
@@ -13559,6 +13710,8 @@ that a date such as @code{'1968-01-01'}, while legal as a @code{DATETIME} or
converted to @code{0} if assigned to such an object.
converted to @code{0} if assigned to such an object.
@end itemize
@end itemize
@cindex problems, date values
@cindex date values, problems
Be aware of certain pitfalls when specifying date values:
Be aware of certain pitfalls when specifying date values:
@itemize @bullet
@itemize @bullet
...
@@ -13580,7 +13733,7 @@ rules:
...
@@ -13580,7 +13733,7 @@ rules:
Year values in the range @code{00-69} are converted to @code{2000-2069}.
Year values in the range @code{00-69} are converted to @code{2000-2069}.
@item
@item
Year values in the range @code{70-99} are converted to @code{1970-1999}.
Year
year
values in the range @code{70-99} are converted to @code{1970-1999}.
@end itemize
@end itemize
@end itemize
@end itemize
...
@@ -13691,6 +13844,8 @@ in a @code{YEAR} context, such as @code{NOW()}.
...
@@ -13691,6 +13844,8 @@ in a @code{YEAR} context, such as @code{NOW()}.
Illegal @code{YEAR} values are converted to @code{0000}.
Illegal @code{YEAR} values are converted to @code{0000}.
@cindex types, strings
@cindex string types
@node String types, Choosing types, Date and time types, Column types
@node String types, Choosing types, Date and time types, Column types
@subsection String Types
@subsection String Types
...
@@ -14007,8 +14162,8 @@ If you want to get all possible values for a @code{SET} column, you should
...
@@ -14007,8 +14162,8 @@ If you want to get all possible values for a @code{SET} column, you should
use: @code{SHOW COLUMNS FROM table_name LIKE set_column_name} and parse
use: @code{SHOW COLUMNS FROM table_name LIKE set_column_name} and parse
the @code{SET} definition in the second column.
the @code{SET} definition in the second column.
@cindex
Types, choosing
@cindex
types, columns
@cindex
C
hoosing types
@cindex
c
hoosing types
@node Choosing types, Indexes, String types, Column types
@node Choosing types, Indexes, String types, Column types
@subsection Choosing the Right Type for a Column
@subsection Choosing the Right Type for a Column
...
@@ -14026,8 +14181,9 @@ For high precision, you can always convert to a fixed-point type stored
...
@@ -14026,8 +14181,9 @@ For high precision, you can always convert to a fixed-point type stored
in a @code{BIGINT}. This allows you to do all calculations with integers
in a @code{BIGINT}. This allows you to do all calculations with integers
and convert results back to floating-point values only when necessary.
and convert results back to floating-point values only when necessary.
@cindex Indexes
@cindex indexes, columns
@cindex Keys
@cindex columns, indexes
@cindex keys
@node Indexes, Multiple-column indexes, Choosing types, Column types
@node Indexes, Multiple-column indexes, Choosing types, Column types
@subsection Column Indexes
@subsection Column Indexes
...
@@ -14066,6 +14222,8 @@ created only from @code{VARCHAR} and @code{TEXT} columns.
...
@@ -14066,6 +14222,8 @@ created only from @code{VARCHAR} and @code{TEXT} columns.
Indexing always happens over the entire column and partial indexing is not
Indexing always happens over the entire column and partial indexing is not
supported. See @ref{MySQL full-text search} for details.
supported. See @ref{MySQL full-text search} for details.
@cindex multi-column indexes
@cindex indexes, multi-column
@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
...
@@ -14123,7 +14281,9 @@ For more information on the manner in which @strong{MySQL} uses indexes to
...
@@ -14123,7 +14281,9 @@ For more information on the manner in which @strong{MySQL} uses indexes to
improve query performance, see @ref{MySQL indexes, , @strong{MySQL}
improve query performance, see @ref{MySQL indexes, , @strong{MySQL}
indexes}.
indexes}.
@cindex Type portability
@cindex types, portability
@cindex portability, types
@cindex columns, other types
@node Other-vendor column types, , Multiple-column indexes, Column types
@node Other-vendor column types, , Multiple-column indexes, Column types
@subsection Using Column Types from Other Database Engines
@subsection Using Column Types from Other Database Engines
...
@@ -14209,9 +14369,10 @@ mysql> select MOD(29,9);
...
@@ -14209,9 +14369,10 @@ mysql> select MOD(29,9);
* Group by functions:: Functions for @code{GROUP BY} clause
* Group by functions:: Functions for @code{GROUP BY} clause
@end menu
@end menu
@cindex functions, grouping
@cindex grouping, expressions
@node Grouping functions, Arithmetic functions, Functions, Functions
@node Grouping functions, Arithmetic functions, Functions, Functions
@subsection Grouping Functions
@subsection Grouping Functions
@cindex Grouping of expressions
@table @code
@table @code
@findex () (parentheses)
@findex () (parentheses)
...
@@ -14233,7 +14394,8 @@ The usual arithmetic operators are available. Note that in the case of
...
@@ -14233,7 +14394,8 @@ The usual arithmetic operators are available. Note that in the case of
@samp{-}, @samp{+}, and @samp{*}, the result is calculated with @code{BIGINT}
@samp{-}, @samp{+}, and @samp{*}, the result is calculated with @code{BIGINT}
(64-bit) precision if both arguments are integers!
(64-bit) precision if both arguments are integers!
@cindex Arithmetic expressions
@cindex operations, arithmetic
@cindex arithmetic expressions
@table @code
@table @code
@findex + (addition)
@findex + (addition)
@findex addition (+)
@findex addition (+)
...
@@ -14289,10 +14451,10 @@ A division will be calculated with @code{BIGINT} arithmetic only if performed
...
@@ -14289,10 +14451,10 @@ A division will be calculated with @code{BIGINT} arithmetic only if performed
in a context where its result is converted to an integer!
in a context where its result is converted to an integer!
@end table
@end table
@findex
A
rithmetic functions
@findex
a
rithmetic functions
@findex
B
it functions
@findex
b
it functions
@findex
F
unctions, arithmetic
@findex
f
unctions, arithmetic
@findex
F
unctions, bit
@findex
f
unctions, bit
@node Bit functions, Logical functions, Arithmetic functions, Functions
@node Bit functions, Logical functions, Arithmetic functions, Functions
@subsection Bit Functions
@subsection Bit Functions
...
@@ -14409,9 +14571,9 @@ mysql> select 1 && 0;
...
@@ -14409,9 +14571,9 @@ mysql> select 1 && 0;
@end example
@end example
@end table
@end table
@cindex
C
asts
@cindex
c
asts
@cindex
T
ype conversions
@cindex
t
ype conversions
@findex
C
omparison operators
@findex
c
omparison operators
@node Comparison functions, String comparison functions, Logical functions, Functions
@node Comparison functions, String comparison functions, Logical functions, Functions
@subsection Comparison Operators
@subsection Comparison Operators
...
@@ -14659,8 +14821,8 @@ mysql> select INTERVAL(22, 23, 30, 44, 200);
...
@@ -14659,8 +14821,8 @@ mysql> select INTERVAL(22, 23, 30, 44, 200);
@end example
@end example
@end table
@end table
@findex
S
tring comparison functions
@findex
s
tring comparison functions
@findex
F
unctions, string comparison
@findex
f
unctions, string comparison
@node String comparison functions, Casts, Comparison functions, Functions
@node String comparison functions, Casts, Comparison functions, Functions
@subsection String Comparison Functions
@subsection String Comparison Functions
...
@@ -14795,7 +14957,9 @@ must be created first. @xref{CREATE TABLE, , @code{CREATE TABLE}}.
...
@@ -14795,7 +14957,9 @@ must be created first. @xref{CREATE TABLE, , @code{CREATE TABLE}}.
@pxref{MySQL full-text search}.
@pxref{MySQL full-text search}.
@end table
@end table
@findex Casts
@findex casts
@cindex cast operators
@cindex oeprators, cast
@node Casts, Control flow functions, String comparison functions, Functions
@node Casts, Control flow functions, String comparison functions, Functions
@subsection Cast Operators
@subsection Cast Operators
...
@@ -14815,8 +14979,8 @@ mysql> select BINARY "a" = "A";
...
@@ -14815,8 +14979,8 @@ mysql> select BINARY "a" = "A";
@code{BINARY} was introduced in @strong{MySQL} 3.23.0.
@code{BINARY} was introduced in @strong{MySQL} 3.23.0.
@end table
@end table
@findex
C
ontrol flow functions
@findex
c
ontrol flow functions
@findex
F
unctions, control flow
@findex
f
unctions, control flow
@node Control flow functions, Mathematical functions, Casts, Functions
@node Control flow functions, Mathematical functions, Casts, Functions
@subsection Control Flow Functions
@subsection Control Flow Functions
...
@@ -14914,8 +15078,8 @@ mysql> SELECT CASE BINARY "B" when "a" then 1 when "b" then 2 END;
...
@@ -14914,8 +15078,8 @@ mysql> SELECT CASE BINARY "B" when "a" then 1 when "b" then 2 END;
@end example
@end example
@end table
@end table
@findex
M
athematical functions
@findex
m
athematical functions
@findex
F
unctions, mathematical
@findex
f
unctions, mathematical
@node Mathematical functions, String functions, Control flow functions, Functions
@node Mathematical functions, String functions, Control flow functions, Functions
@subsection Mathematical Functions
@subsection Mathematical Functions
All mathematical functions return @code{NULL} in case of an error.
All mathematical functions return @code{NULL} in case of an error.
...
@@ -15281,8 +15445,8 @@ mysql> select TRUNCATE(1.999,0);
...
@@ -15281,8 +15445,8 @@ mysql> select TRUNCATE(1.999,0);
@end example
@end example
@end table
@end table
@findex
S
tring functions
@findex
s
tring functions
@findex
F
unctions, string
@findex
f
unctions, string
@node String functions, Date and time functions, Mathematical functions, Functions
@node String functions, Date and time functions, Mathematical functions, Functions
@subsection String functions
@subsection String functions
...
@@ -15818,8 +15982,8 @@ If a string function is given a binary string as an argument, the resulting
...
@@ -15818,8 +15982,8 @@ If a string function is given a binary string as an argument, the resulting
string is also a binary string. A number converted to a string is treated as
string is also a binary string. A number converted to a string is treated as
a binary string. This only affects comparisons.
a binary string. This only affects comparisons.
@findex
D
ate and time functions
@findex
d
ate and time functions
@findex
F
unctions, date and time
@findex
f
unctions, date and time
@node Date and time functions, Miscellaneous functions, String functions, Functions
@node Date and time functions, Miscellaneous functions, String functions, Functions
@subsection Date and time functions
@subsection Date and time functions
...
@@ -16332,8 +16496,8 @@ mysql> select TIME_TO_SEC('00:39:38');
...
@@ -16332,8 +16496,8 @@ mysql> select TIME_TO_SEC('00:39:38');
@end example
@end example
@end table
@end table
@findex
M
iscellaneous functions
@findex
m
iscellaneous functions
@findex
F
unctions, miscellaneous
@findex
f
unctions, miscellaneous
@node Miscellaneous functions, Group by functions, Date and time functions, Functions
@node Miscellaneous functions, Group by functions, Date and time functions, Functions
@subsection Miscellaneous functions
@subsection Miscellaneous functions
...
@@ -16590,7 +16754,7 @@ mysql> select INET_ATON("209.207.224.40");
...
@@ -16590,7 +16754,7 @@ mysql> select INET_ATON("209.207.224.40");
@end table
@end table
@findex GROUP BY functions
@findex GROUP BY functions
@findex
F
unctions, GROUP BY
@findex
f
unctions, GROUP BY
@node Group by functions, , Miscellaneous functions, Functions
@node Group by functions, , Miscellaneous functions, Functions
@subsection Functions for use with @code{GROUP BY} clauses
@subsection Functions for use with @code{GROUP BY} clauses
...
@@ -17181,6 +17345,7 @@ For the moment you need to have @code{SELECT}, @code{UPDATE} and
...
@@ -17181,6 +17345,7 @@ For the moment you need to have @code{SELECT}, @code{UPDATE} and
All mapped tables must be in the same database as the @code{MERGE} table.
All mapped tables must be in the same database as the @code{MERGE} table.
@end itemize
@end itemize
@cindex silent column changes
@node Silent column changes, , CREATE TABLE, CREATE TABLE
@node Silent column changes, , CREATE TABLE, CREATE TABLE
@subsection Silent column specification changes
@subsection Silent column specification changes
...
@@ -17357,6 +17522,7 @@ In @strong{MySQL} 3.22 or later, you can use @code{FIRST} or @code{ADD ...
...
@@ -17357,6 +17522,7 @@ In @strong{MySQL} 3.22 or later, you can use @code{FIRST} or @code{ADD ...
AFTER col_name} to add a column at a specific position within a table row.
AFTER col_name} to add a column at a specific position within a table row.
The default is to add the column last.
The default is to add the column last.
@findex ALTER COLUMN
@item
@item
@code{ALTER COLUMN} specifies a new default value for a column
@code{ALTER COLUMN} specifies a new default value for a column
or removes the old default value.
or removes the old default value.
...
@@ -17366,6 +17532,7 @@ assigns a default value.
...
@@ -17366,6 +17532,7 @@ assigns a default value.
Default value assignment is described in
Default value assignment is described in
@ref{CREATE TABLE, , @code{CREATE TABLE}}.
@ref{CREATE TABLE, , @code{CREATE TABLE}}.
@findex DROP INDEX
@item
@item
@code{DROP INDEX} removes an index. This is a @strong{MySQL} extension to
@code{DROP INDEX} removes an index. This is a @strong{MySQL} extension to
ANSI SQL92.
ANSI SQL92.
...
@@ -17375,12 +17542,14 @@ If columns are dropped from a table, the columns are also removed from any
...
@@ -17375,12 +17542,14 @@ If columns are dropped from a table, the columns are also removed from any
index of which they are a part. If all columns that make up an index are
index of which they are a part. If all columns that make up an index are
dropped, the index is dropped as well.
dropped, the index is dropped as well.
@findex DROP PRIMARY KEY
@item
@item
@code{DROP PRIMARY KEY} drops the primary index. If no such
@code{DROP PRIMARY KEY} drops the primary index. If no such
index exists, it drops the first @code{UNIQUE} index in the table.
index exists, it drops the first @code{UNIQUE} index in the table.
(@strong{MySQL} marks the first @code{UNIQUE} key as the @code{PRIMARY KEY}
(@strong{MySQL} marks the first @code{UNIQUE} key as the @code{PRIMARY KEY}
if no @code{PRIMARY KEY} was specified explicitly.)
if no @code{PRIMARY KEY} was specified explicitly.)
@findex ALTER TABLE
@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}).
...
@@ -18963,6 +19132,8 @@ mysql> SELECT author_name,editor_name FROM author,db2.editor
...
@@ -18963,6 +19132,8 @@ mysql> SELECT author_name,editor_name FROM author,db2.editor
The @code{USE} statement is provided for Sybase compatibility.
The @code{USE} statement is provided for Sybase compatibility.
@cindex @code{mysqladmin}
@cindex @code{mysqladmin}
@cindex clearing, caches
@cindex caches, clearing
@findex FLUSH
@findex FLUSH
@node FLUSH, KILL, USE, Reference
@node FLUSH, KILL, USE, Reference
@section @code{FLUSH} syntax (clearing caches)
@section @code{FLUSH} syntax (clearing caches)
...
@@ -19079,6 +19250,7 @@ and @samp{_} wildcard characters.
...
@@ -19079,6 +19250,7 @@ and @samp{_} wildcard characters.
* SHOW CREATE TABLE::
* SHOW CREATE TABLE::
@end menu
@end menu
@cindex displaying, information, SHOW
@node SHOW DATABASE INFO, SHOW TABLE STATUS, SHOW, SHOW
@node SHOW DATABASE INFO, SHOW TABLE STATUS, SHOW, SHOW
@subsection SHOW information about database, tables, columns and index
@subsection SHOW information about database, tables, columns and index
...
@@ -19134,6 +19306,9 @@ This is updated by running @code{isamchk -a}.
...
@@ -19134,6 +19306,9 @@ This is updated by running @code{isamchk -a}.
only partly indexed. @code{NULL} if the entire key is indexed.
only partly indexed. @code{NULL} if the entire key is indexed.
@end multitable
@end multitable
@cindex displaying, table status
@cindex tables, displaying status
@cindex status, tables
@node SHOW TABLE STATUS, SHOW STATUS, SHOW DATABASE INFO, SHOW
@node SHOW TABLE STATUS, SHOW STATUS, SHOW DATABASE INFO, SHOW
@subsection SHOW status information about tables
@subsection SHOW status information about tables
...
@@ -19216,6 +19391,7 @@ below, though the format and numbers probably differ:
...
@@ -19216,6 +19391,7 @@ below, though the format and numbers probably differ:
@end example
@end example
@cindex variables, status
The status variables listed above have the following meaning:
The status variables listed above have the following meaning:
@multitable @columnfractions .35 .65
@multitable @columnfractions .35 .65
...
@@ -19471,6 +19647,7 @@ is to add indexes.)
...
@@ -19471,6 +19647,7 @@ is to add indexes.)
@c Make texi2html support index @anchor{Index cache size}. Then change
@c Make texi2html support index @anchor{Index cache size}. Then change
@c some xrefs to point here
@c some xrefs to point here
@cindex indexes, block size
@item @code{key_buffer_size}
@item @code{key_buffer_size}
Index blocks are buffered and are shared by all threads.
Index blocks are buffered and are shared by all threads.
@code{key_buffer_size} is the size of the buffer used for index blocks.
@code{key_buffer_size} is the size of the buffer used for index blocks.
...
@@ -19645,7 +19822,9 @@ closing it. See also @code{interactive_timeout}.
...
@@ -19645,7 +19822,9 @@ closing it. See also @code{interactive_timeout}.
The manual section that describes tuning @strong{MySQL} contains some
The manual section that describes tuning @strong{MySQL} contains some
information of how to tune the above variables. @xref{Server parameters}.
information of how to tune the above variables. @xref{Server parameters}.
@findex Threads
@cindex threads, display
@cindex processes, display
@findex threads
@findex PROCESSLIST
@findex PROCESSLIST
@node SHOW PROCESSLIST, SHOW GRANTS, SHOW VARIABLES, SHOW
@node SHOW PROCESSLIST, SHOW GRANTS, SHOW VARIABLES, SHOW
@subsection SHOW information about connected threads (processes)
@subsection SHOW information about connected threads (processes)
...
@@ -19657,6 +19836,7 @@ threads. Otherwise, you can see only your own threads. @xref{KILL, ,
...
@@ -19657,6 +19836,7 @@ threads. Otherwise, you can see only your own threads. @xref{KILL, ,
@code{KILL}}. If you don't use the the @code{FULL} option, then only
@code{KILL}}. If you don't use the the @code{FULL} option, then only
the first 100 characters of each query will be shown.
the first 100 characters of each query will be shown.
@cindex privileges, display
@node SHOW GRANTS, SHOW CREATE TABLE, SHOW PROCESSLIST, SHOW
@node SHOW GRANTS, SHOW CREATE TABLE, SHOW PROCESSLIST, SHOW
@subsection SHOW GRANTS (privileges) for a user
@subsection SHOW GRANTS (privileges) for a user
...
@@ -20312,6 +20492,12 @@ command when inserting an @code{AUTO_INCREMENT} value. This is mainly used
...
@@ -20312,6 +20492,12 @@ command when inserting an @code{AUTO_INCREMENT} value. This is mainly used
with the update log.
with the update log.
@end table
@end table
@cindex privileges, granting
@cindex privileges, revoking
@cindex global privileges
@cindex revoking, privleges
@cindex granting, privleges
@findex GRANT
@findex GRANT
@findex REVOKE
@findex REVOKE
@node GRANT, CREATE INDEX, SET OPTION, Reference
@node GRANT, CREATE INDEX, SET OPTION, Reference
...
@@ -20592,6 +20778,7 @@ prior to version 3.22. In 3.22 or later, @code{DROP INDEX} is mapped to an
...
@@ -20592,6 +20778,7 @@ prior to version 3.22. In 3.22 or later, @code{DROP INDEX} is mapped to an
@xref{ALTER TABLE, , @code{ALTER TABLE}}.
@xref{ALTER TABLE, , @code{ALTER TABLE}}.
@findex Comment syntax
@findex Comment syntax
@cindex comments, adding
@node Comments, CREATE FUNCTION, DROP INDEX, Reference
@node Comments, CREATE FUNCTION, DROP INDEX, Reference
@section Comment syntax
@section Comment syntax
...
@@ -20678,8 +20865,8 @@ functions}. For the UDF mechanism to work, functions must be written in C or
...
@@ -20678,8 +20865,8 @@ functions}. For the UDF mechanism to work, functions must be written in C or
C++, your operating system must support dynamic loading and you must have
C++, your operating system must support dynamic loading and you must have
compiled @code{mysqld} dynamically (not statically).
compiled @code{mysqld} dynamically (not statically).
@cindex
K
eywords
@cindex
k
eywords
@cindex
R
eserved words
@cindex
r
eserved words
@cindex Reserved words, exceptions
@cindex Reserved words, exceptions
@node Reserved words, , CREATE FUNCTION, Reference
@node Reserved words, , CREATE FUNCTION, Reference
@section Is MySQL picky about reserved words?
@section Is MySQL picky about reserved words?
...
@@ -20791,7 +20978,7 @@ used them.
...
@@ -20791,7 +20978,7 @@ used them.
@item @code{TIMESTAMP}
@item @code{TIMESTAMP}
@end itemize
@end itemize
@cindex
T
able types, Choosing
@cindex
t
able types, Choosing
@cindex BDB table type
@cindex BDB table type
@cindex Berkeley_db table type
@cindex Berkeley_db table type
@cindex ISAM table type
@cindex ISAM table type
...
@@ -20799,6 +20986,7 @@ used them.
...
@@ -20799,6 +20986,7 @@ used them.
@cindex MERGE table type
@cindex MERGE table type
@cindex MySQL table types
@cindex MySQL table types
@cindex MyISAM table type
@cindex MyISAM table type
@cindex types, of tables
@node Table types, Tutorial, Reference, Top
@node Table types, Tutorial, Reference, Top
@chapter MySQL table types
@chapter MySQL table types
...
@@ -20963,6 +21151,7 @@ data into compressed index.
...
@@ -20963,6 +21151,7 @@ data into compressed index.
* MyISAM table formats:: MyISAM table formats
* MyISAM table formats:: MyISAM table formats
@end menu
@end menu
@cindex key space, MyISAM
@node Key space, MyISAM table formats, MyISAM, MyISAM
@node Key space, MyISAM table formats, MyISAM, MyISAM
@subsection Space needed for keys
@subsection Space needed for keys
...
@@ -21037,6 +21226,8 @@ system.
...
@@ -21037,6 +21226,8 @@ system.
Usually requires more disk space than dynamic tables.
Usually requires more disk space than dynamic tables.
@end itemize
@end itemize
@cindex dynamic table characteristics
@cindex tables, dynamic
@node Dynamic format, Compressed format, Static format, MyISAM table formats
@node Dynamic format, Compressed format, Static format, MyISAM table formats
@subsubsection Dynamic table characteristics
@subsubsection Dynamic table characteristics
...
@@ -21098,6 +21289,7 @@ If not, there will be another link. You may check how many links there are
...
@@ -21098,6 +21289,7 @@ If not, there will be another link. You may check how many links there are
with @code{myisamchk -ed}. All links may be removed with @code{myisamchk -r}.
with @code{myisamchk -ed}. All links may be removed with @code{myisamchk -r}.
@end itemize
@end itemize
@cindex tables, compressed format
@node Compressed format, , Dynamic format, MyISAM table formats
@node Compressed format, , Dynamic format, MyISAM table formats
@subsubsection Compressed table characteristics
@subsubsection Compressed table characteristics
...
@@ -21143,6 +21335,8 @@ columns.
...
@@ -21143,6 +21335,8 @@ columns.
Can be uncompressed with @code{myisamchk}.
Can be uncompressed with @code{myisamchk}.
@end itemize
@end itemize
@cindex tables, merging
@cindex MERGE tables, defined
@node MERGE, ISAM, MyISAM, Table types
@node MERGE, ISAM, MyISAM, Table types
@section MERGE tables
@section MERGE tables
...
@@ -21272,6 +21466,7 @@ specification or change the @code{.MRG} file and issue a @code{FLUSH
...
@@ -21272,6 +21466,7 @@ specification or change the @code{.MRG} file and issue a @code{FLUSH
TABLE} on the @code{MERGE} table and all underlying tables to force the
TABLE} on the @code{MERGE} table and all underlying tables to force the
handler to read the new definition file.
handler to read the new definition file.
@cindex tables, ISAM
@node ISAM, HEAP, MERGE, Table types
@node ISAM, HEAP, MERGE, Table types
@section ISAM tables
@section ISAM tables
...
@@ -21305,6 +21500,7 @@ tables are:
...
@@ -21305,6 +21500,7 @@ tables are:
@item Tables are compressed with @code{pack_isam} rather than with @code{myisampack}.
@item Tables are compressed with @code{pack_isam} rather than with @code{myisampack}.
@end itemize
@end itemize
@cindex tables, HEAP
@node HEAP, BDB, ISAM, Table types
@node HEAP, BDB, ISAM, Table types
@section HEAP tables
@section HEAP tables
...
@@ -21382,6 +21578,7 @@ SUM_OVER_ALL_KEYS(max_length_of_key + sizeof(char*) * 2)
...
@@ -21382,6 +21578,7 @@ SUM_OVER_ALL_KEYS(max_length_of_key + sizeof(char*) * 2)
@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.
@cindex tables, BDB
@node BDB, , HEAP, Table types
@node BDB, , HEAP, Table types
@section BDB or Berkeley_db tables
@section BDB or Berkeley_db tables
...
@@ -21504,6 +21701,10 @@ the tables without a primary key.
...
@@ -21504,6 +21701,10 @@ the tables without a primary key.
tables.
tables.
@end itemize
@end itemize
@cindex tutorial
@cindex terminal monitor, defined
@cindex monitor, terminal
@cindex options, provided by @strong{MySQL}
@node Tutorial, Server, Table types, Top
@node Tutorial, Server, Table types, Top
@chapter MySQL Tutorial
@chapter MySQL Tutorial
...
@@ -21548,6 +21749,10 @@ Because this chapter is tutorial in nature, many details are necessarily left
...
@@ -21548,6 +21749,10 @@ Because this chapter is tutorial in nature, many details are necessarily left
out. Consult the relevant sections of the manual for more
out. Consult the relevant sections of the manual for more
information on the topics covered here.
information on the topics covered here.
@cindex connecting, to the server
@cindex disconnecting, from the server
@cindex server, connecting
@cindex server, disconnecting
@node Connecting-disconnecting, Entering queries, Tutorial, Tutorial
@node Connecting-disconnecting, Entering queries, Tutorial, Tutorial
@section Connecting to and disconnecting from the server
@section Connecting to and disconnecting from the server
...
@@ -21606,6 +21811,9 @@ You can also disconnect by typing Control-D.
...
@@ -21606,6 +21811,9 @@ You can also disconnect by typing Control-D.
Most examples in the following sections assume you are connected to the
Most examples in the following sections assume you are connected to the
server. They indicate this by the @code{mysql>} prompt.
server. They indicate this by the @code{mysql>} prompt.
@cindex running, queries
@cindex queries, entering
@cindex entering, queries
@node Entering queries, Examples, Connecting-disconnecting, Tutorial
@node Entering queries, Examples, Connecting-disconnecting, Tutorial
@section Entering queries
@section Entering queries
...
@@ -21747,6 +21955,7 @@ for a new command.
...
@@ -21747,6 +21955,7 @@ for a new command.
The following table shows each of the prompts you may see and summarizes what
The following table shows each of the prompts you may see and summarizes what
they mean about the state that @code{mysql} is in:
they mean about the state that @code{mysql} is in:
@cindex prompts, meanings
@multitable @columnfractions .10 .9
@multitable @columnfractions .10 .9
@item @strong{Prompt} @tab @strong{Meaning}
@item @strong{Prompt} @tab @strong{Meaning}
@item @code{mysql>} @tab Ready for new command
@item @code{mysql>} @tab Ready for new command
...
@@ -21827,6 +22036,8 @@ containing @code{QUIT}! This can be quite confusing, especially if you
...
@@ -21827,6 +22036,8 @@ containing @code{QUIT}! This can be quite confusing, especially if you
don't know that you need to supply the terminating quote before you can
don't know that you need to supply the terminating quote before you can
cancel the current command.
cancel the current command.
@cindex queries, examples
@cindex examples, queries
@node Examples, Searching on two keys, Entering queries, Tutorial
@node Examples, Searching on two keys, Entering queries, Tutorial
@section Examples of common queries
@section Examples of common queries
...
@@ -22033,6 +22244,8 @@ GROUP BY article;
...
@@ -22033,6 +22244,8 @@ GROUP BY article;
The last example can of course be made a bit more efficient by doing the
The last example can of course be made a bit more efficient by doing the
splitting of the concatenated column in the client.
splitting of the concatenated column in the client.
@cindex foreign keys
@cindex keys, foreign
@node example-Foreign keys, , example-Maximum-column-group-row, Examples
@node example-Foreign keys, , example-Maximum-column-group-row, Examples
@subsection Using foreign keys
@subsection Using foreign keys
...
@@ -22114,6 +22327,8 @@ SELECT s.* FROM persons p, shirts s
...
@@ -22114,6 +22327,8 @@ SELECT s.* FROM persons p, shirts s
@end example
@end example
@findex UNION
@findex UNION
@cindex searching, two keys
@cindex keys, searching on two
@node Searching on two keys, Database use, Examples, Tutorial
@node Searching on two keys, Database use, Examples, Tutorial
@section Searching on two keys
@section Searching on two keys
...
@@ -22146,6 +22361,9 @@ DROP TABLE tmp;
...
@@ -22146,6 +22361,9 @@ DROP TABLE tmp;
The above way to solve this query is in effect an @code{UNION} of two queries.
The above way to solve this query is in effect an @code{UNION} of two queries.
@cindex databases, creating
@cindex databases, using
@cindex creating, databases
@node Database use, Getting information, Searching on two keys, Tutorial
@node Database use, Getting information, Searching on two keys, Tutorial
@section Creating and using a database
@section Creating and using a database
...
@@ -22230,6 +22448,8 @@ mysql> GRANT ALL ON menagerie.* TO your_mysql_name;
...
@@ -22230,6 +22448,8 @@ mysql> GRANT ALL ON menagerie.* TO your_mysql_name;
where @code{your_mysql_name} is the @strong{MySQL} user name assigned to
where @code{your_mysql_name} is the @strong{MySQL} user name assigned to
you.
you.
@cindex selecting, databases
@cindex databases, selecting
@node Creating database, Creating tables, Database use, Database use
@node Creating database, Creating tables, Database use, Database use
@subsection Creating and selecting a database
@subsection Creating and selecting a database
...
@@ -22275,6 +22495,8 @@ option, you must do so with no intervening space (e.g., as
...
@@ -22275,6 +22495,8 @@ option, you must do so with no intervening space (e.g., as
password on the command line is not recommended, because doing so exposes it
password on the command line is not recommended, because doing so exposes it
to snooping by other users logged in on your machine.
to snooping by other users logged in on your machine.
@cindex tables, creating
@cindex creating, tables
@node Creating tables, Loading tables, Creating database, Database use
@node Creating tables, Loading tables, Creating database, Database use
@subsection Creating a table
@subsection Creating a table
...
@@ -22377,6 +22599,9 @@ mysql> DESCRIBE pet;
...
@@ -22377,6 +22599,9 @@ mysql> DESCRIBE pet;
You can use @code{DESCRIBE} any time, for example, if you forget the names of
You can use @code{DESCRIBE} any time, for example, if you forget the names of
the columns in your table or what types they are.
the columns in your table or what types they are.
@cindex loading, tables
@cindex tables, loading data
@cindex data, loading into tables
@node Loading tables, Retrieving data, Creating tables, Database use
@node Loading tables, Retrieving data, Creating tables, Database use
@subsection Loading data into a table
@subsection Loading data into a table
...
@@ -22447,6 +22672,10 @@ typing involved to load
...
@@ -22447,6 +22672,10 @@ typing involved to load
your records initially using several @code{INSERT} statements rather
your records initially using several @code{INSERT} statements rather
than a single @code{LOAD DATA} statement.
than a single @code{LOAD DATA} statement.
@cindex data, retrieving
@cindex tables, retrieving data
@cindex retrieving, data from tables
@cindex unloading, tables
@node Retrieving data, Multiple tables, Loading tables, Database use
@node Retrieving data, Multiple tables, Loading tables, Database use
@subsection Retrieving information from a table
@subsection Retrieving information from a table
...
@@ -22534,6 +22763,8 @@ case you specify some constraints on the information you want. Let's look at
...
@@ -22534,6 +22763,8 @@ case you specify some constraints on the information you want. Let's look at
some selection queries in terms of questions about your pets that they
some selection queries in terms of questions about your pets that they
answer.
answer.
@cindex rows, selecting
@cindex tables, selecting rows
@node Selecting rows, Selecting columns, Selecting all, Retrieving data
@node Selecting rows, Selecting columns, Selecting all, Retrieving data
@subsubsection Selecting particular rows
@subsubsection Selecting particular rows
...
@@ -22609,6 +22840,8 @@ mysql> SELECT * FROM pet WHERE (species = "cat" AND sex = "m")
...
@@ -22609,6 +22840,8 @@ mysql> SELECT * FROM pet WHERE (species = "cat" AND sex = "m")
+-------+--------+---------+------+------------+-------+
+-------+--------+---------+------+------------+-------+
@end example
@end example
@cindex columns, selecting
@cindex tables, selecting columns
@node Selecting columns, Sorting rows, Selecting rows, Retrieving data
@node Selecting columns, Sorting rows, Selecting rows, Retrieving data
@subsubsection Selecting particular columns
@subsubsection Selecting particular columns
...
@@ -22690,6 +22923,10 @@ mysql> SELECT name, species, birth FROM pet
...
@@ -22690,6 +22923,10 @@ mysql> SELECT name, species, birth FROM pet
+--------+---------+------------+
+--------+---------+------------+
@end example
@end example
@cindex rows, sorting
@cindex sorting, table rows
@cindex sorting, data
@cindex tabls, sorting rows
@node Sorting rows, Date calculations, Selecting columns, Retrieving data
@node Sorting rows, Date calculations, Selecting columns, Retrieving data
@subsubsection Sorting rows
@subsubsection Sorting rows
...
@@ -22762,6 +22999,10 @@ Note that the @code{DESC} keyword applies only to the column name immediately
...
@@ -22762,6 +22999,10 @@ Note that the @code{DESC} keyword applies only to the column name immediately
preceding it (@code{birth}); @code{species} values are still sorted in
preceding it (@code{birth}); @code{species} values are still sorted in
ascending order.
ascending order.
@cindex date calculations
@cindex calculating, dates
@cindex extracting, dates
@cindex age, calculating
@node Date calculations, Working with NULL, Sorting rows, Retrieving data
@node Date calculations, Working with NULL, Sorting rows, Retrieving data
@subsubsection Date calculations
@subsubsection Date calculations
...
@@ -22930,6 +23171,8 @@ Note that @code{MONTH} return a number between 1 and 12. And
...
@@ -22930,6 +23171,8 @@ Note that @code{MONTH} return a number between 1 and 12. And
addition has to be after the @code{MOD()} oterwise we would go from
addition has to be after the @code{MOD()} oterwise we would go from
November (11) to January (1).
November (11) to January (1).
@findex NULL
@cindex NULL value
@node Working with NULL, Pattern matching, Date calculations, Retrieving data
@node Working with NULL, Pattern matching, Date calculations, Retrieving data
@subsubsection Working with @code{NULL} values
@subsubsection Working with @code{NULL} values
...
@@ -22966,6 +23209,9 @@ This special treatment of @code{NULL} is why, in the previous section, it
...
@@ -22966,6 +23209,9 @@ This special treatment of @code{NULL} is why, in the previous section, it
was necessary to determine which animals are no longer alive using
was necessary to determine which animals are no longer alive using
@code{death IS NOT NULL} instead of @code{death != NULL}.
@code{death IS NOT NULL} instead of @code{death != NULL}.
@cindex pattern matching
@cindex matching, patterns
@cindex expressions, extended
@node Pattern matching, Counting rows, Working with NULL, Retrieving data
@node Pattern matching, Counting rows, Working with NULL, Retrieving data
@subsubsection Pattern matching
@subsubsection Pattern matching
...
@@ -23144,6 +23390,9 @@ mysql> SELECT * FROM pet WHERE name REGEXP "^.@{5@}$";
...
@@ -23144,6 +23390,9 @@ mysql> SELECT * FROM pet WHERE name REGEXP "^.@{5@}$";
+-------+--------+---------+------+------------+-------+
+-------+--------+---------+------+------------+-------+
@end example
@end example
@cindex rows, counting
@cindex tables, counting rows
@cindex counting, table rows
@node Counting rows, , Pattern matching, Retrieving data
@node Counting rows, , Pattern matching, Retrieving data
@subsubsection Counting rows
@subsubsection Counting rows
...
@@ -23279,6 +23528,7 @@ mysql> SELECT species, sex, COUNT(*) FROM pet
...
@@ -23279,6 +23528,7 @@ mysql> SELECT species, sex, COUNT(*) FROM pet
+---------+------+----------+
+---------+------+----------+
@end example
@end example
@cindex tables, multiple
@node Multiple tables, , Retrieving data, Database use
@node Multiple tables, , Retrieving data, Database use
@subsection Using more than one table
@subsection Using more than one table
...
@@ -23399,9 +23649,13 @@ In this query, we specify aliases for the table name in order to be able
...
@@ -23399,9 +23649,13 @@ In this query, we specify aliases for the table name in order to be able
to refer to the columns and keep straight which instance of the table
to refer to the columns and keep straight which instance of the table
each column reference is associated with.
each column reference is associated with.
@cindex databases, information about
@cindex tables, information about
@findex DESCRIBE
@node Getting information, Batch mode, Database use, Tutorial
@node Getting information, Batch mode, Database use, Tutorial
@section Getting information about databases and tables
@section Getting information about databases and tables
What if you forget the name of a database or table, or what the structure of
What if you forget the name of a database or table, or what the structure of
a given table is (e.g., what its columns are called)? @strong{MySQL}
a given table is (e.g., what its columns are called)? @strong{MySQL}
addresses this problem through several statements that provide information
addresses this problem through several statements that provide information
...
@@ -23460,6 +23714,11 @@ indexed and @code{Default} specifies the column's default value.
...
@@ -23460,6 +23714,11 @@ indexed and @code{Default} specifies the column's default value.
If you have indexes on a table,
If you have indexes on a table,
@code{SHOW INDEX FROM tbl_name} produces information about them.
@code{SHOW INDEX FROM tbl_name} produces information about them.
@cindex modes, batch
@cindex batch mode
@cindex running, batch mode
@cindex script files
@cindex files, script
@node Batch mode, Twin, Getting information, Tutorial
@node Batch mode, Twin, Getting information, Tutorial
@section Using @code{mysql} in batch mode
@section Using @code{mysql} in batch mode
...
@@ -23556,6 +23815,8 @@ If you want to get the interactive output format in batch mode, use
...
@@ -23556,6 +23815,8 @@ If you want to get the interactive output format in batch mode, use
@code{mysql -t}. To echo to the output the commands that are executed, use
@code{mysql -t}. To echo to the output the commands that are executed, use
@code{mysql -vvv}.
@code{mysql -vvv}.
@cindex Twin Studies, queries
@cindex queries, Twin Studeis project
@node Twin, , Batch mode, Tutorial
@node Twin, , Batch mode, Tutorial
@section Queries from twin project
@section Queries from twin project
...
@@ -23745,7 +24006,8 @@ group by
...
@@ -23745,7 +24006,8 @@ group by
@end example
@end example
@cindex Server functions
@cindex functions, server
@cindex server functions
@node Server, Replication, Tutorial, Top
@node Server, Replication, Tutorial, Top
@chapter MySQL server functions
@chapter MySQL server functions
...
@@ -23754,8 +24016,10 @@ group by
...
@@ -23754,8 +24016,10 @@ group by
* Table size:: How big @strong{MySQL} tables can be
* Table size:: How big @strong{MySQL} tables can be
@end menu
@end menu
@cindex Which languages @strong{MySQL} supports
@cindex error messages, languages
@cindex Language support
@cindex messages, languages
@cindex files, erroe messages
@cindex language support
@node Languages, Table size, Server, Server
@node Languages, Table size, Server, Server
@section What languages are supported by MySQL?
@section What languages are supported by MySQL?
...
@@ -23799,6 +24063,9 @@ your changes with the new @file{errmsg.txt} file.
...
@@ -23799,6 +24063,9 @@ your changes with the new @file{errmsg.txt} file.
* Multi-byte characters:: Multi-byte character support
* Multi-byte characters:: Multi-byte character support
@end menu
@end menu
@cindex character sets
@cindex data, character sets
@cindex sorting, character sets
@node Character sets, Adding character set, Languages, Languages
@node Character sets, Adding character set, Languages, Languages
@subsection The character set used for data and sorting
@subsection The character set used for data and sorting
...
@@ -23852,6 +24119,8 @@ but normally this is never needed.
...
@@ -23852,6 +24119,8 @@ but normally this is never needed.
To add another character set to @strong{MySQL}, use the following procedure:
To add another character set to @strong{MySQL}, use the following procedure:
@cindex character sets, adding
@cindex adding, character sets
@node Adding character set, String collating, Character sets, Languages
@node Adding character set, String collating, Character sets, Languages
@subsection Adding a new character set
@subsection Adding a new character set
...
@@ -23966,7 +24235,8 @@ Add the character set name to the @code{CHARSETS_AVAILABLE} and
...
@@ -23966,7 +24235,8 @@ Add the character set name to the @code{CHARSETS_AVAILABLE} and
Reconfigure, recompile and test.
Reconfigure, recompile and test.
@end enumerate
@end enumerate
@cindex String collating
@cindex collating, strings
@cindex string collating
@node String collating, Multi-byte characters, Adding character set, Languages
@node String collating, Multi-byte characters, Adding character set, Languages
@subsection String collating support
@subsection String collating support
...
@@ -23983,7 +24253,8 @@ special comment at the top of the file. @code{N} should be set to
...
@@ -23983,7 +24253,8 @@ special comment at the top of the file. @code{N} should be set to
the maximum ratio the strings may grow during my_strxfrm_MYSET (it
the maximum ratio the strings may grow during my_strxfrm_MYSET (it
must be a positive integer).
must be a positive integer).
@cindex Multi-byte characters
@cindex characters, multi-byte
@cindex multi-byte characters
@node Multi-byte characters, , String collating, Languages
@node Multi-byte characters, , String collating, Languages
@subsection Multi-byte character support
@subsection Multi-byte character support
...
@@ -23998,8 +24269,11 @@ You must specify the @code{mbmaxlen_MYSET=N} value in the
...
@@ -23998,8 +24269,11 @@ You must specify the @code{mbmaxlen_MYSET=N} value in the
special comment at the top of the file. @code{N} should be set to
special comment at the top of the file. @code{N} should be set to
the size in bytes of the largest character in the set.
the size in bytes of the largest character in the set.
@cindex Table size
@cindex tables, maximum size
@cindex Size of tables
@cindex size of tables
@cindex oerating systems, file size limits
@cindex limits, file size
@cindex files, size limits
@node Table size, , Languages, Server
@node Table size, , Languages, Server
@section How big MySQL tables can be
@section How big MySQL tables can be
...
@@ -24045,7 +24319,10 @@ Another solution can be the included MERGE library, which allows you to
...
@@ -24045,7 +24319,10 @@ Another solution can be the included MERGE library, which allows you to
handle a collection of identical tables as one. @xref{MERGE, MERGE
handle a collection of identical tables as one. @xref{MERGE, MERGE
tables}.
tables}.
@cindex Replication
@cindex replication
@cindex increasing, speed
@cindex speed, increasing
@cindex databases, replicating
@node Replication, Performance, Server, Top
@node Replication, Performance, Server, Top
@chapter Replication in MySQL
@chapter Replication in MySQL
@menu
@menu
...
@@ -24083,6 +24360,7 @@ database should be done through the master!
...
@@ -24083,6 +24360,7 @@ database should be done through the master!
On older servers one can use the update log to do simple replication.
On older servers one can use the update log to do simple replication.
@xref{Log Replication}.
@xref{Log Replication}.
@cindex master-slave setup
@node Replication Implementation, Replication HOWTO, Replication Intro, Replication
@node Replication Implementation, Replication HOWTO, Replication Intro, Replication
@section Replication Implementation Overview
@section Replication Implementation Overview
...
@@ -24149,6 +24427,9 @@ replacting the values in <> with what is relevant to your system.
...
@@ -24149,6 +24427,9 @@ replacting the values in <> with what is relevant to your system.
After you have done the above, the master and the slave(s) should be in
After you have done the above, the master and the slave(s) should be in
sync.
sync.
@cindex options, replication
@cindex my.cnf file
@cindex files, my.cnf
@node Replication Features, Replication Options, Replication HOWTO, Replication
@node Replication Features, Replication Options, Replication HOWTO, Replication
@section Replication Features
@section Replication Features
...
@@ -24334,6 +24615,9 @@ to the binary log
...
@@ -24334,6 +24615,9 @@ to the binary log
@end multitable
@end multitable
@cindex SQL commands, replication
@cindex commans, replication
@cindex replication, commands
@node Replication SQL, Replication FAQ, Replication Options, Replication
@node Replication SQL, Replication FAQ, Replication Options, Replication
@section SQL commands related to replication
@section SQL commands related to replication
...
@@ -24406,6 +24690,7 @@ command line. (Slave)
...
@@ -24406,6 +24690,7 @@ command line. (Slave)
@node Replication FAQ, , Replication SQL, Replication
@node Replication FAQ, , Replication SQL, Replication
@section Replication FAQ
@section Replication FAQ
@cindex Binlog_Dump
@strong{Q}: Why do I sometimes see more than one @code{Binlog_Dump} thread on
@strong{Q}: Why do I sometimes see more than one @code{Binlog_Dump} thread on
the master after I have restarted the slave?
the master after I have restarted the slave?
...
@@ -24437,6 +24722,7 @@ Once we add @strong{server_id} variable for each server that
...
@@ -24437,6 +24722,7 @@ Once we add @strong{server_id} variable for each server that
participates in replication, we will fix @code{Binlog_Dump} thread to
participates in replication, we will fix @code{Binlog_Dump} thread to
kill all the zombies from the same slave on reconnect.
kill all the zombies from the same slave on reconnect.
@cindex replication, two-way
@strong{Q}: What issues should I be aware of when setting up two-way
@strong{Q}: What issues should I be aware of when setting up two-way
replication?
replication?
...
@@ -24467,6 +24753,8 @@ lock contention, because the updates originating on another server will
...
@@ -24467,6 +24753,8 @@ lock contention, because the updates originating on another server will
be serialized in one slave thread. This benefit, though, might be
be serialized in one slave thread. This benefit, though, might be
offset by network delays.
offset by network delays.
@cindex performance, improving
@cindex increasing, performance
@strong{Q}: How can I use replication to improve performance of my system?
@strong{Q}: How can I use replication to improve performance of my system?
@strong{A}: You should set up one server as the master, and direct all
@strong{A}: You should set up one server as the master, and direct all
...
@@ -24625,8 +24913,8 @@ system into @strong{MySQL}, but until it is ready, you will have to
...
@@ -24625,8 +24913,8 @@ system into @strong{MySQL}, but until it is ready, you will have to
create your own monitoring tools .
create your own monitoring tools .
@cindex
Performance
@cindex
performance, maximizing
@cindex
O
ptimization
@cindex
o
ptimization
@node Performance, MySQL Benchmarks, Replication, Top
@node Performance, MySQL Benchmarks, Replication, Top
@chapter Getting maximum performance from MySQL
@chapter Getting maximum performance from MySQL
...
@@ -24685,6 +24973,9 @@ memory bandwidth becomes a bottleneck. This is an uncommon bottleneck
...
@@ -24685,6 +24973,9 @@ memory bandwidth becomes a bottleneck. This is an uncommon bottleneck
for most systems but one should be aware of it.
for most systems but one should be aware of it.
@end itemize
@end itemize
@cindex compiling, optimizing
@cindex system optimization
@cindex startup parameters, tuning
@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
...
@@ -24704,6 +24995,7 @@ released (XFS/Reiserfs).
...
@@ -24704,6 +24995,7 @@ released (XFS/Reiserfs).
Because we have not run @strong{MySQL} in production on that many platforms we
Because we have not run @strong{MySQL} in production on that many platforms we
advice you to test your intended platform before choosing it, if possible.
advice you to test your intended platform before choosing it, if possible.
@cindex locking
Other tips:
Other tips:
@itemize @bullet
@itemize @bullet
@item
@item
...
@@ -24750,6 +25042,11 @@ Most of the following tests are done on Linux with the
...
@@ -24750,6 +25042,11 @@ Most of the following tests are done on Linux with the
@strong{MySQL} benchmarks, but they should give some indication for
@strong{MySQL} benchmarks, but they should give some indication for
other operating systems and workloads.
other operating systems and workloads.
@cindex linking, speed
@cindex compiling, speed
@cindex speed, compiling
@cindex speed, linking
You get the fastest executable when you link with @code{-static}.
You get the fastest executable when you link with @code{-static}.
On Linux, you will get the fastest code when compiling with @code{pgcc}
On Linux, you will get the fastest code when compiling with @code{pgcc}
...
@@ -24809,7 +25106,8 @@ meantime, if you have a non-AMD machine, you can get a faster binary by
...
@@ -24809,7 +25106,8 @@ meantime, if you have a non-AMD machine, you can get a faster binary by
compiling with @code{pgcc}. The standard MySqL Linux binary is linked
compiling with @code{pgcc}. The standard MySqL Linux binary is linked
statically to get it faster and more portable.
statically to get it faster and more portable.
@cindex disk issues
@cindex performance, disk issues
@node Disk issues, Server parameters, Compile and link options, System
@node Disk issues, Server parameters, Compile and link options, System
@subsection Disk issues
@subsection Disk issues
...
@@ -24831,6 +25129,7 @@ This means that you symlink the index and/or data file(s) from the
...
@@ -24831,6 +25129,7 @@ This means that you symlink the index and/or data file(s) from the
normal data directory to another disk (that may also be striped). This
normal data directory to another disk (that may also be striped). This
makes both the seek and read times better (if the disks are not used for
makes both the seek and read times better (if the disks are not used for
other things). @xref{Symbolic links}.
other things). @xref{Symbolic links}.
@cindex striping, defined
@item Striping
@item Striping
Striping means that you have many disks and put the first block on the
Striping means that you have many disks and put the first block on the
first disk, the second block on the second disk, and the Nth on the (Nth
first disk, the second block on the second disk, and the Nth on the (Nth
...
@@ -24891,6 +25190,10 @@ with the noatime flag.
...
@@ -24891,6 +25190,10 @@ with the noatime flag.
* Symbolic links:: Using symbolic links for databases and tables
* Symbolic links:: Using symbolic links for databases and tables
@end menu
@end menu
@cindex symbolic links
@cindex links, symbolic
@cindex databases, symbolic links
@cindex tables, symbolic links
@node Symbolic links, , Disk issues, Disk issues
@node Symbolic links, , Disk issues, Disk issues
@subsubsection Using symbolic links for databases and tables
@subsubsection Using symbolic links for databases and tables
...
@@ -24939,7 +25242,10 @@ On windows you can use internal symbolic links to directories by compiling
...
@@ -24939,7 +25242,10 @@ On windows you can use internal symbolic links to directories by compiling
@strong{MySQL} with @code{-DUSE_SYMDIR}. This allows you to put different
@strong{MySQL} with @code{-DUSE_SYMDIR}. This allows you to put different
databases on different disks. @xref{Windows symbolic links}.
databases on different disks. @xref{Windows symbolic links}.
@cindex Startup parameters
@cindex parameters, server
@cindex mysqld server, buffer sizes
@cindex buffer sizes, mysqld server
@cindex startup parameters
@node Server parameters, Table cache, Disk issues, System
@node Server parameters, Table cache, Disk issues, System
@subsection Tuning server parameters
@subsection Tuning server parameters
...
@@ -24950,6 +25256,8 @@ with this command:
...
@@ -24950,6 +25256,8 @@ with this command:
shell> mysqld --help
shell> mysqld --help
@end example
@end example
@cindex mysqld options
@cindex variables, mysqld
This command produces a list of all @code{mysqld} options and configurable
This command produces a list of all @code{mysqld} options and configurable
variables. The output includes the default values and looks something
variables. The output includes the default values and looks something
like this:
like this:
...
@@ -25067,7 +25375,11 @@ Make sure that the @code{--help} option is last; otherwise, the effect of any
...
@@ -25067,7 +25375,11 @@ Make sure that the @code{--help} option is last; otherwise, the effect of any
options listed after it on the command line will not be reflected in the
options listed after it on the command line will not be reflected in the
output.
output.
@cindex Table cache
@cindex tables, opening
@cindex tables, closing
@cindex opening, tables
@cindex closing, tables
@cindex table cache
@findex table_cache
@findex table_cache
@node Table cache, Creating many tables, Server parameters, System
@node Table cache, Creating many tables, Server parameters, System
@subsection How MySQL opens and closes tables
@subsection How MySQL opens and closes tables
...
@@ -25121,6 +25433,7 @@ variable @code{opened_tables}. If this is quite big, even if you
...
@@ -25121,6 +25433,7 @@ variable @code{opened_tables}. If this is quite big, even if you
haven't done alot of @code{FLUSH TABLES}, you should increase your table
haven't done alot of @code{FLUSH TABLES}, you should increase your table
cache. @xref{SHOW STATUS}.
cache. @xref{SHOW STATUS}.
@cindex tabls, too many
@node Creating many tables, Open tables, Table cache, System
@node Creating many tables, Open tables, Table cache, System
@subsection Drawbacks of creating large numbers of tables in the same database
@subsection Drawbacks of creating large numbers of tables in the same database
...
@@ -25130,6 +25443,8 @@ there will be a little overhead when the table cache is full, because for
...
@@ -25130,6 +25443,8 @@ there will be a little overhead when the table cache is full, because for
every table that has to be opened, another must be closed. You can reduce
every table that has to be opened, another must be closed. You can reduce
this overhead by making the table cache larger.
this overhead by making the table cache larger.
@cindex tables, open
@cindex open tables
@node Open tables, Memory use, Creating many tables, System
@node Open tables, Memory use, Creating many tables, System
@subsection Why so many open tables?
@subsection Why so many open tables?
...
@@ -25148,7 +25463,7 @@ each concurrent thread. This takes some memory and one extra file
...
@@ -25148,7 +25463,7 @@ each concurrent thread. This takes some memory and one extra file
descriptor for the data file. The index file descriptor is shared
descriptor for the data file. The index file descriptor is shared
between all threads.
between all threads.
@cindex
M
emory use
@cindex
m
emory use
@node Memory use, Internal locking, Open tables, System
@node Memory use, Internal locking, Open tables, System
@subsection How MySQL uses memory
@subsection How MySQL uses memory
...
@@ -25250,6 +25565,9 @@ checking available swap with @code{swap -s}. We have tested
...
@@ -25250,6 +25565,9 @@ checking available swap with @code{swap -s}. We have tested
@code{mysqld} with commercial memory-leakage detectors, so there should
@code{mysqld} with commercial memory-leakage detectors, so there should
be no memory leaks.
be no memory leaks.
@cindex internal locking
@cindex locking, tables
@cindex tables, locking
@node Internal locking, Table locking, Memory use, System
@node Internal locking, Table locking, Memory use, System
@subsection How MySQL locks tables
@subsection How MySQL locks tables
...
@@ -25305,6 +25623,7 @@ You could also change the locking code in @file{mysys/thr_lock.c} to use a
...
@@ -25305,6 +25623,7 @@ You could also change the locking code in @file{mysys/thr_lock.c} to use a
single queue. In this case, write locks and read locks would have the same
single queue. In this case, write locks and read locks would have the same
priority, which might help some applications.
priority, which might help some applications.
@cindex problems, table locking
@node Table locking, , Internal locking, System
@node Table locking, , Internal locking, System
@subsection Table locking issues
@subsection Table locking issues
...
@@ -25403,6 +25722,11 @@ If you have problems with @code{SELECT} and @code{DELETE}, the @code{LIMIT}
...
@@ -25403,6 +25722,11 @@ If you have problems with @code{SELECT} and @code{DELETE}, the @code{LIMIT}
option to @code{DELETE} may help. @xref{DELETE, , @code{DELETE}}.
option to @code{DELETE} may help. @xref{DELETE, , @code{DELETE}}.
@end itemize
@end itemize
@cindex data, size
@cindex reducing, data size
@cindex storage space, minimizing
@cindex tables, improving performance
@cindex performance, improving
@node Data size, MySQL indexes, System, Performance
@node Data size, MySQL indexes, System, Performance
@section Get your data as small as possible
@section Get your data as small as possible
...
@@ -25463,6 +25787,7 @@ format table and it is possible to use a smaller static format table that
...
@@ -25463,6 +25787,7 @@ 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
@cindexindexes, uses for
@node MySQL indexes, Query Speed, Data size, Performance
@node MySQL indexes, Query Speed, Data size, Performance
@section How @strong{MySQL} uses indexes
@section How @strong{MySQL} uses indexes
...
@@ -25633,6 +25958,9 @@ part of the rows, @strong{MySQL} will use an index anyway as it can this
...
@@ -25633,6 +25958,9 @@ part of the rows, @strong{MySQL} will use an index anyway as it can this
way much more quickly find the few rows to return in the result.
way much more quickly find the few rows to return in the result.
@end itemize
@end itemize
@cindex queries, speed of
@cindex permission checks, effect on speed
@cindex speed, of queries
@node Query Speed, Tips, MySQL indexes, Performance
@node Query Speed, Tips, MySQL indexes, Performance
@section Speed of queries that access or update data
@section Speed of queries that access or update data
...
@@ -25675,6 +26003,9 @@ great tool to find out if this is a problem with your query.
...
@@ -25675,6 +26003,9 @@ great tool to find out if this is a problem with your query.
* Delete speed:: Speed of @code{DELETE} queries
* Delete speed:: Speed of @code{DELETE} queries
@end menu
@end menu
@cindex estimating, query performance
@cindex queries, estimating performance
@cindex performance, estimating
@node Estimating performance, SELECT speed, Query Speed, Query Speed
@node Estimating performance, SELECT speed, Query Speed, Query Speed
@subsection Estimating query performance
@subsection Estimating query performance
...
@@ -25707,6 +26038,9 @@ go much slower until your applications is only bound by disk-seeks
...
@@ -25707,6 +26038,9 @@ go much slower until your applications is only bound by disk-seeks
(which increase by N log N). To avoid this, increase the index cache as
(which increase by N log N). To avoid this, increase the index cache as
the data grows. @xref{Server parameters}.
the data grows. @xref{Server parameters}.
@cindex speed, of queries
@findex SELECT speed
@node SELECT speed, Where optimizations, Estimating performance, Query Speed
@node SELECT speed, Where optimizations, Estimating performance, Query Speed
@subsection Speed of @code{SELECT} queries
@subsection Speed of @code{SELECT} queries
...
@@ -25739,7 +26073,8 @@ however that this sorting isn't written optimally and will take a long
...
@@ -25739,7 +26073,8 @@ however that this sorting isn't written optimally and will take a long
time for a large table!
time for a large table!
@end itemize
@end itemize
@cindex Optimizations
@cindex optimizations
@findex WHERE
@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
...
@@ -25867,6 +26202,8 @@ mysql> SELECT ... FROM tbl_name ORDER BY key_part1,key_part2,...
...
@@ -25867,6 +26202,8 @@ mysql> SELECT ... FROM tbl_name ORDER BY key_part1,key_part2,...
mysql> SELECT ... FROM tbl_name ORDER BY key_part1 DESC,key_part2 DESC,...
mysql> SELECT ... FROM tbl_name ORDER BY key_part1 DESC,key_part2 DESC,...
@end example
@end example
@findex LEFT JOIN
@cindex optimizing, LEFT JOIN
@node LEFT JOIN optimization, LIMIT optimization, Where optimizations, Query Speed
@node LEFT JOIN optimization, LIMIT optimization, Where optimizations, Query Speed
@subsection How MySQL optimizes @code{LEFT JOIN} and @code{RIGHT JOIN}
@subsection How MySQL optimizes @code{LEFT JOIN} and @code{RIGHT JOIN}
...
@@ -25922,6 +26259,8 @@ The fix in this case is to change the query to:
...
@@ -25922,6 +26259,8 @@ The fix in this case is to change the query to:
SELECT * FROM b,a LEFT JOIN c ON (c.key=a.key) LEFT JOIN d (d.key=a.key) WHERE b.key=d.key
SELECT * FROM b,a LEFT JOIN c ON (c.key=a.key) LEFT JOIN d (d.key=a.key) WHERE b.key=d.key
@end example
@end example
@cindex optimizing, LIMIT
@findex LIMIT
@node LIMIT optimization, Insert speed, LEFT JOIN optimization, Query Speed
@node LIMIT optimization, Insert speed, LEFT JOIN optimization, Query Speed
@subsection How MySQL optimizes @code{LIMIT}
@subsection How MySQL optimizes @code{LIMIT}
...
@@ -25956,6 +26295,8 @@ The size of temporary tables uses the @code{LIMIT #} to calculate how much
...
@@ -25956,6 +26295,8 @@ The size of temporary tables uses the @code{LIMIT #} to calculate how much
space is needed to resolve the query.
space is needed to resolve the query.
@end itemize
@end itemize
@cindex speed, inserting
@cindex inserting, speed of
@node Insert speed, Update speed, LIMIT optimization, Query Speed
@node Insert speed, Update speed, LIMIT optimization, Query Speed
@subsection Speed of @code{INSERT} queries
@subsection Speed of @code{INSERT} queries
...
@@ -26110,6 +26451,8 @@ the index cache. @xref{Server parameters}.
...
@@ -26110,6 +26451,8 @@ the index cache. @xref{Server parameters}.
It's also much faster to remove all rows than to remove a big part of the
It's also much faster to remove all rows than to remove a big part of the
rows from a table.
rows from a table.
@cindex optimization, tips
@cindex tips, optimization
@node Tips, Benchmarks, Query Speed, Performance
@node Tips, Benchmarks, Query Speed, Performance
@section Other optimization tips
@section Other optimization tips
...
@@ -26278,6 +26621,8 @@ you start @code{mysqld} to ensure that they are okay if something killed
...
@@ -26278,6 +26621,8 @@ you start @code{mysqld} to ensure that they are okay if something killed
from the data you should not lose anything by using @code{DELAY_KEY_WRITE}.
from the data you should not lose anything by using @code{DELAY_KEY_WRITE}.
@end itemize
@end itemize
@cindex benchmarks
@cindex performance, benchmarks
@node Benchmarks, Design, Tips, Performance
@node Benchmarks, Design, Tips, Performance
@section Using your own benchmarks
@section Using your own benchmarks
...
@@ -26310,6 +26655,9 @@ recent hack for this -
...
@@ -26310,6 +26655,9 @@ recent hack for this -
As the name suggests, it can bring your system down to its knees if you ask it,
As the name suggests, it can bring your system down to its knees if you ask it,
so make sure to use it only on your developement systems.
so make sure to use it only on your developement systems.
@cindex design, choices
@cindex databases, design
@cindex storage of data
@node Design, Design Limitations, Benchmarks, Performance
@node Design, Design Limitations, Benchmarks, Performance
@section Design choices
@section Design choices
...
@@ -26345,6 +26693,7 @@ usually not updated on delete).
...
@@ -26345,6 +26693,7 @@ usually not updated on delete).
Its harder to cache ONLY the index data.
Its harder to cache ONLY the index data.
@end itemize
@end itemize
@cindex design, limitations
@node Design Limitations, Portability, Design, Performance
@node Design Limitations, Portability, Design, Performance
@section MySQL design limitations/tradeoffs
@section MySQL design limitations/tradeoffs
...
@@ -26360,6 +26709,9 @@ takes more effort and hardware.
...
@@ -26360,6 +26709,9 @@ takes more effort and hardware.
We are also working on some extensions to solve this problem for some
We are also working on some extensions to solve this problem for some
common application niches.
common application niches.
@cindex portability
@cindex crash-me program
@cindex programs, crash-me
@node Portability, Internal use, Design Limitations, Performance
@node Portability, Internal use, Design Limitations, Performance
@section Portability
@section Portability
...
@@ -26429,6 +26781,8 @@ In this case the table creation information should contain information
...
@@ -26429,6 +26781,8 @@ In this case the table creation information should contain information
of the initial size of the cache and how often the table should normally
of the initial size of the cache and how often the table should normally
be refreshed.
be refreshed.
@cindex uses, of @strong{MySQL}
@cindex customers, of @strong{MySQL}
@node Internal use, , Portability, Performance
@node Internal use, , Portability, Performance
@section What have we used MySQL for?
@section What have we used MySQL for?
...
@@ -26490,6 +26844,8 @@ to the batch job that the interactive performance gets very low. This
...
@@ -26490,6 +26844,8 @@ to the batch job that the interactive performance gets very low. This
makes the machine feel very slow and unresponsive while big batches are
makes the machine feel very slow and unresponsive while big batches are
going. Hopefully this will be better handled in future Linux Kernels.
going. Hopefully this will be better handled in future Linux Kernels.
@cindex benchmark suite
@cindex crash-me
@node MySQL Benchmarks, Tools, Performance, Top
@node MySQL Benchmarks, Tools, Performance, Top
@chapter The MySQL benchmark suite
@chapter The MySQL benchmark suite
...
@@ -26557,6 +26913,7 @@ How big a query can be
...
@@ -26557,6 +26913,7 @@ How big a query can be
How big a @code{VARCHAR} column can be
How big a @code{VARCHAR} column can be
@end itemize
@end itemize
@cindex utilities
@node Tools, Maintenance, MySQL Benchmarks, Top
@node Tools, Maintenance, MySQL Benchmarks, Top
@chapter MySQL Utilites
@chapter MySQL Utilites
...
@@ -26570,7 +26927,8 @@ How big a @code{VARCHAR} column can be
...
@@ -26570,7 +26927,8 @@ How big a @code{VARCHAR} column can be
* myisampack:: The @strong{MySQL} compressed read-only table generator
* myisampack:: The @strong{MySQL} compressed read-only table generator
@end menu
@end menu
@cindex Environment variables
@cindex environment variables
@cindex programs, list of
@node Programs, mysql, Tools, Tools
@node Programs, mysql, Tools, Tools
@section Overview of the different MySQL programs
@section Overview of the different MySQL programs
...
@@ -26701,7 +27059,9 @@ as restarting the server when an error occurs and logging runtime information
...
@@ -26701,7 +27059,9 @@ as restarting the server when an error occurs and logging runtime information
to a log file.
to a log file.
@end table
@end table
@cindex Scripts
@cindex command line tool
@cindex tools, command line
@cindex scripts
@cindex @code{mysql}
@cindex @code{mysql}
@node mysql, mysqladmin, Programs, Tools
@node mysql, mysqladmin, Programs, Tools
@section The command line tool
@section The command line tool
...
@@ -30689,6 +31049,9 @@ only by their owners or the superuser (@code{root}).
...
@@ -30689,6 +31049,9 @@ only by their owners or the superuser (@code{root}).
You can check if the @code{sticky} bit is set by executing @code{ls -ld /tmp}.
You can check if the @code{sticky} bit is set by executing @code{ls -ld /tmp}.
If the last permission bit is @code{t}, the bit is set.
If the last permission bit is @code{t}, the bit is set.
@cindex errors, access denied
@cindex problems, access denied errors
@cindex access denied errors
@node Error Access denied, Changing MySQL user, Problems with mysql.sock, Problems
@node Error Access denied, Changing MySQL user, Problems with mysql.sock, Problems
@section @code{Access denied} error
@section @code{Access denied} error
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment