Bug #9317 Wrong count for tables in INFORMATION_SCHEMA

Submitted: 21 Mar 2005 15:57 Modified: 31 Mar 2005 4:25
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.3 OS:Linux (SuSE 9.0)
Assigned to: Sergei Glukhov CPU Architecture:Any

[21 Mar 2005 15:57] Hakan Küçükyılmaz
Description:
Changeset is 1.1829 non-debug-build (BUILD/compile-pentium)

SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'MY1';

+----------+
| count(*) |
+----------+
|     1276 |
+----------+
1 row in set (51.91 sec)

Should be ~14000.

Also 
"SELECT count(*) FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA = 'MY1';"
and
"SELECT count(*) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = 'MY1';"

gives wrong count.

How to repeat:
Populate a lot of tables and views and try queries.
[23 Mar 2005 3:15] Jorge del Conde
Hi Hakank,

Can you tell me exactly how to reproduce this ? ... i wasn't able to get similar results to what you expected.
[24 Mar 2005 12:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23347
[25 Mar 2005 8:28] Alexander Barkov
Sergey, Ok to push after cosmetic changes in several places:

Please change

      if (schema_table_store_record(thd, table))
        return 1;
      return 0;

to

    return schema_table_store_record(thd, table);

  return
[25 Mar 2005 9:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23370
[25 Mar 2005 11:57] Sergei Glukhov
Fixed in 5.0.4
[31 Mar 2005 4:25] Paul DuBois
Noted in 5.0.4 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.