Commit 12c336e7 authored by unknown's avatar unknown

Syncing with 4.0 docs.

parent 7e05d7b4
...@@ -6957,21 +6957,30 @@ Follow the instructions to install it. ...@@ -6957,21 +6957,30 @@ Follow the instructions to install it.
@item @item
After @code{BitKeeper} is installed, first go to the directory you After @code{BitKeeper} is installed, first go to the directory you
want to work from, and then use this command if you want to clone want to work from, and then use one of the following commands to clone
the MySQL 3.23 branch: the MySQL version branch of your choice:
To clone the 3.23 branch, use this command:
@example @example
shell> bk clone bk://work.mysql.com:7000 mysql shell> bk clone bk://work.mysql.com:7000 mysql-3.23
@end example @end example
To clone the 4.0 branch, use this command instead: To clone the 4.0 branch, use this command:
@example @example
shell> bk clone bk://work.mysql.com:7001 mysql-4.0 shell> bk clone bk://work.mysql.com:7001 mysql-4.0
@end example @end example
In the preceding examples the source tree will be set up in the @file{mysql/} To clone the 4.1 branch, use this command:
or @file{mysql-4.0/} subdirectory of your current directory.
@example
shell> bk clone bk://work.mysql.com:7004 mysql-4.1
@end example
In the preceding examples the source tree will be set up in the
@file{mysql-3.23/}, @file{mysql-4.0/}, or @file{mysql-4.1/}
subdirectory of your current directory.
The initial download of the source tree may take a while, depending on the The initial download of the source tree may take a while, depending on the
speed of your connection; be patient. speed of your connection; be patient.
...@@ -8400,7 +8409,7 @@ or @code{myisamchk} for @code{MyISAM} tables (@file{.MYI}) and ...@@ -8400,7 +8409,7 @@ or @code{myisamchk} for @code{MyISAM} tables (@file{.MYI}) and
@item @item
If you want your @code{mysqldump} files to be compatible between If you want your @code{mysqldump} files to be compatible between
MySQL Version 3.22 and Version 3.23, you should not use the MySQL Version 3.22 and Version 3.23, you should not use the
@code{--opt} or @code{--full} option to @code{mysqldump}. @code{--opt} or @code{--all} option to @code{mysqldump}.
@item @item
Check all your calls to @code{DATE_FORMAT()} to make sure there is a Check all your calls to @code{DATE_FORMAT()} to make sure there is a
...@@ -16051,7 +16060,9 @@ Values in the scope fields may be specified as follows: ...@@ -16051,7 +16060,9 @@ Values in the scope fields may be specified as follows:
@itemize @bullet @itemize @bullet
@item @item
The wildcard characters @samp{%} and @samp{_} can be used in the @code{Host} The wildcard characters @samp{%} and @samp{_} can be used in the @code{Host}
and @code{Db} fields of either table. and @code{Db} fields of either table. If you wish to use for instance a
@samp{_} character as part of a database name, specify it as @samp{\_} in
the @code{GRANT} command.
@item @item
A @code{'%'} @code{Host} value in the @code{db} table means ``any host.'' A A @code{'%'} @code{Host} value in the @code{db} table means ``any host.'' A
...@@ -16676,6 +16687,13 @@ database privileges by using @code{ON db_name.*} syntax. If you specify ...@@ -16676,6 +16687,13 @@ database privileges by using @code{ON db_name.*} syntax. If you specify
that database. (@strong{Warning}: if you specify @code{ON *} and you that database. (@strong{Warning}: if you specify @code{ON *} and you
@strong{don't} have a current database, you will affect the global privileges!) @strong{don't} have a current database, you will affect the global privileges!)
@strong{Please note}: the @samp{_} and @samp{%} wildcards are allowed when
specifying database names in @code{GRANT} commands. This means that if you
wish to use for instance a @samp{_} character as part of a database name,
you should specify it as @samp{\_} in the @code{GRANT} command, to prevent
the user from being able to access additional databases matching the
wildcard pattern, e.g., @code{GRANT ... ON `foo\_bar`.* TO ...}.
In order to accommodate granting rights to users from arbitrary hosts, In order to accommodate granting rights to users from arbitrary hosts,
MySQL supports specifying the @code{user_name} value in the form MySQL supports specifying the @code{user_name} value in the form
@code{user@@host}. If you want to specify a @code{user} string @code{user@@host}. If you want to specify a @code{user} string
...@@ -16684,8 +16702,8 @@ containing special characters or wildcard characters (such as @samp{%}), you ...@@ -16684,8 +16702,8 @@ containing special characters or wildcard characters (such as @samp{%}), you
can quote the user or host name (for example, @code{'test-user'@@'test-hostname'}). can quote the user or host name (for example, @code{'test-user'@@'test-hostname'}).
You can specify wildcards in the hostname. For example, You can specify wildcards in the hostname. For example,
@code{user@@"%.loc.gov"} applies to @code{user} for any host in the @code{user@@'%.loc.gov'} applies to @code{user} for any host in the
@code{loc.gov} domain, and @code{user@@"144.155.166.%"} applies to @code{user} @code{loc.gov} domain, and @code{user@@'144.155.166.%'} applies to @code{user}
for any host in the @code{144.155.166} class C subnet. for any host in the @code{144.155.166} class C subnet.
The simple form @code{user} is a synonym for @code{user@@"%"}. The simple form @code{user} is a synonym for @code{user@@"%"}.
...@@ -17703,7 +17721,7 @@ the @code{mysqlhotcopy script}. @xref{mysqldump, , @code{mysqldump}}. ...@@ -17703,7 +17721,7 @@ the @code{mysqlhotcopy script}. @xref{mysqldump, , @code{mysqldump}}.
Do a full backup of your databases: Do a full backup of your databases:
@example @example
shell> mysqldump --tab=/path/to/some/dir --opt --full shell> mysqldump --tab=/path/to/some/dir --opt --all
or or
...@@ -19931,7 +19949,7 @@ cache. ...@@ -19931,7 +19949,7 @@ cache.
The value of the @code{--bdb-home} option. The value of the @code{--bdb-home} option.
@item @code{bdb_max_lock} @item @code{bdb_max_lock}
The maximum number of locks (1000 by default) you can have active on a The maximum number of locks (10,000 by default) you can have active on a
BDB table. You should increase this if you get errors of type @code{bdb: BDB table. You should increase this if you get errors of type @code{bdb:
Lock table is out of available locks} or @code{Got error 12 from ...} Lock table is out of available locks} or @code{Got error 12 from ...}
when you have do long transactions or when @code{mysqld} has to examine when you have do long transactions or when @code{mysqld} has to examine
...@@ -20030,15 +20048,15 @@ The maximum length of the word to be included in a @code{FULLTEXT} index. ...@@ -20030,15 +20048,15 @@ The maximum length of the word to be included in a @code{FULLTEXT} index.
@strong{Note: @code{FULLTEXT} indexes must be rebuilt after changing @strong{Note: @code{FULLTEXT} indexes must be rebuilt after changing
this variable.} (This option is new for MySQL 4.0.) this variable.} (This option is new for MySQL 4.0.)
@item @code{ft_max_word_len_sort} @item @code{ft_max_word_len_for_sort}
The maximum length of the word in a @code{FULLTEXT} index The maximum length of the word in a @code{FULLTEXT} index
to be used in fast index recreation method in @code{REPAIR}, to be used in fast index recreation method in @code{REPAIR},
@code{CREATE INDEX}, or @code{ALTER TABLE}. Longer words are inserted the @code{CREATE INDEX}, or @code{ALTER TABLE}. Longer words are inserted the
slow way. The rule of the thumb is as follows: with slow way. The rule of the thumb is as follows: with
@code{ft_max_word_len_sort} increasing, @strong{MySQL} will create bigger @code{ft_max_word_len_for_sort} increasing, @strong{MySQL} will create bigger
temporary files (thus slowing the process down, due to disk I/O), and will put temporary files (thus slowing the process down, due to disk I/O), and will put
fewer keys in one sort block (again, decreasing the efficiency). When fewer keys in one sort block (again, decreasing the efficiency). When
@code{ft_max_word_len_sort} is too small, instead, @strong{MySQL} will insert a @code{ft_max_word_len_for_sort} is too small, instead, @strong{MySQL} will insert a
lot of words into index the slow way, but short words will be inserted very lot of words into index the slow way, but short words will be inserted very
quickly. quickly.
...@@ -23324,7 +23342,7 @@ If you need better performance when you start using MySQL in a production ...@@ -23324,7 +23342,7 @@ If you need better performance when you start using MySQL in a production
environment, you can remove the @code{--log} option from @code{mysql.server} environment, you can remove the @code{--log} option from @code{mysql.server}
or change it to @code{--log-bin}. @xref{Binary log}. or change it to @code{--log-bin}. @xref{Binary log}.
The entries in this log are written as @code{mysqld} receives the queries. The entries in this log are written as @code{mysqld} receives the questions.
This may be different from the order in which the statements are executed. This may be different from the order in which the statements are executed.
This is in contrast to the update log and the binary log which are 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.
...@@ -23337,7 +23355,7 @@ after the query is executed, but before any locks are released. ...@@ -23337,7 +23355,7 @@ after the query is executed, but before any locks are released.
@cindex files, update log @cindex files, update log
@strong{Note}: the update log is replaced by the binary @strong{Note}: the update log is replaced by the binary
log. @xref{Binary log}. You can do anything with the binary log that you can do log. @xref{Binary log}. With this you can do anything that you can do
with the update log. with the update log.
When started with the @code{--log-update[=file_name]} option, When started with the @code{--log-update[=file_name]} option,
...@@ -23352,7 +23370,7 @@ flush-logs}, execute the @code{FLUSH LOGS} statement, or restart the server. ...@@ -23352,7 +23370,7 @@ flush-logs}, execute the @code{FLUSH LOGS} statement, or restart the server.
@strong{Note}: for the above scheme to work, you must not create @strong{Note}: for the above scheme to work, you must not create
your own files with the same filename as the update log + some extensions your own files with the same filename as the update log + some extensions
that may be regarded as a number in the directory used by the update log! that may be regarded as a number, in the directory used by the update log!
If you use the @code{--log} or @code{-l} options, @code{mysqld} writes a If you use the @code{--log} or @code{-l} options, @code{mysqld} writes a
general log with a filename of @file{hostname.log}, and restarts and general log with a filename of @file{hostname.log}, and restarts and
...@@ -23396,8 +23414,8 @@ and the crash. ...@@ -23396,8 +23414,8 @@ and the crash.
@cindex binary log @cindex binary log
@cindex files, binary log @cindex files, binary log
The binary log will replace the now deprecated update log, so The intention is that the binary log should replace the update log, so
we recommend you to switch to this log format as soon as possible. we recommend you to switch to this log format as soon as possible!
The binary log contains all information that is available in the update The binary log contains all information that is available in the update
log in a more efficient format. It also contains information about how long log in a more efficient format. It also contains information about how long
...@@ -23408,10 +23426,10 @@ find a problem query) you should use the general query log. @xref{Query log}. ...@@ -23408,10 +23426,10 @@ find a problem query) you should use the general query log. @xref{Query log}.
The binary log is also used when you are replicating a slave from a master. The binary log is also used when you are replicating a slave from a master.
@xref{Replication}. @xref{Replication}.
When started with the @code{--log-bin[=file_name]} option @code{mysqld} When started with the @code{--log-bin[=file_name]} option, @code{mysqld}
writes a log file containing all SQL commands that update data. If no writes a log file containing all SQL commands that update data. If no
file name is given it defaults to the name of the host machine followed file name is given, it defaults to the name of the host machine followed
by @code{-bin}. If a file name is given, but doesn't contain a path, the by @code{-bin}. If file name is given, but it doesn't contain a path, the
file is written in the data directory. file is written in the data directory.
If you supply an extension to @code{--log-bin=filename.extension}, the If you supply an extension to @code{--log-bin=filename.extension}, the
...@@ -23431,9 +23449,14 @@ to the binary log: ...@@ -23431,9 +23449,14 @@ to the binary log:
@multitable @columnfractions .38 .62 @multitable @columnfractions .38 .62
@item @strong{Option} @tab @strong{Description} @item @strong{Option} @tab @strong{Description}
@item @code{binlog-do-db=database_name} @tab Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned. (Example: @code{binlog-do-db=some_database}) @item @code{binlog-do-db=database_name} @tab
Tells the master it should log updates for the specified database, and
exclude all others not explicitly mentioned.
(Example: @code{binlog-do-db=some_database})
@item @code{binlog-ignore-db=database_name} @tab Tells the master that updates to the given database should not be logged to the binary log (Example: @code{binlog-ignore-db=some_database}) @item @code{binlog-ignore-db=database_name} @tab
Tells the master that updates to the given database should not be logged
to the binary log (Example: @code{binlog-ignore-db=some_database})
@end multitable @end multitable
To be able to know which different binary log files have been used, To be able to know which different binary log files have been used,
...@@ -23458,10 +23481,10 @@ shell> mysqlbinlog log-file | mysql -h server_name ...@@ -23458,10 +23481,10 @@ shell> mysqlbinlog log-file | mysql -h server_name
@end example @end example
You can also use the @code{mysqlbinlog} program to read the binary log You can also use the @code{mysqlbinlog} program to read the binary log
directly from a remote MySQL server. directly from a remote MySQL server!
@code{mysqlbinlog --help} will give you more information of how to use @code{mysqlbinlog --help} will give you more information of how to use
this program. this program!
If you are using @code{BEGIN [WORK]} or @code{SET AUTOCOMMIT=0}, you must If you are using @code{BEGIN [WORK]} or @code{SET AUTOCOMMIT=0}, you must
use the MySQL binary log for backups instead of the old update log. use the MySQL binary log for backups instead of the old update log.
...@@ -23470,13 +23493,14 @@ The binary logging is done immediately after a query completes but before ...@@ -23470,13 +23493,14 @@ The binary logging is done immediately after a query completes but before
any locks are released or any commit is done. This ensures that the log any locks are released or any commit is done. This ensures that the log
will be logged in the execution order. will be logged in the execution order.
Updates to a non-transactional table are stored in the binary log at Updates to non-transactional tables are stored in the binary log
once. For transactional tables such as @code{BDB} ! or @code{InnoDB} immediately after execution. For transactional tables such as @code{BDB}
tables, all updates are cached until a @code{COMMIT}. Every thread or @code{InnoDB} tables, all updates (@code{UPDATE}, @code{DELETE}
will, on start, allocate a buffer of @code{binlog_cache_size} to buffer or @code{INSERT}) that change tables are cached until a @code{COMMIT}.
queries. If a query is bigger than this, the thread will open a Every thread will, on start, allocate a buffer of @code{binlog_cache_size}
temporary file to handle the bigger cache. The temporary file will be to buffer queries. If a query is bigger than this, the thread will open
deleted when the thread ends. a temporary file to handle the bigger cache. The temporary file will
be deleted when the thread ends.
The @code{max_binlog_cache_size} can be used to restrict the total size used The @code{max_binlog_cache_size} can be used to restrict the total size used
to cache a multi-query transaction. to cache a multi-query transaction.
...@@ -23499,10 +23523,10 @@ more than @code{long_query_time} to execute. The time to get the initial ...@@ -23499,10 +23523,10 @@ more than @code{long_query_time} to execute. The time to get the initial
table locks are not counted as execution time. table locks are not counted as execution time.
The slow query log is logged after the query is executed and after all The slow query log is logged after the query is executed and after all
locks have been released. This may be different from the order in which locks has been released. This may be different from the order in which
the statements are executed. the statements are executed.
If no filename is given, it defaults to the name of the host machine If no file name is given, it defaults to the name of the host machine
suffixed with @code{-slow.log}. If a filename is given, but doesn't suffixed with @code{-slow.log}. If a filename is given, but doesn't
contain a path, the file is written in the data directory. contain a path, the file is written in the data directory.
...@@ -23512,8 +23536,8 @@ can become a difficult task. You can pipe the slow query log through the ...@@ -23512,8 +23536,8 @@ can become a difficult task. You can pipe the slow query log through the
@code{mysqldumpslow} command to get a summary of the queries which @code{mysqldumpslow} command to get a summary of the queries which
appear in the log. appear in the log.
If you use @code{--log-long-format} also, then queries that do not You are using @code{--log-long-format} then also queries that are not
use indexes are logged as well. @xref{Command-line options}. using indexes are printed. @xref{Command-line options}.
@node Log file maintenance, , Slow query log, Log Files @node Log file maintenance, , Slow query log, Log Files
...@@ -23523,19 +23547,22 @@ use indexes are logged as well. @xref{Command-line options}. ...@@ -23523,19 +23547,22 @@ use indexes are logged as well. @xref{Command-line options}.
@cindex maintaining, log files @cindex maintaining, log files
@cindex log files, maintaining @cindex log files, maintaining
MySQL has many log files which makes it easy to see what is going on. The MySQL Server can create a number of different log files, which make
@xref{Log Files}. One must, however, occasionally clean up it easy to see what is going on. @xref{Log Files}. One must however
after @code{MySQL} to ensure that the logs don't take up too much disk regularly clean up these files, to ensure that the logs don't take up
space by either removing or backing up old log files and then telling MySQL too much disk space.
to start logging to new files. @xref{Backup}.
On a Linux (@code{Redhat}) installation you can use the When using MySQL with log files, you will, from time to time,
want to remove/backup old log files and tell MySQL to start
logging on new files. @xref{Backup}.
On a Linux (@code{Redhat}) installation, you can use the
@code{mysql-log-rotate} script for this. If you installed MySQL @code{mysql-log-rotate} script for this. If you installed MySQL
from an RPM distribution the script should have been installed from an RPM distribution, the script should have been installed
automatically. @strong{Note}: you should be careful with this if you are automatically. Note that you should be careful with this if you are using
using the logs for replication. the log for replication!
On other systems you must install a short script yourself that you can On other systems you must install a short script yourself that you
start from @code{cron} to handle log files. start from @code{cron} to handle log files.
You can force MySQL to start using new log files by using You can force MySQL to start using new log files by using
...@@ -24203,7 +24230,7 @@ ignore, use the directive multiple times, once for each database. ...@@ -24203,7 +24230,7 @@ ignore, use the directive multiple times, once for each database.
You should not use this directive if you are using cross table updates You should not use this directive if you are using cross table updates
and you don't want these update to be replicated. and you don't want these update to be replicated.
The main reason for this behavior is that it's hard from the command The main reason for this behaviour is that it's hard from the command
alone know if a query should be replicated or not; For example if you alone know if a query should be replicated or not; For example if you
are using multi-table-delete or multi-table-update commands in MySQL 4.x are using multi-table-delete or multi-table-update commands in MySQL 4.x
that goes across multiple databases. It's also very fast to just check that goes across multiple databases. It's also very fast to just check
...@@ -24294,10 +24321,16 @@ summary of commands: ...@@ -24294,10 +24321,16 @@ summary of commands:
@item @strong{Command} @tab @strong{Description} @item @strong{Command} @tab @strong{Description}
@item @code{SLAVE START} @item @code{SLAVE START}
@tab Starts the slave thread. (Slave) @tab Starts the slave thread.
As of MySQL 4.0.2, you can add @code{IO_THREAD} or @code{SQL_THREAD}
options to the statement to start the I/O thread or the SQL thread.
The I/O thread reads queries from the master server and stores them in the
relay log. The SQL thread reads the relay log and executes the queries.
(Slave)
@item @code{SLAVE STOP} @item @code{SLAVE STOP}
@tab Stops the slave thread. (Slave) @tab Stops the slave thread. Like @code{SLAVE START}, this statement
may be used with @code{IO_THREAD} and @code{SQL_THREAD} options. (Slave)
@item @code{SET SQL_LOG_BIN=0} @item @code{SET SQL_LOG_BIN=0}
@tab Disables update logging if the user has the @code{SUPER} privilege. @tab Disables update logging if the user has the @code{SUPER} privilege.
...@@ -31225,7 +31258,7 @@ mysql> SELECT IF(STRCMP('test','test1'),'no','yes'); ...@@ -31225,7 +31258,7 @@ mysql> SELECT IF(STRCMP('test','test1'),'no','yes');
If @code{expr2} or @code{expr3} is explicitely @code{NULL} then the If @code{expr2} or @code{expr3} is explicitely @code{NULL} then the
result type of the @code{IF()} function is the type of the not result type of the @code{IF()} function is the type of the not
@code{NULL} column. (This behavior is new in MySQL 4.0.3). @code{NULL} column. (This behaviour is new in MySQL 4.0.3).
@code{expr1} is evaluated as an integer value, which means that if you are @code{expr1} is evaluated as an integer value, which means that if you are
testing floating-point or string values, you should do so using a comparison testing floating-point or string values, you should do so using a comparison
...@@ -35001,6 +35034,7 @@ DELAYED} when you are really sure you need it! ...@@ -35001,6 +35034,7 @@ DELAYED} when you are really sure you need it!
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
SET col_name1=expr1 [, col_name2=expr2, ...] SET col_name1=expr1 [, col_name2=expr2, ...]
[WHERE where_definition] [WHERE where_definition]
[ORDER BY ...]
[LIMIT #] [LIMIT #]
@end example @end example
...@@ -36226,10 +36260,8 @@ mysql> CREATE TABLE test (a INT NOT NULL AUTO_INCREMENT, ...@@ -36226,10 +36260,8 @@ mysql> CREATE TABLE test (a INT NOT NULL AUTO_INCREMENT,
This will create a @code{MyISAM} table with three columns, a, b, and c. This will create a @code{MyISAM} table with three columns, a, b, and c.
Notice that the columns from the @code{SELECT} statement are appended to Notice that the columns from the @code{SELECT} statement are appended to
the right side of the table, not overlapped onto it. the right side of the table, not overlapped onto it. Take the following
Still, the column from the @code{SELECT} will overlap the column from example:
the @code{CREATE} clause if they both have the same name. Take the following
examples:
@example @example
mysql> SELECT * FROM foo; mysql> SELECT * FROM foo;
...@@ -36250,18 +36282,6 @@ mysql> SELECT * FROM bar; ...@@ -36250,18 +36282,6 @@ mysql> SELECT * FROM bar;
| NULL | 1 | | NULL | 1 |
+------+---+ +------+---+
1 row in set (0.00 sec) 1 row in set (0.00 sec)
mysql> CREATE TABLE foobar (n FLOAT(3,2), m INT) SELECT n FROM foo;
Query OK, 1 row affected (0.02 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> SELECT * FROM foobar;
+------+------+
| n | m |
+------+------+
| 1.00 | NULL |
+------+------+
1 row in set (0.00 sec)
@end example @end example
For each row in table @code{foo}, a row is inserted in @code{bar} with For each row in table @code{foo}, a row is inserted in @code{bar} with
...@@ -36615,7 +36635,7 @@ deleted due to duplication of unique key values. ...@@ -36615,7 +36635,7 @@ deleted due to duplication of unique key values.
The @code{FOREIGN KEY}, @code{CHECK}, and @code{REFERENCES} clauses don't The @code{FOREIGN KEY}, @code{CHECK}, and @code{REFERENCES} clauses don't
actually do anything, except for InnoDB type tables which support actually do anything, except for InnoDB type tables which support
@code{ADD CONSTRAINT FOREIGN KEY (...) REFERENCES ... (...)}. @code{ADD CONSTRAINT FOREIGN KEY (...) REFERENCES ... (...)}.
Note that InnoDB does not allow a constraint @code{symbol} or @code{index_name} Note that InnoDB does not allow an @code{index_name}
to be specified. @xref{InnoDB}. to be specified. @xref{InnoDB}.
The syntax for other table types is provided only for compatibility, The syntax for other table types is provided only for compatibility,
to make it easier to port code from other SQL servers and to run applications to make it easier to port code from other SQL servers and to run applications
...@@ -39268,7 +39288,7 @@ constraints to guard the integrity of your data. ...@@ -39268,7 +39288,7 @@ constraints to guard the integrity of your data.
The syntax of a foreign key constraint definition in InnoDB: The syntax of a foreign key constraint definition in InnoDB:
@example @example
FOREIGN KEY (index_col_name, ...) [CONSTRAINT symbol] FOREIGN KEY (index_col_name, ...)
REFERENCES table_name (index_col_name, ...) REFERENCES table_name (index_col_name, ...)
[ON DELETE CASCADE | ON DELETE SET NULL] [ON DELETE CASCADE | ON DELETE SET NULL]
@end example @end example
...@@ -39327,7 +39347,7 @@ Starting from version 3.23.50 InnoDB allows you to add a new ...@@ -39327,7 +39347,7 @@ Starting from version 3.23.50 InnoDB allows you to add a new
foreign key constraint to a table through foreign key constraint to a table through
@example @example
ALTER TABLE yourtablename ALTER TABLE yourtablename
ADD CONSTRAINT FOREIGN KEY (...) REFERENCES anothertablename(...) ADD [CONSTRAINT symbol] FOREIGN KEY (...) REFERENCES anothertablename(...)
@end example @end example
Remember to create the required indexes first, though. Remember to create the required indexes first, though.
...@@ -50833,8 +50853,10 @@ each individual 4.0.x release. ...@@ -50833,8 +50853,10 @@ each individual 4.0.x release.
@appendixsubsec Changes in release 4.0.5 @appendixsubsec Changes in release 4.0.5
@itemize @itemize
@item @item
Give error if one has more than 2 ^ 32 rows in a MyISAM MERGE file and one Small fix in @code{mysqld_safe} for some shells.
has not compiled MySQL with @code{-DBIG_TABLES}. @item
Give error if a @code{MyISAM} @code{MERGE} table has more than 2 ^ 32 rows and
MySQL was not compiled with with @code{-DBIG_TABLES}.
@item @item
Fixed some @code{ORDER BY ... DESC} problems with InnoDB. Fixed some @code{ORDER BY ... DESC} problems with InnoDB.
@item @item
...@@ -50854,7 +50876,7 @@ Fixed bug where @code{GRANT}/@code{REVOKE} failed if hostname was given in ...@@ -50854,7 +50876,7 @@ Fixed bug where @code{GRANT}/@code{REVOKE} failed if hostname was given in
not matching case. not matching case.
@item @item
Don't give warning in @code{LOAD DATA INFILE} when setting a Don't give warning in @code{LOAD DATA INFILE} when setting a
@code{timestamp} to a string of '0'. @code{timestamp} to a string value of @code{'0'}.
@item @item
Fixed bug in @code{myisamchk -R} mode. Fixed bug in @code{myisamchk -R} mode.
@item @item
...@@ -50927,7 +50949,7 @@ output in @code{SHOW GRANTS}. ...@@ -50927,7 +50949,7 @@ output in @code{SHOW GRANTS}.
Fixed that @code{mysqld --help} reports correct values for @code{--datadir} Fixed that @code{mysqld --help} reports correct values for @code{--datadir}
and @code{--bind-address}. and @code{--bind-address}.
@item @item
Fixed that one can drop UDFs that didn't exist when mysqld was started. Fixed that one can drop UDFs that didn't exist when @code{mysqld} was started.
@item @item
Fixed core dump problem with @code{SHOW VARIABLES} on some 64 bit systems Fixed core dump problem with @code{SHOW VARIABLES} on some 64 bit systems
(like Solaris sparc). (like Solaris sparc).
...@@ -51009,7 +51031,7 @@ that can be used as data values in queries. ...@@ -51009,7 +51031,7 @@ that can be used as data values in queries.
Changed variable @code{DELAY_KEY_WRITE} to an enum to allow one set Changed variable @code{DELAY_KEY_WRITE} to an enum to allow one set
@code{DELAY_KEY_WRITE} for all tables without taking down the server. @code{DELAY_KEY_WRITE} for all tables without taking down the server.
@item @item
Changed behavior of @code{IF(condition,column,NULL)} so that it returns Changed behaviour of @code{IF(condition,column,NULL)} so that it returns
the value of the column type. the value of the column type.
@item @item
Made @code{safe_mysqld} a symlink to @code{mysqld_safe} in binary distribution. Made @code{safe_mysqld} a symlink to @code{mysqld_safe} in binary distribution.
...@@ -51281,6 +51303,9 @@ Fixed bug in truncation operator for boolean full-text search. ...@@ -51281,6 +51303,9 @@ Fixed bug in truncation operator for boolean full-text search.
Allow value of @code{--user=#} option for @code{mysqld} to be specified Allow value of @code{--user=#} option for @code{mysqld} to be specified
as a numeric user ID. as a numeric user ID.
@item @item
Fixed a bug where @code{SQL_CALC_ROWS} returned an incorrect value when used
with one table and @code{ORDER BY} and with @code{InnoDB} tables.
@item
Fixed that @code{SELECT 0 LIMIT 0} doesn't hang thread. Fixed that @code{SELECT 0 LIMIT 0} doesn't hang thread.
@item @item
Fixed some problems with @code{USE/IGNORE INDEX} when using Fixed some problems with @code{USE/IGNORE INDEX} when using
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment