Bug #41318 create database failed during db create over 32765
Submitted: 9 Dec 2008 8:44 Modified: 10 Dec 2008 1:19
Reporter: ws lee Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.51a OS:Solaris (5.10)
Assigned to: CPU Architecture:Any

[9 Dec 2008 8:44] ws lee
Description:
I can't create db over 32756.

How to repeat:
# cat createdb.sh
i=0
while [ $i -lt 100000 ]
do
  i=`expr $i + 1`
  /usr/bin/echo "$i"
  /usr/local/mysql5.0.51a-test/bin/mysql -uroot -e"create database testsb${i}"
done

#./createdb.sh
....
32764
ERROR 1006 (HY000) at line 1: Can't create database 'testsb32764' (errno: 31)

default db is just information_schema and test.
thus, total db is 32763+2 = 32765.
[9 Dec 2008 11:10] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

This is operating system limit. Usually is only 2^15 sub directories are allowed to create. See also http://docs.sun.com/app/docs/doc/806-1075/6jacsnin3?a=view for example.
[9 Dec 2008 11:11] Sveta Smirnova
Look for "Too many links":

$perror 31
OS error code 31: Too many links
[10 Dec 2008 1:19] ws lee
Thanks for fast reply.
I confirmed UFS file system limitation.