List:Internals« Previous MessageNext Message »
From:paul Date:May 4 2004 10:52pm
Subject:bk commit - mysqldoc tree (paul:1.1587)
View as plain text  
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.1587 04/05/04 17:52:15 paul@stripped +1 -0
  manual.texi:
    Tweaks.

  Docs/manual.texi
    1.1631 04/05/04 17:51:55 paul@stripped +105 -82
    Tweaks.

# 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.1630/Docs/manual.texi	Tue May  4 14:55:01 2004
+++ 1.1631/Docs/manual.texi	Tue May  4 17:51:55 2004
@@ -52765,7 +52765,9 @@
 @item
 @cindex default values
 A @code{DEFAULT} value must be a constant; it cannot be a function or
-an expression.
+an expression.  This means, for example, that you cannot
+set the default for a date column to be the value of a function such as
+@code{NOW()} or @code{CURRENT_DATE}.
 
 If no @code{DEFAULT} value is specified for a column, MySQL
 automatically assigns one, as follows.
@@ -52793,10 +52795,6 @@
 string.  For @code{ENUM}, the default is the first enumeration value.
 @end itemize
 
-Default values must be constants. This means, for example, that you cannot
-set the default for a date column to be the value of a function such as
-@code{NOW()} or @code{CURRENT_DATE}.
-
 @code{BLOB} and @code{TEXT} columns cannot be assigned a default value.
 
 @item
@@ -52804,7 +52802,7 @@
 A comment for a column can be specified with the @code{COMMENT} option.
 The comment is displayed by the
 @code{SHOW CREATE TABLE} and @code{SHOW FULL COLUMNS} statements.
-This option is available as of MySQL 4.1.
+This option is operational as of MySQL 4.1.
 (It is allowed but ignored in earlier versions.)
 
 @item
@@ -52813,10 +52811,10 @@
 compatibility feature.
 
 @item
-@code{KEY} is normally a synonym for @code{INDEX}.
-From MySQL 4.1, the key attribute @code{PRIMARY KEY} can also be
-specified as just @code{KEY}. This was implemented for compatibility
-with other database systems.
+@code{KEY} is normally a synonym for @code{INDEX}.  From MySQL 4.1, the key
+attribute @code{PRIMARY KEY} can also be specified as just @code{KEY} when
+given in a column definition. This was implemented for compatibility with
+other database systems.
 
 @item
 In MySQL, a @code{UNIQUE} index is one in which all values in the index
@@ -52824,7 +52822,7 @@
 that matches an existing row.  The exception to this is that if a column
 in the index is allowed to contain @code{NULL} values, it can contain
 multiple @code{NULL} values.  This exception does not apply to @code{BDB}
-tables, which allow only a single @code{NULL}.
+tables, for which indexed columns allow only a single @code{NULL}.
 
 @item
 @tindex PRIMARY KEY
@@ -52838,7 +52836,7 @@
 
 @item
 In the created table, a @code{PRIMARY KEY} is placed first, followed
-by all @code{UNIQUE} keys, and then the normal keys.  This helps the
+by all @code{UNIQUE} indexes, and then the non-unique indexes.  This helps the
 MySQL optimizer to prioritize which index to use and also more quickly
 to detect duplicated @code{UNIQUE} keys.
 
@@ -52852,7 +52850,7 @@
 @item
 If a @code{PRIMARY KEY} or @code{UNIQUE} index consists of only one column
 that has an integer type, you can also refer to the column as @code{_rowid}
-(new in MySQL 3.23.11).
+in @code{SELECT} statements (new in MySQL 3.23.11).
 
 @item
 In MySQL, the name of a @code{PRIMARY KEY} is @code{PRIMARY}.  For other
@@ -52886,15 +52884,15 @@
 @end example
 
 @code{TYPE type_name} can be used as a synonym for @code{USING type_name}
