Commit ef75476c authored by monty@donna.mysql.fi's avatar monty@donna.mysql.fi

Merge work:/my/mysql into donna.mysql.fi:/home/my/bk/mysql

parents b28e9462 e2d8599c
...@@ -501,6 +501,7 @@ MyISAM Tables ...@@ -501,6 +501,7 @@ MyISAM Tables
* Key space:: Space needed for keys * Key space:: Space needed for keys
* MyISAM table formats:: MyISAM table formats * MyISAM table formats:: MyISAM table formats
* MyISAM table problems::
MyISAM Table Formats MyISAM Table Formats
...@@ -22893,7 +22894,8 @@ based on the @code{ISAM} code and has a lot of useful extensions. ...@@ -22893,7 +22894,8 @@ based on the @code{ISAM} code and has a lot of useful extensions.
The index is stored in a file with the @code{.MYI} (MYIndex) extension, The index is stored in a file with the @code{.MYI} (MYIndex) extension,
and the data is stored in a file with the @code{.MYD} (MYData) extension. and the data is stored in a file with the @code{.MYD} (MYData) extension.
You can check/repair @code{MyISAM} tables with the @code{myisamchk} You can check/repair @code{MyISAM} tables with the @code{myisamchk}
utility. @xref{Crash recovery}. utility. @xref{Crash recovery}. You can compress @code{MyISAM} tables with
@code{myisampack} to take up much less space. @xref{myisampack}.
The following is new in @code{MyISAM}: The following is new in @code{MyISAM}:
...@@ -23046,6 +23048,7 @@ backup media. ...@@ -23046,6 +23048,7 @@ backup media.
@menu @menu
* Key space:: Space needed for keys * Key space:: Space needed for keys
* MyISAM table formats:: MyISAM table formats * MyISAM table formats:: MyISAM table formats
* MyISAM table problems::
@end menu @end menu
@cindex key space, MyISAM @cindex key space, MyISAM
...@@ -23071,7 +23074,7 @@ In @code{MyISAM} tables, you can also prefix compress numbers by specifying ...@@ -23071,7 +23074,7 @@ In @code{MyISAM} tables, you can also prefix compress numbers by specifying
many integer keys that have an identical prefix when the numbers are stored many integer keys that have an identical prefix when the numbers are stored
high-byte first. high-byte first.
@node MyISAM table formats, , Key space, MyISAM @node MyISAM table formats, MyISAM table problems, Key space, MyISAM
@subsection MyISAM Table Formats @subsection MyISAM Table Formats
@strong{MyISAM} supports 3 different table types. Two of them are chosen @strong{MyISAM} supports 3 different table types. Two of them are chosen
...@@ -23233,6 +23236,63 @@ columns. ...@@ -23233,6 +23236,63 @@ columns.
Can be uncompressed with @code{myisamchk}. Can be uncompressed with @code{myisamchk}.
@end itemize @end itemize
@node MyISAM table problems, , MyISAM table formats, MyISAM
@subsection MyISAM table problems.
Each @code{MyISAM} @code{.MYI} file has in the header a counter that can
be used to check if a table has been closed properly.
If you get the following warning from @code{CHECK TABLE} or @code{myisamchk}:
@example
# clients is using or hasn't closed the table properly
@end example
this means that this counter has come out of sync. This doesn't mean
that the table is corrupted, but means that you should at least do a
check on the table to verify that it's ok.
The counter works as follows:
@itemize @bullet
@item
The first time a table is updated in @strong{MySQL}, a counter in the
header of the index files is incremented.
@item
The counter is not changed during further updates.
@item
When the last instance of a table is closed (because of a @code{FLUSH} or
because there isn't room in the table cache) the counter is
decremented if the table has been updated at any point.
@item
When you repair the table or check the table and it was ok,
the counter is reset to 0.
@item
To avoid problems with interaction with other processes that may do a
check on the table, the counter is not decremented on close if it was 0.
@end itemize
In other words, the only ways this can go out of sync are:
@itemize @bullet
@item
The @code{MyISAM} tables are copied without a @code{LOCK} and
@code{FLUSH TABLES}.
@item
@strong{MySQL} has crashed between an update and the final close
(Note that the table may still be ok, as @strong{MySQL} always issues writes
for everything between each statement).
@item
Someone has done a @code{myisamchk --repair} or @code{myisamchk --update-state}on a table that was in use by @code{mysqld}.
@item
Many @code{mysqld} servers are using the table and one has done a
@code{REPAIR} or @code{CHECK} of the table while it was in use by
another server. In this setup the @code{CHECK} is safe to do (even if
you will get the warning from other servers), but @code{REPAIR} should
be avoided as it currently replaces the data file with a new one, which
is not signaled to the other servers.
@end itemize
@cindex tables, merging @cindex tables, merging
@cindex MERGE tables, defined @cindex MERGE tables, defined
@node MERGE, ISAM, MyISAM, Table types @node MERGE, ISAM, MyISAM, Table types
...@@ -26779,7 +26839,7 @@ tables}. ...@@ -26779,7 +26839,7 @@ tables}.
* Replication Options:: Replication Options in my.cnf * Replication Options:: Replication Options in my.cnf
* Replication SQL:: SQL Commands related to replication * Replication SQL:: SQL Commands related to replication
* Replication FAQ:: Frequently Asked Questions about replication * Replication FAQ:: Frequently Asked Questions about replication
* Replication Problems:: Troubleshooting Replication. * Replication Problems:: Troubleshooting Replication.
@end menu @end menu
@node Replication Intro, Replication Implementation, Replication, Replication @node Replication Intro, Replication Implementation, Replication, Replication
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment