Re: Definitions in the frm file
Hi!
On Jul 19, Lenz Grimmer wrote:
> On Thu, 19 Jul 2007, Sergei Golubchik wrote: > > On Jul 18, Bjørn Normann wrote: > > > I need more information about the key area. It doesn't say > > > anything about how the keys or indexes are stored in the .frm > > > file. > > > > Check the source. For example (in 5.1). > > You need this function: > > http://dev.mysql.com/sources/doxygen/mysql-5.1/table_8cc.html#90fcadffe69b32708bc42f9c71792524 > > > > keys are read from the frm file in lines 00527-00578, and 00690-00712. > > It's easy to understand, for example: > > > > 00532 keyinfo->flags= (uint) uint2korr(strpos) ^ HA_NOSAME; > > 00533 keyinfo->key_length= (uint) uint2korr(strpos+2); > > 00534 keyinfo->key_parts= (uint) strpos[4]; > > 00535 keyinfo->algorithm= (enum ha_key_alg) strpos[5]; > > 00536 keyinfo->block_size= uint2korr(strpos+6); > > 00537 strpos+=8; > > > > means > > * two bytes for flags (with inverted HA_NOSAME bit) > > * two bytes for key length > > * one byte - number of key parts > > * one byte for key algorithm > > * two bytes - key block size > > Would it make sense to add this information to the internals > documentation on the Forge Wiki? Or is it changing too frequently?
It rarely changes.
It makes sense to add the complete description of .frm format to the
internals manual, yes. But not 5 arbitrarily picked lines out of
open_binary_frm().
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Radlkoferstr. 2, D-81373 München
<___/ Geschäftsführer: Kaj Arnö - HRB München 162140
--
MySQL Internals Mailing List
For list archives:
http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Thu Jul 19 08:19:07 2007
This archive was generated by hypermail 2.1.8
: Thu Aug 09 2007 - 19:06:19 EDT
|