Bug #50457 myisamchk incorrectly reports a table as Packed
Submitted: 19 Jan 2010 20:37 Modified: 16 Feb 2010 17:10
Reporter: Donna Harmon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1.42 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[19 Jan 2010 20:37] Donna Harmon
Description:
When running myisamchk -dvvi on a newly created table it reports the "Record Format" as "Packed"

How to repeat:
1) Create a table with the following definition:

CREATE TABLE `file_storage` (
`file_id` int(10) unsigned NOT NULL auto_increment,
 `file_path` varchar(100) NOT NULL default '',
 `file_mime` varchar(45) NOT NULL default '',
 `file_name` varchar(45) NOT NULL default '',
 `date_created` datetime default NULL,
 `date_modified` datetime default NULL,
 PRIMARY KEY (`file_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

2) Run myisamchk on the newly created table:

shell> bin/myisamchk -dvvi My5142/data/DHTest/file_storage.MYI

3) Note "Record Format" in resulting output:

MyISAM file:         My5142/data/DHTest/file_storage.MYI
Record format:       Packed
Character set:       latin1_swedish_ci (8)
File-version:        1
Creation time:       2010-01-19 12:16:18
Status:              checked,analyzed,optimized keys,sorted index pages
Auto increment key:              1  Last value:                     0
Data records:                    0  Deleted blocks:                 0
Datafile parts:                  0  Deleted data:                   0
Datafile pointer (bytes):        6  Keyfile pointer (bytes):        6
Datafile length:                 0  Keyfile length:              1024
Max datafile length: 281474976710654  Max keyfile length: 288230376151710719
Recordlength:                  215

table description:
Key Start Len Index   Type                     Rec/key         Root  Blocksize
1   2     4   unique  unsigned long                  1                    1024

Field Start Length Nullpos Nullbit Type
1     1     1                                                         
2     2     4                      no zeros                           
3     6     101                    varchar                            
4     107   46                     varchar                            
5     153   46                     varchar                            
6     199   8      1       1       no zeros                           
7     207   8      1       2       no zeros                           

User time 0.00, System time 0.00
Maximum resident set size 0, Integral resident set size 0
Non-physical pagefaults 0, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 1, Involuntary context switches 0

Suggested fix:
Don't show it as Packed if it has not been packed.
[22 Jan 2010 17:01] Stefan Hinz
Dynamic and Packed differ. This must be a bug in myisamchk. Changing category and de-assigning the lead for that reason.
[22 Jan 2010 17:06] Paul DuBois
myisamchk is wrong. SHOW TABLE STATUS says Dynamic:

mysql> show table status like 'file_storage'\G
*************************** 1. row ***************************
           Name: file_storage
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 0
 Avg_row_length: 0
    Data_length: 0
Max_data_length: 281474976710655
   Index_length: 1024
      Data_free: 0
 Auto_increment: 1
    Create_time: 2010-01-22 11:01:55
    Update_time: 2010-01-22 11:01:55
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options: 
        Comment:
[22 Jan 2010 17:17] MySQL Verification Team
Stefan,

They don't differ. They are one and the same. 

Do note that "Compressed" is a separate format.
[28 Jan 2010 17:20] MySQL Verification Team
Stefan,

"Dynamic" is used by Server and "Packed" by myisamchk, but they are one and the same thing ...
[16 Feb 2010 17:10] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.