Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.1842 04/07/14 00:01:18 paul@stripped +1 -0
manual.texi:
Add tags.
Docs/manual.texi
1.1833 04/07/14 00:01:03 paul@stripped +1080 -1079
Add tags.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: paul
# Host: ice.snake.net
# Root: /Volumes/ice2/MySQL/bk/mysqldoc
--- 1.1832/Docs/manual.texi Tue Jul 13 20:30:11 2004
+++ 1.1833/Docs/manual.texi Wed Jul 14 00:01:03 2004
@@ -326,9 +326,9 @@
@subsection Conventions Used in This Manual
@c TODO: After conversion to DocBook, we'll be able to incorporate the
-@c <userinput> and <replaceable> tags. Uncomment the items below that
-@c refer to the bold constant and bold italic conventions. Change them
-@c to <userinput> and <replaceable>
+@c <userinput> tag. Uncomment the item below that
+@c refers to the bold constant convention. Change it
+@c to <userinput>.
This manual uses certain typographical conventions:
@@ -346,9 +346,9 @@
@c @item @strong{@code{constant bold}}
@c Bold constant-width font is used to indicate input that you type in examples.
-@c @item @emph{@code{constant italic}}
-@c Italic constant-width font is used to indicate variable input for which you
-@c should substitute a value of your own choosing.
+@item @var{constant italic}
+Italic constant-width font is used to indicate variable input for which you
+should substitute a value of your own choosing.
@item @file{filename}
Constant-width font with surrounding quotes is used for filenames and
@@ -388,11 +388,11 @@
Database, table, and column names must often be substituted into statements. To
indicate that such substitution is necessary, this manual uses
-@code{db_name}, @code{tbl_name}, and @code{col_name}. For example, you might
+@var{db_name}, @var{tbl_name}, and @var{col_name}. For example, you might
see a statement like this:
@example
-mysql> SELECT col_name FROM db_name.tbl_name;
+mysql> SELECT @var{col_name} FROM @var{db_name}.@var{tbl_name};
@end example
This means that if you were to enter a similar statement, you would supply
@@ -410,7 +410,7 @@
statement, @code{IF EXISTS} is optional:
@example
-DROP TABLE [IF EXISTS] tbl_name
+DROP TABLE [IF EXISTS] @var{tbl_name}
@end example
When a syntax element consists of a number of alternatives, the alternatives
@@ -419,14 +419,14 @@
brackets (@samp{[} and @samp{]}):
@example
-TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)
+TRIM([[BOTH | LEADING | TRAILING] [@var{remstr}] FROM] @var{str})
@end example
When one member from a set of choices @emph{must} be chosen, the
alternatives are listed within braces (@samp{@{} and @samp{@}}):
@example
-@{DESCRIBE | DESC@} tbl_name [col_name | wild]
+@{DESCRIBE | DESC@} @var{tbl_name} [@var{col_name} | @var{wild}]
@end example
An ellipsis (@code{...}) indicates the omission of a section of a statement,
@@ -930,7 +930,7 @@
By default, MySQL creates @code{MyISAM} tables with an internal
structure that allows a maximum size of about 4GB. You can
check the maximum table size for a table with the @code{SHOW TABLE STATUS}
-statement or with @code{myisamchk -dv tbl_name}.
+statement or with @code{myisamchk -dv @var{tbl_name}}.
@xref{SHOW, , @code{SHOW}}.
If you need a @code{MyISAM} table that will be larger than 4GB in size (and your
@@ -2103,7 +2103,7 @@
@item New functionality
@itemize @bullet
@item
-@code{CREATE TABLE tbl_name2 LIKE tbl_name1} allows you to create, with
+@code{CREATE TABLE @var{tbl_name2} LIKE @var{tbl_name1}} allows you to create, with
a single statement, a new table with a structure exactly like that of an
existing table.
@item
@@ -2325,7 +2325,7 @@
@item Speed enhancements
@itemize @bullet
@item
-@code{SHOW COLUMNS FROM tbl_name} (used by the @code{mysql} client to allow
+@code{SHOW COLUMNS FROM @var{tbl_name}} (used by the @code{mysql} client to allow
expansions of column names) should not open the table, only the
definition file. This will require less memory and be much faster.
@item
@@ -2444,7 +2444,7 @@
@item
Change when user variables are updated so that you can use them with
@code{GROUP BY}, as in the following statement:
-@code{SELECT id, @@a:=COUNT(*), SUM(sum_col)/@@a FROM tbl_name GROUP BY id}.
+@code{SELECT id, @@a:=COUNT(*), SUM(@var{sum_col})/@@a FROM @var{tbl_name} GROUP BY id}.
@item
Add an @code{IMAGE} option to @code{LOAD DATA INFILE} to not update
@code{TIMESTAMP} and @code{AUTO_INCREMENT} columns.
@@ -2464,7 +2464,7 @@
@item
Make @code{LOAD DATA INFILE} understand syntax like this:
@example
-LOAD DATA INFILE 'file_name.txt' INTO TABLE tbl_name
+LOAD DATA INFILE '@var{file_name}.txt' INTO TABLE @var{tbl_name}
TEXT_FIELDS (text_col1, text_col2, text_col3)
SET table_col1=CONCAT(text_col1, text_col2),
table_col3=23
@@ -2485,11 +2485,11 @@
@item
Add a storage engine interface for table information so that you can use it as a system
table. This would be a bit slow if you requested information about all tables,
-but very flexible. @code{SHOW INFO FROM tbl_name} for basic table information
+but very flexible. @code{SHOW INFO FROM @var{tbl_name}} for basic table information
should be implemented.
@item
-Allow @code{SELECT a FROM tbl_name1 LEFT JOIN tbl_name2 USING (a)}; in this
-case @code{a} is assumed to come from @code{tbl_name1}.
+Allow @code{SELECT a FROM @var{tbl_name1} LEFT JOIN @var{tbl_name2} USING (a)}; in this
+case @code{a} is assumed to come from @var{tbl_name1}.
@item
@code{DELETE} and @code{REPLACE} options to the @code{UPDATE} statement
(this will delete rows when a duplicate-key error occurs while updating).
@@ -2593,7 +2593,7 @@
@item
Don't use @code{Item_copy_string} on numerical values to avoid
number-to-string-to-number conversion in case of
-@code{SELECT COUNT(*)*(id+0) FROM tbl_name GROUP BY id}.
+@code{SELECT COUNT(*)*(id+0) FROM @var{tbl_name} GROUP BY id}.
@item
Change so that @code{ALTER TABLE} doesn't abort clients
that execute @code{INSERT DELAYED}.
@@ -2629,9 +2629,9 @@
Automatically close some tables if a table, temporary table, or temporary file
gets error 23 (too many open files).
@item
-Better constant propagation. When an occurrence of @code{col_name=n}
+Better constant propagation. When an occurrence of @var{col_name=n}
is found in an expression, for some constant @code{n}, replace other
-occurrences of @code{col_name} within the expression with @code{n}.
+occurrences of @var{col_name} within the expression with @code{n}.
Currently, this is done only for some simple cases.
@item
Change all const expressions with calculated expressions if possible.
@@ -3082,7 +3082,7 @@
@item
If a database table is related to the problem, include the output from
-@code{mysqldump --no-data db_name tbl_name}. This is very easy
+@code{mysqldump --no-data @var{db_name} @var{tbl_name}}. This is very easy
to do and is a powerful way to get information about any table in a database.
The information will help us create a situation matching the one you have.
@@ -3090,7 +3090,7 @@
For speed-related bugs or problems with @code{SELECT} statements, you
should always include the output of @code{EXPLAIN SELECT ...}, and at
least the number of rows that the @code{SELECT} statement produces. You
-should also include the output from @code{SHOW CREATE TABLE tbl_name}
+should also include the output from @code{SHOW CREATE TABLE @var{tbl_name}}
for each involved table. The more information you give about your
situation, the more likely it is that someone can help you.
@@ -3520,7 +3520,7 @@
@item
In SQL statements, you can access tables from different databases
-with the @code{db_name.tbl_name} syntax. Some SQL servers provide
+with the @var{db_name.tbl_name} syntax. Some SQL servers provide
the same functionality but call this @code{User space}.
MySQL Server doesn't support tablespaces such as used in statements like this:
@code{CREATE TABLE ralph.my_table...IN my_tablespace}.
@@ -3688,7 +3688,7 @@
@code{FROM} in @code{SELECT} statements. For example:
@example
-mysql> SELECT col1=1 AND col2=2 FROM tbl_name;
+mysql> SELECT col1=1 AND col2=2 FROM @var{tbl_name};
@end example
@item
@@ -4002,7 +4002,7 @@
like the following:
@example
-UPDATE tbl_name SET row_flag=1 WHERE id=ID;
+UPDATE @var{tbl_name} SET row_flag=1 WHERE id=ID;
@end example
MySQL returns 1 for the number of affected rows if the row was
@@ -4011,7 +4011,7 @@
You can think of it as though MySQL Server changed the preceding query to:
@example
-UPDATE tbl_name SET row_flag=1 WHERE id=ID AND row_flag <> 1;
+UPDATE @var{tbl_name} SET row_flag=1 WHERE id=ID AND row_flag <> 1;
@end example
@end itemize
@@ -4239,13 +4239,13 @@
@example
shell> replace " --" " #" < text-file-with-funny-comments.sql \
- | mysql db_name
+ | mysql @var{db_name}
@end example
instead of the usual:
@example
-shell> mysql db_name < text-file-with-funny-comments.sql
+shell> mysql @var{db_name} < text-file-with-funny-comments.sql
@end example
You can also edit the command file ``in place'' to change the @samp{--}
@@ -4704,7 +4704,7 @@
The default value of @code{max_sort_length} value is 1024. It can be changed
at server startup time. A workaround for most cases is to use a substring.
For example:
-@code{SELECT DISTINCT LEFT(blob_col,2048) FROM tbl_name}.
+@code{SELECT DISTINCT LEFT(blob_col,2048) FROM @var{tbl_name}}.
@item
Numeric
@@ -4748,7 +4748,7 @@
by @code{2}, not @code{1}:
@example
-mysql> UPDATE tbl_name SET KEY=KEY+1,KEY=KEY+1;
+mysql> UPDATE @var{tbl_name} SET KEY=KEY+1,KEY=KEY+1;
@end example
@item
@@ -4846,13 +4846,13 @@
search for records and the same row may have been found multiple times:
@example
-UPDATE tbl_name SET KEY=KEY+1 WHERE KEY > 100;
+UPDATE @var{tbl_name} SET KEY=KEY+1 WHERE KEY > 100;
@end example
A workaround is to use:
@example
-UPDATE tbl_name SET KEY=KEY+1 WHERE KEY+0 > 100;
+UPDATE @var{tbl_name} SET KEY=KEY+1 WHERE KEY+0 > 100;
@end example
This will work because MySQL Server will not use an index on expressions in
@@ -5378,7 +5378,7 @@
@item @code{--with-raid}
@item @code{--with-libwrap}
@item @code{--with-named-z-libs} (this is done for some of the binaries)
-@item @code{--with-debug[=full]}
+@item @code{--with-debug[=@var{full}]}
@end itemize
@item
@@ -10192,7 +10192,7 @@
shell> mysqladmin -h host_name variables
@end example
-@code{host_name} is the name of the MySQL server host.
+@var{host_name} is the name of the MySQL server host.
If you get @code{Errcode 13} (which means @code{Permission denied}) when
starting @code{mysqld}, this means that the access privileges of the data
@@ -10224,14 +10224,14 @@
(typically @file{C:\mysql\data} on Windows, @file{/usr/local/mysql/data}
for a Unix binary distribution, and @file{/usr/local/var} for a Unix source
distribution). Look in the data directory for files with names of the form
-@file{host_name.err} and @file{host_name.log}, where @code{host_name} is the
+@file{@var{host_name}.err} and @file{@var{host_name}.log}, where @var{host_name} is the
name of your server host. (Older servers on Windows use @file{mysql.err}
as the error log name.) Then check the last few lines of these files.
On Unix, you can use @code{tail} to display the last few lines:
@example
-shell> tail host_name.err
-shell> tail host_name.log
+shell> tail @var{host_name}.err
+shell> tail @var{host_name}.log
@end example
The error log contains information that indicates why the server couldn't
@@ -10424,7 +10424,7 @@
mysql> SET PASSWORD FOR ''@@'host_name' = PASSWORD('newpwd');
@end example
-In the second @code{SET PASSWORD} statement, replace @code{host_name}
+In the second @code{SET PASSWORD} statement, replace @var{host_name}
with the name of the server host. This is the name that is specified in
the @code{Host} column of the non-@code{localhost} record for @code{root}
in the @code{user} table. If you don't know what hostname this is, issue
@@ -10511,7 +10511,7 @@
mysql> SET PASSWORD FOR 'root'@@'host_name' = PASSWORD('newpwd');
@end example
-In the second @code{SET PASSWORD} statement, replace @code{host_name} with
+In the second @code{SET PASSWORD} statement, replace @var{host_name} with
the name of the server host. This is the same hostname that you used when
you assigned the anonymous account passwords.
@@ -10524,7 +10524,7 @@
@end example
These commands apply both to Windows and to Unix. In the second command,
-replace @code{host_name} with the name of the server host. The double
+replace @var{host_name} with the name of the server host. The double
quotes around the password are not always necessary, but you should use
them if the password contains spaces or other characters that are special
to your command interpreter.
@@ -10924,7 +10924,7 @@
should add @code{+0} to @code{TIMESTAMP} columns when you retrieve them:
@example
-mysql> SELECT ts_col + 0 FROM tbl_name;
+mysql> SELECT ts_col + 0 FROM @var{tbl_name};
@end example
Display widths for @code{TIMESTAMP} columns are no longer supported.
@@ -11110,7 +11110,7 @@
use this command:
@example
-shell> mysql_convert_table_format database db_name
+shell> mysql_convert_table_format database @var{db_name}
@end example
Note that this should be used only if all tables in the given database
@@ -11123,13 +11123,13 @@
@code{ALTER TABLE} statement for each table to be converted:
@example
-mysql> ALTER TABLE tbl_name TYPE=MyISAM;
+mysql> ALTER TABLE @var{tbl_name} TYPE=MyISAM;
@end example
If you are not sure of the table type for a given table, use this statement:
@example
-mysql> SHOW TABLE STATUS LIKE 'tbl_name';
+mysql> SHOW TABLE STATUS LIKE '@var{tbl_name}';
@end example
@item
@@ -11318,7 +11318,7 @@
@item
You should use @code{TRUNCATE TABLE} when you want to delete all rows
from a table and you don't need to obtain a count of the number of rows
-that were deleted. (@code{DELETE FROM tbl_name} returns a row count in
+that were deleted. (@code{DELETE FROM @var{tbl_name}} returns a row count in
4.0 and doesn't reset the @code{AUTO_INCREMENT} counter, and
@code{TRUNCATE TABLE} is faster.)
@@ -11416,7 +11416,7 @@
@code{MyISAM} unless you start @code{mysqld} with the
@code{--default-table-type=isam} option. You don't have to convert your old
@code{ISAM} tables to use them with MySQL 3.23. You can convert an
-@code{ISAM} table to @code{MyISAM} format with @code{ALTER TABLE tbl_name
+@code{ISAM} table to @code{MyISAM} format with @code{ALTER TABLE @var{tbl_name}
TYPE=MyISAM} or the Perl script @code{mysql_convert_table_format}.
@item
@@ -11842,8 +11842,8 @@
database is located:
@example
-shell> mysqladmin -h 'other hostname' create db_name
-shell> mysqldump --opt db_name | mysql -h 'other hostname' db_name
+shell> mysqladmin -h '@var{other_hostname}' create @var{db_name}
+shell> mysqldump --opt @var{db_name} | mysql -h '@var{other_hostname}' @var{db_name}
@end example
@c TODO: next example not only changes copy direction (from local->remote
@@ -11855,8 +11855,8 @@
you can use:
@example
-shell> mysqladmin create db_name
-shell> mysqldump -h 'other hostname' --opt --compress db_name | mysql db_name
+shell> mysqladmin create @var{db_name}
+shell> mysqldump -h '@var{other_hostname}' --opt --compress @var{db_name} | mysql
@var{db_name}
@end example
You can also store the result in a file, then transfer the file to the
@@ -11864,7 +11864,7 @@
you can dump a database to a file on the source machine like this:
@example
-shell> mysqldump --quick db_name | gzip > db_name.contents.gz
+shell> mysqldump --quick @var{db_name} | gzip > @var{db_name.contents}.gz
@end example
(The file created in this example is compressed.) Transfer the file
@@ -11872,8 +11872,8 @@
there:
@example
-shell> mysqladmin create db_name
-shell> gunzip < db_name.contents.gz | mysql db_name
+shell> mysqladmin create @var{db_name}
+shell> gunzip < @var{db_name.contents}.gz | mysql @var{db_name}
@end example
@cindex @code{mysqldump}
@@ -11888,7 +11888,7 @@
@example
shell> mkdir DUMPDIR
-shell> mysqldump --tab=DUMPDIR db_name
+shell> mysqldump --tab=DUMPDIR @var{db_name}
@end example
Then transfer the files in the @code{DUMPDIR} directory to some corresponding
@@ -11896,9 +11896,9 @@
there:
@example
-shell> mysqladmin create db_name # create database
-shell> cat DUMPDIR/*.sql | mysql db_name # create tables in database
-shell> mysqlimport db_name DUMPDIR/*.txt # load data into tables
+shell> mysqladmin create @var{db_name} # create database
+shell> cat DUMPDIR/*.sql | mysql @var{db_name} # create tables in database
+shell> mysqlimport @var{db_name} DUMPDIR/*.txt # load data into tables
@end example
Also, don't forget to copy the @code{mysql} database because that is
@@ -16368,7 +16368,7 @@
indexed, and @code{Default} specifies the column's default value.
If you have indexes on a table,
-@code{SHOW INDEX FROM tbl_name} produces information about them.
+@code{SHOW INDEX FROM @var{tbl_name}} produces information about them.
@node Batch mode, Examples, Getting information, Tutorial
@@ -17244,7 +17244,7 @@
something like this:
@example
-LOAD DATA INFILE '/local/access_log' INTO TABLE tbl_name
+LOAD DATA INFILE '@var{/local/access_log}' INTO TABLE @var{tbl_name}
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
@end example
@@ -17618,7 +17618,7 @@
@item @strong{Filename} @tab @strong{Purpose}
@item @code{/etc/my.cnf} @tab Global options
@item @code{DATADIR/my.cnf} @tab Server-specific options
-@item @code{defaults-extra-file} @tab The file specified with
@code{--defaults-extra-file=path}, if any
+@item @code{defaults-extra-file} @tab The file specified with
@code{--defaults-extra-file=@var{path}}, if any
@item @code{~/.my.cnf} @tab User-specific options
@end multitable
@@ -17786,13 +17786,13 @@
@item --print-defaults
Print the program name and all options that it will get from option files.
-@item --defaults-file=path_name
-Use only the given option file. @code{path_name} is the full pathname
+@item --defaults-file=@var{path_name}
+Use only the given option file. @var{path_name} is the full pathname
to the file.
-@item --defaults-extra-file=path_name
+@item --defaults-extra-file=@var{path_name}
Read this option file after the global option file but before the user
-option file. @code{path_name} is the full pathname to the file.
+option file. @var{path_name} is the full pathname to the file.
@end table
@@ -18210,7 +18210,7 @@
A value of @code{DISABLED} occurs either because the server was
started with an option that disables the feature, or because not
all options required to enable it were given. In the latter case, the
-@code{host_name.err} error log file should contain a reason indicating why
+@code{@var{host_name}.err} error log file should contain a reason indicating why
the option is disabled.
One situation in which you might see @code{DISABLED} occurs with MySQL 3.23
@@ -18301,38 +18301,38 @@
@table @code
-@item --basedir=path
+@item --basedir=@var{path}
The path to the MySQL installation directory.
-@item --core-file-size=size
+@item --core-file-size=@var{size}
The size of the core file @code{mysqld} should be able to create. The option
value is passed to @code{ulimit -c}.
-@item --datadir=path
+@item --datadir=@var{path}
The path to the data directory.
-@item --defaults-extra-file=path
+@item --defaults-extra-file=@var{path}
The name of an option file to be read in addition to the usual option files.
-@item --defaults-file=path
+@item --defaults-file=@var{path}
The name of an option file to be read instead of the usual option files.
-@item --err-log=path
+@item --err-log=@var{path}
The old form of the @code{--log-error} option, to be used before MySQL 4.0.
-@item --ledir=path
+@item --ledir=@var{path}
The path to the directory containing the @code{mysqld} program.
Use this option to explicitly indicate the location of the server.
-@item --log-error=path
+@item --log-error=@var{path}
Write the error log to the given file. @xref{Error log}.
-@item --mysqld=prog_name
+@item --mysqld=@var{prog_name}
The name of the server program (in the @code{ledir} directory) that you
want to start. This option is needed if you use the MySQL binary distribution
but have the data directory outside of the binary distribution.
-@item --mysqld-version=suffix
+@item --mysqld-version=@var{suffix}
This option is similar to the @code{--mysqld} option, but you specify only
the suffix for the server program name. The basename is assumed to be
@code{mysqld}. For example, if you use @code{--mysqld-version=max},
@@ -18340,35 +18340,35 @@
@code{ledir} directory. If the argument to @code{--mysqld-version} is
empty, @code{mysqld_safe} uses @code{mysqld} in the @code{ledir} directory.
-@item --nice=priority
+@item --nice=@var{priority}
Use the @code{nice} program to set the server's scheduling priority to the
given value. This option was added in MySQL 4.0.14.
@item --no-defaults
Do not read any option files.
-@item --open-files-limit=count
+@item --open-files-limit=@var{count}
The number of files @code{mysqld} should be able to open. The option value
is passed to @code{ulimit -n}. Note that you need to start
@code{mysqld_safe} as @code{root} for this to work properly!
-@item --pid-file=path
+@item --pid-file=@var{path}
The path to the process ID file.
-@item --port=port_num
+@item --port=@var{port_num}
The port number to use when listening for TCP/IP connections.
-@item --socket=path
+@item --socket=@var{path}
The Unix socket file to use for local connections.
-@item --timezone=zone
+@item --timezone=@var{zone}
Set the @code{TZ} time zone environment variable to the given option value.
Consult your operating system documentation for legal time zone
specification formats.
-@item --user=@{user_name | user_id@}
-Run the @code{mysqld} server as the user having the name @code{user_name} or
-the numeric user ID @code{user_id}.
+@item --user=@{@var{user_name} | @var{user_id}@}
+Run the @code{mysqld} server as the user having the name @var{user_name} or
+the numeric user ID @var{user_id}.
(``User'' in this context refers to a system login account, not a MySQL user
listed in the grant tables.)
@@ -18550,7 +18550,7 @@
@table @code
-@item --config-file=name
+@item --config-file=@var{name}
@cindex @code{config-file}, @code{mysqld_multi} option
Specify the name of an alternative option file. This affects where
@code{mysqld_multi} looks for @code{[mysqld#]} option groups. Without this
@@ -18567,16 +18567,16 @@
@cindex @code{help}, @code{mysqld_multi} option
Display a help message and exit.
-@item --log=name
+@item --log=@var{name}
@cindex @code{log}, @code{mysqld_multi} option
Specify the name of the log file. If the file exists, log output is appended
to it.
-@item --mysqladmin=prog_name
+@item --mysqladmin=@var{prog_name}
@cindex @code{mysqladmin}, @code{mysqld_multi} option
The @code{mysqladmin} binary to be used to stop servers.
-@item --mysqld=prog_name
+@item --mysqld=@var{prog_name}
@cindex @code{mysqld}, @code{mysqld_multi} option
The @code{mysqld} binary to be used. Note that you can specify
@code{mysqld_safe} as the value for this option also. The options are passed
@@ -18589,7 +18589,7 @@
Print log information to stdout rather than to the log file. By default,
output goes to the log file.
-@item --password=password
+@item --password=@var{password}
@cindex @code{password}, @code{mysqld_multi} option
The password of the MySQL account to use when invoking @code{mysqladmin}.
Note that the password value is not optional for this option, unlike for other
@@ -18603,7 +18603,7 @@
made using the Unix socket file. This option affects @code{stop} and
@code{report} operations.
-@item --user=user_name
+@item --user=@var{user_name}
@cindex @code{user}, @code{mysqld_multi} option
The username of the MySQL account to use when invoking @code{mysqladmin}.
@@ -18627,7 +18627,7 @@
executing the following commands for each server:
@example
-shell> mysql -u root -S /tmp/mysql.sock -proot_password
+shell> mysql -u root -S /tmp/mysql.sock -p@var{root_password}
mysql> GRANT SHUTDOWN ON *.*
-> TO 'multi_admin'@@'localhost' IDENTIFIED BY 'multipass';
@end example
@@ -18850,7 +18850,7 @@
For more precise control over the server SQL mode, use the @code{--sql-mode}
option instead.
-@item --basedir=path, -b path
+@item --basedir=@var{path}, -b @var{path}
The path to the MySQL installation directory. All paths are usually resolved
relative to this.
@@ -18861,7 +18861,7 @@
handle large result sets automatically by using memory for small temporary
tables and switching to disk tables where necessary.
-@item --bind-address=IP
+@item --bind-address=@var{IP}
The IP address to bind to.
@item --console
@@ -18869,10 +18869,10 @@
is specified. On Windows, @code{mysqld} will not close the console screen if
this option is used.
-@item --character-sets-dir=path
+@item --character-sets-dir=@var{path}
The directory where character sets are installed. @xref{Character sets}.
-@item --chroot=path
+@item --chroot=@var{path}
Put the @code{mysqld} server in a closed environment during startup by using the
@code{chroot()} system call. This is a recommended security measure as of
MySQL 4.0. (MySQL 3.23 is not able to provide a @code{chroot()} jail that is
@@ -18886,28 +18886,28 @@
Note that on some systems, such as Solaris, you will
not get a core file if you are also using the @code{--user} option.
-@item --datadir=path, -h path
+@item --datadir=@var{path}, -h @var{path}
The path to the data directory.
-@item --debug[=debug_options], -# [debug_options]
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
If MySQL is configured with @code{--with-debug}, you can use this
option to get a trace file of what @code{mysqld} is doing.
-The @code{debug_options} string often is @code{'d:t:o,file_name'}.
+The @var{debug_options} string often is @code{'d:t:o,@var{file_name}'}.
@xref{Making trace files}.
-@item --default-character-set=charset
-Use @code{charset} as the default character set. @xref{Character sets}.
+@item --default-character-set=@var{charset}
+Use @var{charset} as the default character set. @xref{Character sets}.
-@item --default-collation=collation
-Use @code{collation} as the default collation.
+@item --default-collation=@var{collation}
+Use @var{collation} as the default collation.
This option is available as of MySQL 4.1.1.
@xref{Character sets}.
-@item --default-storage-engine=type
+@item --default-storage-engine=@var{type}
This option is a synonym for @code{--default-table-type}.
It is available as of MySQL 4.1.2.
-@item --default-table-type=type
+@item --default-table-type=@var{type}
Set the default table type for tables. @xref{Table types}.
@item --delay-key-write[= OFF | ON | ALL]
@@ -18930,7 +18930,7 @@
Old form of @code{--delay-key-write=ALL} for use prior to MySQL 4.0.3.
As of 4.0.3, use @code{--delay-key-write} instead.
-@item --des-key-file=file_name
+@item --des-key-file=@var{file_name}
Read the default keys used by @code{DES_ENCRYPT()} and @code{DES_DECRYPT()}
from this file.
@@ -18940,7 +18940,7 @@
only with the @code{mysqld-nt} and @code{mysqld-max-nt} servers that support
named pipe connections.
-@item --exit-info[=flags], -T [flags]
+@item --exit-info[=@var{flags}], -T [@var{flags}]
This is a bit mask of different flags you can use for debugging the
@code{mysqld} server. Do not use this option unless you know
exactly what it does!
@@ -18976,7 +18976,7 @@
the operating system handle the synching to disk.
@xref{Crashing}.
-@item --init-file=file
+@item --init-file=@var{file}
Read SQL statements from this file at startup.
Each statement must be on a single line and should not include comments.
@@ -18985,32 +18985,32 @@
the binary log.
@xref{Binary log}.
-@item --language=lang_name, -L lang_name
-Client error messages in given language. @code{lang_name} can be given as the
+@item --language=@var{lang_name}, -L @var{lang_name}
+Client error messages in given language. @var{lang_name} can be given as the
language name or as the full pathname to the directory where the language
files are installed.
@xref{Languages}.
-@item --log[=file], -l [file]
+@item --log[=@var{file}], -l [@var{file}]
Log connections and queries to this file. @xref{Query log}. If you don't
-specify a filename, MySQL will use @code{host_name.log} as the filename.
+specify a filename, MySQL will use @code{@var{host_name}.log} as the filename.
-@item --log-bin=[file]
+@item --log-bin=[@var{file}]
The binary log file.
Log all queries that change data to this file. Used for backup and
replication. @xref{Binary log}. If you don't specify a filename,
-MySQL will use @code{host_name-bin} as the filename.
+MySQL will use @code{@var{host_name}-bin} as the filename.
-@item --log-bin-index[=file]
+@item --log-bin-index[=@var{file}]
The index file for binary log filenames. @xref{Binary log}.
-If you don't specify a filename, MySQL will use @code{host_name-bin.index} as
+If you don't specify a filename, MySQL will use @code{@var{host_name}-bin.index} as
the filename.
-@item --log-error[=file]
+@item --log-error[=@var{file}]
Log errors and startup messages to this file. @xref{Error log}.
-If you don't specify a filename, MySQL will use @code{host_name.err} as the filename.
+If you don't specify a filename, MySQL will use @code{@var{host_name}.err} as the
filename.
-@item --log-isam[=file]
+@item --log-isam[=@var{file}]
Log all @code{ISAM}/@code{MyISAM} changes to this file (used only when
debugging @code{ISAM}/@code{MyISAM}).
@@ -19038,7 +19038,7 @@
username and timestamp are not logged for queries. This option was
introduced in MySQL 4.1.
-@item --log-slow-queries[=file]
+@item --log-slow-queries[=@var{file}]
Log all queries that have taken more than @code{long_query_time} seconds
to execute to this file.
@xref{Slow query log}.
@@ -19046,8 +19046,8 @@
logged has changed in MySQL 4.1. See the @code{--log-long-format} and
@code{--log-short-format} options for details.
-@item --log-update[=file]
-Log updates to @code{file.#} where @code{#} is a unique number if not
+@item --log-update[=@var{file}]
+Log updates to @var{file#} where @var{#} is a unique number if not
given. @xref{Update log}. The update log is deprecated and is
removed in MySQL 5.0.0; you should use the binary log instead
(@code{--log-bin}). @xref{Binary log}. Starting from version 5.0.0,
@@ -19081,7 +19081,7 @@
Note that use of this option requires that you run the server as @code{root},
which is normally not a good idea for security reasons.
-@item --myisam-recover [=option[,option...]]]
+@item --myisam-recover [=@var{option}[,@var{option}...]]]
Set the @code{MyISAM} storage engine recovery mode.
The option value is any combination of the values
of @code{DEFAULT}, @code{BACKUP}, @code{FORCE}, or @code{QUICK}.
@@ -19141,10 +19141,10 @@
This option can be used to help you see how your applications will behave in
MySQL 4.1, without actually upgrading to 4.1.
-@item --pid-file=path
+@item --pid-file=@var{path}
The path to the process ID file used by @code{mysqld_safe}.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The port number to use when listening for TCP/IP connections.
@item --old-protocol, -o
@@ -19156,7 +19156,7 @@
This option is available only if the server is built with debugging enabled.
@xref{Debugging server}.
-@item --open-files-limit=count
+@item --open-files-limit=@var{count}
To change the number of file descriptors available to @code{mysqld}.
If this is not set or set to 0, then @code{mysqld} will use this value
to reserve file descriptors to use with @code{setrlimit()}. If this
@@ -19296,7 +19296,7 @@
@item --skip-thread-priority
Disable using thread priorities for faster response time.
-@item --socket=path
+@item --socket=@var{path}
@c Put the Unix description first, because the option name relates directly
@c to the Unix meaning. Putting the Windows meaning first makes this more
@c confusing.
@@ -19308,7 +19308,7 @@
@c TODO: some of these option values currently are unimplemented.
@c Need to say which ones.
-@item --sql-mode=value[,value[,value...]]
+@item --sql-mode=@var{value}[,@var{value}[,@var{value}...]]
Set the SQL mode for MySQL. @xref{Server SQL mode}. This option was added in 3.23.41.
@item --temp-pool
@@ -19320,7 +19320,7 @@
``leak'' memory, because it's being allocated to the directory entry cache
rather than to the disk cache.
-@item --transaction-isolation=level
+@item --transaction-isolation=@var{level}
Sets the default transaction isolation level, which can be
@code{READ-UNCOMMITTED},
@code{READ-COMMITTED},
@@ -19328,7 +19328,7 @@
@code{SERIALIZABLE}.
@xref{SET TRANSACTION, , @code{SET TRANSACTION}}.
-@item --tmpdir=path, -t path
+@item --tmpdir=@var{path}, -t @var{path}
The path of the directory to use for creating temporary files. It might be
useful if your default @code{/tmp} directory resides on a partition that
is too small to hold temporary tables. Starting from MySQL 4.1, this
@@ -19343,9 +19343,9 @@
files in the temporary file directory are lost when the server restarts,
replication will fail.
-@item --user=@{user_name | user_id@}, -u @{user_name | user_id@}
-Run the @code{mysqld} server as the user having the name @code{user_name} or
-the numeric user ID @code{user_id}.
+@item --user=@{@var{user_name} | @var{user_id}@}, -u @{@var{user_name} | @var{user_id}@}
+Run the @code{mysqld} server as the user having the name @var{user_name} or
+the numeric user ID @var{user_id}.
(``User'' in this context refers to a system login account, not a MySQL user
listed in the grant tables.)
@@ -20074,7 +20074,7 @@
@strong{Note:} @code{FULLTEXT} indexes must be rebuilt after changing
this variable.
-Use @code{REPAIR TABLE tbl_name QUICK}.
+Use @code{REPAIR TABLE @var{tbl_name} QUICK}.
@item ft_min_word_len
The minimum length of the word to be included in a @code{FULLTEXT} index.
@@ -20082,7 +20082,7 @@
@strong{Note:} @code{FULLTEXT} indexes must be rebuilt after changing
this variable.
-Use @code{REPAIR TABLE tbl_name QUICK}.
+Use @code{REPAIR TABLE @var{tbl_name} QUICK}.
@item ft_query_expansion_limit
The number of top matches to use for full-text searches performed using
@@ -20099,7 +20099,7 @@
@strong{Note:} @code{FULLTEXT} indexes must be rebuilt after changing
this variable.
-Use @code{REPAIR TABLE tbl_name QUICK}.
+Use @code{REPAIR TABLE @var{tbl_name} QUICK}.
@item group_concat_max_len
The maximum allowed result length for the @code{GROUP_CONCAT()} function.
@@ -21655,8 +21655,8 @@
know the identity of the person running it. It is common for client/server
applications that the user can specify any username to the client program.
For example, anyone can use the @code{mysql} program to connect as any other
-person simply by invoking it as @code{mysql -u other_user db_name} if
-@code{other_user} has no password. If all users have a password,
+person simply by invoking it as @code{mysql -u @var{other_user} @var{db_name}} if
+@var{other_user} has no password. If all users have a password,
connecting using another user's account becomes much more difficult.
To change the password for a user, use the @code{SET PASSWORD} statement.
@@ -22784,7 +22784,7 @@
what you expect, you probably are being authenticated as some other
account. To find out what account the server used to authenticate
you, use the @code{CURRENT_USER()} function. It returns a value in
-@code{user_name@@host_name} format that indicates the @code{User}
+@code{@var{user_name}@@@var{host_name}} format that indicates the @code{User}
and @code{Host} values from the matching @code{user} table record.
Suppose that @code{jeffrey} connects and issues the following query:
@@ -23035,7 +23035,7 @@
request.
@item
-Database privilege changes take effect at the next @code{USE db_name}
+Database privilege changes take effect at the next @code{USE @var{db_name}}
statement.
@item
@@ -23431,11 +23431,11 @@
@item
If you have access problems with a Perl, PHP, Python, or ODBC program, try to
-connect to the server with @code{mysql -u user_name db_name} or @code{mysql
--u user_name -pyour_pass db_name}. If you are able to connect using the
+connect to the server with @code{mysql -u @var{user_name} @var{db_name}} or @code{mysql
+-u @var{user_name} -p@var{your_pass} @var{db_name}}. If you are able to connect using
the
@code{mysql} client, the problem lies with your program, not with the
access privileges. (There is no space between @code{-p} and the
-password; you can also use the @code{--password=your_pass} syntax to specify
+password; you can also use the @code{--password=@var{your_pass}} syntax to specify
the password. If you use the @code{-p} option alone, MySQL will
prompt you for the password.)
@@ -23985,13 +23985,13 @@
should specify the username and password for the account that you want to use:
@example
-shell> mysql --user=monty --password=guess db_name
+shell> mysql --user=monty --password=@var{guess} @var{db_name}
@end example
If you prefer short options, the command looks like this:
@example
-shell> mysql -u monty -pguess db_name
+shell> mysql -u monty -p@var{guess} @var{db_name}
@end example
There must be @emph{no space} between the @code{-p} option and the
@@ -24005,13 +24005,13 @@
following password value:
@example
-shell> mysql --user=monty --password db_name
-shell> mysql -u monty -p db_name
+shell> mysql --user=monty --password @var{db_name}
+shell> mysql -u monty -p @var{db_name}
@end example
Then the client program will print a prompt and wait for you to enter
the password.
-(In these examples, @code{db_name} is @emph{not} interpreted as a
+(In these examples, @var{db_name} is @emph{not} interpreted as a
password, because it is separated from the preceding password option by a
space.)
@@ -24414,7 +24414,7 @@
@end example
The account for which this command resets the password is the one with a
-@code{user} table record that matches @code{user_name} in the @code{User}
+@code{user} table record that matches @var{user_name} in the @code{User}
column and the client host @emph{from which you connect} in the
@code{Host} column.
@@ -24540,11 +24540,11 @@
@item
@findex -p option
@findex --password option
-Use a @code{-pyour_pass} or @code{--password=your_pass} option on the command
+Use a @code{-p@var{your_pass}} or @code{--password=@var{your_pass}} option on the command
line. For example:
@example
-shell> mysql -u francis -pfrank db_name
+shell> mysql -u francis -pfrank @var{db_name}
@end example
This is convenient but insecure, because your password becomes visible to
@@ -24560,7 +24560,7 @@
the terminal:
@example
-shell> mysql -u francis -p db_name
+shell> mysql -u francis -p @var{db_name}
Enter password: ********
@end example
@@ -25092,25 +25092,25 @@
Then use this account to connect to the server, with both a server and client
that have SSL support enabled.
-@item --ssl-ca=file_name
+@item --ssl-ca=@var{file_name}
The path to a file with a list of trusted SSL CAs.
-@item --ssl-capath=directory_name
+@item --ssl-capath=@var{directory_name}
The path to a directory that contains trusted
SSL CA certificates in pem format.
-@item --ssl-cert=file_name
+@item --ssl-cert=@var{file_name}
The name of the SSL certificate file to use
for establishing a secure connection.
-@item --ssl-cipher=cipher_list
+@item --ssl-cipher=@var{cipher_list}
A list of allowable ciphers to use for SSL encryption.
-@code{cipher_list} has the same format as the @code{openssl ciphers}
+@var{cipher_list} has the same format as the @code{openssl ciphers}
command.
Example: @code{--ssl-cipher=ALL:-AES:-EXP}
-@item --ssl-key=file_name
+@item --ssl-key=@var{file_name}
The name of the SSL key file to use
for establishing a secure connection.
@@ -25220,13 +25220,13 @@
Do a full backup of your database:
@example
-shell> mysqldump --tab=/path/to/some/dir --opt db_name
+shell> mysqldump --tab=@var{/path/to/some/dir} --opt @var{db_name}
@end example
Or:
@example
-shell> mysqlhotcopy db_name /path/to/some/dir
+shell> mysqlhotcopy @var{db_name} @var{/path/to/some/dir}
@end example
You can also simply copy all table files (@file{*.frm}, @file{*.MYD}, and
@@ -25296,7 +25296,7 @@
@itemize @bullet
@item
To dump the table, use
-@code{SELECT * INTO OUTFILE 'file_name' FROM tbl_name}.
+@code{SELECT * INTO OUTFILE '@var{file_name}' FROM @var{tbl_name}}.
@item
To reload the table, use and restore with
@@ -25411,7 +25411,7 @@
Invoke @code{myisamchk} like this:
@example
-shell> myisamchk [options] tbl_name
+shell> myisamchk [options] @var{tbl_name}
@end example
The @code{options} specify what you want @code{myisamchk} to do. They are
@@ -25422,7 +25422,7 @@
operation. To get more information or to tell @code{myisamchk} to take
corrective action, specify options as described in the following discussion.
-@code{tbl_name} is the database table you want to check or repair. If you run
+@var{tbl_name} is the database table you want to check or repair. If you run
@code{myisamchk} somewhere other than in the database directory, you must
specify the path to the database directory, because @code{myisamchk} has no
idea where the
@@ -25516,9 +25516,9 @@
@item --help, -?
Display a help message and exit.
-@item --debug=debug_options, -# debug_options
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item --debug=@var{debug_options}, -# @var{debug_options}
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
@item --silent, -s
Silent mode. Write output only when errors occur. You can use @code{-s}
@@ -25634,7 +25634,7 @@
you can repair a table with @code{myisamchk} like this:
@example
-shell> myisamchk --recover --ft_min_word_len=3 tbl_name.MYI
+shell> myisamchk --recover --ft_min_word_len=3 @var{tbl_name}.MYI
@end example
To ensure that @code{myisamchk} and the server use the same values for
@@ -25726,13 +25726,13 @@
@item --backup, -B
Make a backup of the @file{.MYD} file as @file{file_name-time.BAK}
-@item --character-sets-dir=path
+@item --character-sets-dir=@var{path}
The directory where character sets are installed. @xref{Character sets}.
@item --correct-checksum
Correct the checksum information for the table.
-@item --data-file-length=#, -D #
+@item --data-file-length=@var{#}, -D @var{#}
Maximum length of the data file (when re-creating data file when it's ``full'').
@item --extend-check, -e
@@ -25745,11 +25745,11 @@
Overwrite old temporary files (files with names like @file{tbl_name.TMD})
instead of aborting.
-@item --keys-used=#, -k #
+@item --keys-used=@var{#}, -k @var{#}
For @code{myisamchk}, the option value indicates which indexes to update.
Each binary bit of the option value corresponds to a table index, where the
first index is bit 0.
-For @code{isamchk}, the option value indicates that only the first @code{#} of
+For @code{isamchk}, the option value indicates that only the first @var{#} of
the table indexes should be updated.
In either case, an option value of 0 disables updates to all indexes, which
can be used to get faster inserts.
@@ -25795,14 +25795,14 @@
If you have lots of memory, you should increase the value of
@code{key_buffer_size}.
-@item --set-character-set=name
+@item --set-character-set=@var{name}
Change the character set used by the table indexes.
@item --sort-recover, -n
Force @code{myisamchk} to use sorting to resolve the keys even if the
temporary files should be very big.
-@item --tmpdir=path, -t path
+@item --tmpdir=@var{path}, -t @var{path}
Path of the directory to be used for storing temporary files. If this is not
set, @code{myisamchk} uses the value of the @code{TMPDIR} environment variable.
Starting from MySQL 4.1, @code{tmpdir} can be set to a list of directory paths
@@ -25827,13 +25827,13 @@
Analyze the distribution of keys. This improves join performance by enabling
the join optimizer to better choose the order in which to join the tables
and which keys it should use. To obtain information about the distribution,
-use a @code{myisamchk --description --verbose tbl_name} command or the
-@code{SHOW KEYS FROM tbl_name} statement.
+use a @code{myisamchk --description --verbose @var{tbl_name}} command or the
+@code{SHOW KEYS FROM @var{tbl_name}} statement.
@item --description, -d
Print some descriptive information about the table.
-@item --set-auto-increment[=value], -A[value]
+@item --set-auto-increment[=@var{value}], -A[@var{value}]
Force @code{AUTO_INCREMENT} numbering for new records to start at the given
value (or higher, if there are already records with @code{AUTO_INCREMENT}
values this large). If @code{value} is not specified, @code{AUTO_INCREMENT}
@@ -25844,7 +25844,7 @@
Sort the index tree blocks in high-low order.
This optimizes seeks and makes table scanning by key faster.
-@item --sort-records=#, -R #
+@item --sort-records=@var{#}, -R @var{#}
Sort records according to a particular index. This makes your data much
more localized and may speed up range-based @code{SELECT} and @code{ORDER
BY} operations that use this index. (The first time you use this option to
@@ -25903,12 +25903,12 @@
sort buffer. The amount of space required is:
@example
-(largest_key + row_pointer_length) * number_of_rows * 2
+(@var{largest_key} + @var{row_pointer_length}) * @var{number_of_rows} * 2
@end example
You can check the length of the keys and the @code{row_pointer_length}
-with @code{myisamchk -dv tbl_name}. This space is allocated in the temporary
-directory (specified by @code{TMPDIR} or @code{--tmpdir=path}).
+with @code{myisamchk -dv @var{tbl_name}}. This space is allocated in the temporary
+directory (specified by @code{TMPDIR} or @code{--tmpdir=@var{path}}).
@end itemize
@@ -25955,7 +25955,7 @@
corrupted. @xref{MyISAM table problems, , @code{MyISAM} table problems}.
When performing crash recovery, it is important to understand that each
-@code{MyISAM} table @code{tbl_name} in a database corresponds to three files
+@code{MyISAM} table @var{tbl_name} in a database corresponds to three files
in the database directory:
@multitable @columnfractions .20 .40
@@ -25994,19 +25994,19 @@
To check a @code{MyISAM} table, use the following commands:
@table @code
-@item myisamchk tbl_name
+@item myisamchk @var{tbl_name}
This finds 99.99% of all errors. What it can't find is corruption that
involves @emph{only} the data file (which is very unusual). If you want
to check a table, you should normally run @code{myisamchk} without options or
with either the @code{-s} or @code{--silent} option.
-@item myisamchk -m tbl_name
+@item myisamchk -m @var{tbl_name}
This finds 99.999% of all errors. It first checks all index entries for
errors and then reads through all rows. It calculates a checksum for
all keys in the rows and verifies that the checksum matches the checksum
for the keys in the index tree.
-@item myisamchk -e tbl_name
+@item myisamchk -e @var{tbl_name}
This does a complete and thorough check of all data (@code{-e} means
``extended check''). It does a check-read of every key for each row to verify
that they indeed point to the correct row. This may take a long time for a
@@ -26015,7 +26015,7 @@
add the @code{--verbose} (@code{-v}) option. This causes @code{myisamchk}
to keep going, up through a maximum of 20 errors.
-@item myisamchk -e -i tbl_name
+@item myisamchk -e -i @var{tbl_name}
Like the previous command, but the @code{-i} option tells @code{myisamchk} to
print some informational statistics, too.
@@ -26082,7 +26082,7 @@
@code{MAX_ROWS} and @code{AVG_ROW_LENGTH} table option values:
@example
-ALTER TABLE tbl_name MAX_ROWS=xxx AVG_ROW_LENGTH=yyy;
+ALTER TABLE @var{tbl_name} MAX_ROWS=@var{xxx} AVG_ROW_LENGTH=@var{yyy};
@end example
If you don't know the current table option values, use @code{SHOW CREATE TABLE
@@ -26136,7 +26136,7 @@
each to about 25% of your available memory when running @code{myisamchk}
or @code{isamchk}.
-First, try @code{myisamchk -r -q tbl_name} (@code{-r -q} means ``quick
+First, try @code{myisamchk -r -q @var{tbl_name}} (@code{-r -q} means ``quick
recovery mode''). This will attempt to repair the index file without
touching the data file. If the data file contains everything that it
should and the delete links point at the correct locations within the
@@ -26148,12 +26148,12 @@
Make a backup of the data file before continuing.
@item
-Use @code{myisamchk -r tbl_name} (@code{-r} means ``recovery mode''). This will
+Use @code{myisamchk -r @var{tbl_name}} (@code{-r} means ``recovery mode''). This will
remove incorrect records and deleted records from the data file and
reconstruct the index file.
@item
-If the preceding step fails, use @code{myisamchk --safe-recover tbl_name}.
+If the preceding step fails, use @code{myisamchk --safe-recover @var{tbl_name}}.
Safe recovery mode uses an old recovery method that handles a few cases that
regular recovery mode doesn't (but is slower).
@end enumerate
@@ -26177,14 +26177,14 @@
Use the table description file to create new (empty) data and index files:
@example
-shell> mysql db_name
+shell> mysql @var{db_name}
mysql> SET AUTOCOMMIT=1;
-mysql> TRUNCATE TABLE tbl_name;
+mysql> TRUNCATE TABLE @var{tbl_name};
mysql> quit
@end example
If your version of MySQL doesn't have @code{TRUNCATE TABLE}, use
-@code{DELETE FROM tbl_name} instead.
+@code{DELETE FROM @var{tbl_name}} instead.
@item
Copy the old data file back onto the newly created data file.
@@ -26195,7 +26195,7 @@
Go back to Stage 2. @code{myisamchk -r -q} should work now. (This shouldn't
be an endless loop.)
-As of MySQL 4.0.2, you can also use @code{REPAIR TABLE tbl_name USE_FRM},
+As of MySQL 4.0.2, you can also use @code{REPAIR TABLE @var{tbl_name} USE_FRM},
which performs the whole procedure automatically.
@noindent
@@ -26232,7 +26232,7 @@
deleting or updating records, run @code{myisamchk} in recovery mode:
@example
-shell> myisamchk -r tbl_name
+shell> myisamchk -r @var{tbl_name}
@end example
You can optimize a table in the same way by using the SQL @code{OPTIMIZE TABLE}
@@ -26247,7 +26247,7 @@
@itemize @bullet
@item @code{-S}, @code{--sort-index}
-@item @code{-R index_num}, @code{--sort-records=index_num}
+@item @code{-R @var{index_num}}, @code{--sort-records=@var{index_num}}
@item @code{-a}, @code{--analyze}
@end itemize
@@ -26343,7 +26343,7 @@
here. We explain some of the information in more detail later:
@itemize @bullet
-@item @code{myisamchk -d tbl_name}
+@item @code{myisamchk -d @var{tbl_name}}
Runs @code{myisamchk} in ``describe mode'' to produce a description of
your table. If you start the MySQL server using the
@@ -26352,17 +26352,17 @@
doesn't change the table in describe mode, there is no risk of
destroying data.
-@item @code{myisamchk -d -v tbl_name}
+@item @code{myisamchk -d -v @var{tbl_name}}
Adding @code{-v} runs @code{myisamchk} in verbose mode so that it produces
more information about what it is doing.
-@item @code{myisamchk -eis tbl_name}
+@item @code{myisamchk -eis @var{tbl_name}}
Shows only the most important information from a table. This operation is slow
because it must read the entire table.
-@item @code{myisamchk -eiv tbl_name}
+@item @code{myisamchk -eiv @var{tbl_name}}
This is like @code{-eis}, but tells you what is being done.
@@ -27161,7 +27161,7 @@
@end itemize
For @code{MyISAM} tables, you can check the character set name and number for a
-table with @code{myisamchk -dvv tbl_name}.
+table with @code{myisamchk -dvv @var{tbl_name}}.
@node Log Files, Multiple servers, Localisation, MySQL Database Administration
@@ -27230,7 +27230,7 @@
In older MySQL versions on Unix, error log handling was done by
@code{mysqld_safe} which redirected the error file to
-@code{host_name.err}. You could change this filename by specifying a
+@code{@var{host_name}.err}. You could change this filename by specifying a
@code{--err-log=filename} option to @code{mysqld_safe}.
If you don't specify @code{--log-error}, or (on Windows) if you use the
@@ -27400,9 +27400,9 @@
@table @code
-@item --binlog-do-db=db_name
+@item --binlog-do-db=@var{db_name}
Tells the master that it should log updates to the binary log if the current
-database (that is, the one selected by @code{USE}) is @code{db_name}. All
+database (that is, the one selected by @code{USE}) is @var{db_name}. All
other databases that are not explicitly mentioned are ignored. If you use
this, you should ensure that you only do updates in the current database.
@@ -27411,10 +27411,10 @@
@code{USE prices; UPDATE sales.january SET amount=amount+1000;},
this statement will not be written into the binary log.
-@item --binlog-ignore-db=db_name
+@item --binlog-ignore-db=@var{db_name}
Tells the master that updates where the current database
(that is, the one selected by @code{USE}) is
-@code{db_name} should not be stored in the binary log. If
+@var{db_name} should not be stored in the binary log. If
you use this, you should ensure that you only do updates in the current
database.
@@ -27698,21 +27698,21 @@
At least the following options must be different for each server:
@table @code
-@item --port=port_num
+@item --port=@var{port_num}
@code{--port} controls the port number for TCP/IP connections.
-@item --socket=path
+@item --socket=@var{path}
@code{--socket} controls the Unix socket file path on Unix and the name of the
named pipe on Windows. On Windows, it's necessary to specify distinct pipe names
only for those servers that support named pipe connections.
-@item --shared-memory-base-name=name
+@item --shared-memory-base-name=@var{name}
This option currently is used only on Windows.
It designates the shared memory name used by a
Windows server to allow clients to connect via shared memory.
This option is new in MySQL 4.1.
-@item --pid-file=path
+@item --pid-file=@var{path}
This option is used only on Unix.
It indicates the name of the file in which the server writes its process ID.
@@ -27725,12 +27725,12 @@
@c TODO: InnoDB options needed here?
@itemize @bullet
-@item @code{--log=path}
-@item @code{--log-bin=path}
-@item @code{--log-update=path}
-@item @code{--log-error=path}
-@item @code{--log-isam=path}
-@item @code{--bdb-logdir=path}
+@item @code{--log=@var{path}}
+@item @code{--log-bin=@var{path}}
+@item @code{--log-update=@var{path}}
+@item @code{--log-error=@var{path}}
+@item @code{--log-isam=@var{path}}
+@item @code{--bdb-logdir=@var{path}}
@end itemize
Log file options are described in @ref{Log file maintenance}.
@@ -27739,8 +27739,8 @@
differently for each server, to spread the load between several physical disks:
@itemize @bullet
-@item @code{--tmpdir=path}
-@item @code{--bdb-tmpdir=path}
+@item @code{--tmpdir=@var{path}}
+@item @code{--bdb-tmpdir=@var{path}}
@end itemize
Having different temporary directories is also recommended, to make
@@ -28305,8 +28305,8 @@
regarded as different by the query cache:
@example
-SELECT * FROM tbl_name
-Select * from tbl_name
+SELECT * FROM @var{tbl_name}
+Select * from @var{tbl_name}
@end example
Queries must be exactly the same (byte for byte) to be seen as identical.
@@ -29011,7 +29011,7 @@
@subsection Replication Relay and Status Files
By default, relay logs are named using filenames of the form
-@file{host_name-relay-bin.nnn}, where @code{host_name} is the name of the
+@file{host_name-relay-bin.nnn}, where @var{host_name} is the name of the
slave server host and @code{nnn} is a sequence number.
Successive relay log files are created using successive sequence numbers,
beginning with @code{000001} (@code{001} in MySQL 4.0 or older).
@@ -30039,41 +30039,41 @@
This option is not limited to replication use only. It produces warnings
across a spectrum of server activities.
-@item --master-connect-retry=seconds
+@item --master-connect-retry=@var{seconds}
The number of seconds the slave thread sleeps before retrying to connect to
the master in case the master goes down or the connection is lost. The
value in the @file{master.info} file takes precedence if it can be read. If
not set, the default is 60.
-@item --master-host=host
+@item --master-host=@var{host}
The hostname or IP number of the master replication server.
If this option is not given, the slave
thread will not be started. The value in @file{master.info}
takes precedence if it can be read.
-@item --master-info-file=file_name
+@item --master-info-file=@var{file_name}
The name to use for the file in which the slave records
information about the master.
The default name is @file{mysql.info} in the data directory.
-@item --master-password=password
+@item --master-password=@var{password}
The password of the account that the slave thread uses for authentication when
connecting to the master.
The value in the @file{master.info} file takes precedence if it can be read.
If not set, an empty password is assumed.
-@item --master-port=port_number
+@item --master-port=@var{port_number}
The TCP/IP port the master is listening on.
The value in the @file{master.info} file takes precedence if it can be read.
If not set, the compiled-in setting is assumed. If you have not tinkered with
@code{configure} options, this should be 3306.
@item --master-ssl
-@itemx --master-ssl-ca=file_name
-@itemx --master-ssl-capath=directory_name
-@itemx --master-ssl-cert=file_name
-@itemx --master-ssl-cipher=cipher_list
-@itemx --master-ssl-key=file_name
+@itemx --master-ssl-ca=@var{file_name}
+@itemx --master-ssl-capath=@var{directory_name}
+@itemx --master-ssl-cert=@var{file_name}
+@itemx --master-ssl-cipher=@var{cipher_list}
+@itemx --master-ssl-key=@var{file_name}
These options are used for setting up a secure replication connection to
the master server using SSL.
@@ -30090,7 +30090,7 @@
These options are operational as of MySQL 4.1.1.
-@item --master-user=username
+@item --master-user=@var{username}
The username of the account that the slave thread uses for authentication when
connecting to the master. The account must have the
@code{REPLICATION SLAVE} privilege. (Prior to MySQL 4.0.2, it must have the
@@ -30098,7 +30098,7 @@
The value in the @file{master.info} file takes precedence if it can be read.
If the master user is not set, user @code{test} is assumed.
-@item --max-relay-log-size=#
+@item --max-relay-log-size=@var{#}
To rotate the relay log automatically.
@xref{Server system variables}.
@@ -30111,10 +30111,10 @@
This option is available as of MySQL 4.0.14.
-@item --relay-log=file_name
+@item --relay-log=@var{file_name}
The name for the relay log. The default name is
-@code{host_name-relay-bin.nnn}, where @code{host_name} is the name of
-the slave server host and @code{nnn} indicates that relay logs are
+@code{@var{host_name}-relay-bin.@var{nnn}}, where @var{host_name} is the name of
+the slave server host and @var{nnn} indicates that relay logs are
created in numbered sequence.
You can specify the option to create hostname-independent relay log names, or
if your relay logs tend to be big (and you don't want to decrease
@@ -30122,13 +30122,13 @@
different from the data directory, or if you want to increase speed by
balancing load between disks.
-@item --relay-log-index=file_name
+@item --relay-log-index=@var{file_name}
The location and name that should be used for the relay
log index file. The default name is
-@code{host_name-relay-bin.index}, where @code{host_name} is the name of
+@code{@var{host_name}-relay-bin.index}, where @var{host_name} is the name of
the slave server.
-@item --relay-log-info-file=file_name
+@item --relay-log-info-file=@var{file_name}
The name to use for the file in which the slave records
information about the relay logs. The default name is
@file{relay-log.info} in the data directory.
@@ -30141,7 +30141,7 @@
This option is available as of MySQL 4.1.1.
-@item --relay-log-space-limit=#
+@item --relay-log-space-limit=@var{#}
Places an upper limit on the total size of all relay logs on the slave (a
value of 0 means ``unlimited''). This is useful for a slave server host that
has limited disk space. When the limit is reached, the I/O thread stops
@@ -30160,17 +30160,17 @@
unable to satisfy the I/O thread. This forces the I/O thread to temporarily
ignore @code{--relay-log-space-limit}.
-@item --replicate-do-db=db_name
+@item --replicate-do-db=@var{db_name}
Tells the slave to restrict replication to statements where
the default database (that is, the one selected by @code{USE})
-is @code{db_name}.
+is @var{db_name}.
To specify more than one database, use this option multiple
times, once for each database. Note that this will not replicate
-cross-database statements such as @code{UPDATE some_db.some_table
+cross-database statements such as @code{UPDATE @var{some_db.some_table}
SET foo='bar'} while having selected a different database or no database. If you
need cross-database updates to work, make sure that you have MySQL 3.23.28 or
-later, and use @code{--replicate-wild-do-table=db_name.%}.
+later, and use @code{--replicate-wild-do-table=@var{db_name}.%}.
Please read the notes that follow this option list.
An example of what does not work as you might expect: If the slave is
@@ -30184,7 +30184,7 @@
@end example
If you need cross-database updates to work,
-use @code{--replicate-wild-do-table=db_name.%} instead.
+use @code{--replicate-wild-do-table=@var{db_name}.%} instead.
The main reason for this ``just-check-the-default-database''
behavior is that it's difficult from the statement
@@ -30194,7 +30194,7 @@
that go across multiple databases). It's also very fast to just check
the default database.
-@item --replicate-do-table=db_name.tbl_name
+@item --replicate-do-table=@var{db_name.tbl_name}
Tells the slave thread to restrict replication to the specified table.
To specify more than one table, use this option multiple times, once
@@ -30202,11 +30202,11 @@
contrast to @code{--replicate-do-db}.
Please read the notes that follow this option list.
-@item --replicate-ignore-db=db_name
+@item --replicate-ignore-db=@var{db_name}
Tells the slave to not replicate any statement where the default
database (that is, the one selected by @code{USE})
-is @code{db_name}. To specify more than one database to
+is @var{db_name}. To specify more than one database to
ignore, use this option multiple times, once for each database.
You should not use this option if you are using cross-database updates
and you don't want these updates to be replicated.
@@ -30222,9 +30222,9 @@
@end example
If you need cross-database updates to work,
-use @code{--replicate-wild-ignore-table=db_name.%} instead.
+use @code{--replicate-wild-ignore-table=@var{db_name}.%} instead.
-@item --replicate-ignore-table=db_name.tbl_name
+@item --replicate-ignore-table=@var{db_name.tbl_name}
Tells the slave thread to not replicate any statement that updates the
specified table (even if any other tables might be updated by the same
statement). To specify more than one table to ignore, use this option
@@ -30232,7 +30232,7 @@
updates, in contrast to @code{--replicate-ignore-db}.
Please read the notes that follow this option list.
-@item --replicate-wild-do-table=db_name.tbl_name
+@item --replicate-wild-do-table=@var{db_name.tbl_name}
Tells the slave thread to restrict replication to statements where any of
the updated tables match the specified database and table name patterns.
Patterns can contain the @samp{%} and @samp{_} wildcard characters, which have
@@ -30262,7 +30262,7 @@
interpreter. For example, with the @code{bash} shell, you would need to
type @code{--replicate-wild-do-table=my\\_own\\%db}.
-@item --replicate-wild-ignore-table=db_name.tbl_name
+@item --replicate-wild-ignore-table=@var{db_name.tbl_name}
Tells the slave thread to not replicate a statement where any table matches the
given wildcard pattern. To specify more than one table to ignore, use
this option multiple times, once for each table. This will work for
@@ -30279,15 +30279,15 @@
are the same as for
@code{--replicate-wild-ignore-table} as well.
-@item --replicate-rewrite-db=from_name->to_name
+@item --replicate-rewrite-db=@var{from_name}->@var{to_name}
Tells the slave to translate the default database
(that is, the one selected by @code{USE})
-to @code{to_name} if it was @code{from_name} on the master.
+to @var{to_name} if it was @var{from_name} on the master.
Only statements involving tables are affected
(not statements such as @code{CREATE DATABASE}, @code{DROP DATABASE},
and @code{ALTER DATABASE}),
-and only if @code{from_name} was the default database on the master.
+and only if @var{from_name} was the default database on the master.
This will not work for cross-database updates.
Note that the database name translation is done before @code{--replicate-*}
rules are tested.
@@ -30296,7 +30296,7 @@
special to your command interpreter, quote the option value. For example:
@example
-shell> mysqld --replicate-rewrite-db="olddb->newdb"
+shell> mysqld --replicate-rewrite-db="@var{olddb}->@var{newdb}"
@end example
@item --replicate-same-server-id
@@ -30313,7 +30313,7 @@
slave with this option before you make the slave read its own events which you
want the slave SQL thread to execute.
-@item --report-host=host
+@item --report-host=@var{host}
The hostname or IP number of the slave to be reported to the master during
slave registration. This value will appear in the output of @code{SHOW SLAVE
HOSTS} on the master server. Leave the value unset if you do not want the
@@ -30328,7 +30328,7 @@
This option is available as of MySQL 4.0.0.
-@item --report-port=port_number
+@item --report-port=@var{port_number}
The TCP/IP port for connecting to the slave, to be reported to the
master during slave registration. Set it only if the slave is listening
on a non-default port or if you have a special tunnel from the master or
@@ -30347,7 +30347,7 @@
1, use compression of the slave/client protocol if both the
slave and the master support it.
-@item --slave-load-tmpdir=file_name
+@item --slave-load-tmpdir=@var{file_name}
The name of the directory where the slave creates temporary files.
This option is by default equal to the value of the @code{tmpdir} system variable.
When the slave SQL thread replicates a @code{LOAD DATA INFILE} statement, it
@@ -30366,13 +30366,13 @@
The directory also should not be one that is cleared by the operating system
during the system startup process.
-@item --slave-net-timeout=seconds
+@item --slave-net-timeout=@var{seconds}
The number of seconds to wait for more data from the master before aborting
the read, considering the connection broken, and trying to reconnect. The first
retry occurs immediately after the timeout. The interval between retries is
controlled by the @code{--master-connect-retry} option.
-@item --slave-skip-errors= [err_code1,err_code2,... | all]
+@item --slave-skip-errors= [@var{err_code1},@var{err_code2},... | all]
Normally, replication stops when an error occurs, which gives you the
opportunity to resolve the inconsistency in the data manually. This option
@@ -31563,7 +31563,7 @@
@c example_for_help_topic EXPLAIN
@example
-EXPLAIN tbl_name
+EXPLAIN @var{tbl_name}
@end example
Or:
@@ -31579,9 +31579,9 @@
@itemize @bullet
@item
-The @code{EXPLAIN tbl_name} syntax is synonymous with @code{DESCRIBE tbl_name}
+The @code{EXPLAIN @var{tbl_name}} syntax is synonymous with @code{DESCRIBE
@var{tbl_name}}
or
-@code{SHOW COLUMNS FROM tbl_name}.
+@code{SHOW COLUMNS FROM @var{tbl_name}}.
@item
When you precede a @code{SELECT} statement with the keyword @code{EXPLAIN},
MySQL explains how it would process the @code{SELECT}, providing
@@ -31681,13 +31681,13 @@
@code{const} is used when you compare all parts of a
@code{PRIMARY KEY} or @code{UNIQUE} index with constant values. In the
-following queries, @code{tbl_name} can be used as a @code{const} table:
+following queries, @var{tbl_name} can be used as a @code{const} table:
@example
-SELECT * FROM tbl_name WHERE primary_key=1;
+SELECT * FROM @var{tbl_name} WHERE @var{primary_key}=1;
-SELECT * FROM tbl_name
-WHERE primary_key_part1=1 AND primary_key_part2=2;
+SELECT * FROM @var{tbl_name}
+WHERE @var{primary_key_part1}=1 AND @var{primary_key_part2}=2;
@end example
@item eq_ref
@@ -31789,16 +31789,16 @@
@code{<=}, @code{IS NULL}, @code{<=>}, @code{BETWEEN}, or @code{IN} operators:
@example
-SELECT * FROM tbl_name
+SELECT * FROM @var{tbl_name}
WHERE key_column = 10;
-SELECT * FROM tbl_name
+SELECT * FROM @var{tbl_name}
WHERE key_column BETWEEN 10 and 20;
-SELECT * FROM tbl_name
+SELECT * FROM @var{tbl_name}
WHERE key_column IN (10,20,30);
-SELECT * FROM tbl_name
+SELECT * FROM @var{tbl_name}
WHERE key_part1= 10 AND key_part2 IN (10,20,30);
@end example
@@ -31833,7 +31833,7 @@
and check the query with @code{EXPLAIN} again.
@xref{ALTER TABLE, , @code{ALTER TABLE}}.
-To see what indexes a table has, use @code{SHOW INDEX FROM tbl_name}.
+To see what indexes a table has, use @code{SHOW INDEX FROM @var{tbl_name}}.
@item key
The @code{key} column indicates the key (index) that MySQL actually decided
@@ -31858,7 +31858,7 @@
@code{key} to select rows from the table.
@c TODO: we don't seem to explain what ref values of "const", NULL, or
-@c tbl_name.col_name mean.
+@c @var{tbl_name.col_name} mean.
@item rows
The @code{rows} column indicates the number of rows MySQL
@@ -32112,8 +32112,8 @@
For small tables, you can usually find a row in one disk seek (because the
index is probably cached). For bigger tables, you can estimate that,
using B-tree indexes, you will need this many seeks to find a row:
-@code{log(row_count) / log(index_block_length / 3 * 2 /
-(index_length + data_pointer_length)) +
+@code{log(@var{row_count}) / log(@var{index_block_length} / 3 * 2 /
+(@var{index_length} + @var{data_pointer_length})) +
1}.
In MySQL, an index block is usually 1024 bytes and the data
@@ -32166,7 +32166,7 @@
number of rows that have the same value. (For unique indexes, this is
always 1.) MySQL will use this to decide which index to choose when you
join two tables based on a non-constant expression. You can check the
-result from the table analysis by using @code{SHOW INDEX FROM tbl_name}
+result from the table analysis by using @code{SHOW INDEX FROM @var{tbl_name}}
and examining the @code{Cardinality} value. @code{myisamchk --description
--verbose} shows index distribution information.
@@ -32286,41 +32286,41 @@
Some examples of queries that are very fast:
@example
-SELECT COUNT(*) FROM tbl_name;
+SELECT COUNT(*) FROM @var{tbl_name};
-SELECT MIN(key_part1),MAX(key_part1) FROM tbl_name;
+SELECT MIN(@var{key_part1}),MAX(@var{key_part1}) FROM @var{tbl_name};
-SELECT MAX(key_part2) FROM tbl_name
- WHERE key_part1=constant;
+SELECT MAX(@var{key_part2}) FROM @var{tbl_name}
+ WHERE @var{key_part1}=@var{constant};
-SELECT ... FROM tbl_name
- ORDER BY key_part1,key_part2,... LIMIT 10;
+SELECT ... FROM @var{tbl_name}
+ ORDER BY @var{key_part1},@var{key_part2},... LIMIT 10;
-SELECT ... FROM tbl_name
- ORDER BY key_part1 DESC, key_part2 DESC, ... LIMIT 10;
+SELECT ... FROM @var{tbl_name}
+ ORDER BY @var{key_part1} DESC, @var{key_part2} DESC, ... LIMIT 10;
@end example
The following queries are resolved using only the index tree, assuming
that the indexed columns are numeric:
@example
-SELECT key_part1,key_part2 FROM tbl_name WHERE key_part1=val;
+SELECT @var{key_part1},@var{key_part2} FROM @var{tbl_name} WHERE
@var{key_part1}=@var{val};
-SELECT COUNT(*) FROM tbl_name
- WHERE key_part1=val1 AND key_part2=val2;
+SELECT COUNT(*) FROM @var{tbl_name}
+ WHERE @var{key_part1}=@var{val1} AND @var{key_part2}=@var{val2};
-SELECT key_part2 FROM tbl_name GROUP BY key_part1;
+SELECT @var{key_part2} FROM @var{tbl_name} GROUP BY @var{key_part1};
@end example
The following queries use indexing to retrieve the rows in sorted
order without a separate sorting pass:
@example
-SELECT ... FROM tbl_name
- ORDER BY key_part1,key_part2,... ;
+SELECT ... FROM @var{tbl_name}
+ ORDER BY @var{key_part1},@var{key_part2},... ;
-SELECT ... FROM tbl_name
- ORDER BY key_part1 DESC, key_part2 DESC, ... ;
+SELECT ... FROM @var{tbl_name}
+ ORDER BY @var{key_part1} DESC, @var{key_part2} DESC, ... ;
@end example
@@ -32351,18 +32351,18 @@
Examples:
@example
-SELECT * FROM tbl_name WHERE key_part1 = 10 OR key_part2 = 20;
+SELECT * FROM @var{tbl_name} WHERE @var{key_part1} = 10 OR @var{key_part2} = 20;
-SELECT * FROM tbl_name
- WHERE (key_part1 = 10 OR key_part2 = 20) AND non_key_part=30;
+SELECT * FROM @var{tbl_name}
+ WHERE (@var{key_part1} = 10 OR @var{key_part2} = 20) AND @var{non_key_part}=30;
SELECT * FROM t1,t2
- WHERE (t1.key1 IN (1,2) OR t1.key2 LIKE 'value%')
- AND t2.key1=t1.some_col;
+ WHERE (t1.@var{key1} IN (1,2) OR t1.@var{key2} LIKE '@var{value}%')
+ AND t2.@var{key1}=t1.@var{some_col};
SELECT * FROM t1,t2
- WHERE t1.key1=1
- AND (t2.key1=t1.some_col OR t2.key2=t1.some_col2);
+ WHERE t1.@var{key1}=1
+ AND (t2.@var{key1}=t1.@var{some_col} OR t2.@var{key2}=t1.@var{some_col2});
@end example
@@ -32372,27 +32372,28 @@
@findex IS NULL
@findex ref_or_null
-MySQL can do the same optimization on @code{col_name IS NULL} that it can do
-with @code{col_name = constant_value}. For example, MySQL can use
+MySQL can do the same optimization on @var{col_name} @code{IS NULL} that it can do
+with @var{col_name} @code{=} @var{constant_value}. For example, MySQL can use
indexes and ranges to search for @code{NULL} with @code{IS NULL}.
@example
-SELECT * FROM tbl_name WHERE key_col IS NULL;
+SELECT * FROM @var{tbl_name} WHERE @var{key_col} IS NULL;
-SELECT * FROM tbl_name WHERE key_col <=> NULL;
+SELECT * FROM @var{tbl_name} WHERE @var{key_col} <=> NULL;
-SELECT * FROM tbl_name
- WHERE key_col=const1 OR key_col=const2 OR key_col IS NULL;
+SELECT * FROM @var{tbl_name}
+ WHERE @var{key_col}=@var{const1} OR @var{key_col}=@var{const2} OR @var{key_col} IS
NULL;
@end example
-If a @code{WHERE} clause includes a @code{col_name IS NULL} condition for a
+If a @code{WHERE} clause includes a @var{col_name} @code{IS NULL} condition for a
column that is declared as @code{NOT NULL}, that expression will be
optimized away. This optimization does not occur in cases when the column
might produce @code{NULL} anyway; for example, if it comes from a table on
the right side of a @code{LEFT JOIN}.
-MySQL 4.1.1 and up can additionally optimize the combination @code{col_name =
-expr AND col_name IS NULL}, a form that is common in resolved subqueries.
+MySQL 4.1.1 and up can additionally optimize the combination
+@code{@var{col_name} = @var{expr} AND @var{col_name} IS NULL},
+a form that is common in resolved subqueries.
@code{EXPLAIN} will show @code{ref_or_null} when this
optimization is used.
@@ -32447,8 +32448,8 @@
clauses that are not part of the selected columns.
@xref{GROUP-BY-hidden-fields}.
-When combining @code{LIMIT row_count} with @code{DISTINCT}, MySQL stops
-as soon as it finds @code{row_count} unique rows.
+When combining @code{LIMIT @var{row_count}} with @code{DISTINCT}, MySQL stops
+as soon as it finds @var{row_count} unique rows.
If you don't use columns from all tables named in a query, MySQL stops
scanning the not-used tables as soon as it finds the first match.
@@ -32500,8 +32501,8 @@
@item
If you use @code{LEFT JOIN} to find rows that don't exist in some
-table and you have the following test: @code{col_name IS NULL} in the
-@code{WHERE} part, where @code{col_name} is a column that is declared as
+table and you have the following test: @code{@var{col_name} IS NULL} in the
+@code{WHERE} part, where @var{col_name} is a column that is declared as
@code{NOT NULL}, MySQL stops searching for more rows
(for a particular key combination) after it has found one row that
matches the @code{LEFT JOIN} condition.
@@ -32716,7 +32717,7 @@
@cindex optimizing, LIMIT
In some cases, MySQL will handle a query differently when you are
-using @code{LIMIT row_count} and not using @code{HAVING}:
+using @code{LIMIT @var{row_count}} and not using @code{HAVING}:
@itemize @bullet
@item
@@ -32724,16 +32725,16 @@
uses indexes in some cases when normally it would prefer to do a
full table scan.
@item
-If you use @code{LIMIT row_count} with @code{ORDER BY}, MySQL ends the
-sorting as soon as it has found the first @code{row_count} lines rather
+If you use @code{LIMIT @var{row_count}} with @code{ORDER BY}, MySQL ends the
+sorting as soon as it has found the first @var{row_count} lines rather
than sorting the whole table.
@item
-When combining @code{LIMIT row_count} with @code{DISTINCT}, MySQL stops
-as soon as it finds @code{row_count} unique rows.
+When combining @code{LIMIT @var{row_count}} with @code{DISTINCT}, MySQL stops
+as soon as it finds @var{row_count} unique rows.
@item
In some cases, a @code{GROUP BY} can be resolved by reading the key in order
(or doing a sort on the key) and then calculating summaries until the
-key value changes. In this case, @code{LIMIT row_count} will not calculate any
+key value changes. In this case, @code{LIMIT @var{row_count}} will not calculate any
unnecessary @code{GROUP BY} values.
@item
As soon as MySQL has sent the required number of rows to the client, it
@@ -32743,7 +32744,7 @@
to check the query or to get the column types of the result columns.
@item
When the server uses temporary tables to resolve the query, the
-@code{LIMIT row_count} is used to calculate how much space is required.
+@code{LIMIT @var{row_count}} is used to calculate how much space is required.
@end itemize
@@ -32781,7 +32782,7 @@
@itemize @bullet
@item
-Use @code{ANALYZE TABLE tbl_name} to update the key distributions for the
+Use @code{ANALYZE TABLE @var{tbl_name}} to update the key distributions for the
scanned table. @xref{ANALYZE TABLE, , @code{ANALYZE TABLE}}.
@item
@@ -32790,8 +32791,8 @@
@xref{SELECT, , @code{SELECT}}.
@example
-SELECT * FROM t1, t2 FORCE INDEX (index_for_column)
-WHERE t1.col_name=t2.col_name;
+SELECT * FROM t1, t2 FORCE INDEX (@var{index_for_column})
+WHERE t1.@var{col_name}=t2.@var{col_name};
@end example
@item
@@ -32876,7 +32877,7 @@
command.
@item
-Use @code{myisamchk --keys-used=0 -rq /path/to/db/tbl_name}. This will
+Use @code{myisamchk --keys-used=0 -rq @var{/path/to/db/tbl_name}.} This will
remove all use of all indexes for the table.
@item
@@ -32889,7 +32890,7 @@
@item
Re-create the indexes with @code{myisamchk -r -q
-/path/to/db/tbl_name}. This will create the index tree in memory before
+@var{/path/to/db/tbl_name}}. This will create the index tree in memory before
writing it to disk, which is much faster because it avoids lots of disk
seeks. The resulting index tree is also perfectly balanced.
@@ -32906,10 +32907,10 @@
executes the @code{LOAD DATA INFILE} statement.
As of MySQL 4.0, you can also use
-@code{ALTER TABLE tbl_name DISABLE KEYS} instead of
-@code{myisamchk --keys-used=0 -rq /path/to/db/tbl_name} and
-@code{ALTER TABLE tbl_name ENABLE KEYS} instead of
-@code{myisamchk -r -q /path/to/db/tbl_name}. This way you can also skip the
+@code{ALTER TABLE @var{tbl_name} DISABLE KEYS} instead of
+@code{myisamchk --keys-used=0 -rq @var{/path/to/db/tbl_name}} and
+@code{ALTER TABLE @var{tbl_name} ENABLE KEYS} instead of
+@code{myisamchk -r -q @var{/path/to/db/tbl_name}}. This way you can also skip the
@code{FLUSH TABLES} steps.
@item
@@ -32993,7 +32994,7 @@
@xref{Server parameters}.
If you want to delete all rows in the table, use @code{TRUNCATE TABLE
-tbl_name} rather than @code{DELETE FROM tbl_name}.
+tbl_name} rather than @code{DELETE FROM @var{tbl_name}}.
@xref{TRUNCATE, , @code{TRUNCATE}}.
@@ -33043,9 +33044,9 @@
columns. In MySQL, it's very easy to use this extra column:
@example
-SELECT * FROM tbl_name
- WHERE hash_col=MD5(CONCAT(col1,col2))
- AND col1='constant' AND col2='constant';
+SELECT * FROM @var{tbl_name}
+ WHERE @var{hash_col}=MD5(CONCAT(@var{col1},@var{col2}))
+ AND @var{col1}='@var{constant}' AND @var{col2}='@var{constant}';
@end example
@item
@@ -33073,7 +33074,7 @@
update of the following form is very fast:
@example
-UPDATE tbl_name SET count_col=count_col+1 WHERE key_col=constant;
+UPDATE @var{tbl_name} SET @var{count_col}=@var{count_col}+1 WHERE
@var{key_col}=@var{constant};
@end example
This is really important when you use MySQL storage engines such as
@@ -33384,8 +33385,8 @@
a row that can be fetched with a single key read:
@example
-UPDATE tbl_name SET column=value WHERE unique_key_col=key_value;
-DELETE FROM tbl_name WHERE unique_key_col=key_value;
+UPDATE @var{tbl_name} SET @var{column}=@var{value} WHERE
@var{unique_key_col}=@var{key_value};
+DELETE FROM @var{tbl_name} WHERE @var{unique_key_col}=@var{key_value};
@end example
@item
@@ -33694,10 +33695,10 @@
least 16 indexes per table and a total index length of at least 256 bytes.
Most storage engines have higher limits.
-With @code{col_name(length)} syntax in an index specification, you can create
-an index that uses only the first @code{length} characters of a @code{CHAR}
-or @code{VARCHAR} column. Indexing only a prefix of column values like this
-can make the index file much smaller.
+With @code{@var{col_name}(@var{length})} syntax in an index specification,
+you can create an index that uses only the first @var{length} characters of
+a @code{CHAR} or @code{VARCHAR} column. Indexing only a prefix of column
+values like this can make the index file much smaller.
@xref{Indexes}.
@cindex @code{BLOB} columns, indexing
@@ -33841,16 +33842,16 @@
@item
To find the @code{MIN()} or @code{MAX()} value for a specific indexed column
-@code{key_col}. This is optimized by a preprocessor that checks whether you are
-using @code{WHERE key_part_# = constant} on all key parts that occur before
-@code{key_col} in the index. In this case, MySQL will do a single key
+@var{key_col}. This is optimized by a preprocessor that checks whether you are
+using @code{WHERE @var{key_part_#} = @var{constant}} on all key parts that occur before
+@var{key_col} in the index. In this case, MySQL will do a single key
lookup for each @code{MIN()} or @code{MAX()} expression and replace it
with a constant. If all expressions are replaced with constants, the
query will return at once. For example:
@example
-SELECT MIN(key_part2),MAX(key_part2)
-FROM tbl_name WHERE key_part1=10;
+SELECT MIN(@var{key_part2}),MAX(@var{key_part2})
+FROM @var{tbl_name} WHERE @var{key_part1}=10;
@end example
@item
@@ -33867,7 +33868,7 @@
may be retrieved from the index tree for greater speed:
@example
-SELECT key_part3 FROM tbl_name WHERE key_part1=1
+SELECT @var{key_part3} FROM @var{tbl_name} WHERE @var{key_part1}=1
@end example
@end itemize
@@ -33875,7 +33876,7 @@
Suppose that you issue the following @code{SELECT} statement:
@example
-mysql> SELECT * FROM tbl_name WHERE col1=val1 AND col2=val2;
+mysql> SELECT * FROM @var{tbl_name} WHERE @var{col1}=@var{val1} AND
@var{col2}=@var{val2};
@end example
If a multiple-column index exists on @code{col1} and @code{col2}, the
@@ -33897,9 +33898,9 @@
statements shown here:
@example
-SELECT * FROM tbl_name WHERE col1=val1;
-SELECT * FROM tbl_name WHERE col2=val2;
-SELECT * FROM tbl_name WHERE col2=val2 AND col3=val3;
+SELECT * FROM @var{tbl_name} WHERE @var{col1}=@var{val1};
+SELECT * FROM @var{tbl_name} WHERE @var{col2}=@var{val2};
+SELECT * FROM @var{tbl_name} WHERE @var{col2}=@var{val2} AND @var{col3}=@var{val3};
@end example
If an index exists on @code{(col1, col2, col3)}, only the first of the preceding
@@ -33919,18 +33920,18 @@
character. For example, the following @code{SELECT} statements use indexes:
@example
-SELECT * FROM tbl_name WHERE key_col LIKE 'Patrick%';
-SELECT * FROM tbl_name WHERE key_col LIKE 'Pat%_ck%';
+SELECT * FROM @var{tbl_name} WHERE @var{key_col} LIKE 'Patrick%';
+SELECT * FROM @var{tbl_name} WHERE @var{key_col} LIKE 'Pat%_ck%';
@end example
-In the first statement, only rows with @code{'Patrick' <= key_col <
+In the first statement, only rows with @code{'Patrick' <= @var{key_col} <
'Patricl'} are considered. In the second statement, only rows with
-@code{'Pat' <= key_col < 'Pau'} are considered.
+@code{'Pat' <= @var{key_col} < 'Pau'} are considered.
The following @code{SELECT} statements will not use indexes:
@example
-SELECT * FROM tbl_name WHERE key_col LIKE '%Patrick%';
-SELECT * FROM tbl_name WHERE key_col LIKE other_col;
+SELECT * FROM @var{tbl_name} WHERE @var{key_col} LIKE '%Patrick%';
+SELECT * FROM @var{tbl_name} WHERE @var{key_col} LIKE @var{other_col};
@end example
In the first statement, the @code{LIKE} value begins with a wildcard
@@ -33945,7 +33946,7 @@
@findex IS NULL, and indexes
@cindex indexes, and @code{IS NULL}
-Searching using @code{col_name IS NULL} will use indexes if @code{col_name}
+Searching using @code{@var{col_name} IS NULL} will use indexes if @var{col_name}
is indexed.
Any index that doesn't span all @code{AND} levels in the @code{WHERE} clause
@@ -34503,10 +34504,10 @@
takes only one file descriptor, for the data file. The index file
descriptor is shared among all threads.
-If you are opening a table with the @code{HANDLER tbl_name OPEN}
+If you are opening a table with the @code{HANDLER @var{tbl_name} OPEN}
statement, a dedicated table object is allocated for the thread.
This table object is not shared by other threads and is not closed
-until the thread calls @code{HANDLER tbl_name CLOSE} or the thread
+until the thread calls @code{HANDLER @var{tbl_name} CLOSE} or the thread
terminates. When this happens, the table is put back in the table cache
(if the cache isn't full).
@xref{HANDLER, , @code{HANDLER}}.
@@ -35029,7 +35030,7 @@
One problem before MySQL 3.23.2 is that if an internal in-memory
heap table exceeds the size of @code{tmp_table_size}, the error @code{The
-table tbl_name is full} occurs. From 3.23.2 on, this is handled
+table @var{tbl_name} is full} occurs. From 3.23.2 on, this is handled
automatically by changing the in-memory heap table to a disk-based
@code{MyISAM} table as necessary. To work around this problem for older
servers, you can increase the temporary table size by setting the
@@ -35462,7 +35463,7 @@
On Windows, you make a symbolic link to a MySQL database by creating a file
in the data directory that contains the path to the destination directory.
-The file should be named @file{db_name.sym}, where @code{db_name} is the
+The file should be named @file{db_name.sym}, where @var{db_name} is the
database name.
Suppose that the MySQL data directory is @file{C:\mysql\data}
@@ -35723,9 +35724,9 @@
@item --backup, -b
Make a backup of the table data file using the name @file{tbl_name.OLD}.
-@item --debug[=debug_options], -# [debug_options]
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
@item --force, -f
Produce a packed table even if it becomes larger than the original or if
@@ -35736,13 +35737,13 @@
error if it finds that @file{tbl_name.TMD} exists. With @code{--force},
@code{myisampack} packs the table anyway.
-@item --join=big_tbl_name, -j big_tbl_name
+@item --join=@var{big_tbl_name}, -j @var{big_tbl_name}
Join all tables named on the command line into a single table
-@code{big_tbl_name}. All tables that are to be combined @emph{must}
+@var{big_tbl_name}. All tables that are to be combined @emph{must}
have identical structure (same column names and types, same indexes,
and so forth).
-@item --packlength=#, -p #
+@item --packlength=@var{#}, -p @var{#}
Specify the record length storage size, in bytes. The value should be 1, 2,
or 3. @code{myisampack} stores all rows with length pointers of 1, 2, or 3
bytes. In most normal cases, @code{myisampack} can determine the right length
@@ -35757,7 +35758,7 @@
@item --test, -t
Don't actually pack the table, just test packing it.
-@item --tmp_dir=path, -T path
+@item --tmp_dir=@var{path}, -T @var{path}
Use the named directory as the location in which to write the temporary table.
@item --verbose, -v
@@ -36047,14 +36048,14 @@
the MySQL optimizer to work more efficiently:
@example
-shell> myisamchk -rq --sort-index --analyze tbl_name.MYI
+shell> myisamchk -rq --sort-index --analyze @var{tbl_name}.MYI
@end example
A similar procedure applies for @code{ISAM} tables. After using
@code{pack_isam}, use @code{isamchk} to re-create the indexes:
@example
-shell> isamchk -rq --sort-index --analyze tbl_name.ISM
+shell> isamchk -rq --sort-index --analyze @var{tbl_name}.ISM
@end example
After you have installed the packed table into the MySQL database directory,
@@ -36100,13 +36101,13 @@
interpreter as follows:
@example
-shell> mysql db_name
+shell> mysql @var{db_name}
@end example
Or:
@example
-shell> mysql --user=user_name --password=your_password db_name
+shell> mysql --user=@var{user_name} --password=@var{your_password} @var{db_name}
@end example
Then type an SQL statement, end it with @samp{;}, @code{\g}, or @code{\G}
@@ -36115,7 +36116,7 @@
You can run a script simply like this:
@example
-shell> mysql db_name < script.sql > output.tab
+shell> mysql @var{db_name} < @var{script.sql} > @var{output.tab}
@end example
@cindex @code{mysql} command-line options
@@ -36135,7 +36136,7 @@
Print results using tab as the column separator, with each row on a new line.
With this option, @code{mysql} doesn't use the history file.
-@item --character-sets-dir=path
+@item --character-sets-dir=@var{path}
@cindex @code{character-sets-dir}, @code{mysql} option
The directory where character sets are installed. @xref{Character sets}.
@@ -36144,25 +36145,25 @@
Compress all information sent between the client and the server if both
support compression.
-@item --database=db_name, -D db_name
+@item --database=@var{db_name}, -D @var{db_name}
@cindex @code{database}, @code{mysql} option
The database to use. This is useful mainly in an option file.
-@item --debug[=debug_options], -# [debug_options]
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
@cindex @code{debug}, @code{mysql} option
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
The default is @code{'d:t:o,/tmp/mysql.trace'}.
@item --debug-info, -T
@cindex @code{debug-info}, @code{mysql} option
Print some debugging information when the program exits.
-@item --default-character-set=charset
+@item --default-character-set=@var{charset}
@cindex @code{default-character-set}, @code{mysql} option
-Use @code{charset} as the default character set. @xref{Character sets}.
+Use @var{charset} as the default character set. @xref{Character sets}.
-@item --execute=statement, -e statement
+@item --execute=@var{statement}, -e @var{statement}
@cindex @code{execute}, @code{mysql} option
Execute the statement and quit. The default output format is like that produced with
@code{--batch}.
@@ -36171,7 +36172,7 @@
@cindex @code{force}, @code{mysql} option
Continue even if an SQL error occurs.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
@cindex @code{host}, @code{mysql} option
Connect to the MySQL server on the given host.
@@ -36235,7 +36236,7 @@
command line. This is useful for skipping updates to other databases in
the binary log.
-@item --pager[=command]
+@item --pager[=@var{command}]
@cindex @code{pager}, @code{mysql} option
Use the given command for paging query output. If the command is
omitted, the default pager is the value of your @code{PAGER} environment
@@ -36245,18 +36246,18 @@
Output paging is discussed further in
@ref{mysql Commands, , @code{mysql} Commands}.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
@cindex @code{password}, @code{mysql} option
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
@cindex @code{port}, @code{mysql} option
The TCP/IP port number to use for the connection.
-@item --prompt=format_str
+@item --prompt=@var{format_str}
@cindex @code{prompt}, @code{mysql} option
Set the prompt to the specified format. The default is @code{mysql>}.
The special sequences that the prompt can contain are described in
@@ -36306,7 +36307,7 @@
Don't write line numbers for errors. Useful when you want to compare result
files that include error messages.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
@cindex @code{socket}, @code{mysql} option
The socket file to use for the connection.
@@ -36316,7 +36317,7 @@
output in table format. This is the default for interactive use, but can be
used to produce table output in batch mode.
-@item --tee=file_name
+@item --tee=@var{file_name}
@cindex @code{tee}, @code{mysql} option
Append a copy of output to the given file. This option does not
work in batch mode. Tee files are discussed further in
@@ -36326,7 +36327,7 @@
@cindex @code{unbuffered}, @code{mysql} option
Flush the buffer after each query.
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
@cindex @code{user}, @code{mysql} option
The MySQL username to use when connecting to the server.
@@ -36357,7 +36358,7 @@
@end table
-You can also set the following variables by using @code{--var_name=value}
+You can also set the following variables by using @code{--var_name=@var{value}}
options:
@cindex timeout, @code{connect_timeout} variable
@@ -36393,7 +36394,7 @@
@end table
It is also possible to set variables by using
-@code{--set-variable=var_name=value} or @code{-O var_name=value}
+@code{--set-variable=@var{var_name}=@var{value}} or @code{-O @var{var_name}=@var{value}}
syntax. However, this syntax is deprecated as of MySQL 4.0.
@tindex @code{MYSQL_HISTFILE} environment variable
@@ -36582,7 +36583,7 @@
@item @code{\h} @tab The server host
@item @code{\p} @tab The current TCP/IP host
@item @code{\u} @tab Your username
-@item @code{\U} @tab Your full @code{user_name@@host_name} account name
+@item @code{\U} @tab Your full @code{@var{user_name}@@@var{host_name}} account name
@item @code{\\} @tab A literal @samp{\} backslash character
@item @code{\n} @tab A newline character
@item @code{\t} @tab A tab character
@@ -36667,8 +36668,8 @@
@example
mysql> prompt (\u@@\h) [\d]>\_
PROMPT set to '(\u@@\h) [\d]>\_'
-(user@@host) [database]>
-(user@@host) [database]> prompt
+(@var{user}@@@var{host}) [@var{database}]>
+(@var{user}@@@var{host}) [@var{database}]> prompt
Returning to default PROMPT of mysql>
mysql>
@end example
@@ -36682,7 +36683,7 @@
The @code{mysql} client typically is used interactively, like this:
@example
-shell> mysql db_name
+shell> mysql @var{db_name}
@end example
However, it's also possible to put your SQL statements in a file and then
@@ -36691,10 +36692,10 @@
Then invoke @code{mysql} as shown here:
@example
-shell> mysql db_name < text_file
+shell> mysql @var{db_name} < @var{text_file}
@end example
-You can also start your text file with a @code{USE db_name} statement. In
+You can also start your text file with a @code{USE @var{db_name}} statement. In
this case, it is unnecessary to specify the database name on the command
line:
@@ -36769,7 +36770,7 @@
For beginners, a useful startup option is @code{--safe-updates} (or
@code{--i-am-a-dummy}, which has the same effect). This option was
introduced in MySQL 3.23.11. It is helpful for cases when you might
-have issued a @code{DELETE FROM tbl_name} statement but forgotten the
+have issued a @code{DELETE FROM @var{tbl_name}} statement but forgotten the
@code{WHERE} clause. Normally, such a statement will delete all rows from the
table. With @code{--safe-updates}, you can delete rows only by specifying
the key values that identify them. This helps prevent accidents.
@@ -36793,9 +36794,9 @@
For example:
@example
-UPDATE tbl_name SET not_key_column=# WHERE key_column=#;
+UPDATE @var{tbl_name} SET @var{not_key_column}=# WHERE @var{key_column}=#;
-UPDATE tbl_name SET not_key_column=# LIMIT 1;
+UPDATE @var{tbl_name} SET @var{not_key_column}=# LIMIT 1;
@end example
@item
@@ -36877,11 +36878,11 @@
@code{mysqladmin} supports the following commands:
@table @code
-@item create db_name
-Create a new database named @code{db_name}.
+@item create @var{db_name}
+Create a new database named @var{db_name}.
-@item drop db_name
-Delete the database named @code{db_name} and all its tables.
+@item drop @var{db_name}
+Delete the database named @var{db_name} and all its tables.
@item extended-status
Display the server status variables and their values.
@@ -37039,36 +37040,36 @@
@item --help, -?
Display a help message and exit.
-@item --character-sets-dir=path
+@item --character-sets-dir=@var{path}
The directory where character sets are installed. @xref{Character sets}.
@item --compress, -C
Compress all information sent between the client and the server if both
support compression.
-@item --count=#, -c #
+@item --count=@var{#}, -c @var{#}
The number of iterations to make. This works only with @code{--sleep}
(@code{-i}).
-@item --debug[=debug_options], -# [debug_options]
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
The default is @code{'d:t:o,/tmp/mysqladmin.trace'}.
@item --force, -f
Don't ask for confirmation for the @code{drop database} command.
With multiple commands, continue even if an error occurs.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
Connect to the MySQL server on the given host.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The TCP/IP port number to use for the connection.
@item --protocol=@{TCP | SOCKET | PIPE | MEMORY@}
@@ -37082,14 +37083,14 @@
@item --silent, -s
Exit silently if a connection to the server cannot be established.
-@item --sleep=delay, -i delay
-Execute commands again and again, sleeping for @code{delay} seconds in
+@item --sleep=@var{delay}, -i @var{delay}
+Execute commands again and again, sleeping for @var{delay} seconds in
between.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
The socket file to use for the connection.
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
The MySQL username to use when connecting to the server.
@item --verbose, -v
@@ -37102,7 +37103,7 @@
Print output vertically. This is similar to @code{--relative}, but
prints output vertically.
-@item --wait[=#], -w[#]
+@item --wait[=@var{#}], -w[@var{#}]
If the connection cannot be established, wait and retry instead of aborting.
If an option value is given, it indicates the number of times to retry.
The default is one time.
@@ -37186,33 +37187,33 @@
@item --help, -?
Display a help message and exit.
-@item --database=db_name, -d db_name
+@item --database=@var{db_name}, -d @var{db_name}
List entries for just this database (local log only).
@item --force-read, -f
Force reading of unknown binary log events.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
Get the binary log from the MySQL server on the given host.
-@item --local-load=path, -l path
+@item --local-load=@var{path}, -l @var{path}
Prepare local temporary files for @code{LOAD DATA INFILE} in the specified
directory.
-@item --offset=N, -o N
-Skip the first @code{N} entries.
+@item --offset=@var{N}, -o @var{N}
+Skip the first @var{N} entries.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The TCP/IP port number to use for connecting to a remote server.
-@item --position=N, -j N
-Start reading the binary log at position @code{N}.
+@item --position=@var{N}, -j @var{N}
+Start reading the binary log at position @var{N}.
@item --protocol=@{TCP | SOCKET | PIPE | MEMORY@}
The connection protocol to use. New in MySQL 4.1.
@@ -37224,14 +37225,14 @@
@code{--protocol},
@code{--socket}, and @code{--user}.
-@item --result-file=name, -r name
+@item --result-file=@var{name}, -r @var{name}
Direct output to the given file.
@item --short-form, -s
Display only the statements contained in the log, without any extra
information.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
The socket file to use for the connection.
@item --to-last-log, -t
@@ -37240,7 +37241,7 @@
the output to the same MySQL server, this may lead to an endless loop. This
option requires @code{--read-from-remote-server}.
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
The MySQL username to use when connecting to a remote server.
@item --version, -V
@@ -37397,19 +37398,19 @@
Compress all information sent between the client and the server if both
support compression.
-@item --connection_name=name, -c name
+@item --connection_name=@var{name}, -c @var{name}
@cindex @code{connection_name}, @code{mysqlcc} option
This option is a synonym for @code{--server}.
-@item --database=db_name, -d db_name
+@item --database=@var{db_name}, -d @var{db_name}
@cindex @code{database}, @code{mysqlcc} option
The database to use. This is useful mainly in an option file.
-@item --history_size=#, -H #
+@item --history_size=@var{#}, -H @var{#}
@cindex @code{history_size}, @code{mysqlcc} option
The history size for the query window.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
@cindex @code{host}, @code{mysqlcc} option
Connect to the MySQL server on the given host.
@@ -37421,18 +37422,18 @@
or enable @code{LOCAL}. Enabling @code{LOCAL} has no effect if the server
does not also support it.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
@cindex @code{password}, @code{mysqlcc} option
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --plugins_path=name, -g name
+@item --plugins_path=@var{name}, -g @var{name}
@cindex @code{plugins_path}, @code{mysqlcc} option
The path to the directory where MySQL Control Center plugins are located.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
@cindex @code{port}, @code{mysqlcc} option
The TCP/IP port number to use for the connection.
@@ -37444,11 +37445,11 @@
@cindex @code{register}, @code{mysqlcc} option
Open the Register Server dialog on startup.
-@item --server=name, -s name
+@item --server=@var{name}, -s @var{name}
@cindex @code{server}, @code{mysqlcc} option
The MySQL Control Center connection name.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
@cindex @code{socket}, @code{mysqlcc} option
The socket file to use for the connection.
@@ -37456,15 +37457,15 @@
@cindex @code{syntax}, @code{mysqlcc} option
Enable syntax highlighting and completion.
-@item --syntax_file=name, -Y name
+@item --syntax_file=@var{name}, -Y @var{name}
@cindex @code{syntax_file}, @code{mysqlcc} option
The syntax file for completion.
-@item --translations_path=name, -T name
+@item --translations_path=@var{name}, -T @var{name}
@cindex @code{translations_path}, @code{mysqlcc} option
The path to the directory where MySQL Control Center translations are located.
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
@cindex @code{user}, @code{mysqlcc} option
The MySQL username to use when connecting to the server.
@@ -37540,8 +37541,8 @@
There are three general ways to invoke @code{mysqlcheck}:
@example
-shell> mysqlcheck [options] db_name [tables]
-shell> mysqlcheck [options] --databases DB1 [DB2 DB3...]
+shell> mysqlcheck [options] @var{db_name} [@var{tables}]
+shell> mysqlcheck [options] --databases @var{DB1} [@var{DB2} @var{DB3}...]
shell> mysqlcheck [options] --all-databases
@end example
@@ -37585,7 +37586,7 @@
If a checked table is corrupted, automatically fix it. Any necessary repairs
are done after all tables have been checked.
-@item --character-sets-dir=path
+@item --character-sets-dir=@var{path}
The directory where character sets are installed. @xref{Character sets}.
@item --check, -c
@@ -37603,12 +37604,12 @@
Process all tables in the named databases. With this option, all name
arguments are regarded as database names, not as table names.
-@item --debug[=debug_options], -# [debug_options]
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
-@item --default-character-set=charset
-Use @code{charset} as the default character set. @xref{Character sets}.
+@item --default-character-set=@var{charset}
+Use @var{charset} as the default character set. @xref{Character sets}.
@item --extended, -e
If you are using this option to check tables, it ensures that they are
@@ -37624,7 +37625,7 @@
@item --force, -f
Continue even if an SQL error occurs.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
Connect to the MySQL server on the given host.
@item --medium-check, -m
@@ -37634,13 +37635,13 @@
@item --optimize, -o
Optimize the tables.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The TCP/IP port number to use for the connection.
@item --protocol=@{TCP | SOCKET | PIPE | MEMORY@}
@@ -37662,14 +37663,14 @@
Silent mode.
Print only error messages.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
The socket file to use for the connection.
@item --tables
Overrides the @code{--databases} or @code{-B} option. All arguments
following the option are regarded as table names.
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
The MySQL username to use when connecting to the server.
@item --verbose, -v
@@ -37706,7 +37707,7 @@
There are three general ways to invoke @code{mysqldump}:
@example
-shell> mysqldump [options] db_name [tables]
+shell> mysqldump [options] @var{db_name} [tables]
shell> mysqldump [options] --databases DB1 [DB2 DB3...]
shell> mysqldump [options] --all-databases
@end example
@@ -37790,7 +37791,7 @@
same effect as @code{--comments=0}. The default value is @code{1} to not
suppress the extra information. New in MySQL 4.0.17.
-@item --compatible=name
+@item --compatible=@var{name}
Produce output that
is compatible with other database systems or with older MySQL servers.
The value of @code{name} can be
@@ -37827,15 +37828,15 @@
@item --databases, -B
To dump several databases. Note the difference in usage. In this case, no
tables are given. All name arguments on the command line are regarded as
-database names. A @code{USE db_name} statement is included in the
+database names. A @code{USE @var{db_name}} statement is included in the
output before each new database.
-@item --debug[=debug_options], -# [debug_options]
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
-@item --default-character-set=charset
-Use @code{charset} as the default character set. @xref{Character sets}.
+@item --default-character-set=@var{charset}
+Use @var{charset} as the default character set. @xref{Character sets}.
If not specified, @code{mysqldump} from MySQL 4.1.2 or later
uses @code{utf8}; earlier versions use @code{latin1}.
@@ -37851,8 +37852,8 @@
@item --disable-keys, -K
For each table, surround the @code{INSERT} statements with
-@code{/*!40000 ALTER TABLE tbl_name DISABLE KEYS */;} and
-@code{/*!40000 ALTER TABLE tbl_name ENABLE KEYS */;} statements.
+@code{/*!40000 ALTER TABLE @var{tbl_name} DISABLE KEYS */;} and
+@code{/*!40000 ALTER TABLE @var{tbl_name} ENABLE KEYS */;} statements.
This makes loading the dump file into a MySQL 4.0 server faster because the
indexes are created after all rows are inserted.
This option is effective only for @code{MyISAM} tables.
@@ -37882,7 +37883,7 @@
@item --force, -f
Continue even if an SQL error occurs during a table dump.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
Dump data from the MySQL server on the given host. The default host
is @code{localhost}.
@@ -37925,13 +37926,13 @@
options enabled by @code{--opt}, use their @code{--skip} forms; for example,
@code{--skip-add-drop-table} or @code{--skip-quick}.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The TCP/IP port number to use for the connection.
@item --protocol=@{TCP | SOCKET | PIPE | MEMORY@}
@@ -37950,7 +37951,7 @@
As of MySQL 4.1.1, @code{--quote-names} is on by default,
but can be disabled with @code{--skip-quote-names}.
-@item --result-file=file, -r file
+@item --result-file=@var{file}, -r @var{file}
Direct output to a given file. This option should be used on Windows, because
it prevents newline @samp{\n} characters from being converted to @samp{\r\n}
carriage return/newline sequences.
@@ -37977,14 +37978,14 @@
because @code{LOCK TABLES} causes any pending transactions to be committed
implicitly.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
The socket file to use when connecting to @code{localhost} (which is the
default host).
@item --skip-comments
See the description for the @code{--comments} option.
-@item --tab=path, -T path
+@item --tab=@var{path}, -T @var{path}
Produces tab-separated data files. For each dumped table, @code{mysqldump}
creates a @file{tbl_name.sql} file that contains the @code{CREATE TABLE}
statement that creates the table, and a @file{tbl_name.txt} file that
@@ -38005,7 +38006,7 @@
Overrides the @code{--databases} or @code{-B} option. All arguments
following the option are regarded as table names.
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
The MySQL username to use when connecting to the server.
@item --verbose, -v
@@ -38014,7 +38015,7 @@
@item --version, -V
Display version information and exit.
-@item --where='where-condition', -w 'where-condition'
+@item --where='@var{where-condition}', -w '@var{where-condition}'
Dump only records selected by the given @code{WHERE} condition. Note that
quotes around the condition are mandatory if it contains spaces or
characters that are special to your command interpreter.
@@ -38060,32 +38061,32 @@
entire databases.
@example
-shell> mysqldump --opt db_name > backup-file.sql
+shell> mysqldump --opt @var{db_name} > @var{backup-file.sql}
@end example
You can read the dump file back into the server with:
@example
-shell> mysql db_name < backup-file.sql
+shell> mysql @var{db_name} < @var{backup-file.sql}
@end example
Or:
@example
-shell> mysql -e "source /path-to-backup/backup-file.sql" db_name
+shell> mysql -e "source @var{/path-to-backup/backup-file.sql}" @var{db_name}
@end example
@code{mysqldump} is also very useful for populating databases by copying
data from one MySQL server to another:
@example
-shell> mysqldump --opt db_name | mysql --host=remote-host -C db_name
+shell> mysqldump --opt @var{db_name} | mysql --host=@var{remote_host} -C @var{db_name}
@end example
It is possible to dump several databases with one command:
@example
-shell> mysqldump --databases db_name1 [db_name2 ...] > my_databases.sql
+shell> mysqldump --databases @var{db_name1} [@var{db_name2} ...] > my_databases.sql
@end example
If you want to dump all databases, use the @code{--all-databases} option:
@@ -38120,15 +38121,15 @@
@c TODO: explain what these examples mean
@example
-shell> mysqlhotcopy db_name [/path/to/new_directory]
+shell> mysqlhotcopy @var{db_name} [@var{/path/to/new_directory}]
@end example
@example
-shell> mysqlhotcopy db_name_1 ... db_name_n /path/to/new_directory
+shell> mysqlhotcopy @var{db_name_1} ... @var{db_name_n} @var{/path/to/new_directory}
@end example
@example
-shell> mysqlhotcopy db_name./regex/
+shell> mysqlhotcopy @var{db_name}./@var{regex}/
@end example
@code{mysqlhotcopy} supports the following options:
@@ -38142,8 +38143,8 @@
Don't abort if target already exists (rename it by adding an @code{_old}
suffix).
-@item --checkpoint=db_name.tbl_name
-Insert checkpoint entries into the specified @code{db_name.tbl_name}.
+@item --checkpoint=@var{db_name.tbl_name}
+Insert checkpoint entries into the specified @var{db_name.tbl_name}.
@item --debug
Enable debug output.
@@ -38157,7 +38158,7 @@
@item --keepold
Don't delete previous (now renamed) target when done.
-@item --method=#
+@item --method=@var{#}
Method for copy (@code{cp} or @code{scp}).
@item --noindices
@@ -38165,29 +38166,29 @@
and faster. The indexes can be reconstructed later with @code{myisamchk -rq}
for @code{MyISAM} tables or @code{isamchk -rq} for @code{ISAM} tables.
-@item --password=password, -ppassword
+@item --password=@var{password}, -p@var{password}
The password to use when connecting to the server. Note that the password
value is not optional for this option, unlike for other MySQL programs.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The TCP/IP port number to use when connecting to the local server.
@item --quiet, -q
Be silent except for errors.
-@item --regexp=expr
+@item --regexp=@var{expr}
Copy all databases with names matching the given regular expression.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
The Unix socket file to use for the connection.
-@item --suffix=str
+@item --suffix=@var{str}
The suffix for names of copied databases.
-@item --tmpdir=path
+@item --tmpdir=@var{path}
The temporary directory (instead of @file{/tmp}).
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
The MySQL username to use when connecting to the server.
@end table
@@ -38224,7 +38225,7 @@
Invoke @code{mysqlimport} like this:
@example
-shell> mysqlimport [options] db_name textfile1 [textfile2 ...]
+shell> mysqlimport [options] @var{db_name} @var{textfile1} [@var{textfile2} ...]
@end example
For each text file named on the command line, @code{mysqlimport} strips any
@@ -38240,7 +38241,7 @@
@item --help, -?
Display a help message and exit.
-@item --columns=column_list, -c column_list
+@item --columns=@var{column_list}, -c @var{column_list}
This option takes a comma-separated list of column names as its value. The
order of the column names indicates how to match up data file columns with
table columns.
@@ -38249,9 +38250,9 @@
Compress all information sent between the client and the server if both
support compression.
-@item --debug[=debug_options], -# [debug_options]
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
@item --delete, -D
Empty the table before importing the text file.
@@ -38269,15 +38270,15 @@
continue processing any remaining files. Without @code{--force},
@code{mysqlimport} exits if a table doesn't exist.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
Import data to the MySQL server on the given host. The default host
is @code{localhost}.
@item --ignore, -i
See the description for the @code{--replace} option.
-@item --ignore-lines=n
-Ignore the first @code{n} lines of the data file.
+@item --ignore-lines=@var{n}
+Ignore the first @var{n} lines of the data file.
@item --local, -L
Read input files from the client host. By default, text files are assumed to be on
@@ -38287,13 +38288,13 @@
Lock @emph{all} tables for writing before processing any text files. This
ensures that all tables are synchronized on the server.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The TCP/IP port number to use for the connection.
@item --protocol=@{TCP | SOCKET | PIPE | MEMORY@}
@@ -38311,11 +38312,11 @@
@item --silent, -s
Silent mode. Produce output only when errors occur.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
The socket file to use when connecting to @code{localhost} (which is the
default host).
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
The MySQL username to use when connecting to the server.
@item --verbose, -v
@@ -38375,7 +38376,7 @@
Invoke @code{mysqlshow} like this:
@example
-shell> mysqlshow [options] [db_name [tbl_name [col_name]]]
+shell> mysqlshow [@var{options}] [@var{db_name} [@var{tbl_name} [@var{col_name}]]]
@end example
@itemize @bullet
@@ -38410,46 +38411,46 @@
@item --help, -?
Display a help message and exit.
-@item --character-sets-dir=path
+@item --character-sets-dir=@var{path}
The directory where character sets are installed. @xref{Character sets}.
@item --compress, -C
Compress all information sent between the client and the server if both
support compression.
-@item --debug[=debug_options], -# [debug_options]
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item --debug[=@var{debug_options}], -# [@var{debug_options}]
+Write a debugging log. The @var{debug_options} string often is
+@code{'d:t:o,@var{file_name}'}.
-@item --default-character-set=charset
-Use @code{charset} as the default character set. @xref{Character sets}.
+@item --default-character-set=@var{charset}
+Use @var{charset} as the default character set. @xref{Character sets}.
-@item --host=host_name, -h host_name
+@item --host=@var{host_name}, -h @var{host_name}
Connect to the MySQL server on the given host.
@item --keys, -k
Show table indexes.
-@item --password[=password], -p[password]
+@item --password[=@var{password}], -p[@var{password}]
The password to use when connecting to the server. If you use the
short option form (@code{-p}), you @emph{cannot} have a space between the
option and the password. If no password is given on the command line,
you will be prompted for one.
-@item --port=port_num, -P port_num
+@item --port=@var{port_num}, -P @var{port_num}
The TCP/IP port number to use for the connection.
@item --protocol=@{TCP | SOCKET | PIPE | MEMORY@}
The connection protocol to use. New in MySQL 4.1.
-@item --socket=path, -S path
+@item --socket=@var{path}, -S @var{path}
The socket file to use when connecting to @code{localhost} (which is the
default host).
@item --status, -i
Display extra information about each table.
-@item --user=user_name, -u user_name
+@item --user=@var{user_name}, -u @var{user_name}
The MySQL username to use when connecting to the server.
@item --verbose, -v
@@ -38539,9 +38540,9 @@
@item -?, -I
Display a help message and exit.
-@item -# debug_options
-Write a debugging log. The @code{debug_options} string often is
-@code{'d:t:o,file_name'}.
+@item -# @var{debug_options}
+Write a debugging log. The @code{@var{debug_options}} string often is
+@code{'d:t:o,@var{file_name}'}.
@item -s
Silent mode. Print out less information what the program does.
@@ -38738,7 +38739,7 @@
to allow you to
work around the problem that ASCII 26 stands for END-OF-FILE on Windows.
(ASCII 26 will cause problems if you try to use
-@code{mysql db_name < file_name}.)
+@code{mysql @var{db_name} < @var{file_name}}.)
@item @code{\\}
@findex \\ (escape)
@@ -39106,12 +39107,12 @@
@multitable @columnfractions .30 .70
@item @strong{Column Reference} @tab @strong{Meaning}
-@item @code{col_name} @tab The column @code{col_name}
+@item @var{col_name} @tab The column @var{col_name}
from whichever table used in the query contains a column of that name.
-@item @code{tbl_name.col_name} @tab The column @code{col_name} from table
-@code{tbl_name} of the default database.
-@item @code{db_name.tbl_name.col_name} @tab The column @code{col_name} from table
-@code{tbl_name} of the database @code{db_name}. This syntax is unavailable
+@item @var{tbl_name.col_name} @tab The column @var{col_name} from table
+@var{tbl_name} of the default database.
+@item @var{db_name.tbl_name.col_name} @tab The column @var{col_name} from table
+@var{tbl_name} of the database @var{db_name}. This syntax is unavailable
before MySQL 3.22.
@end multitable
@@ -39120,7 +39121,7 @@
@code{`my-table`.`my-column`} is legal, whereas @code{`my-table.my-column`} is
not.
-You need not specify a @code{tbl_name} or @code{db_name.tbl_name} prefix for
+You need not specify a @var{tbl_name} or @var{db_name.tbl_name} prefix for
a column reference in a statement unless the reference would be ambiguous.
Suppose that tables @code{t1} and @code{t2} each contain a column
@code{c}, and you retrieve @code{c} in a @code{SELECT} statement that uses
@@ -39134,7 +39135,7 @@
@cindex ODBC compatibility
@cindex compatibility, with ODBC
-The syntax @code{.tbl_name} means the table @code{tbl_name} in the current
+The syntax @var{.tbl_name} means the table @var{tbl_name} in the current
database. This syntax is accepted for ODBC compatibility because some ODBC
programs prefix table names with a @samp{.} character.
@@ -39182,8 +39183,8 @@
as @code{A}:
@example
-mysql> SELECT col_name FROM tbl_name AS a
- -> WHERE a.col_name = 1 OR A.col_name = 2;
+mysql> SELECT @var{col_name} FROM @var{tbl_name} AS a
+ -> WHERE a.@var{col_name} = 1 OR A.@var{col_name} = 2;
@end example
If you have trouble remembering the allowable lettercase for database
@@ -39296,7 +39297,7 @@
the following statement will @emph{not} work as expected:
@example
-mysql> SELECT (@@aa:=id) AS a, (@@aa+3) AS b FROM tbl_name HAVING b=5;
+mysql> SELECT (@@aa:=id) AS a, (@@aa+3) AS b FROM @var{tbl_name} HAVING b=5;
@end example
The reference to @code{b} in the @code{HAVING} clause refers to an alias
@@ -39314,7 +39315,7 @@
@example
mysql> SET @@a='test';
-mysql> SELECT @@a,(@@a:=20) FROM tbl_name;
+mysql> SELECT @@a,(@@a:=20) FROM @var{tbl_name};
@end example
For this @code{SELECT} statement, MySQL will report to the client that
@@ -40042,19 +40043,19 @@
database character set and collation:
@example
-CREATE DATABASE db_name
- [[DEFAULT] CHARACTER SET charset_name]
- [[DEFAULT] COLLATE collation_name]
-
-ALTER DATABASE db_name
- [[DEFAULT] CHARACTER SET charset_name]
- [[DEFAULT] COLLATE collation_name]
+CREATE DATABASE @var{db_name}
+ [[DEFAULT] CHARACTER SET @var{charset_name}]
+ [[DEFAULT] COLLATE @var{collation_name}]
+
+ALTER DATABASE @var{db_name}
+ [[DEFAULT] CHARACTER SET @var{charset_name}]
+ [[DEFAULT] COLLATE @var{collation_name}]
@end example
Example:
@example
-CREATE DATABASE db_name
+CREATE DATABASE @var{db_name}
DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
@end example
@@ -40099,11 +40100,11 @@
collation:
@example
-CREATE TABLE tbl_name (column_list)
- [DEFAULT CHARACTER SET charset_name [COLLATE collation_name]]
+CREATE TABLE @var{tbl_name} (@var{column_list})
+ [DEFAULT CHARACTER SET @var{charset_name} [COLLATE @var{collation_name}]]
-ALTER TABLE tbl_name
- [DEFAULT CHARACTER SET charset_name] [COLLATE collation_name]
+ALTER TABLE @var{tbl_name}
+ [DEFAULT CHARACTER SET @var{charset_name}] [COLLATE @var{collation_name}]
@end example
Example:
@@ -41959,8 +41960,8 @@
@item
When using integers to store big unsigned values in a @code{BIGINT} column.
@item
-In @code{MIN(col_name)} or @code{MAX(col_name)}, where @code{col_name} refers
-to a @code{BIGINT} column.
+In @code{MIN(@var{col_name})} or @code{MAX(@var{col_name})}, where
+@var{col_name} refers to a @code{BIGINT} column.
@item
When using operators (@code{+}, @code{-}, @code{*}, and so on) where
both operands are integers.
@@ -42891,10 +42892,10 @@
the @code{TIMESTAMP} column explicitly to its current value:
@example
-UPDATE tbl_name
- SET timestamp_col = timestamp_col,
- other_col1 = new_value1,
- other_col2 = new_value2, ...
+UPDATE @var{tbl_name}
+ SET @var{timestamp_col} = @var{timestamp_col},
+ @var{other_col1} = @var{new_value1},
+ @var{other_col2} = @var{new_value2}, ...
@end example
@end itemize
@@ -43479,7 +43480,7 @@
function. For example:
@example
-mysql> SELECT comment FROM tbl_name,SUBSTRING(comment,20) AS substr
+mysql> SELECT comment FROM @var{tbl_name},SUBSTRING(comment,20) AS substr
-> ORDER BY substr;
@end example
@@ -43494,9 +43495,9 @@
@example
mysql> SELECT id,SUBSTRING(blob_col,1,100) AS b
- -> FROM tbl_name GROUP BY b;
+ -> FROM @var{tbl_name} GROUP BY b;
mysql> SELECT id,SUBSTRING(blob_col,1,100)
- -> FROM tbl_name GROUP BY 2;
+ -> FROM @var{tbl_name} GROUP BY 2;
@end example
@item
@@ -43563,7 +43564,7 @@
@code{ENUM} values were assigned:
@example
-mysql> SELECT * FROM tbl_name WHERE enum_col=0;
+mysql> SELECT * FROM @var{tbl_name} WHERE @var{enum_col}=0;
@end example
@item
@@ -43596,7 +43597,7 @@
an @code{ENUM} column like this:
@example
-mysql> SELECT enum_col+0 FROM tbl_name;
+mysql> SELECT @var{enum_col}+0 FROM @var{tbl_name};
@end example
If you store a number into an @code{ENUM} column, the number is treated as an
@@ -43627,7 +43628,7 @@
is sorted lexically rather than by index number.
If you want to determine all possible values for an @code{ENUM} column,
-use @code{SHOW COLUMNS FROM tbl_name LIKE enum_col} and parse
+use @code{SHOW COLUMNS FROM @var{tbl_name} LIKE @var{enum_col}} and parse
the @code{ENUM} definition in the second column of the output.
@@ -43665,7 +43666,7 @@
you can retrieve numeric values from a @code{SET} column like this:
@example
-mysql> SELECT set_col+0 FROM tbl_name;
+mysql> SELECT @var{set_col}+0 FROM @var{tbl_name};
@end example
If a number is stored into a @code{SET} column, the bits that
@@ -43705,8 +43706,8 @@
the @code{FIND_IN_SET()} function or the @code{LIKE} operator:
@example
-mysql> SELECT * FROM tbl_name WHERE FIND_IN_SET('value',set_col)>0;
-mysql> SELECT * FROM tbl_name WHERE set_col LIKE '%value%';
+mysql> SELECT * FROM @var{tbl_name} WHERE
FIND_IN_SET('@var{value}',@var{set_col})>0;
+mysql> SELECT * FROM @var{tbl_name} WHERE @var{set_col} LIKE '%@var{value}%';
@end example
The first statement finds rows where @code{set_col} contains the
@@ -43717,19 +43718,19 @@
The following statements also are legal:
@example
-mysql> SELECT * FROM tbl_name WHERE set_col & 1;
-mysql> SELECT * FROM tbl_name WHERE set_col = 'val1,val2';
+mysql> SELECT * FROM @var{tbl_name} WHERE @var{set_col} & 1;
+mysql> SELECT * FROM @var{tbl_name} WHERE @var{set_col} = '@var{val1},@var{val2}';
@end example
The first of these statements looks for values containing the first set
member. The second looks for an exact match. Be careful with comparisons
-of the second type. Comparing set values to @code{'val1,val2'} will
-return different results than comparing values to @code{'val2,val1'}.
+of the second type. Comparing set values to @code{'@var{val1},@var{val2}'} will
+return different results than comparing values to @code{'@var{val2},@var{val1}'}.
You should specify the values in the same order they are listed in the
column definition.
If you want to determine all possible values for a @code{SET} column,
-use @code{SHOW COLUMNS FROM tbl_name LIKE set_col} and parse
+use @code{SHOW COLUMNS FROM @var{tbl_name} LIKE @var{set_col}} and parse
the @code{SET} definition in the second column of the output.
@@ -43894,7 +43895,7 @@
Column type mapping occurs at table creation time, after which the original
type specifications are discarded. If you create a table with types used
-by other vendors and then issue a @code{DESCRIBE tbl_name} statement,
+by other vendors and then issue a @code{DESCRIBE @var{tbl_name}} statement,
MySQL reports the table structure using the equivalent MySQL types.
@@ -44106,12 +44107,12 @@
@end example
Note that when you are comparing a string column with a number, MySQL can't
-use an index on the column to quickly look up the value. If @code{str_col}
+use an index on the column to quickly look up the value. If @var{str_col}
is an indexed string column, the index cannot be used when performing the
lookup in the following statement:
@example
-SELECT * FROM tbl_name WHERE str_col=1;
+SELECT * FROM @var{tbl_name} WHERE @var{str_col}=1;
@end example
The reason for this is that there are many different strings that may
@@ -44261,7 +44262,7 @@
value:
@example
-SELECT * FROM tbl_name WHERE auto_col IS NULL
+SELECT * FROM @var{tbl_name} WHERE @var{auto_col} IS NULL
@end example
This behavior can be disabled by setting @code{SQL_AUTO_IS_NULL=0}.
@@ -44273,7 +44274,7 @@
like this:
@example
-SELECT * FROM tbl_name WHERE date_column IS NULL
+SELECT * FROM @var{tbl_name} WHERE @var{date_column} IS NULL
@end example
This is needed to get some ODBC applications to work because ODBC doesn't
@@ -44650,7 +44651,7 @@
value to uppercase before performing the comparison:
@example
-SELECT 'A' LIKE UPPER(blob_col) FROM tbl_name;
+SELECT 'A' LIKE UPPER(blob_col) FROM @var{tbl_name};
@end example
If the comparison value is lowercase, convert the @code{BLOB} value using
@@ -44665,7 +44666,7 @@
@code{LIKE} operation is not case sensitive:
@example
-SELECT 'A' LIKE CONVERT(blob_col USING latin1) FROM tbl_name;
+SELECT 'A' LIKE CONVERT(blob_col USING latin1) FROM @var{tbl_name};
@end example
To use a different character set, substitute its name for @code{latin1}
@@ -45217,7 +45218,7 @@
@c example_for_help_topic LOAD_FILE
@example
-mysql> UPDATE tbl_name
+mysql> UPDATE @var{tbl_name}
SET blob_column=LOAD_FILE('/tmp/picture')
WHERE id=1;
@end example
@@ -46400,7 +46401,7 @@
As of MySQL 3.23, you can retrieve rows in random order like this:
@example
-mysql> SELECT * FROM tbl_name ORDER BY RAND();
+mysql> SELECT * FROM @var{tbl_name} ORDER BY RAND();
@end example
@code{ORDER BY RAND()} combined with @code{LIMIT} is useful for selecting
@@ -46561,8 +46562,8 @@
all records with a @code{date_col} value from within the last 30 days:
@example
-mysql> SELECT something FROM tbl_name
- -> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;
+mysql> SELECT @var{something} FROM @var{tbl_name}
+ -> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= @var{date_col};
@end example
Note that the query also will select records with dates that lie in the
@@ -48388,7 +48389,7 @@
in this case, it's sufficient to do a @code{QUICK} repair operation:
@example
-mysql> REPAIR TABLE tbl_name QUICK;
+mysql> REPAIR TABLE @var{tbl_name} QUICK;
@end example
With regard specifically to using the @code{IN BOOLEAN MODE} capability, if
@@ -48396,7 +48397,7 @@
index header as well. To do this, do a @code{USE_FRM} repair operation:
@example
-mysql> REPAIR TABLE tbl_name USE_FRM;
+mysql> REPAIR TABLE @var{tbl_name} USE_FRM;
@end example
This is necessary because boolean full-text searches require a flag in the
@@ -48420,7 +48421,7 @@
you can repair a table with @code{myisamchk} like this:
@example
-shell> myisamchk --recover --ft_min_word_len=3 tbl_name.MYI
+shell> myisamchk --recover --ft_min_word_len=3 @var{tbl_name}.MYI
@end example
To ensure that @code{myisamchk} and the server use the same values for
@@ -48528,7 +48529,7 @@
@c example_for_help_topic CAST
@example
-SELECT enum_col FROM tbl_name ORDER BY CAST(enum_col AS CHAR);
+SELECT @var{enum_col} FROM @var{tbl_name} ORDER BY CAST(@var{enum_col} AS CHAR);
@end example
@code{CAST(str AS BINARY)} is the same thing as @code{BINARY str}.
@@ -49193,7 +49194,7 @@
@c example_for_help_topic FOUND_ROWS
@example
-mysql> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name
+mysql> SELECT SQL_CALC_FOUND_ROWS * FROM @var{tbl_name}
-> WHERE id > 100 LIMIT 10;
mysql> SELECT FOUND_ROWS();
@end example
@@ -50152,7 +50153,7 @@
using an alias for the expression:
@example
-mysql> SELECT id,FLOOR(value/100) AS val FROM tbl_name
+mysql> SELECT id,FLOOR(value/100) AS val FROM @var{tbl_name}
-> GROUP BY id, val ORDER BY val;
@end example
@@ -50160,7 +50161,7 @@
in @code{GROUP BY} and @code{ORDER BY} clauses. For example:
@example
-mysql> SELECT id, FLOOR(value/100) FROM tbl_name ORDER BY RAND();
+mysql> SELECT id, FLOOR(value/100) FROM @var{tbl_name} ORDER BY RAND();
@end example
@@ -50208,33 +50209,33 @@
@c example_for_help_topic DELETE
Single-table syntax:
@example
-DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name
- [WHERE where_definition]
+DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM @var{tbl_name}
+ [WHERE @var{where_definition}]
[ORDER BY ...]
- [LIMIT row_count]
+ [LIMIT @var{row_count}]
@end example
Multiple-table syntax:
@example
DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
- tbl_name[.*] [, tbl_name[.*] ...]
- FROM table_references
- [WHERE where_definition]
+ @var{tbl_name}[.*] [, @var{tbl_name}[.*] ...]
+ FROM @var{table_references}
+ [WHERE @var{where_definition}]
@end example
Or:
@example
DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
- FROM tbl_name[.*] [, tbl_name[.*] ...]
- USING table_references
- [WHERE where_definition]
+ FROM @var{tbl_name}[.*] [, @var{tbl_name}[.*] ...]
+ USING @var{table_references}
+ [WHERE @var{where_definition}]
@end example
@c description_for_help_topic DELETE BY ORDER LIMIT WHERE FROM USING LOW_PRIORITY QUICK
-@code{DELETE} deletes rows from @code{tbl_name} that satisfy the condition
-given by @code{where_definition}, and returns the number of records deleted.
+@code{DELETE} deletes rows from @var{tbl_name} that satisfy the condition
+given by @var{where_definition}, and returns the number of records deleted.
If you issue a @code{DELETE} statement with no @code{WHERE} clause, all
rows are deleted. A faster way to do this, when you don't want to know
@@ -50252,16 +50253,16 @@
example:
@example
-mysql> DELETE FROM tbl_name WHERE 1>0;
+mysql> DELETE FROM @var{tbl_name} WHERE 1>0;
@end example
-This is much slower than @code{TRUNCATE tbl_name}, because it deletes
+This is much slower than @code{TRUNCATE @var{tbl_name}}, because it deletes
rows one at a time.
If you delete the row containing the maximum value for an
@code{AUTO_INCREMENT} column, the value will be reused for an @code{ISAM}
or @code{BDB} table, but not for a @code{MyISAM} or @code{InnoDB} table.
-If you delete all rows in the table with @code{DELETE FROM tbl_name}
+If you delete all rows in the table with @code{DELETE FROM @var{tbl_name}}
(without a @code{WHERE}) in @code{AUTOCOMMIT} mode, the sequence starts
over for all table types except for @code{InnoDB} and (as of MySQL 4.0)
@code{MyISAM}. There are some exceptions to this behavior for @code{InnoDB}
@@ -50306,7 +50307,7 @@
@code{OPTIMIZE TABLE} is easier, but @code{myisamchk} is faster. See
@ref{OPTIMIZE TABLE, , @code{OPTIMIZE TABLE}} and @ref{Optimisation}.
-The MySQL-specific @code{LIMIT row_count} option to @code{DELETE} tells
+The MySQL-specific @code{LIMIT @var{row_count}} option to @code{DELETE} tells
the server the maximum number of rows to be deleted before control is
returned to the client. This can be used to ensure that a specific
@code{DELETE} statement doesn't take too much time. You can simply repeat
@@ -50421,14 +50422,14 @@
@c example_for_help_topic HANDLER
@example
-HANDLER tbl_name OPEN [ AS alias ]
-HANDLER tbl_name READ index_name @{ = | >= | <= | < @} (value1,value2,...)
- [ WHERE where_condition ] [LIMIT ... ]
-HANDLER tbl_name READ index_name @{ FIRST | NEXT | PREV | LAST @}
- [ WHERE where_condition ] [LIMIT ... ]
-HANDLER tbl_name READ @{ FIRST | NEXT @}
- [ WHERE where_condition ] [LIMIT ... ]
-HANDLER tbl_name CLOSE
+HANDLER @var{tbl_name} OPEN [ AS @var{alias} ]
+HANDLER @var{tbl_name} READ @var{index_name} @{ = | >= | <= | < @}
(@var{value1},@var{value2},...)
+ [ WHERE @var{where_condition} ] [LIMIT ... ]
+HANDLER @var{tbl_name} READ @var{index_name} @{ FIRST | NEXT | PREV | LAST @}
+ [ WHERE @var{where_condition} ] [LIMIT ... ]
+HANDLER @var{tbl_name} READ @{ FIRST | NEXT @}
+ [ WHERE @var{where_condition} ] [LIMIT ... ]
+HANDLER @var{tbl_name} CLOSE
@end example
@c description_for_help_topic HANDLER OPEN READ LIMIT FIRST NEXT PREV LAST WHERE CLOSE
@@ -50466,7 +50467,7 @@
The third @code{HANDLER ... READ} syntax fetches a row from the table in
natural row order that matches the @code{WHERE} condition. It is faster than
-@code{HANDLER tbl_name READ index_name} when a full table scan is desired.
+@code{HANDLER @var{tbl_name} READ index_name} when a full table scan is desired.
Natural row order is the order in which rows are stored in a @code{MyISAM}
table data file. This statement works for @code{InnoDB} tables as well, but
there is no such concept because there is no separate data file.
@@ -50484,7 +50485,7 @@
@code{PRIMARY KEY}, use the quoted identifier @code{`PRIMARY`}:
@example
-HANDLER tbl_name READ `PRIMARY` > (...);
+HANDLER @var{tbl_name} READ `PRIMARY` > (...);
@end example
@code{HANDLER} is a somewhat low-level statement. For example, it does not
@@ -50549,21 +50550,21 @@
@c example_for_help_topic INSERT INTO
@example
INSERT [LOW_PRIORITY | DELAYED] [IGNORE]
- [INTO] tbl_name [(col_name,...)]
- VALUES (@{expr | DEFAULT@},...),(...),...
- [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
+ [INTO] @var{tbl_name} [(@var{col_name},...)]
+ VALUES (@{@var{expr} | DEFAULT@},...),(...),...
+ [ ON DUPLICATE KEY UPDATE @var{col_name}=@var{expr}, ... ]
@end example
Or:
@example
INSERT [LOW_PRIORITY | DELAYED] [IGNORE]
- [INTO] tbl_name
- SET col_name=@{expr | DEFAULT@}, ...
- [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
+ [INTO] @var{tbl_name}
+ SET @var{col_name}=@{@var{expr} | DEFAULT@}, ...
+ [ ON DUPLICATE KEY UPDATE @var{col_name}=@var{expr}, ... ]
@end example
Or:
@example
INSERT [LOW_PRIORITY | DELAYED] [IGNORE]
- [INTO] tbl_name [(col_name,...)]
+ [INTO] @var{tbl_name} [(@var{col_name},...)]
SELECT ...
@end example
@@ -50579,7 +50580,7 @@
@xref{INSERT SELECT, , @code{INSERT SELECT}}.
@c end_description_for_help_topic
-@code{tbl_name} is the table into which rows should be inserted. The columns
+@var{tbl_name} is the table into which rows should be inserted. The columns
for which the statement provides values can be specified as follows:
@itemize @bullet
@@ -50592,7 +50593,7 @@
If you do not specify the column list for @code{INSERT ... VALUES} or
@code{INSERT ... SELECT}, values for every column in the table must be
provided in the @code{VALUES()} list or by the @code{SELECT}. If you don't
-know the order of the columns in the table, use @code{DESCRIBE tbl_name} to
+know the order of the columns in the table, use @code{DESCRIBE @var{tbl_name}} to
find out.
@end itemize
@@ -50637,7 +50638,7 @@
creates a row with each column set to its default value:
@example
-mysql> INSERT INTO tbl_name () VALUES();
+mysql> INSERT INTO @var{tbl_name} () VALUES();
@end example
@item
@@ -50646,14 +50647,14 @@
refers to @code{col1}, which has already been assigned:
@example
-mysql> INSERT INTO tbl_name (col1,col2) VALUES(15,col1*2);
+mysql> INSERT INTO @var{tbl_name} (@var{col1},@var{col2}) VALUES(15,@var{col1}*2);
@end example
But you cannot do this because the value for @code{col1} refers to
@code{col2}, which is assigned after @code{col1}:
@example
-mysql> INSERT INTO tbl_name (col1,col2) VALUES(col2*2,15);
+mysql> INSERT INTO @var{tbl_name} (@var{col1},@var{col2}) VALUES(@var{col2}*2,15);
@end example
One exception involves columns that contain @code{AUTO_INCREMENT} values.
@@ -50733,7 +50734,7 @@
@code{UPDATE} clause to refer to column values from the @code{INSERT} part
of the @code{INSERT ... UPDATE} statement. In other words,
@code{VALUES(col_name)} in the @code{UPDATE} clause refers to the value of
-@code{col_name} that would be inserted if no duplicate-key conflict
+@var{col_name} that would be inserted if no duplicate-key conflict
occurred. This function is especially useful in multiple-row inserts. The
@code{VALUES()} function is meaningful only in @code{INSERT ... UPDATE}
statements and returns @code{NULL} otherwise.
@@ -50834,7 +50835,7 @@
@c description_for_help_topic INSERT SELECT
@example
-INSERT [LOW_PRIORITY] [IGNORE] [INTO] tbl_name [(column_list)]
+INSERT [LOW_PRIORITY] [IGNORE] [INTO] @var{tbl_name} [(@var{column_list})]
SELECT ...
@end example
@@ -51055,9 +51056,9 @@
@c example_for_help_topic LOAD DATA
@example
-LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt'
+LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE '@var{file_name}.txt'
[REPLACE | IGNORE]
- INTO TABLE tbl_name
+ INTO TABLE @var{tbl_name}
[FIELDS
[TERMINATED BY '\t']
[[OPTIONALLY] ENCLOSED BY '']
@@ -51067,8 +51068,8 @@
[STARTING BY '']
[TERMINATED BY '\n']
]
- [IGNORE number LINES]
- [(col_name,...)]
+ [IGNORE @var{number} LINES]
+ [(@var{col_name},...)]
@end example
@c description_for_help_topic LOAD DATA BY LOAD DATA LOW_PRIORITY CONCURRENT LOCAL
INFILE REPLACE IGNORE FIELDS ENCLOSED TERMINATED ESCAPED LINES IMPORT CSV OPTIONALLY
STARTING
@@ -51358,7 +51359,7 @@
the file:
@example
-mysql> LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name
+mysql> LOAD DATA INFILE 'data.txt' INTO TABLE @var{tbl_name}
-> FIELDS TERMINATED BY ',' ENCLOSED BY '"'
-> LINES TERMINATED BY '\n';
@end example
@@ -51660,19 +51661,19 @@
@c example_for_help_topic REPLACE INTO
@example
REPLACE [LOW_PRIORITY | DELAYED]
- [INTO] tbl_name [(col_name,...)]
- VALUES (@{expr | DEFAULT@},...),(...),...
+ [INTO] @var{tbl_name} [(@var{col_name},...)]
+ VALUES (@{@var{expr} | DEFAULT@},...),(...),...
@end example
Or:
@example
REPLACE [LOW_PRIORITY | DELAYED]
- [INTO] tbl_name
- SET col_name=@{expr | DEFAULT@}, ...
+ [INTO] @var{tbl_name}
+ SET @var{col_name}=@{@var{expr} | DEFAULT@}, ...
@end example
Or:
@example
REPLACE [LOW_PRIORITY | DELAYED]
- [INTO] tbl_name [(col_name,...)]
+ [INTO] @var{tbl_name} [(@var{col_name},...)]
SELECT ...
@end example
@@ -51745,18 +51746,18 @@
[STRAIGHT_JOIN]
[SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
[SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
- select_expr, ...
- [INTO OUTFILE 'file_name' export_options
- | INTO DUMPFILE 'file_name']
- [FROM table_references
- [WHERE where_definition]
- [GROUP BY @{col_name | expr | position@}
+ @var{select_expr}, ...
+ [INTO OUTFILE '@var{file_name}' @var{export_options}
+ | INTO DUMPFILE '@var{file_name}']
+ [FROM @var{table_references}
+ [WHERE @var{where_definition}]
+ [GROUP BY @{@var{col_name} | @var{expr} | @var{position}@}
[ASC | DESC], ... [WITH ROLLUP]]
- [HAVING where_definition]
- [ORDER BY @{col_name | expr | position@}
+ [HAVING @var{where_definition}]
+ [ORDER BY @{@var{col_name} | @var{expr} | @var{position}@}
[ASC | DESC] , ...]
- [LIMIT @{[offset,] row_count | row_count OFFSET offset@}]
- [PROCEDURE procedure_name(argument_list)]
+ [LIMIT @{[@var{offset},] @var{row_count} | @var{row_count} OFFSET @var{offset}@}]
+ [PROCEDURE @var{procedure_name}(@var{argument_list})]
[FOR UPDATE | LOCK IN SHARE MODE]]
@end example
@c help end
@@ -51769,14 +51770,14 @@
@itemize @bullet
@item
-Each @code{select_expr} indicates a column you want to retrieve.
+Each @var{select_expr} indicates a column you want to retrieve.
@item
-@code{table_references} indicates the table or tables from which to retrieve rows.
+@var{table_references} indicates the table or tables from which to retrieve rows.
Its syntax is described in @ref{JOIN, , @code{JOIN}}.
@item
-@code{where_definition} consists of the keyword @code{WHERE} followed by
+@var{where_definition} consists of the keyword @code{WHERE} followed by
an expression that indicates the condition or conditions that rows
must satisfy to be selected.
@@ -51802,7 +51803,7 @@
@item
@cindex aliases, on expressions
@cindex expression aliases
-A @code{select_expr} can be given an alias using @code{AS alias_name}.
+A @var{select_expr} can be given an alias using @code{AS alias_name}.
The alias is used as the expression's column name and can be used in
@code{GROUP BY},
@code{ORDER BY}, or @code{HAVING} clauses. For example:
@@ -51812,7 +51813,7 @@
-> FROM mytable ORDER BY full_name;
@end example
-The @code{AS} keyword is optional when aliasing a @code{select_expr}.
+The @code{AS} keyword is optional when aliasing a @var{select_expr}.
The preceding example could have been written like this:
@example
@@ -51821,7 +51822,7 @@
@end example
Because the @code{AS} is optional, a subtle problem can occur
-if you forget the comma between two @code{select_expr} expressions: MySQL
+if you forget the comma between two @var{select_expr} expressions: MySQL
interprets the second as an alias name. For example, in the following
statement, @code{columnb} is treated as an alias name:
@@ -51850,10 +51851,10 @@
For each table specified, you can optionally specify an alias.
@example
-tbl_name [[AS] alias]
- [[USE INDEX (key_list)]
- | [IGNORE INDEX (key_list)]
- | [FORCE INDEX (key_list)]]
+@var{tbl_name} [[AS] @var{alias}]
+ [[USE INDEX (@var{key_list})]
+ | [IGNORE INDEX (@var{key_list})]
+ | [FORCE INDEX (@var{key_list})]]
@end example
The use of
@@ -51867,11 +51868,11 @@
alternative way to force MySQL to prefer key scans instead of table scans.
@item
-You can refer to a table within the current database as @code{tbl_name}
-(within the current database), or as @code{db_name.tbl_name} to explicitly
-specify a database. You can refer to a column as @code{col_name},
-@code{tbl_name.col_name}, or @code{db_name.tbl_name.col_name}. You need not
-specify a @code{tbl_name} or @code{db_name.tbl_name} prefix for a column
+You can refer to a table within the current database as @var{tbl_name}
+(within the current database), or as @var{db_name.tbl_name} to explicitly
+specify a database. You can refer to a column as @var{col_name},
+@var{tbl_name.col_name}, or @var{db_name.tbl_name.col_name}. You need not
+specify a @var{tbl_name} or @var{db_name.tbl_name} prefix for a column
reference unless the reference would be ambiguous. See @ref{Legal names}
for examples of ambiguity that require the more explicit column reference
forms.
@@ -51891,8 +51892,8 @@
@item
@cindex aliases, for tables
@cindex table aliases
-A table reference can be aliased using @code{tbl_name AS alias_name} or
-@code{tbl_name alias_name}:
+A table reference can be aliased using @code{@var{tbl_name} AS @var{alias_name}} or
+@var{tbl_name alias_name}:
@example
mysql> SELECT t1.name, t2.salary FROM employee AS t1, info AS t2
@@ -51954,7 +51955,7 @@
@item
The @code{HAVING} clause can refer to any column or alias named in a
-@code{select_expr}. It is applied nearly last, just before items are
+@var{select_expr}. It is applied nearly last, just before items are
sent to the client, with no optimization.
(@code{LIMIT} is applied after @code{HAVING}.)
@@ -51963,13 +51964,13 @@
should be in the @code{WHERE} clause. For example, do not write this:
@example
-mysql> SELECT col_name FROM tbl_name HAVING col_name > 0;
+mysql> SELECT @var{col_name} FROM @var{tbl_name} HAVING @var{col_name} > 0;
@end example
Write this instead:
@example
-mysql> SELECT col_name FROM tbl_name WHERE col_name > 0;
+mysql> SELECT @var{col_name} FROM @var{tbl_name} WHERE @var{col_name} > 0;
@end example
@item
@@ -52005,7 +52006,7 @@
For
compatibility with PostgreSQL, MySQL also supports the
-@code{LIMIT row_count OFFSET offset} syntax.
+@code{LIMIT @var{row_count} OFFSET @var{offset}} syntax.
To retrieve all rows from a certain offset up to the end of the result set,
you can use some large number for the second parameter. This statement
@@ -52142,7 +52143,7 @@
which they are listed in the @code{FROM} clause. You can use this to speed up
a query if the optimizer joins the tables in non-optimal order.
@xref{EXPLAIN, , @code{EXPLAIN}}.
-@code{STRAIGHT_JOIN} also can be used in the @code{table_references} list.
+@code{STRAIGHT_JOIN} also can be used in the @var{table_references} list.
@xref{JOIN, , @code{JOIN}}.
@item
@@ -52215,35 +52216,35 @@
@c description_for_help_topic JOIN INNER CROSS LEFT OUTER NATURAL RIGHT STRAIGHT_JOIN
USE INDEX AS IGNORE FORCE ON USING
MySQL supports the following @code{JOIN} syntaxes for the
-@code{table_references} part of @code{SELECT} statements and multiple-table
+@var{table_references} part of @code{SELECT} statements and multiple-table
@code{DELETE} and @code{UPDATE} statements:
@example
-table_reference, table_reference
-table_reference [INNER | CROSS] JOIN table_reference [join_condition]
-table_reference STRAIGHT_JOIN table_reference
-table_reference LEFT [OUTER] JOIN table_reference [join_condition]
-table_reference NATURAL [LEFT [OUTER]] JOIN table_reference
-@{ OJ table_reference LEFT OUTER JOIN table_reference
- ON conditional_expr @}
-table_reference RIGHT [OUTER] JOIN table_reference [join_condition]
-table_reference NATURAL [RIGHT [OUTER]] JOIN table_reference
+@var{table_reference}, @var{table_reference}
+@var{table_reference} [INNER | CROSS] JOIN @var{table_reference} [@var{join_condition}]
+@var{table_reference} STRAIGHT_JOIN @var{table_reference}
+@var{table_reference} LEFT [OUTER] JOIN @var{table_reference} [@var{join_condition}]
+@var{table_reference} NATURAL [LEFT [OUTER]] JOIN @var{table_reference}
+@{ OJ @var{table_reference} LEFT OUTER JOIN @var{table_reference}
+ ON @var{conditional_expr} @}
+@var{table_reference} RIGHT [OUTER] JOIN @var{table_reference} [@var{join_condition}]
+@var{table_reference} NATURAL [RIGHT [OUTER]] JOIN @var{table_reference}
@end example
-@code{table_reference} is defined as:
+@var{table_reference} is defined as:
@findex AS
@example
-tbl_name [[AS] alias]
- [[USE INDEX (key_list)]
- | [IGNORE INDEX (key_list)]
- | [FORCE INDEX (key_list)]]
+@var{tbl_name} [[AS] @var{alias}]
+ [[USE INDEX (@var{key_list})]
+ | [IGNORE INDEX (@var{key_list})]
+ | [FORCE INDEX (@var{key_list})]]
@end example
-@code{join_condition} is defined as:
+@var{join_condition} is defined as:
@example
-ON conditional_expr | USING (column_list)
+ON @var{conditional_expr} | USING (@var{column_list})
@end example
@c end_description_for_help_topic
@@ -52262,8 +52263,8 @@
@itemize @bullet
@item
-A table reference can be aliased using @code{tbl_name AS alias_name} or
-@code{tbl_name alias_name}:
+A table reference can be aliased using @code{@var{tbl_name} AS @var{alias_name}} or
+@var{tbl_name alias_name}:
@example
mysql> SELECT t1.name, t2.salary FROM employee AS t1, info AS t2
@@ -52433,9 +52434,9 @@
you should use parentheses:
@example
-(SELECT a FROM tbl_name WHERE a=10 AND B=1 ORDER BY a LIMIT 10)
+(SELECT a FROM @var{tbl_name} WHERE a=10 AND B=1 ORDER BY a LIMIT 10)
UNION
-(SELECT a FROM tbl_name WHERE a=11 AND B=2 ORDER BY a LIMIT 10)
+(SELECT a FROM @var{tbl_name} WHERE a=11 AND B=2 ORDER BY a LIMIT 10)
ORDER BY a;
@end example
@@ -52818,7 +52819,7 @@
For certain cases, a correlated subquery is optimized. For example:
@example
-val IN (SELECT key_val FROM tbl_name WHERE correlated_condition)
+@var{val} IN (SELECT @var{key_val} FROM @var{tbl_name} WHERE @var{correlated_condition})
@end example
Otherwise, they are inefficient and likely to be slow. Rewriting the query
@@ -53329,7 +53330,7 @@
@c example_for_help_topic TRUNCATE TABLE
@example
-TRUNCATE TABLE tbl_name
+TRUNCATE TABLE @var{tbl_name}
@end example
@c description_for_help_topic TRUNCATE TABLE
@@ -53362,7 +53363,7 @@
@end itemize
In MySQL 3.23, @code{TRUNCATE TABLE} is mapped to
-@code{COMMIT; DELETE FROM tbl_name}, so it behaves like @code{DELETE}.
+@code{COMMIT; DELETE FROM @var{tbl_name}}, so it behaves like @code{DELETE}.
@xref{DELETE, , @code{DELETE}}.
@code{TRUNCATE TABLE} is an Oracle SQL extension.
@@ -53379,19 +53380,19 @@
@c example_for_help_topic UPDATE
Single-table syntax:
@example
-UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
- SET col_name1=expr1 [, col_name2=expr2 ...]
- [WHERE where_definition]
+UPDATE [LOW_PRIORITY] [IGNORE] @var{tbl_name}
+ SET @var{col_name1}=@var{expr1} [, @var{col_name2}=@var{expr2} ...]
+ [WHERE @var{where_definition}]
[ORDER BY ...]
- [LIMIT row_count]
+ [LIMIT @var{row_count}]
@end example
Multiple-table syntax:
@example
-UPDATE [LOW_PRIORITY] [IGNORE] tbl_name [, tbl_name ...]
- SET col_name1=expr1 [, col_name2=expr2 ...]
- [WHERE where_definition]
+UPDATE [LOW_PRIORITY] [IGNORE] @var{tbl_name} [, @var{tbl_name} ...]
+ SET @var{col_name1}=@var{expr1} [, @var{col_name2}=@var{expr2} ...]
+ [WHERE @var{where_definition}]
@end example
@c description_for_help_topic UPDATE BY LOW_PRIORITY IGNORE SET ORDER LIMIT WHERE
@@ -53419,7 +53420,7 @@
@end itemize
-If you access a column from @code{tbl_name} in an expression,
+If you access a column from @var{tbl_name} in an expression,
@code{UPDATE} uses the current value of the column. For example, the
following statement sets the @code{age} column to one more than its
current value:
@@ -53450,19 +53451,19 @@
returns the number of rows that were matched and updated and the number of
warnings that occurred during the @code{UPDATE}.
-Starting from MySQL 3.23, you can use @code{LIMIT row_count} to
+Starting from MySQL 3.23, you can use @code{LIMIT @var{row_count}} to
restrict the scope of the @code{UPDATE}. A @code{LIMIT} clause works as
follows:
@itemize @bullet
@item
Before MySQL 4.0.13, @code{LIMIT} is a rows-affected restriction.
-The statement stops as soon as it has changed @code{row_count} rows that
+The statement stops as soon as it has changed @var{row_count} rows that
satisfy the @code{WHERE} clause.
@item
From 4.0.13 on, @code{LIMIT} is a rows-matched restriction. The statement
-stops as soon as it has found @code{row_count} rows that satisfy the
+stops as soon as it has found @var{row_count} rows that satisfy the
@code{WHERE} clause, whether or not they actually were changed.
@end itemize
@@ -53525,12 +53526,12 @@
@c example_for_help_topic ALTER DATABASE
@example
-ALTER DATABASE db_name
- alter_specification [, alter_specification] ...
+ALTER DATABASE @var{db_name}
+ @var{alter_specification} [, @var{alter_specification}] ...
-alter_specification:
- [DEFAULT] CHARACTER SET charset_name
- | [DEFAULT] COLLATE collation_name
+@var{alter_specification}:
+ [DEFAULT] CHARACTER SET @var{charset_name}
+ | [DEFAULT] COLLATE @var{collation_name}
@end example
@c description_for_help_topic ALTER DATABASE CHARACTER SET
@@ -53560,38 +53561,38 @@
@c example_for_help_topic ALTER TABLE
@example
-ALTER [IGNORE] TABLE tbl_name
- alter_specification [, alter_specification] ...
+ALTER [IGNORE] TABLE @var{tbl_name}
+ @var{alter_specification} [, @var{alter_specification}] ...
-alter_specification:
- ADD [COLUMN] column_definition [FIRST | AFTER col_name ]
- | ADD [COLUMN] (column_definition,...)
- | ADD INDEX [index_name] [index_type] (index_col_name,...)
- | ADD [CONSTRAINT [symbol]]
- PRIMARY KEY [index_type] (index_col_name,...)
- | ADD [CONSTRAINT [symbol]]
- UNIQUE [index_name] [index_type] (index_col_name,...)
- | ADD [FULLTEXT|SPATIAL] [index_name] (index_col_name,...)
- | ADD [CONSTRAINT [symbol]]
- FOREIGN KEY [index_name] (index_col_name,...)
- [reference_definition]
- | ALTER [COLUMN] col_name @{SET DEFAULT literal | DROP DEFAULT@}
- | CHANGE [COLUMN] old_col_name column_definition
- [FIRST|AFTER col_name]
- | MODIFY [COLUMN] column_definition [FIRST | AFTER col_name]
- | DROP [COLUMN] col_name
+@var{alter_specification}:
+ ADD [COLUMN] @var{column_definition} [FIRST | AFTER @var{col_name} ]
+ | ADD [COLUMN] (@var{column_definition},...)
+ | ADD INDEX [@var{index_name}] [@var{index_type}] (@var{index_col_name},...)
+ | ADD [CONSTRAINT [@var{symbol}]]
+ PRIMARY KEY [@var{index_type}] (@var{index_col_name},...)
+ | ADD [CONSTRAINT [@var{symbol}]]
+ UNIQUE [@var{index_name}] [@var{index_type}] (@var{index_col_name},...)
+ | ADD [FULLTEXT|SPATIAL] [@var{index_name}] (@var{index_col_name},...)
+ | ADD [CONSTRAINT [@var{symbol}]]
+ FOREIGN KEY [@var{index_name}] (@var{index_col_name},...)
+ [@var{reference_definition}]
+ | ALTER [COLUMN] @var{col_name} @{SET DEFAULT @var{literal} | DROP DEFAULT@}
+ | CHANGE [COLUMN] @var{old_col_name} @var{column_definition}
+ [FIRST|AFTER @var{col_name}]
+ | MODIFY [COLUMN] @var{column_definition} [FIRST | AFTER @var{col_name}]
+ | DROP [COLUMN] @var{col_name}
| DROP PRIMARY KEY
- | DROP INDEX index_name
- | DROP FOREIGN KEY fk_symbol
+ | DROP INDEX @var{index_name}
+ | DROP FOREIGN KEY @var{fk_symbol}
| DISABLE KEYS
| ENABLE KEYS
- | RENAME [TO] new_tbl_name
- | ORDER BY col_name
- | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]
- | [DEFAULT] CHARACTER SET charset_name [COLLATE collation_name]
+ | RENAME [TO] @var{new_tbl_name}
+ | ORDER BY @var{col_name}
+ | CONVERT TO CHARACTER SET @var{charset_name} [COLLATE @var{collation_name}]
+ | [DEFAULT] CHARACTER SET @var{charset_name} [COLLATE @var{collation_name}]
| DISCARD TABLESPACE
| IMPORT TABLESPACE
- | table_options
+ | @var{table_options}
@end example
@c description_for_help_topic ALTER TABLE ADD ALTER AFTER AVG_ROW_LENGTH BY COLUMN FIRST
INDEX PRIMARY KEY KEYS UNIQUE FULLTEXT SPATIAL CONSTRAINT DROP DISABLE ENABLE RENAME ORDER
MODIFY CHANGE DEFAULT SET FOREIGN IGNORE ENGINE TYPE
@@ -53606,7 +53607,7 @@
@xref{CREATE TABLE, , @code{CREATE TABLE}}.
If you use @code{ALTER TABLE} to change a column specification but
-@code{DESCRIBE tbl_name} indicates that your column was not changed, it is
+@code{DESCRIBE @var{tbl_name}} indicates that your column was not changed, it is
possible that MySQL ignored your modification for one of the reasons
described in @ref{Silent column changes}. For example, if you try to change
a @code{VARCHAR} column to @code{CHAR}, MySQL will still use
@@ -53663,20 +53664,20 @@
The word @code{COLUMN} is purely optional and can be omitted.
@item
-If you use @code{ALTER TABLE tbl_name RENAME TO new_tbl_name} without any other
+If you use @code{ALTER TABLE @var{tbl_name} RENAME TO @var{new_tbl_name}} without any
other
options, MySQL simply renames any files that correspond to the table
-@code{tbl_name}. There is no need to create a temporary table.
+@var{tbl_name}. There is no need to create a temporary table.
(You can also use the @code{RENAME TABLE} statement to rename tables.
@xref{RENAME TABLE,, @code{RENAME TABLE}}.)
@item
-@code{column_definition} clauses use the same syntax for @code{ADD} and
+@var{column_definition} clauses use the same syntax for @code{ADD} and
@code{CHANGE} as for @code{CREATE TABLE}. Note that this syntax includes
the column name, not just the column type.
@xref{CREATE TABLE, , @code{CREATE TABLE}}.
@item
-You can rename a column using a @code{CHANGE old_col_name column_definition}
+You can rename a column using a @code{CHANGE @var{old_col_name} @var{column_definition}}
clause. To do so, specify the old and new column names and the type that
the column currently has. For example, to rename an @code{INTEGER} column
from @code{a} to @code{b}, you can do this:
@@ -53712,7 +53713,7 @@
@item
In MySQL 3.22 or later, you can use @code{FIRST} or
-@code{AFTER col_name} to add a column at a specific position
+@code{AFTER @var{col_name}} to add a column at a specific position
within a table row. The default is to add the column last.
From MySQL 4.0.1 on, you can also use @code{FIRST} and
@code{AFTER} in @code{CHANGE} or @code{MODIFY} operations.
@@ -53829,7 +53830,7 @@
@code{TEXT}) to a new character set, use a statement like this:
@example
-ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;
+ALTER TABLE @var{tbl_name} CONVERT TO CHARACTER SET @var{charset_name};
@end example
This is useful, for example, after upgrading from MySQL 4.0.x to 4.1.x.
@@ -53853,7 +53854,7 @@
statement:
@example
-ALTER TABLE tbl_name DEFAULT CHARACTER SET charset_name;
+ALTER TABLE @var{tbl_name} DEFAULT CHARACTER SET @var{charset_name};
@end example
The word @code{DEFAULT} is optional.
@@ -53878,7 +53879,7 @@
@file{.ibd} file, use this statement:
@example
-ALTER TABLE tbl_name DISCARD TABLESPACE;
+ALTER TABLE @var{tbl_name} DISCARD TABLESPACE;
@end example
This deletes the current @file{.ibd} file, so be sure that you have a backup
@@ -53889,7 +53890,7 @@
database directory, then issue this statement:
@example
-ALTER TABLE tbl_name IMPORT TABLESPACE;
+ALTER TABLE @var{tbl_name} IMPORT TABLESPACE;
@end example
@xref{Multiple tablespaces}.
@@ -53977,12 +53978,12 @@
@c example_for_help_topic CREATE DATABASE
@example
-CREATE DATABASE [IF NOT EXISTS] db_name
- [create_specification [, create_specification] ...]
+CREATE DATABASE [IF NOT EXISTS] @var{db_name}
+ [@var{create_specification} [, @var{create_specification}] ...]
-create_specification:
- [DEFAULT] CHARACTER SET charset_name
- | [DEFAULT] COLLATE collation_name
+@var{create_specification}:
+ [DEFAULT] CHARACTER SET @var{charset_name}
+ | [DEFAULT] COLLATE @var{collation_name}
@end example
@c description_for_help_topic CREATE DATABASE CREATE DATABASE IF EXIST NOT
@@ -54024,11 +54025,11 @@
@c example_for_help_topic CREATE INDEX
@example
-CREATE [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name [index_type]
- ON tbl_name (index_col_name,...)
+CREATE [UNIQUE|FULLTEXT|SPATIAL] INDEX @var{index_name} [@var{index_type}]
+ ON @var{tbl_name} (@var{index_col_name},...)
-index_col_name:
- col_name [(length)] [ASC | DESC]
+@var{index_col_name}:
+ @var{col_name} [(@var{length})] [ASC | DESC]
@end example
@c description_for_help_topic CREATE INDEX BTREE RTREE INDEX CREATE FULLTEXT SPATIAL
@@ -54049,8 +54050,8 @@
columns.
For @code{CHAR} and @code{VARCHAR} columns, indexes can be created that
-use only part of a column, using @code{col_name(length)} syntax to index
-a prefix consisting of the first @code{length} characters of each column
+use only part of a column, using @code{@var{col_name}(@var{length})} syntax to index
+a prefix consisting of the first @var{length} characters of each column
value. @code{BLOB} and @code{TEXT} columns also can be indexed, but a prefix
length @emph{must} be given.
@@ -54112,55 +54113,55 @@
@c example_for_help_topic CREATE TABLE
@c UPDATE START
@c Changed the following line in the example:
-@c | CHAR(length) [BINARY | ASCII | UNICODE]
+@c | CHAR(@var{length}) [BINARY | ASCII | UNICODE]
@c UPDATE STOP
@example
-CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
- [(create_definition,...)]
- [table_options] [select_statement]
+CREATE [TEMPORARY] TABLE [IF NOT EXISTS] @var{tbl_name}
+ [(@var{create_definition},...)]
+ [@var{table_options}] [@var{select_statement}]
@end example
Or:
@example
-CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
- [(] LIKE old_tbl_name [)];
+CREATE [TEMPORARY] TABLE [IF NOT EXISTS] @var{tbl_name}
+ [(] LIKE @var{old_tbl_name} [)];
-create_definition:
- column_definition
- | [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...)
- | KEY [index_name] [index_type] (index_col_name,...)
- | INDEX [index_name] [index_type] (index_col_name,...)
- | [CONSTRAINT [symbol]] UNIQUE [INDEX]
- [index_name] [index_type] (index_col_name,...)
- | [FULLTEXT|SPATIAL] [INDEX] [index_name] (index_col_name,...)
- | [CONSTRAINT [symbol]] FOREIGN KEY
- [index_name] (index_col_name,...) [reference_definition]
- | CHECK (expr)
-
-column_definition:
- col_name type [NOT NULL | NULL] [DEFAULT default_value]
- [AUTO_INCREMENT] [[PRIMARY] KEY] [COMMENT 'string']
- [reference_definition]
-
-type:
- TINYINT[(length)] [UNSIGNED] [ZEROFILL]
- | SMALLINT[(length)] [UNSIGNED] [ZEROFILL]
- | MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]
- | INT[(length)] [UNSIGNED] [ZEROFILL]
- | INTEGER[(length)] [UNSIGNED] [ZEROFILL]
- | BIGINT[(length)] [UNSIGNED] [ZEROFILL]
- | REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]
- | DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]
- | FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]
- | DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL]
- | NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL]
+@var{create_definition}:
+ @var{column_definition}
+ | [CONSTRAINT [@var{symbol}]] PRIMARY KEY [@var{index_type}] (@var{index_col_name},...)
+ | KEY [@var{index_name}] [@var{index_type}] (@var{index_col_name},...)
+ | INDEX [@var{index_name}] [@var{index_type}] (@var{index_col_name},...)
+ | [CONSTRAINT [@var{symbol}]] UNIQUE [INDEX]
+ [@var{index_name}] [@var{index_type}] (@var{index_col_name},...)
+ | [FULLTEXT|SPATIAL] [INDEX] [@var{index_name}] (@var{index_col_name},...)
+ | [CONSTRAINT [@var{symbol}]] FOREIGN KEY
+ [@var{index_name}] (@var{index_col_name},...) [@var{reference_definition}]
+ | CHECK (@var{expr})
+
+@var{column_definition}:
+ @var{col_name} @var{type} [NOT NULL | NULL] [DEFAULT @var{default_value}]
+ [AUTO_INCREMENT] [[PRIMARY] KEY] [COMMENT '@var{string}']
+ [@var{reference_definition}]
+
+@var{type}:
+ TINYINT[(@var{length})] [UNSIGNED] [ZEROFILL]
+ | SMALLINT[(@var{length})] [UNSIGNED] [ZEROFILL]
+ | MEDIUMINT[(@var{length})] [UNSIGNED] [ZEROFILL]
+ | INT[(@var{length})] [UNSIGNED] [ZEROFILL]
+ | INTEGER[(@var{length})] [UNSIGNED] [ZEROFILL]
+ | BIGINT[(@var{length})] [UNSIGNED] [ZEROFILL]
+ | REAL[(@var{length},@var{decimals})] [UNSIGNED] [ZEROFILL]
+ | DOUBLE[(@var{length},@var{decimals})] [UNSIGNED] [ZEROFILL]
+ | FLOAT[(@var{length},@var{decimals})] [UNSIGNED] [ZEROFILL]
+ | DECIMAL(@var{length},@var{decimals}) [UNSIGNED] [ZEROFILL]
+ | NUMERIC(@var{length},@var{decimals}) [UNSIGNED] [ZEROFILL]
| DATE
| TIME
| TIMESTAMP
| DATETIME
- | CHAR(length) [BINARY | ASCII | UNICODE]
- | VARCHAR(length) [BINARY]
+ | CHAR(@var{length}) [BINARY | ASCII | UNICODE]
+ | VARCHAR(@var{length}) [BINARY]
| TINYBLOB
| BLOB
| MEDIUMBLOB
@@ -54169,47 +54170,47 @@
| TEXT
| MEDIUMTEXT
| LONGTEXT
- | ENUM(value1,value2,value3,...)
- | SET(value1,value2,value3,...)
- | spatial_type
+ | ENUM(@var{value1},@var{value2},@var{value3},...)
+ | SET(@var{value1},@var{value2},@var{value3},...)
+ | @var{spatial_type}
-index_col_name:
- col_name [(length)] [ASC | DESC]
+@var{index_col_name}:
+ @var{col_name} [(@var{length})] [ASC | DESC]
-reference_definition:
- REFERENCES tbl_name [(index_col_name,...)]
+@var{reference_definition}:
+ REFERENCES @var{tbl_name} [(@var{index_col_name},...)]
[MATCH FULL | MATCH PARTIAL]
- [ON DELETE reference_option]
- [ON UPDATE reference_option]
+ [ON DELETE @var{reference_option}]
+ [ON UPDATE @var{reference_option}]
-reference_option:
+@var{reference_option}:
RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT
-table_options: table_option [table_option] ...
+@var{table_options}: @var{table_option} [@var{table_option}] ...
-table_option:
+@var{table_option}:
@{ENGINE|TYPE@} = @{BDB|HEAP|ISAM|InnoDB|MERGE|MRG_MYISAM|MYISAM@}
- | AUTO_INCREMENT = value
- | AVG_ROW_LENGTH = value
+ | AUTO_INCREMENT = @var{value}
+ | AVG_ROW_LENGTH = @var{value}
| CHECKSUM = @{0 | 1@}
- | COMMENT = 'string'
- | MAX_ROWS = value
- | MIN_ROWS = value
+ | COMMENT = '@var{string}'
+ | MAX_ROWS = @var{value}
+ | MIN_ROWS = @var{value}
| PACK_KEYS = @{0 | 1 | DEFAULT@}
- | PASSWORD = 'string'
+ | PASSWORD = '@var{string}'
| DELAY_KEY_WRITE = @{0 | 1@}
| ROW_FORMAT = @{ DEFAULT | DYNAMIC | FIXED | COMPRESSED @}
| RAID_TYPE = @{ 1 | STRIPED | RAID0 @}
- RAID_CHUNKS = value
- RAID_CHUNKSIZE = value
- | UNION = (tbl_name[,tbl_name]...)
+ RAID_CHUNKS = @var{value}
+ RAID_CHUNKSIZE = @var{value}
+ | UNION = (@var{tbl_name}[,@var{tbl_name}]...)
| INSERT_METHOD = @{ NO | FIRST | LAST @}
- | DATA DIRECTORY = 'absolute path to directory'
- | INDEX DIRECTORY = 'absolute path to directory'
- | [DEFAULT] CHARACTER SET charset_name [COLLATE collation_name]
+ | DATA DIRECTORY = '@var{absolute path to directory}'
+ | INDEX DIRECTORY = '@var{absolute path to directory}'
+ | [DEFAULT] CHARACTER SET @var{charset_name} [COLLATE @var{collation_name}]
-select_statement:
- [IGNORE | REPLACE] [AS] SELECT ... (Some legal select statement)
+@var{select_statement:}
+ [IGNORE | REPLACE] [AS] SELECT ... (@var{Some legal select statement})
@end example
@c description_for_help_topic CREATE TABLE ENGINE TYPE KEY CREATE DATA ACTION
AVG_ROW_LENGTH BERKELEYDB BDB BY CASCADE CHECK CHECKSUM COMMENT CONSTRAINT COMPRESSED
FIXED DYNAMIC DEFAULT DELAY_KEY_WRITE DELETE DIRECTORY INDEX FIRST FOREIGN RAID_TYPE
RAID_CHUNKS RAID_CHUNKSIZE ROW_FORMAT FULL FULLTEXT HEAP INNOBASE INNODB ISAM
INSERT_METHOD MAX_ROWS MIN_ROWS PACK_KEYS PARTIAL RAID0 STRIPED MERGE MRG_MYISAM MYISAM
NO REFERENCES SERIAL
@@ -54223,7 +54224,7 @@
@c end_description_for_help_topic
In MySQL 3.22 or later, the table name can be specified as
-@code{db_name.tbl_name} to create the table in a specific database.
+@var{db_name.tbl_name} to create the table in a specific database.
This works whether or not there is a current database.
If you use quoted identifiers, quote the database and table names
separately. For example, @code{`mydb`.`mytbl`} is legal, but
@@ -54248,13 +54249,13 @@
(definition) file in the database directory. The storage engine for the table
might create other files as well.
In the case of @code{MyISAM} tables, the storage engine creates three files
-for a table named @code{tbl_name}:
+for a table named @var{tbl_name}:
@multitable @columnfractions .30 .70
@item @strong{File} @tab @strong{Purpose}
-@item @code{tbl_name.frm} @tab Table format (definition) file
-@item @code{tbl_name.MYD} @tab Data file
-@item @code{tbl_name.MYI} @tab Index file
+@item @code{@var{tbl_name}.frm} @tab Table format (definition) file
+@item @code{@var{tbl_name}.MYD} @tab Data file
+@item @code{@var{tbl_name}.MYI} @tab Index file
@end multitable
The files created by each storage engine to represent tables are described in
@@ -54305,7 +54306,7 @@
@code{AUTO_INCREMENT} value for the last inserted row with the following query:
@example
-SELECT * FROM tbl_name WHERE auto_col IS NULL
+SELECT * FROM @var{tbl_name} WHERE @var{auto_col} IS NULL
@end example
@item
@@ -54332,7 +54333,7 @@
@code{TIMESTAMP} columns, the server reports that such columns can be
assigned @code{NULL} values (which is true), even though @code{TIMESTAMP}
never actually will contain a @code{NULL} value. You can see this when you
-use @code{DESCRIBE tbl_name} to get a description of your table.
+use @code{DESCRIBE @var{tbl_name}} to get a description of your table.
Note that setting a @code{TIMESTAMP} column to @code{0} is not the same
as setting it to @code{NULL}, because @code{0} is a valid @code{TIMESTAMP}
@@ -54437,7 +54438,7 @@
indexes, if you don't assign a name, the index is assigned the same name as
the first indexed column, with an optional suffix (@code{_2}, @code{_3},
@code{...}) to make it unique. You can see index names for a table using
-@code{SHOW INDEX FROM tbl_name}.
+@code{SHOW INDEX FROM @var{tbl_name}}.
@xref{Show database info}.
@item
@@ -54483,8 +54484,8 @@
as @code{NOT NULL} or an error results.
@item
-With @code{col_name(length)} syntax in an index specification, you can create
-an index that uses only the first @code{length} characters of a @code{CHAR}
+With @code{@var{col_name}(@var{length})} syntax in an index specification, you can create
+an index that uses only the first @var{length} characters of a @code{CHAR}
or @code{VARCHAR} column. Indexing only a prefix of column values like this
can make the index file much smaller.
@xref{Indexes}.
@@ -54916,7 +54917,7 @@
it to @code{NULL} sets it to the current date and time. Because
@code{TIMESTAMP} columns behave this way, the @code{NULL} and @code{NOT NULL}
attributes do not apply in the normal way and are ignored if you specify
-them. @code{DESCRIBE tbl_name} always reports that a @code{TIMESTAMP}
+them. @code{DESCRIBE @var{tbl_name}} always reports that a @code{TIMESTAMP}
column can be assigned @code{NULL} values.
@item
@@ -54957,7 +54958,7 @@
@c example_for_help_topic DROP DATABASE
@example
-DROP DATABASE [IF EXISTS] db_name
+DROP DATABASE [IF EXISTS] @var{db_name}
@end example
@c description_for_help_topic DROP DATABASE DROP DATABASE EXISTS IF
@@ -55019,12 +55020,12 @@
@c example_for_help_topic DROP INDEX
@example
-DROP INDEX index_name ON tbl_name
+DROP INDEX @var{index_name} ON @var{tbl_name}
@end example
@c description_for_help_topic DROP INDEX DROP INDEX
-@code{DROP INDEX} drops the index named @code{index_name} from the table
-@code{tbl_name}. In MySQL 3.22 or later, @code{DROP INDEX} is mapped to an
+@code{DROP INDEX} drops the index named @var{index_name} from the table
+@var{tbl_name}. In MySQL 3.22 or later, @code{DROP INDEX} is mapped to an
@code{ALTER TABLE} statement to drop the index. @xref{ALTER TABLE, ,
@code{ALTER TABLE}}. @code{DROP INDEX} doesn't do anything prior to MySQL
3.22.
@@ -55041,7 +55042,7 @@
@c example_for_help_topic DROP TABLE
@example
DROP [TEMPORARY] TABLE [IF EXISTS]
- tbl_name [, tbl_name] ...
+ @var{tbl_name} [, @var{tbl_name}] ...
[RESTRICT | CASCADE]
@end example
@@ -55088,8 +55089,8 @@
@c description_for_help_topic RENAME TABLE
@example
-RENAME TABLE tbl_name TO new_tbl_name
- [, tbl_name2 TO new_tbl_name2] ...
+RENAME TABLE @var{tbl_name} TO @var{new_tbl_name}
+ [, @var{tbl_name2} TO @var{new_tbl_name2}] ...
@end example
This statement renames one or more tables. It was added in MySQL 3.23.23.
@@ -55103,8 +55104,8 @@
@c example_for_help_topic RENAME TABLE
@example
-CREATE TABLE new_table (...);
-RENAME TABLE old_table TO backup_table, new_table TO old_table;
+CREATE TABLE @var{new_table} (...);
+RENAME TABLE @var{old_table} TO @var{backup_table}, @var{new_table} TO @var{old_table};
@end example
If the statement renames more than one table, renaming operations are done
@@ -55112,16 +55113,16 @@
like this (assuming that no table named @code{tmp_table} currently exists):
@example
-RENAME TABLE old_table TO tmp_table,
- new_table TO old_table,
- tmp_table TO new_table;
+RENAME TABLE @var{old_table} TO @var{tmp_table},
+ @var{new_table} TO @var{old_table},
+ @var{tmp_table} TO @var{new_table};
@end example
As long as two databases are on the same filesystem you can also rename
a table to move it from one database to another:
@example
-RENAME TABLE current_db.tbl_name TO other_db.tbl_name;
+RENAME TABLE @var{current_db.tbl_name} TO @var{other_db.tbl_name;}
@end example
When you execute @code{RENAME}, you can't have any locked tables or
@@ -55151,7 +55152,7 @@
@c help_category Administration
@c description_for_help_topic DESCRIBE DESC
@example
-@{DESCRIBE | DESC@} tbl_name [col_name | wild]
+@{DESCRIBE | DESC@} @var{tbl_name} [@var{col_name} | @var{wild}]
@end example
@code{DESCRIBE} provides information about a table's columns. It is a
@@ -55159,7 +55160,7 @@
@c end_description_for_help_topic
@xref{SHOW COLUMNS, , @code{SHOW COLUMNS}}.
-@code{col_name} can be a column name, or a string containing the SQL
+@var{col_name} can be a column name, or a string containing the SQL
@samp{%} and @samp{_} wildcard characters to obtain output only for the
columns with names matching the string. There is no need to enclose the
string in quotes unless it contains spaces or other special characters.
@@ -55218,10 +55219,10 @@
@findex USE
@example
-USE db_name
+USE @var{db_name}
@end example
-The @code{USE db_name} statement tells MySQL to use the @code{db_name}
+The @code{USE @var{db_name}} statement tells MySQL to use the @var{db_name}
database as the default (current) database for subsequent statements.
The database remains the default until the end of the session or until
another @code{USE} statement is issued:
@@ -55421,8 +55422,8 @@
@c example_for_help_topic LOCK
@example
LOCK TABLES
- tbl_name [AS alias] @{READ [LOCAL] | [LOW_PRIORITY] WRITE@}
- [, tbl_name [AS alias] @{READ [LOCAL] | [LOW_PRIORITY] WRITE@}] ...
+ @var{tbl_name} [AS @var{alias}] @{READ [LOCAL] | [LOW_PRIORITY] WRITE@}
+ [, @var{tbl_name} [AS @var{alias}] @{READ [LOCAL] | [LOW_PRIORITY] WRITE@}] ...
UNLOCK TABLES
@end example
@@ -55735,28 +55736,28 @@
@c help_category Administration
@c example_for_help_topic GRANT
@example
-GRANT priv_type [(column_list)] [, priv_type [(column_list)]] ...
- ON @{tbl_name | * | *.* | db_name.*@}
- TO user [IDENTIFIED BY [PASSWORD] 'password']
- [, user [IDENTIFIED BY [PASSWORD] 'password']] ...
+GRANT @var{priv_type} [(@var{column_list})] [, @var{priv_type} [(@var{column_list})]] ...
+ ON @{@var{tbl_name} | * | *.* | @var{db_name}.*@}
+ TO @var{user} [IDENTIFIED BY [PASSWORD] '@var{password}']
+ [, @var{user} [IDENTIFIED BY [PASSWORD] '@var{password}']] ...
[REQUIRE
NONE |
[@{SSL| X509@}]
- [CIPHER 'cipher' [AND]]
- [ISSUER 'issuer' [AND]]
- [SUBJECT 'subject']]
- [WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR count |
- MAX_UPDATES_PER_HOUR count |
- MAX_CONNECTIONS_PER_HOUR count]]
+ [CIPHER '@var{cipher}' [AND]]
+ [ISSUER '@var{issuer}' [AND]]
+ [SUBJECT '@var{subject}']]
+ [WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR @var{count} |
+ MAX_UPDATES_PER_HOUR @var{count} |
+ MAX_CONNECTIONS_PER_HOUR @var{count}]]
@end example
@c example_for_help_topic REVOKE
@example
-REVOKE priv_type [(column_list)] [, priv_type [(column_list)]] ...
- ON @{tbl_name | * | *.* | db_name.*@}
- FROM user [, user] ...
+REVOKE @var{priv_type} [(@var{column_list})] [, @var{priv_type} [(@var{column_list})]]
...
+ ON @{@var{tbl_name} | * | *.* | @var{db_name}.*@}
+ FROM @var{user} [, @var{user}] ...
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM @var{user} [, @var{user}] ...
@end example
@c description_for_help_topic GRANT ALL BY ALTER IDENTIFIED REQUIRE PASSWORD GRANT
REVOKE ISSUER CIPHER WITH SUBJECT OPTION MAX_QUERIES_PER_HOUR MAX_UPDATES_PER_HOUR
MAX_CONNECTIONS_PER_HOUR CLIENT EXECUTE FILE SSL X509 SECURITY USAGE SUPER NONE PROCESS
PRIVILEGES REFERENCES RELOAD REPLICATION SHUTDOWN
@@ -55782,14 +55783,14 @@
@item Database level
Database privileges apply to all tables in a given database. These privileges
are stored in the @code{mysql.db} and @code{mysql.host} tables.
-@code{GRANT ALL ON db_name.*} and
-@code{REVOKE ALL ON db_name.*} grant and revoke only database privileges.
+@code{GRANT ALL ON @var{db_name}.*} and
+@code{REVOKE ALL ON @var{db_name}.*} grant and revoke only database privileges.
@item Table level
Table privileges apply to all columns in a given table. These privileges are
stored in the @code{mysql.tables_priv} table.
-@code{GRANT ALL ON db_name.tbl_name} and
-@code{REVOKE ALL ON db_name.tbl_name} grant and revoke only table privileges.
+@code{GRANT ALL ON @var{db_name.tbl_name}} and
+@code{REVOKE ALL ON @var{db_name.tbl_name}} grant and revoke only table privileges.
@item Column level
Column privileges apply to single columns in a given table. These privileges are
@@ -55861,7 +55862,7 @@
@code{PROCESS} privilege can be used instead.
You can assign global privileges by using @code{ON *.*} syntax or
-database privileges by using @code{ON db_name.*} syntax. If you specify
+database privileges by using @code{ON @var{db_name}.*} syntax. If you specify
@code{ON *} and you have a current database, the privileges will be granted in
that database. (@strong{Warning:} If you specify @code{ON *} and you
@emph{don't} have a current database, the privileges granted will be global!)
@@ -55882,7 +55883,7 @@
@code{UPDATE}.
@code{GRANT ALL} assigns only the privileges that exist at the level you are
-granting. For example, if you use @code{GRANT ALL ON db_name.*}, that is a
+granting. For example, if you use @code{GRANT ALL ON @var{db_name}.*}, that is a
database-level statement, so none of the global-only privileges such as
@code{FILE} will be granted.
@@ -55904,19 +55905,19 @@
In order to accommodate granting rights to users from arbitrary hosts,
MySQL supports specifying the @code{user} value in the form
-@code{user_name@@host_name}. If you want to specify a @code{user_name} string
-containing special characters (such as @samp{-}), or a @code{host_name} string
+@code{@var{user_name}@@@var{host_name}}. If you want to specify a @var{user_name} string
+containing special characters (such as @samp{-}), or a @var{host_name} string
containing special characters or wildcard characters (such as @samp{%}), you
can quote the username or hostname (for example,
@code{'test-user'@@'test-hostname'}). Quote the username and hostname
separately.
You can specify wildcards in the hostname. For example,
-@code{user_name@@'%.loc.gov'} applies to @code{user_name} for any host in the
-@code{loc.gov} domain, and @code{user_name@@'144.155.166.%'} applies to
-@code{user_name} for any host in the @code{144.155.166} class C subnet.
+@code{@var{user_name}@@'%.loc.gov'} applies to @var{user_name} for any host in the
+@code{loc.gov} domain, and @code{@var{user_name}@@'144.155.166.%'} applies to
+@var{user_name} for any host in the @code{144.155.166} class C subnet.
-The simple form @code{user_name} is a synonym for @code{user_name@@'%'}.
+The simple form @var{user_name} is a synonym for @code{@var{user_name}@@'%'}.
MySQL doesn't support wildcards in usernames. Anonymous users are
defined by inserting entries with @code{User=''} into the
@@ -55934,7 +55935,7 @@
@strong{Warning:} If you allow anonymous users to connect to the MySQL
server, you should also grant privileges to all local users as
-@code{user_name@@localhost}. Otherwise, the anonymous-user account for
+@code{@var{user_name}@@localhost}. Otherwise, the anonymous-user account for
the local host in the @code{mysql.user} table will be used when named users
try to log in to the MySQL server from the local machine!
(This anonymous-user account is created during MySQL installation.)
@@ -56237,8 +56238,8 @@
The second syntax sets the password for a specific account on the current
server host. Only clients with access to the @code{mysql} database can do
-this. The @code{user} value should be given in @code{user_name@@host_name}
-format, where @code{user_name} and @code{host_name} are exactly as they are
+this. The @code{user} value should be given in @code{@var{user_name}@@@var{host_name}}
+format, where @var{user_name} and @var{host_name} are exactly as they are
listed in the @code{User} and @code{Host} columns of the @code{mysql.user}
table entry. For example, if you had an entry with @code{User} and
@code{Host} column values of @code{'bob'} and @code{'%.loc.gov'}, you would
@@ -56278,7 +56279,7 @@
@c example_for_help_topic ANALYZE
@example
-ANALYZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] ...
+ANALYZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE @var{tbl_name} [, @var{tbl_name}] ...
@end example
@c description_for_help_topic ANALYZE TABLE NO_WRITE_TO_BINLOG LOCAL
@@ -56324,7 +56325,7 @@
@c example_for_help_topic BACKUP TABLE
@example
-BACKUP TABLE tbl_name [, tbl_name] ... TO '/path/to/backup/directory'
+BACKUP TABLE @var{tbl_name} [, @var{tbl_name}] ... TO '@var{/path/to/backup/directory}'
@end example
@c description_for_help_topic BACKUP TABLE BACKUP TABLE
@@ -56368,15 +56369,15 @@
@c example_for_help_topic CHECK
@example
-CHECK TABLE tbl_name [, tbl_name] ... [option] ...
+CHECK TABLE @var{tbl_name} [, @var{tbl_name}] ... [@var{option}] ...
-option = @{QUICK | FAST | MEDIUM | EXTENDED | CHANGED@}
+@var{option} = @{QUICK | FAST | MEDIUM | EXTENDED | CHANGED@}
@end example
@c description_for_help_topic CHECK TABLE QUICK FAST MEDIUM EXTENDED CHANGED
@code{CHECK TABLE} works only on @code{MyISAM} and @code{InnoDB} tables. On
@code{MyISAM} tables, This is the same thing as running @code{myisamchk
---medium-check tbl_name} on the table.
+--medium-check @var{tbl_name}} on the table.
If you don't specify any option, @code{MEDIUM} is used.
@c end_description_for_help_topic
@@ -56483,7 +56484,7 @@
@c example_for_help_topic CHECKSUM
@example
-CHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED ]
+CHECKSUM TABLE @var{tbl_name} [, @var{tbl_name}] ... [ QUICK | EXTENDED ]
@end example
@c description_for_help_topic CHECKSUM
@@ -56518,7 +56519,7 @@
@c example_for_help_topic OPTIMIZE
@example
-OPTIMIZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] ...
+OPTIMIZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE @var{tbl_name} [, @var{tbl_name}] ...
@end example
@c description_for_help_topic OPTIMIZE NO_WRITE_TO_BINLOG LOCAL TABLE
@@ -56574,13 +56575,13 @@
@c example_for_help_topic REPAIR
@example
REPAIR [LOCAL | NO_WRITE_TO_BINLOG] TABLE
- tbl_name [, tbl_name] ... [QUICK] [EXTENDED] [USE_FRM]
+ @var{tbl_name} [, @var{tbl_name}] ... [QUICK] [EXTENDED] [USE_FRM]
@end example
@c description_for_help_topic REPAIR USE_FRM TABLE QUICK EXTENDED NO_WRITE_TO_BINLOG
LOCAL
@code{REPAIR TABLE} repairs a possibly corrupted table.
By default,
-it has the same effect as @code{myisamchk --recover tbl_name}.
+it has the same effect as @code{myisamchk --recover @var{tbl_name}}.
@code{REPAIR TABLE} works only on @code{MyISAM} tables.
@c end_description_for_help_topic
@@ -56647,7 +56648,7 @@
@c description_for_help_topic RESTORE TABLE
@example
-RESTORE TABLE tbl_name [, tbl_name] ... FROM '/path/to/backup/directory'
+RESTORE TABLE @var{tbl_name} [, @var{tbl_name}] ... FROM
'@var{/path/to/backup/directory}'
@end example
Restores the table or tables from a backup that was made with @code{BACKUP
@@ -56711,27 +56712,27 @@
@c example_for_help_topic SHOW
@example
-SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern']
-SHOW CREATE DATABASE db_name
-SHOW CREATE TABLE tbl_name
-SHOW DATABASES [LIKE 'pattern']
+SHOW [FULL] COLUMNS FROM @var{tbl_name} [FROM @var{db_name}] [LIKE '@var{pattern}']
+SHOW CREATE DATABASE @var{db_name}
+SHOW CREATE TABLE @var{tbl_name}
+SHOW DATABASES [LIKE '@var{pattern}']
SHOW [STORAGE] ENGINES
-SHOW ERRORS [LIMIT [offset,] row_count]
-SHOW GRANTS FOR user
-SHOW INDEX FROM tbl_name [FROM db_name]
+SHOW ERRORS [LIMIT [@var{offset},] @var{row_count}]
+SHOW GRANTS FOR @var{user}
+SHOW INDEX FROM @var{tbl_name} [FROM @var{db_name}]
SHOW INNODB STATUS
SHOW [BDB] LOGS
SHOW PRIVILEGES
SHOW [FULL] PROCESSLIST
-SHOW STATUS [LIKE 'pattern']
-SHOW TABLE STATUS [FROM db_name] [LIKE 'pattern']
-SHOW [OPEN] TABLES [FROM db_name] [LIKE 'pattern']
-SHOW [GLOBAL | SESSION] VARIABLES [LIKE 'pattern']
-SHOW WARNINGS [LIMIT [offset,] row_count]
+SHOW STATUS [LIKE '@var{pattern}']
+SHOW TABLE STATUS [FROM @var{db_name}] [LIKE '@var{pattern}']
+SHOW [OPEN] TABLES [FROM @var{db_name}] [LIKE '@var{pattern}']
+SHOW [GLOBAL | SESSION] VARIABLES [LIKE '@var{pattern}']
+SHOW WARNINGS [LIMIT [@var{offset},] @var{row_count}]
@end example
If the syntax for a given @code{SHOW} statement includes a @code{LIKE
-'pattern'} part, @code{'pattern'} is a string that can contain the SQL @samp{%}
+'@var{pattern}'} part, @code{'@var{pattern}'} is a string that can contain the SQL
@samp{%}
and @samp{_} wildcard characters.
The pattern is useful for restricting statement output to matching values.
@c end_description_for_help_topic
@@ -56935,7 +56936,7 @@
@item BIG_TABLES = @{0 | 1@}
@cindex table is full
If set to @code{1}, all temporary tables are stored on disk rather than in
-memory. This is a little slower, but the error @code{The table tbl_name is
+memory. This is a little slower, but the error @code{The table @var{tbl_name} is
full} will not occur for @code{SELECT} operations that require a large
temporary table. The default value for a new connection is
@code{0} (use in-memory temporary tables). As of MySQL 4.0, you
@@ -57192,7 +57193,7 @@
@findex SHOW COLUMNS
@example
-SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern']
+SHOW [FULL] COLUMNS FROM @var{tbl_name} [FROM @var{db_name}] [LIKE '@var{pattern}']
@end example
@code{SHOW COLUMNS} lists the columns in a given table. If the column types
@@ -57205,8 +57206,8 @@
output to include the privileges you have for each column. As of MySQL 4.1,
@code{FULL} also causes any per-column comments to be displayed.
-You can use @code{db_name.tbl_name} as an alternative to the @code{tbl_name
-FROM db_name} syntax. These two statements are equivalent:
+You can use @var{db_name.tbl_name} as an alternative to the @code{@var{tbl_name}
+FROM @var{db_name}} syntax. These two statements are equivalent:
@example
mysql> SHOW COLUMNS FROM mytable FROM mydb;
@@ -57214,7 +57215,7 @@
@end example
@code{SHOW FIELDS} is a synonym for @code{SHOW COLUMNS}. You can also
-list a table's columns with the @code{mysqlshow db_name tbl_name} command.
+list a table's columns with the @code{mysqlshow @var{db_name} @var{tbl_name}} command.
The @code{DESCRIBE} statement provides information similar to
@code{SHOW COLUMNS}.
@@ -57227,7 +57228,7 @@
@findex SHOW CREATE DATABASE
@example
-SHOW CREATE DATABASE db_name
+SHOW CREATE DATABASE @var{db_name}
@end example
Shows a @code{CREATE DATABASE} statement that will create the given database.
@@ -57248,7 +57249,7 @@
@findex SHOW CREATE TABLE
@example
-SHOW CREATE TABLE tbl_name
+SHOW CREATE TABLE @var{tbl_name}
@end example
Shows a @code{CREATE TABLE} statement that will create the given table.
@@ -57372,7 +57373,7 @@
@findex SHOW ERRORS
@example
-SHOW ERRORS [LIMIT [offset,] row_count]
+SHOW ERRORS [LIMIT [@var{offset},] @var{row_count}]
SHOW COUNT(*) ERRORS
@end example
@@ -57444,7 +57445,7 @@
@findex SHOW KEYS
@example
-SHOW INDEX FROM tbl_name [FROM db_name]
+SHOW INDEX FROM @var{tbl_name} [FROM @var{db_name}]
@end example
@code{SHOW INDEX} returns table index information in a format that
@@ -57508,8 +57509,8 @@
The @code{Packed} and @code{Comment} columns were added in MySQL 3.23.0.
The @code{Null} and @code{Index_type} columns were added in MySQL 4.0.2.
-You can use @code{db_name.tbl_name} as an alternative to the @code{tbl_name
-FROM db_name} syntax. These two statements are equivalent:
+You can use @var{db_name.tbl_name} as an alternative to the @code{@var{tbl_name}
+FROM @var{db_name}} syntax. These two statements are equivalent:
@example
mysql> SHOW INDEX FROM mytable FROM mydb;
@@ -57517,7 +57518,7 @@
@end example
@code{SHOW KEYS} is a synonym for @code{SHOW INDEX}. You can also list
-a table's indexes with the @code{mysqlshow -k db_name tbl_name} command.
+a table's indexes with the @code{mysqlshow -k @var{db_name} @var{tbl_name}} command.
@node SHOW INNODB STATUS, SHOW LOGS, SHOW INDEX, SHOW
@@ -57661,7 +57662,7 @@
characters of each query are shown.
Starting from MySQL 4.0.12, the statement reports the hostname for TCP/IP
-connections in @code{host_name:client_port} format to make it easier to
+connections in @code{@var{host_name}:@var{client_port}} format to make it easier to
determine which client is doing what.
This statement is very useful if you get the "too many connections" error
@@ -57780,7 +57781,7 @@
This notification happens if another thread has used @code{FLUSH TABLES}
or one of the following statements on the table in question: @code{FLUSH
-TABLES tbl_name}, @code{ALTER TABLE}, @code{RENAME TABLE},
+TABLES @var{tbl_name}}, @code{ALTER TABLE}, @code{RENAME TABLE},
@code{REPAIR TABLE}, @code{ANALYZE TABLE}, or @code{OPTIMIZE TABLE}.
@item waiting for handler insert
@@ -57870,12 +57871,12 @@
@cindex status, tables
@example
-SHOW TABLE STATUS [FROM db_name] [LIKE 'pattern']
+SHOW TABLE STATUS [FROM @var{db_name}] [LIKE '@var{pattern}']
@end example
@code{SHOW TABLE STATUS} (new in MySQL 3.23) works likes @code{SHOW
TABLE}, but provides a lot of information about each table. You can
-also get this list using the @code{mysqlshow --status db_name} command.
+also get this list using the @code{mysqlshow --status @var{db_name}} command.
@code{SHOW TABLE STATUS} returns the following fields:
@@ -57972,11 +57973,11 @@
@findex SHOW TABLES
@example
-SHOW [OPEN] TABLES [FROM db_name] [LIKE 'pattern']
+SHOW [OPEN] TABLES [FROM @var{db_name}] [LIKE '@var{pattern}']
@end example
@code{SHOW TABLES} lists the non-@code{TEMPORARY} tables in a given
-database. You can also get this list using the @code{mysqlshow db_name}
+database. You can also get this list using the @code{mysqlshow @var{db_name}}
command.
@strong{Note:} If you have no privileges for a table, the table
@@ -58077,7 +58078,7 @@
@findex SHOW WARNINGS
@example
-SHOW WARNINGS [LIMIT [offset,] row_count]
+SHOW WARNINGS [LIMIT [@var{offset},] @var{row_count}]
SHOW COUNT(*) WARNINGS
@end example
@@ -58243,11 +58244,11 @@
@c example_for_help_topic CACHE INDEX
@example
CACHE INDEX
- tbl_index_list [, tbl_index_list] ...
- IN key_cache_name
+ @var{tbl_index_list} [, @var{tbl_index_list}] ...
+ IN @var{key_cache_name}
-tbl_index_list:
- tbl_name [[INDEX] (index_name[, index_name] ...)]
+@var{tbl_index_list}:
+ @var{tbl_name} [[INDEX] (@var{index_name}[, @var{index_name}] ...)]
@end example
@c description_for_help_topic CACHE INDEX
@@ -58366,7 +58367,7 @@
@c TODO: non-TEMPORARY tables only?
-@item @{TABLE | TABLES@} [tbl_name [, tbl_name] ...]
+@item @{TABLE | TABLES@} [@var{tbl_name} [, @var{tbl_name}] ...]
When no tables are named, closes all open tables and forces all tables in use to be
closed. This also flushes the query cache. With one or more table names, flushes only
the given tables.
@code{FLUSH TABLES} also removes all query results from the query cache, like
the @code{RESET QUERY CACHE} statement.
@@ -58486,11 +58487,11 @@
@c example_for_help_topic LOAD INDEX
@example
LOAD INDEX INTO CACHE
- tbl_index_list [, tbl_index_list] ...
+ @var{tbl_index_list} [, @var{tbl_index_list}] ...
-tbl_index_list:
- tbl_name
- [[INDEX] (index_name[, index_name] ...)]
+@var{tbl_index_list}:
+ @var{tbl_name}
+ [[INDEX] (@var{index_name}[, @var{index_name}] ...)]
[IGNORE LEAVES]
@end example
@@ -58699,7 +58700,7 @@
@c description_for_help_topic SHOW BINLOG SHOW BINLOG EVENTS LIMIT FROM IN
@example
SHOW BINLOG EVENTS
- [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
+ [IN '@var{log_name}'] [FROM @var{pos}] [LIMIT [@var{offset},] @var{row_count}]
@end example
Shows the events in the binary log.
@@ -58779,7 +58780,7 @@
@menu
* CHANGE MASTER TO:: @code{CHANGE MASTER TO} Syntax
* LOAD DATA FROM MASTER:: @code{LOAD DATA FROM MASTER} Syntax
-* LOAD TABLE FROM MASTER:: @code{LOAD TABLE tbl_name FROM MASTER} Syntax
+* LOAD TABLE FROM MASTER:: @code{LOAD TABLE @var{tbl_name} FROM MASTER} Syntax
* MASTER_POS_WAIT:: @code{MASTER_POS_WAIT()} Syntax
* RESET SLAVE:: @code{RESET SLAVE} Syntax
* SET GLOBAL SQL_SLAVE_SKIP_COUNTER:: @code{SET GLOBAL SQL_SLAVE_SKIP_COUNTER} Syntax
@@ -59026,13 +59027,13 @@
@node LOAD TABLE FROM MASTER, MASTER_POS_WAIT, LOAD DATA FROM MASTER, Replication Slave
SQL
-@subsubsection @code{LOAD TABLE tbl_name FROM MASTER} Syntax
+@subsubsection @code{LOAD TABLE @var{tbl_name} FROM MASTER} Syntax
@findex LOAD TABLE FROM MASTER
@c description_for_help_topic LOAD TABLE FROM MASTER LOAD TABLE FROM MASTER
@example
-LOAD TABLE tbl_name FROM MASTER
+LOAD TABLE @var{tbl_name} FROM MASTER
@end example
Transfers a copy of the table from master to the slave. This statement is
@@ -59824,7 +59825,7 @@
@table @code
-@item --myisam-recover=mode
+@item --myisam-recover=@var{mode}
Set the mode for automatic recovery of crashed @code{MyISAM} tables.
@@ -60422,7 +60423,7 @@
@code{DROP} the table and re-create it.
@item
-Use @code{ALTER TABLE tbl_name UNION=(...)} to change the list of underlying
+Use @code{ALTER TABLE @var{tbl_name} UNION=(...)} to change the list of underlying
tables.
@item
@@ -60902,18 +60903,18 @@
@table @code
-@item --bdb-home=path
+@item --bdb-home=@var{path}
The base directory for @code{BDB} tables. This should be the same directory
you
use for @code{--datadir}.
-@item --bdb-lock-detect=method
+@item --bdb-lock-detect=@var{method}
The @code{BDB} lock detection method. The option value should be
@code{DEFAULT}, @code{OLDEST}, @code{RANDOM}, or @code{YOUNGEST}.
-@item --bdb-logdir=path
+@item --bdb-logdir=@var{path}
The @code{BDB} log file directory.
@@ -60930,7 +60931,7 @@
Start Berkeley DB in multi-process mode. (Don't use @code{DB_PRIVATE} when
initializing Berkeley DB.)
-@item --bdb-tmpdir=path
+@item --bdb-tmpdir=@var{path}
The @code{BDB} temporary file directory.
@@ -61072,7 +61073,7 @@
somewhat larger than @code{MyISAM} tables.
@item
-@code{SELECT COUNT(*) FROM tbl_name} is slow for @code{BDB} tables, because
+@code{SELECT COUNT(*) FROM @var{tbl_name}} is slow for @code{BDB} tables, because
no row count is maintained in the table.
@item
@@ -61241,7 +61242,7 @@
statement:
@example
-mysql> ALTER TABLE tbl_name TYPE = MYISAM;
+mysql> ALTER TABLE @var{tbl_name} TYPE = MYISAM;
@end example
For more information about @code{MyISAM}, see
@@ -62357,8 +62358,8 @@
this:
@example
-[CONSTRAINT symbol] FOREIGN KEY [id] (index_col_name, ...)
- REFERENCES tbl_name (index_col_name, ...)
+[CONSTRAINT @var{symbol}] FOREIGN KEY [@var{id}] (@var{index_col_name}, ...)
+ REFERENCES @var{tbl_name} (@var{index_col_name}, ...)
[ON DELETE @{RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT@}]
[ON UPDATE @{RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT@}]
@end example
@@ -62479,8 +62480,8 @@
@example
ALTER TABLE yourtablename
- ADD [CONSTRAINT symbol] FOREIGN KEY [id] (index_col_name, ...)
- REFERENCES tbl_name (index_col_name, ...)
+ ADD [CONSTRAINT @var{symbol}] FOREIGN KEY [@var{id}] (@var{index_col_name}, ...)
+ REFERENCES @var{tbl_name} (@var{index_col_name}, ...)
[ON DELETE @{RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT@}]
[ON UPDATE @{RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT@}]
@end example
@@ -62555,7 +62556,7 @@
statement:
@example
-SHOW CREATE TABLE tbl_name;
+SHOW CREATE TABLE @var{tbl_name};
@end example
From this version, @code{mysqldump} also produces correct definitions
@@ -62563,7 +62564,7 @@
You can display the foreign key constraints for a table like this:
@example
-SHOW TABLE STATUS FROM db_name LIKE 'tbl_name'
+SHOW TABLE STATUS FROM @var{db_name} LIKE '@var{tbl_name}'
@end example
The foreign key constraints are listed in the @code{Comment} column of
@@ -62636,8 +62637,8 @@
@item
@code{LOAD TABLE FROM MASTER} does not work for @code{InnoDB} type
tables. There are workarounds: 1) dump the table on the master and import the
-dump file into the slave, or 2) use @code{ALTER TABLE tbl_name TYPE=MyISAM}
-on the master before setting up replication with @code{LOAD TABLE tbl_name
+dump file into the slave, or 2) use @code{ALTER TABLE @var{tbl_name} TYPE=MyISAM}
+on the master before setting up replication with @code{LOAD TABLE @var{tbl_name}
FROM MASTER}, and then use @code{ALTER TABLE} to alter the master table
back to the @code{InnoDB} type afterward.
@@ -62749,7 +62750,7 @@
TABLE} statement:
@example
-RENAME TABLE old_db_name.tbl_name TO new_db_name.tbl_name;
+RENAME TABLE @var{old_db_name.tbl_name} TO @var{new_db_name.tbl_name};
@end example
@findex DISCARD TABLESPACE
@@ -62763,7 +62764,7 @@
Issue this @code{ALTER TABLE} statement:
@example
-ALTER TABLE tbl_name DISCARD TABLESPACE;
+ALTER TABLE @var{tbl_name} DISCARD TABLESPACE;
@end example
Caution: This deletes the current @file{.ibd} file.
@@ -62775,7 +62776,7 @@
Issue this @code{ALTER TABLE} statement:
@example
-ALTER TABLE tbl_name IMPORT TABLESPACE;
+ALTER TABLE @var{tbl_name} IMPORT TABLESPACE;
@end example
@end enumerate
@@ -63014,7 +63015,7 @@
your tables from the database with @code{SELECT INTO OUTFILE},
and usually most of the data
is intact and correct. But the corruption may cause
-@code{SELECT * FROM tbl_name} or @code{InnoDB}
+@code{SELECT * FROM @var{tbl_name}} or @code{InnoDB}
background operations to crash or assert, or even the @code{InnoDB}
roll-forward recovery to crash. Starting from MySQL
3.23.44, there is an @code{InnoDB} variable that you can use to
@@ -63051,7 +63052,7 @@
@item @code{1} (@code{SRV_FORCE_IGNORE_CORRUPT})
Let the server run even if it detects a corrupt page; try to make
-@code{SELECT * FROM tbl_name} jump over corrupt index records and pages,
+@code{SELECT * FROM @var{tbl_name}} jump over corrupt index records and pages,
which helps in dumping tables.
@item @code{2} (@code{SRV_FORCE_NO_BACKGROUND})
@@ -63881,7 +63882,7 @@
@item
Beware also of other big disk-bound operations.
Use @code{DROP TABLE} or @code{TRUNCATE TABLE} (from MySQL 4.0 up) to empty a
-table, not @code{DELETE FROM tbl_name}.
+table, not @code{DELETE FROM @var{tbl_name}}.
@item
Use the multiple-row @code{INSERT} syntax to reduce
@@ -64605,7 +64606,7 @@
@code{ALTER TABLE} operation:
@example
-ALTER TABLE tbl_name TYPE=InnoDB
+ALTER TABLE @var{tbl_name} TYPE=InnoDB
@end example
That causes MySQL to rebuild the table. Another way to perform a
@@ -64967,11 +64968,11 @@
behavior and not about any storage engine in particular.
@item
-@code{DELETE FROM tbl_name} does not regenerate the table but
+@code{DELETE FROM @var{tbl_name}} does not regenerate the table but
instead deletes all rows, one by one.
@item
-@code{TRUNCATE tbl_name} is mapped to @code{DELETE FROM tbl_name}
+@code{TRUNCATE @var{tbl_name}} is mapped to @code{DELETE FROM @var{tbl_name}}
for @code{InnoDB} and doesn't reset the @code{AUTO_INCREMENT} counter.
@item
@@ -66856,7 +66857,7 @@
management server resides. This means specifying the hostname and the port.
The default hostname is localhost and the default port is 2200.
-@item --try-reconnect=number
+@item --try-reconnect=@var{number}
If the connection to the management server is broken it is possible to
perform only a specified amount of retries before reporting a fault code to
@@ -70095,11 +70096,11 @@
Stored routines may call other stored routines.
At present, MySQL only preserves context for the default database. That is,
-if you say @code{USE db_name} within a procedure, the original default
+if you say @code{USE @var{db_name}} within a procedure, the original default
database is restored upon routine exit.
A routine inherits the default database from the caller, so generally routines
-should either issue a @code{USE db_name} statement, or specify all tables
-with an explicit database reference; for example, @code{db_name.tbl_name}.
+should either issue a @code{USE @var{db_name}} statement, or specify all tables
+with an explicit database reference; for example, @var{db_name.tbl_name}.
MySQL supports the very useful extension that allows the use of regular
@code{SELECT} statements (that is, without using cursors or local variables)
@@ -72981,9 +72982,9 @@
@code{wild} may contain the wildcard characters @samp{%} or @samp{_}, or may
be a @code{NULL} pointer to match all fields. Calling
@code{mysql_list_fields()} is similar to executing the query @code{SHOW
-COLUMNS FROM tbl_name [LIKE wild]}.
+COLUMNS FROM @var{tbl_name} [LIKE @var{wild}]}.
-Note that it's recommended that you use @code{SHOW COLUMNS FROM tbl_name}
+Note that it's recommended that you use @code{SHOW COLUMNS FROM @var{tbl_name}}
instead of @code{mysql_list_fields()}.
You must free the result set with @code{mysql_free_result()}.
@@ -73427,7 +73428,7 @@
@item @code{CLIENT_LOCAL_FILES} @tab Enable @code{LOAD DATA LOCAL} handling.
@item @code{CLIENT_MULTI_STATEMENTS} @tab Tell the server that the client may send
multiple-row-queries (separated by @samp{;}). If this flag is not set,
multiple-row-queries are disabled. New in 4.1.
@item @code{CLIENT_MULTI_RESULTS} @tab Tell the server that the client can handle
multiple-result sets from multi-queries or stored procedures. This is automatically set
if @code{CLIENT_MULTI_STATEMENTS} is set. New in 4.1.
-@item @code{CLIENT_NO_SCHEMA} @tab Don't allow the @code{db_name.tbl_name.col_name}
syntax. This is for ODBC. It causes the parser to generate an error if you use that
syntax, which is useful for trapping bugs in some ODBC programs.
+@item @code{CLIENT_NO_SCHEMA} @tab Don't allow the @var{db_name.tbl_name.col_name}
syntax. This is for ODBC. It causes the parser to generate an error if you use that
syntax, which is useful for trapping bugs in some ODBC programs.
@item @code{CLIENT_ODBC} @tab The client is an ODBC client. This changes
@code{mysqld} to be more ODBC-friendly.
@item @code{CLIENT_SSL} @tab Use SSL (encrypted protocol). This option should not
be set by application programs; it is set internally in the client library.
@end multitable
@@ -77743,7 +77744,7 @@
For the benefit of some ODBC applications (at least Delphi and Access),
the following query can be used to find a newly inserted row:
@example
-SELECT * FROM tbl_name WHERE auto IS NULL;
+SELECT * FROM @var{tbl_name} WHERE auto IS NULL;
@end example
@@ -80894,7 +80895,7 @@
* Cannot create:: @code{Can't create/write to file}
* Commands out of sync:: @code{Commands out of sync}
* Ignoring user:: @code{Ignoring user}
-* Cannot find table:: @code{Table 'tbl_name' doesn't exist}
+* Cannot find table:: @code{Table '@var{tbl_name}' doesn't exist}
* Cannot initialize character set:: @code{Can't initialize character set}
* Not enough file handles:: File Not Found
@end menu
@@ -81528,7 +81529,7 @@
You can check the maximum data/index sizes by using this statement:
@example
-SHOW TABLE STATUS FROM database LIKE 'tbl_name';
+SHOW TABLE STATUS FROM database LIKE '@var{tbl_name}';
@end example
You also can use @code{myisamchk -dv /path/to/table-index-file}.
@@ -81537,7 +81538,7 @@
TABLE}:
@example
-ALTER TABLE tbl_name MAX_ROWS=1000000000 AVG_ROW_LENGTH=nnn;
+ALTER TABLE @var{tbl_name} MAX_ROWS=1000000000 AVG_ROW_LENGTH=@var{nnn};
@end example
You have to specify @code{AVG_ROW_LENGTH} only for tables with @code{BLOB}
@@ -81639,14 +81640,14 @@
@node Cannot find table, Cannot initialize character set, Ignoring user, Common errors
-@appendixsubsec @code{Table 'tbl_name' doesn't exist}
+@appendixsubsec @code{Table '@var{tbl_name}' doesn't exist}
If you get either of the following errors, it usually means that no table
exists in the current database with the given name:
@example
-Table 'tbl_name' doesn't exist
-Can't find file: 'tbl_name' (errno: 2)
+Table '@var{tbl_name}' doesn't exist
+Can't find file: '@var{tbl_name}' (errno: 2)
@end example
In some cases, it may be that the table does exist but that you are
@@ -81879,14 +81880,14 @@
On Unix, the MySQL server @code{mysqld} can be started and run by any user.
However, you should avoid running the server as the Unix @code{root} user
for security reasons. In order to change @code{mysqld} to run as a normal
-unprivileged Unix user @code{user_name}, you must do the following:
+unprivileged Unix user @var{user_name}, you must do the following:
@enumerate
@item
Stop the server if it's running (use @code{mysqladmin shutdown}).
@item
-Change the database directories and files so that @code{user_name} has
+Change the database directories and files so that @var{user_name} has
privileges to read and write files in them (you might need to do this as
the Unix @code{root} user):
@@ -81895,18 +81896,18 @@
@end example
If you do not do this, the server will not be able to access databases or tables when it
-runs as @code{user_name}.
+runs as @var{user_name}.
If directories or files within the MySQL data directory are symbolic links,
you'll also need to follow those links and change the directories and files
they point to. @code{chown -R} might not follow symbolic links for you.
@item
-Start the server as user @code{user_name}. If you are using MySQL 3.22 or
+Start the server as user @var{user_name}. If you are using MySQL 3.22 or
later, another alternative is to start @code{mysqld} as the Unix @code{root}
user and use the @code{--user=user_name} option. @code{mysqld} will start up,
then switch
-to run as the Unix user @code{user_name} before accepting any connections.
+to run as the Unix user @var{user_name} before accepting any connections.
@item
To start the server as the given user automatically at system
@@ -82532,11 +82533,11 @@
By default, MySQL searches are not case sensitive (although there are
some character sets that are never case insensitive, such as @code{czech}).
-This means that if you search with @code{col_name LIKE 'a%'}, you will get all
+This means that if you search with @code{@var{col_name} LIKE 'a%'}, you will get all
column values that start with @code{A} or @code{a}. If you want to make this
search case sensitive, make sure that one of the operands is a binary string.
You can do this with the @code{BINARY} operator. Write the condition as either
-@code{BINARY col_name LIKE 'a%'} or @code{col_name LIKE BINARY 'a%'}.
+@code{BINARY @var{col_name} LIKE 'a%'} or @code{@var{col_name} LIKE BINARY 'a%'}.
If you want a column always to be treated in case-sensitive fashion,
declare it as @code{BINARY}. @xref{CREATE TABLE, , @code{CREATE TABLE}}.
@@ -82571,7 +82572,7 @@
statements. For example:
@example
-mysql> SELECT * FROM tbl_name WHERE date >= '2003-05-05';
+mysql> SELECT * FROM @var{tbl_name} WHERE date >= '2003-05-05';
@end example
As a convenience, MySQL automatically converts a date to a number if
@@ -82594,24 +82595,24 @@
statements work:
@example
-mysql> INSERT INTO tbl_name (idate) VALUES (19970505);
-mysql> INSERT INTO tbl_name (idate) VALUES ('19970505');
-mysql> INSERT INTO tbl_name (idate) VALUES ('97-05-05');
-mysql> INSERT INTO tbl_name (idate) VALUES ('1997.05.05');
-mysql> INSERT INTO tbl_name (idate) VALUES ('1997 05 05');
-mysql> INSERT INTO tbl_name (idate) VALUES ('0000-00-00');
-
-mysql> SELECT idate FROM tbl_name WHERE idate >= '1997-05-05';
-mysql> SELECT idate FROM tbl_name WHERE idate >= 19970505;
-mysql> SELECT MOD(idate,100) FROM tbl_name WHERE idate >= 19970505;
-mysql> SELECT idate FROM tbl_name WHERE idate >= '19970505';
+mysql> INSERT INTO @var{tbl_name} (idate) VALUES (19970505);
+mysql> INSERT INTO @var{tbl_name} (idate) VALUES ('19970505');
+mysql> INSERT INTO @var{tbl_name} (idate) VALUES ('97-05-05');
+mysql> INSERT INTO @var{tbl_name} (idate) VALUES ('1997.05.05');
+mysql> INSERT INTO @var{tbl_name} (idate) VALUES ('1997 05 05');
+mysql> INSERT INTO @var{tbl_name} (idate) VALUES ('0000-00-00');
+
+mysql> SELECT idate FROM @var{tbl_name} WHERE idate >= '1997-05-05';
+mysql> SELECT idate FROM @var{tbl_name} WHERE idate >= 19970505;
+mysql> SELECT MOD(idate,100) FROM @var{tbl_name} WHERE idate >= 19970505;
+mysql> SELECT idate FROM @var{tbl_name} WHERE idate >= '19970505';
@end example
@noindent
However, the following will not work:
@example
-mysql> SELECT idate FROM tbl_name WHERE STRCMP(idate,'20030505')=0;
+mysql> SELECT idate FROM @var{tbl_name} WHERE STRCMP(idate,'20030505')=0;
@end example
@code{STRCMP()} is a string function, so it converts @code{idate} to a
@@ -82758,9 +82759,9 @@
to give columns better names:
@example
-SELECT SQRT(a*b) AS root FROM tbl_name GROUP BY root HAVING root > 0;
-SELECT id, COUNT(*) AS cnt FROM tbl_name GROUP BY id HAVING cnt > 0;
-SELECT id AS 'Customer identity' FROM tbl_name;
+SELECT SQRT(a*b) AS root FROM @var{tbl_name} GROUP BY root HAVING root > 0;
+SELECT id, COUNT(*) AS cnt FROM @var{tbl_name} GROUP BY id HAVING cnt > 0;
+SELECT id AS 'Customer identity' FROM @var{tbl_name};
@end example
Standard SQL doesn't allow you to refer to a column alias in a
@@ -82769,7 +82770,7 @@
following query is illegal:
@example
-SELECT id, COUNT(*) AS cnt FROM tbl_name WHERE cnt > 0 GROUP BY id;
+SELECT id, COUNT(*) AS cnt FROM @var{tbl_name} WHERE cnt > 0 GROUP BY id;
@end example
The @code{WHERE} statement is executed to determine which rows should
@@ -82805,8 +82806,8 @@
You can check the table type for a table by using either of these statements:
@example
-SHOW TABLE STATUS LIKE 'tbl_name';
-SHOW CREATE TABLE tbl_name;
+SHOW TABLE STATUS LIKE '@var{tbl_name}';
+SHOW CREATE TABLE @var{tbl_name};
@end example
See @ref{SHOW TABLE STATUS, , @code{SHOW TABLE STATUS}} and
@@ -82905,7 +82906,7 @@
If you still can't figure out what's wrong, create a minimal test that can
be run with @code{mysql test < query.sql} that shows your problems. You can
create a test file by dumping the tables with @code{mysqldump --quick
-db_name tbl_name_1 ... tbl_name_n > query.sql}. Open the file in an editor,
+db_name @var{tbl_name_1} ... @var{tbl_name_n} > query.sql}. Open the file in an
editor,
remove some insert lines (if there are more than needed to demonstrate
the problem), and add your @code{SELECT} statement at the end of the file.
@@ -83084,7 +83085,7 @@
@code{EXPLAIN} is discussed in more detail in @ref{EXPLAIN, , @code{EXPLAIN}}.
@item
-Use @code{ANALYZE TABLE tbl_name} to update the key distributions for the
+Use @code{ANALYZE TABLE @var{tbl_name}} to update the key distributions for the
scanned table. @xref{ANALYZE TABLE, , @code{ANALYZE TABLE}}.
@item
@@ -83187,13 +83188,13 @@
table. The whole point of SQL is to abstract the application from the data
storage format. You should always specify the order in which you wish to
retrieve your data. The first of the following statements returns columns
-in the order @code{col_name1}, @code{col_name2}, @code{col_name3}, whereas
-the second returns them in the order @code{col_name1}, @code{col_name3},
-@code{col_name2}:
+in the order @var{col_name1}, @var{col_name2}, @var{col_name3}, whereas
+the second returns them in the order @var{col_name1}, @var{col_name3},
+@var{col_name2}:
@example
-mysql> SELECT col_name1, col_name2, col_name3 FROM tbl_name;
-mysql> SELECT col_name1, col_name3, col_name2 FROM tbl_name;
+mysql> SELECT @var{col_name1}, @var{col_name2}, @var{col_name3} FROM @var{tbl_name};
+mysql> SELECT @var{col_name1}, @var{col_name3}, @var{col_name2} FROM @var{tbl_name};
@end example
If you decide to change the order of table columns anyway, you can do so as
@@ -85272,7 +85273,7 @@
option will continue to be recognized for a while.
@item
Require @code{DEFAULT} before table and database default character set.
-This enables us to use @code{ALTER TABLE tbl_name ... CHARACTER SET=...}
+This enables us to use @code{ALTER TABLE @var{tbl_name} ... CHARACTER SET=...}
to change the character set for all @code{CHAR}, @code{VARCHAR}, and
@code{TEXT} columns in a table.
@item
@@ -85409,7 +85410,7 @@
that creates an empty table @code{table2} with a definition that is
exactly the same as @code{table1}, including any indexes.
@item
-@code{CREATE TABLE tbl_name (...) TYPE=storage_engine} now generates a
+@code{CREATE TABLE @var{tbl_name} (...) TYPE=@var{storage_engine}} now generates a
warning if the named storage engine is not available. The table is still
created as a @code{MyISAM} table, as before.
@item
@@ -85722,7 +85723,7 @@
@item
One can add a comment per column in @code{CREATE TABLE}.
@item
-@code{SHOW FULL COLUMNS FROM tbl_name} shows column comments.
+@code{SHOW FULL COLUMNS FROM @var{tbl_name}} shows column comments.
@item
@code{ALTER DATABASE}.
@item
@@ -86626,8 +86627,8 @@
@itemize @bullet
@item
Fixed a spurious error @code{ERROR 14: Can't change size of file (Errcode: 2)}
-on Windows in @code{DELETE FROM tbl_name} without a @code{WHERE} clause or
-@code{TRUNCATE TABLE tbl_name}, when @code{tbl_name} is a @code{MyISAM}
+on Windows in @code{DELETE FROM @var{tbl_name}} without a @code{WHERE} clause or
+@code{TRUNCATE TABLE @var{tbl_name}}, when @var{tbl_name} is a @code{MyISAM}
table. (Bug #1397)
@item
Fixed a bug that resulted in @code{thr_alarm queue is full} warnings after
@@ -87728,7 +87729,7 @@
@code{mysqld}. This option will force all error messages to be put in a
log file if the option @code{--console} is not given. On Windows
@code{--log-error} is enabled as default, with a default name of
-@code{host_name.err} if the name is not specified.
+@code{@var{host_name}.err} if the name is not specified.
@item
Changed some things from @code{Warning:} to @code{Note:} in the log files.
@item
@@ -87974,7 +87975,7 @@
Added @code{CAST(... as CHAR)}.
@item
Added PostgreSQL compatible @code{LIMIT} syntax:
-@code{SELECT ... LIMIT row_count OFFSET offset}
+@code{SELECT ... LIMIT @var{row_count} OFFSET @var{offset}}
@item
@code{mysql_change_user()} will now reset the connection to the state
of a fresh connect (Ie, @code{ROLLBACK} any active transaction, close
@@ -88177,7 +88178,7 @@
@item
Small code improvement in multiple-table updates.
@item
-Fixed a newly introduced bug that caused @code{ORDER BY ... LIMIT row_count}
+Fixed a newly introduced bug that caused @code{ORDER BY ... LIMIT @var{row_count}}
to not return all rows.
@item
Fixed a bug in multiple-table deletes when outer join is used on an empty
@@ -88296,8 +88297,8 @@
key.
@item
Fixed a bug from 4.0.3 in calculating the default data type for some
-functions. This affected queries of type @code{CREATE TABLE tbl_name
-SELECT expression(),...}
+functions. This affected queries of type @code{CREATE TABLE @var{tbl_name}
+SELECT @var{expression}(),...}
@item
Fixed bug in queries of type
@code{SELECT * FROM table-list GROUP BY ...} and
@@ -88426,7 +88427,7 @@
off by default. One can turn this on with @code{--external-locking}.
(For most users this is never needed).
@item
-Fixed core dump bug with @code{INSERT ... SET db_name.tbl_name.col_name=''}.
+Fixed core dump bug with @code{INSERT ... SET @var{db_name.tbl_name.col_name}=''}.
@item
Fixed client hangup bug when using some SQL commands with incorrect syntax.
@item
@@ -88530,7 +88531,7 @@
@item
Fixed bug in multiple-table @code{DELETE} when optimizer uses only indexes.
@item
-Fixed that @code{ALTER TABLE tbl_name RENAME new_tbl_name} is as fast
+Fixed that @code{ALTER TABLE @var{tbl_name} RENAME @var{new_tbl_name}} is as fast
as @code{RENAME TABLE}.
@item
Fixed bug in @code{GROUP BY} with two or more columns, where at least one
@@ -88747,8 +88748,8 @@
@item
Fixed bug when @code{HANDLER} was used with some unsupported table type.
@item
-@code{mysqldump} now puts @code{ALTER TABLE tbl_name DISABLE KEYS} and
-@code{ALTER TABLE tbl_name ENABLE KEYS} in the sql dump.
+@code{mysqldump} now puts @code{ALTER TABLE @var{tbl_name} DISABLE KEYS} and
+@code{ALTER TABLE @var{tbl_name} ENABLE KEYS} in the sql dump.
@item
Added @code{mysql_fix_extensions} script.
@item
@@ -88791,7 +88792,7 @@
@item
Added support for @code{MATCH ... AGAINST(... IN BOOLEAN MODE)}.
@strong{Note: You must rebuild your tables with
-@code{ALTER TABLE tbl_name TYPE=MyISAM} to be
+@code{ALTER TABLE @var{tbl_name} TYPE=MyISAM} to be
able to use boolean full-text search}.
@item
@code{LOCATE()} and @code{INSTR()} are now case sensitive if either
@@ -88853,8 +88854,8 @@
@code{STRCMP()} now uses the current character set when doing comparisons,
which means that the default comparison behavior now is case insensitive.
@item
-@code{TRUNCATE TABLE} and @code{DELETE FROM tbl_name} are now separate
-functions. One bonus is that @code{DELETE FROM tbl_name} now returns
+@code{TRUNCATE TABLE} and @code{DELETE FROM @var{tbl_name}} are now separate
+functions. One bonus is that @code{DELETE FROM @var{tbl_name}} now returns
the number of deleted rows, rather than zero.
@item
@code{DROP DATABASE} now executes a @code{DROP TABLE} on all tables in
@@ -88885,7 +88886,7 @@
Searching on packed (@code{CHAR}/@code{VARCHAR}) keys is now much faster.
@item
Optimized queries of type:
-@code{SELECT DISTINCT * from tbl_name ORDER by key_part1 LIMIT row_count}.
+@code{SELECT DISTINCT * FROM @var{tbl_name} ORDER by @var{key_part1} LIMIT
@var{row_count}}.
@item
@code{SHOW CREATE TABLE} now shows all table attributes.
@item
@@ -88914,8 +88915,8 @@
@item
@code{SHOW INDEXES} is now a synonym for @code{SHOW INDEX}.
@item
-Added @code{ALTER TABLE tbl_name DISABLE KEYS} and
-@code{ALTER TABLE tbl_name ENABLE KEYS} commands.
+Added @code{ALTER TABLE @var{tbl_name} DISABLE KEYS} and
+@code{ALTER TABLE @var{tbl_name} ENABLE KEYS} commands.
@item
Allow use of @code{IN} as a synonym for @code{FROM} in @code{SHOW} commands.
@item
@@ -89198,9 +89199,9 @@
large number of columns and at least one @code{BLOB/TEXT} column. Bug was caused
by incorrect calculation of the needed buffer to pack data.
@item
-The binary log was not locked during @code{TRUNCATE tbl_name} or
-@code{DELETE FROM tbl_name} statements, which could cause an @code{INSERT} to
-@code{tbl_name} to be written to the log before the
+The binary log was not locked during @code{TRUNCATE @var{tbl_name}} or
+@code{DELETE FROM @var{tbl_name}} statements, which could cause an @code{INSERT} to
+@var{tbl_name} to be written to the log before the
@code{TRUNCATE} or @code{DELETE} statements.
@item
Fixed rare bug in @code{UPDATE} of @code{InnoDB} tables where one row could be
@@ -90077,8 +90078,8 @@
Fixed problem when using @code{GRANT FILE ON database.* ...}; previously
we added the @code{DROP} privilege for the database.
@item
-Fixed @code{DELETE FROM tbl_name ... LIMIT 0} and
-@code{UPDATE FROM tbl_name ... LIMIT 0}, which acted as though the
+Fixed @code{DELETE FROM @var{tbl_name} ... LIMIT 0} and
+@code{UPDATE FROM @var{tbl_name} ... LIMIT 0}, which acted as though the
@code{LIMIT} clause was not present (they deleted or updated all selected
rows).
@item
@@ -90125,7 +90126,7 @@
@item
@code{CREATE ... SELECT} now creates non-unique indexes delayed.
@item
-Fixed problem where @code{LOCK TABLES tbl_name READ} followed by
+Fixed problem where @code{LOCK TABLES @var{tbl_name} READ} followed by
@code{FLUSH TABLES} put an exclusive lock on the table.
@item
@code{REAL @@variable} values were represented with only 2 digits when
@@ -90199,12 +90200,12 @@
Lots of portability fixes for @code{InnoDB}.
@item
Changed optimizer so that queries like
-@code{SELECT * FROM tbl_name,tbl_name2 ... ORDER BY key_part1 LIMIT row_count}
-will use index on @code{key_part1} instead of @code{filesort}.
+@code{SELECT * FROM @var{tbl_name}, @var{tbl_name2} ... ORDER BY @var{key_part1} LIMIT
@var{row_count}}
+will use an index on @var{key_part1} instead of @code{filesort}.
@item
Fixed bug when doing
-@code{LOCK TABLE to_table WRITE,...; INSERT INTO to_table... SELECT ...}
-when @code{to_table} was empty.
+@code{LOCK TABLE @var{to_table} WRITE,...; INSERT INTO @var{to_table}... SELECT ...}
+when @var{to_table} was empty.
@item
Fixed bug with @code{LOCK TABLE} and @code{BDB} tables.
@end itemize
@@ -90444,9 +90445,9 @@
Changed @code{mysql_install_db} to use @code{BINARY} for @code{CHAR}
columns in the privilege tables.
@item
-Changed @code{TRUNCATE tbl_name} to @code{TRUNCATE TABLE tbl_name}
+Changed @code{TRUNCATE @var{tbl_name}} to @code{TRUNCATE TABLE @var{tbl_name}}
to use the same syntax as Oracle. Until 4.0 we will also allow
-@code{TRUNCATE tbl_name} to not crash old code.
+@code{TRUNCATE @var{tbl_name}} to not crash old code.
@item
Fixed ``no found rows'' bug in @code{MyISAM} tables when a @code{BLOB} was
first part of a multiple-part key.
@@ -90461,7 +90462,7 @@
to a group function, like:
@example
SELECT a, DISTINCT SEC_TO_TIME(SUM(a))
-FROM tbl_name GROUP BY a, b;
+FROM @var{tbl_name} GROUP BY a, b;
@end example
@item
Fixed buffer overrun in @code{libmysqlclient} library.
@@ -90780,7 +90781,7 @@
@item
Applied patches for OS/2 by @code{Yuri Dario}.
@item
-@code{FLUSH TABLES tbl_name} didn't always flush the index tree
+@code{FLUSH TABLES @var{tbl_name}} didn't always flush the index tree
to disk properly.
@item
@code{--bootstrap} is now run in a separate thread. This fixes a problem
@@ -90848,7 +90849,7 @@
@item
@code{DROP} of temporary tables wasn't stored in the update/binary log.
@item
-Fixed a bug where @code{SELECT DISTINCT * ... LIMIT row_count} only returned one row.
+Fixed a bug where @code{SELECT DISTINCT * ... LIMIT @var{row_count}} only returned one
row.
@item
Fixed a bug in the assembler code in @code{strstr()} for SPARC and cleaned up
the @file{global.h} header file to avoid a problem with bad aliasing with
@@ -90862,7 +90863,7 @@
Fixed a bug in @code{MyISAM} when running multiple updating processes on
the same table.
@item
-Allow one to use @code{FLUSH TABLE tbl_name}.
+Allow one to use @code{FLUSH TABLE @var{tbl_name}}.
@item
Added @code{--replicate-ignore-table}, @code{--replicate-do-table},
@code{--replicate-wild-ignore-table}, and @code{--replicate-wild-do-table}
@@ -90886,8 +90887,8 @@
Fixed a bug where we didn't allow an index name after the
@code{FOREIGN KEY} definition.
@item
-Added @code{TRUNCATE tbl_name} as a synonym for
-@code{DELETE FROM tbl_name}.
+Added @code{TRUNCATE @var{tbl_name}} as a synonym for
+@code{DELETE FROM @var{tbl_name}}.
@item
Fixed a bug in a @code{BDB} key compare function when comparing part keys.
@item
@@ -91285,7 +91286,7 @@
Changed the meaning of @code{-F, --fast} for @code{myisamchk}. Added
@code{-C, --check-only-changed} option to @code{myisamchk}.
@item
-Added @code{ANALYZE tbl_name} to update key statistics for tables.
+Added @code{ANALYZE @var{tbl_name}} to update key statistics for tables.
@item
Changed binary items @code{0x...} to be regarded as integers by default.
@item
@@ -91324,7 +91325,7 @@
@item
Fixed a bug in @code{ORDER BY} that was introduced in 3.23.19.
@item
-Only optimize the @code{DELETE FROM tbl_name} to do a drop+create of
+Only optimize the @code{DELETE FROM @var{tbl_name}} to do a drop+create of
the table if we are in @code{AUTOCOMMIT} mode (needed for @code{BDB} tables).
@item
Added extra checks to avoid index corruption when the @code{ISAM}/@code{MyISAM}
@@ -91349,7 +91350,7 @@
@itemize @bullet
@item
-Fixed bug in 3.23.19; @code{DELETE FROM tbl_name} removed the @file{.frm} file.
+Fixed bug in 3.23.19; @code{DELETE FROM @var{tbl_name}} removed the @file{.frm} file.
@item
Added @code{SHOW CREATE TABLE}.
@end itemize
@@ -91710,12 +91711,12 @@
@item
Fixed that @code{myisamchk} works properly with RAID tables.
@item
-Fixed problem with @code{LEFT JOIN} and @code{key_column IS NULL}.
+Fixed problem with @code{LEFT JOIN} and @code{@var{key_col} IS NULL}.
@item
Fixed bug in @code{net_clear()} which could give the error @code{Aborted
connection} in the MySQL clients.
@item
-Added options @code{USE INDEX (key_list)} and @code{IGNORE INDEX (key_list)} as
+Added options @code{USE INDEX (@var{key_list})} and @code{IGNORE INDEX (@var{key_list})}
as
parameters in @code{SELECT}.
@item
@code{DELETE} and @code{RENAME} should now work on @code{RAID} tables.
@@ -91727,7 +91728,7 @@
@itemize @bullet
@item
-Allow the @code{ALTER TABLE tbl_name ADD (field_list)} syntax.
+Allow the @code{ALTER TABLE @var{tbl_name} ADD (field_list)} syntax.
@item
Fixed problem with optimizer that could sometimes use incorrect keys.
@item
@@ -91836,10 +91837,10 @@
that take a long time to a separate log file with a time indicating how
long the query took.
@item
-Fixed core dump when doing @code{WHERE key_col=RAND(...)}.
+Fixed core dump when doing @code{WHERE @var{key_col}=RAND(...)}.
@item
-Fixed optimization bug in @code{SELECT ... LEFT JOIN ... key_col IS NULL},
-when @code{key_col} could contain @code{NULL} values.
+Fixed optimization bug in @code{SELECT ... LEFT JOIN ... @var{key_col} IS NULL},
+when @var{key_col} could contain @code{NULL} values.
@item
Fixed problem with 8-bit characters as separators in @code{LOAD DATA INFILE}.
@end itemize
@@ -91991,7 +91992,7 @@
Added option @code{ROW_FORMAT=@{DEFAULT | DYNAMIC | FIXED | COMPRESSED@}} to
@code{CREATE_TABLE}.
@item
-@code{DELETE FROM tbl_name} didn't work on temporary tables.
+@code{DELETE FROM @var{tbl_name}} didn't work on temporary tables.
@item
Changed function @code{CHAR_LENGTH()} to be multi-byte character safe.
@item
@@ -92027,7 +92028,7 @@
@item
Fixed bug in @code{MyISAM} with packed char keys that could be @code{NULL}.
@item
-@code{AS} on field name with @code{CREATE TABLE tbl_name SELECT ...} didn't
+@code{AS} on field name with @code{CREATE TABLE @var{tbl_name} SELECT ...} didn't
work.
@item
Allow use of @code{NATIONAL} and @code{NCHAR} when defining character columns.
@@ -92117,7 +92118,7 @@
@item
Added support of @code{--[whitespace]} comments.
@item
-Allow @code{INSERT into tbl_name VALUES ()}, that is, you may now specify
+Allow @code{INSERT INTO @var{tbl_name} VALUES ()}, that is, you may now specify
an empty value list to insert a row in which each column is set to its
default value.
@item
@@ -92145,8 +92146,8 @@
@itemize @bullet
@item
-Fixed range optimizer bug: @code{SELECT * FROM tbl_name WHERE
-key_part1 >= const AND (key_part2 = const OR key_part2 = const)}. The
+Fixed range optimizer bug: @code{SELECT * FROM @var{tbl_name} WHERE
+@var{key_part1} >= @var{const} AND (@var{key_part2} = @var{const} OR @var{key_part2} =
@var{const})}. The
bug was that some rows could be duplicated in the result.
@item
Running @code{myisamchk} without @code{-a} updated the index
@@ -92155,7 +92156,7 @@
@code{SET SQL_LOW_PRIORITY_UPDATES=1} was causing a parse error.
@item
You can now update index columns that are used in the @code{WHERE} clause.
-@code{UPDATE tbl_name SET KEY=KEY+1 WHERE KEY > 100}
+@code{UPDATE @var{tbl_name} SET KEY=KEY+1 WHERE KEY > 100}
@item
Date handling should now be a bit faster.
@item
@@ -92258,9 +92259,9 @@
Added comments to tables (with @code{CREATE TABLE ... COMMENT "xxx"}).
@item
Added @code{UNIQUE}, as in
-@code{CREATE TABLE tbl_name (col INT not null UNIQUE)}
+@code{CREATE TABLE @var{tbl_name} (col INT NOT NULL UNIQUE)}
@item
-New create syntax: @code{CREATE TABLE tbl_name SELECT ...}
+New create syntax: @code{CREATE TABLE @var{tbl_name} SELECT ...}
@item
New create syntax: @code{CREATE TABLE IF NOT EXISTS ...}
@item
@@ -92586,8 +92587,8 @@
@code{GRANT ... IDENTIFIED BY}
@item
Fixed range optimizer bug in
-@code{SELECT * FROM tbl_name WHERE key_part1 >= const AND (key_part2 = const
-OR key_part2 = const)}.
+@code{SELECT * FROM @var{tbl_name} WHERE @var{key_part1} >= @var{const} AND
(@var{key_part2} = @var{const}
+OR @var{key_part2} = @var{const})}.
@item
Fixed bug in compression key handling in @code{ISAM}.
@end itemize
@@ -92611,7 +92612,7 @@
@item
Fixed optimizer bug with tables with only one row.
@item
-Fixed bug when using @code{LOCK TABLES tbl_name READ; FLUSH TABLES;}
+Fixed bug when using @code{LOCK TABLES @var{tbl_name} READ; FLUSH TABLES;}
@item
Applied some patches for HP-UX.
@item
@@ -92767,7 +92768,7 @@
@item
@code{mysqladmin processlist} could kill the server if a new user logged in.
@item
-@code{DELETE FROM tbl_name WHERE key_column=col_name} didn't find any matching
+@code{DELETE FROM @var{tbl_name} WHERE @var{key_column}=@var{col_name}} didn't find any
matching
rows. Fixed.
@item
@code{DATE_ADD(column, ...)} didn't work.
@@ -92977,7 +92978,7 @@
MySQL now always reports the conflicting key values when a
duplicate key entry occurs. (Before this was only reported for @code{INSERT}.)
@item
-New syntax: @code{INSERT INTO tbl_name SET col_name=value, col_name=value, ...}
+New syntax: @code{INSERT INTO @var{tbl_name} SET @var{col_name}=@var{value},
@var{col_name}=@var{value}, ...}
@item
Most errors in the @file{.err} log are now prefixed with a time stamp.
@item
@@ -93102,7 +93103,7 @@
inside the comments as if the surrounding @code{/*!} and @code{*/} comment
characters didn't exist.
@item
-@code{OPTIMIZE TABLE tbl_name} can now be used to reclaim disk space
+@code{OPTIMIZE TABLE @var{tbl_name}} can now be used to reclaim disk space
after many deletes. Currently, this uses @code{ALTER TABLE} to
regenerate the table, but in the future it will use an integrated
@code{isamchk} for more speed.
@@ -93234,7 +93235,7 @@
Add support for @code{INSERT INTO table ... VALUES(...),(...),(...)},
to allow inserting multiple rows with a single statement.
@item
-@code{INSERT INTO tbl_name} is now also cached when used with @code{LOCK TABLES}.
+@code{INSERT INTO @var{tbl_name}} is now also cached when used with @code{LOCK TABLES}.
(Previously only @code{INSERT ... SELECT} and @code{LOAD DATA INFILE} were
cached.)
@item
@@ -93454,7 +93455,7 @@
repeatedly connects with an ``improper header'' (like when one uses telnet).
@item
You can now refer to tables in different databases with references of the form
-@code{tbl_name@@db_name} or @code{db_name.tbl_name}. This makes it possible to
+@var{tbl_name@@db_name} or @var{db_name.tbl_name}. This makes it possible to
give a user read access to some tables and write access to others simply by
keeping them in different databases!
@item
@@ -93591,7 +93592,7 @@
@item
Fixed problem with losing a little memory for some connections.
@item
-@code{DELETE FROM tbl_name} without a @code{WHERE} condition is now done the
+@code{DELETE FROM @var{tbl_name}} without a @code{WHERE} condition is now done the
long way when you use @code{LOCK TABLES} or if the table is in use, to
avoid race conditions.
@item
@@ -93669,8 +93670,8 @@
SJIS and UJIS.
@item
Changed @code{safe_mysqld} to redirect startup messages to
-@code{host_name.err} instead
-of @code{host_name.log} to reclaim file space on @code{mysqladmin refresh}.
+@code{@var{host_name}.err} instead
+of @code{@var{host_name}.log} to reclaim file space on @code{mysqladmin refresh}.
@item
@code{ENUM} always had the first entry as default value.
@item
@@ -93704,7 +93705,7 @@
@itemize @bullet
@item
-@code{LOCK TABLES} + @code{DELETE from tbl_name} never removed locks properly.
+@code{LOCK TABLES} + @code{DELETE from @var{tbl_name}} never removed locks properly.
@item
Fixed problem when grouping on an @code{OR} function.
@item
@@ -94048,7 +94049,7 @@
The client library now uses the value of the environment variable
@code{MYSQL_HOST} as the default host if it's defined.
@item
-@code{SELECT col_name, SUM(expr)} now returns @code{NULL} for @code{col_name}
+@code{SELECT @var{col_name}, SUM(@var{expr})} now returns @code{NULL} for @var{col_name}
when there are matching rows.
@item
Fixed problem with comparing binary strings and @code{BLOB} values with ASCII
@@ -94104,7 +94105,7 @@
@strong{Warning: Incompatible change!} This has the unfortunate
side effect that you no longer can have columns named @code{DATE}, @code{TIME}
or @code{TIMESTAMP}. :( Old columns can still be accessed through
-@code{tbl_name.col_name}!)
+@var{tbl_name.col_name}!)
@item
Changed Makefiles to hopefully work better with BSD systems. Also,
@file{manual.dvi} is now included in the distribution to avoid having stupid
@@ -94134,8 +94135,8 @@
replaces conflicting records with the new record. @code{REPLACE INTO
TABLE ... SELECT ...} works also.
@item
-Added new commands @code{CREATE DATABASE db_name} and @code{DROP
-DATABASE db_name}.
+Added new commands @code{CREATE DATABASE @var{db_name}} and @code{DROP
+DATABASE @var{db_name}}.
@item
Added @code{RENAME} option to @code{ALTER TABLE}: @code{ALTER TABLE name
RENAME TO new_name}.
@@ -94191,7 +94192,7 @@
values were converted to @code{INT} values before sorting.
@item
Fixed slow sorting when sorting on key field when using
-@code{key_column=constant}.
+@code{@var{key_col}=@var{constant}}.
@item
Sorting on calculated @code{DOUBLE} values sorted on integer results instead.
@item
@@ -94289,7 +94290,7 @@
Added many function name aliases so the functions can be used with
ODBC or standard SQL syntax.
@item
-Fixed syntax of @code{ALTER TABLE tbl_name ALTER COLUMN col_name SET DEFAULT
+Fixed syntax of @code{ALTER TABLE @var{tbl_name} ALTER COLUMN @var{col_name} SET DEFAULT
NULL}.
@item
Added @code{CHAR} and @code{BIT} as synonyms for @code{CHAR(1)}.
@@ -94617,7 +94618,7 @@
MySQL no longer has to use an extra temporary table when sorting
on functions or @code{SUM()} functions.
@item
-Fixed bug that you couldn't use @code{tbl_name.field_name} in @code{UPDATE}.
+Fixed bug that you couldn't use @var{tbl_name.field_name} in @code{UPDATE}.
@item
Fixed @code{SELECT DISTINCT} when using 'hidden group'. For example:
@example
@@ -94641,7 +94642,7 @@
@item
New operator @code{IN}. This uses a binary search to find a match.
@item
-New command @code{LOCK TABLES tbl_name [AS alias] @{READ|WRITE@} ...}
+New command @code{LOCK TABLES @var{tbl_name} [AS @var{alias}] @{READ|WRITE@} ...}
@item
Added @code{--log-update} option to @code{mysqld}, to get a log suitable for
incremental updates.
@@ -94695,9 +94696,9 @@
New range optimizer that can resolve ranges when some keypart prefix is
constant. Example:
@example
-mysql> SELECT * FROM tbl_name
- -> WHERE key_part_1="customer"
- -> AND key_part_2>=10 AND key_part_2<=10;
+mysql> SELECT * FROM @var{tbl_name}
+ -> WHERE @var{key_part_1}='@var{customer}'
+ -> AND @var{key_part_2}>=10 AND @var{key_part_2}<=10;
@end example
@end itemize
@@ -95261,7 +95262,7 @@
@code{FORMAT()}.
@item
@code{mysqldump} now works correctly for all field types (even
-@code{AUTO_INCREMENT}). The format for @code{SHOW FIELDS FROM tbl_name}
+@code{AUTO_INCREMENT}). The format for @code{SHOW FIELDS FROM @var{tbl_name}}
is changed so the @code{Type} column contains information suitable for
@code{CREATE TABLE}. In previous releases, some @code{CREATE TABLE}
information had to be patched when re-creating tables.
@@ -95773,8 +95774,8 @@
a @code{FOREIGN KEY}.
@item
Change the print format of @code{FOREIGN KEY} constraints spanning
-multiple databases to @code{`db_name`.`tbl_name`}. But when
-parsing them, we must also accept @code{`db_name.tbl_name`},
+multiple databases to @code{`@var{db_name}`.`@var{tbl_name}`}. But when
+parsing them, we must also accept @code{`@var{db_name}.@var{tbl_name}`},
because that was the output format in < 4.0.18.
@item
An optimization in locking: If @code{AUTOCOMMIT=1}, then we do not
@@ -95801,7 +95802,7 @@
@item
Fixed a bug: generate @code{FOREIGN KEY} constraint identifiers
locally for each table, in the form
-@code{db_name/tbl_name_ibfk_number}. If the user gives the
+@var{db_name/tbl_name_ibfk_number}. If the user gives the
constraint name explicitly, then remember it. These changes should
ensure that foreign key id's in a slave are the same as in the master,
and @code{DROP FOREIGN KEY} does not break replication. (Bug #2167)
@@ -95818,7 +95819,7 @@
@code{RESTRICT} constraints.
@item
Fixed a bug: @code{InnoDB} crashed in @code{RENAME TABLE} if
-@code{'db_name.tbl_name'} is shorter than 5 characters.
+@var{db_name.tbl_name} is shorter than 5 characters.
(Bug #2689)
@item
Fixed a bug: in @code{SHOW TABLE STATUS}, @code{InnoDB} row count and index
| Thread |
|---|
| • bk commit - mysqldoc tree (paul:1.1842) | paul | 14 Jul |