Bug #427 SHOW TABLE STATUS displays wrong Row_format for myisampack'ed tables
Submitted: 13 May 2003 15:46 Modified: 13 May 2003 23:29
Reporter: Alexander Keremidarski Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.23 OS:Any (All)
Assigned to: MySQL Verification Team CPU Architecture:Any

[13 May 2003 15:46] Alexander Keremidarski
Description:
SHOW TABLE STATUS shows Compressed MyISAM tables with Dyncamic row format as non-compressed.

How to repeat:
mysql> CREATE TABLE pack (id INT, name VARCHAR(200));

Populate with random data

# myisampack pack

Not required to repeat Bug
# myisamchk -rq pack  

# myisamchk -dv pack
 
MyISAM file:         pack
Record format:       Compressed
...

mysql> SHOW TABLE STATUS LIKE "tbl";

In 3.23.xx output is like 

| Name | Type   | Row_format | Rows  |

| pack | MyISAM | Dynamic    | 11528 | 

In 4.0 output is as expected showing "Compressed" instead of "Dynamic"
[13 May 2003 19:49] MySQL Verification Team
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/
[13 May 2003 19:54] MySQL Verification Team
Sorry for first comment I did a mistake closing the bug. Below the suggestion
fix:

*** d:\mysql-dev\mysql\sql\sql_show.cc	Tue Mar 11 22:39:48 2003
--- d:\3.23.56\sql\sql_show.cpp	Tue May 13 23:39:58 2003
***************
*** 324,333 ****
        file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_NO_LOCK);
        net_store_data(packet, file->table_type());
        net_store_data(packet,
                       (table->db_options_in_use & HA_OPTION_PACK_RECORD) ?
!                      "Dynamic" :
!                      (table->db_options_in_use & HA_OPTION_COMPRESS_RECORD)
!                      ? "Compressed" : "Fixed");
        net_store_data(packet, (longlong) file->records);
        net_store_data(packet, (uint32) file->mean_rec_length);
        net_store_data(packet, (longlong) file->data_file_length);
--- 324,333 ----
        file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_NO_LOCK);
        net_store_data(packet, file->table_type());
        net_store_data(packet,
+                      (table->db_options_in_use & HA_OPTION_COMPRESS_RECORD) ?
+        	       "Compressed" :
                       (table->db_options_in_use & HA_OPTION_PACK_RECORD) ?
!                      "Dynamic" : "Fixed");
        net_store_data(packet, (longlong) file->records);
        net_store_data(packet, (uint32) file->mean_rec_length);
        net_store_data(packet, (longlong) file->data_file_length);
[13 May 2003 23:29] Michael Widenius
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 
    http://www.mysql.com/doc/en/Installing_source_tree.html

Will be fixed in 3.23.57, 4.0.14 and 4.1.1