-to specify an index type.  @code{USING} is the preferred form, however.
+to specify an index type.  However, @code{USING} is the preferred form.
 Also, the index name name that precedes the index type in the index
 specification syntax is not optional with @code{TYPE}. This is because,
 unlike @code{USING}, @code{TYPE} is not a reserved word and thus is
 interpreted as an index name.
 
 If you specify an index type that is not legal for a storage engine,
-but there is another available index type the engine can use that will
-not affect query results, the engine will use the available type.
+but there is another index type available that the engine can use without
+affecting query results, the engine will use the available type.
 
 @item
 @cindex @code{NULL} values, and indexes
@@ -52902,7 +52900,7 @@
 Only the @code{MyISAM}, @code{InnoDB}, @code{BDB}, and (as of MySQL 4.0.2)
 @code{MEMORY} storage engines support indexes on columns that can have
 @code{NULL} values. In other cases, you must declare indexed columns
-@code{NOT NULL} or an error results.
+as @code{NOT NULL} or an error results.
 
 @item
 With @code{col_name(length)} syntax in an index specification, you can create
@@ -52949,7 +52947,13 @@
 @code{MyISAM} table type supports @code{FULLTEXT} indexes. They can be created
 only from @code{CHAR}, @code{VARCHAR}, and @code{TEXT} columns.
 Indexing always happens over the entire column; partial indexing is not
-supported. See @ref{Fulltext Search} for details of operation.
+supported and any prefix length is ignored if specified. See @ref{Fulltext Search} for details of operation.
+
+@item
+In MySQL 4.1 or later, you can create special @code{SPATIAL} indexes on
+spatial column types. Spatial types are supported only for @code{MyISAM}
+tables and indexed columns must be declared as @code{NOT NULL}.  See
+@ref{Spatial extensions in MySQL}.
 
 @item
 In MySQL 3.23.44 or later, @code{InnoDB} tables support checking of
@@ -53018,7 +53022,7 @@
 
 @xref{Table types}.
 
-If a storage engine is specified and that particular engine is not available,
+If a storage engine is specified that is not available,
 MySQL uses @code{MyISAM} instead.
 For example, if a table definition includes the @code{ENGINE=BDB} option but the
 MySQL server does not support @code{BDB} tables, the table is created
@@ -53043,13 +53047,13 @@
 An approximation of the average row length for your table. You need to
 set this only for large tables with variable-size records.
 
-When you create a @code{MyISAM} table, MySQL uses the product of
-@code{MAX_ROWS * AVG_ROW_LENGTH} to decide how big the resulting table
-will be.  If you don't specify either of these options, the maximum size
-for a table will be 4GB (or 2GB if your operating system only supports 2GB
-tables). The reason for this is just to keep down the pointer sizes
-to make the index smaller and faster if you don't really need big files.
-If you want all your tables to be able to grow above the 4GB limit and are
+When you create a @code{MyISAM} table, MySQL uses the product of the
+@code{MAX_ROWS} and @code{AVG_ROW_LENGTH} options to decide how big the
+resulting table will be.  If you don't specify either option, the maximum
+size for a table will be 4GB (or 2GB if your operating system only supports
+2GB tables). The reason for this is just to keep down the pointer sizes to
+make the index smaller and faster if you don't really need big files.  If
+you want all your tables to be able to grow above the 4GB limit and are
 willing to have your smaller tables slightly slower and larger than
 necessary, you may increase the default pointer size by setting the
 @code{myisam_data_pointer_size} system variable, which was added in MySQL
@@ -53058,13 +53062,13 @@
 
 @item CHECKSUM
 Set this to 1 if you want MySQL to maintain a live checksum for all rows
-that is updated automatically as the table changes. This makes the table a
-little slower to update, but also makes it easier to find corrupted tables.
-The @code{CHECKSUM TABLE} statement reports the checksum.
-(@code{MyISAM} only.)
+(that is, a checksum that MySQL updates automatically as the table changes).
+This makes the table a little slower to update, but also makes it easier to
+find corrupted tables.  The @code{CHECKSUM TABLE} statement reports the
+checksum.  (@code{MyISAM} only.)
 
 @item COMMENT
