Bug #127 SHOW TABLE STATUS returns incorrect row count for InnoDB tables
Submitted: 6 Mar 2003 7:53 Modified: 13 Mar 2003 9:51
Reporter: Zak Greant Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:4.0.11-gamma-max-log OS:Linux (Debian Linux 2.4.18-bf2.4)
Assigned to: Heikki Tuuri CPU Architecture:Any

[6 Mar 2003 7:53] Zak Greant
Description:
SHOW TABLE STATUS returns an incorrect number of rows for InnoDB tables.   
    
From taking a look at sql/ha_innodb.cc, it looks like this is because the  
number returned for SHOW TABLE STATUS is only an estimation.  
  
Perhaps we could update the comment field to indicate that this is the case? 

How to repeat:
\u test  
CREATE TABLE show_ts_bug SELECT * FROM mysqlweb.mirror;  
ALTER TABLE show_ts_bug TYPE=INNODB;  
SHOW TABLE STATUS LIKE "show_ts_bug";  
SELECT COUNT(*) FROM show_ts_bug;  
  
In my case, 95 rows are listed by SHOW TABLE STATUS, while SELECT COUNT(*)  
returns 124 (the same number as SELECT COUNT(*) FROM mysqlweb.mirror;)
[11 Mar 2003 2:39] Lenz Grimmer
Heikki, is this something you can take care of?
[11 Mar 2003 4:19] Zak Greant
This behaviour is noted in the manual, if one only takes the time 
to read it carefully (cough :) It is nothing to stop a release! 
 
However, a note in the comment section would still be nice. :)
[13 Mar 2003 9:51] Sergei Golubchik
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php