Thanks a lot for the answer.
>
> What document? The most detailed document (besides the source code) is
> the internals manual: http://dev.mysql.com/doc/internals/en/index.html
> http://dev.mysql.com/doc/refman/4.1/...ic-format.html
Section 14.1.3.2. Dynamic Table Characteristics
I checked 5.0 and 5.1 manuals and they have the same formula.
> do not format with -x, use -t x1 for better formatting:
That does look better.
> Right. In fact there is a minumum row size of 2+2+16 = 20 bytes if you
> use dynamic row format. Also your strings are not empty but contain the
> value "''" (two single quote characters).
>
You are right. I was using "load data infile" and I thought that I had
put empty strings by writing '' in the file.
I have another question: when adding a varchar column that mostly
stores empty string (or NULL if that saves more space) does not cost
more disk space? I guess it has to do with the existing number of
columns and check whether it is on the verge of 8's multiple or not. It
appears that in the worst case, adding a nullable varchar column that
stores null or empty string will cost 1 byte per row. Am I right?