Bug #36875 main.sort_buffer_size_basic_32 fails on some systems
Submitted: 22 May 2008 6:30 Modified: 21 Jan 2009 16:16
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:6.0 OS:Any
Assigned to: Horst Hunger CPU Architecture:Any
Tags: test

[22 May 2008 6:30] Konstantin Osipov
Description:
The symptoms are:

main.sort_buffer_size_basic_32 [ fail ]

--- /export/home/pushbuild/pb/mysql-6.0-runtime/277/mysql-6.0.6-alpha-pb277/mysql-test/r/sort_buffer_size_basic_32.result	Wed May 21 23:19:02 2008
+++ /export/home/pushbuild/pb/mysql-6.0-runtime/277/mysql-6.0.6-alpha-pb277/mysql-test/r/sort_buffer_size_basic_32.reject	Thu May 22 02:34:17 2008
@@ -32,14 +32,10 @@
 1
 '#--------------------FN_DYNVARS_151_03-------------------------#'
 SET @@global.sort_buffer_size = 32776;
-Warnings:
-Warning	1292	Truncated incorrect sort_buffer_size value: '32776'
 SELECT @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804;
 @@global.sort_buffer_size= 32776 OR @@global.sort_buffer_size= 32804
 1
 SET @@global.sort_buffer_size = 32777;
-Warnings:
-Warning	1292	Truncated incorrect sort_buffer_size value: '32777'
 SELECT @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804;
 @@global.sort_buffer_size= 32777 OR @@global.sort_buffer_size= 32804
 1
@@ -54,14 +50,10 @@
 'Bug# 34877: Invalid Values are showing in variable on assigning valid values.';
 '#--------------------FN_DYNVARS_151_04-------------------------#'
 SET @@session.sort_buffer_size = 32776;
-Warnings:
-Warning	1292	Truncated incorrect sort_buffer_size value: '32776'
 SELECT @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804;
 @@session.sort_buffer_size= 32776 OR @@session.sort_buffer_size= 32804
 1
 SET @@session.sort_buffer_size = 32777;
-Warnings:
-Warning	1292	Truncated incorrect sort_buffer_size value: '32777'
 SELECT @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804;
 @@session.sort_buffer_size= 32777 OR @@session.sort_buffer_size= 32804
 1
@@ -173,10 +165,10 @@
 Warning	1292	Truncated incorrect sort_buffer_size value: '9100'
 SELECT @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804;
 @sort_buffer_size= 32776 OR @@sort_buffer_size= 32804
-1
+NULL
 SELECT @@sort_buffer_size;
 @@sort_buffer_size
-32804
+32776
 SELECT local.sort_buffer_size;
 ERROR 42S02: Unknown table 'local' in field list
 SELECT session.sort_buffer_size;

How to repeat:
https://intranet.mysql.com/secure/pushbuild/getlog.pl?dir=mysql-6.0-runtime&entry=kosipov@...

Repeatable on my own box (intel 32-bit, 2 core, compile-pentium-valgrind-max)

Suggested fix:
The server apparently is performing some platform-specific rounding before
setting this variable. Either we should agree to change the server behavior
or make the test platform-idependent
[1 Dec 2008 8:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/60256

2715 Horst Hunger	2008-12-01
      Fix for Bug#36875: Problem was, that there some warnings has been written containing values,
      which were determined by the server depending on the os. The solution is to disable warnings in general.
      The check of the values only have been done for Linux and Windows. Now, the check has been changed to the check of
      ranges (not more concrete values) being near by the expected (set) values.
[8 Jan 2009 18:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/62735

2733 Horst Hunger	2009-01-08
      Patch for bug#36875: Inserted review results.
[14 Jan 2009 9:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/63197

2748 He Zhenxing	2009-01-14 [merge]
      Auto merge
[15 Jan 2009 6:33] Bugs System
Pushed into 5.1.31 (revid:joro@sun.com-20090115053147-tx1oapthnzgvs1ro) (version source revid:davi.arnaut@sun.com-20090113150631-y84w12o2zmh7j3qd) (merge vers: 5.1.31) (pib:6)
[16 Jan 2009 3:38] Paul DuBois
Test case changes. No changelog entry needed.

Setting report to NDI pending push into 6.0.x.
[19 Jan 2009 11:21] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090115073240-1wanl85vlvw2she1) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 12:59] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 15:16] Jon Stephens
Setting status back to NDI pending merge to 6.0 tree.
[19 Jan 2009 16:05] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)
[20 Jan 2009 18:52] Bugs System
Pushed into 6.0.10-alpha (revid:joro@sun.com-20090119171328-2hemf2ndc1dxl0et) (version source revid:mats@sun.com-20090109123108-m97xwc0c1048bxik) (merge vers: 6.0.10-alpha) (pib:6)
[21 Jan 2009 16:16] Paul DuBois
Test case changes. No changelog entry needed.