Bug 459497

Summary: not possible to have more than 31999 directories under /var/lib/mysql
Product: [Fedora] Fedora Reporter: Zoltan Arpadffy <zoli>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: hhorak, zoli
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-22 03:36:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zoltan Arpadffy 2008-08-19 13:39:42 UTC
Description of problem:
If the /var/lib/mysql directory contain more than 31999 files/directories/databases that new database creation is not possible.
This is not possible even for root.

Version-Release number of selected component (if applicable):

mysql-5.0.51a-1.fc9.i386
mysql-devel-5.0.51a-1.fc9.i386
mysqlclient10-3.23.58-9.2.1.i386
mysql-libs-5.0.51a-1.fc9.i386
mysql-server-5.0.51a-1.fc9.i386
mod_auth_mysql-3.0.0-6.i386

How reproducible:
Always.

Steps to Reproduce:
1. have more than 31999 databases
2. try to create new database 
  
Actual results:
The mysql server crashes

Expected results:
The database is created

Additional info:
This is important for web hotels, ISP etc.
fedora.polarhome.com has more than 70k accounts and more than 50k mysql databases created (usually one user one database)
Unfortunately, it is needed to be removed not used databases (subdirectories) under /var/lib/mysql in order to create new databases.

When the number of entries in /var/lib/mysql fall below 31999, the new database creation is possible.

Comment 1 Tom Lane 2008-08-22 03:36:56 UTC
This sounds like it's due to the ext3 limit on number of subdirectories in a directory.  Use another filesystem, or rethink whether you really need so many databases.