Bug #39334 table_definition_cache is not dynamic
Submitted: 9 Sep 2008 8:16 Modified: 9 Sep 2008 8:20
Reporter: Morgan Tocker Email Updates:
Status: Not a Bug 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:16] Morgan Tocker
Description:
The manual contradicts, and says this value should be dynamic.  It is not.

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_open_cache=128;
Query OK, 0 rows affected (0.00 sec)

mysql> show global variables like 'table%';
+-------------------------+--------+
| Variable_name           | Value  |
+-------------------------+--------+
| table_definition_cache  | 256    | 
| table_lock_wait_timeout | 50     | 
| table_open_cache        | 128    | 
| table_type              | MyISAM | 
+-------------------------+--------+
4 rows in set (0.01 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)

Suggested fix:
Make it dynamic - no reason not?
[9 Sep 2008 8:20] Morgan Tocker
Correction - problem is that it can't be set lower than 256.  Will file another report.
[9 Sep 2008 8:39] Morgan Tocker
See bug #39335