-A 60-character comment for your table.
+A comment for your table, up to 60 characters long.
 
 @item MAX_ROWS
 The maximum number of rows you plan to store in the table.
@@ -53136,6 +53140,7 @@
 
 If you specify the @code{RAID_TYPE} option for a @code{MyISAM} table,
 specify the @code{RAID_CHUNKS} and @code{RAID_CHUNKSIZE} options as well.
+The maximum @code{RAID_CHUNKS} value is 255.
 @code{MyISAM} will create @code{RAID_CHUNKS} subdirectories named @file{00},
 @file{01}, @file{02}, ... @file{09}, @file{0a}, @file{0b}, ... @file{ff}
 in the database directory.  In each of these directories, @code{MyISAM}
@@ -53229,8 +53234,8 @@
 mysql> CREATE TABLE bar (UNIQUE (n)) SELECT n FROM foo;
 @end example
 
-If any errors occur while copying the data to the table, it will
-automatically be deleted.
+If any errors occur while copying the data to the table, it is
+automatically dropped and not created.
 
 You can precede the @code{SELECT} by @code{IGNORE} or @code{REPLACE}
 to indicate how to handle records that duplicate unique key values.
@@ -53305,15 +53310,15 @@
 to MySQL types.  @xref{Other-vendor column types}.
 
 @item
-If you include a @code{USING} clause to specify an index type that
-is not legal for a storage engine, but there is another available index
-type the engine can use that will not affect query results, the engine
-will use the available type.
+If you include a @code{USING} clause to specify an index type that is not
+legal for a storage engine, but there is another index type available that
+the engine can use without affecting query results, the engine will use the
+available type.
 
 @end itemize
 
 To see whether MySQL used a column type other
-than the one you specified, issue a @code{DESCRIBE tbl_name} or @code{SHOW
+than the one you specified, issue a @code{DESCRIBE} or @code{SHOW
 CREATE TABLE} statement after creating or altering your table.
 
 @cindex @code{myisampack}
@@ -53349,8 +53354,9 @@
 As of MySQL 4.1.2, @code{DROP DATABASE} returns the number of tables that
 were removed.  This corresponds to the number of @file{.frm} files removed.
 
-The @code{DROP DATABASE} statement removes the following files and from the
-given database directory:
+The @code{DROP DATABASE} statement removes from the given database directory
+those files and directories that MySQL itself may create during normal
+operation:
 
 @itemize @bullet
 
@@ -53372,6 +53378,11 @@
 
 @end itemize
 
+If other files or directories remain in the database directory after MySQL
+removes those just listed, the database directory cannot be removed. In this
+case, you must remove any remaining files or directories manually and issue
+the @code{DROP DATABASE} statement again.
+
 @cindex @code{mysqladmin}
 You can also drop databases with @code{mysqladmin}.
 @xref{mysqladmin,  , @code{mysqladmin}}.
@@ -53391,10 +53402,10 @@
 
 @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}.  @code{DROP INDEX} doesn't do anything in MySQL
