Bug #52208 gis fails on some platforms (Solaris, HP-UX, Linux)
Submitted: 19 Mar 2010 8:59 Modified: 28 Feb 2011 16:35
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:M3 (Celosia) OS:Other (see text)
Assigned to: Alexey Botchkov CPU Architecture:Any
Tags: experimental, pb2, test failure

[19 Mar 2010 8:59] Alexander Nozdrin
Description:
main.gis [ fail ]
        Test ended at 2010-03-17 14:09:37

CURRENT_TEST: main.gis
--- /export/home2/pb2/test/sb_1-1562172-1268825383.77/mysql-5.6.99-m4-solaris11-i386-test/mysql-test/r/gis.result	Tue Mar 16 02:48:17 2010
+++ /export/home2/pb2/test/sb_1-1562172-1268825383.77/mysql-5.6.99-m4-solaris11-i386-test/mysql-test/r/gis.reject	Wed Mar 17 16:09:36 2010
@@ -655,7 +655,7 @@
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85984;
 object_id	geometrytype(geo)	ISSIMPLE(GEO)	ASTEXT(centroid(geo))
-85984	MULTIPOLYGON	0	POINT(-114.87787186923313 36.33101763469059)
+85984	MULTIPOLYGON	0	POINT(-114.87787186923329 36.33101763469052)
 drop table t1;
 create table t1 (fl geometry not null);
 insert into t1 values (1);

How to repeat:
Check out PB.
[19 Mar 2010 9:39] Olav Sandstå
I think this error only occurs for 32-bit builds. 64-bit builds seems to work fine.
[22 Mar 2010 18:41] Sveta Smirnova
Thank you for the report.

Verified as described using pushbuild logs. Not repeatable in my environment.
[27 Mar 2010 19:31] Joerg Bruehe
In the 5.5.3-m3 release build running tests on an optimized binary, this bug shows on Solaris10-x86 for two results:

@@ -651,11 +651,11 @@
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85998;
 object_id  geometrytype(geo)   ISSIMPLE(GEO)   ASTEXT(centroid(geo))
-85998  MULTIPOLYGON    0   POINT(115.31877315203187 -36.23747282102153)
+85998  MULTIPOLYGON    0   POINT(115.31877315203187 -36.23747282102152)
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85984;
 object_id  geometrytype(geo)   ISSIMPLE(GEO)   ASTEXT(centroid(geo))
-85984  MULTIPOLYGON    0   POINT(-114.87787186923313 36.33101763469059)
+85984  MULTIPOLYGON    0   POINT(-114.87787186923323 36.331017634690575)
 drop table t1;
 create table t1 (fl geometry not null);
 insert into t1 values (1);

With a debug binary, only tthe second difference is shown (and the value is a bit different):

@@ -655,7 +655,7 @@
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85984;
 object_id  geometrytype(geo)   ISSIMPLE(GEO)   ASTEXT(centroid(geo))
-85984  MULTIPOLYGON    0   POINT(-114.87787186923313 36.33101763469059)
+85984  MULTIPOLYGON    0   POINT(-114.87787186923329 36.33101763469052)
 drop table t1;
 create table t1 (fl geometry not null);
 insert into t1 values (1);

That row is also reported different for two "ia64" platforms (HP-UX 11.31 and RPM for RedHat 4; more IA64 builds are still outstanding):

@@ -655,7 +655,7 @@
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85984;
 object_id  geometrytype(geo)   ISSIMPLE(GEO)   ASTEXT(centroid(geo))
-85984  MULTIPOLYGON    0   POINT(-114.87787186923313 36.33101763469059)
+85984  MULTIPOLYGON    0   POINT(-114.87787186923326 36.33101763469053)
 drop table t1;
 create table t1 (fl geometry not null);
 insert into t1 values (1);

So this data row is reported on three different platforms, all using different compilers, with different values.
[26 Apr 2010 14:47] Alexander Nozdrin
Making experimental on Solaris due to this bug.
[6 May 2010 5:55] 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/107590

3171 Alexey Botchkov	2010-05-05
      Bug#52208      gis fails on some platforms (Solaris, HP-UX, Linux)
              The proper double mode isn't turned on if compiled with SUN Studio.
               So that floating math produces slightly different result.
      
      per-file comments:
        sql/mysqld.cc
      Bug#52208      gis fails on some platforms (Solaris, HP-UX, Linux)
              Turn on the 64-bit double mode on for the SUN Studio compiler.
[14 May 2010 16:10] 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/108367

