Bug #44734 innodb_log_file_size expression in MEM needs small adjustment from < to <=
Submitted: 8 May 2009 3:38 Modified: 7 Aug 2009 9:08
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Advisors/Rules Severity:S3 (Non-critical)
Version:2.0.5.7153 OS:Any
Assigned to: Andy Bang CPU Architecture:Any
Triage: Triaged: D3 (Medium) / R1 (None/Negligible) / E2 (Low)

[8 May 2009 3:38] Roel Van de Paar
Description:
This expression in MySQL Enterprise Monitor:

(%have_innodb% == "YES") && ((%innodb_log_file_size% * %innodb_log_files_in_group%) < LEAST(1073741824, (%innodb_buffer_pool_size% / 2))) 

Should be changed to <= instead of <

Otherwise, let's assume that the innodb_buffer_pool_size is set to 2GB, and that the log files are made 512Mb *exactly* then the following evaluated expression would occur:

("YES" == "YES") && ((536870912 * 2) < LEAST(1073741824, (2147483648 / 2)))
i.e. 1073741824 < LEAST(1073741824, 1073741824)

And so an alert would fire, while the 'result' that this expression is trying to obtain (to increase the InnoDB Log files total size to at least half that of the innodb_buffer_pool_size) is already obtained.

How to repeat:
As per the above.

Suggested fix:
Change expression to:

(%have_innodb% == "YES") && ((%innodb_log_file_size% * %innodb_log_files_in_group%) <= LEAST(1073741824, (%innodb_buffer_pool_size% / 2))) 

i.e. <= instead of <
[11 May 2009 21:21] Andy Bang
In 2.0: Pushed up to revision 270.
In 2.1: Pushed up to revision 264.

Please let me know when both the 2.0 and 2.1 versions are tested so we can upload the fixes to the Enterprise website for customers.
[14 May 2009 2:25] Keith Russell
Patch installed in versions => 2.1.0.1039.
[15 May 2009 23:30] Marcos Palacios
Verified fixed in advisor bundle 2.1.0.1039.

Advisor: Administration
Rule:    InnoDB Redo Logs Not Sized Correctly

Setting back to 'Patch pending' waiting for the next 2.0 build.
[31 Jul 2009 2:37] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.0.6.7159.
[4 Aug 2009 20:53] Enterprise Tools JIRA Robot
Bill Weber writes: 
verified fixed in 2.0.6.7159 advisor bundle
[4 Aug 2009 20:53] Enterprise Tools JIRA Robot
Marcos Palacios writes: 
Re-opening in order for the wokflow actions to be reflected in the corresponding bug in bugs.mysql.com.

This is for testing in version 2.0.6.
[4 Aug 2009 20:54] Enterprise Tools JIRA Robot
Marcos Palacios writes: 
Verified fixed in advisor bundle 2.0.6.7159.
[7 Aug 2009 9:08] Tony Bedford
An entry was added to both the 2.1.0 and 2.0.6 changelogs:

In the Advisor “Administration” the Rule “InnoDB Redo Logs Not Sized Correctly” did not fire correctly. The rule contained the expression:

(%have_innodb% == "YES") && ((%innodb_log_file_size% * %innodb_log_files_in_group%) <
LEAST(1073741824, (%innodb_buffer_pool_size% / 2))) 

This was incorrect and needed to be changed to:

(%have_innodb% == "YES") && ((%innodb_log_file_size% * %innodb_log_files_in_group%) <=
LEAST(1073741824, (%innodb_buffer_pool_size% / 2)))