-prior to Version 3.22.  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{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.
 @c end_description_for_help_topic
 
 
@@ -53413,7 +53424,8 @@
 @end example
 
 @c description_for_help_topic DROP TABLE  DROP TABLE EXISTS IF TEMPORARY RESTRICT CASCADE
-@code{DROP TABLE} removes one or more tables. All table data and the table
+@code{DROP TABLE} removes one or more tables. You must have the @code{DROP}
+privilege for each table. All table data and the table
 definition are @emph{removed}, so @emph{be careful} with this statement!
 
 In MySQL 3.22 or later, you can use the keywords @code{IF EXISTS}
@@ -53484,7 +53496,7 @@
 @end example
 
 As long as two databases are on the same filesystem you can also rename
-from one database to another:
+a table to move it from one database to another:
 
 @example
 RENAME TABLE current_db.tbl_name TO other_db.tbl_name;
@@ -53553,7 +53565,7 @@
 @end example
 
 The @code{USE db_name} statement tells MySQL to use the @code{db_name}
-database as the default (current) database for subsequent queries.
+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:
 
@@ -53622,7 +53634,6 @@
 If you want to disable autocommit mode for a single series of
 statements, you can use the @code{START TRANSACTION} statement:
 @c end_description_for_help_topic
-:
 
 @c example_for_help_topic START TRANSACTION
 @example
@@ -53669,7 +53680,7 @@
 databases, or those that create, drop, or alter tables.
 
 You should design your transactions not to include such statements.
-If you issue a statement that cannot be rolled back early in a transaction,
+If you issue a statement early in a transaction that cannot be rolled back,
 and then another statement later fails, the full effect of the transaction
 cannot be rolled back by issuing a @code{ROLLBACK} statement.
 
@@ -53681,7 +53692,6 @@
 a @code{COMMIT} before executing the statement):
 
 @multitable @columnfractions .25 .25 .25
-@item @strong{Statement}    @tab @strong{Statement} @tab @strong{Statement}
 @item @code{ALTER TABLE}    @tab @code{BEGIN}       @tab @code{CREATE INDEX}
 @item @code{DROP DATABASE}  @tab @code{DROP INDEX}  @tab @code{DROP TABLE}
 @item @code{LOAD MASTER DATA} @tab @code{LOCK TABLES} @tab @code{RENAME TABLE}
@@ -53779,11 +53789,11 @@
 lock on a table, only the thread holding the lock can read from
 or write to the table.  Other threads are blocked.
 
-The difference between @code{READ LOCAL} and @code{READ} is that
-@code{READ LOCAL} allows non-conflicting @code{INSERT} statements to
-execute while the lock is held.  However, this can't be used if you are
-going to manipulate the database files outside MySQL while you
-hold the lock.
+The difference between @code{READ LOCAL} and @code{READ} is that @code{READ
+LOCAL} allows non-conflicting @code{INSERT} statements (concurrent inserts)
+to execute while the lock is held.  However, this can't be used if you are
+going to manipulate the database files outside MySQL while you hold the
+lock.
 
 When you use @code{LOCK TABLES}, you must lock all tables that you are
 going to use in your queries.  If you are using a table multiple times
@@ -53851,8 +53861,8 @@
 @xref{KILL,  , @code{KILL}}.
 
 Note that you should @emph{not} lock any tables that you are using with
-@code{INSERT DELAYED}. This is because, in this case, the @code{INSERT}
-is done by a separate thread.
+@code{INSERT DELAYED} because in that case, the @code{INSERT} is done by a
+separate thread.
 
 Normally, you don't have to lock tables, because all single @code{UPDATE} statements
 are atomic; no other thread can interfere with any other currently executing
@@ -53997,7 +54007,7 @@
 @cindex users, deleting
 
 @example
-DROP USER user_name
+DROP USER user
 @end example
 
 The @code{DROP USER} statement deletes a MySQL account that
@@ -54053,35 +54063,40 @@
 @example
 GRANT priv_type [(column_list)] [, priv_type [(column_list)]] ...
     ON @{tbl_name | * | *.* | db_name.*@}
-    TO user_name [IDENTIFIED BY [PASSWORD] 'password']
-        [, user_name [IDENTIFIED BY [PASSWORD] 'password']] ...
+    TO user [IDENTIFIED BY [PASSWORD] 'password']
+        [, user [IDENTIFIED BY [PASSWORD] 'password']] ...
     [REQUIRE
         NONE |
         [@{SSL| X509@}]
         [CIPHER cipher [AND]]
         [ISSUER issuer [AND]]
         [SUBJECT subject]]
