Bug #49171 read_buffer_size is only partially dynamic variable
Submitted: 27 Nov 2009 20:02 Modified: 30 Nov 2009 8:14
Reporter: Andrii Nikitin Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any

[27 Nov 2009 20:02] Andrii Nikitin
on startup mysqld assigns global variable my_default_record_cache_size from global "read_buffer_size" variable.


Later, when "read_buffer_size" is changed, "my_default_record_cache_size" will remain with initial value, which can lead to great misunderstanding.

E.g. bug #44723 will be reproducible even with smallest "read_buffer_size" values if server started with big "read_buffer_size"

How to repeat:
a) Start server before 5.1.35 with "read_buffer_size" = 10M .
b) set global read_buffer_size=128K 
c) reproduce bug #44723 while it claims only "read_buffer_size" greater than 256K can harm.

or see the code.

Suggested fix:
not sure, either make my_default_record_cache_size dynamic (probably is very danger so not acceptable).
or add new variable.
[30 Nov 2009 8:14] Sveta Smirnova
Thank you for the report.

Verified as described reading source code:  my_default_record_cache_size set in ./sql/mysqld.cc and never changes.