3178 Alexey Botchkov	2010-05-13
      Bug#52208      gis fails on some platforms (Solaris, HP-UX, Linux)
              The proper double mode isn't turned on if compiled with SUN Studio.
               So that floating math produces slightly different result.
      
      per-file comments:
        sql/mysqld.cc
      Bug#52208      gis fails on some platforms (Solaris, HP-UX, Linux)
              Turn on the 64-bit double mode on for the SUN Studio compiler.
      
        mysql-test/collections/default.experimental
      Bug#52208      gis fails on some platforms (Solaris, HP-UX, Linux)
           gis test enabled
[17 Jun 2010 6:13] Bugs System
Pushed into 5.5.5-m3 (revid:alexey.kopytov@sun.com-20100615145247-8bj0vmuqlotbqsn9) (version source revid:alexey.kopytov@sun.com-20100615145247-8bj0vmuqlotbqsn9) (merge vers: 5.5.5-m3) (pib:16)
[17 Jun 2010 6:16] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615150216-cubqoyn1fj9b6a2p) (version source revid:alik@sun.com-20100615150216-cubqoyn1fj9b6a2p) (pib:16)
[7 Jul 2010 19:40] Paul Dubois
Noted in 5.5.5.

Operations on geometry data types failed on some systems for builds
compiled with Sun Studio.
[30 Aug 2010 12:18] Joerg Bruehe
The bug is gone on Solaris, so the fix there helped.

However, in 5.5.6 this bug still shows
- on HP-UX 11.31, IA64 CPU,
- on Linux x86_64 when compiled using ICC.

The tests passes when gcc or Sun Studio is used (AIUI, these are the cases handled by the fix),
and it even passes when ICC is used on IA64.
[13 Oct 2010 9:05] Alexander Nozdrin
5.5.7 -- still there:
http://pb2.norway.sun.com/?action=archive_download&archive_id=2395676&pretty=please
[11 Jan 2011 10:27] Alexey Botchkov
Yet another fix for the bug

Attachment: 52208.patch (text/plain), 19.59 KiB.

[11 Jan 2011 10:30] Alexey Botchkov
The old problem - different platforms and compilers produce slightly different DOUBLE results which breaks our tests.
As no nice fix was found for the HPUX platform, i rewrite tests to make them insensitive to that.
Please find the patch in the Files section of this bug's page.
[14 Jan 2011 22:11] Bugs System
Pushed into mysql-5.1 5.1.56 (revid:holyfoot@mysql.com-20110114205609-bcqgut1simvvy4pm) (version source revid:holyfoot@mysql.com-20110114205609-bcqgut1simvvy4pm) (merge vers: 5.1.56) (pib:24)
[14 Jan 2011 22:11] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:holyfoot@mysql.com-20110114210828-bhocu66j23zha7x8) (version source revid:holyfoot@mysql.com-20110114210828-bhocu66j23zha7x8) (merge vers: 5.6.2) (pib:24)
[14 Jan 2011 22:12] Bugs System
Pushed into mysql-5.5 5.5.10 (revid:holyfoot@mysql.com-20110114210202-wvjrarndnep7hh7c) (version source revid:holyfoot@mysql.com-20110114210202-wvjrarndnep7hh7c) (merge vers: 5.5.10) (pib:24)
[19 Jan 2011 1:28] Paul Dubois
Additional pushes are change test changes. No changelog entry needed.
[8 Feb 2011 3:29] 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/130654

3310 Anitha Gopi	2011-02-08
      Bug#52208 - Removed main.gis from experimental group
[8 Feb 2011 3:34] Bugs System
Pushed into mysql-5.5 5.5.10 (revid:anitha.gopi@sun.com-20110208032649-ks3nmlf49sf6bucg) (version source revid:anitha.gopi@sun.com-20110208032649-ks3nmlf49sf6bucg) (merge vers: 5.5.10) (pib:24)
[8 Feb 2011 3:35] 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/130656

3607 Anitha Gopi	2011-02-08 [merge]
      Bug#52208 : Removed main.gis from experimental. Upmerged from 5.5
[8 Feb 2011 3:37] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:anitha.gopi@sun.com-20110208032846-n0byvl61uhu5u1bu) (version source revid:anitha.gopi@sun.com-20110208032846-n0byvl61uhu5u1bu) (merge vers: 5.6.2) (pib:24)
[28 Feb 2011 16:35] Paul Dubois
Additional pushes are change test changes. No changelog entry needed.