610 MySQL Technical Reference for Version 4.1.1-alpha 7 The first time a table is updated in MySQL, a counter in the header of the index files is incremented. 7 The counter is not changed during further updates.
7 When the last instance of a table is closed (because of a FLUSH or because there isn't
room in the table cache) the counter is decremented if the table has been updated at
any point.
7 When you repair the table or check the table and it was okay, the counter is reset to 0.
7 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. In other words, the only ways this can go out of sync are: 7 The MyISAM tables are copied without a LOCK and FLUSH TABLES.
7 MySQL has crashed between an update and the final close. (Note that the table may
still be okay, as MySQL always issues writes for everything between each statement.) 7 Someone has done a myisamchk --recover or myisamchk --update-stateon a table that was in use by mysqld. 7 Many mysqld servers are using the table and one has done a REPAIR or CHECK of the table while it was in use by another server. In this setup the CHECK is safe to do
(even if you will get the warning from other servers), but REPAIR should be avoided
as it currently replaces the datafile with a new one, which is not signaled to the other
servers.
7.2 MERGE Tables MERGE tables are new in MySQL Version 3.23.25. The code is still in gamma, but should be
reasonable stable.
A MERGE table (also known as a MRG_MyISAM table) is a collection of identical MyISAM tables
that can be used as one. You can only SELECT, DELETE, and UPDATE from the collection of
tables. If you DROP the MERGE table, you are only dropping the MERGE specification.
Note that DELETE FROM merge_table used without a WHERE will only clear the mapping for
the table, not delete everything in the mapped tables. (We plan to fix this in 4.1).
With identical tables we mean that all tables are created with identical column and key
information. You can't merge tables in which the columns are packed differently, doesn't
have exactly the same columns, or have the keys in different order. However, some of the
tables can be compressed with myisampack. See Section 4.8.4 [myisampack], page 320.
When you create a MERGE table, you will get a `.frm' table definition file and a `.MRG' table
list file. The `.MRG' just contains a list of the index files (`.MYI' files) that should be used as
one. Before 4.1.1 all used tables had to be in the same database as the MERGE table itself.
For the moment, you need to have SELECT, UPDATE, and DELETE privileges on the tables you
map to a MERGE table.
MERGE tables can help you solve the following problems:
7 Easily manage a set of log tables. For example, you can put data from different months into separate files, compress some of them with myisampack, and then create a MERGE
to use these as one.

Web Hosting by Oxxus.Net

manual-913.html 
manual-915.html