* Creating an InnoDB database:: Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database.
* Creating an InnoDB database:: Creating an InnoDB database.
* Using InnoDB tables:: Creating InnoDB tables
* Using InnoDB tables:: Creating InnoDB tables
* Adding and removing:: Adding and removing InnoDB data and log files
* Adding and removing:: Adding and removing InnoDB data and log files
* Backing up:: Backing up and recovering an InnoDB database
* Backing up:: Backing up and recovering an InnoDB database
...
@@ -553,7 +553,7 @@ InnoDB Tables
...
@@ -553,7 +553,7 @@ InnoDB Tables
Creating an InnoDB database
Creating an InnoDB database
* Error createing InnoDB::
* Error creating InnoDB::
Backing up and recovering an InnoDB database
Backing up and recovering an InnoDB database
...
@@ -561,7 +561,7 @@ Backing up and recovering an InnoDB database
...
@@ -561,7 +561,7 @@ Backing up and recovering an InnoDB database
InnoDB transaction model
InnoDB transaction model
* InnoDB consinsten read::
* InnoDB consistent read::
* InnoDB locking reads::
* InnoDB locking reads::
* InnoDB Next-key locking::
* InnoDB Next-key locking::
* InnoDB Locks set::
* InnoDB Locks set::
...
@@ -1384,7 +1384,7 @@ in this email @email{advertising@@mysql.com}.
...
@@ -1384,7 +1384,7 @@ in this email @email{advertising@@mysql.com}.
@item
@item
We are building a partner program to be able to provide @strong{MySQL}
We are building a partner program to be able to provide @strong{MySQL}
services in every country. If you are interested in becomming a partner
services in every country. If you are interested in becoming a partner
of @strong{MySQL AB} please visit
of @strong{MySQL AB} please visit
@uref{http://www.mysql.com/information/partners.html} or email
@uref{http://www.mysql.com/information/partners.html} or email
@email{partner@@mysql.com}.
@email{partner@@mysql.com}.
...
@@ -2544,7 +2544,7 @@ which services were discovered on which dial-up numbers in your organization.
...
@@ -2544,7 +2544,7 @@ which services were discovered on which dial-up numbers in your organization.
@strong{MySQL} version 3.23.36 will use the adaptive mutex, which is much
@strong{MySQL} version 3.23.36 will use the adaptive mutex, which is much
...
@@ -7587,7 +7600,7 @@ better than even the patched one in @strong{glibc-2.1.3}. Be warned, however,
...
@@ -7587,7 +7600,7 @@ better than even the patched one in @strong{glibc-2.1.3}. Be warned, however,
that under some conditions, the current mutex code in @strong{glibc-2.2.2}
that under some conditions, the current mutex code in @strong{glibc-2.2.2}
overspins, which hurts @strong{MySQL} performance. The chance of this
overspins, which hurts @strong{MySQL} performance. The chance of this
condition can be reduced by renicing @code{mysqld} process to the highest
condition can be reduced by renicing @code{mysqld} process to the highest
priority. We have also been able to correct the overspin behaviour with
priority. We have also been able to correct the overspin behavior with
a patch, available @uref{http://www.mysql.com/Downloads/Linux/linuxthreads-2.2.2.patch,here}. It combines the correction of overspin, maximum number of
a patch, available @uref{http://www.mysql.com/Downloads/Linux/linuxthreads-2.2.2.patch,here}. It combines the correction of overspin, maximum number of
threads, and stack spacing all in one. You will need to apply it in the
threads, and stack spacing all in one. You will need to apply it in the
@code{linuxthreads} directory with
@code{linuxthreads} directory with
...
@@ -7634,14 +7647,14 @@ If you see a dead @code{mysqld} daemon process with @code{ps}, this usually
...
@@ -7634,14 +7647,14 @@ If you see a dead @code{mysqld} daemon process with @code{ps}, this usually
means that you have found a bug in @strong{MySQL} or you have a corrupted
means that you have found a bug in @strong{MySQL} or you have a corrupted
table. @xref{Crashing}.
table. @xref{Crashing}.
To get a core dump on Linux if mysqld dies with a SIGSEGV
To get a core dump on Linux if @code{mysqld} dies with a SIGSEGV
signal, you can start mysqld with the @code{--core-file} option. Note
signal, you can start @code{mysqld} with the @code{--core-file} option. Note
that you also probably need to raise the @code{core file size} by adding
that you also probably need to raise the @code{core file size} by adding
@code{ulimit -c 1000000} to @code{safe_mysqld} or starting @code{safe_mysqld}
@code{ulimit -c 1000000} to @code{safe_mysqld} or starting @code{safe_mysqld}
with @code{--core-file-sizes=1000000}. @xref{safe_mysqld}.
with @code{--core-file-sizes=1000000}. @xref{safe_mysqld}.
To get a core dump on Linux if mysqld dies with a SIGSEGV signal, you can
To get a core dump on Linux if @code{mysqld} dies with a SIGSEGV signal, you can
start mysqld with the @code{--core-file} option. Note that you also probably
start @code{mysqld} with the @code{--core-file} option. Note that you also probably
need to raise the @code{core file size} by adding @code{ulimit -c 1000000} to
need to raise the @code{core file size} by adding @code{ulimit -c 1000000} to
@code{safe_mysqld} or starting @code{safe_mysqld} with
@code{safe_mysqld} or starting @code{safe_mysqld} with
On open, the table is checked if it's marked as crashed or if the open
On open, the table is checked if it's marked as crashed or if the open
count variable for the table is not 0 and you are running with
count variable for the table is not 0 and you are running with
...
@@ -24336,9 +24359,9 @@ If you use @code{--skip-bdb}, @strong{MySQL} will not initialize the
...
@@ -24336,9 +24359,9 @@ If you use @code{--skip-bdb}, @strong{MySQL} will not initialize the
Berkeley DB library and this will save a lot of memory. Of course,
Berkeley DB library and this will save a lot of memory. Of course,
you cannot use @code{BDB} tables if you are using this option.
you cannot use @code{BDB} tables if you are using this option.
Normally you should start mysqld without @code{--bdb-no-recover} if you
Normally you should start @code{mysqld} without @code{--bdb-no-recover} if you
intend to use BDB tables. This may, however, give you problems when you
intend to use BDB tables. This may, however, give you problems when you
try to start mysqld if the BDB log files are corrupted. @xref{Starting
try to start @code{mysqld} if the BDB log files are corrupted. @xref{Starting
server}.
server}.
With @code{bdb_max_lock} you can specify the maximum number of locks
With @code{bdb_max_lock} you can specify the maximum number of locks
...
@@ -24428,7 +24451,7 @@ TABLE}.
...
@@ -24428,7 +24451,7 @@ TABLE}.
@item
@item
If you get full disk with a @code{BDB} table, you will get an error
If you get full disk with a @code{BDB} table, you will get an error
(probably error 28) and the transaction should roll back. This is in
(probably error 28) and the transaction should roll back. This is in
contrast with @code{MyISAM} and @code{ISAM} tables where mysqld will
contrast with @code{MyISAM} and @code{ISAM} tables where @code{mysqld} will
wait for enough free disk before continuing.
wait for enough free disk before continuing.
@end itemize
@end itemize
...
@@ -24610,7 +24633,7 @@ NuSphere is working on removing these limitations.
...
@@ -24610,7 +24633,7 @@ NuSphere is working on removing these limitations.
@menu
@menu
* InnoDB overview:: InnoDB tables overview
* InnoDB overview:: InnoDB tables overview
* InnoDB start:: InnoDB startup options
* InnoDB start:: InnoDB startup options
* Creating an InnoDB database:: Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database. Creating an InnoDB database.
* Creating an InnoDB database:: Creating an InnoDB database.
* Using InnoDB tables:: Creating InnoDB tables
* Using InnoDB tables:: Creating InnoDB tables
* Adding and removing:: Adding and removing InnoDB data and log files
* Adding and removing:: Adding and removing InnoDB data and log files
* Backing up:: Backing up and recovering an InnoDB database
* Backing up:: Backing up and recovering an InnoDB database
...
@@ -24645,7 +24668,7 @@ cd /path/to/source/of/mysql-3.23.37
...
@@ -24645,7 +24668,7 @@ cd /path/to/source/of/mysql-3.23.37
./configure --with-innodb
./configure --with-innodb
@end example
@end example
InnoDB provides @strong{MySQL} with a transactionsafe table handler with
InnoDB provides @strong{MySQL} with a transaction-safe table handler with
commit, rollback, and crash recovery capabilities. InnoDB does
commit, rollback, and crash recovery capabilities. InnoDB does
locking on row level, and also provides an Oracle-style consistent
locking on row level, and also provides an Oracle-style consistent
non-locking read in @code{SELECTS}, which increases transaction
non-locking read in @code{SELECTS}, which increases transaction
...
@@ -24745,6 +24768,7 @@ the paths specified here. The file sizes are specified in megabytes,
...
@@ -24745,6 +24768,7 @@ the paths specified here. The file sizes are specified in megabytes,
hence the 'M' after the size specification above. Do not set a file size
hence the 'M' after the size specification above. Do not set a file size
bigger than 4000M, and on most operating systems not bigger than 2000M.
bigger than 4000M, and on most operating systems not bigger than 2000M.
InnoDB also understands the abbreviation 'G', 1G meaning 1024M.
InnoDB also understands the abbreviation 'G', 1G meaning 1024M.
The sum of the sizes of the files must be at least 10 MB.
@item @code{innodb_mirrored_log_groups} @tab
@item @code{innodb_mirrored_log_groups} @tab
Number of identical copies of log groups we
Number of identical copies of log groups we
keep for the database. Currently this should be set to 1.
keep for the database. Currently this should be set to 1.
...
@@ -24800,7 +24824,7 @@ on Windows NT disk i/o may benefit from a larger number.
...
@@ -24800,7 +24824,7 @@ on Windows NT disk i/o may benefit from a larger number.
Timeout in seconds an InnoDB transaction may wait for a lock before
Timeout in seconds an InnoDB transaction may wait for a lock before
being rolled back. InnoDB automatically detects transaction deadlocks
being rolled back. InnoDB automatically detects transaction deadlocks
in its own lock table and rolls back the transaction. If you use
in its own lock table and rolls back the transaction. If you use
@code{LOCK TABLES} command, or other transactionsafe table handlers
@code{LOCK TABLES} command, or other transaction-safe table handlers
than InnoDB in the same transaction, then a deadlock may arise which
than InnoDB in the same transaction, then a deadlock may arise which
InnoDB cannot notice. In cases like this the timeout is useful to
InnoDB cannot notice. In cases like this the timeout is useful to
resolve the situation.
resolve the situation.
...
@@ -24868,10 +24892,10 @@ mysqld: ready for connections
...
@@ -24868,10 +24892,10 @@ mysqld: ready for connections
@end example
@end example
@menu
@menu
* Error createing InnoDB::
* Error creating InnoDB::
@end menu
@end menu
@node Error createing InnoDB, , Creating an InnoDB database, Creating an InnoDB database
@node Error creating InnoDB, , Creating an InnoDB database, Creating an InnoDB database
@subsubsection If something goes wrong in database creation
@subsubsection If something goes wrong in database creation
If something goes wrong in an InnoDB database creation, you should
If something goes wrong in an InnoDB database creation, you should
...
@@ -25110,14 +25134,14 @@ on the other hand cancels all modifications made by the current
...
@@ -25110,14 +25134,14 @@ on the other hand cancels all modifications made by the current
To get better performance for BDB tables, you should add some configuration
To get better performance for BDB tables, you should add some configuration
options for these too. @xref{BDB start}.
options for these too. @xref{BDB start}.
@code{safe_mysqld} will automaticly try to start any @code{mysqld} binary
@code{safe_mysqld} will automatically try to start any @code{mysqld} binary
with the @code{-max} prefix. This makes it very easy to test out a
with the @code{-max} prefix. This makes it very easy to test out a
another @code{mysqld} binary in an existing installation. Just
another @code{mysqld} binary in an existing installation. Just
run @code{configure} with the options you want and then install the
run @code{configure} with the options you want and then install the
...
@@ -32006,7 +32063,7 @@ where your old @code{mysqld} binary is. @xref{safe_mysqld}.
...
@@ -32006,7 +32063,7 @@ where your old @code{mysqld} binary is. @xref{safe_mysqld}.
The @code{mysqld-max} RPM uses the above mentioned @code{safe_mysqld}
The @code{mysqld-max} RPM uses the above mentioned @code{safe_mysqld}
feature. It just installs the @code{mysqld-max} executable and
feature. It just installs the @code{mysqld-max} executable and
@code{safe_mysqld} will automaticly use this executable when
@code{safe_mysqld} will automatically use this executable when
@code{safe_mysqld} is restarted.
@code{safe_mysqld} is restarted.
The following table shows which table types our standard @strong{MySQL-Max}
The following table shows which table types our standard @strong{MySQL-Max}
...
@@ -32072,9 +32129,9 @@ Size of the core file @code{mysqld} should be able to create. Passed to @code{ul
...
@@ -32072,9 +32129,9 @@ Size of the core file @code{mysqld} should be able to create. Passed to @code{ul
Path to @code{mysqld}
Path to @code{mysqld}
@item --log=path
@item --log=path
@item --mysqld=mysqld-version
@item --mysqld=mysqld-version
Name of the mysqld version in the @code{ledir} directory you want to start.
Name of the @code{mysqld} version in the @code{ledir} directory you want to start.
@item --mysqld-version=version
@item --mysqld-version=version
Similar to @code{--mysqld=} but here you only give the suffix for mysqld.
Similar to @code{--mysqld=} but here you only give the suffix for @code{mysqld}.
For example if you use @code{--mysqld-version=max}, @code{safe_mysqld} will
For example if you use @code{--mysqld-version=max}, @code{safe_mysqld} will
start the @code{ledir/mysqld-max} version. If the argument to
start the @code{ledir/mysqld-max} version. If the argument to
@code{--mysqld-version} is empty, @code{ledir/mysqld} will be used.
@code{--mysqld-version} is empty, @code{ledir/mysqld} will be used.
...
@@ -32710,7 +32767,7 @@ The current @code{mysqladmin} supports the following commands:
...
@@ -32710,7 +32767,7 @@ The current @code{mysqladmin} supports the following commands:
@item flush-privileges @tab Reload grant tables (same as reload).
@item flush-privileges @tab Reload grant tables (same as reload).
@item kill id,id,... @tab Kill mysql threads.
@item kill id,id,... @tab Kill mysql threads.
@item password @tab New-password. Change old password to new-password.
@item password @tab New-password. Change old password to new-password.
@item ping @tab Check if mysqld is alive.
@item ping @tab Check if @code{mysqld} is alive.
@item processlist @tab Show list of active threads in server.
@item processlist @tab Show list of active threads in server.
@item reload @tab Reload grant tables.
@item reload @tab Reload grant tables.
@item refresh @tab Flush all tables and close and open logfiles.
@item refresh @tab Flush all tables and close and open logfiles.
...
@@ -32754,9 +32811,9 @@ The @code{mysqladmin status} command result has the following columns:
...
@@ -32754,9 +32811,9 @@ The @code{mysqladmin status} command result has the following columns:
@cindex open tables
@cindex open tables
@item Open tables @tab Number of tables that are open now.
@item Open tables @tab Number of tables that are open now.
@cindex memory use
@cindex memory use
@item Memory in use @tab Memory allocated directly by the mysqld code (only available when @strong{MySQL} is compiled with --with-debug=full).
@item Memory in use @tab Memory allocated directly by the @code{mysqld} code (only available when @strong{MySQL} is compiled with --with-debug=full).
@cindex max memory used
@cindex max memory used
@item Max memory used @tab Maximum memory allocated directly by the mysqld code (only available when @strong{MySQL} is compiled with --with-debug=full).
@item Max memory used @tab Maximum memory allocated directly by the @code{mysqld} code (only available when @strong{MySQL} is compiled with --with-debug=full).
@end multitable
@end multitable
If you do @code{myslqadmin shutdown} on a socket (in other words, on a
If you do @code{myslqadmin shutdown} on a socket (in other words, on a
...
@@ -33016,8 +33073,8 @@ Flush logs once all tables are locked.
...
@@ -33016,8 +33073,8 @@ Flush logs once all tables are locked.
Temporary directory (instead of /tmp).
Temporary directory (instead of /tmp).
@end table
@end table
You can use 'perldoc mysqlhotcopy' to get a more complete documentation for
You can use @code{perldoc mysqlhotcopy} to get a more complete
@code{mysqlhotcopy}.
documentation for @code{mysqlhotcopy}.
@code{mysqlhotcopy} reads the groups @code{[client]} and @code{[mysqlhotcopy]}
@code{mysqlhotcopy} reads the groups @code{[client]} and @code{[mysqlhotcopy]}
from the option files.
from the option files.
...
@@ -33742,7 +33799,7 @@ myisamchk: warning: 1 clients is using or hasn't closed the table properly
...
@@ -33742,7 +33799,7 @@ myisamchk: warning: 1 clients is using or hasn't closed the table properly
@end example
@end example
This means that you are trying to check a table that has been updated by
This means that you are trying to check a table that has been updated by
the another program (like the mysqld server) that hasn't yet closed
the another program (like the @code{mysqld} server) that hasn't yet closed
the file or that has died without closing the file properly.
the file or that has died without closing the file properly.
If you @code{mysqld} is running, you must force a sync/close of all
If you @code{mysqld} is running, you must force a sync/close of all
...
@@ -34611,7 +34668,7 @@ Run @code{myisamchk *.MYI} or @code{myisamchk -e *.MYI} if you have
...
@@ -34611,7 +34668,7 @@ Run @code{myisamchk *.MYI} or @code{myisamchk -e *.MYI} if you have
more time. Use the @code{-s} (silent) option to suppress unnecessary
more time. Use the @code{-s} (silent) option to suppress unnecessary
information.
information.
If the mysqld server is done you should use the --update option to tell
If the @code{mysqld} server is done you should use the --update option to tell
@code{myisamchk} to mark the table as 'checked'.
@code{myisamchk} to mark the table as 'checked'.
You have to repair only those tables for which @code{myisamchk} announces an
You have to repair only those tables for which @code{myisamchk} announces an
...
@@ -34853,12 +34910,12 @@ operating system must support dynamic loading. The @strong{MySQL} source
...
@@ -34853,12 +34910,12 @@ operating system must support dynamic loading. The @strong{MySQL} source
distribution includes a file @file{sql/udf_example.cc} that defines 5 new
distribution includes a file @file{sql/udf_example.cc} that defines 5 new
functions. Consult this file to see how UDF calling conventions work.
functions. Consult this file to see how UDF calling conventions work.
For mysqld to be able to use UDF functions, you should configure MySQL
For @code{mysqld} to be able to use UDF functions, you should configure MySQL
with @code{--with-mysqld-ldflags=-rdynamic} The reason is that to on
with @code{--with-mysqld-ldflags=-rdynamic} The reason is that to on
many platforms (including Linux) you can load a dynamic library (with
many platforms (including Linux) you can load a dynamic library (with
@code{dlopen()}) from a static linked program, which you would get if
@code{dlopen()}) from a static linked program, which you would get if
you are using @code{--with-mysqld-ldflags=-all-static} If you want to
you are using @code{--with-mysqld-ldflags=-all-static} If you want to
use an UDF that needs to access symbols from mysqld (like the
use an UDF that needs to access symbols from @code{mysqld} (like the
@code{methaphone} example in @file{sql/udf_example.cc} that uses
@code{methaphone} example in @file{sql/udf_example.cc} that uses
@code{default_charset_info}), you must link the program with
@code{default_charset_info}), you must link the program with
@code{-rdynamic}. (see @code{man dlopen}).
@code{-rdynamic}. (see @code{man dlopen}).
...
@@ -35443,7 +35500,7 @@ most of the Unix ODBC managers. You can find a list at these in the
...
@@ -35443,7 +35500,7 @@ most of the Unix ODBC managers. You can find a list at these in the
@strong{ODBC}-related links section on the @strong{MySQL} useful links page.
@strong{ODBC}-related links section on the @strong{MySQL} useful links page.
@xref{Useful Links}.
@xref{Useful Links}.
To install @strong{MyODBC} on windows, you should download the
To install @strong{MyODBC} on Windows, you should download the
appropriate @strong{MyODBC} .zip file (for Windows or NT/Win2000),
appropriate @strong{MyODBC} .zip file (for Windows or NT/Win2000),
unpack it with @code{WINZIP}, or some similar program, and execute the
unpack it with @code{WINZIP}, or some similar program, and execute the
@code{SETUP.EXE} file.
@code{SETUP.EXE} file.
...
@@ -35570,18 +35627,18 @@ through the @code{InConnectionString} argument in the
...
@@ -35570,18 +35627,18 @@ through the @code{InConnectionString} argument in the
@item user @tab ODBC (on windows) @tab The username used to connect to @strong{MySQL}.
@item user @tab ODBC (on Windows) @tab The username used to connect to @strong{MySQL}.
@item server @tab localhost @tab The hostname of the @strong{MySQL} server.
@item server @tab localhost @tab The hostname of the @strong{MySQL} server.
@item database @tab @tab The default database
@item database @tab @tab The default database
@item option @tab 0 @tab A integer by which you can specify how @strong{MyODBC} should work. See below.
@item option @tab 0 @tab A integer by which you can specify how @strong{MyODBC} should work. See below.
@item port @tab 3306 @tab The TCP/IP port to use if @code{server} is not @code{localhost}.
@item port @tab 3306 @tab The TCP/IP port to use if @code{server} is not @code{localhost}.
@item stmt @tab @tab A statement that will be executed when connection to @code{MySQL}.
@item stmt @tab @tab A statement that will be executed when connection to @code{MySQL}.
@item password @tab @tab The password for the @code{server} @code{user} combination.
@item password @tab @tab The password for the @code{server} @code{user} combination.
@item socket @tab @tab The socket or windows pipe to connect to.
@item socket @tab @tab The socket or Windows pipe to connect to.
@end multitable
@end multitable
The option argument is used to tell @strong{MyODBC} that the client isn't 100%
The option argument is used to tell @strong{MyODBC} that the client isn't 100%
ODBC compliant. On windows, one normally sets the option flag by
ODBC compliant. On Windows, one normally sets the option flag by
toggling the different options on the connection screen but one can also
toggling the different options on the connection screen but one can also
set this in the opton argument. The following options are listed in the
set this in the opton argument. The following options are listed in the
same order as they appear in the @strong{MyODBC} connect screen:
same order as they appear in the @strong{MyODBC} connect screen:
...
@@ -35601,10 +35658,10 @@ same order as they appear in the @strong{MyODBC} connect screen:
...
@@ -35601,10 +35658,10 @@ same order as they appear in the @strong{MyODBC} connect screen:
@item 1024 @tab SQLDescribeCol() will return fully qualifed column names
@item 1024 @tab SQLDescribeCol() will return fully qualifed column names
@item 2048 @tab Use the compressed server/client protocol
@item 2048 @tab Use the compressed server/client protocol
@item 4096 @tab Tell server to ignore space after function name and before @code{'('} (needed by PowerBuilder). This will make all function names keywords!
@item 4096 @tab Tell server to ignore space after function name and before @code{'('} (needed by PowerBuilder). This will make all function names keywords!
@item 8192 @tab Connect with named pipes to a mysqld server running on NT.
@item 8192 @tab Connect with named pipes to a @code{mysqld} server running on NT.
@item 16384 @tab Change LONGLONG columns to INT columns (Some applications can't handle LONGLONG).
@item 16384 @tab Change LONGLONG columns to INT columns (Some applications can't handle LONGLONG).
@item 32768 @tab Return 'user' as Table_qualifier and Table_owner from SQLTables (experimental)
@item 32768 @tab Return 'user' as Table_qualifier and Table_owner from SQLTables (experimental)
@item 65536 @tab Read parameters from the @code{client} and @code{odbc} groups from @code{my.cnf}
@item 65536 @tab Read parameters from the @code{client} and @code{odbc} groups from @file{my.cnf}
@item 131072 @tab Add some extra safety checks (should not bee needed but...)
@item 131072 @tab Add some extra safety checks (should not bee needed but...)
@end multitable
@end multitable
...
@@ -35822,7 +35879,7 @@ For example, create a db with a table containing 2 columns of text:
...
@@ -35822,7 +35879,7 @@ For example, create a db with a table containing 2 columns of text:
@itemize @bullet
@itemize @bullet
@item
@item
Insert rows using the mysql client command-line tool.
Insert rows using the @code{mysql} client command-line tool.
@item
@item
Create a DSN file using the MyODBC driver, for example, my for the db above.
Create a DSN file using the MyODBC driver, for example, my for the db above.
@item
@item
...
@@ -36071,8 +36128,8 @@ FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
...
@@ -36071,8 +36128,8 @@ FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
@node Borland C++, , Apache, Common programs
@node Borland C++, , Apache, Common programs
@section Borland C++
@section Borland C++
You can compile the @strong{MySQL} windows source with Borland C++ 5.02.
You can compile the @strong{MySQL} Windows source with Borland C++ 5.02.
(The windows source includes only projects for Microsoft VC++, for
(The Windows source includes only projects for Microsoft VC++, for
Borland C++ you have to do the project files yourself).
Borland C++ you have to do the project files yourself).
One known problem with Borland C++ is that it uses a different structure
One known problem with Borland C++ is that it uses a different structure
...
@@ -36245,7 +36302,7 @@ files. @strong{MySQL} will update the data on disk, with the
...
@@ -36245,7 +36302,7 @@ files. @strong{MySQL} will update the data on disk, with the
@code{write()} system call, after every SQL statement and before the
@code{write()} system call, after every SQL statement and before the
client is notified about the result. (This is not true if you are running
client is notified about the result. (This is not true if you are running
with @code{delayed_key_writes}, in which case only the data is written.)
with @code{delayed_key_writes}, in which case only the data is written.)
This means that the data is safe even if mysqld crashes, as the OS will
This means that the data is safe even if @code{mysqld} crashes, as the OS will
ensure that the not flushed data is written to disk. You can force
ensure that the not flushed data is written to disk. You can force
@strong{MySQL} to sync everything to disk after every SQL command by
@strong{MySQL} to sync everything to disk after every SQL command by
starting @code{mysqld} with @code{--flush}.
starting @code{mysqld} with @code{--flush}.
...
@@ -36269,7 +36326,7 @@ the @code{lockd} daemon ) or if you are running
...
@@ -36269,7 +36326,7 @@ the @code{lockd} daemon ) or if you are running
multiple servers with @code{--skip-locking}
multiple servers with @code{--skip-locking}
@item
@item
You have a crashed index/data file that contains very wrong data that
You have a crashed index/data file that contains very wrong data that
got mysqld confused.
got @code{mysqld} confused.
@item
@item
You have found a bug in the data storage code. This isn't that likely,
You have found a bug in the data storage code. This isn't that likely,
but it's at least possible. In this case you can try to change the file
but it's at least possible. In this case you can try to change the file
...
@@ -36514,7 +36571,7 @@ The most common reason for the @code{MySQL server has gone away} error
...
@@ -36514,7 +36571,7 @@ The most common reason for the @code{MySQL server has gone away} error
is that the server timed out and closed the connection. By default, the
is that the server timed out and closed the connection. By default, the
server closes the connection after 8 hours if nothing has happened. You
server closes the connection after 8 hours if nothing has happened. You
can change the time limit by setting the @code{wait_timeout} variable when
can change the time limit by setting the @code{wait_timeout} variable when
you start mysqld.
you start @code{mysqld}.
Another common reason to receive the @code{MySQL server has gone away} error
Another common reason to receive the @code{MySQL server has gone away} error
is because you have issued a ``close'' on your @strong{MySQL} connection
is because you have issued a ``close'' on your @strong{MySQL} connection
...
@@ -36664,7 +36721,7 @@ remote host: Connection refused}, then there is no server running on the
...
@@ -36664,7 +36721,7 @@ remote host: Connection refused}, then there is no server running on the
given port.
given port.
@item
@item
Try connecting to the @code{mysqld} daemon on the local machine and check
Try connecting to the @code{mysqld} daemon on the local machine and check
the TCP/IP port that mysqld it's configured to use (variable @code{port}) with
the TCP/IP port that @code{mysqld} it's configured to use (variable @code{port}) with
@code{mysqladmin variables}.
@code{mysqladmin variables}.
@item
@item
Check that your @code{mysqld} server is not started with the
Check that your @code{mysqld} server is not started with the
...
@@ -36886,7 +36943,7 @@ Can't create/write to file '\\sqla3fe_0.ism'.
...
@@ -36886,7 +36943,7 @@ Can't create/write to file '\\sqla3fe_0.ism'.
this means that @strong{MySQL} can't create a temporary file for the
this means that @strong{MySQL} can't create a temporary file for the
result set in the given temporary directory. (The above error is a
result set in the given temporary directory. (The above error is a
typical error message on Windows, and the Unix error message is similar.)
typical error message on Windows, and the Unix error message is similar.)
The fix is to start mysqld with @code{--tmpdir=path} or to add to your option
The fix is to start @code{mysqld} with @code{--tmpdir=path} or to add to your option
file:
file:
@example
@example
...
@@ -37224,7 +37281,7 @@ can restore it with the following procedure:
...
@@ -37224,7 +37281,7 @@ can restore it with the following procedure:
@enumerate
@enumerate
@item
@item
Take down the mysqld server by sending a @code{kill} (not @code{kill
Take down the @code{mysqld} server by sending a @code{kill} (not @code{kill
-9}) to the @code{mysqld} server. The pid is stored in a @code{.pid}
-9}) to the @code{mysqld} server. The pid is stored in a @code{.pid}
file, which is normally in the @strong{MySQL} database directory:
file, which is normally in the @strong{MySQL} database directory:
...
@@ -37238,7 +37295,7 @@ runs as to do this.
...
@@ -37238,7 +37295,7 @@ runs as to do this.
@item
@item
Restart @code{mysqld} with the @code{--skip-grant-tables} option.
Restart @code{mysqld} with the @code{--skip-grant-tables} option.
@item
@item
Connect to the mysqld server with @code{mysql -h hostname mysql} and change
Connect to the @code{mysqld} server with @code{mysql -h hostname mysql} and change
the password with a @code{GRANT} command. @xref{GRANT,,@code{GRANT}}.
the password with a @code{GRANT} command. @xref{GRANT,,@code{GRANT}}.
You can also do this with
You can also do this with
@code{mysqladmin -h hostname -u user password 'new password'}
@code{mysqladmin -h hostname -u user password 'new password'}
...
@@ -38034,20 +38091,20 @@ home directory. @xref{Option files}.
...
@@ -38034,20 +38091,20 @@ home directory. @xref{Option files}.
@node Log files, Clients, Common problems, Top
@node Log files, Clients, Common problems, Top
@chapter The MySQL log files
@chapter The MySQL log files
@strong{MySQL} has a lot of different log files which can help you find
@strong{MySQL} has several different log files that can help you find
out what's going on inside @code{mysqld}:
out what's going on inside @code{mysqld}:
@multitable @columnfractions .3 .7
@multitable @columnfractions .3 .7
@item The error log @tab Problems encountering starting, running or stopping mysqld.
@item The error log @tab Problems encountering starting, running or stopping @code{mysqld}.
@item The isam log @tab Logs all changes to the ISAM tables. Used only for debugging the isam code.
@item The isam log @tab Logs all changes to the ISAM tables. Used only for debugging the isam code.
@item The query log @tab Established connections and executed queries.
@item The query log @tab Established connections and executed queries.
@item The update log @tab Depricated: Stores all statements that changes data
@item The update log @tab Deprecated: Stores all statements that changes data
@item The binary log @tab Stores all statements that changes something. Used also for replication
@item The binary log @tab Stores all statements that changes something. Used also for replication
@item The slow log @tab Stores all queries that took more than @code{long_query_time} to execute or didn't use indexes.
@item The slow log @tab Stores all queries that took more than @code{long_query_time} to execute or didn't use indexes.
@end multitable
@end multitable
All logs can be found in the @code{mysqld} database directory. You can
All logs can be found in the @code{mysqld} data directory. You can
tell force mysqld to switch to reopen the log files (or in some cases
force @code{mysqld} to reopen the log files (or in some cases
switch to a new log) by executing @code{FLUSH LOGS}. @xref{FLUSH}.
switch to a new log) by executing @code{FLUSH LOGS}. @xref{FLUSH}.
@cindex error log
@cindex error log
...
@@ -38065,19 +38122,19 @@ switch to a new log) by executing @code{FLUSH LOGS}. @xref{FLUSH}.
...
@@ -38065,19 +38122,19 @@ switch to a new log) by executing @code{FLUSH LOGS}. @xref{FLUSH}.
@code{mysqld} writes all errors to the stderr, which the
@code{mysqld} writes all errors to the stderr, which the
@code{safe_mysqld} script redirects to a file called
@code{safe_mysqld} script redirects to a file called
@code{'hostname'.err}. (On windows @code{mysqld} writes this directly
@code{'hostname'.err}. (On Windows, @code{mysqld} writes this directly
to @file{mysql.err}).
to @file{mysql.err}).
This contains information on when mysqld was started and stopped and
This contains information indicating when @code{mysqld} was started and
also any critical errors found when running. If @code{mysqld} dies
stopped and also any critical errors found when running. If @code{mysqld}
unexpectedly and @code{safe_mysqld} needs to restart @code{mysqld},
dies unexpectedly and @code{safe_mysqld} needs to restart @code{mysqld},
@code{safe_mysqld} will write a @code{restarted mysqld} row in this
@code{safe_mysqld} will write a @code{restarted mysqld} row in this
file. This log also holds a warning if @code{mysqld} notices a table
file. This log also holds a warning if @code{mysqld} notices a table
that needs to be automatically checked or repaired.
that needs to be automatically checked or repaired.
On some operating systems, the error log will contain a stack trace
On some operating systems, the error log will contain a stack trace
for where mysqld died. This can be used to find out where mysqld died.
for where @code{mysqld} died. This can be used to find out where
@xref{Using stack trace}.
@code{mysqld} died. @xref{Using stack trace}.
@cindex query log
@cindex query log
@cindex files, query log
@cindex files, query log
...
@@ -38086,9 +38143,9 @@ for where mysqld died. This can be used to find out where mysqld died.
...
@@ -38086,9 +38143,9 @@ for where mysqld died. This can be used to find out where mysqld died.
If you want to know what happens within @code{mysqld}, you should start
If you want to know what happens within @code{mysqld}, you should start
it with @code{--log[=file]}. This will log all connections and queries
it with @code{--log[=file]}. This will log all connections and queries
to the log file (by default named 'hostname.log'). This log can
to the log file (by default named @file{'hostname'.log}). This log can
be very useful when you suspect an error in a client and want to know
be very useful when you suspect an error in a client and want to know
exactly what @code{mysqld} thought the client send to it.
exactly what @code{mysqld} thought the client sent to it.
By default, the @code{mysql.server} script starts the @strong{MySQL}
By default, the @code{mysql.server} script starts the @strong{MySQL}
server with the @code{-l} option. If you need better performance when
server with the @code{-l} option. If you need better performance when
...
@@ -38098,7 +38155,7 @@ remove the @code{-l} option from @code{mysql.server} or change it to
...
@@ -38098,7 +38155,7 @@ remove the @code{-l} option from @code{mysql.server} or change it to
The entries in this log are written as @code{mysqld} receives the questions.
The entries in this log are written as @code{mysqld} receives the questions.
This may be different than the order in which the statements are executed.
This may be different than the order in which the statements are executed.
This is in contrast to the update log and the binary log which is written
This is in contrast to the update log and the binary log which are written
after the query is executed, but before any locks are released.
after the query is executed, but before any locks are released.
@cindex update log
@cindex update log
...
@@ -38694,7 +38751,7 @@ Retrieves a complete result set to the client.
...
@@ -38694,7 +38751,7 @@ Retrieves a complete result set to the client.
Returns the current thread ID.
Returns the current thread ID.
@item @strong{mysql_thread_save()} @tab
@item @strong{mysql_thread_save()} @tab
Returns 1 if the clients are compiled as threadsafe.
Returns 1 if the clients are compiled as thread-safe.
@item @strong{mysql_use_result()} @tab
@item @strong{mysql_use_result()} @tab
Initiates a row-by-row result set retrieval.
Initiates a row-by-row result set retrieval.
...
@@ -41051,7 +41108,7 @@ the socket handling should be thread safe.
...
@@ -41051,7 +41108,7 @@ the socket handling should be thread safe.
In the older binaries we distribute on our Web site, the client
In the older binaries we distribute on our Web site, the client
libraries are not normally compiled with the thread-safe option (the
libraries are not normally compiled with the thread-safe option (the
windows binaries are by default compiled to be thread safe).
Windows binaries are by default compiled to be thread safe).
Newer binary distributions should have both a normal and a
Newer binary distributions should have both a normal and a
thread-safe client library.
thread-safe client library.
...
@@ -42248,7 +42305,7 @@ Normally, @code{PostgreSQL} is a magnitude slower than @strong{MySQL}.
...
@@ -42248,7 +42305,7 @@ Normally, @code{PostgreSQL} is a magnitude slower than @strong{MySQL}.
transaction-safe tables and that their transactions system is not as
transaction-safe tables and that their transactions system is not as
sophisticated as Berkeley DB's. In @strong{MySQL} you can decide per
sophisticated as Berkeley DB's. In @strong{MySQL} you can decide per
table if you want the table to be fast or take the speed penalty of
table if you want the table to be fast or take the speed penalty of
making it transactionsafe.
making it transaction-safe.
The most important things that @code{PostgreSQL} supports that @strong{MySQL}
The most important things that @code{PostgreSQL} supports that @strong{MySQL}
doesn't yet support:
doesn't yet support:
...
@@ -42486,9 +42543,9 @@ pass the test suite !
...
@@ -42486,9 +42543,9 @@ pass the test suite !
If you get an error, like @code{Result length mismatch} or @code{Result
If you get an error, like @code{Result length mismatch} or @code{Result
content mismatch} it means that the output of the test didn't match
content mismatch} it means that the output of the test didn't match
exactly the expected output. This could be a bug in @strong{MySQL} or
exactly the expected output. This could be a bug in @strong{MySQL} or
that your mysqld version produces slight different results under some
that your @code{mysqld} version produces slightly different results under some
circumstances. In this case you should compare the @code{.test}
circumstances. In this case, you should compare the @file{.test}
and @code{.reject} file in the @code{mysql-test/r} sub directory to
and @file{.reject} file in the @file{mysql-test/r} sub directory to
see if this is something to worry about.
see if this is something to worry about.
@item
@item
...
@@ -42575,7 +42632,7 @@ variables to modify the behavior of @strong{MySQL}. @xref{Option files}.
...
@@ -42575,7 +42632,7 @@ variables to modify the behavior of @strong{MySQL}. @xref{Option files}.
@item @code{MYSQL_DEBUG} @tab Debug-trace options when debugging.
@item @code{MYSQL_DEBUG} @tab Debug-trace options when debugging.
@item @code{MYSQL_HISTFILE} @tab The path to the @code{mysql} history file.
@item @code{MYSQL_HISTFILE} @tab The path to the @code{mysql} history file.
@item @code{MYSQL_HOST} @tab Default host name used by the @code{mysql} command-line prompt.
@item @code{MYSQL_HOST} @tab Default host name used by the @code{mysql} command-line prompt.
@item @code{MYSQL_PWD} @tab The default password when connecting to mysqld. Note that use of this is insecure!
@item @code{MYSQL_PWD} @tab The default password when connecting to @code{mysqld}. Note that use of this is insecure!
@item @code{MYSQL_TCP_PORT} @tab The default TCP/IP port.
@item @code{MYSQL_TCP_PORT} @tab The default TCP/IP port.
@item @code{MYSQL_UNIX_PORT} @tab The default socket; used for connections to @code{localhost}.
@item @code{MYSQL_UNIX_PORT} @tab The default socket; used for connections to @code{localhost}.
@item @code{PATH} @tab Used by the shell to finds the @strong{MySQL} programs.
@item @code{PATH} @tab Used by the shell to finds the @strong{MySQL} programs.
...
@@ -42863,6 +42920,8 @@ Ecommerce site that is selling computers.
...
@@ -42863,6 +42920,8 @@ Ecommerce site that is selling computers.