Hi!
On Feb 19, Hagen H?pfner wrote:
> >> ------------------------------------------------------------
> >> mi_int4store(ptr,base->pack_reclength); ptr +=4;
> >> Is this the average for a packed record? If so, how is it computed?
> >> If I do not pack the data file, then pack_reclength is equal to
> >> reclength, isn't it?
> >
> > How it's computed - see mi_create.c.
> > It's equal if there's no live checksum, and pack_reclength
> > is not less than rec_reflength.
> >
> > Not the average, it's basically the reclength above without
> > rec_reflength/checksum correction.
> Hm, I looked at the source code and found:
>
> share.base.reclength=real_reclength;
> share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM);
>
> For me this looks like that pack_reclength is the reclength WITH
> corrections.
Yes, sorry. It's reclength WITH rec_reflength/checksum correction.
> However, as longer as I think about the MyISAM driver as more obvious
> is the question, what "pack" means exactly. Does it really mean
> compression or only the way of representing (uncompressed) the data in
> main memory?
No, it does not mean compression. It mainly refers to stripping
endspaces from VARCHAR. Check _mi_rec_pack().
Regards,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Kerpen, Germany
<___/ www.mysql.com