>>>>> "Tim" == Tim Bunce <Tim.Bunce@stripped> writes:
Tim> On Wed, Feb 09, 2000 at 03:35:20PM +0200, Michael Widenius wrote:
>> >>>>> "Tim" == Tim Bunce <Tim.Bunce@stripped> writes:
Tim> This got burried under a load of higher priority issues.
Tim> It's still a little rough at the edges and could certain use some more
Tim> documentation, but is works well for me.
Tim> Patches welcome (especially docs). See the TO DO.
Tim> I'll integrate and rerelease.
>> Looks nice; I hope you don't mind if we put this into the standard
>> MySQL distribution?
Tim> I was hoping you would!
>> One thing I found missing was the ability to not copy the index files
>> as these can be generated from the .frm file.
Tim> The --noindices option already does that.
Sorry that I didn't notice this :(
>> Another option would be
>> to just copy the first 65K of the index file as in this case one can
>> generated the index with myisamchk at some later stage.
Tim> How come you say index files "can be generated from the .frm file" but
Tim> then say "copy the first 65K of the index file [to] generate the index
Tim> with myisamchk". Why isn't the .frm sufficient?
Because the .frm file is only used by MySQL and not MyISAM (The idea
is that the table handler should be totally independent of the SQL
server; The .MYI file only contains the information needed to maintain
the index and data, not anything about the other columns).
The first blocks of the .MYI file contains the index definition which
myisamchk (which doesn't know anything about .frm files) can use to
recreate the index.
To create the .MYI file from the index file one must currently do as
- Copy only the .frm file into a database.
- do 'mysql -e "delete from database.table_name"'
After the above one can copy the new 'empty' .MYI file to where the
.MYD file is and use 'myisamchk -r table_name' to re-generate the index
for the data.