Bug #41880 report table_rows not stable
Submitted: 5 Jan 2009 18:16 Modified: 6 Feb 2009 7:21
Reporter: Ricardo A. Rambal S. Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:5.1.30 OS:Microsoft Windows (Windows XP Professional)
Assigned to: CPU Architecture:Any

[5 Jan 2009 18:16] Ricardo A. Rambal S.
My program runs the query:

select table_rows from information_schema.tables where table_schema = 'base5' and table_name = 'produc';

I expected MySQL to return table_rows = 4951

It gave me table_rows different values (5200, 4100, ...). This happen on tables with table_rows > 150.

How to repeat:
To create a table with 160 rows or plus.
[6 Jan 2009 7:21] MySQL Verification Team
Is this table an InnoDB table?  If yes, there is no bug here.
Please, check http://dev.mysql.com/doc/refman/5.1/en/innodb-restrictions.html

"SHOW TABLE STATUS does not give accurate statistics on InnoDB tables, except for the physical size reserved by the table. The row count is only a rough estimate used in SQL optimization."

If you want accurate row count, use SELECT COUNT(*) FROM <table>.
[7 Feb 2009 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".