* Reverend Deuce aka Robert
> I am examining the file in a HEX editor right now and have identified the
> pattern. The table size divided by the pattern byte length is 8 bytes. The
> last byte is always one of three characters ('S', 'B', or 'U') as
> defined by
> the program that feeds this table. So I *know* that part is correct. The
> file size in bytes divided by 8 accurately reflects the number of rows in
> the table (it is perfectly divisible, no remainder, which is
> either lucky or means I used an enum() or char()).

I'm a bit confused... I would expect the total size to be devideable by 9,
the record length + 1. Below you show 9 bytes per line of hex dump...

> Nonetheless, I've been going through the remaining 7 characters with a
> HEX -> integer conversion, which I believe may be incorrect.
>
> I do have a pattern in the MYD file:
>
> F1 02 18 00 54 7A ED 01 53   <-- the first line of the file
> F1 66 17 00 7C 0A 84 01 53    <-- about 80% into the file
> F1 6E 11 00 FC 0E 00 00 53   <-- the last line of the file
>
> So it's clear that the first byte is always, at least generally, F1. The
> second two bytes represent something. Then there's always hex 00, followed
> by three more bytes, then a 01 or 00. Of course, there are 180 million
> rows... so I can't be entirely certain, but random sampling of about 1000
> rows shows the pattern is true.

The first byte is the deletion/null flag byte. The next three bytes could be
a MEDIUMINT, followed by a INT and finally a CHAR ("S" in all example rows).

BY experimenting I found that I get F1 in the first column if I do _not_ use
"NOT NULL" in any of the field definitions.

> I'm having a time deciphering this stuff. The mediumint and int
> say they use
> 3 bytes and 4 bytes each, respectively, but using that in the table
> definition yields invalid numbers.

What do you mean with 'invalid nunmbers'? Did you try MEDIUMINT+INT, or only
INT+MEDIUMINT? Did you define any column as NOT NULL?

--
Roger


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to