-    [WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR # |
-                          MAX_UPDATES_PER_HOUR # |
-                          MAX_CONNECTIONS_PER_HOUR #]]
+    [WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR count |
+                          MAX_UPDATES_PER_HOUR count |
+                          MAX_CONNECTIONS_PER_HOUR 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_name [, user_name] ...
+    FROM user [, user] ...
 
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_name [, user_name] ...
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...
 @end example
 
-@code{GRANT} and @code{REVOKE} are implemented in MySQL 3.22.11 or
-later. For earlier MySQL versions, these statements do nothing.
-
 @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
-The @code{GRANT} and @code{REVOKE} statements allow system administrators
-to create user accounts and to grant and revoke rights to MySQL accounts at
-four privilege levels:
+The @code{GRANT} and @code{REVOKE} statements allow system administrators to
+create MySQL user accounts and to grant rights to and revoke them from
+accounts.  @code{GRANT} and @code{REVOKE} are implemented in MySQL 3.22.11
+or later. For earlier MySQL versions, these statements do nothing.
+
+MySQL account information is stored in the tables of the @code{mysql}
+database. This database and the access control system are discussed
+extensively in @ref{MySQL Database Administration}, which you should consult
+for additional details.
+
+Privileges can be granted at four levels:
 
 @table @strong
 @item Global level
@@ -54093,14 +54108,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.*} and
-@code{REVOKE ALL ON db.*} grant and revoke only database privileges.
+@code{GRANT ALL ON db_name.*} and
+@code{REVOKE ALL ON 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.table} and
-@code{REVOKE ALL ON db.table} grant and revoke only table privileges.
+@code{GRANT ALL ON db_name.tbl_name} and
+@code{REVOKE ALL ON 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
@@ -54109,15 +54124,22 @@
 @end table
 @c end_description_for_help_topic
 
-To make it easy to revoke all privileges for a user, MySQL 4.1.2 has
-added the syntax:
+To make it easy to revoke all privileges, MySQL 4.1.2 has added the
+following syntax, which drops all database-, table-, and column-level
+privileges for the named users:
+
+@example
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...
+@end example
+
+Before MySQL 4.1.2, all privileges cannot be dropped at once.
+Two statements are necessary:
 
 @example
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_name [, user_name] ...
+REVOKE ALL PRIVILEGES FROM user [, user] ...
+REVOKE GRANT OPTION FROM user [, user] ...
 @end example
 
-This drops all database-, table-, and column-level privileges for the
-user.
 
 @c description_for_help_topic GRANT types
 For the @code{GRANT} and @code{REVOKE} statements, @code{priv_type} can be
@@ -54125,6 +54147,7 @@
 
 @c FIX agl 2002-06-13 New table, need to measure colwidths!
 @multitable @columnfractions .30 .70
+@item @strong{Privilege} @tab @strong{Meaning}
 @item @code{ALL [PRIVILEGES]} @tab Sets all simple privileges except @code{GRANT OPTION}
 @item @code{ALTER}  @tab Allows use of @code{ALTER TABLE}
 @item @code{CREATE} @tab Allows use of @code{CREATE TABLE}
@@ -77334,7 +77357,7 @@
 @code{myisamchk --silent --force */*.MYI} from the data directory to check
 all @code{MyISAM} tables, and restart @code{mysqld}.  This will ensure that
 you are running from a clean state.
- @xref{MySQL Database Administration}.
+@xref{MySQL Database Administration}.
 
 @item
 Start @code{mysqld} with the @code{--log} option and try to determine
@@ -80198,7 +80221,7 @@
 Renamed the C API @code{mysql_prepare_result()} function to
 @code{mysql_get_metadata()} as the old name was confusing.
 @item
-Added @code{DROP USER 'username'@@'hostname'} statement to drop an account
+Added @code{DROP USER 'user_name'@@'host_name'} statement to drop an account
 that has no privileges.
 @item
 The interface to aggregated UDF functions has changed a bit. You must now
Thread
bk commit - mysqldoc tree (paul:1.1587)paul5 May