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.1580 04/05/03 15:32:37 paul@stripped +1 -0
manual.texi:
More on index prefix lengths.
Docs/manual.texi
1.1624 04/05/03 15:32:15 paul@stripped +16 -6
More on index prefix lengths.
# 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: kite-hub.kitebird.com
# Root: /src/extern/MySQL/bk/mysqldoc
--- 1.1623/Docs/manual.texi Mon May 3 15:14:26 2004
+++ 1.1624/Docs/manual.texi Mon May 3 15:32:15 2004
@@ -52833,24 +52833,31 @@
@item
With @code{col_name(length)} syntax in an index specification, you can create
-an index that uses only the first @code{length} bytes of a @code{CHAR}
-or @code{VARCHAR} column. This can make the index file much smaller.
+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.
@xref{Indexes}.
-@item
@cindex @code{BLOB} columns, indexing
@cindex indexes, and @code{BLOB} columns
@cindex @code{TEXT} columns, indexing
@cindex indexes, and @code{TEXT} columns
-Only the @code{MyISAM} and (as of MySQL 4.0.14) @code{InnoDB} table types
+The @code{MyISAM} and (as of MySQL 4.0.14) @code{InnoDB} table types also
support indexing on @code{BLOB} and @code{TEXT} columns. When indexing
-a @code{BLOB} or @code{TEXT} column, you @emph{must} always specify the
-length of the index, up to 255 bytes. For example:
+a @code{BLOB} or @code{TEXT} column, you @emph{must} specify a prefix
+length for the index. For example:
@example
CREATE TABLE test (blob_col BLOB, INDEX(blob_col(10)));
@end example
+Prefixes can be up to 255 bytes long (or 1000 bytes for @code{MyISAM}
+and @code{InnoDB} tables as of MySQL 4.1.2). Note that prefix limits
+are measured in bytes, whereas the prefix length in @code{CREATE TABLE}
+statements is interpreted as number of characters. Take this into account
+when specifying a prefix length for a column that uses a multi-byte
+character set.
+
@item
An @code{index_col_name} specification can end with @code{ASC} or @code{DESC}.
These keywords are allowed for future extensions for specifying ascending
@@ -79500,6 +79507,9 @@
MySQL now supports up to 64 keys per table.
@item
@code{MyISAM} tables now support keys up to 1000 bytes long.
+@item
+@code{MyISAM} and @code{InnoDB} tables now support index prefix lengths up
+to 1000 bytes long.
@item
If you try to create a key with a key part that is too long, and it is safe
to auto-truncate it to a smaller length, MySQL now does so. A warning is
| Thread |
|---|
| • bk commit - mysqldoc tree (paul:1.1580) | paul | 3 May |