Bug #61622 the rows of show table status statement is not Correct
Submitted: 24 Jun 2011 1:40 Modified: 24 Jun 2011 3:57
Reporter: kelvin chou Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.5.12-log OS:Linux
Assigned to: CPU Architecture:Any

[24 Jun 2011 1:40] kelvin chou
Description:
when I run exec the show table status statement, 
the Rows value of the table using Innodb always changes without any DML.

mysql> SHOW table status like 'test_%';
| test_innodb  | InnoDB |      10 | Compact    | 40457592  

mysql> SHOW table status like 'test_%';
| test_innodb  | InnoDB |      10 | Compact    | 40000209 |  

mysql> SHOW table status like 'test_%';
| test_innodb  | InnoDB |      10 | Compact    | 40748654 |  

How to repeat:
 CREATE TABLE `test_innodb` (
  `ID` int(10) NOT NULL AUTO_INCREMENT,
  `WAGERS_ID` int(10) NOT NULL DEFAULT '0',
  `SCID` int(10) NOT NULL DEFAULT '0',
  `CID` int(10) NOT NULL DEFAULT '0',
  `SAID` int(10) NOT NULL DEFAULT '0',
  `AID` int(10) NOT NULL DEFAULT '0',
  `MID` int(10) NOT NULL DEFAULT '0',
  `USERNAME` varchar(10) NOT NULL DEFAULT '',
  `KEY_USER` varchar(10) NOT NULL DEFAULT '',
  `CHK_USER` varchar(10) NOT NULL DEFAULT '',
  `CURRENCY_NAME` varchar(10) NOT NULL DEFAULT '',
  `CURRENCY` float(8,2) NOT NULL DEFAULT '0.00',
  `GOLD` decimal(15,2) NOT NULL DEFAULT '0.00',
  `GOLD_D` decimal(15,2) NOT NULL DEFAULT '0.00',
  `PAYWAY` varchar(8) NOT NULL DEFAULT 'C',
  `STATUS` varchar(8) NOT NULL DEFAULT 'N',
  `PAYNO` varchar(32) NOT NULL DEFAULT '',
  `TYPE` varchar(8) DEFAULT NULL,
  `RESULT` varchar(4) NOT NULL DEFAULT 'X',
  `ORDER_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CHK_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ADD_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ID`),
  KEY `WAGERS_ID` (`WAGERS_ID`),
  KEY `MID` (`MID`),
  KEY `PAYWAY` (`PAYWAY`),
  KEY `IDS` (`SCID`,`CID`,`SAID`,`AID`),
  KEY `ADD_DATE` (`ADD_DATE`),
  KEY `SCID` (`SCID`,`TYPE`)
) ENGINE=InnoDB AUTO_INCREMENT=60745604 DEFAULT CHARSET=utf8 |

and  then insert records over 40,000,000
[24 Jun 2011 3:57] Valeriy Kravchuk
This is clearly documented at http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html:

"- Rows

The number of rows. Some storage engines, such as MyISAM, store the exact count. For other storage engines, such as InnoDB, this value is an approximation, and may vary from the actual value by as much as 40 to 50%. In such cases, use SELECT COUNT(*) to obtain an accurate count."