Bug #39335 table_definition_cache must be >= 256
Submitted: 9 Sep 2008 8:38 Modified: 11 Oct 2008 19:29
Reporter: Morgan Tocker Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.26-rc OS:Any
Assigned to: CPU Architecture:Any

[9 Sep 2008 8:38] Morgan Tocker
Description:
It doesn't work if I try and create a table_cache less than 256.  On Windows systems, our descriptor limit is 2048, so surely this could become a problem.

Embedded systems may also prefer lower numbers?

How to repeat:
mysql> show global variables like 'table%';
+-------------------------+--------+
| Variable_name           | Value  |
+-------------------------+--------+
| table_definition_cache  | 256    | 
| table_lock_wait_timeout | 50     | 
| table_open_cache        | 64     | 
| table_type              | MyISAM | 
+-------------------------+--------+
4 rows in set (0.00 sec)

mysql> SET GLOBAL table_definition_cache=128;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+---------------------------------------------------------+
| Level   | Code | Message                                                 |
+---------+------+---------------------------------------------------------+
| Warning | 1292 | Truncated incorrect table_definition_cache value: '128' | 
+---------+------+---------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SET GLOBAL table_definition_cache=256;
Query OK, 0 rows affected (0.00 sec)

mysql> SET GLOBAL table_definition_cache=258;
Query OK, 0 rows affected (0.00 sec)

mysql> SET GLOBAL table_definition_cache=250;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> SET GLOBAL table_definition_cache=257;
Query OK, 0 rows affected (0.00 sec)

mysql> SET GLOBAL table_definition_cache=255;
Query OK, 0 rows affected, 1 warning (0.00 sec)

Suggested fix:
Allow a minimum of 0 (don't cache descriptors).
[9 Sep 2008 8:56] MySQL Verification Team
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#option_mysqld_table_de...

"The table definition cache takes less space and does not use file descriptors"
[11 Oct 2008 23: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".
[27 Nov 2008 11:07] Geir Emblemsvag
Still present in Server version: 5.1.29-rc-community-log MySQL Community Server (GPL).
[27 Nov 2008 12:18] Geir Emblemsvag
Nevermind :)