Bug #39225 SHOW TABLES only shows 1000 tables maximum
Submitted: 3 Sep 2008 20:26 Modified: 3 Sep 2008 22:29
Reporter: Sheeri Cabral (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.56-enterprise-gpl-log OS:Linux
Assigned to: CPU Architecture:Any
Tags: show tables

[3 Sep 2008 20:26] Sheeri Cabral
Description:
mysql> select count(*) from information_schema.tables where table_schema='profiles';
+----------+
| count(*) |
+----------+
|     1018 | 
+----------+
1 row in set (41.04 sec)

mysql> show tables;
+-------------------------+
| Tables_in_profiles      |
+-------------------------+
....elided.... 
1000 rows in set (0.00 sec)

mysqlshow profiles
shows all 1018 tables, though.

How to repeat:
run SHOW TABLES on a database with >1000 tables.

Suggested fix:
get rid of the limitation.
[3 Sep 2008 21:43] Giuseppe Maxia
Can't repeat using the version indicated.

mysql> select version();
+---------------------------+
| version()                 |
+---------------------------+
| 5.0.56-enterprise-gpl-log | 
+---------------------------+
1 row in set (0.00 sec)

mysql> select count(*) from information_schema.tables where table_schema=schema();
+----------+
| count(*) |
+----------+
|     1020 | 
+----------+
1 row in set (0.24 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| tt0001         | 

...

| tt1019         | 
| tt1020         | 
+----------------+
1020 rows in set (0.01 sec)

Please make sure that you are using a client library that shipped with your server.
[3 Sep 2008 22:00] MySQL Verification Team
I can't repeat with current source server too:

mysql 5.0 > select count(*) from information_schema.tables where table_schema='profiles';
+----------+
| count(*) |
+----------+
|     1031 |
+----------+
1 row in set (2.86 sec)

mysql 5.0 >

| tb997              |
| tb998              |
| tb999              |
+--------------------+
1031 rows in set (0.03 sec)

mysql 5.0 >
[3 Sep 2008 22:29] Sheeri Cabral
aha!

> mysql --version
mysql  Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (x86_64) using readline 5.0
[3 Sep 2008 22:29] Sheeri Cabral
is likely a client issue, resolution is to upgrade the client.

mysql  Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (x86_64) using readline 5.0